botapi/
gen_types.rs

1use crate::bot::Part;
2use anyhow::{anyhow, Result};
3use reqwest::multipart::Form;
4#[cfg(feature = "rhai")]
5use rhai::{CustomType, TypeBuilder};
6use serde::{Deserialize, Serialize};
7use std::default::Default;
8use std::fmt;
9#[derive(Serialize, Deserialize, Hash, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
10#[serde(untagged)]
11pub enum ChatHandle {
12    Username(String),
13    ChatId(i64),
14}
15impl From<i64> for ChatHandle {
16    fn from(value: i64) -> Self {
17        Self::ChatId(value)
18    }
19}
20impl From<String> for ChatHandle {
21    fn from(value: String) -> Self {
22        Self::Username(value)
23    }
24}
25impl fmt::Display for ChatHandle {
26    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
27        match self {
28            Self::Username(u) => u.fmt(f),
29            Self::ChatId(i) => i.fmt(f),
30        }
31    }
32}
33impl Default for ChatHandle {
34    fn default() -> Self {
35        Self::ChatId(0)
36    }
37}
38#[allow(dead_code)]
39trait TraitInputPaidMedia: TraitInputPaidMediaPhoto + TraitInputPaidMediaVideo {}
40#[allow(dead_code)]
41trait TraitOrderInfo {
42    #[allow(rustdoc::invalid_html_tags)]
43    #[doc = "Optional. User name"]
44    #[allow(clippy::needless_lifetimes)]
45    fn get_name<'a>(&'a self) -> Option<&'a str>;
46    #[allow(rustdoc::invalid_html_tags)]
47    #[doc = "Optional. User name"]
48    #[allow(clippy::needless_lifetimes)]
49    fn set_name<'a>(&'a mut self, name: Option<String>) -> &'a mut Self;
50    #[allow(rustdoc::invalid_html_tags)]
51    #[doc = "Optional. User's phone number"]
52    #[allow(clippy::needless_lifetimes)]
53    fn get_phone_number<'a>(&'a self) -> Option<&'a str>;
54    #[allow(rustdoc::invalid_html_tags)]
55    #[doc = "Optional. User's phone number"]
56    #[allow(clippy::needless_lifetimes)]
57    fn set_phone_number<'a>(&'a mut self, phone_number: Option<String>) -> &'a mut Self;
58    #[allow(rustdoc::invalid_html_tags)]
59    #[doc = "Optional. User email"]
60    #[allow(clippy::needless_lifetimes)]
61    fn get_email<'a>(&'a self) -> Option<&'a str>;
62    #[allow(rustdoc::invalid_html_tags)]
63    #[doc = "Optional. User email"]
64    #[allow(clippy::needless_lifetimes)]
65    fn set_email<'a>(&'a mut self, email: Option<String>) -> &'a mut Self;
66    #[allow(rustdoc::invalid_html_tags)]
67    #[doc = "Optional. User shipping address"]
68    #[allow(clippy::needless_lifetimes)]
69    fn get_shipping_address<'a>(&'a self) -> Option<&'a ShippingAddress>;
70    #[allow(rustdoc::invalid_html_tags)]
71    #[doc = "Optional. User shipping address"]
72    #[allow(clippy::needless_lifetimes)]
73    fn set_shipping_address<'a>(
74        &'a mut self,
75        shipping_address: Option<ShippingAddress>,
76    ) -> &'a mut Self;
77}
78#[allow(dead_code)]
79trait TraitSuggestedPostPrice {
80    #[allow(rustdoc::invalid_html_tags)]
81    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
82    #[allow(clippy::needless_lifetimes)]
83    fn get_currency<'a>(&'a self) -> &'a str;
84    #[allow(rustdoc::invalid_html_tags)]
85    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
86    #[allow(clippy::needless_lifetimes)]
87    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self;
88    #[allow(rustdoc::invalid_html_tags)]
89    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
90    #[allow(clippy::needless_lifetimes)]
91    fn get_amount<'a>(&'a self) -> i64;
92    #[allow(rustdoc::invalid_html_tags)]
93    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
94    #[allow(clippy::needless_lifetimes)]
95    fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self;
96}
97#[allow(dead_code)]
98trait TraitChat {
99    #[allow(rustdoc::invalid_html_tags)]
100    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
101    #[allow(clippy::needless_lifetimes)]
102    fn get_id<'a>(&'a self) -> i64;
103    #[allow(rustdoc::invalid_html_tags)]
104    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
105    #[allow(clippy::needless_lifetimes)]
106    fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self;
107    #[allow(rustdoc::invalid_html_tags)]
108    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
109    #[allow(clippy::needless_lifetimes)]
110    fn get_tg_type<'a>(&'a self) -> &'a str;
111    #[allow(rustdoc::invalid_html_tags)]
112    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
113    #[allow(clippy::needless_lifetimes)]
114    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
115    #[allow(rustdoc::invalid_html_tags)]
116    #[doc = "Optional. Title, for supergroups, channels and group chats"]
117    #[allow(clippy::needless_lifetimes)]
118    fn get_title<'a>(&'a self) -> Option<&'a str>;
119    #[allow(rustdoc::invalid_html_tags)]
120    #[doc = "Optional. Title, for supergroups, channels and group chats"]
121    #[allow(clippy::needless_lifetimes)]
122    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
123    #[allow(rustdoc::invalid_html_tags)]
124    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
125    #[allow(clippy::needless_lifetimes)]
126    fn get_username<'a>(&'a self) -> Option<&'a str>;
127    #[allow(rustdoc::invalid_html_tags)]
128    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
129    #[allow(clippy::needless_lifetimes)]
130    fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self;
131    #[allow(rustdoc::invalid_html_tags)]
132    #[doc = "Optional. First name of the other party in a private chat"]
133    #[allow(clippy::needless_lifetimes)]
134    fn get_first_name<'a>(&'a self) -> Option<&'a str>;
135    #[allow(rustdoc::invalid_html_tags)]
136    #[doc = "Optional. First name of the other party in a private chat"]
137    #[allow(clippy::needless_lifetimes)]
138    fn set_first_name<'a>(&'a mut self, first_name: Option<String>) -> &'a mut Self;
139    #[allow(rustdoc::invalid_html_tags)]
140    #[doc = "Optional. Last name of the other party in a private chat"]
141    #[allow(clippy::needless_lifetimes)]
142    fn get_last_name<'a>(&'a self) -> Option<&'a str>;
143    #[allow(rustdoc::invalid_html_tags)]
144    #[doc = "Optional. Last name of the other party in a private chat"]
145    #[allow(clippy::needless_lifetimes)]
146    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self;
147    #[allow(rustdoc::invalid_html_tags)]
148    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
149    #[allow(clippy::needless_lifetimes)]
150    fn get_is_forum<'a>(&'a self) -> Option<bool>;
151    #[allow(rustdoc::invalid_html_tags)]
152    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
153    #[allow(clippy::needless_lifetimes)]
154    fn set_is_forum<'a>(&'a mut self, is_forum: Option<bool>) -> &'a mut Self;
155    #[allow(rustdoc::invalid_html_tags)]
156    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
157    #[allow(clippy::needless_lifetimes)]
158    fn get_is_direct_messages<'a>(&'a self) -> Option<bool>;
159    #[allow(rustdoc::invalid_html_tags)]
160    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
161    #[allow(clippy::needless_lifetimes)]
162    fn set_is_direct_messages<'a>(&'a mut self, is_direct_messages: Option<bool>) -> &'a mut Self;
163}
164#[allow(dead_code)]
165trait TraitCallbackGame {}
166#[allow(dead_code)]
167trait TraitUpdate {
168    #[allow(rustdoc::invalid_html_tags)]
169    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
170    #[allow(clippy::needless_lifetimes)]
171    fn get_update_id<'a>(&'a self) -> i64;
172    #[allow(rustdoc::invalid_html_tags)]
173    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
174    #[allow(clippy::needless_lifetimes)]
175    fn set_update_id<'a>(&'a mut self, update_id: i64) -> &'a mut Self;
176    #[allow(rustdoc::invalid_html_tags)]
177    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
178    #[allow(clippy::needless_lifetimes)]
179    fn get_message<'a>(&'a self) -> Option<&'a Message>;
180    #[allow(rustdoc::invalid_html_tags)]
181    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
182    #[allow(clippy::needless_lifetimes)]
183    fn set_message<'a>(&'a mut self, message: Option<Message>) -> &'a mut Self;
184    #[allow(rustdoc::invalid_html_tags)]
185    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
186    #[allow(clippy::needless_lifetimes)]
187    fn get_edited_message<'a>(&'a self) -> Option<&'a Message>;
188    #[allow(rustdoc::invalid_html_tags)]
189    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
190    #[allow(clippy::needless_lifetimes)]
191    fn set_edited_message<'a>(&'a mut self, edited_message: Option<Message>) -> &'a mut Self;
192    #[allow(rustdoc::invalid_html_tags)]
193    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
194    #[allow(clippy::needless_lifetimes)]
195    fn get_channel_post<'a>(&'a self) -> Option<&'a Message>;
196    #[allow(rustdoc::invalid_html_tags)]
197    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
198    #[allow(clippy::needless_lifetimes)]
199    fn set_channel_post<'a>(&'a mut self, channel_post: Option<Message>) -> &'a mut Self;
200    #[allow(rustdoc::invalid_html_tags)]
201    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
202    #[allow(clippy::needless_lifetimes)]
203    fn get_edited_channel_post<'a>(&'a self) -> Option<&'a Message>;
204    #[allow(rustdoc::invalid_html_tags)]
205    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
206    #[allow(clippy::needless_lifetimes)]
207    fn set_edited_channel_post<'a>(
208        &'a mut self,
209        edited_channel_post: Option<Message>,
210    ) -> &'a mut Self;
211    #[allow(rustdoc::invalid_html_tags)]
212    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
213    #[allow(clippy::needless_lifetimes)]
214    fn get_business_connection<'a>(&'a self) -> Option<&'a BusinessConnection>;
215    #[allow(rustdoc::invalid_html_tags)]
216    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
217    #[allow(clippy::needless_lifetimes)]
218    fn set_business_connection<'a>(
219        &'a mut self,
220        business_connection: Option<BusinessConnection>,
221    ) -> &'a mut Self;
222    #[allow(rustdoc::invalid_html_tags)]
223    #[doc = "Optional. New message from a connected business account"]
224    #[allow(clippy::needless_lifetimes)]
225    fn get_business_message<'a>(&'a self) -> Option<&'a Message>;
226    #[allow(rustdoc::invalid_html_tags)]
227    #[doc = "Optional. New message from a connected business account"]
228    #[allow(clippy::needless_lifetimes)]
229    fn set_business_message<'a>(&'a mut self, business_message: Option<Message>) -> &'a mut Self;
230    #[allow(rustdoc::invalid_html_tags)]
231    #[doc = "Optional. New version of a message from a connected business account"]
232    #[allow(clippy::needless_lifetimes)]
233    fn get_edited_business_message<'a>(&'a self) -> Option<&'a Message>;
234    #[allow(rustdoc::invalid_html_tags)]
235    #[doc = "Optional. New version of a message from a connected business account"]
236    #[allow(clippy::needless_lifetimes)]
237    fn set_edited_business_message<'a>(
238        &'a mut self,
239        edited_business_message: Option<Message>,
240    ) -> &'a mut Self;
241    #[allow(rustdoc::invalid_html_tags)]
242    #[doc = "Optional. Messages were deleted from a connected business account"]
243    #[allow(clippy::needless_lifetimes)]
244    fn get_deleted_business_messages<'a>(&'a self) -> Option<&'a BusinessMessagesDeleted>;
245    #[allow(rustdoc::invalid_html_tags)]
246    #[doc = "Optional. Messages were deleted from a connected business account"]
247    #[allow(clippy::needless_lifetimes)]
248    fn set_deleted_business_messages<'a>(
249        &'a mut self,
250        deleted_business_messages: Option<BusinessMessagesDeleted>,
251    ) -> &'a mut Self;
252    #[allow(rustdoc::invalid_html_tags)]
253    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
254    #[allow(clippy::needless_lifetimes)]
255    fn get_message_reaction<'a>(&'a self) -> Option<&'a MessageReactionUpdated>;
256    #[allow(rustdoc::invalid_html_tags)]
257    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
258    #[allow(clippy::needless_lifetimes)]
259    fn set_message_reaction<'a>(
260        &'a mut self,
261        message_reaction: Option<MessageReactionUpdated>,
262    ) -> &'a mut Self;
263    #[allow(rustdoc::invalid_html_tags)]
264    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
265    #[allow(clippy::needless_lifetimes)]
266    fn get_message_reaction_count<'a>(&'a self) -> Option<&'a MessageReactionCountUpdated>;
267    #[allow(rustdoc::invalid_html_tags)]
268    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
269    #[allow(clippy::needless_lifetimes)]
270    fn set_message_reaction_count<'a>(
271        &'a mut self,
272        message_reaction_count: Option<MessageReactionCountUpdated>,
273    ) -> &'a mut Self;
274    #[allow(rustdoc::invalid_html_tags)]
275    #[doc = "Optional. New incoming inline query"]
276    #[allow(clippy::needless_lifetimes)]
277    fn get_inline_query<'a>(&'a self) -> Option<&'a InlineQuery>;
278    #[allow(rustdoc::invalid_html_tags)]
279    #[doc = "Optional. New incoming inline query"]
280    #[allow(clippy::needless_lifetimes)]
281    fn set_inline_query<'a>(&'a mut self, inline_query: Option<InlineQuery>) -> &'a mut Self;
282    #[allow(rustdoc::invalid_html_tags)]
283    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
284    #[allow(clippy::needless_lifetimes)]
285    fn get_chosen_inline_result<'a>(&'a self) -> Option<&'a ChosenInlineResult>;
286    #[allow(rustdoc::invalid_html_tags)]
287    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
288    #[allow(clippy::needless_lifetimes)]
289    fn set_chosen_inline_result<'a>(
290        &'a mut self,
291        chosen_inline_result: Option<ChosenInlineResult>,
292    ) -> &'a mut Self;
293    #[allow(rustdoc::invalid_html_tags)]
294    #[doc = "Optional. New incoming callback query"]
295    #[allow(clippy::needless_lifetimes)]
296    fn get_callback_query<'a>(&'a self) -> Option<&'a CallbackQuery>;
297    #[allow(rustdoc::invalid_html_tags)]
298    #[doc = "Optional. New incoming callback query"]
299    #[allow(clippy::needless_lifetimes)]
300    fn set_callback_query<'a>(&'a mut self, callback_query: Option<CallbackQuery>) -> &'a mut Self;
301    #[allow(rustdoc::invalid_html_tags)]
302    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
303    #[allow(clippy::needless_lifetimes)]
304    fn get_shipping_query<'a>(&'a self) -> Option<&'a ShippingQuery>;
305    #[allow(rustdoc::invalid_html_tags)]
306    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
307    #[allow(clippy::needless_lifetimes)]
308    fn set_shipping_query<'a>(&'a mut self, shipping_query: Option<ShippingQuery>) -> &'a mut Self;
309    #[allow(rustdoc::invalid_html_tags)]
310    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
311    #[allow(clippy::needless_lifetimes)]
312    fn get_pre_checkout_query<'a>(&'a self) -> Option<&'a PreCheckoutQuery>;
313    #[allow(rustdoc::invalid_html_tags)]
314    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
315    #[allow(clippy::needless_lifetimes)]
316    fn set_pre_checkout_query<'a>(
317        &'a mut self,
318        pre_checkout_query: Option<PreCheckoutQuery>,
319    ) -> &'a mut Self;
320    #[allow(rustdoc::invalid_html_tags)]
321    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
322    #[allow(clippy::needless_lifetimes)]
323    fn get_purchased_paid_media<'a>(&'a self) -> Option<&'a PaidMediaPurchased>;
324    #[allow(rustdoc::invalid_html_tags)]
325    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
326    #[allow(clippy::needless_lifetimes)]
327    fn set_purchased_paid_media<'a>(
328        &'a mut self,
329        purchased_paid_media: Option<PaidMediaPurchased>,
330    ) -> &'a mut Self;
331    #[allow(rustdoc::invalid_html_tags)]
332    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
333    #[allow(clippy::needless_lifetimes)]
334    fn get_poll<'a>(&'a self) -> Option<&'a Poll>;
335    #[allow(rustdoc::invalid_html_tags)]
336    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
337    #[allow(clippy::needless_lifetimes)]
338    fn set_poll<'a>(&'a mut self, poll: Option<Poll>) -> &'a mut Self;
339    #[allow(rustdoc::invalid_html_tags)]
340    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
341    #[allow(clippy::needless_lifetimes)]
342    fn get_poll_answer<'a>(&'a self) -> Option<&'a PollAnswer>;
343    #[allow(rustdoc::invalid_html_tags)]
344    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
345    #[allow(clippy::needless_lifetimes)]
346    fn set_poll_answer<'a>(&'a mut self, poll_answer: Option<PollAnswer>) -> &'a mut Self;
347    #[allow(rustdoc::invalid_html_tags)]
348    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
349    #[allow(clippy::needless_lifetimes)]
350    fn get_my_chat_member<'a>(&'a self) -> Option<&'a ChatMemberUpdated>;
351    #[allow(rustdoc::invalid_html_tags)]
352    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
353    #[allow(clippy::needless_lifetimes)]
354    fn set_my_chat_member<'a>(
355        &'a mut self,
356        my_chat_member: Option<ChatMemberUpdated>,
357    ) -> &'a mut Self;
358    #[allow(rustdoc::invalid_html_tags)]
359    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
360    #[allow(clippy::needless_lifetimes)]
361    fn get_chat_member<'a>(&'a self) -> Option<&'a ChatMemberUpdated>;
362    #[allow(rustdoc::invalid_html_tags)]
363    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
364    #[allow(clippy::needless_lifetimes)]
365    fn set_chat_member<'a>(&'a mut self, chat_member: Option<ChatMemberUpdated>) -> &'a mut Self;
366    #[allow(rustdoc::invalid_html_tags)]
367    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
368    #[allow(clippy::needless_lifetimes)]
369    fn get_chat_join_request<'a>(&'a self) -> Option<&'a ChatJoinRequest>;
370    #[allow(rustdoc::invalid_html_tags)]
371    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
372    #[allow(clippy::needless_lifetimes)]
373    fn set_chat_join_request<'a>(
374        &'a mut self,
375        chat_join_request: Option<ChatJoinRequest>,
376    ) -> &'a mut Self;
377    #[allow(rustdoc::invalid_html_tags)]
378    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
379    #[allow(clippy::needless_lifetimes)]
380    fn get_chat_boost<'a>(&'a self) -> Option<&'a ChatBoostUpdated>;
381    #[allow(rustdoc::invalid_html_tags)]
382    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
383    #[allow(clippy::needless_lifetimes)]
384    fn set_chat_boost<'a>(&'a mut self, chat_boost: Option<ChatBoostUpdated>) -> &'a mut Self;
385    #[allow(rustdoc::invalid_html_tags)]
386    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
387    #[allow(clippy::needless_lifetimes)]
388    fn get_removed_chat_boost<'a>(&'a self) -> Option<&'a ChatBoostRemoved>;
389    #[allow(rustdoc::invalid_html_tags)]
390    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
391    #[allow(clippy::needless_lifetimes)]
392    fn set_removed_chat_boost<'a>(
393        &'a mut self,
394        removed_chat_boost: Option<ChatBoostRemoved>,
395    ) -> &'a mut Self;
396}
397#[allow(dead_code)]
398trait TraitPhotoSize {
399    #[allow(rustdoc::invalid_html_tags)]
400    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
401    #[allow(clippy::needless_lifetimes)]
402    fn get_file_id<'a>(&'a self) -> &'a str;
403    #[allow(rustdoc::invalid_html_tags)]
404    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
405    #[allow(clippy::needless_lifetimes)]
406    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
407    #[allow(rustdoc::invalid_html_tags)]
408    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
409    #[allow(clippy::needless_lifetimes)]
410    fn get_file_unique_id<'a>(&'a self) -> &'a str;
411    #[allow(rustdoc::invalid_html_tags)]
412    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
413    #[allow(clippy::needless_lifetimes)]
414    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
415    #[allow(rustdoc::invalid_html_tags)]
416    #[doc = "Photo width"]
417    #[allow(clippy::needless_lifetimes)]
418    fn get_width<'a>(&'a self) -> i64;
419    #[allow(rustdoc::invalid_html_tags)]
420    #[doc = "Photo width"]
421    #[allow(clippy::needless_lifetimes)]
422    fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self;
423    #[allow(rustdoc::invalid_html_tags)]
424    #[doc = "Photo height"]
425    #[allow(clippy::needless_lifetimes)]
426    fn get_height<'a>(&'a self) -> i64;
427    #[allow(rustdoc::invalid_html_tags)]
428    #[doc = "Photo height"]
429    #[allow(clippy::needless_lifetimes)]
430    fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self;
431    #[allow(rustdoc::invalid_html_tags)]
432    #[doc = "Optional. File size in bytes"]
433    #[allow(clippy::needless_lifetimes)]
434    fn get_file_size<'a>(&'a self) -> Option<i64>;
435    #[allow(rustdoc::invalid_html_tags)]
436    #[doc = "Optional. File size in bytes"]
437    #[allow(clippy::needless_lifetimes)]
438    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
439}
440#[allow(dead_code)]
441trait TraitChatMember:
442    TraitChatMemberOwner
443    + TraitChatMemberAdministrator
444    + TraitChatMemberMember
445    + TraitChatMemberRestricted
446    + TraitChatMemberLeft
447    + TraitChatMemberBanned
448{
449}
450#[allow(dead_code)]
451trait TraitChatBoostSourceGiftCode {
452    #[allow(rustdoc::invalid_html_tags)]
453    #[doc = "Source of the boost, always \"gift_code\""]
454    #[allow(clippy::needless_lifetimes)]
455    fn get_source<'a>(&'a self) -> &'a str;
456    #[allow(rustdoc::invalid_html_tags)]
457    #[doc = "Source of the boost, always \"gift_code\""]
458    #[allow(clippy::needless_lifetimes)]
459    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
460    #[allow(rustdoc::invalid_html_tags)]
461    #[doc = "User for which the gift code was created"]
462    #[allow(clippy::needless_lifetimes)]
463    fn get_user<'a>(&'a self) -> &'a User;
464    #[allow(rustdoc::invalid_html_tags)]
465    #[doc = "User for which the gift code was created"]
466    #[allow(clippy::needless_lifetimes)]
467    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
468}
469#[allow(dead_code)]
470trait TraitPollOption {
471    #[allow(rustdoc::invalid_html_tags)]
472    #[doc = "Option text, 1-100 characters"]
473    #[allow(clippy::needless_lifetimes)]
474    fn get_text<'a>(&'a self) -> &'a str;
475    #[allow(rustdoc::invalid_html_tags)]
476    #[doc = "Option text, 1-100 characters"]
477    #[allow(clippy::needless_lifetimes)]
478    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
479    #[allow(rustdoc::invalid_html_tags)]
480    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
481    #[allow(clippy::needless_lifetimes)]
482    fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
483    #[allow(rustdoc::invalid_html_tags)]
484    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
485    #[allow(clippy::needless_lifetimes)]
486    fn set_text_entities<'a>(
487        &'a mut self,
488        text_entities: Option<Vec<MessageEntity>>,
489    ) -> &'a mut Self;
490    #[allow(rustdoc::invalid_html_tags)]
491    #[doc = "Number of users that voted for this option"]
492    #[allow(clippy::needless_lifetimes)]
493    fn get_voter_count<'a>(&'a self) -> i64;
494    #[allow(rustdoc::invalid_html_tags)]
495    #[doc = "Number of users that voted for this option"]
496    #[allow(clippy::needless_lifetimes)]
497    fn set_voter_count<'a>(&'a mut self, voter_count: i64) -> &'a mut Self;
498}
499#[allow(dead_code)]
500trait TraitStoryAreaType:
501    TraitStoryAreaTypeLocation
502    + TraitStoryAreaTypeSuggestedReaction
503    + TraitStoryAreaTypeLink
504    + TraitStoryAreaTypeWeather
505    + TraitStoryAreaTypeUniqueGift
506{
507}
508#[allow(dead_code)]
509trait TraitInlineQuery {
510    #[allow(rustdoc::invalid_html_tags)]
511    #[doc = "Unique identifier for this query"]
512    #[allow(clippy::needless_lifetimes)]
513    fn get_id<'a>(&'a self) -> &'a str;
514    #[allow(rustdoc::invalid_html_tags)]
515    #[doc = "Unique identifier for this query"]
516    #[allow(clippy::needless_lifetimes)]
517    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
518    #[allow(rustdoc::invalid_html_tags)]
519    #[doc = "Sender"]
520    #[allow(clippy::needless_lifetimes)]
521    fn get_from<'a>(&'a self) -> &'a User;
522    #[allow(rustdoc::invalid_html_tags)]
523    #[doc = "Sender"]
524    #[allow(clippy::needless_lifetimes)]
525    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
526    #[allow(rustdoc::invalid_html_tags)]
527    #[doc = "Text of the query (up to 256 characters)"]
528    #[allow(clippy::needless_lifetimes)]
529    fn get_query<'a>(&'a self) -> &'a str;
530    #[allow(rustdoc::invalid_html_tags)]
531    #[doc = "Text of the query (up to 256 characters)"]
532    #[allow(clippy::needless_lifetimes)]
533    fn set_query<'a>(&'a mut self, query: String) -> &'a mut Self;
534    #[allow(rustdoc::invalid_html_tags)]
535    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
536    #[allow(clippy::needless_lifetimes)]
537    fn get_offset<'a>(&'a self) -> &'a str;
538    #[allow(rustdoc::invalid_html_tags)]
539    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
540    #[allow(clippy::needless_lifetimes)]
541    fn set_offset<'a>(&'a mut self, offset: String) -> &'a mut Self;
542    #[allow(rustdoc::invalid_html_tags)]
543    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
544    #[allow(clippy::needless_lifetimes)]
545    fn get_chat_type<'a>(&'a self) -> Option<&'a str>;
546    #[allow(rustdoc::invalid_html_tags)]
547    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
548    #[allow(clippy::needless_lifetimes)]
549    fn set_chat_type<'a>(&'a mut self, chat_type: Option<String>) -> &'a mut Self;
550    #[allow(rustdoc::invalid_html_tags)]
551    #[doc = "Optional. Sender location, only for bots that request user location"]
552    #[allow(clippy::needless_lifetimes)]
553    fn get_location<'a>(&'a self) -> Option<&'a Location>;
554    #[allow(rustdoc::invalid_html_tags)]
555    #[doc = "Optional. Sender location, only for bots that request user location"]
556    #[allow(clippy::needless_lifetimes)]
557    fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self;
558}
559#[allow(dead_code)]
560trait TraitTransactionPartnerUser {
561    #[allow(rustdoc::invalid_html_tags)]
562    #[doc = "Type of the transaction partner, always \"user\""]
563    #[allow(clippy::needless_lifetimes)]
564    fn get_tg_type<'a>(&'a self) -> &'a str;
565    #[allow(rustdoc::invalid_html_tags)]
566    #[doc = "Type of the transaction partner, always \"user\""]
567    #[allow(clippy::needless_lifetimes)]
568    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
569    #[allow(rustdoc::invalid_html_tags)]
570    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
571    #[allow(clippy::needless_lifetimes)]
572    fn get_transaction_type<'a>(&'a self) -> &'a str;
573    #[allow(rustdoc::invalid_html_tags)]
574    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
575    #[allow(clippy::needless_lifetimes)]
576    fn set_transaction_type<'a>(&'a mut self, transaction_type: String) -> &'a mut Self;
577    #[allow(rustdoc::invalid_html_tags)]
578    #[doc = "Information about the user"]
579    #[allow(clippy::needless_lifetimes)]
580    fn get_user<'a>(&'a self) -> &'a User;
581    #[allow(rustdoc::invalid_html_tags)]
582    #[doc = "Information about the user"]
583    #[allow(clippy::needless_lifetimes)]
584    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
585    #[allow(rustdoc::invalid_html_tags)]
586    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
587    #[allow(clippy::needless_lifetimes)]
588    fn get_affiliate<'a>(&'a self) -> Option<&'a AffiliateInfo>;
589    #[allow(rustdoc::invalid_html_tags)]
590    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
591    #[allow(clippy::needless_lifetimes)]
592    fn set_affiliate<'a>(&'a mut self, affiliate: Option<AffiliateInfo>) -> &'a mut Self;
593    #[allow(rustdoc::invalid_html_tags)]
594    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
595    #[allow(clippy::needless_lifetimes)]
596    fn get_invoice_payload<'a>(&'a self) -> Option<&'a str>;
597    #[allow(rustdoc::invalid_html_tags)]
598    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
599    #[allow(clippy::needless_lifetimes)]
600    fn set_invoice_payload<'a>(&'a mut self, invoice_payload: Option<String>) -> &'a mut Self;
601    #[allow(rustdoc::invalid_html_tags)]
602    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
603    #[allow(clippy::needless_lifetimes)]
604    fn get_subscription_period<'a>(&'a self) -> Option<i64>;
605    #[allow(rustdoc::invalid_html_tags)]
606    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
607    #[allow(clippy::needless_lifetimes)]
608    fn set_subscription_period<'a>(&'a mut self, subscription_period: Option<i64>) -> &'a mut Self;
609    #[allow(rustdoc::invalid_html_tags)]
610    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
611    #[allow(clippy::needless_lifetimes)]
612    fn get_paid_media<'a>(&'a self) -> Option<&'a Vec<PaidMedia>>;
613    #[allow(rustdoc::invalid_html_tags)]
614    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
615    #[allow(clippy::needless_lifetimes)]
616    fn set_paid_media<'a>(&'a mut self, paid_media: Option<Vec<PaidMedia>>) -> &'a mut Self;
617    #[allow(rustdoc::invalid_html_tags)]
618    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
619    #[allow(clippy::needless_lifetimes)]
620    fn get_paid_media_payload<'a>(&'a self) -> Option<&'a str>;
621    #[allow(rustdoc::invalid_html_tags)]
622    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
623    #[allow(clippy::needless_lifetimes)]
624    fn set_paid_media_payload<'a>(&'a mut self, paid_media_payload: Option<String>)
625        -> &'a mut Self;
626    #[allow(rustdoc::invalid_html_tags)]
627    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
628    #[allow(clippy::needless_lifetimes)]
629    fn get_gift<'a>(&'a self) -> Option<&'a Gift>;
630    #[allow(rustdoc::invalid_html_tags)]
631    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
632    #[allow(clippy::needless_lifetimes)]
633    fn set_gift<'a>(&'a mut self, gift: Option<Gift>) -> &'a mut Self;
634    #[allow(rustdoc::invalid_html_tags)]
635    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
636    #[allow(clippy::needless_lifetimes)]
637    fn get_premium_subscription_duration<'a>(&'a self) -> Option<i64>;
638    #[allow(rustdoc::invalid_html_tags)]
639    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
640    #[allow(clippy::needless_lifetimes)]
641    fn set_premium_subscription_duration<'a>(
642        &'a mut self,
643        premium_subscription_duration: Option<i64>,
644    ) -> &'a mut Self;
645}
646#[allow(dead_code)]
647trait TraitInputMediaPhoto {
648    #[allow(rustdoc::invalid_html_tags)]
649    #[doc = "Type of the result, must be photo"]
650    #[allow(clippy::needless_lifetimes)]
651    fn get_tg_type<'a>(&'a self) -> &'a str;
652    #[allow(rustdoc::invalid_html_tags)]
653    #[doc = "Type of the result, must be photo"]
654    #[allow(clippy::needless_lifetimes)]
655    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
656    #[allow(rustdoc::invalid_html_tags)]
657    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
658    #[allow(clippy::needless_lifetimes)]
659    fn get_media<'a>(&'a self) -> &'a Option<InputFile>;
660    #[allow(rustdoc::invalid_html_tags)]
661    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
662    #[allow(clippy::needless_lifetimes)]
663    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self;
664    #[allow(rustdoc::invalid_html_tags)]
665    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
666    #[allow(clippy::needless_lifetimes)]
667    fn get_caption<'a>(&'a self) -> Option<&'a str>;
668    #[allow(rustdoc::invalid_html_tags)]
669    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
670    #[allow(clippy::needless_lifetimes)]
671    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
672    #[allow(rustdoc::invalid_html_tags)]
673    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
674    #[allow(clippy::needless_lifetimes)]
675    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
676    #[allow(rustdoc::invalid_html_tags)]
677    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
678    #[allow(clippy::needless_lifetimes)]
679    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
680    #[allow(rustdoc::invalid_html_tags)]
681    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
682    #[allow(clippy::needless_lifetimes)]
683    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
684    #[allow(rustdoc::invalid_html_tags)]
685    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
686    #[allow(clippy::needless_lifetimes)]
687    fn set_caption_entities<'a>(
688        &'a mut self,
689        caption_entities: Option<Vec<MessageEntity>>,
690    ) -> &'a mut Self;
691    #[allow(rustdoc::invalid_html_tags)]
692    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
693    #[allow(clippy::needless_lifetimes)]
694    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
695    #[allow(rustdoc::invalid_html_tags)]
696    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
697    #[allow(clippy::needless_lifetimes)]
698    fn set_show_caption_above_media<'a>(
699        &'a mut self,
700        show_caption_above_media: Option<bool>,
701    ) -> &'a mut Self;
702    #[allow(rustdoc::invalid_html_tags)]
703    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
704    #[allow(clippy::needless_lifetimes)]
705    fn get_has_spoiler<'a>(&'a self) -> Option<bool>;
706    #[allow(rustdoc::invalid_html_tags)]
707    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
708    #[allow(clippy::needless_lifetimes)]
709    fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self;
710}
711#[allow(dead_code)]
712trait TraitVideoChatScheduled {
713    #[allow(rustdoc::invalid_html_tags)]
714    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
715    #[allow(clippy::needless_lifetimes)]
716    fn get_start_date<'a>(&'a self) -> i64;
717    #[allow(rustdoc::invalid_html_tags)]
718    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
719    #[allow(clippy::needless_lifetimes)]
720    fn set_start_date<'a>(&'a mut self, start_date: i64) -> &'a mut Self;
721}
722#[allow(dead_code)]
723trait TraitForumTopicCreated {
724    #[allow(rustdoc::invalid_html_tags)]
725    #[doc = "Name of the topic"]
726    #[allow(clippy::needless_lifetimes)]
727    fn get_name<'a>(&'a self) -> &'a str;
728    #[allow(rustdoc::invalid_html_tags)]
729    #[doc = "Name of the topic"]
730    #[allow(clippy::needless_lifetimes)]
731    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
732    #[allow(rustdoc::invalid_html_tags)]
733    #[doc = "Color of the topic icon in RGB format"]
734    #[allow(clippy::needless_lifetimes)]
735    fn get_icon_color<'a>(&'a self) -> i64;
736    #[allow(rustdoc::invalid_html_tags)]
737    #[doc = "Color of the topic icon in RGB format"]
738    #[allow(clippy::needless_lifetimes)]
739    fn set_icon_color<'a>(&'a mut self, icon_color: i64) -> &'a mut Self;
740    #[allow(rustdoc::invalid_html_tags)]
741    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
742    #[allow(clippy::needless_lifetimes)]
743    fn get_icon_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
744    #[allow(rustdoc::invalid_html_tags)]
745    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
746    #[allow(clippy::needless_lifetimes)]
747    fn set_icon_custom_emoji_id<'a>(
748        &'a mut self,
749        icon_custom_emoji_id: Option<String>,
750    ) -> &'a mut Self;
751}
752#[allow(dead_code)]
753trait TraitInlineKeyboardButton {
754    #[allow(rustdoc::invalid_html_tags)]
755    #[doc = "Label text on the button"]
756    #[allow(clippy::needless_lifetimes)]
757    fn get_text<'a>(&'a self) -> &'a str;
758    #[allow(rustdoc::invalid_html_tags)]
759    #[doc = "Label text on the button"]
760    #[allow(clippy::needless_lifetimes)]
761    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
762    #[allow(rustdoc::invalid_html_tags)]
763    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
764    #[allow(clippy::needless_lifetimes)]
765    fn get_url<'a>(&'a self) -> Option<&'a str>;
766    #[allow(rustdoc::invalid_html_tags)]
767    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
768    #[allow(clippy::needless_lifetimes)]
769    fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self;
770    #[allow(rustdoc::invalid_html_tags)]
771    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
772    #[allow(clippy::needless_lifetimes)]
773    fn get_callback_data<'a>(&'a self) -> Option<&'a str>;
774    #[allow(rustdoc::invalid_html_tags)]
775    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
776    #[allow(clippy::needless_lifetimes)]
777    fn set_callback_data<'a>(&'a mut self, callback_data: Option<String>) -> &'a mut Self;
778    #[allow(rustdoc::invalid_html_tags)]
779    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
780    #[allow(clippy::needless_lifetimes)]
781    fn get_web_app<'a>(&'a self) -> Option<&'a WebAppInfo>;
782    #[allow(rustdoc::invalid_html_tags)]
783    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
784    #[allow(clippy::needless_lifetimes)]
785    fn set_web_app<'a>(&'a mut self, web_app: Option<WebAppInfo>) -> &'a mut Self;
786    #[allow(rustdoc::invalid_html_tags)]
787    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
788    #[allow(clippy::needless_lifetimes)]
789    fn get_login_url<'a>(&'a self) -> Option<&'a LoginUrl>;
790    #[allow(rustdoc::invalid_html_tags)]
791    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
792    #[allow(clippy::needless_lifetimes)]
793    fn set_login_url<'a>(&'a mut self, login_url: Option<LoginUrl>) -> &'a mut Self;
794    #[allow(rustdoc::invalid_html_tags)]
795    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
796    #[allow(clippy::needless_lifetimes)]
797    fn get_switch_inline_query<'a>(&'a self) -> Option<&'a str>;
798    #[allow(rustdoc::invalid_html_tags)]
799    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
800    #[allow(clippy::needless_lifetimes)]
801    fn set_switch_inline_query<'a>(
802        &'a mut self,
803        switch_inline_query: Option<String>,
804    ) -> &'a mut Self;
805    #[allow(rustdoc::invalid_html_tags)]
806    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
807    #[allow(clippy::needless_lifetimes)]
808    fn get_switch_inline_query_current_chat<'a>(&'a self) -> Option<&'a str>;
809    #[allow(rustdoc::invalid_html_tags)]
810    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
811    #[allow(clippy::needless_lifetimes)]
812    fn set_switch_inline_query_current_chat<'a>(
813        &'a mut self,
814        switch_inline_query_current_chat: Option<String>,
815    ) -> &'a mut Self;
816    #[allow(rustdoc::invalid_html_tags)]
817    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
818    #[allow(clippy::needless_lifetimes)]
819    fn get_switch_inline_query_chosen_chat<'a>(&'a self)
820        -> Option<&'a SwitchInlineQueryChosenChat>;
821    #[allow(rustdoc::invalid_html_tags)]
822    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
823    #[allow(clippy::needless_lifetimes)]
824    fn set_switch_inline_query_chosen_chat<'a>(
825        &'a mut self,
826        switch_inline_query_chosen_chat: Option<SwitchInlineQueryChosenChat>,
827    ) -> &'a mut Self;
828    #[allow(rustdoc::invalid_html_tags)]
829    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
830    #[allow(clippy::needless_lifetimes)]
831    fn get_copy_text<'a>(&'a self) -> Option<&'a CopyTextButton>;
832    #[allow(rustdoc::invalid_html_tags)]
833    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
834    #[allow(clippy::needless_lifetimes)]
835    fn set_copy_text<'a>(&'a mut self, copy_text: Option<CopyTextButton>) -> &'a mut Self;
836    #[allow(rustdoc::invalid_html_tags)]
837    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
838    #[allow(clippy::needless_lifetimes)]
839    fn get_callback_game<'a>(&'a self) -> Option<&'a CallbackGame>;
840    #[allow(rustdoc::invalid_html_tags)]
841    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
842    #[allow(clippy::needless_lifetimes)]
843    fn set_callback_game<'a>(&'a mut self, callback_game: Option<CallbackGame>) -> &'a mut Self;
844    #[allow(rustdoc::invalid_html_tags)]
845    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
846    #[allow(clippy::needless_lifetimes)]
847    fn get_pay<'a>(&'a self) -> Option<bool>;
848    #[allow(rustdoc::invalid_html_tags)]
849    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
850    #[allow(clippy::needless_lifetimes)]
851    fn set_pay<'a>(&'a mut self, pay: Option<bool>) -> &'a mut Self;
852}
853#[allow(dead_code)]
854trait TraitPaidMediaVideo {
855    #[allow(rustdoc::invalid_html_tags)]
856    #[doc = "Type of the paid media, always \"video\""]
857    #[allow(clippy::needless_lifetimes)]
858    fn get_tg_type<'a>(&'a self) -> &'a str;
859    #[allow(rustdoc::invalid_html_tags)]
860    #[doc = "Type of the paid media, always \"video\""]
861    #[allow(clippy::needless_lifetimes)]
862    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
863    #[allow(rustdoc::invalid_html_tags)]
864    #[doc = "The video"]
865    #[allow(clippy::needless_lifetimes)]
866    fn get_video<'a>(&'a self) -> &'a Video;
867    #[allow(rustdoc::invalid_html_tags)]
868    #[doc = "The video"]
869    #[allow(clippy::needless_lifetimes)]
870    fn set_video<'a>(&'a mut self, video: Video) -> &'a mut Self;
871}
872#[allow(dead_code)]
873trait TraitChatJoinRequest {
874    #[allow(rustdoc::invalid_html_tags)]
875    #[doc = "Chat to which the request was sent"]
876    #[allow(clippy::needless_lifetimes)]
877    fn get_chat<'a>(&'a self) -> &'a Chat;
878    #[allow(rustdoc::invalid_html_tags)]
879    #[doc = "Chat to which the request was sent"]
880    #[allow(clippy::needless_lifetimes)]
881    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
882    #[allow(rustdoc::invalid_html_tags)]
883    #[doc = "User that sent the join request"]
884    #[allow(clippy::needless_lifetimes)]
885    fn get_from<'a>(&'a self) -> &'a User;
886    #[allow(rustdoc::invalid_html_tags)]
887    #[doc = "User that sent the join request"]
888    #[allow(clippy::needless_lifetimes)]
889    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
890    #[allow(rustdoc::invalid_html_tags)]
891    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
892    #[allow(clippy::needless_lifetimes)]
893    fn get_user_chat_id<'a>(&'a self) -> i64;
894    #[allow(rustdoc::invalid_html_tags)]
895    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
896    #[allow(clippy::needless_lifetimes)]
897    fn set_user_chat_id<'a>(&'a mut self, user_chat_id: i64) -> &'a mut Self;
898    #[allow(rustdoc::invalid_html_tags)]
899    #[doc = "Date the request was sent in Unix time"]
900    #[allow(clippy::needless_lifetimes)]
901    fn get_date<'a>(&'a self) -> i64;
902    #[allow(rustdoc::invalid_html_tags)]
903    #[doc = "Date the request was sent in Unix time"]
904    #[allow(clippy::needless_lifetimes)]
905    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
906    #[allow(rustdoc::invalid_html_tags)]
907    #[doc = "Optional. Bio of the user."]
908    #[allow(clippy::needless_lifetimes)]
909    fn get_bio<'a>(&'a self) -> Option<&'a str>;
910    #[allow(rustdoc::invalid_html_tags)]
911    #[doc = "Optional. Bio of the user."]
912    #[allow(clippy::needless_lifetimes)]
913    fn set_bio<'a>(&'a mut self, bio: Option<String>) -> &'a mut Self;
914    #[allow(rustdoc::invalid_html_tags)]
915    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
916    #[allow(clippy::needless_lifetimes)]
917    fn get_invite_link<'a>(&'a self) -> Option<&'a ChatInviteLink>;
918    #[allow(rustdoc::invalid_html_tags)]
919    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
920    #[allow(clippy::needless_lifetimes)]
921    fn set_invite_link<'a>(&'a mut self, invite_link: Option<ChatInviteLink>) -> &'a mut Self;
922}
923#[allow(dead_code)]
924trait TraitStoryAreaPosition {
925    #[allow(rustdoc::invalid_html_tags)]
926    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
927    #[allow(clippy::needless_lifetimes)]
928    fn get_x_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
929    #[allow(rustdoc::invalid_html_tags)]
930    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
931    #[allow(clippy::needless_lifetimes)]
932    fn set_x_percentage<'a>(
933        &'a mut self,
934        x_percentage: ::ordered_float::OrderedFloat<f64>,
935    ) -> &'a mut Self;
936    #[allow(rustdoc::invalid_html_tags)]
937    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
938    #[allow(clippy::needless_lifetimes)]
939    fn get_y_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
940    #[allow(rustdoc::invalid_html_tags)]
941    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
942    #[allow(clippy::needless_lifetimes)]
943    fn set_y_percentage<'a>(
944        &'a mut self,
945        y_percentage: ::ordered_float::OrderedFloat<f64>,
946    ) -> &'a mut Self;
947    #[allow(rustdoc::invalid_html_tags)]
948    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
949    #[allow(clippy::needless_lifetimes)]
950    fn get_width_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
951    #[allow(rustdoc::invalid_html_tags)]
952    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
953    #[allow(clippy::needless_lifetimes)]
954    fn set_width_percentage<'a>(
955        &'a mut self,
956        width_percentage: ::ordered_float::OrderedFloat<f64>,
957    ) -> &'a mut Self;
958    #[allow(rustdoc::invalid_html_tags)]
959    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
960    #[allow(clippy::needless_lifetimes)]
961    fn get_height_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
962    #[allow(rustdoc::invalid_html_tags)]
963    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
964    #[allow(clippy::needless_lifetimes)]
965    fn set_height_percentage<'a>(
966        &'a mut self,
967        height_percentage: ::ordered_float::OrderedFloat<f64>,
968    ) -> &'a mut Self;
969    #[allow(rustdoc::invalid_html_tags)]
970    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
971    #[allow(clippy::needless_lifetimes)]
972    fn get_rotation_angle<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
973    #[allow(rustdoc::invalid_html_tags)]
974    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
975    #[allow(clippy::needless_lifetimes)]
976    fn set_rotation_angle<'a>(
977        &'a mut self,
978        rotation_angle: ::ordered_float::OrderedFloat<f64>,
979    ) -> &'a mut Self;
980    #[allow(rustdoc::invalid_html_tags)]
981    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
982    #[allow(clippy::needless_lifetimes)]
983    fn get_corner_radius_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
984    #[allow(rustdoc::invalid_html_tags)]
985    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
986    #[allow(clippy::needless_lifetimes)]
987    fn set_corner_radius_percentage<'a>(
988        &'a mut self,
989        corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
990    ) -> &'a mut Self;
991}
992#[allow(dead_code)]
993trait TraitBotCommand {
994    #[allow(rustdoc::invalid_html_tags)]
995    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
996    #[allow(clippy::needless_lifetimes)]
997    fn get_command<'a>(&'a self) -> &'a str;
998    #[allow(rustdoc::invalid_html_tags)]
999    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
1000    #[allow(clippy::needless_lifetimes)]
1001    fn set_command<'a>(&'a mut self, command: String) -> &'a mut Self;
1002    #[allow(rustdoc::invalid_html_tags)]
1003    #[doc = "Description of the command; 1-256 characters."]
1004    #[allow(clippy::needless_lifetimes)]
1005    fn get_description<'a>(&'a self) -> &'a str;
1006    #[allow(rustdoc::invalid_html_tags)]
1007    #[doc = "Description of the command; 1-256 characters."]
1008    #[allow(clippy::needless_lifetimes)]
1009    fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self;
1010}
1011#[allow(dead_code)]
1012trait TraitSuggestedPostPaid {
1013    #[allow(rustdoc::invalid_html_tags)]
1014    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
1015    #[allow(clippy::needless_lifetimes)]
1016    fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message>;
1017    #[allow(rustdoc::invalid_html_tags)]
1018    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
1019    #[allow(clippy::needless_lifetimes)]
1020    fn set_suggested_post_message<'a>(
1021        &'a mut self,
1022        suggested_post_message: Option<Message>,
1023    ) -> &'a mut Self;
1024    #[allow(rustdoc::invalid_html_tags)]
1025    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
1026    #[allow(clippy::needless_lifetimes)]
1027    fn get_currency<'a>(&'a self) -> &'a str;
1028    #[allow(rustdoc::invalid_html_tags)]
1029    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
1030    #[allow(clippy::needless_lifetimes)]
1031    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self;
1032    #[allow(rustdoc::invalid_html_tags)]
1033    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
1034    #[allow(clippy::needless_lifetimes)]
1035    fn get_amount<'a>(&'a self) -> Option<i64>;
1036    #[allow(rustdoc::invalid_html_tags)]
1037    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
1038    #[allow(clippy::needless_lifetimes)]
1039    fn set_amount<'a>(&'a mut self, amount: Option<i64>) -> &'a mut Self;
1040    #[allow(rustdoc::invalid_html_tags)]
1041    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
1042    #[allow(clippy::needless_lifetimes)]
1043    fn get_star_amount<'a>(&'a self) -> Option<&'a StarAmount>;
1044    #[allow(rustdoc::invalid_html_tags)]
1045    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
1046    #[allow(clippy::needless_lifetimes)]
1047    fn set_star_amount<'a>(&'a mut self, star_amount: Option<StarAmount>) -> &'a mut Self;
1048}
1049#[allow(dead_code)]
1050trait TraitContact {
1051    #[allow(rustdoc::invalid_html_tags)]
1052    #[doc = "Contact's phone number"]
1053    #[allow(clippy::needless_lifetimes)]
1054    fn get_phone_number<'a>(&'a self) -> &'a str;
1055    #[allow(rustdoc::invalid_html_tags)]
1056    #[doc = "Contact's phone number"]
1057    #[allow(clippy::needless_lifetimes)]
1058    fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self;
1059    #[allow(rustdoc::invalid_html_tags)]
1060    #[doc = "Contact's first name"]
1061    #[allow(clippy::needless_lifetimes)]
1062    fn get_first_name<'a>(&'a self) -> &'a str;
1063    #[allow(rustdoc::invalid_html_tags)]
1064    #[doc = "Contact's first name"]
1065    #[allow(clippy::needless_lifetimes)]
1066    fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self;
1067    #[allow(rustdoc::invalid_html_tags)]
1068    #[doc = "Optional. Contact's last name"]
1069    #[allow(clippy::needless_lifetimes)]
1070    fn get_last_name<'a>(&'a self) -> Option<&'a str>;
1071    #[allow(rustdoc::invalid_html_tags)]
1072    #[doc = "Optional. Contact's last name"]
1073    #[allow(clippy::needless_lifetimes)]
1074    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self;
1075    #[allow(rustdoc::invalid_html_tags)]
1076    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
1077    #[allow(clippy::needless_lifetimes)]
1078    fn get_user_id<'a>(&'a self) -> Option<i64>;
1079    #[allow(rustdoc::invalid_html_tags)]
1080    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
1081    #[allow(clippy::needless_lifetimes)]
1082    fn set_user_id<'a>(&'a mut self, user_id: Option<i64>) -> &'a mut Self;
1083    #[allow(rustdoc::invalid_html_tags)]
1084    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
1085    #[allow(clippy::needless_lifetimes)]
1086    fn get_vcard<'a>(&'a self) -> Option<&'a str>;
1087    #[allow(rustdoc::invalid_html_tags)]
1088    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
1089    #[allow(clippy::needless_lifetimes)]
1090    fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self;
1091}
1092#[allow(dead_code)]
1093trait TraitChatBoostSourceGiveaway {
1094    #[allow(rustdoc::invalid_html_tags)]
1095    #[doc = "Source of the boost, always \"giveaway\""]
1096    #[allow(clippy::needless_lifetimes)]
1097    fn get_source<'a>(&'a self) -> &'a str;
1098    #[allow(rustdoc::invalid_html_tags)]
1099    #[doc = "Source of the boost, always \"giveaway\""]
1100    #[allow(clippy::needless_lifetimes)]
1101    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
1102    #[allow(rustdoc::invalid_html_tags)]
1103    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
1104    #[allow(clippy::needless_lifetimes)]
1105    fn get_giveaway_message_id<'a>(&'a self) -> i64;
1106    #[allow(rustdoc::invalid_html_tags)]
1107    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
1108    #[allow(clippy::needless_lifetimes)]
1109    fn set_giveaway_message_id<'a>(&'a mut self, giveaway_message_id: i64) -> &'a mut Self;
1110    #[allow(rustdoc::invalid_html_tags)]
1111    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
1112    #[allow(clippy::needless_lifetimes)]
1113    fn get_user<'a>(&'a self) -> Option<&'a User>;
1114    #[allow(rustdoc::invalid_html_tags)]
1115    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
1116    #[allow(clippy::needless_lifetimes)]
1117    fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self;
1118    #[allow(rustdoc::invalid_html_tags)]
1119    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
1120    #[allow(clippy::needless_lifetimes)]
1121    fn get_prize_star_count<'a>(&'a self) -> Option<i64>;
1122    #[allow(rustdoc::invalid_html_tags)]
1123    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
1124    #[allow(clippy::needless_lifetimes)]
1125    fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self;
1126    #[allow(rustdoc::invalid_html_tags)]
1127    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
1128    #[allow(clippy::needless_lifetimes)]
1129    fn get_is_unclaimed<'a>(&'a self) -> Option<bool>;
1130    #[allow(rustdoc::invalid_html_tags)]
1131    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
1132    #[allow(clippy::needless_lifetimes)]
1133    fn set_is_unclaimed<'a>(&'a mut self, is_unclaimed: Option<bool>) -> &'a mut Self;
1134}
1135#[allow(dead_code)]
1136trait TraitBotName {
1137    #[allow(rustdoc::invalid_html_tags)]
1138    #[doc = "The bot's name"]
1139    #[allow(clippy::needless_lifetimes)]
1140    fn get_name<'a>(&'a self) -> &'a str;
1141    #[allow(rustdoc::invalid_html_tags)]
1142    #[doc = "The bot's name"]
1143    #[allow(clippy::needless_lifetimes)]
1144    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
1145}
1146#[allow(dead_code)]
1147trait TraitSuggestedPostDeclined {
1148    #[allow(rustdoc::invalid_html_tags)]
1149    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
1150    #[allow(clippy::needless_lifetimes)]
1151    fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message>;
1152    #[allow(rustdoc::invalid_html_tags)]
1153    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
1154    #[allow(clippy::needless_lifetimes)]
1155    fn set_suggested_post_message<'a>(
1156        &'a mut self,
1157        suggested_post_message: Option<Message>,
1158    ) -> &'a mut Self;
1159    #[allow(rustdoc::invalid_html_tags)]
1160    #[doc = "Optional. Comment with which the post was declined"]
1161    #[allow(clippy::needless_lifetimes)]
1162    fn get_comment<'a>(&'a self) -> Option<&'a str>;
1163    #[allow(rustdoc::invalid_html_tags)]
1164    #[doc = "Optional. Comment with which the post was declined"]
1165    #[allow(clippy::needless_lifetimes)]
1166    fn set_comment<'a>(&'a mut self, comment: Option<String>) -> &'a mut Self;
1167}
1168#[allow(dead_code)]
1169trait TraitBusinessOpeningHoursInterval {
1170    #[allow(rustdoc::invalid_html_tags)]
1171    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
1172    #[allow(clippy::needless_lifetimes)]
1173    fn get_opening_minute<'a>(&'a self) -> i64;
1174    #[allow(rustdoc::invalid_html_tags)]
1175    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
1176    #[allow(clippy::needless_lifetimes)]
1177    fn set_opening_minute<'a>(&'a mut self, opening_minute: i64) -> &'a mut Self;
1178    #[allow(rustdoc::invalid_html_tags)]
1179    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
1180    #[allow(clippy::needless_lifetimes)]
1181    fn get_closing_minute<'a>(&'a self) -> i64;
1182    #[allow(rustdoc::invalid_html_tags)]
1183    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
1184    #[allow(clippy::needless_lifetimes)]
1185    fn set_closing_minute<'a>(&'a mut self, closing_minute: i64) -> &'a mut Self;
1186}
1187#[allow(dead_code)]
1188trait TraitDice {
1189    #[allow(rustdoc::invalid_html_tags)]
1190    #[doc = "Emoji on which the dice throw animation is based"]
1191    #[allow(clippy::needless_lifetimes)]
1192    fn get_emoji<'a>(&'a self) -> &'a str;
1193    #[allow(rustdoc::invalid_html_tags)]
1194    #[doc = "Emoji on which the dice throw animation is based"]
1195    #[allow(clippy::needless_lifetimes)]
1196    fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self;
1197    #[allow(rustdoc::invalid_html_tags)]
1198    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
1199    #[allow(clippy::needless_lifetimes)]
1200    fn get_value<'a>(&'a self) -> i64;
1201    #[allow(rustdoc::invalid_html_tags)]
1202    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
1203    #[allow(clippy::needless_lifetimes)]
1204    fn set_value<'a>(&'a mut self, value: i64) -> &'a mut Self;
1205}
1206#[allow(dead_code)]
1207trait TraitInlineQueryResultArticle {
1208    #[allow(rustdoc::invalid_html_tags)]
1209    #[doc = "Type of the result, must be article"]
1210    #[allow(clippy::needless_lifetimes)]
1211    fn get_tg_type<'a>(&'a self) -> &'a str;
1212    #[allow(rustdoc::invalid_html_tags)]
1213    #[doc = "Type of the result, must be article"]
1214    #[allow(clippy::needless_lifetimes)]
1215    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
1216    #[allow(rustdoc::invalid_html_tags)]
1217    #[doc = "Unique identifier for this result, 1-64 Bytes"]
1218    #[allow(clippy::needless_lifetimes)]
1219    fn get_id<'a>(&'a self) -> &'a str;
1220    #[allow(rustdoc::invalid_html_tags)]
1221    #[doc = "Unique identifier for this result, 1-64 Bytes"]
1222    #[allow(clippy::needless_lifetimes)]
1223    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
1224    #[allow(rustdoc::invalid_html_tags)]
1225    #[doc = "Title of the result"]
1226    #[allow(clippy::needless_lifetimes)]
1227    fn get_title<'a>(&'a self) -> &'a str;
1228    #[allow(rustdoc::invalid_html_tags)]
1229    #[doc = "Title of the result"]
1230    #[allow(clippy::needless_lifetimes)]
1231    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
1232    #[allow(rustdoc::invalid_html_tags)]
1233    #[doc = "Content of the message to be sent"]
1234    #[allow(clippy::needless_lifetimes)]
1235    fn get_input_message_content<'a>(&'a self) -> &'a InputMessageContent;
1236    #[allow(rustdoc::invalid_html_tags)]
1237    #[doc = "Content of the message to be sent"]
1238    #[allow(clippy::needless_lifetimes)]
1239    fn set_input_message_content<'a>(
1240        &'a mut self,
1241        input_message_content: InputMessageContent,
1242    ) -> &'a mut Self;
1243    #[allow(rustdoc::invalid_html_tags)]
1244    #[doc = "Optional. Inline keyboard attached to the message"]
1245    #[allow(clippy::needless_lifetimes)]
1246    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
1247    #[allow(rustdoc::invalid_html_tags)]
1248    #[doc = "Optional. Inline keyboard attached to the message"]
1249    #[allow(clippy::needless_lifetimes)]
1250    fn set_reply_markup<'a>(
1251        &'a mut self,
1252        reply_markup: Option<InlineKeyboardMarkup>,
1253    ) -> &'a mut Self;
1254    #[allow(rustdoc::invalid_html_tags)]
1255    #[doc = "Optional. URL of the result"]
1256    #[allow(clippy::needless_lifetimes)]
1257    fn get_url<'a>(&'a self) -> Option<&'a str>;
1258    #[allow(rustdoc::invalid_html_tags)]
1259    #[doc = "Optional. URL of the result"]
1260    #[allow(clippy::needless_lifetimes)]
1261    fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self;
1262    #[allow(rustdoc::invalid_html_tags)]
1263    #[doc = "Optional. Short description of the result"]
1264    #[allow(clippy::needless_lifetimes)]
1265    fn get_description<'a>(&'a self) -> Option<&'a str>;
1266    #[allow(rustdoc::invalid_html_tags)]
1267    #[doc = "Optional. Short description of the result"]
1268    #[allow(clippy::needless_lifetimes)]
1269    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
1270    #[allow(rustdoc::invalid_html_tags)]
1271    #[doc = "Optional. Url of the thumbnail for the result"]
1272    #[allow(clippy::needless_lifetimes)]
1273    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str>;
1274    #[allow(rustdoc::invalid_html_tags)]
1275    #[doc = "Optional. Url of the thumbnail for the result"]
1276    #[allow(clippy::needless_lifetimes)]
1277    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self;
1278    #[allow(rustdoc::invalid_html_tags)]
1279    #[doc = "Optional. Thumbnail width"]
1280    #[allow(clippy::needless_lifetimes)]
1281    fn get_thumbnail_width<'a>(&'a self) -> Option<i64>;
1282    #[allow(rustdoc::invalid_html_tags)]
1283    #[doc = "Optional. Thumbnail width"]
1284    #[allow(clippy::needless_lifetimes)]
1285    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self;
1286    #[allow(rustdoc::invalid_html_tags)]
1287    #[doc = "Optional. Thumbnail height"]
1288    #[allow(clippy::needless_lifetimes)]
1289    fn get_thumbnail_height<'a>(&'a self) -> Option<i64>;
1290    #[allow(rustdoc::invalid_html_tags)]
1291    #[doc = "Optional. Thumbnail height"]
1292    #[allow(clippy::needless_lifetimes)]
1293    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self;
1294}
1295#[allow(dead_code)]
1296trait TraitInputLocationMessageContent {
1297    #[allow(rustdoc::invalid_html_tags)]
1298    #[doc = "Latitude of the location in degrees"]
1299    #[allow(clippy::needless_lifetimes)]
1300    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
1301    #[allow(rustdoc::invalid_html_tags)]
1302    #[doc = "Latitude of the location in degrees"]
1303    #[allow(clippy::needless_lifetimes)]
1304    fn set_latitude<'a>(&'a mut self, latitude: ::ordered_float::OrderedFloat<f64>)
1305        -> &'a mut Self;
1306    #[allow(rustdoc::invalid_html_tags)]
1307    #[doc = "Longitude of the location in degrees"]
1308    #[allow(clippy::needless_lifetimes)]
1309    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
1310    #[allow(rustdoc::invalid_html_tags)]
1311    #[doc = "Longitude of the location in degrees"]
1312    #[allow(clippy::needless_lifetimes)]
1313    fn set_longitude<'a>(
1314        &'a mut self,
1315        longitude: ::ordered_float::OrderedFloat<f64>,
1316    ) -> &'a mut Self;
1317    #[allow(rustdoc::invalid_html_tags)]
1318    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
1319    #[allow(clippy::needless_lifetimes)]
1320    fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>>;
1321    #[allow(rustdoc::invalid_html_tags)]
1322    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
1323    #[allow(clippy::needless_lifetimes)]
1324    fn set_horizontal_accuracy<'a>(
1325        &'a mut self,
1326        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
1327    ) -> &'a mut Self;
1328    #[allow(rustdoc::invalid_html_tags)]
1329    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
1330    #[allow(clippy::needless_lifetimes)]
1331    fn get_live_period<'a>(&'a self) -> Option<i64>;
1332    #[allow(rustdoc::invalid_html_tags)]
1333    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
1334    #[allow(clippy::needless_lifetimes)]
1335    fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self;
1336    #[allow(rustdoc::invalid_html_tags)]
1337    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
1338    #[allow(clippy::needless_lifetimes)]
1339    fn get_heading<'a>(&'a self) -> Option<i64>;
1340    #[allow(rustdoc::invalid_html_tags)]
1341    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
1342    #[allow(clippy::needless_lifetimes)]
1343    fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self;
1344    #[allow(rustdoc::invalid_html_tags)]
1345    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
1346    #[allow(clippy::needless_lifetimes)]
1347    fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64>;
1348    #[allow(rustdoc::invalid_html_tags)]
1349    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
1350    #[allow(clippy::needless_lifetimes)]
1351    fn set_proximity_alert_radius<'a>(
1352        &'a mut self,
1353        proximity_alert_radius: Option<i64>,
1354    ) -> &'a mut Self;
1355}
1356#[allow(dead_code)]
1357trait TraitInlineQueryResultCachedSticker {
1358    #[allow(rustdoc::invalid_html_tags)]
1359    #[doc = "Type of the result, must be sticker"]
1360    #[allow(clippy::needless_lifetimes)]
1361    fn get_tg_type<'a>(&'a self) -> &'a str;
1362    #[allow(rustdoc::invalid_html_tags)]
1363    #[doc = "Type of the result, must be sticker"]
1364    #[allow(clippy::needless_lifetimes)]
1365    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
1366    #[allow(rustdoc::invalid_html_tags)]
1367    #[doc = "Unique identifier for this result, 1-64 bytes"]
1368    #[allow(clippy::needless_lifetimes)]
1369    fn get_id<'a>(&'a self) -> &'a str;
1370    #[allow(rustdoc::invalid_html_tags)]
1371    #[doc = "Unique identifier for this result, 1-64 bytes"]
1372    #[allow(clippy::needless_lifetimes)]
1373    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
1374    #[allow(rustdoc::invalid_html_tags)]
1375    #[doc = "A valid file identifier of the sticker"]
1376    #[allow(clippy::needless_lifetimes)]
1377    fn get_sticker_file_id<'a>(&'a self) -> &'a str;
1378    #[allow(rustdoc::invalid_html_tags)]
1379    #[doc = "A valid file identifier of the sticker"]
1380    #[allow(clippy::needless_lifetimes)]
1381    fn set_sticker_file_id<'a>(&'a mut self, sticker_file_id: String) -> &'a mut Self;
1382    #[allow(rustdoc::invalid_html_tags)]
1383    #[doc = "Optional. Inline keyboard attached to the message"]
1384    #[allow(clippy::needless_lifetimes)]
1385    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
1386    #[allow(rustdoc::invalid_html_tags)]
1387    #[doc = "Optional. Inline keyboard attached to the message"]
1388    #[allow(clippy::needless_lifetimes)]
1389    fn set_reply_markup<'a>(
1390        &'a mut self,
1391        reply_markup: Option<InlineKeyboardMarkup>,
1392    ) -> &'a mut Self;
1393    #[allow(rustdoc::invalid_html_tags)]
1394    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
1395    #[allow(clippy::needless_lifetimes)]
1396    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
1397    #[allow(rustdoc::invalid_html_tags)]
1398    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
1399    #[allow(clippy::needless_lifetimes)]
1400    fn set_input_message_content<'a>(
1401        &'a mut self,
1402        input_message_content: Option<InputMessageContent>,
1403    ) -> &'a mut Self;
1404}
1405#[allow(dead_code)]
1406trait TraitInputPaidMediaVideo {
1407    #[allow(rustdoc::invalid_html_tags)]
1408    #[doc = "Type of the media, must be video"]
1409    #[allow(clippy::needless_lifetimes)]
1410    fn get_tg_type<'a>(&'a self) -> &'a str;
1411    #[allow(rustdoc::invalid_html_tags)]
1412    #[doc = "Type of the media, must be video"]
1413    #[allow(clippy::needless_lifetimes)]
1414    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
1415    #[allow(rustdoc::invalid_html_tags)]
1416    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
1417    #[allow(clippy::needless_lifetimes)]
1418    fn get_media<'a>(&'a self) -> &'a String;
1419    #[allow(rustdoc::invalid_html_tags)]
1420    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
1421    #[allow(clippy::needless_lifetimes)]
1422    fn set_media<'a>(&'a mut self, media: String) -> &'a mut Self;
1423    #[allow(rustdoc::invalid_html_tags)]
1424    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
1425    #[allow(clippy::needless_lifetimes)]
1426    fn get_thumbnail<'a>(&'a self) -> Option<&'a str>;
1427    #[allow(rustdoc::invalid_html_tags)]
1428    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
1429    #[allow(clippy::needless_lifetimes)]
1430    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self;
1431    #[allow(rustdoc::invalid_html_tags)]
1432    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
1433    #[allow(clippy::needless_lifetimes)]
1434    fn get_cover<'a>(&'a self) -> Option<&'a str>;
1435    #[allow(rustdoc::invalid_html_tags)]
1436    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
1437    #[allow(clippy::needless_lifetimes)]
1438    fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self;
1439    #[allow(rustdoc::invalid_html_tags)]
1440    #[doc = "Optional. Start timestamp for the video in the message"]
1441    #[allow(clippy::needless_lifetimes)]
1442    fn get_start_timestamp<'a>(&'a self) -> Option<i64>;
1443    #[allow(rustdoc::invalid_html_tags)]
1444    #[doc = "Optional. Start timestamp for the video in the message"]
1445    #[allow(clippy::needless_lifetimes)]
1446    fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self;
1447    #[allow(rustdoc::invalid_html_tags)]
1448    #[doc = "Optional. Video width"]
1449    #[allow(clippy::needless_lifetimes)]
1450    fn get_width<'a>(&'a self) -> Option<i64>;
1451    #[allow(rustdoc::invalid_html_tags)]
1452    #[doc = "Optional. Video width"]
1453    #[allow(clippy::needless_lifetimes)]
1454    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self;
1455    #[allow(rustdoc::invalid_html_tags)]
1456    #[doc = "Optional. Video height"]
1457    #[allow(clippy::needless_lifetimes)]
1458    fn get_height<'a>(&'a self) -> Option<i64>;
1459    #[allow(rustdoc::invalid_html_tags)]
1460    #[doc = "Optional. Video height"]
1461    #[allow(clippy::needless_lifetimes)]
1462    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self;
1463    #[allow(rustdoc::invalid_html_tags)]
1464    #[doc = "Optional. Video duration in seconds"]
1465    #[allow(clippy::needless_lifetimes)]
1466    fn get_duration<'a>(&'a self) -> Option<i64>;
1467    #[allow(rustdoc::invalid_html_tags)]
1468    #[doc = "Optional. Video duration in seconds"]
1469    #[allow(clippy::needless_lifetimes)]
1470    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self;
1471    #[allow(rustdoc::invalid_html_tags)]
1472    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
1473    #[allow(clippy::needless_lifetimes)]
1474    fn get_supports_streaming<'a>(&'a self) -> Option<bool>;
1475    #[allow(rustdoc::invalid_html_tags)]
1476    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
1477    #[allow(clippy::needless_lifetimes)]
1478    fn set_supports_streaming<'a>(&'a mut self, supports_streaming: Option<bool>) -> &'a mut Self;
1479}
1480#[allow(dead_code)]
1481trait TraitGift {
1482    #[allow(rustdoc::invalid_html_tags)]
1483    #[doc = "Unique identifier of the gift"]
1484    #[allow(clippy::needless_lifetimes)]
1485    fn get_id<'a>(&'a self) -> &'a str;
1486    #[allow(rustdoc::invalid_html_tags)]
1487    #[doc = "Unique identifier of the gift"]
1488    #[allow(clippy::needless_lifetimes)]
1489    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
1490    #[allow(rustdoc::invalid_html_tags)]
1491    #[doc = "The sticker that represents the gift"]
1492    #[allow(clippy::needless_lifetimes)]
1493    fn get_sticker<'a>(&'a self) -> &'a Sticker;
1494    #[allow(rustdoc::invalid_html_tags)]
1495    #[doc = "The sticker that represents the gift"]
1496    #[allow(clippy::needless_lifetimes)]
1497    fn set_sticker<'a>(&'a mut self, sticker: Sticker) -> &'a mut Self;
1498    #[allow(rustdoc::invalid_html_tags)]
1499    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
1500    #[allow(clippy::needless_lifetimes)]
1501    fn get_star_count<'a>(&'a self) -> i64;
1502    #[allow(rustdoc::invalid_html_tags)]
1503    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
1504    #[allow(clippy::needless_lifetimes)]
1505    fn set_star_count<'a>(&'a mut self, star_count: i64) -> &'a mut Self;
1506    #[allow(rustdoc::invalid_html_tags)]
1507    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
1508    #[allow(clippy::needless_lifetimes)]
1509    fn get_upgrade_star_count<'a>(&'a self) -> Option<i64>;
1510    #[allow(rustdoc::invalid_html_tags)]
1511    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
1512    #[allow(clippy::needless_lifetimes)]
1513    fn set_upgrade_star_count<'a>(&'a mut self, upgrade_star_count: Option<i64>) -> &'a mut Self;
1514    #[allow(rustdoc::invalid_html_tags)]
1515    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
1516    #[allow(clippy::needless_lifetimes)]
1517    fn get_total_count<'a>(&'a self) -> Option<i64>;
1518    #[allow(rustdoc::invalid_html_tags)]
1519    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
1520    #[allow(clippy::needless_lifetimes)]
1521    fn set_total_count<'a>(&'a mut self, total_count: Option<i64>) -> &'a mut Self;
1522    #[allow(rustdoc::invalid_html_tags)]
1523    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
1524    #[allow(clippy::needless_lifetimes)]
1525    fn get_remaining_count<'a>(&'a self) -> Option<i64>;
1526    #[allow(rustdoc::invalid_html_tags)]
1527    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
1528    #[allow(clippy::needless_lifetimes)]
1529    fn set_remaining_count<'a>(&'a mut self, remaining_count: Option<i64>) -> &'a mut Self;
1530    #[allow(rustdoc::invalid_html_tags)]
1531    #[doc = "Optional. Information about the chat that published the gift"]
1532    #[allow(clippy::needless_lifetimes)]
1533    fn get_publisher_chat<'a>(&'a self) -> Option<&'a Chat>;
1534    #[allow(rustdoc::invalid_html_tags)]
1535    #[doc = "Optional. Information about the chat that published the gift"]
1536    #[allow(clippy::needless_lifetimes)]
1537    fn set_publisher_chat<'a>(&'a mut self, publisher_chat: Option<Chat>) -> &'a mut Self;
1538}
1539#[allow(dead_code)]
1540trait TraitMessageOriginUser {
1541    #[allow(rustdoc::invalid_html_tags)]
1542    #[doc = "Type of the message origin, always \"user\""]
1543    #[allow(clippy::needless_lifetimes)]
1544    fn get_tg_type<'a>(&'a self) -> &'a str;
1545    #[allow(rustdoc::invalid_html_tags)]
1546    #[doc = "Type of the message origin, always \"user\""]
1547    #[allow(clippy::needless_lifetimes)]
1548    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
1549    #[allow(rustdoc::invalid_html_tags)]
1550    #[doc = "Date the message was sent originally in Unix time"]
1551    #[allow(clippy::needless_lifetimes)]
1552    fn get_date<'a>(&'a self) -> i64;
1553    #[allow(rustdoc::invalid_html_tags)]
1554    #[doc = "Date the message was sent originally in Unix time"]
1555    #[allow(clippy::needless_lifetimes)]
1556    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
1557    #[allow(rustdoc::invalid_html_tags)]
1558    #[doc = "User that sent the message originally"]
1559    #[allow(clippy::needless_lifetimes)]
1560    fn get_sender_user<'a>(&'a self) -> &'a User;
1561    #[allow(rustdoc::invalid_html_tags)]
1562    #[doc = "User that sent the message originally"]
1563    #[allow(clippy::needless_lifetimes)]
1564    fn set_sender_user<'a>(&'a mut self, sender_user: User) -> &'a mut Self;
1565}
1566#[allow(dead_code)]
1567trait TraitKeyboardButton {
1568    #[allow(rustdoc::invalid_html_tags)]
1569    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
1570    #[allow(clippy::needless_lifetimes)]
1571    fn get_text<'a>(&'a self) -> &'a str;
1572    #[allow(rustdoc::invalid_html_tags)]
1573    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
1574    #[allow(clippy::needless_lifetimes)]
1575    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
1576    #[allow(rustdoc::invalid_html_tags)]
1577    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
1578    #[allow(clippy::needless_lifetimes)]
1579    fn get_request_users<'a>(&'a self) -> Option<&'a KeyboardButtonRequestUsers>;
1580    #[allow(rustdoc::invalid_html_tags)]
1581    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
1582    #[allow(clippy::needless_lifetimes)]
1583    fn set_request_users<'a>(
1584        &'a mut self,
1585        request_users: Option<KeyboardButtonRequestUsers>,
1586    ) -> &'a mut Self;
1587    #[allow(rustdoc::invalid_html_tags)]
1588    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
1589    #[allow(clippy::needless_lifetimes)]
1590    fn get_request_chat<'a>(&'a self) -> Option<&'a KeyboardButtonRequestChat>;
1591    #[allow(rustdoc::invalid_html_tags)]
1592    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
1593    #[allow(clippy::needless_lifetimes)]
1594    fn set_request_chat<'a>(
1595        &'a mut self,
1596        request_chat: Option<KeyboardButtonRequestChat>,
1597    ) -> &'a mut Self;
1598    #[allow(rustdoc::invalid_html_tags)]
1599    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
1600    #[allow(clippy::needless_lifetimes)]
1601    fn get_request_contact<'a>(&'a self) -> Option<bool>;
1602    #[allow(rustdoc::invalid_html_tags)]
1603    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
1604    #[allow(clippy::needless_lifetimes)]
1605    fn set_request_contact<'a>(&'a mut self, request_contact: Option<bool>) -> &'a mut Self;
1606    #[allow(rustdoc::invalid_html_tags)]
1607    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
1608    #[allow(clippy::needless_lifetimes)]
1609    fn get_request_location<'a>(&'a self) -> Option<bool>;
1610    #[allow(rustdoc::invalid_html_tags)]
1611    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
1612    #[allow(clippy::needless_lifetimes)]
1613    fn set_request_location<'a>(&'a mut self, request_location: Option<bool>) -> &'a mut Self;
1614    #[allow(rustdoc::invalid_html_tags)]
1615    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
1616    #[allow(clippy::needless_lifetimes)]
1617    fn get_request_poll<'a>(&'a self) -> Option<&'a KeyboardButtonPollType>;
1618    #[allow(rustdoc::invalid_html_tags)]
1619    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
1620    #[allow(clippy::needless_lifetimes)]
1621    fn set_request_poll<'a>(
1622        &'a mut self,
1623        request_poll: Option<KeyboardButtonPollType>,
1624    ) -> &'a mut Self;
1625    #[allow(rustdoc::invalid_html_tags)]
1626    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
1627    #[allow(clippy::needless_lifetimes)]
1628    fn get_web_app<'a>(&'a self) -> Option<&'a WebAppInfo>;
1629    #[allow(rustdoc::invalid_html_tags)]
1630    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
1631    #[allow(clippy::needless_lifetimes)]
1632    fn set_web_app<'a>(&'a mut self, web_app: Option<WebAppInfo>) -> &'a mut Self;
1633}
1634#[allow(dead_code)]
1635trait TraitInlineQueryResultCachedMpeg4Gif {
1636    #[allow(rustdoc::invalid_html_tags)]
1637    #[doc = "Type of the result, must be mpeg4_gif"]
1638    #[allow(clippy::needless_lifetimes)]
1639    fn get_tg_type<'a>(&'a self) -> &'a str;
1640    #[allow(rustdoc::invalid_html_tags)]
1641    #[doc = "Type of the result, must be mpeg4_gif"]
1642    #[allow(clippy::needless_lifetimes)]
1643    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
1644    #[allow(rustdoc::invalid_html_tags)]
1645    #[doc = "Unique identifier for this result, 1-64 bytes"]
1646    #[allow(clippy::needless_lifetimes)]
1647    fn get_id<'a>(&'a self) -> &'a str;
1648    #[allow(rustdoc::invalid_html_tags)]
1649    #[doc = "Unique identifier for this result, 1-64 bytes"]
1650    #[allow(clippy::needless_lifetimes)]
1651    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
1652    #[allow(rustdoc::invalid_html_tags)]
1653    #[doc = "A valid file identifier for the MPEG4 file"]
1654    #[allow(clippy::needless_lifetimes)]
1655    fn get_mpeg_4_file_id<'a>(&'a self) -> &'a str;
1656    #[allow(rustdoc::invalid_html_tags)]
1657    #[doc = "A valid file identifier for the MPEG4 file"]
1658    #[allow(clippy::needless_lifetimes)]
1659    fn set_mpeg_4_file_id<'a>(&'a mut self, mpeg_4_file_id: String) -> &'a mut Self;
1660    #[allow(rustdoc::invalid_html_tags)]
1661    #[doc = "Optional. Title for the result"]
1662    #[allow(clippy::needless_lifetimes)]
1663    fn get_title<'a>(&'a self) -> Option<&'a str>;
1664    #[allow(rustdoc::invalid_html_tags)]
1665    #[doc = "Optional. Title for the result"]
1666    #[allow(clippy::needless_lifetimes)]
1667    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
1668    #[allow(rustdoc::invalid_html_tags)]
1669    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
1670    #[allow(clippy::needless_lifetimes)]
1671    fn get_caption<'a>(&'a self) -> Option<&'a str>;
1672    #[allow(rustdoc::invalid_html_tags)]
1673    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
1674    #[allow(clippy::needless_lifetimes)]
1675    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
1676    #[allow(rustdoc::invalid_html_tags)]
1677    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
1678    #[allow(clippy::needless_lifetimes)]
1679    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
1680    #[allow(rustdoc::invalid_html_tags)]
1681    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
1682    #[allow(clippy::needless_lifetimes)]
1683    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
1684    #[allow(rustdoc::invalid_html_tags)]
1685    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
1686    #[allow(clippy::needless_lifetimes)]
1687    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
1688    #[allow(rustdoc::invalid_html_tags)]
1689    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
1690    #[allow(clippy::needless_lifetimes)]
1691    fn set_caption_entities<'a>(
1692        &'a mut self,
1693        caption_entities: Option<Vec<MessageEntity>>,
1694    ) -> &'a mut Self;
1695    #[allow(rustdoc::invalid_html_tags)]
1696    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
1697    #[allow(clippy::needless_lifetimes)]
1698    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
1699    #[allow(rustdoc::invalid_html_tags)]
1700    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
1701    #[allow(clippy::needless_lifetimes)]
1702    fn set_show_caption_above_media<'a>(
1703        &'a mut self,
1704        show_caption_above_media: Option<bool>,
1705    ) -> &'a mut Self;
1706    #[allow(rustdoc::invalid_html_tags)]
1707    #[doc = "Optional. Inline keyboard attached to the message"]
1708    #[allow(clippy::needless_lifetimes)]
1709    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
1710    #[allow(rustdoc::invalid_html_tags)]
1711    #[doc = "Optional. Inline keyboard attached to the message"]
1712    #[allow(clippy::needless_lifetimes)]
1713    fn set_reply_markup<'a>(
1714        &'a mut self,
1715        reply_markup: Option<InlineKeyboardMarkup>,
1716    ) -> &'a mut Self;
1717    #[allow(rustdoc::invalid_html_tags)]
1718    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
1719    #[allow(clippy::needless_lifetimes)]
1720    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
1721    #[allow(rustdoc::invalid_html_tags)]
1722    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
1723    #[allow(clippy::needless_lifetimes)]
1724    fn set_input_message_content<'a>(
1725        &'a mut self,
1726        input_message_content: Option<InputMessageContent>,
1727    ) -> &'a mut Self;
1728}
1729#[allow(dead_code)]
1730trait TraitInputInvoiceMessageContent {
1731    #[allow(rustdoc::invalid_html_tags)]
1732    #[doc = "Product name, 1-32 characters"]
1733    #[allow(clippy::needless_lifetimes)]
1734    fn get_title<'a>(&'a self) -> &'a str;
1735    #[allow(rustdoc::invalid_html_tags)]
1736    #[doc = "Product name, 1-32 characters"]
1737    #[allow(clippy::needless_lifetimes)]
1738    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
1739    #[allow(rustdoc::invalid_html_tags)]
1740    #[doc = "Product description, 1-255 characters"]
1741    #[allow(clippy::needless_lifetimes)]
1742    fn get_description<'a>(&'a self) -> &'a str;
1743    #[allow(rustdoc::invalid_html_tags)]
1744    #[doc = "Product description, 1-255 characters"]
1745    #[allow(clippy::needless_lifetimes)]
1746    fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self;
1747    #[allow(rustdoc::invalid_html_tags)]
1748    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
1749    #[allow(clippy::needless_lifetimes)]
1750    fn get_payload<'a>(&'a self) -> &'a str;
1751    #[allow(rustdoc::invalid_html_tags)]
1752    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
1753    #[allow(clippy::needless_lifetimes)]
1754    fn set_payload<'a>(&'a mut self, payload: String) -> &'a mut Self;
1755    #[allow(rustdoc::invalid_html_tags)]
1756    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
1757    #[allow(clippy::needless_lifetimes)]
1758    fn get_provider_token<'a>(&'a self) -> Option<&'a str>;
1759    #[allow(rustdoc::invalid_html_tags)]
1760    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
1761    #[allow(clippy::needless_lifetimes)]
1762    fn set_provider_token<'a>(&'a mut self, provider_token: Option<String>) -> &'a mut Self;
1763    #[allow(rustdoc::invalid_html_tags)]
1764    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
1765    #[allow(clippy::needless_lifetimes)]
1766    fn get_currency<'a>(&'a self) -> &'a str;
1767    #[allow(rustdoc::invalid_html_tags)]
1768    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
1769    #[allow(clippy::needless_lifetimes)]
1770    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self;
1771    #[allow(rustdoc::invalid_html_tags)]
1772    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
1773    #[allow(clippy::needless_lifetimes)]
1774    fn get_prices<'a>(&'a self) -> &'a Vec<LabeledPrice>;
1775    #[allow(rustdoc::invalid_html_tags)]
1776    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
1777    #[allow(clippy::needless_lifetimes)]
1778    fn set_prices<'a>(&'a mut self, prices: Vec<LabeledPrice>) -> &'a mut Self;
1779    #[allow(rustdoc::invalid_html_tags)]
1780    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
1781    #[allow(clippy::needless_lifetimes)]
1782    fn get_max_tip_amount<'a>(&'a self) -> Option<i64>;
1783    #[allow(rustdoc::invalid_html_tags)]
1784    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
1785    #[allow(clippy::needless_lifetimes)]
1786    fn set_max_tip_amount<'a>(&'a mut self, max_tip_amount: Option<i64>) -> &'a mut Self;
1787    #[allow(rustdoc::invalid_html_tags)]
1788    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
1789    #[allow(clippy::needless_lifetimes)]
1790    fn get_suggested_tip_amounts<'a>(&'a self) -> Option<&'a Vec<i64>>;
1791    #[allow(rustdoc::invalid_html_tags)]
1792    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
1793    #[allow(clippy::needless_lifetimes)]
1794    fn set_suggested_tip_amounts<'a>(
1795        &'a mut self,
1796        suggested_tip_amounts: Option<Vec<i64>>,
1797    ) -> &'a mut Self;
1798    #[allow(rustdoc::invalid_html_tags)]
1799    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
1800    #[allow(clippy::needless_lifetimes)]
1801    fn get_provider_data<'a>(&'a self) -> Option<&'a str>;
1802    #[allow(rustdoc::invalid_html_tags)]
1803    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
1804    #[allow(clippy::needless_lifetimes)]
1805    fn set_provider_data<'a>(&'a mut self, provider_data: Option<String>) -> &'a mut Self;
1806    #[allow(rustdoc::invalid_html_tags)]
1807    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
1808    #[allow(clippy::needless_lifetimes)]
1809    fn get_photo_url<'a>(&'a self) -> Option<&'a str>;
1810    #[allow(rustdoc::invalid_html_tags)]
1811    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
1812    #[allow(clippy::needless_lifetimes)]
1813    fn set_photo_url<'a>(&'a mut self, photo_url: Option<String>) -> &'a mut Self;
1814    #[allow(rustdoc::invalid_html_tags)]
1815    #[doc = "Optional. Photo size in bytes"]
1816    #[allow(clippy::needless_lifetimes)]
1817    fn get_photo_size<'a>(&'a self) -> Option<i64>;
1818    #[allow(rustdoc::invalid_html_tags)]
1819    #[doc = "Optional. Photo size in bytes"]
1820    #[allow(clippy::needless_lifetimes)]
1821    fn set_photo_size<'a>(&'a mut self, photo_size: Option<i64>) -> &'a mut Self;
1822    #[allow(rustdoc::invalid_html_tags)]
1823    #[doc = "Optional. Photo width"]
1824    #[allow(clippy::needless_lifetimes)]
1825    fn get_photo_width<'a>(&'a self) -> Option<i64>;
1826    #[allow(rustdoc::invalid_html_tags)]
1827    #[doc = "Optional. Photo width"]
1828    #[allow(clippy::needless_lifetimes)]
1829    fn set_photo_width<'a>(&'a mut self, photo_width: Option<i64>) -> &'a mut Self;
1830    #[allow(rustdoc::invalid_html_tags)]
1831    #[doc = "Optional. Photo height"]
1832    #[allow(clippy::needless_lifetimes)]
1833    fn get_photo_height<'a>(&'a self) -> Option<i64>;
1834    #[allow(rustdoc::invalid_html_tags)]
1835    #[doc = "Optional. Photo height"]
1836    #[allow(clippy::needless_lifetimes)]
1837    fn set_photo_height<'a>(&'a mut self, photo_height: Option<i64>) -> &'a mut Self;
1838    #[allow(rustdoc::invalid_html_tags)]
1839    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
1840    #[allow(clippy::needless_lifetimes)]
1841    fn get_need_name<'a>(&'a self) -> Option<bool>;
1842    #[allow(rustdoc::invalid_html_tags)]
1843    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
1844    #[allow(clippy::needless_lifetimes)]
1845    fn set_need_name<'a>(&'a mut self, need_name: Option<bool>) -> &'a mut Self;
1846    #[allow(rustdoc::invalid_html_tags)]
1847    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
1848    #[allow(clippy::needless_lifetimes)]
1849    fn get_need_phone_number<'a>(&'a self) -> Option<bool>;
1850    #[allow(rustdoc::invalid_html_tags)]
1851    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
1852    #[allow(clippy::needless_lifetimes)]
1853    fn set_need_phone_number<'a>(&'a mut self, need_phone_number: Option<bool>) -> &'a mut Self;
1854    #[allow(rustdoc::invalid_html_tags)]
1855    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
1856    #[allow(clippy::needless_lifetimes)]
1857    fn get_need_email<'a>(&'a self) -> Option<bool>;
1858    #[allow(rustdoc::invalid_html_tags)]
1859    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
1860    #[allow(clippy::needless_lifetimes)]
1861    fn set_need_email<'a>(&'a mut self, need_email: Option<bool>) -> &'a mut Self;
1862    #[allow(rustdoc::invalid_html_tags)]
1863    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
1864    #[allow(clippy::needless_lifetimes)]
1865    fn get_need_shipping_address<'a>(&'a self) -> Option<bool>;
1866    #[allow(rustdoc::invalid_html_tags)]
1867    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
1868    #[allow(clippy::needless_lifetimes)]
1869    fn set_need_shipping_address<'a>(
1870        &'a mut self,
1871        need_shipping_address: Option<bool>,
1872    ) -> &'a mut Self;
1873    #[allow(rustdoc::invalid_html_tags)]
1874    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
1875    #[allow(clippy::needless_lifetimes)]
1876    fn get_send_phone_number_to_provider<'a>(&'a self) -> Option<bool>;
1877    #[allow(rustdoc::invalid_html_tags)]
1878    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
1879    #[allow(clippy::needless_lifetimes)]
1880    fn set_send_phone_number_to_provider<'a>(
1881        &'a mut self,
1882        send_phone_number_to_provider: Option<bool>,
1883    ) -> &'a mut Self;
1884    #[allow(rustdoc::invalid_html_tags)]
1885    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
1886    #[allow(clippy::needless_lifetimes)]
1887    fn get_send_email_to_provider<'a>(&'a self) -> Option<bool>;
1888    #[allow(rustdoc::invalid_html_tags)]
1889    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
1890    #[allow(clippy::needless_lifetimes)]
1891    fn set_send_email_to_provider<'a>(
1892        &'a mut self,
1893        send_email_to_provider: Option<bool>,
1894    ) -> &'a mut Self;
1895    #[allow(rustdoc::invalid_html_tags)]
1896    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
1897    #[allow(clippy::needless_lifetimes)]
1898    fn get_is_flexible<'a>(&'a self) -> Option<bool>;
1899    #[allow(rustdoc::invalid_html_tags)]
1900    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
1901    #[allow(clippy::needless_lifetimes)]
1902    fn set_is_flexible<'a>(&'a mut self, is_flexible: Option<bool>) -> &'a mut Self;
1903}
1904#[allow(dead_code)]
1905trait TraitBusinessBotRights {
1906    #[allow(rustdoc::invalid_html_tags)]
1907    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
1908    #[allow(clippy::needless_lifetimes)]
1909    fn get_can_reply<'a>(&'a self) -> Option<bool>;
1910    #[allow(rustdoc::invalid_html_tags)]
1911    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
1912    #[allow(clippy::needless_lifetimes)]
1913    fn set_can_reply<'a>(&'a mut self, can_reply: Option<bool>) -> &'a mut Self;
1914    #[allow(rustdoc::invalid_html_tags)]
1915    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
1916    #[allow(clippy::needless_lifetimes)]
1917    fn get_can_read_messages<'a>(&'a self) -> Option<bool>;
1918    #[allow(rustdoc::invalid_html_tags)]
1919    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
1920    #[allow(clippy::needless_lifetimes)]
1921    fn set_can_read_messages<'a>(&'a mut self, can_read_messages: Option<bool>) -> &'a mut Self;
1922    #[allow(rustdoc::invalid_html_tags)]
1923    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
1924    #[allow(clippy::needless_lifetimes)]
1925    fn get_can_delete_sent_messages<'a>(&'a self) -> Option<bool>;
1926    #[allow(rustdoc::invalid_html_tags)]
1927    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
1928    #[allow(clippy::needless_lifetimes)]
1929    fn set_can_delete_sent_messages<'a>(
1930        &'a mut self,
1931        can_delete_sent_messages: Option<bool>,
1932    ) -> &'a mut Self;
1933    #[allow(rustdoc::invalid_html_tags)]
1934    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
1935    #[allow(clippy::needless_lifetimes)]
1936    fn get_can_delete_all_messages<'a>(&'a self) -> Option<bool>;
1937    #[allow(rustdoc::invalid_html_tags)]
1938    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
1939    #[allow(clippy::needless_lifetimes)]
1940    fn set_can_delete_all_messages<'a>(
1941        &'a mut self,
1942        can_delete_all_messages: Option<bool>,
1943    ) -> &'a mut Self;
1944    #[allow(rustdoc::invalid_html_tags)]
1945    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
1946    #[allow(clippy::needless_lifetimes)]
1947    fn get_can_edit_name<'a>(&'a self) -> Option<bool>;
1948    #[allow(rustdoc::invalid_html_tags)]
1949    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
1950    #[allow(clippy::needless_lifetimes)]
1951    fn set_can_edit_name<'a>(&'a mut self, can_edit_name: Option<bool>) -> &'a mut Self;
1952    #[allow(rustdoc::invalid_html_tags)]
1953    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
1954    #[allow(clippy::needless_lifetimes)]
1955    fn get_can_edit_bio<'a>(&'a self) -> Option<bool>;
1956    #[allow(rustdoc::invalid_html_tags)]
1957    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
1958    #[allow(clippy::needless_lifetimes)]
1959    fn set_can_edit_bio<'a>(&'a mut self, can_edit_bio: Option<bool>) -> &'a mut Self;
1960    #[allow(rustdoc::invalid_html_tags)]
1961    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
1962    #[allow(clippy::needless_lifetimes)]
1963    fn get_can_edit_profile_photo<'a>(&'a self) -> Option<bool>;
1964    #[allow(rustdoc::invalid_html_tags)]
1965    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
1966    #[allow(clippy::needless_lifetimes)]
1967    fn set_can_edit_profile_photo<'a>(
1968        &'a mut self,
1969        can_edit_profile_photo: Option<bool>,
1970    ) -> &'a mut Self;
1971    #[allow(rustdoc::invalid_html_tags)]
1972    #[doc = "Optional. True, if the bot can edit the username of the business account"]
1973    #[allow(clippy::needless_lifetimes)]
1974    fn get_can_edit_username<'a>(&'a self) -> Option<bool>;
1975    #[allow(rustdoc::invalid_html_tags)]
1976    #[doc = "Optional. True, if the bot can edit the username of the business account"]
1977    #[allow(clippy::needless_lifetimes)]
1978    fn set_can_edit_username<'a>(&'a mut self, can_edit_username: Option<bool>) -> &'a mut Self;
1979    #[allow(rustdoc::invalid_html_tags)]
1980    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
1981    #[allow(clippy::needless_lifetimes)]
1982    fn get_can_change_gift_settings<'a>(&'a self) -> Option<bool>;
1983    #[allow(rustdoc::invalid_html_tags)]
1984    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
1985    #[allow(clippy::needless_lifetimes)]
1986    fn set_can_change_gift_settings<'a>(
1987        &'a mut self,
1988        can_change_gift_settings: Option<bool>,
1989    ) -> &'a mut Self;
1990    #[allow(rustdoc::invalid_html_tags)]
1991    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
1992    #[allow(clippy::needless_lifetimes)]
1993    fn get_can_view_gifts_and_stars<'a>(&'a self) -> Option<bool>;
1994    #[allow(rustdoc::invalid_html_tags)]
1995    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
1996    #[allow(clippy::needless_lifetimes)]
1997    fn set_can_view_gifts_and_stars<'a>(
1998        &'a mut self,
1999        can_view_gifts_and_stars: Option<bool>,
2000    ) -> &'a mut Self;
2001    #[allow(rustdoc::invalid_html_tags)]
2002    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
2003    #[allow(clippy::needless_lifetimes)]
2004    fn get_can_convert_gifts_to_stars<'a>(&'a self) -> Option<bool>;
2005    #[allow(rustdoc::invalid_html_tags)]
2006    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
2007    #[allow(clippy::needless_lifetimes)]
2008    fn set_can_convert_gifts_to_stars<'a>(
2009        &'a mut self,
2010        can_convert_gifts_to_stars: Option<bool>,
2011    ) -> &'a mut Self;
2012    #[allow(rustdoc::invalid_html_tags)]
2013    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
2014    #[allow(clippy::needless_lifetimes)]
2015    fn get_can_transfer_and_upgrade_gifts<'a>(&'a self) -> Option<bool>;
2016    #[allow(rustdoc::invalid_html_tags)]
2017    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
2018    #[allow(clippy::needless_lifetimes)]
2019    fn set_can_transfer_and_upgrade_gifts<'a>(
2020        &'a mut self,
2021        can_transfer_and_upgrade_gifts: Option<bool>,
2022    ) -> &'a mut Self;
2023    #[allow(rustdoc::invalid_html_tags)]
2024    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
2025    #[allow(clippy::needless_lifetimes)]
2026    fn get_can_transfer_stars<'a>(&'a self) -> Option<bool>;
2027    #[allow(rustdoc::invalid_html_tags)]
2028    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
2029    #[allow(clippy::needless_lifetimes)]
2030    fn set_can_transfer_stars<'a>(&'a mut self, can_transfer_stars: Option<bool>) -> &'a mut Self;
2031    #[allow(rustdoc::invalid_html_tags)]
2032    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
2033    #[allow(clippy::needless_lifetimes)]
2034    fn get_can_manage_stories<'a>(&'a self) -> Option<bool>;
2035    #[allow(rustdoc::invalid_html_tags)]
2036    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
2037    #[allow(clippy::needless_lifetimes)]
2038    fn set_can_manage_stories<'a>(&'a mut self, can_manage_stories: Option<bool>) -> &'a mut Self;
2039}
2040#[allow(dead_code)]
2041trait TraitInputStoryContentPhoto {
2042    #[allow(rustdoc::invalid_html_tags)]
2043    #[doc = "Type of the content, must be photo"]
2044    #[allow(clippy::needless_lifetimes)]
2045    fn get_tg_type<'a>(&'a self) -> &'a str;
2046    #[allow(rustdoc::invalid_html_tags)]
2047    #[doc = "Type of the content, must be photo"]
2048    #[allow(clippy::needless_lifetimes)]
2049    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
2050    #[allow(rustdoc::invalid_html_tags)]
2051    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
2052    #[allow(clippy::needless_lifetimes)]
2053    fn get_photo<'a>(&'a self) -> &'a str;
2054    #[allow(rustdoc::invalid_html_tags)]
2055    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
2056    #[allow(clippy::needless_lifetimes)]
2057    fn set_photo<'a>(&'a mut self, photo: String) -> &'a mut Self;
2058}
2059#[allow(dead_code)]
2060trait TraitInputVenueMessageContent {
2061    #[allow(rustdoc::invalid_html_tags)]
2062    #[doc = "Latitude of the venue in degrees"]
2063    #[allow(clippy::needless_lifetimes)]
2064    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
2065    #[allow(rustdoc::invalid_html_tags)]
2066    #[doc = "Latitude of the venue in degrees"]
2067    #[allow(clippy::needless_lifetimes)]
2068    fn set_latitude<'a>(&'a mut self, latitude: ::ordered_float::OrderedFloat<f64>)
2069        -> &'a mut Self;
2070    #[allow(rustdoc::invalid_html_tags)]
2071    #[doc = "Longitude of the venue in degrees"]
2072    #[allow(clippy::needless_lifetimes)]
2073    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
2074    #[allow(rustdoc::invalid_html_tags)]
2075    #[doc = "Longitude of the venue in degrees"]
2076    #[allow(clippy::needless_lifetimes)]
2077    fn set_longitude<'a>(
2078        &'a mut self,
2079        longitude: ::ordered_float::OrderedFloat<f64>,
2080    ) -> &'a mut Self;
2081    #[allow(rustdoc::invalid_html_tags)]
2082    #[doc = "Name of the venue"]
2083    #[allow(clippy::needless_lifetimes)]
2084    fn get_title<'a>(&'a self) -> &'a str;
2085    #[allow(rustdoc::invalid_html_tags)]
2086    #[doc = "Name of the venue"]
2087    #[allow(clippy::needless_lifetimes)]
2088    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
2089    #[allow(rustdoc::invalid_html_tags)]
2090    #[doc = "Address of the venue"]
2091    #[allow(clippy::needless_lifetimes)]
2092    fn get_address<'a>(&'a self) -> &'a str;
2093    #[allow(rustdoc::invalid_html_tags)]
2094    #[doc = "Address of the venue"]
2095    #[allow(clippy::needless_lifetimes)]
2096    fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self;
2097    #[allow(rustdoc::invalid_html_tags)]
2098    #[doc = "Optional. Foursquare identifier of the venue, if known"]
2099    #[allow(clippy::needless_lifetimes)]
2100    fn get_foursquare_id<'a>(&'a self) -> Option<&'a str>;
2101    #[allow(rustdoc::invalid_html_tags)]
2102    #[doc = "Optional. Foursquare identifier of the venue, if known"]
2103    #[allow(clippy::needless_lifetimes)]
2104    fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self;
2105    #[allow(rustdoc::invalid_html_tags)]
2106    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
2107    #[allow(clippy::needless_lifetimes)]
2108    fn get_foursquare_type<'a>(&'a self) -> Option<&'a str>;
2109    #[allow(rustdoc::invalid_html_tags)]
2110    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
2111    #[allow(clippy::needless_lifetimes)]
2112    fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self;
2113    #[allow(rustdoc::invalid_html_tags)]
2114    #[doc = "Optional. Google Places identifier of the venue"]
2115    #[allow(clippy::needless_lifetimes)]
2116    fn get_google_place_id<'a>(&'a self) -> Option<&'a str>;
2117    #[allow(rustdoc::invalid_html_tags)]
2118    #[doc = "Optional. Google Places identifier of the venue"]
2119    #[allow(clippy::needless_lifetimes)]
2120    fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self;
2121    #[allow(rustdoc::invalid_html_tags)]
2122    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
2123    #[allow(clippy::needless_lifetimes)]
2124    fn get_google_place_type<'a>(&'a self) -> Option<&'a str>;
2125    #[allow(rustdoc::invalid_html_tags)]
2126    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
2127    #[allow(clippy::needless_lifetimes)]
2128    fn set_google_place_type<'a>(&'a mut self, google_place_type: Option<String>) -> &'a mut Self;
2129}
2130#[allow(dead_code)]
2131trait TraitUniqueGiftSymbol {
2132    #[allow(rustdoc::invalid_html_tags)]
2133    #[doc = "Name of the symbol"]
2134    #[allow(clippy::needless_lifetimes)]
2135    fn get_name<'a>(&'a self) -> &'a str;
2136    #[allow(rustdoc::invalid_html_tags)]
2137    #[doc = "Name of the symbol"]
2138    #[allow(clippy::needless_lifetimes)]
2139    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
2140    #[allow(rustdoc::invalid_html_tags)]
2141    #[doc = "The sticker that represents the unique gift"]
2142    #[allow(clippy::needless_lifetimes)]
2143    fn get_sticker<'a>(&'a self) -> &'a Sticker;
2144    #[allow(rustdoc::invalid_html_tags)]
2145    #[doc = "The sticker that represents the unique gift"]
2146    #[allow(clippy::needless_lifetimes)]
2147    fn set_sticker<'a>(&'a mut self, sticker: Sticker) -> &'a mut Self;
2148    #[allow(rustdoc::invalid_html_tags)]
2149    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
2150    #[allow(clippy::needless_lifetimes)]
2151    fn get_rarity_per_mille<'a>(&'a self) -> i64;
2152    #[allow(rustdoc::invalid_html_tags)]
2153    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
2154    #[allow(clippy::needless_lifetimes)]
2155    fn set_rarity_per_mille<'a>(&'a mut self, rarity_per_mille: i64) -> &'a mut Self;
2156}
2157#[allow(dead_code)]
2158trait TraitInputChecklistTask {
2159    #[allow(rustdoc::invalid_html_tags)]
2160    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
2161    #[allow(clippy::needless_lifetimes)]
2162    fn get_id<'a>(&'a self) -> i64;
2163    #[allow(rustdoc::invalid_html_tags)]
2164    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
2165    #[allow(clippy::needless_lifetimes)]
2166    fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self;
2167    #[allow(rustdoc::invalid_html_tags)]
2168    #[doc = "Text of the task; 1-100 characters after entities parsing"]
2169    #[allow(clippy::needless_lifetimes)]
2170    fn get_text<'a>(&'a self) -> &'a str;
2171    #[allow(rustdoc::invalid_html_tags)]
2172    #[doc = "Text of the task; 1-100 characters after entities parsing"]
2173    #[allow(clippy::needless_lifetimes)]
2174    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
2175    #[allow(rustdoc::invalid_html_tags)]
2176    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
2177    #[allow(clippy::needless_lifetimes)]
2178    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
2179    #[allow(rustdoc::invalid_html_tags)]
2180    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
2181    #[allow(clippy::needless_lifetimes)]
2182    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
2183    #[allow(rustdoc::invalid_html_tags)]
2184    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
2185    #[allow(clippy::needless_lifetimes)]
2186    fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
2187    #[allow(rustdoc::invalid_html_tags)]
2188    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
2189    #[allow(clippy::needless_lifetimes)]
2190    fn set_text_entities<'a>(
2191        &'a mut self,
2192        text_entities: Option<Vec<MessageEntity>>,
2193    ) -> &'a mut Self;
2194}
2195#[allow(dead_code)]
2196trait TraitPaidMessagePriceChanged {
2197    #[allow(rustdoc::invalid_html_tags)]
2198    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
2199    #[allow(clippy::needless_lifetimes)]
2200    fn get_paid_message_star_count<'a>(&'a self) -> i64;
2201    #[allow(rustdoc::invalid_html_tags)]
2202    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
2203    #[allow(clippy::needless_lifetimes)]
2204    fn set_paid_message_star_count<'a>(&'a mut self, paid_message_star_count: i64) -> &'a mut Self;
2205}
2206#[allow(dead_code)]
2207trait TraitTransactionPartner:
2208    TraitTransactionPartnerUser
2209    + TraitTransactionPartnerChat
2210    + TraitTransactionPartnerAffiliateProgram
2211    + TraitTransactionPartnerFragment
2212    + TraitTransactionPartnerTelegramAds
2213    + TraitTransactionPartnerTelegramApi
2214    + TraitTransactionPartnerOther
2215{
2216}
2217#[allow(dead_code)]
2218trait TraitMessageReactionCountUpdated {
2219    #[allow(rustdoc::invalid_html_tags)]
2220    #[doc = "The chat containing the message"]
2221    #[allow(clippy::needless_lifetimes)]
2222    fn get_chat<'a>(&'a self) -> &'a Chat;
2223    #[allow(rustdoc::invalid_html_tags)]
2224    #[doc = "The chat containing the message"]
2225    #[allow(clippy::needless_lifetimes)]
2226    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
2227    #[allow(rustdoc::invalid_html_tags)]
2228    #[doc = "Unique message identifier inside the chat"]
2229    #[allow(clippy::needless_lifetimes)]
2230    fn get_message_id<'a>(&'a self) -> i64;
2231    #[allow(rustdoc::invalid_html_tags)]
2232    #[doc = "Unique message identifier inside the chat"]
2233    #[allow(clippy::needless_lifetimes)]
2234    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self;
2235    #[allow(rustdoc::invalid_html_tags)]
2236    #[doc = "Date of the change in Unix time"]
2237    #[allow(clippy::needless_lifetimes)]
2238    fn get_date<'a>(&'a self) -> i64;
2239    #[allow(rustdoc::invalid_html_tags)]
2240    #[doc = "Date of the change in Unix time"]
2241    #[allow(clippy::needless_lifetimes)]
2242    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
2243    #[allow(rustdoc::invalid_html_tags)]
2244    #[doc = "List of reactions that are present on the message"]
2245    #[allow(clippy::needless_lifetimes)]
2246    fn get_reactions<'a>(&'a self) -> &'a Vec<ReactionCount>;
2247    #[allow(rustdoc::invalid_html_tags)]
2248    #[doc = "List of reactions that are present on the message"]
2249    #[allow(clippy::needless_lifetimes)]
2250    fn set_reactions<'a>(&'a mut self, reactions: Vec<ReactionCount>) -> &'a mut Self;
2251}
2252#[allow(dead_code)]
2253trait TraitLocation {
2254    #[allow(rustdoc::invalid_html_tags)]
2255    #[doc = "Latitude as defined by the sender"]
2256    #[allow(clippy::needless_lifetimes)]
2257    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
2258    #[allow(rustdoc::invalid_html_tags)]
2259    #[doc = "Latitude as defined by the sender"]
2260    #[allow(clippy::needless_lifetimes)]
2261    fn set_latitude<'a>(&'a mut self, latitude: ::ordered_float::OrderedFloat<f64>)
2262        -> &'a mut Self;
2263    #[allow(rustdoc::invalid_html_tags)]
2264    #[doc = "Longitude as defined by the sender"]
2265    #[allow(clippy::needless_lifetimes)]
2266    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
2267    #[allow(rustdoc::invalid_html_tags)]
2268    #[doc = "Longitude as defined by the sender"]
2269    #[allow(clippy::needless_lifetimes)]
2270    fn set_longitude<'a>(
2271        &'a mut self,
2272        longitude: ::ordered_float::OrderedFloat<f64>,
2273    ) -> &'a mut Self;
2274    #[allow(rustdoc::invalid_html_tags)]
2275    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
2276    #[allow(clippy::needless_lifetimes)]
2277    fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>>;
2278    #[allow(rustdoc::invalid_html_tags)]
2279    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
2280    #[allow(clippy::needless_lifetimes)]
2281    fn set_horizontal_accuracy<'a>(
2282        &'a mut self,
2283        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
2284    ) -> &'a mut Self;
2285    #[allow(rustdoc::invalid_html_tags)]
2286    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
2287    #[allow(clippy::needless_lifetimes)]
2288    fn get_live_period<'a>(&'a self) -> Option<i64>;
2289    #[allow(rustdoc::invalid_html_tags)]
2290    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
2291    #[allow(clippy::needless_lifetimes)]
2292    fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self;
2293    #[allow(rustdoc::invalid_html_tags)]
2294    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
2295    #[allow(clippy::needless_lifetimes)]
2296    fn get_heading<'a>(&'a self) -> Option<i64>;
2297    #[allow(rustdoc::invalid_html_tags)]
2298    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
2299    #[allow(clippy::needless_lifetimes)]
2300    fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self;
2301    #[allow(rustdoc::invalid_html_tags)]
2302    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
2303    #[allow(clippy::needless_lifetimes)]
2304    fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64>;
2305    #[allow(rustdoc::invalid_html_tags)]
2306    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
2307    #[allow(clippy::needless_lifetimes)]
2308    fn set_proximity_alert_radius<'a>(
2309        &'a mut self,
2310        proximity_alert_radius: Option<i64>,
2311    ) -> &'a mut Self;
2312}
2313#[allow(dead_code)]
2314trait TraitGameHighScore {
2315    #[allow(rustdoc::invalid_html_tags)]
2316    #[doc = "Position in high score table for the game"]
2317    #[allow(clippy::needless_lifetimes)]
2318    fn get_position<'a>(&'a self) -> i64;
2319    #[allow(rustdoc::invalid_html_tags)]
2320    #[doc = "Position in high score table for the game"]
2321    #[allow(clippy::needless_lifetimes)]
2322    fn set_position<'a>(&'a mut self, position: i64) -> &'a mut Self;
2323    #[allow(rustdoc::invalid_html_tags)]
2324    #[doc = "User"]
2325    #[allow(clippy::needless_lifetimes)]
2326    fn get_user<'a>(&'a self) -> &'a User;
2327    #[allow(rustdoc::invalid_html_tags)]
2328    #[doc = "User"]
2329    #[allow(clippy::needless_lifetimes)]
2330    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
2331    #[allow(rustdoc::invalid_html_tags)]
2332    #[doc = "Score"]
2333    #[allow(clippy::needless_lifetimes)]
2334    fn get_score<'a>(&'a self) -> i64;
2335    #[allow(rustdoc::invalid_html_tags)]
2336    #[doc = "Score"]
2337    #[allow(clippy::needless_lifetimes)]
2338    fn set_score<'a>(&'a mut self, score: i64) -> &'a mut Self;
2339}
2340#[allow(dead_code)]
2341trait TraitMessageReactionUpdated {
2342    #[allow(rustdoc::invalid_html_tags)]
2343    #[doc = "The chat containing the message the user reacted to"]
2344    #[allow(clippy::needless_lifetimes)]
2345    fn get_chat<'a>(&'a self) -> &'a Chat;
2346    #[allow(rustdoc::invalid_html_tags)]
2347    #[doc = "The chat containing the message the user reacted to"]
2348    #[allow(clippy::needless_lifetimes)]
2349    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
2350    #[allow(rustdoc::invalid_html_tags)]
2351    #[doc = "Unique identifier of the message inside the chat"]
2352    #[allow(clippy::needless_lifetimes)]
2353    fn get_message_id<'a>(&'a self) -> i64;
2354    #[allow(rustdoc::invalid_html_tags)]
2355    #[doc = "Unique identifier of the message inside the chat"]
2356    #[allow(clippy::needless_lifetimes)]
2357    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self;
2358    #[allow(rustdoc::invalid_html_tags)]
2359    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
2360    #[allow(clippy::needless_lifetimes)]
2361    fn get_user<'a>(&'a self) -> Option<&'a User>;
2362    #[allow(rustdoc::invalid_html_tags)]
2363    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
2364    #[allow(clippy::needless_lifetimes)]
2365    fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self;
2366    #[allow(rustdoc::invalid_html_tags)]
2367    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
2368    #[allow(clippy::needless_lifetimes)]
2369    fn get_actor_chat<'a>(&'a self) -> Option<&'a Chat>;
2370    #[allow(rustdoc::invalid_html_tags)]
2371    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
2372    #[allow(clippy::needless_lifetimes)]
2373    fn set_actor_chat<'a>(&'a mut self, actor_chat: Option<Chat>) -> &'a mut Self;
2374    #[allow(rustdoc::invalid_html_tags)]
2375    #[doc = "Date of the change in Unix time"]
2376    #[allow(clippy::needless_lifetimes)]
2377    fn get_date<'a>(&'a self) -> i64;
2378    #[allow(rustdoc::invalid_html_tags)]
2379    #[doc = "Date of the change in Unix time"]
2380    #[allow(clippy::needless_lifetimes)]
2381    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
2382    #[allow(rustdoc::invalid_html_tags)]
2383    #[doc = "Previous list of reaction types that were set by the user"]
2384    #[allow(clippy::needless_lifetimes)]
2385    fn get_old_reaction<'a>(&'a self) -> &'a Vec<ReactionType>;
2386    #[allow(rustdoc::invalid_html_tags)]
2387    #[doc = "Previous list of reaction types that were set by the user"]
2388    #[allow(clippy::needless_lifetimes)]
2389    fn set_old_reaction<'a>(&'a mut self, old_reaction: Vec<ReactionType>) -> &'a mut Self;
2390    #[allow(rustdoc::invalid_html_tags)]
2391    #[doc = "New list of reaction types that have been set by the user"]
2392    #[allow(clippy::needless_lifetimes)]
2393    fn get_new_reaction<'a>(&'a self) -> &'a Vec<ReactionType>;
2394    #[allow(rustdoc::invalid_html_tags)]
2395    #[doc = "New list of reaction types that have been set by the user"]
2396    #[allow(clippy::needless_lifetimes)]
2397    fn set_new_reaction<'a>(&'a mut self, new_reaction: Vec<ReactionType>) -> &'a mut Self;
2398}
2399#[allow(dead_code)]
2400trait TraitSuccessfulPayment {
2401    #[allow(rustdoc::invalid_html_tags)]
2402    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
2403    #[allow(clippy::needless_lifetimes)]
2404    fn get_currency<'a>(&'a self) -> &'a str;
2405    #[allow(rustdoc::invalid_html_tags)]
2406    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
2407    #[allow(clippy::needless_lifetimes)]
2408    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self;
2409    #[allow(rustdoc::invalid_html_tags)]
2410    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
2411    #[allow(clippy::needless_lifetimes)]
2412    fn get_total_amount<'a>(&'a self) -> i64;
2413    #[allow(rustdoc::invalid_html_tags)]
2414    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
2415    #[allow(clippy::needless_lifetimes)]
2416    fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self;
2417    #[allow(rustdoc::invalid_html_tags)]
2418    #[doc = "Bot-specified invoice payload"]
2419    #[allow(clippy::needless_lifetimes)]
2420    fn get_invoice_payload<'a>(&'a self) -> &'a str;
2421    #[allow(rustdoc::invalid_html_tags)]
2422    #[doc = "Bot-specified invoice payload"]
2423    #[allow(clippy::needless_lifetimes)]
2424    fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self;
2425    #[allow(rustdoc::invalid_html_tags)]
2426    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
2427    #[allow(clippy::needless_lifetimes)]
2428    fn get_subscription_expiration_date<'a>(&'a self) -> Option<i64>;
2429    #[allow(rustdoc::invalid_html_tags)]
2430    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
2431    #[allow(clippy::needless_lifetimes)]
2432    fn set_subscription_expiration_date<'a>(
2433        &'a mut self,
2434        subscription_expiration_date: Option<i64>,
2435    ) -> &'a mut Self;
2436    #[allow(rustdoc::invalid_html_tags)]
2437    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
2438    #[allow(clippy::needless_lifetimes)]
2439    fn get_is_recurring<'a>(&'a self) -> Option<bool>;
2440    #[allow(rustdoc::invalid_html_tags)]
2441    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
2442    #[allow(clippy::needless_lifetimes)]
2443    fn set_is_recurring<'a>(&'a mut self, is_recurring: Option<bool>) -> &'a mut Self;
2444    #[allow(rustdoc::invalid_html_tags)]
2445    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
2446    #[allow(clippy::needless_lifetimes)]
2447    fn get_is_first_recurring<'a>(&'a self) -> Option<bool>;
2448    #[allow(rustdoc::invalid_html_tags)]
2449    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
2450    #[allow(clippy::needless_lifetimes)]
2451    fn set_is_first_recurring<'a>(&'a mut self, is_first_recurring: Option<bool>) -> &'a mut Self;
2452    #[allow(rustdoc::invalid_html_tags)]
2453    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
2454    #[allow(clippy::needless_lifetimes)]
2455    fn get_shipping_option_id<'a>(&'a self) -> Option<&'a str>;
2456    #[allow(rustdoc::invalid_html_tags)]
2457    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
2458    #[allow(clippy::needless_lifetimes)]
2459    fn set_shipping_option_id<'a>(&'a mut self, shipping_option_id: Option<String>)
2460        -> &'a mut Self;
2461    #[allow(rustdoc::invalid_html_tags)]
2462    #[doc = "Optional. Order information provided by the user"]
2463    #[allow(clippy::needless_lifetimes)]
2464    fn get_order_info<'a>(&'a self) -> Option<&'a OrderInfo>;
2465    #[allow(rustdoc::invalid_html_tags)]
2466    #[doc = "Optional. Order information provided by the user"]
2467    #[allow(clippy::needless_lifetimes)]
2468    fn set_order_info<'a>(&'a mut self, order_info: Option<OrderInfo>) -> &'a mut Self;
2469    #[allow(rustdoc::invalid_html_tags)]
2470    #[doc = "Telegram payment identifier"]
2471    #[allow(clippy::needless_lifetimes)]
2472    fn get_telegram_payment_charge_id<'a>(&'a self) -> &'a str;
2473    #[allow(rustdoc::invalid_html_tags)]
2474    #[doc = "Telegram payment identifier"]
2475    #[allow(clippy::needless_lifetimes)]
2476    fn set_telegram_payment_charge_id<'a>(
2477        &'a mut self,
2478        telegram_payment_charge_id: String,
2479    ) -> &'a mut Self;
2480    #[allow(rustdoc::invalid_html_tags)]
2481    #[doc = "Provider payment identifier"]
2482    #[allow(clippy::needless_lifetimes)]
2483    fn get_provider_payment_charge_id<'a>(&'a self) -> &'a str;
2484    #[allow(rustdoc::invalid_html_tags)]
2485    #[doc = "Provider payment identifier"]
2486    #[allow(clippy::needless_lifetimes)]
2487    fn set_provider_payment_charge_id<'a>(
2488        &'a mut self,
2489        provider_payment_charge_id: String,
2490    ) -> &'a mut Self;
2491}
2492#[allow(dead_code)]
2493trait TraitInlineQueryResultDocument {
2494    #[allow(rustdoc::invalid_html_tags)]
2495    #[doc = "Type of the result, must be document"]
2496    #[allow(clippy::needless_lifetimes)]
2497    fn get_tg_type<'a>(&'a self) -> &'a str;
2498    #[allow(rustdoc::invalid_html_tags)]
2499    #[doc = "Type of the result, must be document"]
2500    #[allow(clippy::needless_lifetimes)]
2501    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
2502    #[allow(rustdoc::invalid_html_tags)]
2503    #[doc = "Unique identifier for this result, 1-64 bytes"]
2504    #[allow(clippy::needless_lifetimes)]
2505    fn get_id<'a>(&'a self) -> &'a str;
2506    #[allow(rustdoc::invalid_html_tags)]
2507    #[doc = "Unique identifier for this result, 1-64 bytes"]
2508    #[allow(clippy::needless_lifetimes)]
2509    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
2510    #[allow(rustdoc::invalid_html_tags)]
2511    #[doc = "Title for the result"]
2512    #[allow(clippy::needless_lifetimes)]
2513    fn get_title<'a>(&'a self) -> &'a str;
2514    #[allow(rustdoc::invalid_html_tags)]
2515    #[doc = "Title for the result"]
2516    #[allow(clippy::needless_lifetimes)]
2517    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
2518    #[allow(rustdoc::invalid_html_tags)]
2519    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
2520    #[allow(clippy::needless_lifetimes)]
2521    fn get_caption<'a>(&'a self) -> Option<&'a str>;
2522    #[allow(rustdoc::invalid_html_tags)]
2523    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
2524    #[allow(clippy::needless_lifetimes)]
2525    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
2526    #[allow(rustdoc::invalid_html_tags)]
2527    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
2528    #[allow(clippy::needless_lifetimes)]
2529    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
2530    #[allow(rustdoc::invalid_html_tags)]
2531    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
2532    #[allow(clippy::needless_lifetimes)]
2533    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
2534    #[allow(rustdoc::invalid_html_tags)]
2535    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
2536    #[allow(clippy::needless_lifetimes)]
2537    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
2538    #[allow(rustdoc::invalid_html_tags)]
2539    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
2540    #[allow(clippy::needless_lifetimes)]
2541    fn set_caption_entities<'a>(
2542        &'a mut self,
2543        caption_entities: Option<Vec<MessageEntity>>,
2544    ) -> &'a mut Self;
2545    #[allow(rustdoc::invalid_html_tags)]
2546    #[doc = "A valid URL for the file"]
2547    #[allow(clippy::needless_lifetimes)]
2548    fn get_document_url<'a>(&'a self) -> &'a str;
2549    #[allow(rustdoc::invalid_html_tags)]
2550    #[doc = "A valid URL for the file"]
2551    #[allow(clippy::needless_lifetimes)]
2552    fn set_document_url<'a>(&'a mut self, document_url: String) -> &'a mut Self;
2553    #[allow(rustdoc::invalid_html_tags)]
2554    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
2555    #[allow(clippy::needless_lifetimes)]
2556    fn get_mime_type<'a>(&'a self) -> &'a str;
2557    #[allow(rustdoc::invalid_html_tags)]
2558    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
2559    #[allow(clippy::needless_lifetimes)]
2560    fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self;
2561    #[allow(rustdoc::invalid_html_tags)]
2562    #[doc = "Optional. Short description of the result"]
2563    #[allow(clippy::needless_lifetimes)]
2564    fn get_description<'a>(&'a self) -> Option<&'a str>;
2565    #[allow(rustdoc::invalid_html_tags)]
2566    #[doc = "Optional. Short description of the result"]
2567    #[allow(clippy::needless_lifetimes)]
2568    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
2569    #[allow(rustdoc::invalid_html_tags)]
2570    #[doc = "Optional. Inline keyboard attached to the message"]
2571    #[allow(clippy::needless_lifetimes)]
2572    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
2573    #[allow(rustdoc::invalid_html_tags)]
2574    #[doc = "Optional. Inline keyboard attached to the message"]
2575    #[allow(clippy::needless_lifetimes)]
2576    fn set_reply_markup<'a>(
2577        &'a mut self,
2578        reply_markup: Option<InlineKeyboardMarkup>,
2579    ) -> &'a mut Self;
2580    #[allow(rustdoc::invalid_html_tags)]
2581    #[doc = "Optional. Content of the message to be sent instead of the file"]
2582    #[allow(clippy::needless_lifetimes)]
2583    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
2584    #[allow(rustdoc::invalid_html_tags)]
2585    #[doc = "Optional. Content of the message to be sent instead of the file"]
2586    #[allow(clippy::needless_lifetimes)]
2587    fn set_input_message_content<'a>(
2588        &'a mut self,
2589        input_message_content: Option<InputMessageContent>,
2590    ) -> &'a mut Self;
2591    #[allow(rustdoc::invalid_html_tags)]
2592    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
2593    #[allow(clippy::needless_lifetimes)]
2594    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str>;
2595    #[allow(rustdoc::invalid_html_tags)]
2596    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
2597    #[allow(clippy::needless_lifetimes)]
2598    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self;
2599    #[allow(rustdoc::invalid_html_tags)]
2600    #[doc = "Optional. Thumbnail width"]
2601    #[allow(clippy::needless_lifetimes)]
2602    fn get_thumbnail_width<'a>(&'a self) -> Option<i64>;
2603    #[allow(rustdoc::invalid_html_tags)]
2604    #[doc = "Optional. Thumbnail width"]
2605    #[allow(clippy::needless_lifetimes)]
2606    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self;
2607    #[allow(rustdoc::invalid_html_tags)]
2608    #[doc = "Optional. Thumbnail height"]
2609    #[allow(clippy::needless_lifetimes)]
2610    fn get_thumbnail_height<'a>(&'a self) -> Option<i64>;
2611    #[allow(rustdoc::invalid_html_tags)]
2612    #[doc = "Optional. Thumbnail height"]
2613    #[allow(clippy::needless_lifetimes)]
2614    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self;
2615}
2616#[allow(dead_code)]
2617trait TraitSuggestedPostApproved {
2618    #[allow(rustdoc::invalid_html_tags)]
2619    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
2620    #[allow(clippy::needless_lifetimes)]
2621    fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message>;
2622    #[allow(rustdoc::invalid_html_tags)]
2623    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
2624    #[allow(clippy::needless_lifetimes)]
2625    fn set_suggested_post_message<'a>(
2626        &'a mut self,
2627        suggested_post_message: Option<Message>,
2628    ) -> &'a mut Self;
2629    #[allow(rustdoc::invalid_html_tags)]
2630    #[doc = "Optional. Amount paid for the post"]
2631    #[allow(clippy::needless_lifetimes)]
2632    fn get_price<'a>(&'a self) -> Option<&'a SuggestedPostPrice>;
2633    #[allow(rustdoc::invalid_html_tags)]
2634    #[doc = "Optional. Amount paid for the post"]
2635    #[allow(clippy::needless_lifetimes)]
2636    fn set_price<'a>(&'a mut self, price: Option<SuggestedPostPrice>) -> &'a mut Self;
2637    #[allow(rustdoc::invalid_html_tags)]
2638    #[doc = "Date when the post will be published"]
2639    #[allow(clippy::needless_lifetimes)]
2640    fn get_send_date<'a>(&'a self) -> i64;
2641    #[allow(rustdoc::invalid_html_tags)]
2642    #[doc = "Date when the post will be published"]
2643    #[allow(clippy::needless_lifetimes)]
2644    fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self;
2645}
2646#[allow(dead_code)]
2647trait TraitMenuButton:
2648    TraitMenuButtonCommands + TraitMenuButtonWebApp + TraitMenuButtonDefault
2649{
2650}
2651#[allow(dead_code)]
2652trait TraitUser {
2653    #[allow(rustdoc::invalid_html_tags)]
2654    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
2655    #[allow(clippy::needless_lifetimes)]
2656    fn get_id<'a>(&'a self) -> i64;
2657    #[allow(rustdoc::invalid_html_tags)]
2658    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
2659    #[allow(clippy::needless_lifetimes)]
2660    fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self;
2661    #[allow(rustdoc::invalid_html_tags)]
2662    #[doc = "True, if this user is a bot"]
2663    #[allow(clippy::needless_lifetimes)]
2664    fn get_is_bot<'a>(&'a self) -> bool;
2665    #[allow(rustdoc::invalid_html_tags)]
2666    #[doc = "True, if this user is a bot"]
2667    #[allow(clippy::needless_lifetimes)]
2668    fn set_is_bot<'a>(&'a mut self, is_bot: bool) -> &'a mut Self;
2669    #[allow(rustdoc::invalid_html_tags)]
2670    #[doc = "User's or bot's first name"]
2671    #[allow(clippy::needless_lifetimes)]
2672    fn get_first_name<'a>(&'a self) -> &'a str;
2673    #[allow(rustdoc::invalid_html_tags)]
2674    #[doc = "User's or bot's first name"]
2675    #[allow(clippy::needless_lifetimes)]
2676    fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self;
2677    #[allow(rustdoc::invalid_html_tags)]
2678    #[doc = "Optional. User's or bot's last name"]
2679    #[allow(clippy::needless_lifetimes)]
2680    fn get_last_name<'a>(&'a self) -> Option<&'a str>;
2681    #[allow(rustdoc::invalid_html_tags)]
2682    #[doc = "Optional. User's or bot's last name"]
2683    #[allow(clippy::needless_lifetimes)]
2684    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self;
2685    #[allow(rustdoc::invalid_html_tags)]
2686    #[doc = "Optional. User's or bot's username"]
2687    #[allow(clippy::needless_lifetimes)]
2688    fn get_username<'a>(&'a self) -> Option<&'a str>;
2689    #[allow(rustdoc::invalid_html_tags)]
2690    #[doc = "Optional. User's or bot's username"]
2691    #[allow(clippy::needless_lifetimes)]
2692    fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self;
2693    #[allow(rustdoc::invalid_html_tags)]
2694    #[doc = "Optional. IETF language tag of the user's language"]
2695    #[allow(clippy::needless_lifetimes)]
2696    fn get_language_code<'a>(&'a self) -> Option<&'a str>;
2697    #[allow(rustdoc::invalid_html_tags)]
2698    #[doc = "Optional. IETF language tag of the user's language"]
2699    #[allow(clippy::needless_lifetimes)]
2700    fn set_language_code<'a>(&'a mut self, language_code: Option<String>) -> &'a mut Self;
2701    #[allow(rustdoc::invalid_html_tags)]
2702    #[doc = "Optional. True, if this user is a Telegram Premium user"]
2703    #[allow(clippy::needless_lifetimes)]
2704    fn get_is_premium<'a>(&'a self) -> Option<bool>;
2705    #[allow(rustdoc::invalid_html_tags)]
2706    #[doc = "Optional. True, if this user is a Telegram Premium user"]
2707    #[allow(clippy::needless_lifetimes)]
2708    fn set_is_premium<'a>(&'a mut self, is_premium: Option<bool>) -> &'a mut Self;
2709    #[allow(rustdoc::invalid_html_tags)]
2710    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
2711    #[allow(clippy::needless_lifetimes)]
2712    fn get_added_to_attachment_menu<'a>(&'a self) -> Option<bool>;
2713    #[allow(rustdoc::invalid_html_tags)]
2714    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
2715    #[allow(clippy::needless_lifetimes)]
2716    fn set_added_to_attachment_menu<'a>(
2717        &'a mut self,
2718        added_to_attachment_menu: Option<bool>,
2719    ) -> &'a mut Self;
2720    #[allow(rustdoc::invalid_html_tags)]
2721    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
2722    #[allow(clippy::needless_lifetimes)]
2723    fn get_can_join_groups<'a>(&'a self) -> Option<bool>;
2724    #[allow(rustdoc::invalid_html_tags)]
2725    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
2726    #[allow(clippy::needless_lifetimes)]
2727    fn set_can_join_groups<'a>(&'a mut self, can_join_groups: Option<bool>) -> &'a mut Self;
2728    #[allow(rustdoc::invalid_html_tags)]
2729    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
2730    #[allow(clippy::needless_lifetimes)]
2731    fn get_can_read_all_group_messages<'a>(&'a self) -> Option<bool>;
2732    #[allow(rustdoc::invalid_html_tags)]
2733    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
2734    #[allow(clippy::needless_lifetimes)]
2735    fn set_can_read_all_group_messages<'a>(
2736        &'a mut self,
2737        can_read_all_group_messages: Option<bool>,
2738    ) -> &'a mut Self;
2739    #[allow(rustdoc::invalid_html_tags)]
2740    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
2741    #[allow(clippy::needless_lifetimes)]
2742    fn get_supports_inline_queries<'a>(&'a self) -> Option<bool>;
2743    #[allow(rustdoc::invalid_html_tags)]
2744    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
2745    #[allow(clippy::needless_lifetimes)]
2746    fn set_supports_inline_queries<'a>(
2747        &'a mut self,
2748        supports_inline_queries: Option<bool>,
2749    ) -> &'a mut Self;
2750    #[allow(rustdoc::invalid_html_tags)]
2751    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
2752    #[allow(clippy::needless_lifetimes)]
2753    fn get_can_connect_to_business<'a>(&'a self) -> Option<bool>;
2754    #[allow(rustdoc::invalid_html_tags)]
2755    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
2756    #[allow(clippy::needless_lifetimes)]
2757    fn set_can_connect_to_business<'a>(
2758        &'a mut self,
2759        can_connect_to_business: Option<bool>,
2760    ) -> &'a mut Self;
2761    #[allow(rustdoc::invalid_html_tags)]
2762    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
2763    #[allow(clippy::needless_lifetimes)]
2764    fn get_has_main_web_app<'a>(&'a self) -> Option<bool>;
2765    #[allow(rustdoc::invalid_html_tags)]
2766    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
2767    #[allow(clippy::needless_lifetimes)]
2768    fn set_has_main_web_app<'a>(&'a mut self, has_main_web_app: Option<bool>) -> &'a mut Self;
2769}
2770#[allow(dead_code)]
2771trait TraitRevenueWithdrawalState:
2772    TraitRevenueWithdrawalStatePending
2773    + TraitRevenueWithdrawalStateSucceeded
2774    + TraitRevenueWithdrawalStateFailed
2775{
2776}
2777#[allow(dead_code)]
2778trait TraitRevenueWithdrawalStatePending {
2779    #[allow(rustdoc::invalid_html_tags)]
2780    #[doc = "Type of the state, always \"pending\""]
2781    #[allow(clippy::needless_lifetimes)]
2782    fn get_tg_type<'a>(&'a self) -> &'a str;
2783    #[allow(rustdoc::invalid_html_tags)]
2784    #[doc = "Type of the state, always \"pending\""]
2785    #[allow(clippy::needless_lifetimes)]
2786    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
2787}
2788#[allow(dead_code)]
2789trait TraitBotDescription {
2790    #[allow(rustdoc::invalid_html_tags)]
2791    #[doc = "The bot's description"]
2792    #[allow(clippy::needless_lifetimes)]
2793    fn get_description<'a>(&'a self) -> &'a str;
2794    #[allow(rustdoc::invalid_html_tags)]
2795    #[doc = "The bot's description"]
2796    #[allow(clippy::needless_lifetimes)]
2797    fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self;
2798}
2799#[allow(dead_code)]
2800trait TraitTransactionPartnerAffiliateProgram {
2801    #[allow(rustdoc::invalid_html_tags)]
2802    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
2803    #[allow(clippy::needless_lifetimes)]
2804    fn get_tg_type<'a>(&'a self) -> &'a str;
2805    #[allow(rustdoc::invalid_html_tags)]
2806    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
2807    #[allow(clippy::needless_lifetimes)]
2808    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
2809    #[allow(rustdoc::invalid_html_tags)]
2810    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
2811    #[allow(clippy::needless_lifetimes)]
2812    fn get_sponsor_user<'a>(&'a self) -> Option<&'a User>;
2813    #[allow(rustdoc::invalid_html_tags)]
2814    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
2815    #[allow(clippy::needless_lifetimes)]
2816    fn set_sponsor_user<'a>(&'a mut self, sponsor_user: Option<User>) -> &'a mut Self;
2817    #[allow(rustdoc::invalid_html_tags)]
2818    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
2819    #[allow(clippy::needless_lifetimes)]
2820    fn get_commission_per_mille<'a>(&'a self) -> i64;
2821    #[allow(rustdoc::invalid_html_tags)]
2822    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
2823    #[allow(clippy::needless_lifetimes)]
2824    fn set_commission_per_mille<'a>(&'a mut self, commission_per_mille: i64) -> &'a mut Self;
2825}
2826#[allow(dead_code)]
2827trait TraitInlineQueryResultCachedVideo {
2828    #[allow(rustdoc::invalid_html_tags)]
2829    #[doc = "Type of the result, must be video"]
2830    #[allow(clippy::needless_lifetimes)]
2831    fn get_tg_type<'a>(&'a self) -> &'a str;
2832    #[allow(rustdoc::invalid_html_tags)]
2833    #[doc = "Type of the result, must be video"]
2834    #[allow(clippy::needless_lifetimes)]
2835    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
2836    #[allow(rustdoc::invalid_html_tags)]
2837    #[doc = "Unique identifier for this result, 1-64 bytes"]
2838    #[allow(clippy::needless_lifetimes)]
2839    fn get_id<'a>(&'a self) -> &'a str;
2840    #[allow(rustdoc::invalid_html_tags)]
2841    #[doc = "Unique identifier for this result, 1-64 bytes"]
2842    #[allow(clippy::needless_lifetimes)]
2843    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
2844    #[allow(rustdoc::invalid_html_tags)]
2845    #[doc = "A valid file identifier for the video file"]
2846    #[allow(clippy::needless_lifetimes)]
2847    fn get_video_file_id<'a>(&'a self) -> &'a str;
2848    #[allow(rustdoc::invalid_html_tags)]
2849    #[doc = "A valid file identifier for the video file"]
2850    #[allow(clippy::needless_lifetimes)]
2851    fn set_video_file_id<'a>(&'a mut self, video_file_id: String) -> &'a mut Self;
2852    #[allow(rustdoc::invalid_html_tags)]
2853    #[doc = "Title for the result"]
2854    #[allow(clippy::needless_lifetimes)]
2855    fn get_title<'a>(&'a self) -> &'a str;
2856    #[allow(rustdoc::invalid_html_tags)]
2857    #[doc = "Title for the result"]
2858    #[allow(clippy::needless_lifetimes)]
2859    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
2860    #[allow(rustdoc::invalid_html_tags)]
2861    #[doc = "Optional. Short description of the result"]
2862    #[allow(clippy::needless_lifetimes)]
2863    fn get_description<'a>(&'a self) -> Option<&'a str>;
2864    #[allow(rustdoc::invalid_html_tags)]
2865    #[doc = "Optional. Short description of the result"]
2866    #[allow(clippy::needless_lifetimes)]
2867    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
2868    #[allow(rustdoc::invalid_html_tags)]
2869    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
2870    #[allow(clippy::needless_lifetimes)]
2871    fn get_caption<'a>(&'a self) -> Option<&'a str>;
2872    #[allow(rustdoc::invalid_html_tags)]
2873    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
2874    #[allow(clippy::needless_lifetimes)]
2875    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
2876    #[allow(rustdoc::invalid_html_tags)]
2877    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
2878    #[allow(clippy::needless_lifetimes)]
2879    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
2880    #[allow(rustdoc::invalid_html_tags)]
2881    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
2882    #[allow(clippy::needless_lifetimes)]
2883    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
2884    #[allow(rustdoc::invalid_html_tags)]
2885    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
2886    #[allow(clippy::needless_lifetimes)]
2887    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
2888    #[allow(rustdoc::invalid_html_tags)]
2889    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
2890    #[allow(clippy::needless_lifetimes)]
2891    fn set_caption_entities<'a>(
2892        &'a mut self,
2893        caption_entities: Option<Vec<MessageEntity>>,
2894    ) -> &'a mut Self;
2895    #[allow(rustdoc::invalid_html_tags)]
2896    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
2897    #[allow(clippy::needless_lifetimes)]
2898    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
2899    #[allow(rustdoc::invalid_html_tags)]
2900    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
2901    #[allow(clippy::needless_lifetimes)]
2902    fn set_show_caption_above_media<'a>(
2903        &'a mut self,
2904        show_caption_above_media: Option<bool>,
2905    ) -> &'a mut Self;
2906    #[allow(rustdoc::invalid_html_tags)]
2907    #[doc = "Optional. Inline keyboard attached to the message"]
2908    #[allow(clippy::needless_lifetimes)]
2909    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
2910    #[allow(rustdoc::invalid_html_tags)]
2911    #[doc = "Optional. Inline keyboard attached to the message"]
2912    #[allow(clippy::needless_lifetimes)]
2913    fn set_reply_markup<'a>(
2914        &'a mut self,
2915        reply_markup: Option<InlineKeyboardMarkup>,
2916    ) -> &'a mut Self;
2917    #[allow(rustdoc::invalid_html_tags)]
2918    #[doc = "Optional. Content of the message to be sent instead of the video"]
2919    #[allow(clippy::needless_lifetimes)]
2920    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
2921    #[allow(rustdoc::invalid_html_tags)]
2922    #[doc = "Optional. Content of the message to be sent instead of the video"]
2923    #[allow(clippy::needless_lifetimes)]
2924    fn set_input_message_content<'a>(
2925        &'a mut self,
2926        input_message_content: Option<InputMessageContent>,
2927    ) -> &'a mut Self;
2928}
2929#[allow(dead_code)]
2930trait TraitBusinessConnection {
2931    #[allow(rustdoc::invalid_html_tags)]
2932    #[doc = "Unique identifier of the business connection"]
2933    #[allow(clippy::needless_lifetimes)]
2934    fn get_id<'a>(&'a self) -> &'a str;
2935    #[allow(rustdoc::invalid_html_tags)]
2936    #[doc = "Unique identifier of the business connection"]
2937    #[allow(clippy::needless_lifetimes)]
2938    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
2939    #[allow(rustdoc::invalid_html_tags)]
2940    #[doc = "Business account user that created the business connection"]
2941    #[allow(clippy::needless_lifetimes)]
2942    fn get_user<'a>(&'a self) -> &'a User;
2943    #[allow(rustdoc::invalid_html_tags)]
2944    #[doc = "Business account user that created the business connection"]
2945    #[allow(clippy::needless_lifetimes)]
2946    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
2947    #[allow(rustdoc::invalid_html_tags)]
2948    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
2949    #[allow(clippy::needless_lifetimes)]
2950    fn get_user_chat_id<'a>(&'a self) -> i64;
2951    #[allow(rustdoc::invalid_html_tags)]
2952    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
2953    #[allow(clippy::needless_lifetimes)]
2954    fn set_user_chat_id<'a>(&'a mut self, user_chat_id: i64) -> &'a mut Self;
2955    #[allow(rustdoc::invalid_html_tags)]
2956    #[doc = "Date the connection was established in Unix time"]
2957    #[allow(clippy::needless_lifetimes)]
2958    fn get_date<'a>(&'a self) -> i64;
2959    #[allow(rustdoc::invalid_html_tags)]
2960    #[doc = "Date the connection was established in Unix time"]
2961    #[allow(clippy::needless_lifetimes)]
2962    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
2963    #[allow(rustdoc::invalid_html_tags)]
2964    #[doc = "Optional. Rights of the business bot"]
2965    #[allow(clippy::needless_lifetimes)]
2966    fn get_rights<'a>(&'a self) -> Option<&'a BusinessBotRights>;
2967    #[allow(rustdoc::invalid_html_tags)]
2968    #[doc = "Optional. Rights of the business bot"]
2969    #[allow(clippy::needless_lifetimes)]
2970    fn set_rights<'a>(&'a mut self, rights: Option<BusinessBotRights>) -> &'a mut Self;
2971    #[allow(rustdoc::invalid_html_tags)]
2972    #[doc = "True, if the connection is active"]
2973    #[allow(clippy::needless_lifetimes)]
2974    fn get_is_enabled<'a>(&'a self) -> bool;
2975    #[allow(rustdoc::invalid_html_tags)]
2976    #[doc = "True, if the connection is active"]
2977    #[allow(clippy::needless_lifetimes)]
2978    fn set_is_enabled<'a>(&'a mut self, is_enabled: bool) -> &'a mut Self;
2979}
2980#[allow(dead_code)]
2981trait TraitUserProfilePhotos {
2982    #[allow(rustdoc::invalid_html_tags)]
2983    #[doc = "Total number of profile pictures the target user has"]
2984    #[allow(clippy::needless_lifetimes)]
2985    fn get_total_count<'a>(&'a self) -> i64;
2986    #[allow(rustdoc::invalid_html_tags)]
2987    #[doc = "Total number of profile pictures the target user has"]
2988    #[allow(clippy::needless_lifetimes)]
2989    fn set_total_count<'a>(&'a mut self, total_count: i64) -> &'a mut Self;
2990    #[allow(rustdoc::invalid_html_tags)]
2991    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
2992    #[allow(clippy::needless_lifetimes)]
2993    fn get_photos<'a>(&'a self) -> &'a Vec<Vec<PhotoSize>>;
2994    #[allow(rustdoc::invalid_html_tags)]
2995    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
2996    #[allow(clippy::needless_lifetimes)]
2997    fn set_photos<'a>(&'a mut self, photos: Vec<Vec<PhotoSize>>) -> &'a mut Self;
2998}
2999#[allow(dead_code)]
3000trait TraitReactionTypePaid {
3001    #[allow(rustdoc::invalid_html_tags)]
3002    #[doc = "Type of the reaction, always \"paid\""]
3003    #[allow(clippy::needless_lifetimes)]
3004    fn get_tg_type<'a>(&'a self) -> &'a str;
3005    #[allow(rustdoc::invalid_html_tags)]
3006    #[doc = "Type of the reaction, always \"paid\""]
3007    #[allow(clippy::needless_lifetimes)]
3008    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3009}
3010#[allow(dead_code)]
3011trait TraitChatMemberBanned {
3012    #[allow(rustdoc::invalid_html_tags)]
3013    #[doc = "Information about the user"]
3014    #[allow(clippy::needless_lifetimes)]
3015    fn get_user<'a>(&'a self) -> &'a User;
3016    #[allow(rustdoc::invalid_html_tags)]
3017    #[doc = "Information about the user"]
3018    #[allow(clippy::needless_lifetimes)]
3019    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
3020    #[allow(rustdoc::invalid_html_tags)]
3021    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
3022    #[allow(clippy::needless_lifetimes)]
3023    fn get_until_date<'a>(&'a self) -> i64;
3024    #[allow(rustdoc::invalid_html_tags)]
3025    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
3026    #[allow(clippy::needless_lifetimes)]
3027    fn set_until_date<'a>(&'a mut self, until_date: i64) -> &'a mut Self;
3028}
3029#[allow(dead_code)]
3030trait TraitUsersShared {
3031    #[allow(rustdoc::invalid_html_tags)]
3032    #[doc = "Identifier of the request"]
3033    #[allow(clippy::needless_lifetimes)]
3034    fn get_request_id<'a>(&'a self) -> i64;
3035    #[allow(rustdoc::invalid_html_tags)]
3036    #[doc = "Identifier of the request"]
3037    #[allow(clippy::needless_lifetimes)]
3038    fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self;
3039    #[allow(rustdoc::invalid_html_tags)]
3040    #[doc = "Information about users shared with the bot."]
3041    #[allow(clippy::needless_lifetimes)]
3042    fn get_users<'a>(&'a self) -> &'a Vec<SharedUser>;
3043    #[allow(rustdoc::invalid_html_tags)]
3044    #[doc = "Information about users shared with the bot."]
3045    #[allow(clippy::needless_lifetimes)]
3046    fn set_users<'a>(&'a mut self, users: Vec<SharedUser>) -> &'a mut Self;
3047}
3048#[allow(dead_code)]
3049trait TraitInlineQueryResultMpeg4Gif {
3050    #[allow(rustdoc::invalid_html_tags)]
3051    #[doc = "Type of the result, must be mpeg4_gif"]
3052    #[allow(clippy::needless_lifetimes)]
3053    fn get_tg_type<'a>(&'a self) -> &'a str;
3054    #[allow(rustdoc::invalid_html_tags)]
3055    #[doc = "Type of the result, must be mpeg4_gif"]
3056    #[allow(clippy::needless_lifetimes)]
3057    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3058    #[allow(rustdoc::invalid_html_tags)]
3059    #[doc = "Unique identifier for this result, 1-64 bytes"]
3060    #[allow(clippy::needless_lifetimes)]
3061    fn get_id<'a>(&'a self) -> &'a str;
3062    #[allow(rustdoc::invalid_html_tags)]
3063    #[doc = "Unique identifier for this result, 1-64 bytes"]
3064    #[allow(clippy::needless_lifetimes)]
3065    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
3066    #[allow(rustdoc::invalid_html_tags)]
3067    #[doc = "A valid URL for the MPEG4 file"]
3068    #[allow(clippy::needless_lifetimes)]
3069    fn get_mpeg_4_url<'a>(&'a self) -> &'a str;
3070    #[allow(rustdoc::invalid_html_tags)]
3071    #[doc = "A valid URL for the MPEG4 file"]
3072    #[allow(clippy::needless_lifetimes)]
3073    fn set_mpeg_4_url<'a>(&'a mut self, mpeg_4_url: String) -> &'a mut Self;
3074    #[allow(rustdoc::invalid_html_tags)]
3075    #[doc = "Optional. Video width"]
3076    #[allow(clippy::needless_lifetimes)]
3077    fn get_mpeg_4_width<'a>(&'a self) -> Option<i64>;
3078    #[allow(rustdoc::invalid_html_tags)]
3079    #[doc = "Optional. Video width"]
3080    #[allow(clippy::needless_lifetimes)]
3081    fn set_mpeg_4_width<'a>(&'a mut self, mpeg_4_width: Option<i64>) -> &'a mut Self;
3082    #[allow(rustdoc::invalid_html_tags)]
3083    #[doc = "Optional. Video height"]
3084    #[allow(clippy::needless_lifetimes)]
3085    fn get_mpeg_4_height<'a>(&'a self) -> Option<i64>;
3086    #[allow(rustdoc::invalid_html_tags)]
3087    #[doc = "Optional. Video height"]
3088    #[allow(clippy::needless_lifetimes)]
3089    fn set_mpeg_4_height<'a>(&'a mut self, mpeg_4_height: Option<i64>) -> &'a mut Self;
3090    #[allow(rustdoc::invalid_html_tags)]
3091    #[doc = "Optional. Video duration in seconds"]
3092    #[allow(clippy::needless_lifetimes)]
3093    fn get_mpeg_4_duration<'a>(&'a self) -> Option<i64>;
3094    #[allow(rustdoc::invalid_html_tags)]
3095    #[doc = "Optional. Video duration in seconds"]
3096    #[allow(clippy::needless_lifetimes)]
3097    fn set_mpeg_4_duration<'a>(&'a mut self, mpeg_4_duration: Option<i64>) -> &'a mut Self;
3098    #[allow(rustdoc::invalid_html_tags)]
3099    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
3100    #[allow(clippy::needless_lifetimes)]
3101    fn get_thumbnail_url<'a>(&'a self) -> &'a str;
3102    #[allow(rustdoc::invalid_html_tags)]
3103    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
3104    #[allow(clippy::needless_lifetimes)]
3105    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self;
3106    #[allow(rustdoc::invalid_html_tags)]
3107    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
3108    #[allow(clippy::needless_lifetimes)]
3109    fn get_thumbnail_mime_type<'a>(&'a self) -> Option<&'a str>;
3110    #[allow(rustdoc::invalid_html_tags)]
3111    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
3112    #[allow(clippy::needless_lifetimes)]
3113    fn set_thumbnail_mime_type<'a>(
3114        &'a mut self,
3115        thumbnail_mime_type: Option<String>,
3116    ) -> &'a mut Self;
3117    #[allow(rustdoc::invalid_html_tags)]
3118    #[doc = "Optional. Title for the result"]
3119    #[allow(clippy::needless_lifetimes)]
3120    fn get_title<'a>(&'a self) -> Option<&'a str>;
3121    #[allow(rustdoc::invalid_html_tags)]
3122    #[doc = "Optional. Title for the result"]
3123    #[allow(clippy::needless_lifetimes)]
3124    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
3125    #[allow(rustdoc::invalid_html_tags)]
3126    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
3127    #[allow(clippy::needless_lifetimes)]
3128    fn get_caption<'a>(&'a self) -> Option<&'a str>;
3129    #[allow(rustdoc::invalid_html_tags)]
3130    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
3131    #[allow(clippy::needless_lifetimes)]
3132    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
3133    #[allow(rustdoc::invalid_html_tags)]
3134    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
3135    #[allow(clippy::needless_lifetimes)]
3136    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
3137    #[allow(rustdoc::invalid_html_tags)]
3138    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
3139    #[allow(clippy::needless_lifetimes)]
3140    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
3141    #[allow(rustdoc::invalid_html_tags)]
3142    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
3143    #[allow(clippy::needless_lifetimes)]
3144    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
3145    #[allow(rustdoc::invalid_html_tags)]
3146    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
3147    #[allow(clippy::needless_lifetimes)]
3148    fn set_caption_entities<'a>(
3149        &'a mut self,
3150        caption_entities: Option<Vec<MessageEntity>>,
3151    ) -> &'a mut Self;
3152    #[allow(rustdoc::invalid_html_tags)]
3153    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
3154    #[allow(clippy::needless_lifetimes)]
3155    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
3156    #[allow(rustdoc::invalid_html_tags)]
3157    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
3158    #[allow(clippy::needless_lifetimes)]
3159    fn set_show_caption_above_media<'a>(
3160        &'a mut self,
3161        show_caption_above_media: Option<bool>,
3162    ) -> &'a mut Self;
3163    #[allow(rustdoc::invalid_html_tags)]
3164    #[doc = "Optional. Inline keyboard attached to the message"]
3165    #[allow(clippy::needless_lifetimes)]
3166    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
3167    #[allow(rustdoc::invalid_html_tags)]
3168    #[doc = "Optional. Inline keyboard attached to the message"]
3169    #[allow(clippy::needless_lifetimes)]
3170    fn set_reply_markup<'a>(
3171        &'a mut self,
3172        reply_markup: Option<InlineKeyboardMarkup>,
3173    ) -> &'a mut Self;
3174    #[allow(rustdoc::invalid_html_tags)]
3175    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
3176    #[allow(clippy::needless_lifetimes)]
3177    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
3178    #[allow(rustdoc::invalid_html_tags)]
3179    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
3180    #[allow(clippy::needless_lifetimes)]
3181    fn set_input_message_content<'a>(
3182        &'a mut self,
3183        input_message_content: Option<InputMessageContent>,
3184    ) -> &'a mut Self;
3185}
3186#[allow(dead_code)]
3187trait TraitChecklistTask {
3188    #[allow(rustdoc::invalid_html_tags)]
3189    #[doc = "Unique identifier of the task"]
3190    #[allow(clippy::needless_lifetimes)]
3191    fn get_id<'a>(&'a self) -> i64;
3192    #[allow(rustdoc::invalid_html_tags)]
3193    #[doc = "Unique identifier of the task"]
3194    #[allow(clippy::needless_lifetimes)]
3195    fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self;
3196    #[allow(rustdoc::invalid_html_tags)]
3197    #[doc = "Text of the task"]
3198    #[allow(clippy::needless_lifetimes)]
3199    fn get_text<'a>(&'a self) -> &'a str;
3200    #[allow(rustdoc::invalid_html_tags)]
3201    #[doc = "Text of the task"]
3202    #[allow(clippy::needless_lifetimes)]
3203    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
3204    #[allow(rustdoc::invalid_html_tags)]
3205    #[doc = "Optional. Special entities that appear in the task text"]
3206    #[allow(clippy::needless_lifetimes)]
3207    fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
3208    #[allow(rustdoc::invalid_html_tags)]
3209    #[doc = "Optional. Special entities that appear in the task text"]
3210    #[allow(clippy::needless_lifetimes)]
3211    fn set_text_entities<'a>(
3212        &'a mut self,
3213        text_entities: Option<Vec<MessageEntity>>,
3214    ) -> &'a mut Self;
3215    #[allow(rustdoc::invalid_html_tags)]
3216    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
3217    #[allow(clippy::needless_lifetimes)]
3218    fn get_completed_by_user<'a>(&'a self) -> Option<&'a User>;
3219    #[allow(rustdoc::invalid_html_tags)]
3220    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
3221    #[allow(clippy::needless_lifetimes)]
3222    fn set_completed_by_user<'a>(&'a mut self, completed_by_user: Option<User>) -> &'a mut Self;
3223    #[allow(rustdoc::invalid_html_tags)]
3224    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
3225    #[allow(clippy::needless_lifetimes)]
3226    fn get_completion_date<'a>(&'a self) -> Option<i64>;
3227    #[allow(rustdoc::invalid_html_tags)]
3228    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
3229    #[allow(clippy::needless_lifetimes)]
3230    fn set_completion_date<'a>(&'a mut self, completion_date: Option<i64>) -> &'a mut Self;
3231}
3232#[allow(dead_code)]
3233trait TraitChecklist {
3234    #[allow(rustdoc::invalid_html_tags)]
3235    #[doc = "Title of the checklist"]
3236    #[allow(clippy::needless_lifetimes)]
3237    fn get_title<'a>(&'a self) -> &'a str;
3238    #[allow(rustdoc::invalid_html_tags)]
3239    #[doc = "Title of the checklist"]
3240    #[allow(clippy::needless_lifetimes)]
3241    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
3242    #[allow(rustdoc::invalid_html_tags)]
3243    #[doc = "Optional. Special entities that appear in the checklist title"]
3244    #[allow(clippy::needless_lifetimes)]
3245    fn get_title_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
3246    #[allow(rustdoc::invalid_html_tags)]
3247    #[doc = "Optional. Special entities that appear in the checklist title"]
3248    #[allow(clippy::needless_lifetimes)]
3249    fn set_title_entities<'a>(
3250        &'a mut self,
3251        title_entities: Option<Vec<MessageEntity>>,
3252    ) -> &'a mut Self;
3253    #[allow(rustdoc::invalid_html_tags)]
3254    #[doc = "List of tasks in the checklist"]
3255    #[allow(clippy::needless_lifetimes)]
3256    fn get_tasks<'a>(&'a self) -> &'a Vec<ChecklistTask>;
3257    #[allow(rustdoc::invalid_html_tags)]
3258    #[doc = "List of tasks in the checklist"]
3259    #[allow(clippy::needless_lifetimes)]
3260    fn set_tasks<'a>(&'a mut self, tasks: Vec<ChecklistTask>) -> &'a mut Self;
3261    #[allow(rustdoc::invalid_html_tags)]
3262    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
3263    #[allow(clippy::needless_lifetimes)]
3264    fn get_others_can_add_tasks<'a>(&'a self) -> Option<bool>;
3265    #[allow(rustdoc::invalid_html_tags)]
3266    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
3267    #[allow(clippy::needless_lifetimes)]
3268    fn set_others_can_add_tasks<'a>(
3269        &'a mut self,
3270        others_can_add_tasks: Option<bool>,
3271    ) -> &'a mut Self;
3272    #[allow(rustdoc::invalid_html_tags)]
3273    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
3274    #[allow(clippy::needless_lifetimes)]
3275    fn get_others_can_mark_tasks_as_done<'a>(&'a self) -> Option<bool>;
3276    #[allow(rustdoc::invalid_html_tags)]
3277    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
3278    #[allow(clippy::needless_lifetimes)]
3279    fn set_others_can_mark_tasks_as_done<'a>(
3280        &'a mut self,
3281        others_can_mark_tasks_as_done: Option<bool>,
3282    ) -> &'a mut Self;
3283}
3284#[allow(dead_code)]
3285trait TraitBackgroundFillFreeformGradient {
3286    #[allow(rustdoc::invalid_html_tags)]
3287    #[doc = "Type of the background fill, always \"freeform_gradient\""]
3288    #[allow(clippy::needless_lifetimes)]
3289    fn get_tg_type<'a>(&'a self) -> &'a str;
3290    #[allow(rustdoc::invalid_html_tags)]
3291    #[doc = "Type of the background fill, always \"freeform_gradient\""]
3292    #[allow(clippy::needless_lifetimes)]
3293    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3294    #[allow(rustdoc::invalid_html_tags)]
3295    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
3296    #[allow(clippy::needless_lifetimes)]
3297    fn get_colors<'a>(&'a self) -> &'a Vec<i64>;
3298    #[allow(rustdoc::invalid_html_tags)]
3299    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
3300    #[allow(clippy::needless_lifetimes)]
3301    fn set_colors<'a>(&'a mut self, colors: Vec<i64>) -> &'a mut Self;
3302}
3303#[allow(dead_code)]
3304trait TraitOwnedGiftUnique {
3305    #[allow(rustdoc::invalid_html_tags)]
3306    #[doc = "Type of the gift, always \"unique\""]
3307    #[allow(clippy::needless_lifetimes)]
3308    fn get_tg_type<'a>(&'a self) -> &'a str;
3309    #[allow(rustdoc::invalid_html_tags)]
3310    #[doc = "Type of the gift, always \"unique\""]
3311    #[allow(clippy::needless_lifetimes)]
3312    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3313    #[allow(rustdoc::invalid_html_tags)]
3314    #[doc = "Information about the unique gift"]
3315    #[allow(clippy::needless_lifetimes)]
3316    fn get_gift<'a>(&'a self) -> &'a UniqueGift;
3317    #[allow(rustdoc::invalid_html_tags)]
3318    #[doc = "Information about the unique gift"]
3319    #[allow(clippy::needless_lifetimes)]
3320    fn set_gift<'a>(&'a mut self, gift: UniqueGift) -> &'a mut Self;
3321    #[allow(rustdoc::invalid_html_tags)]
3322    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
3323    #[allow(clippy::needless_lifetimes)]
3324    fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str>;
3325    #[allow(rustdoc::invalid_html_tags)]
3326    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
3327    #[allow(clippy::needless_lifetimes)]
3328    fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self;
3329    #[allow(rustdoc::invalid_html_tags)]
3330    #[doc = "Optional. Sender of the gift if it is a known user"]
3331    #[allow(clippy::needless_lifetimes)]
3332    fn get_sender_user<'a>(&'a self) -> Option<&'a User>;
3333    #[allow(rustdoc::invalid_html_tags)]
3334    #[doc = "Optional. Sender of the gift if it is a known user"]
3335    #[allow(clippy::needless_lifetimes)]
3336    fn set_sender_user<'a>(&'a mut self, sender_user: Option<User>) -> &'a mut Self;
3337    #[allow(rustdoc::invalid_html_tags)]
3338    #[doc = "Date the gift was sent in Unix time"]
3339    #[allow(clippy::needless_lifetimes)]
3340    fn get_send_date<'a>(&'a self) -> i64;
3341    #[allow(rustdoc::invalid_html_tags)]
3342    #[doc = "Date the gift was sent in Unix time"]
3343    #[allow(clippy::needless_lifetimes)]
3344    fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self;
3345    #[allow(rustdoc::invalid_html_tags)]
3346    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
3347    #[allow(clippy::needless_lifetimes)]
3348    fn get_is_saved<'a>(&'a self) -> Option<bool>;
3349    #[allow(rustdoc::invalid_html_tags)]
3350    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
3351    #[allow(clippy::needless_lifetimes)]
3352    fn set_is_saved<'a>(&'a mut self, is_saved: Option<bool>) -> &'a mut Self;
3353    #[allow(rustdoc::invalid_html_tags)]
3354    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
3355    #[allow(clippy::needless_lifetimes)]
3356    fn get_can_be_transferred<'a>(&'a self) -> Option<bool>;
3357    #[allow(rustdoc::invalid_html_tags)]
3358    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
3359    #[allow(clippy::needless_lifetimes)]
3360    fn set_can_be_transferred<'a>(&'a mut self, can_be_transferred: Option<bool>) -> &'a mut Self;
3361    #[allow(rustdoc::invalid_html_tags)]
3362    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
3363    #[allow(clippy::needless_lifetimes)]
3364    fn get_transfer_star_count<'a>(&'a self) -> Option<i64>;
3365    #[allow(rustdoc::invalid_html_tags)]
3366    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
3367    #[allow(clippy::needless_lifetimes)]
3368    fn set_transfer_star_count<'a>(&'a mut self, transfer_star_count: Option<i64>) -> &'a mut Self;
3369    #[allow(rustdoc::invalid_html_tags)]
3370    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
3371    #[allow(clippy::needless_lifetimes)]
3372    fn get_next_transfer_date<'a>(&'a self) -> Option<i64>;
3373    #[allow(rustdoc::invalid_html_tags)]
3374    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
3375    #[allow(clippy::needless_lifetimes)]
3376    fn set_next_transfer_date<'a>(&'a mut self, next_transfer_date: Option<i64>) -> &'a mut Self;
3377}
3378#[allow(dead_code)]
3379trait TraitPaidMediaPreview {
3380    #[allow(rustdoc::invalid_html_tags)]
3381    #[doc = "Type of the paid media, always \"preview\""]
3382    #[allow(clippy::needless_lifetimes)]
3383    fn get_tg_type<'a>(&'a self) -> &'a str;
3384    #[allow(rustdoc::invalid_html_tags)]
3385    #[doc = "Type of the paid media, always \"preview\""]
3386    #[allow(clippy::needless_lifetimes)]
3387    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3388    #[allow(rustdoc::invalid_html_tags)]
3389    #[doc = "Optional. Media width as defined by the sender"]
3390    #[allow(clippy::needless_lifetimes)]
3391    fn get_width<'a>(&'a self) -> Option<i64>;
3392    #[allow(rustdoc::invalid_html_tags)]
3393    #[doc = "Optional. Media width as defined by the sender"]
3394    #[allow(clippy::needless_lifetimes)]
3395    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self;
3396    #[allow(rustdoc::invalid_html_tags)]
3397    #[doc = "Optional. Media height as defined by the sender"]
3398    #[allow(clippy::needless_lifetimes)]
3399    fn get_height<'a>(&'a self) -> Option<i64>;
3400    #[allow(rustdoc::invalid_html_tags)]
3401    #[doc = "Optional. Media height as defined by the sender"]
3402    #[allow(clippy::needless_lifetimes)]
3403    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self;
3404    #[allow(rustdoc::invalid_html_tags)]
3405    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
3406    #[allow(clippy::needless_lifetimes)]
3407    fn get_duration<'a>(&'a self) -> Option<i64>;
3408    #[allow(rustdoc::invalid_html_tags)]
3409    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
3410    #[allow(clippy::needless_lifetimes)]
3411    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self;
3412}
3413#[allow(dead_code)]
3414trait TraitInputTextMessageContent {
3415    #[allow(rustdoc::invalid_html_tags)]
3416    #[doc = "Text of the message to be sent, 1-4096 characters"]
3417    #[allow(clippy::needless_lifetimes)]
3418    fn get_message_text<'a>(&'a self) -> &'a str;
3419    #[allow(rustdoc::invalid_html_tags)]
3420    #[doc = "Text of the message to be sent, 1-4096 characters"]
3421    #[allow(clippy::needless_lifetimes)]
3422    fn set_message_text<'a>(&'a mut self, message_text: String) -> &'a mut Self;
3423    #[allow(rustdoc::invalid_html_tags)]
3424    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
3425    #[allow(clippy::needless_lifetimes)]
3426    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
3427    #[allow(rustdoc::invalid_html_tags)]
3428    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
3429    #[allow(clippy::needless_lifetimes)]
3430    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
3431    #[allow(rustdoc::invalid_html_tags)]
3432    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
3433    #[allow(clippy::needless_lifetimes)]
3434    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
3435    #[allow(rustdoc::invalid_html_tags)]
3436    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
3437    #[allow(clippy::needless_lifetimes)]
3438    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self;
3439    #[allow(rustdoc::invalid_html_tags)]
3440    #[doc = "Optional. Link preview generation options for the message"]
3441    #[allow(clippy::needless_lifetimes)]
3442    fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions>;
3443    #[allow(rustdoc::invalid_html_tags)]
3444    #[doc = "Optional. Link preview generation options for the message"]
3445    #[allow(clippy::needless_lifetimes)]
3446    fn set_link_preview_options<'a>(
3447        &'a mut self,
3448        link_preview_options: Option<LinkPreviewOptions>,
3449    ) -> &'a mut Self;
3450}
3451#[allow(dead_code)]
3452trait TraitBotCommandScopeAllPrivateChats {
3453    #[allow(rustdoc::invalid_html_tags)]
3454    #[doc = "Scope type, must be all_private_chats"]
3455    #[allow(clippy::needless_lifetimes)]
3456    fn get_tg_type<'a>(&'a self) -> &'a str;
3457    #[allow(rustdoc::invalid_html_tags)]
3458    #[doc = "Scope type, must be all_private_chats"]
3459    #[allow(clippy::needless_lifetimes)]
3460    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3461}
3462#[allow(dead_code)]
3463trait TraitInlineQueryResult:
3464    TraitInlineQueryResultCachedAudio
3465    + TraitInlineQueryResultCachedDocument
3466    + TraitInlineQueryResultCachedGif
3467    + TraitInlineQueryResultCachedMpeg4Gif
3468    + TraitInlineQueryResultCachedPhoto
3469    + TraitInlineQueryResultCachedSticker
3470    + TraitInlineQueryResultCachedVideo
3471    + TraitInlineQueryResultCachedVoice
3472    + TraitInlineQueryResultArticle
3473    + TraitInlineQueryResultAudio
3474    + TraitInlineQueryResultContact
3475    + TraitInlineQueryResultGame
3476    + TraitInlineQueryResultDocument
3477    + TraitInlineQueryResultGif
3478    + TraitInlineQueryResultLocation
3479    + TraitInlineQueryResultMpeg4Gif
3480    + TraitInlineQueryResultPhoto
3481    + TraitInlineQueryResultVenue
3482    + TraitInlineQueryResultVideo
3483    + TraitInlineQueryResultVoice
3484{
3485}
3486#[allow(dead_code)]
3487trait TraitVoice {
3488    #[allow(rustdoc::invalid_html_tags)]
3489    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
3490    #[allow(clippy::needless_lifetimes)]
3491    fn get_file_id<'a>(&'a self) -> &'a str;
3492    #[allow(rustdoc::invalid_html_tags)]
3493    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
3494    #[allow(clippy::needless_lifetimes)]
3495    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
3496    #[allow(rustdoc::invalid_html_tags)]
3497    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
3498    #[allow(clippy::needless_lifetimes)]
3499    fn get_file_unique_id<'a>(&'a self) -> &'a str;
3500    #[allow(rustdoc::invalid_html_tags)]
3501    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
3502    #[allow(clippy::needless_lifetimes)]
3503    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
3504    #[allow(rustdoc::invalid_html_tags)]
3505    #[doc = "Duration of the audio in seconds as defined by the sender"]
3506    #[allow(clippy::needless_lifetimes)]
3507    fn get_duration<'a>(&'a self) -> i64;
3508    #[allow(rustdoc::invalid_html_tags)]
3509    #[doc = "Duration of the audio in seconds as defined by the sender"]
3510    #[allow(clippy::needless_lifetimes)]
3511    fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self;
3512    #[allow(rustdoc::invalid_html_tags)]
3513    #[doc = "Optional. MIME type of the file as defined by the sender"]
3514    #[allow(clippy::needless_lifetimes)]
3515    fn get_mime_type<'a>(&'a self) -> Option<&'a str>;
3516    #[allow(rustdoc::invalid_html_tags)]
3517    #[doc = "Optional. MIME type of the file as defined by the sender"]
3518    #[allow(clippy::needless_lifetimes)]
3519    fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self;
3520    #[allow(rustdoc::invalid_html_tags)]
3521    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
3522    #[allow(clippy::needless_lifetimes)]
3523    fn get_file_size<'a>(&'a self) -> Option<i64>;
3524    #[allow(rustdoc::invalid_html_tags)]
3525    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
3526    #[allow(clippy::needless_lifetimes)]
3527    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
3528}
3529#[allow(dead_code)]
3530trait TraitKeyboardButtonRequestUsers {
3531    #[allow(rustdoc::invalid_html_tags)]
3532    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
3533    #[allow(clippy::needless_lifetimes)]
3534    fn get_request_id<'a>(&'a self) -> i64;
3535    #[allow(rustdoc::invalid_html_tags)]
3536    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
3537    #[allow(clippy::needless_lifetimes)]
3538    fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self;
3539    #[allow(rustdoc::invalid_html_tags)]
3540    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
3541    #[allow(clippy::needless_lifetimes)]
3542    fn get_user_is_bot<'a>(&'a self) -> Option<bool>;
3543    #[allow(rustdoc::invalid_html_tags)]
3544    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
3545    #[allow(clippy::needless_lifetimes)]
3546    fn set_user_is_bot<'a>(&'a mut self, user_is_bot: Option<bool>) -> &'a mut Self;
3547    #[allow(rustdoc::invalid_html_tags)]
3548    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
3549    #[allow(clippy::needless_lifetimes)]
3550    fn get_user_is_premium<'a>(&'a self) -> Option<bool>;
3551    #[allow(rustdoc::invalid_html_tags)]
3552    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
3553    #[allow(clippy::needless_lifetimes)]
3554    fn set_user_is_premium<'a>(&'a mut self, user_is_premium: Option<bool>) -> &'a mut Self;
3555    #[allow(rustdoc::invalid_html_tags)]
3556    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
3557    #[allow(clippy::needless_lifetimes)]
3558    fn get_max_quantity<'a>(&'a self) -> Option<i64>;
3559    #[allow(rustdoc::invalid_html_tags)]
3560    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
3561    #[allow(clippy::needless_lifetimes)]
3562    fn set_max_quantity<'a>(&'a mut self, max_quantity: Option<i64>) -> &'a mut Self;
3563    #[allow(rustdoc::invalid_html_tags)]
3564    #[doc = "Optional. Pass True to request the users' first and last names"]
3565    #[allow(clippy::needless_lifetimes)]
3566    fn get_request_name<'a>(&'a self) -> Option<bool>;
3567    #[allow(rustdoc::invalid_html_tags)]
3568    #[doc = "Optional. Pass True to request the users' first and last names"]
3569    #[allow(clippy::needless_lifetimes)]
3570    fn set_request_name<'a>(&'a mut self, request_name: Option<bool>) -> &'a mut Self;
3571    #[allow(rustdoc::invalid_html_tags)]
3572    #[doc = "Optional. Pass True to request the users' usernames"]
3573    #[allow(clippy::needless_lifetimes)]
3574    fn get_request_username<'a>(&'a self) -> Option<bool>;
3575    #[allow(rustdoc::invalid_html_tags)]
3576    #[doc = "Optional. Pass True to request the users' usernames"]
3577    #[allow(clippy::needless_lifetimes)]
3578    fn set_request_username<'a>(&'a mut self, request_username: Option<bool>) -> &'a mut Self;
3579    #[allow(rustdoc::invalid_html_tags)]
3580    #[doc = "Optional. Pass True to request the users' photos"]
3581    #[allow(clippy::needless_lifetimes)]
3582    fn get_request_photo<'a>(&'a self) -> Option<bool>;
3583    #[allow(rustdoc::invalid_html_tags)]
3584    #[doc = "Optional. Pass True to request the users' photos"]
3585    #[allow(clippy::needless_lifetimes)]
3586    fn set_request_photo<'a>(&'a mut self, request_photo: Option<bool>) -> &'a mut Self;
3587}
3588#[allow(dead_code)]
3589trait TraitInlineQueryResultLocation {
3590    #[allow(rustdoc::invalid_html_tags)]
3591    #[doc = "Type of the result, must be location"]
3592    #[allow(clippy::needless_lifetimes)]
3593    fn get_tg_type<'a>(&'a self) -> &'a str;
3594    #[allow(rustdoc::invalid_html_tags)]
3595    #[doc = "Type of the result, must be location"]
3596    #[allow(clippy::needless_lifetimes)]
3597    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3598    #[allow(rustdoc::invalid_html_tags)]
3599    #[doc = "Unique identifier for this result, 1-64 Bytes"]
3600    #[allow(clippy::needless_lifetimes)]
3601    fn get_id<'a>(&'a self) -> &'a str;
3602    #[allow(rustdoc::invalid_html_tags)]
3603    #[doc = "Unique identifier for this result, 1-64 Bytes"]
3604    #[allow(clippy::needless_lifetimes)]
3605    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
3606    #[allow(rustdoc::invalid_html_tags)]
3607    #[doc = "Location latitude in degrees"]
3608    #[allow(clippy::needless_lifetimes)]
3609    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
3610    #[allow(rustdoc::invalid_html_tags)]
3611    #[doc = "Location latitude in degrees"]
3612    #[allow(clippy::needless_lifetimes)]
3613    fn set_latitude<'a>(&'a mut self, latitude: ::ordered_float::OrderedFloat<f64>)
3614        -> &'a mut Self;
3615    #[allow(rustdoc::invalid_html_tags)]
3616    #[doc = "Location longitude in degrees"]
3617    #[allow(clippy::needless_lifetimes)]
3618    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
3619    #[allow(rustdoc::invalid_html_tags)]
3620    #[doc = "Location longitude in degrees"]
3621    #[allow(clippy::needless_lifetimes)]
3622    fn set_longitude<'a>(
3623        &'a mut self,
3624        longitude: ::ordered_float::OrderedFloat<f64>,
3625    ) -> &'a mut Self;
3626    #[allow(rustdoc::invalid_html_tags)]
3627    #[doc = "Location title"]
3628    #[allow(clippy::needless_lifetimes)]
3629    fn get_title<'a>(&'a self) -> &'a str;
3630    #[allow(rustdoc::invalid_html_tags)]
3631    #[doc = "Location title"]
3632    #[allow(clippy::needless_lifetimes)]
3633    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
3634    #[allow(rustdoc::invalid_html_tags)]
3635    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
3636    #[allow(clippy::needless_lifetimes)]
3637    fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>>;
3638    #[allow(rustdoc::invalid_html_tags)]
3639    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
3640    #[allow(clippy::needless_lifetimes)]
3641    fn set_horizontal_accuracy<'a>(
3642        &'a mut self,
3643        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
3644    ) -> &'a mut Self;
3645    #[allow(rustdoc::invalid_html_tags)]
3646    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
3647    #[allow(clippy::needless_lifetimes)]
3648    fn get_live_period<'a>(&'a self) -> Option<i64>;
3649    #[allow(rustdoc::invalid_html_tags)]
3650    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
3651    #[allow(clippy::needless_lifetimes)]
3652    fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self;
3653    #[allow(rustdoc::invalid_html_tags)]
3654    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
3655    #[allow(clippy::needless_lifetimes)]
3656    fn get_heading<'a>(&'a self) -> Option<i64>;
3657    #[allow(rustdoc::invalid_html_tags)]
3658    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
3659    #[allow(clippy::needless_lifetimes)]
3660    fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self;
3661    #[allow(rustdoc::invalid_html_tags)]
3662    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
3663    #[allow(clippy::needless_lifetimes)]
3664    fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64>;
3665    #[allow(rustdoc::invalid_html_tags)]
3666    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
3667    #[allow(clippy::needless_lifetimes)]
3668    fn set_proximity_alert_radius<'a>(
3669        &'a mut self,
3670        proximity_alert_radius: Option<i64>,
3671    ) -> &'a mut Self;
3672    #[allow(rustdoc::invalid_html_tags)]
3673    #[doc = "Optional. Inline keyboard attached to the message"]
3674    #[allow(clippy::needless_lifetimes)]
3675    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
3676    #[allow(rustdoc::invalid_html_tags)]
3677    #[doc = "Optional. Inline keyboard attached to the message"]
3678    #[allow(clippy::needless_lifetimes)]
3679    fn set_reply_markup<'a>(
3680        &'a mut self,
3681        reply_markup: Option<InlineKeyboardMarkup>,
3682    ) -> &'a mut Self;
3683    #[allow(rustdoc::invalid_html_tags)]
3684    #[doc = "Optional. Content of the message to be sent instead of the location"]
3685    #[allow(clippy::needless_lifetimes)]
3686    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
3687    #[allow(rustdoc::invalid_html_tags)]
3688    #[doc = "Optional. Content of the message to be sent instead of the location"]
3689    #[allow(clippy::needless_lifetimes)]
3690    fn set_input_message_content<'a>(
3691        &'a mut self,
3692        input_message_content: Option<InputMessageContent>,
3693    ) -> &'a mut Self;
3694    #[allow(rustdoc::invalid_html_tags)]
3695    #[doc = "Optional. Url of the thumbnail for the result"]
3696    #[allow(clippy::needless_lifetimes)]
3697    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str>;
3698    #[allow(rustdoc::invalid_html_tags)]
3699    #[doc = "Optional. Url of the thumbnail for the result"]
3700    #[allow(clippy::needless_lifetimes)]
3701    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self;
3702    #[allow(rustdoc::invalid_html_tags)]
3703    #[doc = "Optional. Thumbnail width"]
3704    #[allow(clippy::needless_lifetimes)]
3705    fn get_thumbnail_width<'a>(&'a self) -> Option<i64>;
3706    #[allow(rustdoc::invalid_html_tags)]
3707    #[doc = "Optional. Thumbnail width"]
3708    #[allow(clippy::needless_lifetimes)]
3709    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self;
3710    #[allow(rustdoc::invalid_html_tags)]
3711    #[doc = "Optional. Thumbnail height"]
3712    #[allow(clippy::needless_lifetimes)]
3713    fn get_thumbnail_height<'a>(&'a self) -> Option<i64>;
3714    #[allow(rustdoc::invalid_html_tags)]
3715    #[doc = "Optional. Thumbnail height"]
3716    #[allow(clippy::needless_lifetimes)]
3717    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self;
3718}
3719#[allow(dead_code)]
3720trait TraitKeyboardButtonPollType {
3721    #[allow(rustdoc::invalid_html_tags)]
3722    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
3723    #[allow(clippy::needless_lifetimes)]
3724    fn get_tg_type<'a>(&'a self) -> Option<&'a str>;
3725    #[allow(rustdoc::invalid_html_tags)]
3726    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
3727    #[allow(clippy::needless_lifetimes)]
3728    fn set_tg_type<'a>(&'a mut self, tg_type: Option<String>) -> &'a mut Self;
3729}
3730#[allow(dead_code)]
3731trait TraitWebAppData {
3732    #[allow(rustdoc::invalid_html_tags)]
3733    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
3734    #[allow(clippy::needless_lifetimes)]
3735    fn get_data<'a>(&'a self) -> &'a str;
3736    #[allow(rustdoc::invalid_html_tags)]
3737    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
3738    #[allow(clippy::needless_lifetimes)]
3739    fn set_data<'a>(&'a mut self, data: String) -> &'a mut Self;
3740    #[allow(rustdoc::invalid_html_tags)]
3741    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
3742    #[allow(clippy::needless_lifetimes)]
3743    fn get_button_text<'a>(&'a self) -> &'a str;
3744    #[allow(rustdoc::invalid_html_tags)]
3745    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
3746    #[allow(clippy::needless_lifetimes)]
3747    fn set_button_text<'a>(&'a mut self, button_text: String) -> &'a mut Self;
3748}
3749#[allow(dead_code)]
3750trait TraitForumTopicReopened {}
3751#[allow(dead_code)]
3752trait TraitInlineQueryResultCachedDocument {
3753    #[allow(rustdoc::invalid_html_tags)]
3754    #[doc = "Type of the result, must be document"]
3755    #[allow(clippy::needless_lifetimes)]
3756    fn get_tg_type<'a>(&'a self) -> &'a str;
3757    #[allow(rustdoc::invalid_html_tags)]
3758    #[doc = "Type of the result, must be document"]
3759    #[allow(clippy::needless_lifetimes)]
3760    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3761    #[allow(rustdoc::invalid_html_tags)]
3762    #[doc = "Unique identifier for this result, 1-64 bytes"]
3763    #[allow(clippy::needless_lifetimes)]
3764    fn get_id<'a>(&'a self) -> &'a str;
3765    #[allow(rustdoc::invalid_html_tags)]
3766    #[doc = "Unique identifier for this result, 1-64 bytes"]
3767    #[allow(clippy::needless_lifetimes)]
3768    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
3769    #[allow(rustdoc::invalid_html_tags)]
3770    #[doc = "Title for the result"]
3771    #[allow(clippy::needless_lifetimes)]
3772    fn get_title<'a>(&'a self) -> &'a str;
3773    #[allow(rustdoc::invalid_html_tags)]
3774    #[doc = "Title for the result"]
3775    #[allow(clippy::needless_lifetimes)]
3776    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
3777    #[allow(rustdoc::invalid_html_tags)]
3778    #[doc = "A valid file identifier for the file"]
3779    #[allow(clippy::needless_lifetimes)]
3780    fn get_document_file_id<'a>(&'a self) -> &'a str;
3781    #[allow(rustdoc::invalid_html_tags)]
3782    #[doc = "A valid file identifier for the file"]
3783    #[allow(clippy::needless_lifetimes)]
3784    fn set_document_file_id<'a>(&'a mut self, document_file_id: String) -> &'a mut Self;
3785    #[allow(rustdoc::invalid_html_tags)]
3786    #[doc = "Optional. Short description of the result"]
3787    #[allow(clippy::needless_lifetimes)]
3788    fn get_description<'a>(&'a self) -> Option<&'a str>;
3789    #[allow(rustdoc::invalid_html_tags)]
3790    #[doc = "Optional. Short description of the result"]
3791    #[allow(clippy::needless_lifetimes)]
3792    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
3793    #[allow(rustdoc::invalid_html_tags)]
3794    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
3795    #[allow(clippy::needless_lifetimes)]
3796    fn get_caption<'a>(&'a self) -> Option<&'a str>;
3797    #[allow(rustdoc::invalid_html_tags)]
3798    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
3799    #[allow(clippy::needless_lifetimes)]
3800    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
3801    #[allow(rustdoc::invalid_html_tags)]
3802    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
3803    #[allow(clippy::needless_lifetimes)]
3804    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
3805    #[allow(rustdoc::invalid_html_tags)]
3806    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
3807    #[allow(clippy::needless_lifetimes)]
3808    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
3809    #[allow(rustdoc::invalid_html_tags)]
3810    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
3811    #[allow(clippy::needless_lifetimes)]
3812    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
3813    #[allow(rustdoc::invalid_html_tags)]
3814    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
3815    #[allow(clippy::needless_lifetimes)]
3816    fn set_caption_entities<'a>(
3817        &'a mut self,
3818        caption_entities: Option<Vec<MessageEntity>>,
3819    ) -> &'a mut Self;
3820    #[allow(rustdoc::invalid_html_tags)]
3821    #[doc = "Optional. Inline keyboard attached to the message"]
3822    #[allow(clippy::needless_lifetimes)]
3823    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
3824    #[allow(rustdoc::invalid_html_tags)]
3825    #[doc = "Optional. Inline keyboard attached to the message"]
3826    #[allow(clippy::needless_lifetimes)]
3827    fn set_reply_markup<'a>(
3828        &'a mut self,
3829        reply_markup: Option<InlineKeyboardMarkup>,
3830    ) -> &'a mut Self;
3831    #[allow(rustdoc::invalid_html_tags)]
3832    #[doc = "Optional. Content of the message to be sent instead of the file"]
3833    #[allow(clippy::needless_lifetimes)]
3834    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
3835    #[allow(rustdoc::invalid_html_tags)]
3836    #[doc = "Optional. Content of the message to be sent instead of the file"]
3837    #[allow(clippy::needless_lifetimes)]
3838    fn set_input_message_content<'a>(
3839        &'a mut self,
3840        input_message_content: Option<InputMessageContent>,
3841    ) -> &'a mut Self;
3842}
3843#[allow(dead_code)]
3844trait TraitInlineQueryResultVoice {
3845    #[allow(rustdoc::invalid_html_tags)]
3846    #[doc = "Type of the result, must be voice"]
3847    #[allow(clippy::needless_lifetimes)]
3848    fn get_tg_type<'a>(&'a self) -> &'a str;
3849    #[allow(rustdoc::invalid_html_tags)]
3850    #[doc = "Type of the result, must be voice"]
3851    #[allow(clippy::needless_lifetimes)]
3852    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3853    #[allow(rustdoc::invalid_html_tags)]
3854    #[doc = "Unique identifier for this result, 1-64 bytes"]
3855    #[allow(clippy::needless_lifetimes)]
3856    fn get_id<'a>(&'a self) -> &'a str;
3857    #[allow(rustdoc::invalid_html_tags)]
3858    #[doc = "Unique identifier for this result, 1-64 bytes"]
3859    #[allow(clippy::needless_lifetimes)]
3860    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
3861    #[allow(rustdoc::invalid_html_tags)]
3862    #[doc = "A valid URL for the voice recording"]
3863    #[allow(clippy::needless_lifetimes)]
3864    fn get_voice_url<'a>(&'a self) -> &'a str;
3865    #[allow(rustdoc::invalid_html_tags)]
3866    #[doc = "A valid URL for the voice recording"]
3867    #[allow(clippy::needless_lifetimes)]
3868    fn set_voice_url<'a>(&'a mut self, voice_url: String) -> &'a mut Self;
3869    #[allow(rustdoc::invalid_html_tags)]
3870    #[doc = "Recording title"]
3871    #[allow(clippy::needless_lifetimes)]
3872    fn get_title<'a>(&'a self) -> &'a str;
3873    #[allow(rustdoc::invalid_html_tags)]
3874    #[doc = "Recording title"]
3875    #[allow(clippy::needless_lifetimes)]
3876    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
3877    #[allow(rustdoc::invalid_html_tags)]
3878    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
3879    #[allow(clippy::needless_lifetimes)]
3880    fn get_caption<'a>(&'a self) -> Option<&'a str>;
3881    #[allow(rustdoc::invalid_html_tags)]
3882    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
3883    #[allow(clippy::needless_lifetimes)]
3884    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
3885    #[allow(rustdoc::invalid_html_tags)]
3886    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
3887    #[allow(clippy::needless_lifetimes)]
3888    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
3889    #[allow(rustdoc::invalid_html_tags)]
3890    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
3891    #[allow(clippy::needless_lifetimes)]
3892    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
3893    #[allow(rustdoc::invalid_html_tags)]
3894    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
3895    #[allow(clippy::needless_lifetimes)]
3896    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
3897    #[allow(rustdoc::invalid_html_tags)]
3898    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
3899    #[allow(clippy::needless_lifetimes)]
3900    fn set_caption_entities<'a>(
3901        &'a mut self,
3902        caption_entities: Option<Vec<MessageEntity>>,
3903    ) -> &'a mut Self;
3904    #[allow(rustdoc::invalid_html_tags)]
3905    #[doc = "Optional. Recording duration in seconds"]
3906    #[allow(clippy::needless_lifetimes)]
3907    fn get_voice_duration<'a>(&'a self) -> Option<i64>;
3908    #[allow(rustdoc::invalid_html_tags)]
3909    #[doc = "Optional. Recording duration in seconds"]
3910    #[allow(clippy::needless_lifetimes)]
3911    fn set_voice_duration<'a>(&'a mut self, voice_duration: Option<i64>) -> &'a mut Self;
3912    #[allow(rustdoc::invalid_html_tags)]
3913    #[doc = "Optional. Inline keyboard attached to the message"]
3914    #[allow(clippy::needless_lifetimes)]
3915    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
3916    #[allow(rustdoc::invalid_html_tags)]
3917    #[doc = "Optional. Inline keyboard attached to the message"]
3918    #[allow(clippy::needless_lifetimes)]
3919    fn set_reply_markup<'a>(
3920        &'a mut self,
3921        reply_markup: Option<InlineKeyboardMarkup>,
3922    ) -> &'a mut Self;
3923    #[allow(rustdoc::invalid_html_tags)]
3924    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
3925    #[allow(clippy::needless_lifetimes)]
3926    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
3927    #[allow(rustdoc::invalid_html_tags)]
3928    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
3929    #[allow(clippy::needless_lifetimes)]
3930    fn set_input_message_content<'a>(
3931        &'a mut self,
3932        input_message_content: Option<InputMessageContent>,
3933    ) -> &'a mut Self;
3934}
3935#[allow(dead_code)]
3936trait TraitUniqueGiftBackdrop {
3937    #[allow(rustdoc::invalid_html_tags)]
3938    #[doc = "Name of the backdrop"]
3939    #[allow(clippy::needless_lifetimes)]
3940    fn get_name<'a>(&'a self) -> &'a str;
3941    #[allow(rustdoc::invalid_html_tags)]
3942    #[doc = "Name of the backdrop"]
3943    #[allow(clippy::needless_lifetimes)]
3944    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
3945    #[allow(rustdoc::invalid_html_tags)]
3946    #[doc = "Colors of the backdrop"]
3947    #[allow(clippy::needless_lifetimes)]
3948    fn get_colors<'a>(&'a self) -> &'a UniqueGiftBackdropColors;
3949    #[allow(rustdoc::invalid_html_tags)]
3950    #[doc = "Colors of the backdrop"]
3951    #[allow(clippy::needless_lifetimes)]
3952    fn set_colors<'a>(&'a mut self, colors: UniqueGiftBackdropColors) -> &'a mut Self;
3953    #[allow(rustdoc::invalid_html_tags)]
3954    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
3955    #[allow(clippy::needless_lifetimes)]
3956    fn get_rarity_per_mille<'a>(&'a self) -> i64;
3957    #[allow(rustdoc::invalid_html_tags)]
3958    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
3959    #[allow(clippy::needless_lifetimes)]
3960    fn set_rarity_per_mille<'a>(&'a mut self, rarity_per_mille: i64) -> &'a mut Self;
3961}
3962#[allow(dead_code)]
3963trait TraitStoryAreaTypeWeather {
3964    #[allow(rustdoc::invalid_html_tags)]
3965    #[doc = "Type of the area, always \"weather\""]
3966    #[allow(clippy::needless_lifetimes)]
3967    fn get_tg_type<'a>(&'a self) -> &'a str;
3968    #[allow(rustdoc::invalid_html_tags)]
3969    #[doc = "Type of the area, always \"weather\""]
3970    #[allow(clippy::needless_lifetimes)]
3971    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
3972    #[allow(rustdoc::invalid_html_tags)]
3973    #[doc = "Temperature, in degree Celsius"]
3974    #[allow(clippy::needless_lifetimes)]
3975    fn get_temperature<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
3976    #[allow(rustdoc::invalid_html_tags)]
3977    #[doc = "Temperature, in degree Celsius"]
3978    #[allow(clippy::needless_lifetimes)]
3979    fn set_temperature<'a>(
3980        &'a mut self,
3981        temperature: ::ordered_float::OrderedFloat<f64>,
3982    ) -> &'a mut Self;
3983    #[allow(rustdoc::invalid_html_tags)]
3984    #[doc = "Emoji representing the weather"]
3985    #[allow(clippy::needless_lifetimes)]
3986    fn get_emoji<'a>(&'a self) -> &'a str;
3987    #[allow(rustdoc::invalid_html_tags)]
3988    #[doc = "Emoji representing the weather"]
3989    #[allow(clippy::needless_lifetimes)]
3990    fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self;
3991    #[allow(rustdoc::invalid_html_tags)]
3992    #[doc = "A color of the area background in the ARGB format"]
3993    #[allow(clippy::needless_lifetimes)]
3994    fn get_background_color<'a>(&'a self) -> i64;
3995    #[allow(rustdoc::invalid_html_tags)]
3996    #[doc = "A color of the area background in the ARGB format"]
3997    #[allow(clippy::needless_lifetimes)]
3998    fn set_background_color<'a>(&'a mut self, background_color: i64) -> &'a mut Self;
3999}
4000#[allow(dead_code)]
4001trait TraitUniqueGiftModel {
4002    #[allow(rustdoc::invalid_html_tags)]
4003    #[doc = "Name of the model"]
4004    #[allow(clippy::needless_lifetimes)]
4005    fn get_name<'a>(&'a self) -> &'a str;
4006    #[allow(rustdoc::invalid_html_tags)]
4007    #[doc = "Name of the model"]
4008    #[allow(clippy::needless_lifetimes)]
4009    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
4010    #[allow(rustdoc::invalid_html_tags)]
4011    #[doc = "The sticker that represents the unique gift"]
4012    #[allow(clippy::needless_lifetimes)]
4013    fn get_sticker<'a>(&'a self) -> &'a Sticker;
4014    #[allow(rustdoc::invalid_html_tags)]
4015    #[doc = "The sticker that represents the unique gift"]
4016    #[allow(clippy::needless_lifetimes)]
4017    fn set_sticker<'a>(&'a mut self, sticker: Sticker) -> &'a mut Self;
4018    #[allow(rustdoc::invalid_html_tags)]
4019    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
4020    #[allow(clippy::needless_lifetimes)]
4021    fn get_rarity_per_mille<'a>(&'a self) -> i64;
4022    #[allow(rustdoc::invalid_html_tags)]
4023    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
4024    #[allow(clippy::needless_lifetimes)]
4025    fn set_rarity_per_mille<'a>(&'a mut self, rarity_per_mille: i64) -> &'a mut Self;
4026}
4027#[allow(dead_code)]
4028trait TraitForceReply {
4029    #[allow(rustdoc::invalid_html_tags)]
4030    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
4031    #[allow(clippy::needless_lifetimes)]
4032    fn get_force_reply<'a>(&'a self) -> bool;
4033    #[allow(rustdoc::invalid_html_tags)]
4034    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
4035    #[allow(clippy::needless_lifetimes)]
4036    fn set_force_reply<'a>(&'a mut self, force_reply: bool) -> &'a mut Self;
4037    #[allow(rustdoc::invalid_html_tags)]
4038    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
4039    #[allow(clippy::needless_lifetimes)]
4040    fn get_input_field_placeholder<'a>(&'a self) -> Option<&'a str>;
4041    #[allow(rustdoc::invalid_html_tags)]
4042    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
4043    #[allow(clippy::needless_lifetimes)]
4044    fn set_input_field_placeholder<'a>(
4045        &'a mut self,
4046        input_field_placeholder: Option<String>,
4047    ) -> &'a mut Self;
4048    #[allow(rustdoc::invalid_html_tags)]
4049    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
4050    #[allow(clippy::needless_lifetimes)]
4051    fn get_selective<'a>(&'a self) -> Option<bool>;
4052    #[allow(rustdoc::invalid_html_tags)]
4053    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
4054    #[allow(clippy::needless_lifetimes)]
4055    fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self;
4056}
4057#[allow(dead_code)]
4058trait TraitStarTransaction {
4059    #[allow(rustdoc::invalid_html_tags)]
4060    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
4061    #[allow(clippy::needless_lifetimes)]
4062    fn get_id<'a>(&'a self) -> &'a str;
4063    #[allow(rustdoc::invalid_html_tags)]
4064    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
4065    #[allow(clippy::needless_lifetimes)]
4066    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
4067    #[allow(rustdoc::invalid_html_tags)]
4068    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
4069    #[allow(clippy::needless_lifetimes)]
4070    fn get_amount<'a>(&'a self) -> i64;
4071    #[allow(rustdoc::invalid_html_tags)]
4072    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
4073    #[allow(clippy::needless_lifetimes)]
4074    fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self;
4075    #[allow(rustdoc::invalid_html_tags)]
4076    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
4077    #[allow(clippy::needless_lifetimes)]
4078    fn get_nanostar_amount<'a>(&'a self) -> Option<i64>;
4079    #[allow(rustdoc::invalid_html_tags)]
4080    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
4081    #[allow(clippy::needless_lifetimes)]
4082    fn set_nanostar_amount<'a>(&'a mut self, nanostar_amount: Option<i64>) -> &'a mut Self;
4083    #[allow(rustdoc::invalid_html_tags)]
4084    #[doc = "Date the transaction was created in Unix time"]
4085    #[allow(clippy::needless_lifetimes)]
4086    fn get_date<'a>(&'a self) -> i64;
4087    #[allow(rustdoc::invalid_html_tags)]
4088    #[doc = "Date the transaction was created in Unix time"]
4089    #[allow(clippy::needless_lifetimes)]
4090    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
4091    #[allow(rustdoc::invalid_html_tags)]
4092    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
4093    #[allow(clippy::needless_lifetimes)]
4094    fn get_source<'a>(&'a self) -> Option<&'a TransactionPartner>;
4095    #[allow(rustdoc::invalid_html_tags)]
4096    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
4097    #[allow(clippy::needless_lifetimes)]
4098    fn set_source<'a>(&'a mut self, source: Option<TransactionPartner>) -> &'a mut Self;
4099    #[allow(rustdoc::invalid_html_tags)]
4100    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
4101    #[allow(clippy::needless_lifetimes)]
4102    fn get_receiver<'a>(&'a self) -> Option<&'a TransactionPartner>;
4103    #[allow(rustdoc::invalid_html_tags)]
4104    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
4105    #[allow(clippy::needless_lifetimes)]
4106    fn set_receiver<'a>(&'a mut self, receiver: Option<TransactionPartner>) -> &'a mut Self;
4107}
4108#[allow(dead_code)]
4109trait TraitPassportElementErrorDataField {
4110    #[allow(rustdoc::invalid_html_tags)]
4111    #[doc = "Error source, must be data"]
4112    #[allow(clippy::needless_lifetimes)]
4113    fn get_source<'a>(&'a self) -> &'a str;
4114    #[allow(rustdoc::invalid_html_tags)]
4115    #[doc = "Error source, must be data"]
4116    #[allow(clippy::needless_lifetimes)]
4117    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
4118    #[allow(rustdoc::invalid_html_tags)]
4119    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
4120    #[allow(clippy::needless_lifetimes)]
4121    fn get_tg_type<'a>(&'a self) -> &'a str;
4122    #[allow(rustdoc::invalid_html_tags)]
4123    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
4124    #[allow(clippy::needless_lifetimes)]
4125    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
4126    #[allow(rustdoc::invalid_html_tags)]
4127    #[doc = "Name of the data field which has the error"]
4128    #[allow(clippy::needless_lifetimes)]
4129    fn get_field_name<'a>(&'a self) -> &'a str;
4130    #[allow(rustdoc::invalid_html_tags)]
4131    #[doc = "Name of the data field which has the error"]
4132    #[allow(clippy::needless_lifetimes)]
4133    fn set_field_name<'a>(&'a mut self, field_name: String) -> &'a mut Self;
4134    #[allow(rustdoc::invalid_html_tags)]
4135    #[doc = "Base64-encoded data hash"]
4136    #[allow(clippy::needless_lifetimes)]
4137    fn get_data_hash<'a>(&'a self) -> &'a str;
4138    #[allow(rustdoc::invalid_html_tags)]
4139    #[doc = "Base64-encoded data hash"]
4140    #[allow(clippy::needless_lifetimes)]
4141    fn set_data_hash<'a>(&'a mut self, data_hash: String) -> &'a mut Self;
4142    #[allow(rustdoc::invalid_html_tags)]
4143    #[doc = "Error message"]
4144    #[allow(clippy::needless_lifetimes)]
4145    fn get_message<'a>(&'a self) -> &'a str;
4146    #[allow(rustdoc::invalid_html_tags)]
4147    #[doc = "Error message"]
4148    #[allow(clippy::needless_lifetimes)]
4149    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
4150}
4151#[allow(dead_code)]
4152trait TraitChatBoost {
4153    #[allow(rustdoc::invalid_html_tags)]
4154    #[doc = "Unique identifier of the boost"]
4155    #[allow(clippy::needless_lifetimes)]
4156    fn get_boost_id<'a>(&'a self) -> &'a str;
4157    #[allow(rustdoc::invalid_html_tags)]
4158    #[doc = "Unique identifier of the boost"]
4159    #[allow(clippy::needless_lifetimes)]
4160    fn set_boost_id<'a>(&'a mut self, boost_id: String) -> &'a mut Self;
4161    #[allow(rustdoc::invalid_html_tags)]
4162    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
4163    #[allow(clippy::needless_lifetimes)]
4164    fn get_add_date<'a>(&'a self) -> i64;
4165    #[allow(rustdoc::invalid_html_tags)]
4166    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
4167    #[allow(clippy::needless_lifetimes)]
4168    fn set_add_date<'a>(&'a mut self, add_date: i64) -> &'a mut Self;
4169    #[allow(rustdoc::invalid_html_tags)]
4170    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
4171    #[allow(clippy::needless_lifetimes)]
4172    fn get_expiration_date<'a>(&'a self) -> i64;
4173    #[allow(rustdoc::invalid_html_tags)]
4174    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
4175    #[allow(clippy::needless_lifetimes)]
4176    fn set_expiration_date<'a>(&'a mut self, expiration_date: i64) -> &'a mut Self;
4177    #[allow(rustdoc::invalid_html_tags)]
4178    #[doc = "Source of the added boost"]
4179    #[allow(clippy::needless_lifetimes)]
4180    fn get_source<'a>(&'a self) -> &'a ChatBoostSource;
4181    #[allow(rustdoc::invalid_html_tags)]
4182    #[doc = "Source of the added boost"]
4183    #[allow(clippy::needless_lifetimes)]
4184    fn set_source<'a>(&'a mut self, source: ChatBoostSource) -> &'a mut Self;
4185}
4186#[allow(dead_code)]
4187trait TraitShippingOption {
4188    #[allow(rustdoc::invalid_html_tags)]
4189    #[doc = "Shipping option identifier"]
4190    #[allow(clippy::needless_lifetimes)]
4191    fn get_id<'a>(&'a self) -> &'a str;
4192    #[allow(rustdoc::invalid_html_tags)]
4193    #[doc = "Shipping option identifier"]
4194    #[allow(clippy::needless_lifetimes)]
4195    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
4196    #[allow(rustdoc::invalid_html_tags)]
4197    #[doc = "Option title"]
4198    #[allow(clippy::needless_lifetimes)]
4199    fn get_title<'a>(&'a self) -> &'a str;
4200    #[allow(rustdoc::invalid_html_tags)]
4201    #[doc = "Option title"]
4202    #[allow(clippy::needless_lifetimes)]
4203    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
4204    #[allow(rustdoc::invalid_html_tags)]
4205    #[doc = "List of price portions"]
4206    #[allow(clippy::needless_lifetimes)]
4207    fn get_prices<'a>(&'a self) -> &'a Vec<LabeledPrice>;
4208    #[allow(rustdoc::invalid_html_tags)]
4209    #[doc = "List of price portions"]
4210    #[allow(clippy::needless_lifetimes)]
4211    fn set_prices<'a>(&'a mut self, prices: Vec<LabeledPrice>) -> &'a mut Self;
4212}
4213#[allow(dead_code)]
4214trait TraitPassportElementErrorFrontSide {
4215    #[allow(rustdoc::invalid_html_tags)]
4216    #[doc = "Error source, must be front_side"]
4217    #[allow(clippy::needless_lifetimes)]
4218    fn get_source<'a>(&'a self) -> &'a str;
4219    #[allow(rustdoc::invalid_html_tags)]
4220    #[doc = "Error source, must be front_side"]
4221    #[allow(clippy::needless_lifetimes)]
4222    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
4223    #[allow(rustdoc::invalid_html_tags)]
4224    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
4225    #[allow(clippy::needless_lifetimes)]
4226    fn get_tg_type<'a>(&'a self) -> &'a str;
4227    #[allow(rustdoc::invalid_html_tags)]
4228    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
4229    #[allow(clippy::needless_lifetimes)]
4230    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
4231    #[allow(rustdoc::invalid_html_tags)]
4232    #[doc = "Base64-encoded hash of the file with the front side of the document"]
4233    #[allow(clippy::needless_lifetimes)]
4234    fn get_file_hash<'a>(&'a self) -> &'a str;
4235    #[allow(rustdoc::invalid_html_tags)]
4236    #[doc = "Base64-encoded hash of the file with the front side of the document"]
4237    #[allow(clippy::needless_lifetimes)]
4238    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self;
4239    #[allow(rustdoc::invalid_html_tags)]
4240    #[doc = "Error message"]
4241    #[allow(clippy::needless_lifetimes)]
4242    fn get_message<'a>(&'a self) -> &'a str;
4243    #[allow(rustdoc::invalid_html_tags)]
4244    #[doc = "Error message"]
4245    #[allow(clippy::needless_lifetimes)]
4246    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
4247}
4248#[allow(dead_code)]
4249trait TraitBusinessOpeningHours {
4250    #[allow(rustdoc::invalid_html_tags)]
4251    #[doc = "Unique name of the time zone for which the opening hours are defined"]
4252    #[allow(clippy::needless_lifetimes)]
4253    fn get_time_zone_name<'a>(&'a self) -> &'a str;
4254    #[allow(rustdoc::invalid_html_tags)]
4255    #[doc = "Unique name of the time zone for which the opening hours are defined"]
4256    #[allow(clippy::needless_lifetimes)]
4257    fn set_time_zone_name<'a>(&'a mut self, time_zone_name: String) -> &'a mut Self;
4258    #[allow(rustdoc::invalid_html_tags)]
4259    #[doc = "List of time intervals describing business opening hours"]
4260    #[allow(clippy::needless_lifetimes)]
4261    fn get_opening_hours<'a>(&'a self) -> &'a Vec<BusinessOpeningHoursInterval>;
4262    #[allow(rustdoc::invalid_html_tags)]
4263    #[doc = "List of time intervals describing business opening hours"]
4264    #[allow(clippy::needless_lifetimes)]
4265    fn set_opening_hours<'a>(
4266        &'a mut self,
4267        opening_hours: Vec<BusinessOpeningHoursInterval>,
4268    ) -> &'a mut Self;
4269}
4270#[allow(dead_code)]
4271trait TraitReactionType:
4272    TraitReactionTypeEmoji + TraitReactionTypeCustomEmoji + TraitReactionTypePaid
4273{
4274}
4275#[allow(dead_code)]
4276trait TraitStory {
4277    #[allow(rustdoc::invalid_html_tags)]
4278    #[doc = "Chat that posted the story"]
4279    #[allow(clippy::needless_lifetimes)]
4280    fn get_chat<'a>(&'a self) -> &'a Chat;
4281    #[allow(rustdoc::invalid_html_tags)]
4282    #[doc = "Chat that posted the story"]
4283    #[allow(clippy::needless_lifetimes)]
4284    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
4285    #[allow(rustdoc::invalid_html_tags)]
4286    #[doc = "Unique identifier for the story in the chat"]
4287    #[allow(clippy::needless_lifetimes)]
4288    fn get_id<'a>(&'a self) -> i64;
4289    #[allow(rustdoc::invalid_html_tags)]
4290    #[doc = "Unique identifier for the story in the chat"]
4291    #[allow(clippy::needless_lifetimes)]
4292    fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self;
4293}
4294#[allow(dead_code)]
4295trait TraitWebAppInfo {
4296    #[allow(rustdoc::invalid_html_tags)]
4297    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
4298    #[allow(clippy::needless_lifetimes)]
4299    fn get_url<'a>(&'a self) -> &'a str;
4300    #[allow(rustdoc::invalid_html_tags)]
4301    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
4302    #[allow(clippy::needless_lifetimes)]
4303    fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self;
4304}
4305#[allow(dead_code)]
4306trait TraitBotCommandScopeChatMember {
4307    #[allow(rustdoc::invalid_html_tags)]
4308    #[doc = "Scope type, must be chat_member"]
4309    #[allow(clippy::needless_lifetimes)]
4310    fn get_tg_type<'a>(&'a self) -> &'a str;
4311    #[allow(rustdoc::invalid_html_tags)]
4312    #[doc = "Scope type, must be chat_member"]
4313    #[allow(clippy::needless_lifetimes)]
4314    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
4315    #[allow(rustdoc::invalid_html_tags)]
4316    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
4317    #[allow(clippy::needless_lifetimes)]
4318    fn get_chat_id<'a>(&'a self) -> &'a ChatHandle;
4319    #[allow(rustdoc::invalid_html_tags)]
4320    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
4321    #[allow(clippy::needless_lifetimes)]
4322    fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self;
4323    #[allow(rustdoc::invalid_html_tags)]
4324    #[doc = "Unique identifier of the target user"]
4325    #[allow(clippy::needless_lifetimes)]
4326    fn get_user_id<'a>(&'a self) -> i64;
4327    #[allow(rustdoc::invalid_html_tags)]
4328    #[doc = "Unique identifier of the target user"]
4329    #[allow(clippy::needless_lifetimes)]
4330    fn set_user_id<'a>(&'a mut self, user_id: i64) -> &'a mut Self;
4331}
4332#[allow(dead_code)]
4333trait TraitChatBackground {
4334    #[allow(rustdoc::invalid_html_tags)]
4335    #[doc = "Type of the background"]
4336    #[allow(clippy::needless_lifetimes)]
4337    fn get_tg_type<'a>(&'a self) -> &'a BackgroundType;
4338    #[allow(rustdoc::invalid_html_tags)]
4339    #[doc = "Type of the background"]
4340    #[allow(clippy::needless_lifetimes)]
4341    fn set_tg_type<'a>(&'a mut self, tg_type: BackgroundType) -> &'a mut Self;
4342}
4343#[allow(dead_code)]
4344trait TraitPassportFile {
4345    #[allow(rustdoc::invalid_html_tags)]
4346    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
4347    #[allow(clippy::needless_lifetimes)]
4348    fn get_file_id<'a>(&'a self) -> &'a str;
4349    #[allow(rustdoc::invalid_html_tags)]
4350    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
4351    #[allow(clippy::needless_lifetimes)]
4352    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
4353    #[allow(rustdoc::invalid_html_tags)]
4354    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
4355    #[allow(clippy::needless_lifetimes)]
4356    fn get_file_unique_id<'a>(&'a self) -> &'a str;
4357    #[allow(rustdoc::invalid_html_tags)]
4358    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
4359    #[allow(clippy::needless_lifetimes)]
4360    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
4361    #[allow(rustdoc::invalid_html_tags)]
4362    #[doc = "File size in bytes"]
4363    #[allow(clippy::needless_lifetimes)]
4364    fn get_file_size<'a>(&'a self) -> i64;
4365    #[allow(rustdoc::invalid_html_tags)]
4366    #[doc = "File size in bytes"]
4367    #[allow(clippy::needless_lifetimes)]
4368    fn set_file_size<'a>(&'a mut self, file_size: i64) -> &'a mut Self;
4369    #[allow(rustdoc::invalid_html_tags)]
4370    #[doc = "Unix time when the file was uploaded"]
4371    #[allow(clippy::needless_lifetimes)]
4372    fn get_file_date<'a>(&'a self) -> i64;
4373    #[allow(rustdoc::invalid_html_tags)]
4374    #[doc = "Unix time when the file was uploaded"]
4375    #[allow(clippy::needless_lifetimes)]
4376    fn set_file_date<'a>(&'a mut self, file_date: i64) -> &'a mut Self;
4377}
4378#[allow(dead_code)]
4379trait TraitBotCommandScopeAllChatAdministrators {
4380    #[allow(rustdoc::invalid_html_tags)]
4381    #[doc = "Scope type, must be all_chat_administrators"]
4382    #[allow(clippy::needless_lifetimes)]
4383    fn get_tg_type<'a>(&'a self) -> &'a str;
4384    #[allow(rustdoc::invalid_html_tags)]
4385    #[doc = "Scope type, must be all_chat_administrators"]
4386    #[allow(clippy::needless_lifetimes)]
4387    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
4388}
4389#[allow(dead_code)]
4390trait TraitInputMedia:
4391    TraitInputMediaAnimation
4392    + TraitInputMediaDocument
4393    + TraitInputMediaAudio
4394    + TraitInputMediaPhoto
4395    + TraitInputMediaVideo
4396{
4397}
4398#[allow(dead_code)]
4399trait TraitExternalReplyInfo {
4400    #[allow(rustdoc::invalid_html_tags)]
4401    #[doc = "Origin of the message replied to by the given message"]
4402    #[allow(clippy::needless_lifetimes)]
4403    fn get_origin<'a>(&'a self) -> &'a MessageOrigin;
4404    #[allow(rustdoc::invalid_html_tags)]
4405    #[doc = "Origin of the message replied to by the given message"]
4406    #[allow(clippy::needless_lifetimes)]
4407    fn set_origin<'a>(&'a mut self, origin: MessageOrigin) -> &'a mut Self;
4408    #[allow(rustdoc::invalid_html_tags)]
4409    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
4410    #[allow(clippy::needless_lifetimes)]
4411    fn get_chat<'a>(&'a self) -> Option<&'a Chat>;
4412    #[allow(rustdoc::invalid_html_tags)]
4413    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
4414    #[allow(clippy::needless_lifetimes)]
4415    fn set_chat<'a>(&'a mut self, chat: Option<Chat>) -> &'a mut Self;
4416    #[allow(rustdoc::invalid_html_tags)]
4417    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
4418    #[allow(clippy::needless_lifetimes)]
4419    fn get_message_id<'a>(&'a self) -> Option<i64>;
4420    #[allow(rustdoc::invalid_html_tags)]
4421    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
4422    #[allow(clippy::needless_lifetimes)]
4423    fn set_message_id<'a>(&'a mut self, message_id: Option<i64>) -> &'a mut Self;
4424    #[allow(rustdoc::invalid_html_tags)]
4425    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
4426    #[allow(clippy::needless_lifetimes)]
4427    fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions>;
4428    #[allow(rustdoc::invalid_html_tags)]
4429    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
4430    #[allow(clippy::needless_lifetimes)]
4431    fn set_link_preview_options<'a>(
4432        &'a mut self,
4433        link_preview_options: Option<LinkPreviewOptions>,
4434    ) -> &'a mut Self;
4435    #[allow(rustdoc::invalid_html_tags)]
4436    #[doc = "Optional. Message is an animation, information about the animation"]
4437    #[allow(clippy::needless_lifetimes)]
4438    fn get_animation<'a>(&'a self) -> Option<&'a Animation>;
4439    #[allow(rustdoc::invalid_html_tags)]
4440    #[doc = "Optional. Message is an animation, information about the animation"]
4441    #[allow(clippy::needless_lifetimes)]
4442    fn set_animation<'a>(&'a mut self, animation: Option<Animation>) -> &'a mut Self;
4443    #[allow(rustdoc::invalid_html_tags)]
4444    #[doc = "Optional. Message is an audio file, information about the file"]
4445    #[allow(clippy::needless_lifetimes)]
4446    fn get_audio<'a>(&'a self) -> Option<&'a Audio>;
4447    #[allow(rustdoc::invalid_html_tags)]
4448    #[doc = "Optional. Message is an audio file, information about the file"]
4449    #[allow(clippy::needless_lifetimes)]
4450    fn set_audio<'a>(&'a mut self, audio: Option<Audio>) -> &'a mut Self;
4451    #[allow(rustdoc::invalid_html_tags)]
4452    #[doc = "Optional. Message is a general file, information about the file"]
4453    #[allow(clippy::needless_lifetimes)]
4454    fn get_document<'a>(&'a self) -> Option<&'a Document>;
4455    #[allow(rustdoc::invalid_html_tags)]
4456    #[doc = "Optional. Message is a general file, information about the file"]
4457    #[allow(clippy::needless_lifetimes)]
4458    fn set_document<'a>(&'a mut self, document: Option<Document>) -> &'a mut Self;
4459    #[allow(rustdoc::invalid_html_tags)]
4460    #[doc = "Optional. Message contains paid media; information about the paid media"]
4461    #[allow(clippy::needless_lifetimes)]
4462    fn get_paid_media<'a>(&'a self) -> Option<&'a PaidMediaInfo>;
4463    #[allow(rustdoc::invalid_html_tags)]
4464    #[doc = "Optional. Message contains paid media; information about the paid media"]
4465    #[allow(clippy::needless_lifetimes)]
4466    fn set_paid_media<'a>(&'a mut self, paid_media: Option<PaidMediaInfo>) -> &'a mut Self;
4467    #[allow(rustdoc::invalid_html_tags)]
4468    #[doc = "Optional. Message is a photo, available sizes of the photo"]
4469    #[allow(clippy::needless_lifetimes)]
4470    fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>>;
4471    #[allow(rustdoc::invalid_html_tags)]
4472    #[doc = "Optional. Message is a photo, available sizes of the photo"]
4473    #[allow(clippy::needless_lifetimes)]
4474    fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self;
4475    #[allow(rustdoc::invalid_html_tags)]
4476    #[doc = "Optional. Message is a sticker, information about the sticker"]
4477    #[allow(clippy::needless_lifetimes)]
4478    fn get_sticker<'a>(&'a self) -> Option<&'a Sticker>;
4479    #[allow(rustdoc::invalid_html_tags)]
4480    #[doc = "Optional. Message is a sticker, information about the sticker"]
4481    #[allow(clippy::needless_lifetimes)]
4482    fn set_sticker<'a>(&'a mut self, sticker: Option<Sticker>) -> &'a mut Self;
4483    #[allow(rustdoc::invalid_html_tags)]
4484    #[doc = "Optional. Message is a forwarded story"]
4485    #[allow(clippy::needless_lifetimes)]
4486    fn get_story<'a>(&'a self) -> Option<&'a Story>;
4487    #[allow(rustdoc::invalid_html_tags)]
4488    #[doc = "Optional. Message is a forwarded story"]
4489    #[allow(clippy::needless_lifetimes)]
4490    fn set_story<'a>(&'a mut self, story: Option<Story>) -> &'a mut Self;
4491    #[allow(rustdoc::invalid_html_tags)]
4492    #[doc = "Optional. Message is a video, information about the video"]
4493    #[allow(clippy::needless_lifetimes)]
4494    fn get_video<'a>(&'a self) -> Option<&'a Video>;
4495    #[allow(rustdoc::invalid_html_tags)]
4496    #[doc = "Optional. Message is a video, information about the video"]
4497    #[allow(clippy::needless_lifetimes)]
4498    fn set_video<'a>(&'a mut self, video: Option<Video>) -> &'a mut Self;
4499    #[allow(rustdoc::invalid_html_tags)]
4500    #[doc = "Optional. Message is a video note, information about the video message"]
4501    #[allow(clippy::needless_lifetimes)]
4502    fn get_video_note<'a>(&'a self) -> Option<&'a VideoNote>;
4503    #[allow(rustdoc::invalid_html_tags)]
4504    #[doc = "Optional. Message is a video note, information about the video message"]
4505    #[allow(clippy::needless_lifetimes)]
4506    fn set_video_note<'a>(&'a mut self, video_note: Option<VideoNote>) -> &'a mut Self;
4507    #[allow(rustdoc::invalid_html_tags)]
4508    #[doc = "Optional. Message is a voice message, information about the file"]
4509    #[allow(clippy::needless_lifetimes)]
4510    fn get_voice<'a>(&'a self) -> Option<&'a Voice>;
4511    #[allow(rustdoc::invalid_html_tags)]
4512    #[doc = "Optional. Message is a voice message, information about the file"]
4513    #[allow(clippy::needless_lifetimes)]
4514    fn set_voice<'a>(&'a mut self, voice: Option<Voice>) -> &'a mut Self;
4515    #[allow(rustdoc::invalid_html_tags)]
4516    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
4517    #[allow(clippy::needless_lifetimes)]
4518    fn get_has_media_spoiler<'a>(&'a self) -> Option<bool>;
4519    #[allow(rustdoc::invalid_html_tags)]
4520    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
4521    #[allow(clippy::needless_lifetimes)]
4522    fn set_has_media_spoiler<'a>(&'a mut self, has_media_spoiler: Option<bool>) -> &'a mut Self;
4523    #[allow(rustdoc::invalid_html_tags)]
4524    #[doc = "Optional. Message is a checklist"]
4525    #[allow(clippy::needless_lifetimes)]
4526    fn get_checklist<'a>(&'a self) -> Option<&'a Checklist>;
4527    #[allow(rustdoc::invalid_html_tags)]
4528    #[doc = "Optional. Message is a checklist"]
4529    #[allow(clippy::needless_lifetimes)]
4530    fn set_checklist<'a>(&'a mut self, checklist: Option<Checklist>) -> &'a mut Self;
4531    #[allow(rustdoc::invalid_html_tags)]
4532    #[doc = "Optional. Message is a shared contact, information about the contact"]
4533    #[allow(clippy::needless_lifetimes)]
4534    fn get_contact<'a>(&'a self) -> Option<&'a Contact>;
4535    #[allow(rustdoc::invalid_html_tags)]
4536    #[doc = "Optional. Message is a shared contact, information about the contact"]
4537    #[allow(clippy::needless_lifetimes)]
4538    fn set_contact<'a>(&'a mut self, contact: Option<Contact>) -> &'a mut Self;
4539    #[allow(rustdoc::invalid_html_tags)]
4540    #[doc = "Optional. Message is a dice with random value"]
4541    #[allow(clippy::needless_lifetimes)]
4542    fn get_dice<'a>(&'a self) -> Option<&'a Dice>;
4543    #[allow(rustdoc::invalid_html_tags)]
4544    #[doc = "Optional. Message is a dice with random value"]
4545    #[allow(clippy::needless_lifetimes)]
4546    fn set_dice<'a>(&'a mut self, dice: Option<Dice>) -> &'a mut Self;
4547    #[allow(rustdoc::invalid_html_tags)]
4548    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
4549    #[allow(clippy::needless_lifetimes)]
4550    fn get_game<'a>(&'a self) -> Option<&'a Game>;
4551    #[allow(rustdoc::invalid_html_tags)]
4552    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
4553    #[allow(clippy::needless_lifetimes)]
4554    fn set_game<'a>(&'a mut self, game: Option<Game>) -> &'a mut Self;
4555    #[allow(rustdoc::invalid_html_tags)]
4556    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
4557    #[allow(clippy::needless_lifetimes)]
4558    fn get_giveaway<'a>(&'a self) -> Option<&'a Giveaway>;
4559    #[allow(rustdoc::invalid_html_tags)]
4560    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
4561    #[allow(clippy::needless_lifetimes)]
4562    fn set_giveaway<'a>(&'a mut self, giveaway: Option<Giveaway>) -> &'a mut Self;
4563    #[allow(rustdoc::invalid_html_tags)]
4564    #[doc = "Optional. A giveaway with public winners was completed"]
4565    #[allow(clippy::needless_lifetimes)]
4566    fn get_giveaway_winners<'a>(&'a self) -> Option<&'a GiveawayWinners>;
4567    #[allow(rustdoc::invalid_html_tags)]
4568    #[doc = "Optional. A giveaway with public winners was completed"]
4569    #[allow(clippy::needless_lifetimes)]
4570    fn set_giveaway_winners<'a>(
4571        &'a mut self,
4572        giveaway_winners: Option<GiveawayWinners>,
4573    ) -> &'a mut Self;
4574    #[allow(rustdoc::invalid_html_tags)]
4575    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
4576    #[allow(clippy::needless_lifetimes)]
4577    fn get_invoice<'a>(&'a self) -> Option<&'a Invoice>;
4578    #[allow(rustdoc::invalid_html_tags)]
4579    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
4580    #[allow(clippy::needless_lifetimes)]
4581    fn set_invoice<'a>(&'a mut self, invoice: Option<Invoice>) -> &'a mut Self;
4582    #[allow(rustdoc::invalid_html_tags)]
4583    #[doc = "Optional. Message is a shared location, information about the location"]
4584    #[allow(clippy::needless_lifetimes)]
4585    fn get_location<'a>(&'a self) -> Option<&'a Location>;
4586    #[allow(rustdoc::invalid_html_tags)]
4587    #[doc = "Optional. Message is a shared location, information about the location"]
4588    #[allow(clippy::needless_lifetimes)]
4589    fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self;
4590    #[allow(rustdoc::invalid_html_tags)]
4591    #[doc = "Optional. Message is a native poll, information about the poll"]
4592    #[allow(clippy::needless_lifetimes)]
4593    fn get_poll<'a>(&'a self) -> Option<&'a Poll>;
4594    #[allow(rustdoc::invalid_html_tags)]
4595    #[doc = "Optional. Message is a native poll, information about the poll"]
4596    #[allow(clippy::needless_lifetimes)]
4597    fn set_poll<'a>(&'a mut self, poll: Option<Poll>) -> &'a mut Self;
4598    #[allow(rustdoc::invalid_html_tags)]
4599    #[doc = "Optional. Message is a venue, information about the venue"]
4600    #[allow(clippy::needless_lifetimes)]
4601    fn get_venue<'a>(&'a self) -> Option<&'a Venue>;
4602    #[allow(rustdoc::invalid_html_tags)]
4603    #[doc = "Optional. Message is a venue, information about the venue"]
4604    #[allow(clippy::needless_lifetimes)]
4605    fn set_venue<'a>(&'a mut self, venue: Option<Venue>) -> &'a mut Self;
4606}
4607#[allow(dead_code)]
4608trait TraitInlineQueryResultCachedGif {
4609    #[allow(rustdoc::invalid_html_tags)]
4610    #[doc = "Type of the result, must be gif"]
4611    #[allow(clippy::needless_lifetimes)]
4612    fn get_tg_type<'a>(&'a self) -> &'a str;
4613    #[allow(rustdoc::invalid_html_tags)]
4614    #[doc = "Type of the result, must be gif"]
4615    #[allow(clippy::needless_lifetimes)]
4616    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
4617    #[allow(rustdoc::invalid_html_tags)]
4618    #[doc = "Unique identifier for this result, 1-64 bytes"]
4619    #[allow(clippy::needless_lifetimes)]
4620    fn get_id<'a>(&'a self) -> &'a str;
4621    #[allow(rustdoc::invalid_html_tags)]
4622    #[doc = "Unique identifier for this result, 1-64 bytes"]
4623    #[allow(clippy::needless_lifetimes)]
4624    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
4625    #[allow(rustdoc::invalid_html_tags)]
4626    #[doc = "A valid file identifier for the GIF file"]
4627    #[allow(clippy::needless_lifetimes)]
4628    fn get_gif_file_id<'a>(&'a self) -> &'a str;
4629    #[allow(rustdoc::invalid_html_tags)]
4630    #[doc = "A valid file identifier for the GIF file"]
4631    #[allow(clippy::needless_lifetimes)]
4632    fn set_gif_file_id<'a>(&'a mut self, gif_file_id: String) -> &'a mut Self;
4633    #[allow(rustdoc::invalid_html_tags)]
4634    #[doc = "Optional. Title for the result"]
4635    #[allow(clippy::needless_lifetimes)]
4636    fn get_title<'a>(&'a self) -> Option<&'a str>;
4637    #[allow(rustdoc::invalid_html_tags)]
4638    #[doc = "Optional. Title for the result"]
4639    #[allow(clippy::needless_lifetimes)]
4640    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
4641    #[allow(rustdoc::invalid_html_tags)]
4642    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
4643    #[allow(clippy::needless_lifetimes)]
4644    fn get_caption<'a>(&'a self) -> Option<&'a str>;
4645    #[allow(rustdoc::invalid_html_tags)]
4646    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
4647    #[allow(clippy::needless_lifetimes)]
4648    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
4649    #[allow(rustdoc::invalid_html_tags)]
4650    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
4651    #[allow(clippy::needless_lifetimes)]
4652    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
4653    #[allow(rustdoc::invalid_html_tags)]
4654    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
4655    #[allow(clippy::needless_lifetimes)]
4656    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
4657    #[allow(rustdoc::invalid_html_tags)]
4658    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
4659    #[allow(clippy::needless_lifetimes)]
4660    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
4661    #[allow(rustdoc::invalid_html_tags)]
4662    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
4663    #[allow(clippy::needless_lifetimes)]
4664    fn set_caption_entities<'a>(
4665        &'a mut self,
4666        caption_entities: Option<Vec<MessageEntity>>,
4667    ) -> &'a mut Self;
4668    #[allow(rustdoc::invalid_html_tags)]
4669    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
4670    #[allow(clippy::needless_lifetimes)]
4671    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
4672    #[allow(rustdoc::invalid_html_tags)]
4673    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
4674    #[allow(clippy::needless_lifetimes)]
4675    fn set_show_caption_above_media<'a>(
4676        &'a mut self,
4677        show_caption_above_media: Option<bool>,
4678    ) -> &'a mut Self;
4679    #[allow(rustdoc::invalid_html_tags)]
4680    #[doc = "Optional. Inline keyboard attached to the message"]
4681    #[allow(clippy::needless_lifetimes)]
4682    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
4683    #[allow(rustdoc::invalid_html_tags)]
4684    #[doc = "Optional. Inline keyboard attached to the message"]
4685    #[allow(clippy::needless_lifetimes)]
4686    fn set_reply_markup<'a>(
4687        &'a mut self,
4688        reply_markup: Option<InlineKeyboardMarkup>,
4689    ) -> &'a mut Self;
4690    #[allow(rustdoc::invalid_html_tags)]
4691    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
4692    #[allow(clippy::needless_lifetimes)]
4693    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
4694    #[allow(rustdoc::invalid_html_tags)]
4695    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
4696    #[allow(clippy::needless_lifetimes)]
4697    fn set_input_message_content<'a>(
4698        &'a mut self,
4699        input_message_content: Option<InputMessageContent>,
4700    ) -> &'a mut Self;
4701}
4702#[allow(dead_code)]
4703trait TraitWriteAccessAllowed {
4704    #[allow(rustdoc::invalid_html_tags)]
4705    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
4706    #[allow(clippy::needless_lifetimes)]
4707    fn get_from_request<'a>(&'a self) -> Option<bool>;
4708    #[allow(rustdoc::invalid_html_tags)]
4709    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
4710    #[allow(clippy::needless_lifetimes)]
4711    fn set_from_request<'a>(&'a mut self, from_request: Option<bool>) -> &'a mut Self;
4712    #[allow(rustdoc::invalid_html_tags)]
4713    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
4714    #[allow(clippy::needless_lifetimes)]
4715    fn get_web_app_name<'a>(&'a self) -> Option<&'a str>;
4716    #[allow(rustdoc::invalid_html_tags)]
4717    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
4718    #[allow(clippy::needless_lifetimes)]
4719    fn set_web_app_name<'a>(&'a mut self, web_app_name: Option<String>) -> &'a mut Self;
4720    #[allow(rustdoc::invalid_html_tags)]
4721    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
4722    #[allow(clippy::needless_lifetimes)]
4723    fn get_from_attachment_menu<'a>(&'a self) -> Option<bool>;
4724    #[allow(rustdoc::invalid_html_tags)]
4725    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
4726    #[allow(clippy::needless_lifetimes)]
4727    fn set_from_attachment_menu<'a>(
4728        &'a mut self,
4729        from_attachment_menu: Option<bool>,
4730    ) -> &'a mut Self;
4731}
4732#[allow(dead_code)]
4733trait TraitTransactionPartnerTelegramApi {
4734    #[allow(rustdoc::invalid_html_tags)]
4735    #[doc = "Type of the transaction partner, always \"telegram_api\""]
4736    #[allow(clippy::needless_lifetimes)]
4737    fn get_tg_type<'a>(&'a self) -> &'a str;
4738    #[allow(rustdoc::invalid_html_tags)]
4739    #[doc = "Type of the transaction partner, always \"telegram_api\""]
4740    #[allow(clippy::needless_lifetimes)]
4741    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
4742    #[allow(rustdoc::invalid_html_tags)]
4743    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
4744    #[allow(clippy::needless_lifetimes)]
4745    fn get_request_count<'a>(&'a self) -> i64;
4746    #[allow(rustdoc::invalid_html_tags)]
4747    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
4748    #[allow(clippy::needless_lifetimes)]
4749    fn set_request_count<'a>(&'a mut self, request_count: i64) -> &'a mut Self;
4750}
4751#[allow(dead_code)]
4752trait TraitProximityAlertTriggered {
4753    #[allow(rustdoc::invalid_html_tags)]
4754    #[doc = "User that triggered the alert"]
4755    #[allow(clippy::needless_lifetimes)]
4756    fn get_traveler<'a>(&'a self) -> &'a User;
4757    #[allow(rustdoc::invalid_html_tags)]
4758    #[doc = "User that triggered the alert"]
4759    #[allow(clippy::needless_lifetimes)]
4760    fn set_traveler<'a>(&'a mut self, traveler: User) -> &'a mut Self;
4761    #[allow(rustdoc::invalid_html_tags)]
4762    #[doc = "User that set the alert"]
4763    #[allow(clippy::needless_lifetimes)]
4764    fn get_watcher<'a>(&'a self) -> &'a User;
4765    #[allow(rustdoc::invalid_html_tags)]
4766    #[doc = "User that set the alert"]
4767    #[allow(clippy::needless_lifetimes)]
4768    fn set_watcher<'a>(&'a mut self, watcher: User) -> &'a mut Self;
4769    #[allow(rustdoc::invalid_html_tags)]
4770    #[doc = "The distance between the users"]
4771    #[allow(clippy::needless_lifetimes)]
4772    fn get_distance<'a>(&'a self) -> i64;
4773    #[allow(rustdoc::invalid_html_tags)]
4774    #[doc = "The distance between the users"]
4775    #[allow(clippy::needless_lifetimes)]
4776    fn set_distance<'a>(&'a mut self, distance: i64) -> &'a mut Self;
4777}
4778#[allow(dead_code)]
4779trait TraitInlineQueryResultAudio {
4780    #[allow(rustdoc::invalid_html_tags)]
4781    #[doc = "Type of the result, must be audio"]
4782    #[allow(clippy::needless_lifetimes)]
4783    fn get_tg_type<'a>(&'a self) -> &'a str;
4784    #[allow(rustdoc::invalid_html_tags)]
4785    #[doc = "Type of the result, must be audio"]
4786    #[allow(clippy::needless_lifetimes)]
4787    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
4788    #[allow(rustdoc::invalid_html_tags)]
4789    #[doc = "Unique identifier for this result, 1-64 bytes"]
4790    #[allow(clippy::needless_lifetimes)]
4791    fn get_id<'a>(&'a self) -> &'a str;
4792    #[allow(rustdoc::invalid_html_tags)]
4793    #[doc = "Unique identifier for this result, 1-64 bytes"]
4794    #[allow(clippy::needless_lifetimes)]
4795    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
4796    #[allow(rustdoc::invalid_html_tags)]
4797    #[doc = "A valid URL for the audio file"]
4798    #[allow(clippy::needless_lifetimes)]
4799    fn get_audio_url<'a>(&'a self) -> &'a str;
4800    #[allow(rustdoc::invalid_html_tags)]
4801    #[doc = "A valid URL for the audio file"]
4802    #[allow(clippy::needless_lifetimes)]
4803    fn set_audio_url<'a>(&'a mut self, audio_url: String) -> &'a mut Self;
4804    #[allow(rustdoc::invalid_html_tags)]
4805    #[doc = "Title"]
4806    #[allow(clippy::needless_lifetimes)]
4807    fn get_title<'a>(&'a self) -> &'a str;
4808    #[allow(rustdoc::invalid_html_tags)]
4809    #[doc = "Title"]
4810    #[allow(clippy::needless_lifetimes)]
4811    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
4812    #[allow(rustdoc::invalid_html_tags)]
4813    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
4814    #[allow(clippy::needless_lifetimes)]
4815    fn get_caption<'a>(&'a self) -> Option<&'a str>;
4816    #[allow(rustdoc::invalid_html_tags)]
4817    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
4818    #[allow(clippy::needless_lifetimes)]
4819    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
4820    #[allow(rustdoc::invalid_html_tags)]
4821    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
4822    #[allow(clippy::needless_lifetimes)]
4823    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
4824    #[allow(rustdoc::invalid_html_tags)]
4825    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
4826    #[allow(clippy::needless_lifetimes)]
4827    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
4828    #[allow(rustdoc::invalid_html_tags)]
4829    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
4830    #[allow(clippy::needless_lifetimes)]
4831    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
4832    #[allow(rustdoc::invalid_html_tags)]
4833    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
4834    #[allow(clippy::needless_lifetimes)]
4835    fn set_caption_entities<'a>(
4836        &'a mut self,
4837        caption_entities: Option<Vec<MessageEntity>>,
4838    ) -> &'a mut Self;
4839    #[allow(rustdoc::invalid_html_tags)]
4840    #[doc = "Optional. Performer"]
4841    #[allow(clippy::needless_lifetimes)]
4842    fn get_performer<'a>(&'a self) -> Option<&'a str>;
4843    #[allow(rustdoc::invalid_html_tags)]
4844    #[doc = "Optional. Performer"]
4845    #[allow(clippy::needless_lifetimes)]
4846    fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self;
4847    #[allow(rustdoc::invalid_html_tags)]
4848    #[doc = "Optional. Audio duration in seconds"]
4849    #[allow(clippy::needless_lifetimes)]
4850    fn get_audio_duration<'a>(&'a self) -> Option<i64>;
4851    #[allow(rustdoc::invalid_html_tags)]
4852    #[doc = "Optional. Audio duration in seconds"]
4853    #[allow(clippy::needless_lifetimes)]
4854    fn set_audio_duration<'a>(&'a mut self, audio_duration: Option<i64>) -> &'a mut Self;
4855    #[allow(rustdoc::invalid_html_tags)]
4856    #[doc = "Optional. Inline keyboard attached to the message"]
4857    #[allow(clippy::needless_lifetimes)]
4858    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
4859    #[allow(rustdoc::invalid_html_tags)]
4860    #[doc = "Optional. Inline keyboard attached to the message"]
4861    #[allow(clippy::needless_lifetimes)]
4862    fn set_reply_markup<'a>(
4863        &'a mut self,
4864        reply_markup: Option<InlineKeyboardMarkup>,
4865    ) -> &'a mut Self;
4866    #[allow(rustdoc::invalid_html_tags)]
4867    #[doc = "Optional. Content of the message to be sent instead of the audio"]
4868    #[allow(clippy::needless_lifetimes)]
4869    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
4870    #[allow(rustdoc::invalid_html_tags)]
4871    #[doc = "Optional. Content of the message to be sent instead of the audio"]
4872    #[allow(clippy::needless_lifetimes)]
4873    fn set_input_message_content<'a>(
4874        &'a mut self,
4875        input_message_content: Option<InputMessageContent>,
4876    ) -> &'a mut Self;
4877}
4878#[allow(dead_code)]
4879trait TraitMessage {
4880    #[allow(rustdoc::invalid_html_tags)]
4881    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
4882    #[allow(clippy::needless_lifetimes)]
4883    fn get_message_id<'a>(&'a self) -> i64;
4884    #[allow(rustdoc::invalid_html_tags)]
4885    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
4886    #[allow(clippy::needless_lifetimes)]
4887    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self;
4888    #[allow(rustdoc::invalid_html_tags)]
4889    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
4890    #[allow(clippy::needless_lifetimes)]
4891    fn get_message_thread_id<'a>(&'a self) -> Option<i64>;
4892    #[allow(rustdoc::invalid_html_tags)]
4893    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
4894    #[allow(clippy::needless_lifetimes)]
4895    fn set_message_thread_id<'a>(&'a mut self, message_thread_id: Option<i64>) -> &'a mut Self;
4896    #[allow(rustdoc::invalid_html_tags)]
4897    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
4898    #[allow(clippy::needless_lifetimes)]
4899    fn get_direct_messages_topic<'a>(&'a self) -> Option<&'a DirectMessagesTopic>;
4900    #[allow(rustdoc::invalid_html_tags)]
4901    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
4902    #[allow(clippy::needless_lifetimes)]
4903    fn set_direct_messages_topic<'a>(
4904        &'a mut self,
4905        direct_messages_topic: Option<DirectMessagesTopic>,
4906    ) -> &'a mut Self;
4907    #[allow(rustdoc::invalid_html_tags)]
4908    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
4909    #[allow(clippy::needless_lifetimes)]
4910    fn get_from<'a>(&'a self) -> Option<&'a User>;
4911    #[allow(rustdoc::invalid_html_tags)]
4912    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
4913    #[allow(clippy::needless_lifetimes)]
4914    fn set_from<'a>(&'a mut self, from: Option<User>) -> &'a mut Self;
4915    #[allow(rustdoc::invalid_html_tags)]
4916    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
4917    #[allow(clippy::needless_lifetimes)]
4918    fn get_sender_chat<'a>(&'a self) -> Option<&'a Chat>;
4919    #[allow(rustdoc::invalid_html_tags)]
4920    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
4921    #[allow(clippy::needless_lifetimes)]
4922    fn set_sender_chat<'a>(&'a mut self, sender_chat: Option<Chat>) -> &'a mut Self;
4923    #[allow(rustdoc::invalid_html_tags)]
4924    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
4925    #[allow(clippy::needless_lifetimes)]
4926    fn get_sender_boost_count<'a>(&'a self) -> Option<i64>;
4927    #[allow(rustdoc::invalid_html_tags)]
4928    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
4929    #[allow(clippy::needless_lifetimes)]
4930    fn set_sender_boost_count<'a>(&'a mut self, sender_boost_count: Option<i64>) -> &'a mut Self;
4931    #[allow(rustdoc::invalid_html_tags)]
4932    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
4933    #[allow(clippy::needless_lifetimes)]
4934    fn get_sender_business_bot<'a>(&'a self) -> Option<&'a User>;
4935    #[allow(rustdoc::invalid_html_tags)]
4936    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
4937    #[allow(clippy::needless_lifetimes)]
4938    fn set_sender_business_bot<'a>(&'a mut self, sender_business_bot: Option<User>)
4939        -> &'a mut Self;
4940    #[allow(rustdoc::invalid_html_tags)]
4941    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
4942    #[allow(clippy::needless_lifetimes)]
4943    fn get_date<'a>(&'a self) -> i64;
4944    #[allow(rustdoc::invalid_html_tags)]
4945    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
4946    #[allow(clippy::needless_lifetimes)]
4947    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
4948    #[allow(rustdoc::invalid_html_tags)]
4949    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
4950    #[allow(clippy::needless_lifetimes)]
4951    fn get_business_connection_id<'a>(&'a self) -> Option<&'a str>;
4952    #[allow(rustdoc::invalid_html_tags)]
4953    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
4954    #[allow(clippy::needless_lifetimes)]
4955    fn set_business_connection_id<'a>(
4956        &'a mut self,
4957        business_connection_id: Option<String>,
4958    ) -> &'a mut Self;
4959    #[allow(rustdoc::invalid_html_tags)]
4960    #[doc = "Chat the message belongs to"]
4961    #[allow(clippy::needless_lifetimes)]
4962    fn get_chat<'a>(&'a self) -> &'a Chat;
4963    #[allow(rustdoc::invalid_html_tags)]
4964    #[doc = "Chat the message belongs to"]
4965    #[allow(clippy::needless_lifetimes)]
4966    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
4967    #[allow(rustdoc::invalid_html_tags)]
4968    #[doc = "Optional. Information about the original message for forwarded messages"]
4969    #[allow(clippy::needless_lifetimes)]
4970    fn get_forward_origin<'a>(&'a self) -> Option<&'a MessageOrigin>;
4971    #[allow(rustdoc::invalid_html_tags)]
4972    #[doc = "Optional. Information about the original message for forwarded messages"]
4973    #[allow(clippy::needless_lifetimes)]
4974    fn set_forward_origin<'a>(&'a mut self, forward_origin: Option<MessageOrigin>) -> &'a mut Self;
4975    #[allow(rustdoc::invalid_html_tags)]
4976    #[doc = "Optional. True, if the message is sent to a forum topic"]
4977    #[allow(clippy::needless_lifetimes)]
4978    fn get_is_topic_message<'a>(&'a self) -> Option<bool>;
4979    #[allow(rustdoc::invalid_html_tags)]
4980    #[doc = "Optional. True, if the message is sent to a forum topic"]
4981    #[allow(clippy::needless_lifetimes)]
4982    fn set_is_topic_message<'a>(&'a mut self, is_topic_message: Option<bool>) -> &'a mut Self;
4983    #[allow(rustdoc::invalid_html_tags)]
4984    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
4985    #[allow(clippy::needless_lifetimes)]
4986    fn get_is_automatic_forward<'a>(&'a self) -> Option<bool>;
4987    #[allow(rustdoc::invalid_html_tags)]
4988    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
4989    #[allow(clippy::needless_lifetimes)]
4990    fn set_is_automatic_forward<'a>(
4991        &'a mut self,
4992        is_automatic_forward: Option<bool>,
4993    ) -> &'a mut Self;
4994    #[allow(rustdoc::invalid_html_tags)]
4995    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
4996    #[allow(clippy::needless_lifetimes)]
4997    fn get_reply_to_message<'a>(&'a self) -> Option<&'a Message>;
4998    #[allow(rustdoc::invalid_html_tags)]
4999    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
5000    #[allow(clippy::needless_lifetimes)]
5001    fn set_reply_to_message<'a>(&'a mut self, reply_to_message: Option<Message>) -> &'a mut Self;
5002    #[allow(rustdoc::invalid_html_tags)]
5003    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
5004    #[allow(clippy::needless_lifetimes)]
5005    fn get_external_reply<'a>(&'a self) -> Option<&'a ExternalReplyInfo>;
5006    #[allow(rustdoc::invalid_html_tags)]
5007    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
5008    #[allow(clippy::needless_lifetimes)]
5009    fn set_external_reply<'a>(
5010        &'a mut self,
5011        external_reply: Option<ExternalReplyInfo>,
5012    ) -> &'a mut Self;
5013    #[allow(rustdoc::invalid_html_tags)]
5014    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
5015    #[allow(clippy::needless_lifetimes)]
5016    fn get_quote<'a>(&'a self) -> Option<&'a TextQuote>;
5017    #[allow(rustdoc::invalid_html_tags)]
5018    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
5019    #[allow(clippy::needless_lifetimes)]
5020    fn set_quote<'a>(&'a mut self, quote: Option<TextQuote>) -> &'a mut Self;
5021    #[allow(rustdoc::invalid_html_tags)]
5022    #[doc = "Optional. For replies to a story, the original story"]
5023    #[allow(clippy::needless_lifetimes)]
5024    fn get_reply_to_story<'a>(&'a self) -> Option<&'a Story>;
5025    #[allow(rustdoc::invalid_html_tags)]
5026    #[doc = "Optional. For replies to a story, the original story"]
5027    #[allow(clippy::needless_lifetimes)]
5028    fn set_reply_to_story<'a>(&'a mut self, reply_to_story: Option<Story>) -> &'a mut Self;
5029    #[allow(rustdoc::invalid_html_tags)]
5030    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
5031    #[allow(clippy::needless_lifetimes)]
5032    fn get_reply_to_checklist_task_id<'a>(&'a self) -> Option<i64>;
5033    #[allow(rustdoc::invalid_html_tags)]
5034    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
5035    #[allow(clippy::needless_lifetimes)]
5036    fn set_reply_to_checklist_task_id<'a>(
5037        &'a mut self,
5038        reply_to_checklist_task_id: Option<i64>,
5039    ) -> &'a mut Self;
5040    #[allow(rustdoc::invalid_html_tags)]
5041    #[doc = "Optional. Bot through which the message was sent"]
5042    #[allow(clippy::needless_lifetimes)]
5043    fn get_via_bot<'a>(&'a self) -> Option<&'a User>;
5044    #[allow(rustdoc::invalid_html_tags)]
5045    #[doc = "Optional. Bot through which the message was sent"]
5046    #[allow(clippy::needless_lifetimes)]
5047    fn set_via_bot<'a>(&'a mut self, via_bot: Option<User>) -> &'a mut Self;
5048    #[allow(rustdoc::invalid_html_tags)]
5049    #[doc = "Optional. Date the message was last edited in Unix time"]
5050    #[allow(clippy::needless_lifetimes)]
5051    fn get_edit_date<'a>(&'a self) -> Option<i64>;
5052    #[allow(rustdoc::invalid_html_tags)]
5053    #[doc = "Optional. Date the message was last edited in Unix time"]
5054    #[allow(clippy::needless_lifetimes)]
5055    fn set_edit_date<'a>(&'a mut self, edit_date: Option<i64>) -> &'a mut Self;
5056    #[allow(rustdoc::invalid_html_tags)]
5057    #[doc = "Optional. True, if the message can't be forwarded"]
5058    #[allow(clippy::needless_lifetimes)]
5059    fn get_has_protected_content<'a>(&'a self) -> Option<bool>;
5060    #[allow(rustdoc::invalid_html_tags)]
5061    #[doc = "Optional. True, if the message can't be forwarded"]
5062    #[allow(clippy::needless_lifetimes)]
5063    fn set_has_protected_content<'a>(
5064        &'a mut self,
5065        has_protected_content: Option<bool>,
5066    ) -> &'a mut Self;
5067    #[allow(rustdoc::invalid_html_tags)]
5068    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
5069    #[allow(clippy::needless_lifetimes)]
5070    fn get_is_from_offline<'a>(&'a self) -> Option<bool>;
5071    #[allow(rustdoc::invalid_html_tags)]
5072    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
5073    #[allow(clippy::needless_lifetimes)]
5074    fn set_is_from_offline<'a>(&'a mut self, is_from_offline: Option<bool>) -> &'a mut Self;
5075    #[allow(rustdoc::invalid_html_tags)]
5076    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
5077    #[allow(clippy::needless_lifetimes)]
5078    fn get_is_paid_post<'a>(&'a self) -> Option<bool>;
5079    #[allow(rustdoc::invalid_html_tags)]
5080    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
5081    #[allow(clippy::needless_lifetimes)]
5082    fn set_is_paid_post<'a>(&'a mut self, is_paid_post: Option<bool>) -> &'a mut Self;
5083    #[allow(rustdoc::invalid_html_tags)]
5084    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
5085    #[allow(clippy::needless_lifetimes)]
5086    fn get_media_group_id<'a>(&'a self) -> Option<&'a str>;
5087    #[allow(rustdoc::invalid_html_tags)]
5088    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
5089    #[allow(clippy::needless_lifetimes)]
5090    fn set_media_group_id<'a>(&'a mut self, media_group_id: Option<String>) -> &'a mut Self;
5091    #[allow(rustdoc::invalid_html_tags)]
5092    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
5093    #[allow(clippy::needless_lifetimes)]
5094    fn get_author_signature<'a>(&'a self) -> Option<&'a str>;
5095    #[allow(rustdoc::invalid_html_tags)]
5096    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
5097    #[allow(clippy::needless_lifetimes)]
5098    fn set_author_signature<'a>(&'a mut self, author_signature: Option<String>) -> &'a mut Self;
5099    #[allow(rustdoc::invalid_html_tags)]
5100    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
5101    #[allow(clippy::needless_lifetimes)]
5102    fn get_paid_star_count<'a>(&'a self) -> Option<i64>;
5103    #[allow(rustdoc::invalid_html_tags)]
5104    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
5105    #[allow(clippy::needless_lifetimes)]
5106    fn set_paid_star_count<'a>(&'a mut self, paid_star_count: Option<i64>) -> &'a mut Self;
5107    #[allow(rustdoc::invalid_html_tags)]
5108    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
5109    #[allow(clippy::needless_lifetimes)]
5110    fn get_text<'a>(&'a self) -> Option<&'a str>;
5111    #[allow(rustdoc::invalid_html_tags)]
5112    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
5113    #[allow(clippy::needless_lifetimes)]
5114    fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self;
5115    #[allow(rustdoc::invalid_html_tags)]
5116    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
5117    #[allow(clippy::needless_lifetimes)]
5118    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
5119    #[allow(rustdoc::invalid_html_tags)]
5120    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
5121    #[allow(clippy::needless_lifetimes)]
5122    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self;
5123    #[allow(rustdoc::invalid_html_tags)]
5124    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
5125    #[allow(clippy::needless_lifetimes)]
5126    fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions>;
5127    #[allow(rustdoc::invalid_html_tags)]
5128    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
5129    #[allow(clippy::needless_lifetimes)]
5130    fn set_link_preview_options<'a>(
5131        &'a mut self,
5132        link_preview_options: Option<LinkPreviewOptions>,
5133    ) -> &'a mut Self;
5134    #[allow(rustdoc::invalid_html_tags)]
5135    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
5136    #[allow(clippy::needless_lifetimes)]
5137    fn get_suggested_post_info<'a>(&'a self) -> Option<&'a SuggestedPostInfo>;
5138    #[allow(rustdoc::invalid_html_tags)]
5139    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
5140    #[allow(clippy::needless_lifetimes)]
5141    fn set_suggested_post_info<'a>(
5142        &'a mut self,
5143        suggested_post_info: Option<SuggestedPostInfo>,
5144    ) -> &'a mut Self;
5145    #[allow(rustdoc::invalid_html_tags)]
5146    #[doc = "Optional. Unique identifier of the message effect added to the message"]
5147    #[allow(clippy::needless_lifetimes)]
5148    fn get_effect_id<'a>(&'a self) -> Option<&'a str>;
5149    #[allow(rustdoc::invalid_html_tags)]
5150    #[doc = "Optional. Unique identifier of the message effect added to the message"]
5151    #[allow(clippy::needless_lifetimes)]
5152    fn set_effect_id<'a>(&'a mut self, effect_id: Option<String>) -> &'a mut Self;
5153    #[allow(rustdoc::invalid_html_tags)]
5154    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
5155    #[allow(clippy::needless_lifetimes)]
5156    fn get_animation<'a>(&'a self) -> Option<&'a Animation>;
5157    #[allow(rustdoc::invalid_html_tags)]
5158    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
5159    #[allow(clippy::needless_lifetimes)]
5160    fn set_animation<'a>(&'a mut self, animation: Option<Animation>) -> &'a mut Self;
5161    #[allow(rustdoc::invalid_html_tags)]
5162    #[doc = "Optional. Message is an audio file, information about the file"]
5163    #[allow(clippy::needless_lifetimes)]
5164    fn get_audio<'a>(&'a self) -> Option<&'a Audio>;
5165    #[allow(rustdoc::invalid_html_tags)]
5166    #[doc = "Optional. Message is an audio file, information about the file"]
5167    #[allow(clippy::needless_lifetimes)]
5168    fn set_audio<'a>(&'a mut self, audio: Option<Audio>) -> &'a mut Self;
5169    #[allow(rustdoc::invalid_html_tags)]
5170    #[doc = "Optional. Message is a general file, information about the file"]
5171    #[allow(clippy::needless_lifetimes)]
5172    fn get_document<'a>(&'a self) -> Option<&'a Document>;
5173    #[allow(rustdoc::invalid_html_tags)]
5174    #[doc = "Optional. Message is a general file, information about the file"]
5175    #[allow(clippy::needless_lifetimes)]
5176    fn set_document<'a>(&'a mut self, document: Option<Document>) -> &'a mut Self;
5177    #[allow(rustdoc::invalid_html_tags)]
5178    #[doc = "Optional. Message contains paid media; information about the paid media"]
5179    #[allow(clippy::needless_lifetimes)]
5180    fn get_paid_media<'a>(&'a self) -> Option<&'a PaidMediaInfo>;
5181    #[allow(rustdoc::invalid_html_tags)]
5182    #[doc = "Optional. Message contains paid media; information about the paid media"]
5183    #[allow(clippy::needless_lifetimes)]
5184    fn set_paid_media<'a>(&'a mut self, paid_media: Option<PaidMediaInfo>) -> &'a mut Self;
5185    #[allow(rustdoc::invalid_html_tags)]
5186    #[doc = "Optional. Message is a photo, available sizes of the photo"]
5187    #[allow(clippy::needless_lifetimes)]
5188    fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>>;
5189    #[allow(rustdoc::invalid_html_tags)]
5190    #[doc = "Optional. Message is a photo, available sizes of the photo"]
5191    #[allow(clippy::needless_lifetimes)]
5192    fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self;
5193    #[allow(rustdoc::invalid_html_tags)]
5194    #[doc = "Optional. Message is a sticker, information about the sticker"]
5195    #[allow(clippy::needless_lifetimes)]
5196    fn get_sticker<'a>(&'a self) -> Option<&'a Sticker>;
5197    #[allow(rustdoc::invalid_html_tags)]
5198    #[doc = "Optional. Message is a sticker, information about the sticker"]
5199    #[allow(clippy::needless_lifetimes)]
5200    fn set_sticker<'a>(&'a mut self, sticker: Option<Sticker>) -> &'a mut Self;
5201    #[allow(rustdoc::invalid_html_tags)]
5202    #[doc = "Optional. Message is a forwarded story"]
5203    #[allow(clippy::needless_lifetimes)]
5204    fn get_story<'a>(&'a self) -> Option<&'a Story>;
5205    #[allow(rustdoc::invalid_html_tags)]
5206    #[doc = "Optional. Message is a forwarded story"]
5207    #[allow(clippy::needless_lifetimes)]
5208    fn set_story<'a>(&'a mut self, story: Option<Story>) -> &'a mut Self;
5209    #[allow(rustdoc::invalid_html_tags)]
5210    #[doc = "Optional. Message is a video, information about the video"]
5211    #[allow(clippy::needless_lifetimes)]
5212    fn get_video<'a>(&'a self) -> Option<&'a Video>;
5213    #[allow(rustdoc::invalid_html_tags)]
5214    #[doc = "Optional. Message is a video, information about the video"]
5215    #[allow(clippy::needless_lifetimes)]
5216    fn set_video<'a>(&'a mut self, video: Option<Video>) -> &'a mut Self;
5217    #[allow(rustdoc::invalid_html_tags)]
5218    #[doc = "Optional. Message is a video note, information about the video message"]
5219    #[allow(clippy::needless_lifetimes)]
5220    fn get_video_note<'a>(&'a self) -> Option<&'a VideoNote>;
5221    #[allow(rustdoc::invalid_html_tags)]
5222    #[doc = "Optional. Message is a video note, information about the video message"]
5223    #[allow(clippy::needless_lifetimes)]
5224    fn set_video_note<'a>(&'a mut self, video_note: Option<VideoNote>) -> &'a mut Self;
5225    #[allow(rustdoc::invalid_html_tags)]
5226    #[doc = "Optional. Message is a voice message, information about the file"]
5227    #[allow(clippy::needless_lifetimes)]
5228    fn get_voice<'a>(&'a self) -> Option<&'a Voice>;
5229    #[allow(rustdoc::invalid_html_tags)]
5230    #[doc = "Optional. Message is a voice message, information about the file"]
5231    #[allow(clippy::needless_lifetimes)]
5232    fn set_voice<'a>(&'a mut self, voice: Option<Voice>) -> &'a mut Self;
5233    #[allow(rustdoc::invalid_html_tags)]
5234    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
5235    #[allow(clippy::needless_lifetimes)]
5236    fn get_caption<'a>(&'a self) -> Option<&'a str>;
5237    #[allow(rustdoc::invalid_html_tags)]
5238    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
5239    #[allow(clippy::needless_lifetimes)]
5240    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
5241    #[allow(rustdoc::invalid_html_tags)]
5242    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
5243    #[allow(clippy::needless_lifetimes)]
5244    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
5245    #[allow(rustdoc::invalid_html_tags)]
5246    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
5247    #[allow(clippy::needless_lifetimes)]
5248    fn set_caption_entities<'a>(
5249        &'a mut self,
5250        caption_entities: Option<Vec<MessageEntity>>,
5251    ) -> &'a mut Self;
5252    #[allow(rustdoc::invalid_html_tags)]
5253    #[doc = "Optional. True, if the caption must be shown above the message media"]
5254    #[allow(clippy::needless_lifetimes)]
5255    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
5256    #[allow(rustdoc::invalid_html_tags)]
5257    #[doc = "Optional. True, if the caption must be shown above the message media"]
5258    #[allow(clippy::needless_lifetimes)]
5259    fn set_show_caption_above_media<'a>(
5260        &'a mut self,
5261        show_caption_above_media: Option<bool>,
5262    ) -> &'a mut Self;
5263    #[allow(rustdoc::invalid_html_tags)]
5264    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
5265    #[allow(clippy::needless_lifetimes)]
5266    fn get_has_media_spoiler<'a>(&'a self) -> Option<bool>;
5267    #[allow(rustdoc::invalid_html_tags)]
5268    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
5269    #[allow(clippy::needless_lifetimes)]
5270    fn set_has_media_spoiler<'a>(&'a mut self, has_media_spoiler: Option<bool>) -> &'a mut Self;
5271    #[allow(rustdoc::invalid_html_tags)]
5272    #[doc = "Optional. Message is a checklist"]
5273    #[allow(clippy::needless_lifetimes)]
5274    fn get_checklist<'a>(&'a self) -> Option<&'a Checklist>;
5275    #[allow(rustdoc::invalid_html_tags)]
5276    #[doc = "Optional. Message is a checklist"]
5277    #[allow(clippy::needless_lifetimes)]
5278    fn set_checklist<'a>(&'a mut self, checklist: Option<Checklist>) -> &'a mut Self;
5279    #[allow(rustdoc::invalid_html_tags)]
5280    #[doc = "Optional. Message is a shared contact, information about the contact"]
5281    #[allow(clippy::needless_lifetimes)]
5282    fn get_contact<'a>(&'a self) -> Option<&'a Contact>;
5283    #[allow(rustdoc::invalid_html_tags)]
5284    #[doc = "Optional. Message is a shared contact, information about the contact"]
5285    #[allow(clippy::needless_lifetimes)]
5286    fn set_contact<'a>(&'a mut self, contact: Option<Contact>) -> &'a mut Self;
5287    #[allow(rustdoc::invalid_html_tags)]
5288    #[doc = "Optional. Message is a dice with random value"]
5289    #[allow(clippy::needless_lifetimes)]
5290    fn get_dice<'a>(&'a self) -> Option<&'a Dice>;
5291    #[allow(rustdoc::invalid_html_tags)]
5292    #[doc = "Optional. Message is a dice with random value"]
5293    #[allow(clippy::needless_lifetimes)]
5294    fn set_dice<'a>(&'a mut self, dice: Option<Dice>) -> &'a mut Self;
5295    #[allow(rustdoc::invalid_html_tags)]
5296    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
5297    #[allow(clippy::needless_lifetimes)]
5298    fn get_game<'a>(&'a self) -> Option<&'a Game>;
5299    #[allow(rustdoc::invalid_html_tags)]
5300    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
5301    #[allow(clippy::needless_lifetimes)]
5302    fn set_game<'a>(&'a mut self, game: Option<Game>) -> &'a mut Self;
5303    #[allow(rustdoc::invalid_html_tags)]
5304    #[doc = "Optional. Message is a native poll, information about the poll"]
5305    #[allow(clippy::needless_lifetimes)]
5306    fn get_poll<'a>(&'a self) -> Option<&'a Poll>;
5307    #[allow(rustdoc::invalid_html_tags)]
5308    #[doc = "Optional. Message is a native poll, information about the poll"]
5309    #[allow(clippy::needless_lifetimes)]
5310    fn set_poll<'a>(&'a mut self, poll: Option<Poll>) -> &'a mut Self;
5311    #[allow(rustdoc::invalid_html_tags)]
5312    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
5313    #[allow(clippy::needless_lifetimes)]
5314    fn get_venue<'a>(&'a self) -> Option<&'a Venue>;
5315    #[allow(rustdoc::invalid_html_tags)]
5316    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
5317    #[allow(clippy::needless_lifetimes)]
5318    fn set_venue<'a>(&'a mut self, venue: Option<Venue>) -> &'a mut Self;
5319    #[allow(rustdoc::invalid_html_tags)]
5320    #[doc = "Optional. Message is a shared location, information about the location"]
5321    #[allow(clippy::needless_lifetimes)]
5322    fn get_location<'a>(&'a self) -> Option<&'a Location>;
5323    #[allow(rustdoc::invalid_html_tags)]
5324    #[doc = "Optional. Message is a shared location, information about the location"]
5325    #[allow(clippy::needless_lifetimes)]
5326    fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self;
5327    #[allow(rustdoc::invalid_html_tags)]
5328    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
5329    #[allow(clippy::needless_lifetimes)]
5330    fn get_new_chat_members<'a>(&'a self) -> Option<&'a Vec<User>>;
5331    #[allow(rustdoc::invalid_html_tags)]
5332    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
5333    #[allow(clippy::needless_lifetimes)]
5334    fn set_new_chat_members<'a>(&'a mut self, new_chat_members: Option<Vec<User>>) -> &'a mut Self;
5335    #[allow(rustdoc::invalid_html_tags)]
5336    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
5337    #[allow(clippy::needless_lifetimes)]
5338    fn get_left_chat_member<'a>(&'a self) -> Option<&'a User>;
5339    #[allow(rustdoc::invalid_html_tags)]
5340    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
5341    #[allow(clippy::needless_lifetimes)]
5342    fn set_left_chat_member<'a>(&'a mut self, left_chat_member: Option<User>) -> &'a mut Self;
5343    #[allow(rustdoc::invalid_html_tags)]
5344    #[doc = "Optional. A chat title was changed to this value"]
5345    #[allow(clippy::needless_lifetimes)]
5346    fn get_new_chat_title<'a>(&'a self) -> Option<&'a str>;
5347    #[allow(rustdoc::invalid_html_tags)]
5348    #[doc = "Optional. A chat title was changed to this value"]
5349    #[allow(clippy::needless_lifetimes)]
5350    fn set_new_chat_title<'a>(&'a mut self, new_chat_title: Option<String>) -> &'a mut Self;
5351    #[allow(rustdoc::invalid_html_tags)]
5352    #[doc = "Optional. A chat photo was change to this value"]
5353    #[allow(clippy::needless_lifetimes)]
5354    fn get_new_chat_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>>;
5355    #[allow(rustdoc::invalid_html_tags)]
5356    #[doc = "Optional. A chat photo was change to this value"]
5357    #[allow(clippy::needless_lifetimes)]
5358    fn set_new_chat_photo<'a>(&'a mut self, new_chat_photo: Option<Vec<PhotoSize>>)
5359        -> &'a mut Self;
5360    #[allow(rustdoc::invalid_html_tags)]
5361    #[doc = "Optional. Service message: the chat photo was deleted"]
5362    #[allow(clippy::needless_lifetimes)]
5363    fn get_delete_chat_photo<'a>(&'a self) -> Option<bool>;
5364    #[allow(rustdoc::invalid_html_tags)]
5365    #[doc = "Optional. Service message: the chat photo was deleted"]
5366    #[allow(clippy::needless_lifetimes)]
5367    fn set_delete_chat_photo<'a>(&'a mut self, delete_chat_photo: Option<bool>) -> &'a mut Self;
5368    #[allow(rustdoc::invalid_html_tags)]
5369    #[doc = "Optional. Service message: the group has been created"]
5370    #[allow(clippy::needless_lifetimes)]
5371    fn get_group_chat_created<'a>(&'a self) -> Option<bool>;
5372    #[allow(rustdoc::invalid_html_tags)]
5373    #[doc = "Optional. Service message: the group has been created"]
5374    #[allow(clippy::needless_lifetimes)]
5375    fn set_group_chat_created<'a>(&'a mut self, group_chat_created: Option<bool>) -> &'a mut Self;
5376    #[allow(rustdoc::invalid_html_tags)]
5377    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
5378    #[allow(clippy::needless_lifetimes)]
5379    fn get_supergroup_chat_created<'a>(&'a self) -> Option<bool>;
5380    #[allow(rustdoc::invalid_html_tags)]
5381    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
5382    #[allow(clippy::needless_lifetimes)]
5383    fn set_supergroup_chat_created<'a>(
5384        &'a mut self,
5385        supergroup_chat_created: Option<bool>,
5386    ) -> &'a mut Self;
5387    #[allow(rustdoc::invalid_html_tags)]
5388    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
5389    #[allow(clippy::needless_lifetimes)]
5390    fn get_channel_chat_created<'a>(&'a self) -> Option<bool>;
5391    #[allow(rustdoc::invalid_html_tags)]
5392    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
5393    #[allow(clippy::needless_lifetimes)]
5394    fn set_channel_chat_created<'a>(
5395        &'a mut self,
5396        channel_chat_created: Option<bool>,
5397    ) -> &'a mut Self;
5398    #[allow(rustdoc::invalid_html_tags)]
5399    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
5400    #[allow(clippy::needless_lifetimes)]
5401    fn get_message_auto_delete_timer_changed<'a>(
5402        &'a self,
5403    ) -> Option<&'a MessageAutoDeleteTimerChanged>;
5404    #[allow(rustdoc::invalid_html_tags)]
5405    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
5406    #[allow(clippy::needless_lifetimes)]
5407    fn set_message_auto_delete_timer_changed<'a>(
5408        &'a mut self,
5409        message_auto_delete_timer_changed: Option<MessageAutoDeleteTimerChanged>,
5410    ) -> &'a mut Self;
5411    #[allow(rustdoc::invalid_html_tags)]
5412    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
5413    #[allow(clippy::needless_lifetimes)]
5414    fn get_migrate_to_chat_id<'a>(&'a self) -> Option<i64>;
5415    #[allow(rustdoc::invalid_html_tags)]
5416    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
5417    #[allow(clippy::needless_lifetimes)]
5418    fn set_migrate_to_chat_id<'a>(&'a mut self, migrate_to_chat_id: Option<i64>) -> &'a mut Self;
5419    #[allow(rustdoc::invalid_html_tags)]
5420    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
5421    #[allow(clippy::needless_lifetimes)]
5422    fn get_migrate_from_chat_id<'a>(&'a self) -> Option<i64>;
5423    #[allow(rustdoc::invalid_html_tags)]
5424    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
5425    #[allow(clippy::needless_lifetimes)]
5426    fn set_migrate_from_chat_id<'a>(
5427        &'a mut self,
5428        migrate_from_chat_id: Option<i64>,
5429    ) -> &'a mut Self;
5430    #[allow(rustdoc::invalid_html_tags)]
5431    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
5432    #[allow(clippy::needless_lifetimes)]
5433    fn get_pinned_message<'a>(&'a self) -> Option<&'a MaybeInaccessibleMessage>;
5434    #[allow(rustdoc::invalid_html_tags)]
5435    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
5436    #[allow(clippy::needless_lifetimes)]
5437    fn set_pinned_message<'a>(
5438        &'a mut self,
5439        pinned_message: Option<MaybeInaccessibleMessage>,
5440    ) -> &'a mut Self;
5441    #[allow(rustdoc::invalid_html_tags)]
5442    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
5443    #[allow(clippy::needless_lifetimes)]
5444    fn get_invoice<'a>(&'a self) -> Option<&'a Invoice>;
5445    #[allow(rustdoc::invalid_html_tags)]
5446    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
5447    #[allow(clippy::needless_lifetimes)]
5448    fn set_invoice<'a>(&'a mut self, invoice: Option<Invoice>) -> &'a mut Self;
5449    #[allow(rustdoc::invalid_html_tags)]
5450    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
5451    #[allow(clippy::needless_lifetimes)]
5452    fn get_successful_payment<'a>(&'a self) -> Option<&'a SuccessfulPayment>;
5453    #[allow(rustdoc::invalid_html_tags)]
5454    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
5455    #[allow(clippy::needless_lifetimes)]
5456    fn set_successful_payment<'a>(
5457        &'a mut self,
5458        successful_payment: Option<SuccessfulPayment>,
5459    ) -> &'a mut Self;
5460    #[allow(rustdoc::invalid_html_tags)]
5461    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
5462    #[allow(clippy::needless_lifetimes)]
5463    fn get_refunded_payment<'a>(&'a self) -> Option<&'a RefundedPayment>;
5464    #[allow(rustdoc::invalid_html_tags)]
5465    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
5466    #[allow(clippy::needless_lifetimes)]
5467    fn set_refunded_payment<'a>(
5468        &'a mut self,
5469        refunded_payment: Option<RefundedPayment>,
5470    ) -> &'a mut Self;
5471    #[allow(rustdoc::invalid_html_tags)]
5472    #[doc = "Optional. Service message: users were shared with the bot"]
5473    #[allow(clippy::needless_lifetimes)]
5474    fn get_users_shared<'a>(&'a self) -> Option<&'a UsersShared>;
5475    #[allow(rustdoc::invalid_html_tags)]
5476    #[doc = "Optional. Service message: users were shared with the bot"]
5477    #[allow(clippy::needless_lifetimes)]
5478    fn set_users_shared<'a>(&'a mut self, users_shared: Option<UsersShared>) -> &'a mut Self;
5479    #[allow(rustdoc::invalid_html_tags)]
5480    #[doc = "Optional. Service message: a chat was shared with the bot"]
5481    #[allow(clippy::needless_lifetimes)]
5482    fn get_chat_shared<'a>(&'a self) -> Option<&'a ChatShared>;
5483    #[allow(rustdoc::invalid_html_tags)]
5484    #[doc = "Optional. Service message: a chat was shared with the bot"]
5485    #[allow(clippy::needless_lifetimes)]
5486    fn set_chat_shared<'a>(&'a mut self, chat_shared: Option<ChatShared>) -> &'a mut Self;
5487    #[allow(rustdoc::invalid_html_tags)]
5488    #[doc = "Optional. Service message: a regular gift was sent or received"]
5489    #[allow(clippy::needless_lifetimes)]
5490    fn get_gift<'a>(&'a self) -> Option<&'a GiftInfo>;
5491    #[allow(rustdoc::invalid_html_tags)]
5492    #[doc = "Optional. Service message: a regular gift was sent or received"]
5493    #[allow(clippy::needless_lifetimes)]
5494    fn set_gift<'a>(&'a mut self, gift: Option<GiftInfo>) -> &'a mut Self;
5495    #[allow(rustdoc::invalid_html_tags)]
5496    #[doc = "Optional. Service message: a unique gift was sent or received"]
5497    #[allow(clippy::needless_lifetimes)]
5498    fn get_unique_gift<'a>(&'a self) -> Option<&'a UniqueGiftInfo>;
5499    #[allow(rustdoc::invalid_html_tags)]
5500    #[doc = "Optional. Service message: a unique gift was sent or received"]
5501    #[allow(clippy::needless_lifetimes)]
5502    fn set_unique_gift<'a>(&'a mut self, unique_gift: Option<UniqueGiftInfo>) -> &'a mut Self;
5503    #[allow(rustdoc::invalid_html_tags)]
5504    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
5505    #[allow(clippy::needless_lifetimes)]
5506    fn get_connected_website<'a>(&'a self) -> Option<&'a str>;
5507    #[allow(rustdoc::invalid_html_tags)]
5508    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
5509    #[allow(clippy::needless_lifetimes)]
5510    fn set_connected_website<'a>(&'a mut self, connected_website: Option<String>) -> &'a mut Self;
5511    #[allow(rustdoc::invalid_html_tags)]
5512    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
5513    #[allow(clippy::needless_lifetimes)]
5514    fn get_write_access_allowed<'a>(&'a self) -> Option<&'a WriteAccessAllowed>;
5515    #[allow(rustdoc::invalid_html_tags)]
5516    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
5517    #[allow(clippy::needless_lifetimes)]
5518    fn set_write_access_allowed<'a>(
5519        &'a mut self,
5520        write_access_allowed: Option<WriteAccessAllowed>,
5521    ) -> &'a mut Self;
5522    #[allow(rustdoc::invalid_html_tags)]
5523    #[doc = "Optional. Telegram Passport data"]
5524    #[allow(clippy::needless_lifetimes)]
5525    fn get_passport_data<'a>(&'a self) -> Option<&'a PassportData>;
5526    #[allow(rustdoc::invalid_html_tags)]
5527    #[doc = "Optional. Telegram Passport data"]
5528    #[allow(clippy::needless_lifetimes)]
5529    fn set_passport_data<'a>(&'a mut self, passport_data: Option<PassportData>) -> &'a mut Self;
5530    #[allow(rustdoc::invalid_html_tags)]
5531    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
5532    #[allow(clippy::needless_lifetimes)]
5533    fn get_proximity_alert_triggered<'a>(&'a self) -> Option<&'a ProximityAlertTriggered>;
5534    #[allow(rustdoc::invalid_html_tags)]
5535    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
5536    #[allow(clippy::needless_lifetimes)]
5537    fn set_proximity_alert_triggered<'a>(
5538        &'a mut self,
5539        proximity_alert_triggered: Option<ProximityAlertTriggered>,
5540    ) -> &'a mut Self;
5541    #[allow(rustdoc::invalid_html_tags)]
5542    #[doc = "Optional. Service message: user boosted the chat"]
5543    #[allow(clippy::needless_lifetimes)]
5544    fn get_boost_added<'a>(&'a self) -> Option<&'a ChatBoostAdded>;
5545    #[allow(rustdoc::invalid_html_tags)]
5546    #[doc = "Optional. Service message: user boosted the chat"]
5547    #[allow(clippy::needless_lifetimes)]
5548    fn set_boost_added<'a>(&'a mut self, boost_added: Option<ChatBoostAdded>) -> &'a mut Self;
5549    #[allow(rustdoc::invalid_html_tags)]
5550    #[doc = "Optional. Service message: chat background set"]
5551    #[allow(clippy::needless_lifetimes)]
5552    fn get_chat_background_set<'a>(&'a self) -> Option<&'a ChatBackground>;
5553    #[allow(rustdoc::invalid_html_tags)]
5554    #[doc = "Optional. Service message: chat background set"]
5555    #[allow(clippy::needless_lifetimes)]
5556    fn set_chat_background_set<'a>(
5557        &'a mut self,
5558        chat_background_set: Option<ChatBackground>,
5559    ) -> &'a mut Self;
5560    #[allow(rustdoc::invalid_html_tags)]
5561    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
5562    #[allow(clippy::needless_lifetimes)]
5563    fn get_checklist_tasks_done<'a>(&'a self) -> Option<&'a ChecklistTasksDone>;
5564    #[allow(rustdoc::invalid_html_tags)]
5565    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
5566    #[allow(clippy::needless_lifetimes)]
5567    fn set_checklist_tasks_done<'a>(
5568        &'a mut self,
5569        checklist_tasks_done: Option<ChecklistTasksDone>,
5570    ) -> &'a mut Self;
5571    #[allow(rustdoc::invalid_html_tags)]
5572    #[doc = "Optional. Service message: tasks were added to a checklist"]
5573    #[allow(clippy::needless_lifetimes)]
5574    fn get_checklist_tasks_added<'a>(&'a self) -> Option<&'a ChecklistTasksAdded>;
5575    #[allow(rustdoc::invalid_html_tags)]
5576    #[doc = "Optional. Service message: tasks were added to a checklist"]
5577    #[allow(clippy::needless_lifetimes)]
5578    fn set_checklist_tasks_added<'a>(
5579        &'a mut self,
5580        checklist_tasks_added: Option<ChecklistTasksAdded>,
5581    ) -> &'a mut Self;
5582    #[allow(rustdoc::invalid_html_tags)]
5583    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
5584    #[allow(clippy::needless_lifetimes)]
5585    fn get_direct_message_price_changed<'a>(&'a self) -> Option<&'a DirectMessagePriceChanged>;
5586    #[allow(rustdoc::invalid_html_tags)]
5587    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
5588    #[allow(clippy::needless_lifetimes)]
5589    fn set_direct_message_price_changed<'a>(
5590        &'a mut self,
5591        direct_message_price_changed: Option<DirectMessagePriceChanged>,
5592    ) -> &'a mut Self;
5593    #[allow(rustdoc::invalid_html_tags)]
5594    #[doc = "Optional. Service message: forum topic created"]
5595    #[allow(clippy::needless_lifetimes)]
5596    fn get_forum_topic_created<'a>(&'a self) -> Option<&'a ForumTopicCreated>;
5597    #[allow(rustdoc::invalid_html_tags)]
5598    #[doc = "Optional. Service message: forum topic created"]
5599    #[allow(clippy::needless_lifetimes)]
5600    fn set_forum_topic_created<'a>(
5601        &'a mut self,
5602        forum_topic_created: Option<ForumTopicCreated>,
5603    ) -> &'a mut Self;
5604    #[allow(rustdoc::invalid_html_tags)]
5605    #[doc = "Optional. Service message: forum topic edited"]
5606    #[allow(clippy::needless_lifetimes)]
5607    fn get_forum_topic_edited<'a>(&'a self) -> Option<&'a ForumTopicEdited>;
5608    #[allow(rustdoc::invalid_html_tags)]
5609    #[doc = "Optional. Service message: forum topic edited"]
5610    #[allow(clippy::needless_lifetimes)]
5611    fn set_forum_topic_edited<'a>(
5612        &'a mut self,
5613        forum_topic_edited: Option<ForumTopicEdited>,
5614    ) -> &'a mut Self;
5615    #[allow(rustdoc::invalid_html_tags)]
5616    #[doc = "Optional. Service message: forum topic closed"]
5617    #[allow(clippy::needless_lifetimes)]
5618    fn get_forum_topic_closed<'a>(&'a self) -> Option<&'a ForumTopicClosed>;
5619    #[allow(rustdoc::invalid_html_tags)]
5620    #[doc = "Optional. Service message: forum topic closed"]
5621    #[allow(clippy::needless_lifetimes)]
5622    fn set_forum_topic_closed<'a>(
5623        &'a mut self,
5624        forum_topic_closed: Option<ForumTopicClosed>,
5625    ) -> &'a mut Self;
5626    #[allow(rustdoc::invalid_html_tags)]
5627    #[doc = "Optional. Service message: forum topic reopened"]
5628    #[allow(clippy::needless_lifetimes)]
5629    fn get_forum_topic_reopened<'a>(&'a self) -> Option<&'a ForumTopicReopened>;
5630    #[allow(rustdoc::invalid_html_tags)]
5631    #[doc = "Optional. Service message: forum topic reopened"]
5632    #[allow(clippy::needless_lifetimes)]
5633    fn set_forum_topic_reopened<'a>(
5634        &'a mut self,
5635        forum_topic_reopened: Option<ForumTopicReopened>,
5636    ) -> &'a mut Self;
5637    #[allow(rustdoc::invalid_html_tags)]
5638    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
5639    #[allow(clippy::needless_lifetimes)]
5640    fn get_general_forum_topic_hidden<'a>(&'a self) -> Option<&'a GeneralForumTopicHidden>;
5641    #[allow(rustdoc::invalid_html_tags)]
5642    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
5643    #[allow(clippy::needless_lifetimes)]
5644    fn set_general_forum_topic_hidden<'a>(
5645        &'a mut self,
5646        general_forum_topic_hidden: Option<GeneralForumTopicHidden>,
5647    ) -> &'a mut Self;
5648    #[allow(rustdoc::invalid_html_tags)]
5649    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
5650    #[allow(clippy::needless_lifetimes)]
5651    fn get_general_forum_topic_unhidden<'a>(&'a self) -> Option<&'a GeneralForumTopicUnhidden>;
5652    #[allow(rustdoc::invalid_html_tags)]
5653    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
5654    #[allow(clippy::needless_lifetimes)]
5655    fn set_general_forum_topic_unhidden<'a>(
5656        &'a mut self,
5657        general_forum_topic_unhidden: Option<GeneralForumTopicUnhidden>,
5658    ) -> &'a mut Self;
5659    #[allow(rustdoc::invalid_html_tags)]
5660    #[doc = "Optional. Service message: a scheduled giveaway was created"]
5661    #[allow(clippy::needless_lifetimes)]
5662    fn get_giveaway_created<'a>(&'a self) -> Option<&'a GiveawayCreated>;
5663    #[allow(rustdoc::invalid_html_tags)]
5664    #[doc = "Optional. Service message: a scheduled giveaway was created"]
5665    #[allow(clippy::needless_lifetimes)]
5666    fn set_giveaway_created<'a>(
5667        &'a mut self,
5668        giveaway_created: Option<GiveawayCreated>,
5669    ) -> &'a mut Self;
5670    #[allow(rustdoc::invalid_html_tags)]
5671    #[doc = "Optional. The message is a scheduled giveaway message"]
5672    #[allow(clippy::needless_lifetimes)]
5673    fn get_giveaway<'a>(&'a self) -> Option<&'a Giveaway>;
5674    #[allow(rustdoc::invalid_html_tags)]
5675    #[doc = "Optional. The message is a scheduled giveaway message"]
5676    #[allow(clippy::needless_lifetimes)]
5677    fn set_giveaway<'a>(&'a mut self, giveaway: Option<Giveaway>) -> &'a mut Self;
5678    #[allow(rustdoc::invalid_html_tags)]
5679    #[doc = "Optional. A giveaway with public winners was completed"]
5680    #[allow(clippy::needless_lifetimes)]
5681    fn get_giveaway_winners<'a>(&'a self) -> Option<&'a GiveawayWinners>;
5682    #[allow(rustdoc::invalid_html_tags)]
5683    #[doc = "Optional. A giveaway with public winners was completed"]
5684    #[allow(clippy::needless_lifetimes)]
5685    fn set_giveaway_winners<'a>(
5686        &'a mut self,
5687        giveaway_winners: Option<GiveawayWinners>,
5688    ) -> &'a mut Self;
5689    #[allow(rustdoc::invalid_html_tags)]
5690    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
5691    #[allow(clippy::needless_lifetimes)]
5692    fn get_giveaway_completed<'a>(&'a self) -> Option<&'a GiveawayCompleted>;
5693    #[allow(rustdoc::invalid_html_tags)]
5694    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
5695    #[allow(clippy::needless_lifetimes)]
5696    fn set_giveaway_completed<'a>(
5697        &'a mut self,
5698        giveaway_completed: Option<GiveawayCompleted>,
5699    ) -> &'a mut Self;
5700    #[allow(rustdoc::invalid_html_tags)]
5701    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
5702    #[allow(clippy::needless_lifetimes)]
5703    fn get_paid_message_price_changed<'a>(&'a self) -> Option<&'a PaidMessagePriceChanged>;
5704    #[allow(rustdoc::invalid_html_tags)]
5705    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
5706    #[allow(clippy::needless_lifetimes)]
5707    fn set_paid_message_price_changed<'a>(
5708        &'a mut self,
5709        paid_message_price_changed: Option<PaidMessagePriceChanged>,
5710    ) -> &'a mut Self;
5711    #[allow(rustdoc::invalid_html_tags)]
5712    #[doc = "Optional. Service message: a suggested post was approved"]
5713    #[allow(clippy::needless_lifetimes)]
5714    fn get_suggested_post_approved<'a>(&'a self) -> Option<&'a SuggestedPostApproved>;
5715    #[allow(rustdoc::invalid_html_tags)]
5716    #[doc = "Optional. Service message: a suggested post was approved"]
5717    #[allow(clippy::needless_lifetimes)]
5718    fn set_suggested_post_approved<'a>(
5719        &'a mut self,
5720        suggested_post_approved: Option<SuggestedPostApproved>,
5721    ) -> &'a mut Self;
5722    #[allow(rustdoc::invalid_html_tags)]
5723    #[doc = "Optional. Service message: approval of a suggested post has failed"]
5724    #[allow(clippy::needless_lifetimes)]
5725    fn get_suggested_post_approval_failed<'a>(&'a self) -> Option<&'a SuggestedPostApprovalFailed>;
5726    #[allow(rustdoc::invalid_html_tags)]
5727    #[doc = "Optional. Service message: approval of a suggested post has failed"]
5728    #[allow(clippy::needless_lifetimes)]
5729    fn set_suggested_post_approval_failed<'a>(
5730        &'a mut self,
5731        suggested_post_approval_failed: Option<SuggestedPostApprovalFailed>,
5732    ) -> &'a mut Self;
5733    #[allow(rustdoc::invalid_html_tags)]
5734    #[doc = "Optional. Service message: a suggested post was declined"]
5735    #[allow(clippy::needless_lifetimes)]
5736    fn get_suggested_post_declined<'a>(&'a self) -> Option<&'a SuggestedPostDeclined>;
5737    #[allow(rustdoc::invalid_html_tags)]
5738    #[doc = "Optional. Service message: a suggested post was declined"]
5739    #[allow(clippy::needless_lifetimes)]
5740    fn set_suggested_post_declined<'a>(
5741        &'a mut self,
5742        suggested_post_declined: Option<SuggestedPostDeclined>,
5743    ) -> &'a mut Self;
5744    #[allow(rustdoc::invalid_html_tags)]
5745    #[doc = "Optional. Service message: payment for a suggested post was received"]
5746    #[allow(clippy::needless_lifetimes)]
5747    fn get_suggested_post_paid<'a>(&'a self) -> Option<&'a SuggestedPostPaid>;
5748    #[allow(rustdoc::invalid_html_tags)]
5749    #[doc = "Optional. Service message: payment for a suggested post was received"]
5750    #[allow(clippy::needless_lifetimes)]
5751    fn set_suggested_post_paid<'a>(
5752        &'a mut self,
5753        suggested_post_paid: Option<SuggestedPostPaid>,
5754    ) -> &'a mut Self;
5755    #[allow(rustdoc::invalid_html_tags)]
5756    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
5757    #[allow(clippy::needless_lifetimes)]
5758    fn get_suggested_post_refunded<'a>(&'a self) -> Option<&'a SuggestedPostRefunded>;
5759    #[allow(rustdoc::invalid_html_tags)]
5760    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
5761    #[allow(clippy::needless_lifetimes)]
5762    fn set_suggested_post_refunded<'a>(
5763        &'a mut self,
5764        suggested_post_refunded: Option<SuggestedPostRefunded>,
5765    ) -> &'a mut Self;
5766    #[allow(rustdoc::invalid_html_tags)]
5767    #[doc = "Optional. Service message: video chat scheduled"]
5768    #[allow(clippy::needless_lifetimes)]
5769    fn get_video_chat_scheduled<'a>(&'a self) -> Option<&'a VideoChatScheduled>;
5770    #[allow(rustdoc::invalid_html_tags)]
5771    #[doc = "Optional. Service message: video chat scheduled"]
5772    #[allow(clippy::needless_lifetimes)]
5773    fn set_video_chat_scheduled<'a>(
5774        &'a mut self,
5775        video_chat_scheduled: Option<VideoChatScheduled>,
5776    ) -> &'a mut Self;
5777    #[allow(rustdoc::invalid_html_tags)]
5778    #[doc = "Optional. Service message: video chat started"]
5779    #[allow(clippy::needless_lifetimes)]
5780    fn get_video_chat_started<'a>(&'a self) -> Option<&'a VideoChatStarted>;
5781    #[allow(rustdoc::invalid_html_tags)]
5782    #[doc = "Optional. Service message: video chat started"]
5783    #[allow(clippy::needless_lifetimes)]
5784    fn set_video_chat_started<'a>(
5785        &'a mut self,
5786        video_chat_started: Option<VideoChatStarted>,
5787    ) -> &'a mut Self;
5788    #[allow(rustdoc::invalid_html_tags)]
5789    #[doc = "Optional. Service message: video chat ended"]
5790    #[allow(clippy::needless_lifetimes)]
5791    fn get_video_chat_ended<'a>(&'a self) -> Option<&'a VideoChatEnded>;
5792    #[allow(rustdoc::invalid_html_tags)]
5793    #[doc = "Optional. Service message: video chat ended"]
5794    #[allow(clippy::needless_lifetimes)]
5795    fn set_video_chat_ended<'a>(
5796        &'a mut self,
5797        video_chat_ended: Option<VideoChatEnded>,
5798    ) -> &'a mut Self;
5799    #[allow(rustdoc::invalid_html_tags)]
5800    #[doc = "Optional. Service message: new participants invited to a video chat"]
5801    #[allow(clippy::needless_lifetimes)]
5802    fn get_video_chat_participants_invited<'a>(
5803        &'a self,
5804    ) -> Option<&'a VideoChatParticipantsInvited>;
5805    #[allow(rustdoc::invalid_html_tags)]
5806    #[doc = "Optional. Service message: new participants invited to a video chat"]
5807    #[allow(clippy::needless_lifetimes)]
5808    fn set_video_chat_participants_invited<'a>(
5809        &'a mut self,
5810        video_chat_participants_invited: Option<VideoChatParticipantsInvited>,
5811    ) -> &'a mut Self;
5812    #[allow(rustdoc::invalid_html_tags)]
5813    #[doc = "Optional. Service message: data sent by a Web App"]
5814    #[allow(clippy::needless_lifetimes)]
5815    fn get_web_app_data<'a>(&'a self) -> Option<&'a WebAppData>;
5816    #[allow(rustdoc::invalid_html_tags)]
5817    #[doc = "Optional. Service message: data sent by a Web App"]
5818    #[allow(clippy::needless_lifetimes)]
5819    fn set_web_app_data<'a>(&'a mut self, web_app_data: Option<WebAppData>) -> &'a mut Self;
5820    #[allow(rustdoc::invalid_html_tags)]
5821    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
5822    #[allow(clippy::needless_lifetimes)]
5823    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
5824    #[allow(rustdoc::invalid_html_tags)]
5825    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
5826    #[allow(clippy::needless_lifetimes)]
5827    fn set_reply_markup<'a>(
5828        &'a mut self,
5829        reply_markup: Option<InlineKeyboardMarkup>,
5830    ) -> &'a mut Self;
5831}
5832#[allow(dead_code)]
5833trait TraitChatPhoto {
5834    #[allow(rustdoc::invalid_html_tags)]
5835    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
5836    #[allow(clippy::needless_lifetimes)]
5837    fn get_small_file_id<'a>(&'a self) -> &'a str;
5838    #[allow(rustdoc::invalid_html_tags)]
5839    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
5840    #[allow(clippy::needless_lifetimes)]
5841    fn set_small_file_id<'a>(&'a mut self, small_file_id: String) -> &'a mut Self;
5842    #[allow(rustdoc::invalid_html_tags)]
5843    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
5844    #[allow(clippy::needless_lifetimes)]
5845    fn get_small_file_unique_id<'a>(&'a self) -> &'a str;
5846    #[allow(rustdoc::invalid_html_tags)]
5847    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
5848    #[allow(clippy::needless_lifetimes)]
5849    fn set_small_file_unique_id<'a>(&'a mut self, small_file_unique_id: String) -> &'a mut Self;
5850    #[allow(rustdoc::invalid_html_tags)]
5851    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
5852    #[allow(clippy::needless_lifetimes)]
5853    fn get_big_file_id<'a>(&'a self) -> &'a str;
5854    #[allow(rustdoc::invalid_html_tags)]
5855    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
5856    #[allow(clippy::needless_lifetimes)]
5857    fn set_big_file_id<'a>(&'a mut self, big_file_id: String) -> &'a mut Self;
5858    #[allow(rustdoc::invalid_html_tags)]
5859    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
5860    #[allow(clippy::needless_lifetimes)]
5861    fn get_big_file_unique_id<'a>(&'a self) -> &'a str;
5862    #[allow(rustdoc::invalid_html_tags)]
5863    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
5864    #[allow(clippy::needless_lifetimes)]
5865    fn set_big_file_unique_id<'a>(&'a mut self, big_file_unique_id: String) -> &'a mut Self;
5866}
5867#[allow(dead_code)]
5868trait TraitInlineQueryResultGame {
5869    #[allow(rustdoc::invalid_html_tags)]
5870    #[doc = "Type of the result, must be game"]
5871    #[allow(clippy::needless_lifetimes)]
5872    fn get_tg_type<'a>(&'a self) -> &'a str;
5873    #[allow(rustdoc::invalid_html_tags)]
5874    #[doc = "Type of the result, must be game"]
5875    #[allow(clippy::needless_lifetimes)]
5876    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
5877    #[allow(rustdoc::invalid_html_tags)]
5878    #[doc = "Unique identifier for this result, 1-64 bytes"]
5879    #[allow(clippy::needless_lifetimes)]
5880    fn get_id<'a>(&'a self) -> &'a str;
5881    #[allow(rustdoc::invalid_html_tags)]
5882    #[doc = "Unique identifier for this result, 1-64 bytes"]
5883    #[allow(clippy::needless_lifetimes)]
5884    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
5885    #[allow(rustdoc::invalid_html_tags)]
5886    #[doc = "Short name of the game"]
5887    #[allow(clippy::needless_lifetimes)]
5888    fn get_game_short_name<'a>(&'a self) -> &'a str;
5889    #[allow(rustdoc::invalid_html_tags)]
5890    #[doc = "Short name of the game"]
5891    #[allow(clippy::needless_lifetimes)]
5892    fn set_game_short_name<'a>(&'a mut self, game_short_name: String) -> &'a mut Self;
5893    #[allow(rustdoc::invalid_html_tags)]
5894    #[doc = "Optional. Inline keyboard attached to the message"]
5895    #[allow(clippy::needless_lifetimes)]
5896    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
5897    #[allow(rustdoc::invalid_html_tags)]
5898    #[doc = "Optional. Inline keyboard attached to the message"]
5899    #[allow(clippy::needless_lifetimes)]
5900    fn set_reply_markup<'a>(
5901        &'a mut self,
5902        reply_markup: Option<InlineKeyboardMarkup>,
5903    ) -> &'a mut Self;
5904}
5905#[allow(dead_code)]
5906trait TraitRevenueWithdrawalStateFailed {
5907    #[allow(rustdoc::invalid_html_tags)]
5908    #[doc = "Type of the state, always \"failed\""]
5909    #[allow(clippy::needless_lifetimes)]
5910    fn get_tg_type<'a>(&'a self) -> &'a str;
5911    #[allow(rustdoc::invalid_html_tags)]
5912    #[doc = "Type of the state, always \"failed\""]
5913    #[allow(clippy::needless_lifetimes)]
5914    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
5915}
5916#[allow(dead_code)]
5917trait TraitMessageEntity {
5918    #[allow(rustdoc::invalid_html_tags)]
5919    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
5920    #[allow(clippy::needless_lifetimes)]
5921    fn get_tg_type<'a>(&'a self) -> &'a str;
5922    #[allow(rustdoc::invalid_html_tags)]
5923    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
5924    #[allow(clippy::needless_lifetimes)]
5925    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
5926    #[allow(rustdoc::invalid_html_tags)]
5927    #[doc = "Offset in UTF-16 code units to the start of the entity"]
5928    #[allow(clippy::needless_lifetimes)]
5929    fn get_offset<'a>(&'a self) -> i64;
5930    #[allow(rustdoc::invalid_html_tags)]
5931    #[doc = "Offset in UTF-16 code units to the start of the entity"]
5932    #[allow(clippy::needless_lifetimes)]
5933    fn set_offset<'a>(&'a mut self, offset: i64) -> &'a mut Self;
5934    #[allow(rustdoc::invalid_html_tags)]
5935    #[doc = "Length of the entity in UTF-16 code units"]
5936    #[allow(clippy::needless_lifetimes)]
5937    fn get_length<'a>(&'a self) -> i64;
5938    #[allow(rustdoc::invalid_html_tags)]
5939    #[doc = "Length of the entity in UTF-16 code units"]
5940    #[allow(clippy::needless_lifetimes)]
5941    fn set_length<'a>(&'a mut self, length: i64) -> &'a mut Self;
5942    #[allow(rustdoc::invalid_html_tags)]
5943    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
5944    #[allow(clippy::needless_lifetimes)]
5945    fn get_url<'a>(&'a self) -> Option<&'a str>;
5946    #[allow(rustdoc::invalid_html_tags)]
5947    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
5948    #[allow(clippy::needless_lifetimes)]
5949    fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self;
5950    #[allow(rustdoc::invalid_html_tags)]
5951    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
5952    #[allow(clippy::needless_lifetimes)]
5953    fn get_user<'a>(&'a self) -> Option<&'a User>;
5954    #[allow(rustdoc::invalid_html_tags)]
5955    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
5956    #[allow(clippy::needless_lifetimes)]
5957    fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self;
5958    #[allow(rustdoc::invalid_html_tags)]
5959    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
5960    #[allow(clippy::needless_lifetimes)]
5961    fn get_language<'a>(&'a self) -> Option<&'a str>;
5962    #[allow(rustdoc::invalid_html_tags)]
5963    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
5964    #[allow(clippy::needless_lifetimes)]
5965    fn set_language<'a>(&'a mut self, language: Option<String>) -> &'a mut Self;
5966    #[allow(rustdoc::invalid_html_tags)]
5967    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
5968    #[allow(clippy::needless_lifetimes)]
5969    fn get_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
5970    #[allow(rustdoc::invalid_html_tags)]
5971    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
5972    #[allow(clippy::needless_lifetimes)]
5973    fn set_custom_emoji_id<'a>(&'a mut self, custom_emoji_id: Option<String>) -> &'a mut Self;
5974}
5975#[allow(dead_code)]
5976trait TraitUniqueGiftBackdropColors {
5977    #[allow(rustdoc::invalid_html_tags)]
5978    #[doc = "The color in the center of the backdrop in RGB format"]
5979    #[allow(clippy::needless_lifetimes)]
5980    fn get_center_color<'a>(&'a self) -> i64;
5981    #[allow(rustdoc::invalid_html_tags)]
5982    #[doc = "The color in the center of the backdrop in RGB format"]
5983    #[allow(clippy::needless_lifetimes)]
5984    fn set_center_color<'a>(&'a mut self, center_color: i64) -> &'a mut Self;
5985    #[allow(rustdoc::invalid_html_tags)]
5986    #[doc = "The color on the edges of the backdrop in RGB format"]
5987    #[allow(clippy::needless_lifetimes)]
5988    fn get_edge_color<'a>(&'a self) -> i64;
5989    #[allow(rustdoc::invalid_html_tags)]
5990    #[doc = "The color on the edges of the backdrop in RGB format"]
5991    #[allow(clippy::needless_lifetimes)]
5992    fn set_edge_color<'a>(&'a mut self, edge_color: i64) -> &'a mut Self;
5993    #[allow(rustdoc::invalid_html_tags)]
5994    #[doc = "The color to be applied to the symbol in RGB format"]
5995    #[allow(clippy::needless_lifetimes)]
5996    fn get_symbol_color<'a>(&'a self) -> i64;
5997    #[allow(rustdoc::invalid_html_tags)]
5998    #[doc = "The color to be applied to the symbol in RGB format"]
5999    #[allow(clippy::needless_lifetimes)]
6000    fn set_symbol_color<'a>(&'a mut self, symbol_color: i64) -> &'a mut Self;
6001    #[allow(rustdoc::invalid_html_tags)]
6002    #[doc = "The color for the text on the backdrop in RGB format"]
6003    #[allow(clippy::needless_lifetimes)]
6004    fn get_text_color<'a>(&'a self) -> i64;
6005    #[allow(rustdoc::invalid_html_tags)]
6006    #[doc = "The color for the text on the backdrop in RGB format"]
6007    #[allow(clippy::needless_lifetimes)]
6008    fn set_text_color<'a>(&'a mut self, text_color: i64) -> &'a mut Self;
6009}
6010#[allow(dead_code)]
6011trait TraitInputStoryContent: TraitInputStoryContentPhoto + TraitInputStoryContentVideo {}
6012#[allow(dead_code)]
6013trait TraitSuggestedPostApprovalFailed {
6014    #[allow(rustdoc::invalid_html_tags)]
6015    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
6016    #[allow(clippy::needless_lifetimes)]
6017    fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message>;
6018    #[allow(rustdoc::invalid_html_tags)]
6019    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
6020    #[allow(clippy::needless_lifetimes)]
6021    fn set_suggested_post_message<'a>(
6022        &'a mut self,
6023        suggested_post_message: Option<Message>,
6024    ) -> &'a mut Self;
6025    #[allow(rustdoc::invalid_html_tags)]
6026    #[doc = "Expected price of the post"]
6027    #[allow(clippy::needless_lifetimes)]
6028    fn get_price<'a>(&'a self) -> &'a SuggestedPostPrice;
6029    #[allow(rustdoc::invalid_html_tags)]
6030    #[doc = "Expected price of the post"]
6031    #[allow(clippy::needless_lifetimes)]
6032    fn set_price<'a>(&'a mut self, price: SuggestedPostPrice) -> &'a mut Self;
6033}
6034#[allow(dead_code)]
6035trait TraitDocument {
6036    #[allow(rustdoc::invalid_html_tags)]
6037    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
6038    #[allow(clippy::needless_lifetimes)]
6039    fn get_file_id<'a>(&'a self) -> &'a str;
6040    #[allow(rustdoc::invalid_html_tags)]
6041    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
6042    #[allow(clippy::needless_lifetimes)]
6043    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
6044    #[allow(rustdoc::invalid_html_tags)]
6045    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
6046    #[allow(clippy::needless_lifetimes)]
6047    fn get_file_unique_id<'a>(&'a self) -> &'a str;
6048    #[allow(rustdoc::invalid_html_tags)]
6049    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
6050    #[allow(clippy::needless_lifetimes)]
6051    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
6052    #[allow(rustdoc::invalid_html_tags)]
6053    #[doc = "Optional. Document thumbnail as defined by the sender"]
6054    #[allow(clippy::needless_lifetimes)]
6055    fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize>;
6056    #[allow(rustdoc::invalid_html_tags)]
6057    #[doc = "Optional. Document thumbnail as defined by the sender"]
6058    #[allow(clippy::needless_lifetimes)]
6059    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self;
6060    #[allow(rustdoc::invalid_html_tags)]
6061    #[doc = "Optional. Original filename as defined by the sender"]
6062    #[allow(clippy::needless_lifetimes)]
6063    fn get_file_name<'a>(&'a self) -> Option<&'a str>;
6064    #[allow(rustdoc::invalid_html_tags)]
6065    #[doc = "Optional. Original filename as defined by the sender"]
6066    #[allow(clippy::needless_lifetimes)]
6067    fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self;
6068    #[allow(rustdoc::invalid_html_tags)]
6069    #[doc = "Optional. MIME type of the file as defined by the sender"]
6070    #[allow(clippy::needless_lifetimes)]
6071    fn get_mime_type<'a>(&'a self) -> Option<&'a str>;
6072    #[allow(rustdoc::invalid_html_tags)]
6073    #[doc = "Optional. MIME type of the file as defined by the sender"]
6074    #[allow(clippy::needless_lifetimes)]
6075    fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self;
6076    #[allow(rustdoc::invalid_html_tags)]
6077    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
6078    #[allow(clippy::needless_lifetimes)]
6079    fn get_file_size<'a>(&'a self) -> Option<i64>;
6080    #[allow(rustdoc::invalid_html_tags)]
6081    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
6082    #[allow(clippy::needless_lifetimes)]
6083    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
6084}
6085#[allow(dead_code)]
6086trait TraitSharedUser {
6087    #[allow(rustdoc::invalid_html_tags)]
6088    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
6089    #[allow(clippy::needless_lifetimes)]
6090    fn get_user_id<'a>(&'a self) -> i64;
6091    #[allow(rustdoc::invalid_html_tags)]
6092    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
6093    #[allow(clippy::needless_lifetimes)]
6094    fn set_user_id<'a>(&'a mut self, user_id: i64) -> &'a mut Self;
6095    #[allow(rustdoc::invalid_html_tags)]
6096    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
6097    #[allow(clippy::needless_lifetimes)]
6098    fn get_first_name<'a>(&'a self) -> Option<&'a str>;
6099    #[allow(rustdoc::invalid_html_tags)]
6100    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
6101    #[allow(clippy::needless_lifetimes)]
6102    fn set_first_name<'a>(&'a mut self, first_name: Option<String>) -> &'a mut Self;
6103    #[allow(rustdoc::invalid_html_tags)]
6104    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
6105    #[allow(clippy::needless_lifetimes)]
6106    fn get_last_name<'a>(&'a self) -> Option<&'a str>;
6107    #[allow(rustdoc::invalid_html_tags)]
6108    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
6109    #[allow(clippy::needless_lifetimes)]
6110    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self;
6111    #[allow(rustdoc::invalid_html_tags)]
6112    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
6113    #[allow(clippy::needless_lifetimes)]
6114    fn get_username<'a>(&'a self) -> Option<&'a str>;
6115    #[allow(rustdoc::invalid_html_tags)]
6116    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
6117    #[allow(clippy::needless_lifetimes)]
6118    fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self;
6119    #[allow(rustdoc::invalid_html_tags)]
6120    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
6121    #[allow(clippy::needless_lifetimes)]
6122    fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>>;
6123    #[allow(rustdoc::invalid_html_tags)]
6124    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
6125    #[allow(clippy::needless_lifetimes)]
6126    fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self;
6127}
6128#[allow(dead_code)]
6129trait TraitUniqueGiftInfo {
6130    #[allow(rustdoc::invalid_html_tags)]
6131    #[doc = "Information about the gift"]
6132    #[allow(clippy::needless_lifetimes)]
6133    fn get_gift<'a>(&'a self) -> &'a UniqueGift;
6134    #[allow(rustdoc::invalid_html_tags)]
6135    #[doc = "Information about the gift"]
6136    #[allow(clippy::needless_lifetimes)]
6137    fn set_gift<'a>(&'a mut self, gift: UniqueGift) -> &'a mut Self;
6138    #[allow(rustdoc::invalid_html_tags)]
6139    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
6140    #[allow(clippy::needless_lifetimes)]
6141    fn get_origin<'a>(&'a self) -> &'a str;
6142    #[allow(rustdoc::invalid_html_tags)]
6143    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
6144    #[allow(clippy::needless_lifetimes)]
6145    fn set_origin<'a>(&'a mut self, origin: String) -> &'a mut Self;
6146    #[allow(rustdoc::invalid_html_tags)]
6147    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
6148    #[allow(clippy::needless_lifetimes)]
6149    fn get_last_resale_star_count<'a>(&'a self) -> Option<i64>;
6150    #[allow(rustdoc::invalid_html_tags)]
6151    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
6152    #[allow(clippy::needless_lifetimes)]
6153    fn set_last_resale_star_count<'a>(
6154        &'a mut self,
6155        last_resale_star_count: Option<i64>,
6156    ) -> &'a mut Self;
6157    #[allow(rustdoc::invalid_html_tags)]
6158    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
6159    #[allow(clippy::needless_lifetimes)]
6160    fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str>;
6161    #[allow(rustdoc::invalid_html_tags)]
6162    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
6163    #[allow(clippy::needless_lifetimes)]
6164    fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self;
6165    #[allow(rustdoc::invalid_html_tags)]
6166    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
6167    #[allow(clippy::needless_lifetimes)]
6168    fn get_transfer_star_count<'a>(&'a self) -> Option<i64>;
6169    #[allow(rustdoc::invalid_html_tags)]
6170    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
6171    #[allow(clippy::needless_lifetimes)]
6172    fn set_transfer_star_count<'a>(&'a mut self, transfer_star_count: Option<i64>) -> &'a mut Self;
6173    #[allow(rustdoc::invalid_html_tags)]
6174    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
6175    #[allow(clippy::needless_lifetimes)]
6176    fn get_next_transfer_date<'a>(&'a self) -> Option<i64>;
6177    #[allow(rustdoc::invalid_html_tags)]
6178    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
6179    #[allow(clippy::needless_lifetimes)]
6180    fn set_next_transfer_date<'a>(&'a mut self, next_transfer_date: Option<i64>) -> &'a mut Self;
6181}
6182#[allow(dead_code)]
6183trait TraitShippingQuery {
6184    #[allow(rustdoc::invalid_html_tags)]
6185    #[doc = "Unique query identifier"]
6186    #[allow(clippy::needless_lifetimes)]
6187    fn get_id<'a>(&'a self) -> &'a str;
6188    #[allow(rustdoc::invalid_html_tags)]
6189    #[doc = "Unique query identifier"]
6190    #[allow(clippy::needless_lifetimes)]
6191    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
6192    #[allow(rustdoc::invalid_html_tags)]
6193    #[doc = "User who sent the query"]
6194    #[allow(clippy::needless_lifetimes)]
6195    fn get_from<'a>(&'a self) -> &'a User;
6196    #[allow(rustdoc::invalid_html_tags)]
6197    #[doc = "User who sent the query"]
6198    #[allow(clippy::needless_lifetimes)]
6199    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
6200    #[allow(rustdoc::invalid_html_tags)]
6201    #[doc = "Bot-specified invoice payload"]
6202    #[allow(clippy::needless_lifetimes)]
6203    fn get_invoice_payload<'a>(&'a self) -> &'a str;
6204    #[allow(rustdoc::invalid_html_tags)]
6205    #[doc = "Bot-specified invoice payload"]
6206    #[allow(clippy::needless_lifetimes)]
6207    fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self;
6208    #[allow(rustdoc::invalid_html_tags)]
6209    #[doc = "User specified shipping address"]
6210    #[allow(clippy::needless_lifetimes)]
6211    fn get_shipping_address<'a>(&'a self) -> &'a ShippingAddress;
6212    #[allow(rustdoc::invalid_html_tags)]
6213    #[doc = "User specified shipping address"]
6214    #[allow(clippy::needless_lifetimes)]
6215    fn set_shipping_address<'a>(&'a mut self, shipping_address: ShippingAddress) -> &'a mut Self;
6216}
6217#[allow(dead_code)]
6218trait TraitInlineQueryResultVideo {
6219    #[allow(rustdoc::invalid_html_tags)]
6220    #[doc = "Type of the result, must be video"]
6221    #[allow(clippy::needless_lifetimes)]
6222    fn get_tg_type<'a>(&'a self) -> &'a str;
6223    #[allow(rustdoc::invalid_html_tags)]
6224    #[doc = "Type of the result, must be video"]
6225    #[allow(clippy::needless_lifetimes)]
6226    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
6227    #[allow(rustdoc::invalid_html_tags)]
6228    #[doc = "Unique identifier for this result, 1-64 bytes"]
6229    #[allow(clippy::needless_lifetimes)]
6230    fn get_id<'a>(&'a self) -> &'a str;
6231    #[allow(rustdoc::invalid_html_tags)]
6232    #[doc = "Unique identifier for this result, 1-64 bytes"]
6233    #[allow(clippy::needless_lifetimes)]
6234    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
6235    #[allow(rustdoc::invalid_html_tags)]
6236    #[doc = "A valid URL for the embedded video player or video file"]
6237    #[allow(clippy::needless_lifetimes)]
6238    fn get_video_url<'a>(&'a self) -> &'a str;
6239    #[allow(rustdoc::invalid_html_tags)]
6240    #[doc = "A valid URL for the embedded video player or video file"]
6241    #[allow(clippy::needless_lifetimes)]
6242    fn set_video_url<'a>(&'a mut self, video_url: String) -> &'a mut Self;
6243    #[allow(rustdoc::invalid_html_tags)]
6244    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
6245    #[allow(clippy::needless_lifetimes)]
6246    fn get_mime_type<'a>(&'a self) -> &'a str;
6247    #[allow(rustdoc::invalid_html_tags)]
6248    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
6249    #[allow(clippy::needless_lifetimes)]
6250    fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self;
6251    #[allow(rustdoc::invalid_html_tags)]
6252    #[doc = "URL of the thumbnail (JPEG only) for the video"]
6253    #[allow(clippy::needless_lifetimes)]
6254    fn get_thumbnail_url<'a>(&'a self) -> &'a str;
6255    #[allow(rustdoc::invalid_html_tags)]
6256    #[doc = "URL of the thumbnail (JPEG only) for the video"]
6257    #[allow(clippy::needless_lifetimes)]
6258    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self;
6259    #[allow(rustdoc::invalid_html_tags)]
6260    #[doc = "Title for the result"]
6261    #[allow(clippy::needless_lifetimes)]
6262    fn get_title<'a>(&'a self) -> &'a str;
6263    #[allow(rustdoc::invalid_html_tags)]
6264    #[doc = "Title for the result"]
6265    #[allow(clippy::needless_lifetimes)]
6266    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
6267    #[allow(rustdoc::invalid_html_tags)]
6268    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
6269    #[allow(clippy::needless_lifetimes)]
6270    fn get_caption<'a>(&'a self) -> Option<&'a str>;
6271    #[allow(rustdoc::invalid_html_tags)]
6272    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
6273    #[allow(clippy::needless_lifetimes)]
6274    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
6275    #[allow(rustdoc::invalid_html_tags)]
6276    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
6277    #[allow(clippy::needless_lifetimes)]
6278    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
6279    #[allow(rustdoc::invalid_html_tags)]
6280    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
6281    #[allow(clippy::needless_lifetimes)]
6282    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
6283    #[allow(rustdoc::invalid_html_tags)]
6284    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
6285    #[allow(clippy::needless_lifetimes)]
6286    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
6287    #[allow(rustdoc::invalid_html_tags)]
6288    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
6289    #[allow(clippy::needless_lifetimes)]
6290    fn set_caption_entities<'a>(
6291        &'a mut self,
6292        caption_entities: Option<Vec<MessageEntity>>,
6293    ) -> &'a mut Self;
6294    #[allow(rustdoc::invalid_html_tags)]
6295    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
6296    #[allow(clippy::needless_lifetimes)]
6297    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
6298    #[allow(rustdoc::invalid_html_tags)]
6299    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
6300    #[allow(clippy::needless_lifetimes)]
6301    fn set_show_caption_above_media<'a>(
6302        &'a mut self,
6303        show_caption_above_media: Option<bool>,
6304    ) -> &'a mut Self;
6305    #[allow(rustdoc::invalid_html_tags)]
6306    #[doc = "Optional. Video width"]
6307    #[allow(clippy::needless_lifetimes)]
6308    fn get_video_width<'a>(&'a self) -> Option<i64>;
6309    #[allow(rustdoc::invalid_html_tags)]
6310    #[doc = "Optional. Video width"]
6311    #[allow(clippy::needless_lifetimes)]
6312    fn set_video_width<'a>(&'a mut self, video_width: Option<i64>) -> &'a mut Self;
6313    #[allow(rustdoc::invalid_html_tags)]
6314    #[doc = "Optional. Video height"]
6315    #[allow(clippy::needless_lifetimes)]
6316    fn get_video_height<'a>(&'a self) -> Option<i64>;
6317    #[allow(rustdoc::invalid_html_tags)]
6318    #[doc = "Optional. Video height"]
6319    #[allow(clippy::needless_lifetimes)]
6320    fn set_video_height<'a>(&'a mut self, video_height: Option<i64>) -> &'a mut Self;
6321    #[allow(rustdoc::invalid_html_tags)]
6322    #[doc = "Optional. Video duration in seconds"]
6323    #[allow(clippy::needless_lifetimes)]
6324    fn get_video_duration<'a>(&'a self) -> Option<i64>;
6325    #[allow(rustdoc::invalid_html_tags)]
6326    #[doc = "Optional. Video duration in seconds"]
6327    #[allow(clippy::needless_lifetimes)]
6328    fn set_video_duration<'a>(&'a mut self, video_duration: Option<i64>) -> &'a mut Self;
6329    #[allow(rustdoc::invalid_html_tags)]
6330    #[doc = "Optional. Short description of the result"]
6331    #[allow(clippy::needless_lifetimes)]
6332    fn get_description<'a>(&'a self) -> Option<&'a str>;
6333    #[allow(rustdoc::invalid_html_tags)]
6334    #[doc = "Optional. Short description of the result"]
6335    #[allow(clippy::needless_lifetimes)]
6336    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
6337    #[allow(rustdoc::invalid_html_tags)]
6338    #[doc = "Optional. Inline keyboard attached to the message"]
6339    #[allow(clippy::needless_lifetimes)]
6340    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
6341    #[allow(rustdoc::invalid_html_tags)]
6342    #[doc = "Optional. Inline keyboard attached to the message"]
6343    #[allow(clippy::needless_lifetimes)]
6344    fn set_reply_markup<'a>(
6345        &'a mut self,
6346        reply_markup: Option<InlineKeyboardMarkup>,
6347    ) -> &'a mut Self;
6348    #[allow(rustdoc::invalid_html_tags)]
6349    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
6350    #[allow(clippy::needless_lifetimes)]
6351    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
6352    #[allow(rustdoc::invalid_html_tags)]
6353    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
6354    #[allow(clippy::needless_lifetimes)]
6355    fn set_input_message_content<'a>(
6356        &'a mut self,
6357        input_message_content: Option<InputMessageContent>,
6358    ) -> &'a mut Self;
6359}
6360#[allow(dead_code)]
6361trait TraitDirectMessagePriceChanged {
6362    #[allow(rustdoc::invalid_html_tags)]
6363    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
6364    #[allow(clippy::needless_lifetimes)]
6365    fn get_are_direct_messages_enabled<'a>(&'a self) -> bool;
6366    #[allow(rustdoc::invalid_html_tags)]
6367    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
6368    #[allow(clippy::needless_lifetimes)]
6369    fn set_are_direct_messages_enabled<'a>(
6370        &'a mut self,
6371        are_direct_messages_enabled: bool,
6372    ) -> &'a mut Self;
6373    #[allow(rustdoc::invalid_html_tags)]
6374    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
6375    #[allow(clippy::needless_lifetimes)]
6376    fn get_direct_message_star_count<'a>(&'a self) -> Option<i64>;
6377    #[allow(rustdoc::invalid_html_tags)]
6378    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
6379    #[allow(clippy::needless_lifetimes)]
6380    fn set_direct_message_star_count<'a>(
6381        &'a mut self,
6382        direct_message_star_count: Option<i64>,
6383    ) -> &'a mut Self;
6384}
6385#[allow(dead_code)]
6386trait TraitReactionCount {
6387    #[allow(rustdoc::invalid_html_tags)]
6388    #[doc = "Type of the reaction"]
6389    #[allow(clippy::needless_lifetimes)]
6390    fn get_tg_type<'a>(&'a self) -> &'a ReactionType;
6391    #[allow(rustdoc::invalid_html_tags)]
6392    #[doc = "Type of the reaction"]
6393    #[allow(clippy::needless_lifetimes)]
6394    fn set_tg_type<'a>(&'a mut self, tg_type: ReactionType) -> &'a mut Self;
6395    #[allow(rustdoc::invalid_html_tags)]
6396    #[doc = "Number of times the reaction was added"]
6397    #[allow(clippy::needless_lifetimes)]
6398    fn get_total_count<'a>(&'a self) -> i64;
6399    #[allow(rustdoc::invalid_html_tags)]
6400    #[doc = "Number of times the reaction was added"]
6401    #[allow(clippy::needless_lifetimes)]
6402    fn set_total_count<'a>(&'a mut self, total_count: i64) -> &'a mut Self;
6403}
6404#[allow(dead_code)]
6405trait TraitChatShared {
6406    #[allow(rustdoc::invalid_html_tags)]
6407    #[doc = "Identifier of the request"]
6408    #[allow(clippy::needless_lifetimes)]
6409    fn get_request_id<'a>(&'a self) -> i64;
6410    #[allow(rustdoc::invalid_html_tags)]
6411    #[doc = "Identifier of the request"]
6412    #[allow(clippy::needless_lifetimes)]
6413    fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self;
6414    #[allow(rustdoc::invalid_html_tags)]
6415    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
6416    #[allow(clippy::needless_lifetimes)]
6417    fn get_chat_id<'a>(&'a self) -> i64;
6418    #[allow(rustdoc::invalid_html_tags)]
6419    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
6420    #[allow(clippy::needless_lifetimes)]
6421    fn set_chat_id<'a>(&'a mut self, chat_id: i64) -> &'a mut Self;
6422    #[allow(rustdoc::invalid_html_tags)]
6423    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
6424    #[allow(clippy::needless_lifetimes)]
6425    fn get_title<'a>(&'a self) -> Option<&'a str>;
6426    #[allow(rustdoc::invalid_html_tags)]
6427    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
6428    #[allow(clippy::needless_lifetimes)]
6429    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
6430    #[allow(rustdoc::invalid_html_tags)]
6431    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
6432    #[allow(clippy::needless_lifetimes)]
6433    fn get_username<'a>(&'a self) -> Option<&'a str>;
6434    #[allow(rustdoc::invalid_html_tags)]
6435    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
6436    #[allow(clippy::needless_lifetimes)]
6437    fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self;
6438    #[allow(rustdoc::invalid_html_tags)]
6439    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
6440    #[allow(clippy::needless_lifetimes)]
6441    fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>>;
6442    #[allow(rustdoc::invalid_html_tags)]
6443    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
6444    #[allow(clippy::needless_lifetimes)]
6445    fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self;
6446}
6447#[allow(dead_code)]
6448trait TraitMessageOriginChannel {
6449    #[allow(rustdoc::invalid_html_tags)]
6450    #[doc = "Type of the message origin, always \"channel\""]
6451    #[allow(clippy::needless_lifetimes)]
6452    fn get_tg_type<'a>(&'a self) -> &'a str;
6453    #[allow(rustdoc::invalid_html_tags)]
6454    #[doc = "Type of the message origin, always \"channel\""]
6455    #[allow(clippy::needless_lifetimes)]
6456    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
6457    #[allow(rustdoc::invalid_html_tags)]
6458    #[doc = "Date the message was sent originally in Unix time"]
6459    #[allow(clippy::needless_lifetimes)]
6460    fn get_date<'a>(&'a self) -> i64;
6461    #[allow(rustdoc::invalid_html_tags)]
6462    #[doc = "Date the message was sent originally in Unix time"]
6463    #[allow(clippy::needless_lifetimes)]
6464    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
6465    #[allow(rustdoc::invalid_html_tags)]
6466    #[doc = "Channel chat to which the message was originally sent"]
6467    #[allow(clippy::needless_lifetimes)]
6468    fn get_chat<'a>(&'a self) -> &'a Chat;
6469    #[allow(rustdoc::invalid_html_tags)]
6470    #[doc = "Channel chat to which the message was originally sent"]
6471    #[allow(clippy::needless_lifetimes)]
6472    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
6473    #[allow(rustdoc::invalid_html_tags)]
6474    #[doc = "Unique message identifier inside the chat"]
6475    #[allow(clippy::needless_lifetimes)]
6476    fn get_message_id<'a>(&'a self) -> i64;
6477    #[allow(rustdoc::invalid_html_tags)]
6478    #[doc = "Unique message identifier inside the chat"]
6479    #[allow(clippy::needless_lifetimes)]
6480    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self;
6481    #[allow(rustdoc::invalid_html_tags)]
6482    #[doc = "Optional. Signature of the original post author"]
6483    #[allow(clippy::needless_lifetimes)]
6484    fn get_author_signature<'a>(&'a self) -> Option<&'a str>;
6485    #[allow(rustdoc::invalid_html_tags)]
6486    #[doc = "Optional. Signature of the original post author"]
6487    #[allow(clippy::needless_lifetimes)]
6488    fn set_author_signature<'a>(&'a mut self, author_signature: Option<String>) -> &'a mut Self;
6489}
6490#[allow(dead_code)]
6491trait TraitChatBoostRemoved {
6492    #[allow(rustdoc::invalid_html_tags)]
6493    #[doc = "Chat which was boosted"]
6494    #[allow(clippy::needless_lifetimes)]
6495    fn get_chat<'a>(&'a self) -> &'a Chat;
6496    #[allow(rustdoc::invalid_html_tags)]
6497    #[doc = "Chat which was boosted"]
6498    #[allow(clippy::needless_lifetimes)]
6499    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
6500    #[allow(rustdoc::invalid_html_tags)]
6501    #[doc = "Unique identifier of the boost"]
6502    #[allow(clippy::needless_lifetimes)]
6503    fn get_boost_id<'a>(&'a self) -> &'a str;
6504    #[allow(rustdoc::invalid_html_tags)]
6505    #[doc = "Unique identifier of the boost"]
6506    #[allow(clippy::needless_lifetimes)]
6507    fn set_boost_id<'a>(&'a mut self, boost_id: String) -> &'a mut Self;
6508    #[allow(rustdoc::invalid_html_tags)]
6509    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
6510    #[allow(clippy::needless_lifetimes)]
6511    fn get_remove_date<'a>(&'a self) -> i64;
6512    #[allow(rustdoc::invalid_html_tags)]
6513    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
6514    #[allow(clippy::needless_lifetimes)]
6515    fn set_remove_date<'a>(&'a mut self, remove_date: i64) -> &'a mut Self;
6516    #[allow(rustdoc::invalid_html_tags)]
6517    #[doc = "Source of the removed boost"]
6518    #[allow(clippy::needless_lifetimes)]
6519    fn get_source<'a>(&'a self) -> &'a ChatBoostSource;
6520    #[allow(rustdoc::invalid_html_tags)]
6521    #[doc = "Source of the removed boost"]
6522    #[allow(clippy::needless_lifetimes)]
6523    fn set_source<'a>(&'a mut self, source: ChatBoostSource) -> &'a mut Self;
6524}
6525#[allow(dead_code)]
6526trait TraitBackgroundTypeFill {
6527    #[allow(rustdoc::invalid_html_tags)]
6528    #[doc = "Type of the background, always \"fill\""]
6529    #[allow(clippy::needless_lifetimes)]
6530    fn get_tg_type<'a>(&'a self) -> &'a str;
6531    #[allow(rustdoc::invalid_html_tags)]
6532    #[doc = "Type of the background, always \"fill\""]
6533    #[allow(clippy::needless_lifetimes)]
6534    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
6535    #[allow(rustdoc::invalid_html_tags)]
6536    #[doc = "The background fill"]
6537    #[allow(clippy::needless_lifetimes)]
6538    fn get_fill<'a>(&'a self) -> &'a BackgroundFill;
6539    #[allow(rustdoc::invalid_html_tags)]
6540    #[doc = "The background fill"]
6541    #[allow(clippy::needless_lifetimes)]
6542    fn set_fill<'a>(&'a mut self, fill: BackgroundFill) -> &'a mut Self;
6543    #[allow(rustdoc::invalid_html_tags)]
6544    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
6545    #[allow(clippy::needless_lifetimes)]
6546    fn get_dark_theme_dimming<'a>(&'a self) -> i64;
6547    #[allow(rustdoc::invalid_html_tags)]
6548    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
6549    #[allow(clippy::needless_lifetimes)]
6550    fn set_dark_theme_dimming<'a>(&'a mut self, dark_theme_dimming: i64) -> &'a mut Self;
6551}
6552#[allow(dead_code)]
6553trait TraitMessageId {
6554    #[allow(rustdoc::invalid_html_tags)]
6555    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
6556    #[allow(clippy::needless_lifetimes)]
6557    fn get_message_id<'a>(&'a self) -> i64;
6558    #[allow(rustdoc::invalid_html_tags)]
6559    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
6560    #[allow(clippy::needless_lifetimes)]
6561    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self;
6562}
6563#[allow(dead_code)]
6564trait TraitKeyboardButtonRequestChat {
6565    #[allow(rustdoc::invalid_html_tags)]
6566    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
6567    #[allow(clippy::needless_lifetimes)]
6568    fn get_request_id<'a>(&'a self) -> i64;
6569    #[allow(rustdoc::invalid_html_tags)]
6570    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
6571    #[allow(clippy::needless_lifetimes)]
6572    fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self;
6573    #[allow(rustdoc::invalid_html_tags)]
6574    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
6575    #[allow(clippy::needless_lifetimes)]
6576    fn get_chat_is_channel<'a>(&'a self) -> bool;
6577    #[allow(rustdoc::invalid_html_tags)]
6578    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
6579    #[allow(clippy::needless_lifetimes)]
6580    fn set_chat_is_channel<'a>(&'a mut self, chat_is_channel: bool) -> &'a mut Self;
6581    #[allow(rustdoc::invalid_html_tags)]
6582    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
6583    #[allow(clippy::needless_lifetimes)]
6584    fn get_chat_is_forum<'a>(&'a self) -> Option<bool>;
6585    #[allow(rustdoc::invalid_html_tags)]
6586    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
6587    #[allow(clippy::needless_lifetimes)]
6588    fn set_chat_is_forum<'a>(&'a mut self, chat_is_forum: Option<bool>) -> &'a mut Self;
6589    #[allow(rustdoc::invalid_html_tags)]
6590    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
6591    #[allow(clippy::needless_lifetimes)]
6592    fn get_chat_has_username<'a>(&'a self) -> Option<bool>;
6593    #[allow(rustdoc::invalid_html_tags)]
6594    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
6595    #[allow(clippy::needless_lifetimes)]
6596    fn set_chat_has_username<'a>(&'a mut self, chat_has_username: Option<bool>) -> &'a mut Self;
6597    #[allow(rustdoc::invalid_html_tags)]
6598    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
6599    #[allow(clippy::needless_lifetimes)]
6600    fn get_chat_is_created<'a>(&'a self) -> Option<bool>;
6601    #[allow(rustdoc::invalid_html_tags)]
6602    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
6603    #[allow(clippy::needless_lifetimes)]
6604    fn set_chat_is_created<'a>(&'a mut self, chat_is_created: Option<bool>) -> &'a mut Self;
6605    #[allow(rustdoc::invalid_html_tags)]
6606    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
6607    #[allow(clippy::needless_lifetimes)]
6608    fn get_user_administrator_rights<'a>(&'a self) -> Option<&'a ChatAdministratorRights>;
6609    #[allow(rustdoc::invalid_html_tags)]
6610    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
6611    #[allow(clippy::needless_lifetimes)]
6612    fn set_user_administrator_rights<'a>(
6613        &'a mut self,
6614        user_administrator_rights: Option<ChatAdministratorRights>,
6615    ) -> &'a mut Self;
6616    #[allow(rustdoc::invalid_html_tags)]
6617    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
6618    #[allow(clippy::needless_lifetimes)]
6619    fn get_bot_administrator_rights<'a>(&'a self) -> Option<&'a ChatAdministratorRights>;
6620    #[allow(rustdoc::invalid_html_tags)]
6621    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
6622    #[allow(clippy::needless_lifetimes)]
6623    fn set_bot_administrator_rights<'a>(
6624        &'a mut self,
6625        bot_administrator_rights: Option<ChatAdministratorRights>,
6626    ) -> &'a mut Self;
6627    #[allow(rustdoc::invalid_html_tags)]
6628    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
6629    #[allow(clippy::needless_lifetimes)]
6630    fn get_bot_is_member<'a>(&'a self) -> Option<bool>;
6631    #[allow(rustdoc::invalid_html_tags)]
6632    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
6633    #[allow(clippy::needless_lifetimes)]
6634    fn set_bot_is_member<'a>(&'a mut self, bot_is_member: Option<bool>) -> &'a mut Self;
6635    #[allow(rustdoc::invalid_html_tags)]
6636    #[doc = "Optional. Pass True to request the chat's title"]
6637    #[allow(clippy::needless_lifetimes)]
6638    fn get_request_title<'a>(&'a self) -> Option<bool>;
6639    #[allow(rustdoc::invalid_html_tags)]
6640    #[doc = "Optional. Pass True to request the chat's title"]
6641    #[allow(clippy::needless_lifetimes)]
6642    fn set_request_title<'a>(&'a mut self, request_title: Option<bool>) -> &'a mut Self;
6643    #[allow(rustdoc::invalid_html_tags)]
6644    #[doc = "Optional. Pass True to request the chat's username"]
6645    #[allow(clippy::needless_lifetimes)]
6646    fn get_request_username<'a>(&'a self) -> Option<bool>;
6647    #[allow(rustdoc::invalid_html_tags)]
6648    #[doc = "Optional. Pass True to request the chat's username"]
6649    #[allow(clippy::needless_lifetimes)]
6650    fn set_request_username<'a>(&'a mut self, request_username: Option<bool>) -> &'a mut Self;
6651    #[allow(rustdoc::invalid_html_tags)]
6652    #[doc = "Optional. Pass True to request the chat's photo"]
6653    #[allow(clippy::needless_lifetimes)]
6654    fn get_request_photo<'a>(&'a self) -> Option<bool>;
6655    #[allow(rustdoc::invalid_html_tags)]
6656    #[doc = "Optional. Pass True to request the chat's photo"]
6657    #[allow(clippy::needless_lifetimes)]
6658    fn set_request_photo<'a>(&'a mut self, request_photo: Option<bool>) -> &'a mut Self;
6659}
6660#[allow(dead_code)]
6661trait TraitReactionTypeEmoji {
6662    #[allow(rustdoc::invalid_html_tags)]
6663    #[doc = "Type of the reaction, always \"emoji\""]
6664    #[allow(clippy::needless_lifetimes)]
6665    fn get_tg_type<'a>(&'a self) -> &'a str;
6666    #[allow(rustdoc::invalid_html_tags)]
6667    #[doc = "Type of the reaction, always \"emoji\""]
6668    #[allow(clippy::needless_lifetimes)]
6669    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
6670    #[allow(rustdoc::invalid_html_tags)]
6671    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
6672    #[allow(clippy::needless_lifetimes)]
6673    fn get_emoji<'a>(&'a self) -> &'a str;
6674    #[allow(rustdoc::invalid_html_tags)]
6675    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
6676    #[allow(clippy::needless_lifetimes)]
6677    fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self;
6678}
6679#[allow(dead_code)]
6680trait TraitInputFile {}
6681#[allow(dead_code)]
6682trait TraitSentWebAppMessage {
6683    #[allow(rustdoc::invalid_html_tags)]
6684    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
6685    #[allow(clippy::needless_lifetimes)]
6686    fn get_inline_message_id<'a>(&'a self) -> Option<&'a str>;
6687    #[allow(rustdoc::invalid_html_tags)]
6688    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
6689    #[allow(clippy::needless_lifetimes)]
6690    fn set_inline_message_id<'a>(&'a mut self, inline_message_id: Option<String>) -> &'a mut Self;
6691}
6692#[allow(dead_code)]
6693trait TraitGiveaway {
6694    #[allow(rustdoc::invalid_html_tags)]
6695    #[doc = "The list of chats which the user must join to participate in the giveaway"]
6696    #[allow(clippy::needless_lifetimes)]
6697    fn get_chats<'a>(&'a self) -> &'a Vec<Chat>;
6698    #[allow(rustdoc::invalid_html_tags)]
6699    #[doc = "The list of chats which the user must join to participate in the giveaway"]
6700    #[allow(clippy::needless_lifetimes)]
6701    fn set_chats<'a>(&'a mut self, chats: Vec<Chat>) -> &'a mut Self;
6702    #[allow(rustdoc::invalid_html_tags)]
6703    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
6704    #[allow(clippy::needless_lifetimes)]
6705    fn get_winners_selection_date<'a>(&'a self) -> i64;
6706    #[allow(rustdoc::invalid_html_tags)]
6707    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
6708    #[allow(clippy::needless_lifetimes)]
6709    fn set_winners_selection_date<'a>(&'a mut self, winners_selection_date: i64) -> &'a mut Self;
6710    #[allow(rustdoc::invalid_html_tags)]
6711    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
6712    #[allow(clippy::needless_lifetimes)]
6713    fn get_winner_count<'a>(&'a self) -> i64;
6714    #[allow(rustdoc::invalid_html_tags)]
6715    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
6716    #[allow(clippy::needless_lifetimes)]
6717    fn set_winner_count<'a>(&'a mut self, winner_count: i64) -> &'a mut Self;
6718    #[allow(rustdoc::invalid_html_tags)]
6719    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
6720    #[allow(clippy::needless_lifetimes)]
6721    fn get_only_new_members<'a>(&'a self) -> Option<bool>;
6722    #[allow(rustdoc::invalid_html_tags)]
6723    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
6724    #[allow(clippy::needless_lifetimes)]
6725    fn set_only_new_members<'a>(&'a mut self, only_new_members: Option<bool>) -> &'a mut Self;
6726    #[allow(rustdoc::invalid_html_tags)]
6727    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
6728    #[allow(clippy::needless_lifetimes)]
6729    fn get_has_public_winners<'a>(&'a self) -> Option<bool>;
6730    #[allow(rustdoc::invalid_html_tags)]
6731    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
6732    #[allow(clippy::needless_lifetimes)]
6733    fn set_has_public_winners<'a>(&'a mut self, has_public_winners: Option<bool>) -> &'a mut Self;
6734    #[allow(rustdoc::invalid_html_tags)]
6735    #[doc = "Optional. Description of additional giveaway prize"]
6736    #[allow(clippy::needless_lifetimes)]
6737    fn get_prize_description<'a>(&'a self) -> Option<&'a str>;
6738    #[allow(rustdoc::invalid_html_tags)]
6739    #[doc = "Optional. Description of additional giveaway prize"]
6740    #[allow(clippy::needless_lifetimes)]
6741    fn set_prize_description<'a>(&'a mut self, prize_description: Option<String>) -> &'a mut Self;
6742    #[allow(rustdoc::invalid_html_tags)]
6743    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
6744    #[allow(clippy::needless_lifetimes)]
6745    fn get_country_codes<'a>(&'a self) -> Option<&'a Vec<String>>;
6746    #[allow(rustdoc::invalid_html_tags)]
6747    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
6748    #[allow(clippy::needless_lifetimes)]
6749    fn set_country_codes<'a>(&'a mut self, country_codes: Option<Vec<String>>) -> &'a mut Self;
6750    #[allow(rustdoc::invalid_html_tags)]
6751    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
6752    #[allow(clippy::needless_lifetimes)]
6753    fn get_prize_star_count<'a>(&'a self) -> Option<i64>;
6754    #[allow(rustdoc::invalid_html_tags)]
6755    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
6756    #[allow(clippy::needless_lifetimes)]
6757    fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self;
6758    #[allow(rustdoc::invalid_html_tags)]
6759    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
6760    #[allow(clippy::needless_lifetimes)]
6761    fn get_premium_subscription_month_count<'a>(&'a self) -> Option<i64>;
6762    #[allow(rustdoc::invalid_html_tags)]
6763    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
6764    #[allow(clippy::needless_lifetimes)]
6765    fn set_premium_subscription_month_count<'a>(
6766        &'a mut self,
6767        premium_subscription_month_count: Option<i64>,
6768    ) -> &'a mut Self;
6769}
6770#[allow(dead_code)]
6771trait TraitDirectMessagesTopic {
6772    #[allow(rustdoc::invalid_html_tags)]
6773    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
6774    #[allow(clippy::needless_lifetimes)]
6775    fn get_topic_id<'a>(&'a self) -> i64;
6776    #[allow(rustdoc::invalid_html_tags)]
6777    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
6778    #[allow(clippy::needless_lifetimes)]
6779    fn set_topic_id<'a>(&'a mut self, topic_id: i64) -> &'a mut Self;
6780    #[allow(rustdoc::invalid_html_tags)]
6781    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
6782    #[allow(clippy::needless_lifetimes)]
6783    fn get_user<'a>(&'a self) -> Option<&'a User>;
6784    #[allow(rustdoc::invalid_html_tags)]
6785    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
6786    #[allow(clippy::needless_lifetimes)]
6787    fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self;
6788}
6789#[allow(dead_code)]
6790trait TraitRevenueWithdrawalStateSucceeded {
6791    #[allow(rustdoc::invalid_html_tags)]
6792    #[doc = "Type of the state, always \"succeeded\""]
6793    #[allow(clippy::needless_lifetimes)]
6794    fn get_tg_type<'a>(&'a self) -> &'a str;
6795    #[allow(rustdoc::invalid_html_tags)]
6796    #[doc = "Type of the state, always \"succeeded\""]
6797    #[allow(clippy::needless_lifetimes)]
6798    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
6799    #[allow(rustdoc::invalid_html_tags)]
6800    #[doc = "Date the withdrawal was completed in Unix time"]
6801    #[allow(clippy::needless_lifetimes)]
6802    fn get_date<'a>(&'a self) -> i64;
6803    #[allow(rustdoc::invalid_html_tags)]
6804    #[doc = "Date the withdrawal was completed in Unix time"]
6805    #[allow(clippy::needless_lifetimes)]
6806    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
6807    #[allow(rustdoc::invalid_html_tags)]
6808    #[doc = "An HTTPS URL that can be used to see transaction details"]
6809    #[allow(clippy::needless_lifetimes)]
6810    fn get_url<'a>(&'a self) -> &'a str;
6811    #[allow(rustdoc::invalid_html_tags)]
6812    #[doc = "An HTTPS URL that can be used to see transaction details"]
6813    #[allow(clippy::needless_lifetimes)]
6814    fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self;
6815}
6816#[allow(dead_code)]
6817trait TraitVideoChatEnded {
6818    #[allow(rustdoc::invalid_html_tags)]
6819    #[doc = "Video chat duration in seconds"]
6820    #[allow(clippy::needless_lifetimes)]
6821    fn get_duration<'a>(&'a self) -> i64;
6822    #[allow(rustdoc::invalid_html_tags)]
6823    #[doc = "Video chat duration in seconds"]
6824    #[allow(clippy::needless_lifetimes)]
6825    fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self;
6826}
6827#[allow(dead_code)]
6828trait TraitChatMemberOwner {
6829    #[allow(rustdoc::invalid_html_tags)]
6830    #[doc = "Information about the user"]
6831    #[allow(clippy::needless_lifetimes)]
6832    fn get_user<'a>(&'a self) -> &'a User;
6833    #[allow(rustdoc::invalid_html_tags)]
6834    #[doc = "Information about the user"]
6835    #[allow(clippy::needless_lifetimes)]
6836    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
6837    #[allow(rustdoc::invalid_html_tags)]
6838    #[doc = "True, if the user's presence in the chat is hidden"]
6839    #[allow(clippy::needless_lifetimes)]
6840    fn get_is_anonymous<'a>(&'a self) -> bool;
6841    #[allow(rustdoc::invalid_html_tags)]
6842    #[doc = "True, if the user's presence in the chat is hidden"]
6843    #[allow(clippy::needless_lifetimes)]
6844    fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self;
6845    #[allow(rustdoc::invalid_html_tags)]
6846    #[doc = "Optional. Custom title for this user"]
6847    #[allow(clippy::needless_lifetimes)]
6848    fn get_custom_title<'a>(&'a self) -> Option<&'a str>;
6849    #[allow(rustdoc::invalid_html_tags)]
6850    #[doc = "Optional. Custom title for this user"]
6851    #[allow(clippy::needless_lifetimes)]
6852    fn set_custom_title<'a>(&'a mut self, custom_title: Option<String>) -> &'a mut Self;
6853}
6854#[allow(dead_code)]
6855trait TraitPreCheckoutQuery {
6856    #[allow(rustdoc::invalid_html_tags)]
6857    #[doc = "Unique query identifier"]
6858    #[allow(clippy::needless_lifetimes)]
6859    fn get_id<'a>(&'a self) -> &'a str;
6860    #[allow(rustdoc::invalid_html_tags)]
6861    #[doc = "Unique query identifier"]
6862    #[allow(clippy::needless_lifetimes)]
6863    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
6864    #[allow(rustdoc::invalid_html_tags)]
6865    #[doc = "User who sent the query"]
6866    #[allow(clippy::needless_lifetimes)]
6867    fn get_from<'a>(&'a self) -> &'a User;
6868    #[allow(rustdoc::invalid_html_tags)]
6869    #[doc = "User who sent the query"]
6870    #[allow(clippy::needless_lifetimes)]
6871    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
6872    #[allow(rustdoc::invalid_html_tags)]
6873    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
6874    #[allow(clippy::needless_lifetimes)]
6875    fn get_currency<'a>(&'a self) -> &'a str;
6876    #[allow(rustdoc::invalid_html_tags)]
6877    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
6878    #[allow(clippy::needless_lifetimes)]
6879    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self;
6880    #[allow(rustdoc::invalid_html_tags)]
6881    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
6882    #[allow(clippy::needless_lifetimes)]
6883    fn get_total_amount<'a>(&'a self) -> i64;
6884    #[allow(rustdoc::invalid_html_tags)]
6885    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
6886    #[allow(clippy::needless_lifetimes)]
6887    fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self;
6888    #[allow(rustdoc::invalid_html_tags)]
6889    #[doc = "Bot-specified invoice payload"]
6890    #[allow(clippy::needless_lifetimes)]
6891    fn get_invoice_payload<'a>(&'a self) -> &'a str;
6892    #[allow(rustdoc::invalid_html_tags)]
6893    #[doc = "Bot-specified invoice payload"]
6894    #[allow(clippy::needless_lifetimes)]
6895    fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self;
6896    #[allow(rustdoc::invalid_html_tags)]
6897    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
6898    #[allow(clippy::needless_lifetimes)]
6899    fn get_shipping_option_id<'a>(&'a self) -> Option<&'a str>;
6900    #[allow(rustdoc::invalid_html_tags)]
6901    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
6902    #[allow(clippy::needless_lifetimes)]
6903    fn set_shipping_option_id<'a>(&'a mut self, shipping_option_id: Option<String>)
6904        -> &'a mut Self;
6905    #[allow(rustdoc::invalid_html_tags)]
6906    #[doc = "Optional. Order information provided by the user"]
6907    #[allow(clippy::needless_lifetimes)]
6908    fn get_order_info<'a>(&'a self) -> Option<&'a OrderInfo>;
6909    #[allow(rustdoc::invalid_html_tags)]
6910    #[doc = "Optional. Order information provided by the user"]
6911    #[allow(clippy::needless_lifetimes)]
6912    fn set_order_info<'a>(&'a mut self, order_info: Option<OrderInfo>) -> &'a mut Self;
6913}
6914#[allow(dead_code)]
6915trait TraitBackgroundType:
6916    TraitBackgroundTypeFill
6917    + TraitBackgroundTypeWallpaper
6918    + TraitBackgroundTypePattern
6919    + TraitBackgroundTypeChatTheme
6920{
6921}
6922#[allow(dead_code)]
6923trait TraitInlineQueryResultVenue {
6924    #[allow(rustdoc::invalid_html_tags)]
6925    #[doc = "Type of the result, must be venue"]
6926    #[allow(clippy::needless_lifetimes)]
6927    fn get_tg_type<'a>(&'a self) -> &'a str;
6928    #[allow(rustdoc::invalid_html_tags)]
6929    #[doc = "Type of the result, must be venue"]
6930    #[allow(clippy::needless_lifetimes)]
6931    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
6932    #[allow(rustdoc::invalid_html_tags)]
6933    #[doc = "Unique identifier for this result, 1-64 Bytes"]
6934    #[allow(clippy::needless_lifetimes)]
6935    fn get_id<'a>(&'a self) -> &'a str;
6936    #[allow(rustdoc::invalid_html_tags)]
6937    #[doc = "Unique identifier for this result, 1-64 Bytes"]
6938    #[allow(clippy::needless_lifetimes)]
6939    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
6940    #[allow(rustdoc::invalid_html_tags)]
6941    #[doc = "Latitude of the venue location in degrees"]
6942    #[allow(clippy::needless_lifetimes)]
6943    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
6944    #[allow(rustdoc::invalid_html_tags)]
6945    #[doc = "Latitude of the venue location in degrees"]
6946    #[allow(clippy::needless_lifetimes)]
6947    fn set_latitude<'a>(&'a mut self, latitude: ::ordered_float::OrderedFloat<f64>)
6948        -> &'a mut Self;
6949    #[allow(rustdoc::invalid_html_tags)]
6950    #[doc = "Longitude of the venue location in degrees"]
6951    #[allow(clippy::needless_lifetimes)]
6952    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
6953    #[allow(rustdoc::invalid_html_tags)]
6954    #[doc = "Longitude of the venue location in degrees"]
6955    #[allow(clippy::needless_lifetimes)]
6956    fn set_longitude<'a>(
6957        &'a mut self,
6958        longitude: ::ordered_float::OrderedFloat<f64>,
6959    ) -> &'a mut Self;
6960    #[allow(rustdoc::invalid_html_tags)]
6961    #[doc = "Title of the venue"]
6962    #[allow(clippy::needless_lifetimes)]
6963    fn get_title<'a>(&'a self) -> &'a str;
6964    #[allow(rustdoc::invalid_html_tags)]
6965    #[doc = "Title of the venue"]
6966    #[allow(clippy::needless_lifetimes)]
6967    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
6968    #[allow(rustdoc::invalid_html_tags)]
6969    #[doc = "Address of the venue"]
6970    #[allow(clippy::needless_lifetimes)]
6971    fn get_address<'a>(&'a self) -> &'a str;
6972    #[allow(rustdoc::invalid_html_tags)]
6973    #[doc = "Address of the venue"]
6974    #[allow(clippy::needless_lifetimes)]
6975    fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self;
6976    #[allow(rustdoc::invalid_html_tags)]
6977    #[doc = "Optional. Foursquare identifier of the venue if known"]
6978    #[allow(clippy::needless_lifetimes)]
6979    fn get_foursquare_id<'a>(&'a self) -> Option<&'a str>;
6980    #[allow(rustdoc::invalid_html_tags)]
6981    #[doc = "Optional. Foursquare identifier of the venue if known"]
6982    #[allow(clippy::needless_lifetimes)]
6983    fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self;
6984    #[allow(rustdoc::invalid_html_tags)]
6985    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
6986    #[allow(clippy::needless_lifetimes)]
6987    fn get_foursquare_type<'a>(&'a self) -> Option<&'a str>;
6988    #[allow(rustdoc::invalid_html_tags)]
6989    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
6990    #[allow(clippy::needless_lifetimes)]
6991    fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self;
6992    #[allow(rustdoc::invalid_html_tags)]
6993    #[doc = "Optional. Google Places identifier of the venue"]
6994    #[allow(clippy::needless_lifetimes)]
6995    fn get_google_place_id<'a>(&'a self) -> Option<&'a str>;
6996    #[allow(rustdoc::invalid_html_tags)]
6997    #[doc = "Optional. Google Places identifier of the venue"]
6998    #[allow(clippy::needless_lifetimes)]
6999    fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self;
7000    #[allow(rustdoc::invalid_html_tags)]
7001    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
7002    #[allow(clippy::needless_lifetimes)]
7003    fn get_google_place_type<'a>(&'a self) -> Option<&'a str>;
7004    #[allow(rustdoc::invalid_html_tags)]
7005    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
7006    #[allow(clippy::needless_lifetimes)]
7007    fn set_google_place_type<'a>(&'a mut self, google_place_type: Option<String>) -> &'a mut Self;
7008    #[allow(rustdoc::invalid_html_tags)]
7009    #[doc = "Optional. Inline keyboard attached to the message"]
7010    #[allow(clippy::needless_lifetimes)]
7011    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
7012    #[allow(rustdoc::invalid_html_tags)]
7013    #[doc = "Optional. Inline keyboard attached to the message"]
7014    #[allow(clippy::needless_lifetimes)]
7015    fn set_reply_markup<'a>(
7016        &'a mut self,
7017        reply_markup: Option<InlineKeyboardMarkup>,
7018    ) -> &'a mut Self;
7019    #[allow(rustdoc::invalid_html_tags)]
7020    #[doc = "Optional. Content of the message to be sent instead of the venue"]
7021    #[allow(clippy::needless_lifetimes)]
7022    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
7023    #[allow(rustdoc::invalid_html_tags)]
7024    #[doc = "Optional. Content of the message to be sent instead of the venue"]
7025    #[allow(clippy::needless_lifetimes)]
7026    fn set_input_message_content<'a>(
7027        &'a mut self,
7028        input_message_content: Option<InputMessageContent>,
7029    ) -> &'a mut Self;
7030    #[allow(rustdoc::invalid_html_tags)]
7031    #[doc = "Optional. Url of the thumbnail for the result"]
7032    #[allow(clippy::needless_lifetimes)]
7033    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str>;
7034    #[allow(rustdoc::invalid_html_tags)]
7035    #[doc = "Optional. Url of the thumbnail for the result"]
7036    #[allow(clippy::needless_lifetimes)]
7037    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self;
7038    #[allow(rustdoc::invalid_html_tags)]
7039    #[doc = "Optional. Thumbnail width"]
7040    #[allow(clippy::needless_lifetimes)]
7041    fn get_thumbnail_width<'a>(&'a self) -> Option<i64>;
7042    #[allow(rustdoc::invalid_html_tags)]
7043    #[doc = "Optional. Thumbnail width"]
7044    #[allow(clippy::needless_lifetimes)]
7045    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self;
7046    #[allow(rustdoc::invalid_html_tags)]
7047    #[doc = "Optional. Thumbnail height"]
7048    #[allow(clippy::needless_lifetimes)]
7049    fn get_thumbnail_height<'a>(&'a self) -> Option<i64>;
7050    #[allow(rustdoc::invalid_html_tags)]
7051    #[doc = "Optional. Thumbnail height"]
7052    #[allow(clippy::needless_lifetimes)]
7053    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self;
7054}
7055#[allow(dead_code)]
7056trait TraitPaidMediaInfo {
7057    #[allow(rustdoc::invalid_html_tags)]
7058    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
7059    #[allow(clippy::needless_lifetimes)]
7060    fn get_star_count<'a>(&'a self) -> i64;
7061    #[allow(rustdoc::invalid_html_tags)]
7062    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
7063    #[allow(clippy::needless_lifetimes)]
7064    fn set_star_count<'a>(&'a mut self, star_count: i64) -> &'a mut Self;
7065    #[allow(rustdoc::invalid_html_tags)]
7066    #[doc = "Information about the paid media"]
7067    #[allow(clippy::needless_lifetimes)]
7068    fn get_paid_media<'a>(&'a self) -> &'a Vec<PaidMedia>;
7069    #[allow(rustdoc::invalid_html_tags)]
7070    #[doc = "Information about the paid media"]
7071    #[allow(clippy::needless_lifetimes)]
7072    fn set_paid_media<'a>(&'a mut self, paid_media: Vec<PaidMedia>) -> &'a mut Self;
7073}
7074#[allow(dead_code)]
7075trait TraitInlineQueryResultCachedPhoto {
7076    #[allow(rustdoc::invalid_html_tags)]
7077    #[doc = "Type of the result, must be photo"]
7078    #[allow(clippy::needless_lifetimes)]
7079    fn get_tg_type<'a>(&'a self) -> &'a str;
7080    #[allow(rustdoc::invalid_html_tags)]
7081    #[doc = "Type of the result, must be photo"]
7082    #[allow(clippy::needless_lifetimes)]
7083    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
7084    #[allow(rustdoc::invalid_html_tags)]
7085    #[doc = "Unique identifier for this result, 1-64 bytes"]
7086    #[allow(clippy::needless_lifetimes)]
7087    fn get_id<'a>(&'a self) -> &'a str;
7088    #[allow(rustdoc::invalid_html_tags)]
7089    #[doc = "Unique identifier for this result, 1-64 bytes"]
7090    #[allow(clippy::needless_lifetimes)]
7091    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
7092    #[allow(rustdoc::invalid_html_tags)]
7093    #[doc = "A valid file identifier of the photo"]
7094    #[allow(clippy::needless_lifetimes)]
7095    fn get_photo_file_id<'a>(&'a self) -> &'a str;
7096    #[allow(rustdoc::invalid_html_tags)]
7097    #[doc = "A valid file identifier of the photo"]
7098    #[allow(clippy::needless_lifetimes)]
7099    fn set_photo_file_id<'a>(&'a mut self, photo_file_id: String) -> &'a mut Self;
7100    #[allow(rustdoc::invalid_html_tags)]
7101    #[doc = "Optional. Title for the result"]
7102    #[allow(clippy::needless_lifetimes)]
7103    fn get_title<'a>(&'a self) -> Option<&'a str>;
7104    #[allow(rustdoc::invalid_html_tags)]
7105    #[doc = "Optional. Title for the result"]
7106    #[allow(clippy::needless_lifetimes)]
7107    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
7108    #[allow(rustdoc::invalid_html_tags)]
7109    #[doc = "Optional. Short description of the result"]
7110    #[allow(clippy::needless_lifetimes)]
7111    fn get_description<'a>(&'a self) -> Option<&'a str>;
7112    #[allow(rustdoc::invalid_html_tags)]
7113    #[doc = "Optional. Short description of the result"]
7114    #[allow(clippy::needless_lifetimes)]
7115    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
7116    #[allow(rustdoc::invalid_html_tags)]
7117    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
7118    #[allow(clippy::needless_lifetimes)]
7119    fn get_caption<'a>(&'a self) -> Option<&'a str>;
7120    #[allow(rustdoc::invalid_html_tags)]
7121    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
7122    #[allow(clippy::needless_lifetimes)]
7123    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
7124    #[allow(rustdoc::invalid_html_tags)]
7125    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
7126    #[allow(clippy::needless_lifetimes)]
7127    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
7128    #[allow(rustdoc::invalid_html_tags)]
7129    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
7130    #[allow(clippy::needless_lifetimes)]
7131    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
7132    #[allow(rustdoc::invalid_html_tags)]
7133    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
7134    #[allow(clippy::needless_lifetimes)]
7135    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
7136    #[allow(rustdoc::invalid_html_tags)]
7137    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
7138    #[allow(clippy::needless_lifetimes)]
7139    fn set_caption_entities<'a>(
7140        &'a mut self,
7141        caption_entities: Option<Vec<MessageEntity>>,
7142    ) -> &'a mut Self;
7143    #[allow(rustdoc::invalid_html_tags)]
7144    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
7145    #[allow(clippy::needless_lifetimes)]
7146    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
7147    #[allow(rustdoc::invalid_html_tags)]
7148    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
7149    #[allow(clippy::needless_lifetimes)]
7150    fn set_show_caption_above_media<'a>(
7151        &'a mut self,
7152        show_caption_above_media: Option<bool>,
7153    ) -> &'a mut Self;
7154    #[allow(rustdoc::invalid_html_tags)]
7155    #[doc = "Optional. Inline keyboard attached to the message"]
7156    #[allow(clippy::needless_lifetimes)]
7157    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
7158    #[allow(rustdoc::invalid_html_tags)]
7159    #[doc = "Optional. Inline keyboard attached to the message"]
7160    #[allow(clippy::needless_lifetimes)]
7161    fn set_reply_markup<'a>(
7162        &'a mut self,
7163        reply_markup: Option<InlineKeyboardMarkup>,
7164    ) -> &'a mut Self;
7165    #[allow(rustdoc::invalid_html_tags)]
7166    #[doc = "Optional. Content of the message to be sent instead of the photo"]
7167    #[allow(clippy::needless_lifetimes)]
7168    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
7169    #[allow(rustdoc::invalid_html_tags)]
7170    #[doc = "Optional. Content of the message to be sent instead of the photo"]
7171    #[allow(clippy::needless_lifetimes)]
7172    fn set_input_message_content<'a>(
7173        &'a mut self,
7174        input_message_content: Option<InputMessageContent>,
7175    ) -> &'a mut Self;
7176}
7177#[allow(dead_code)]
7178trait TraitGeneralForumTopicUnhidden {}
7179#[allow(dead_code)]
7180trait TraitGiveawayWinners {
7181    #[allow(rustdoc::invalid_html_tags)]
7182    #[doc = "The chat that created the giveaway"]
7183    #[allow(clippy::needless_lifetimes)]
7184    fn get_chat<'a>(&'a self) -> &'a Chat;
7185    #[allow(rustdoc::invalid_html_tags)]
7186    #[doc = "The chat that created the giveaway"]
7187    #[allow(clippy::needless_lifetimes)]
7188    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
7189    #[allow(rustdoc::invalid_html_tags)]
7190    #[doc = "Identifier of the message with the giveaway in the chat"]
7191    #[allow(clippy::needless_lifetimes)]
7192    fn get_giveaway_message_id<'a>(&'a self) -> i64;
7193    #[allow(rustdoc::invalid_html_tags)]
7194    #[doc = "Identifier of the message with the giveaway in the chat"]
7195    #[allow(clippy::needless_lifetimes)]
7196    fn set_giveaway_message_id<'a>(&'a mut self, giveaway_message_id: i64) -> &'a mut Self;
7197    #[allow(rustdoc::invalid_html_tags)]
7198    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
7199    #[allow(clippy::needless_lifetimes)]
7200    fn get_winners_selection_date<'a>(&'a self) -> i64;
7201    #[allow(rustdoc::invalid_html_tags)]
7202    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
7203    #[allow(clippy::needless_lifetimes)]
7204    fn set_winners_selection_date<'a>(&'a mut self, winners_selection_date: i64) -> &'a mut Self;
7205    #[allow(rustdoc::invalid_html_tags)]
7206    #[doc = "Total number of winners in the giveaway"]
7207    #[allow(clippy::needless_lifetimes)]
7208    fn get_winner_count<'a>(&'a self) -> i64;
7209    #[allow(rustdoc::invalid_html_tags)]
7210    #[doc = "Total number of winners in the giveaway"]
7211    #[allow(clippy::needless_lifetimes)]
7212    fn set_winner_count<'a>(&'a mut self, winner_count: i64) -> &'a mut Self;
7213    #[allow(rustdoc::invalid_html_tags)]
7214    #[doc = "List of up to 100 winners of the giveaway"]
7215    #[allow(clippy::needless_lifetimes)]
7216    fn get_winners<'a>(&'a self) -> &'a Vec<User>;
7217    #[allow(rustdoc::invalid_html_tags)]
7218    #[doc = "List of up to 100 winners of the giveaway"]
7219    #[allow(clippy::needless_lifetimes)]
7220    fn set_winners<'a>(&'a mut self, winners: Vec<User>) -> &'a mut Self;
7221    #[allow(rustdoc::invalid_html_tags)]
7222    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
7223    #[allow(clippy::needless_lifetimes)]
7224    fn get_additional_chat_count<'a>(&'a self) -> Option<i64>;
7225    #[allow(rustdoc::invalid_html_tags)]
7226    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
7227    #[allow(clippy::needless_lifetimes)]
7228    fn set_additional_chat_count<'a>(
7229        &'a mut self,
7230        additional_chat_count: Option<i64>,
7231    ) -> &'a mut Self;
7232    #[allow(rustdoc::invalid_html_tags)]
7233    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
7234    #[allow(clippy::needless_lifetimes)]
7235    fn get_prize_star_count<'a>(&'a self) -> Option<i64>;
7236    #[allow(rustdoc::invalid_html_tags)]
7237    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
7238    #[allow(clippy::needless_lifetimes)]
7239    fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self;
7240    #[allow(rustdoc::invalid_html_tags)]
7241    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
7242    #[allow(clippy::needless_lifetimes)]
7243    fn get_premium_subscription_month_count<'a>(&'a self) -> Option<i64>;
7244    #[allow(rustdoc::invalid_html_tags)]
7245    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
7246    #[allow(clippy::needless_lifetimes)]
7247    fn set_premium_subscription_month_count<'a>(
7248        &'a mut self,
7249        premium_subscription_month_count: Option<i64>,
7250    ) -> &'a mut Self;
7251    #[allow(rustdoc::invalid_html_tags)]
7252    #[doc = "Optional. Number of undistributed prizes"]
7253    #[allow(clippy::needless_lifetimes)]
7254    fn get_unclaimed_prize_count<'a>(&'a self) -> Option<i64>;
7255    #[allow(rustdoc::invalid_html_tags)]
7256    #[doc = "Optional. Number of undistributed prizes"]
7257    #[allow(clippy::needless_lifetimes)]
7258    fn set_unclaimed_prize_count<'a>(
7259        &'a mut self,
7260        unclaimed_prize_count: Option<i64>,
7261    ) -> &'a mut Self;
7262    #[allow(rustdoc::invalid_html_tags)]
7263    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
7264    #[allow(clippy::needless_lifetimes)]
7265    fn get_only_new_members<'a>(&'a self) -> Option<bool>;
7266    #[allow(rustdoc::invalid_html_tags)]
7267    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
7268    #[allow(clippy::needless_lifetimes)]
7269    fn set_only_new_members<'a>(&'a mut self, only_new_members: Option<bool>) -> &'a mut Self;
7270    #[allow(rustdoc::invalid_html_tags)]
7271    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
7272    #[allow(clippy::needless_lifetimes)]
7273    fn get_was_refunded<'a>(&'a self) -> Option<bool>;
7274    #[allow(rustdoc::invalid_html_tags)]
7275    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
7276    #[allow(clippy::needless_lifetimes)]
7277    fn set_was_refunded<'a>(&'a mut self, was_refunded: Option<bool>) -> &'a mut Self;
7278    #[allow(rustdoc::invalid_html_tags)]
7279    #[doc = "Optional. Description of additional giveaway prize"]
7280    #[allow(clippy::needless_lifetimes)]
7281    fn get_prize_description<'a>(&'a self) -> Option<&'a str>;
7282    #[allow(rustdoc::invalid_html_tags)]
7283    #[doc = "Optional. Description of additional giveaway prize"]
7284    #[allow(clippy::needless_lifetimes)]
7285    fn set_prize_description<'a>(&'a mut self, prize_description: Option<String>) -> &'a mut Self;
7286}
7287#[allow(dead_code)]
7288trait TraitMessageOriginHiddenUser {
7289    #[allow(rustdoc::invalid_html_tags)]
7290    #[doc = "Type of the message origin, always \"hidden_user\""]
7291    #[allow(clippy::needless_lifetimes)]
7292    fn get_tg_type<'a>(&'a self) -> &'a str;
7293    #[allow(rustdoc::invalid_html_tags)]
7294    #[doc = "Type of the message origin, always \"hidden_user\""]
7295    #[allow(clippy::needless_lifetimes)]
7296    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
7297    #[allow(rustdoc::invalid_html_tags)]
7298    #[doc = "Date the message was sent originally in Unix time"]
7299    #[allow(clippy::needless_lifetimes)]
7300    fn get_date<'a>(&'a self) -> i64;
7301    #[allow(rustdoc::invalid_html_tags)]
7302    #[doc = "Date the message was sent originally in Unix time"]
7303    #[allow(clippy::needless_lifetimes)]
7304    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
7305    #[allow(rustdoc::invalid_html_tags)]
7306    #[doc = "Name of the user that sent the message originally"]
7307    #[allow(clippy::needless_lifetimes)]
7308    fn get_sender_user_name<'a>(&'a self) -> &'a str;
7309    #[allow(rustdoc::invalid_html_tags)]
7310    #[doc = "Name of the user that sent the message originally"]
7311    #[allow(clippy::needless_lifetimes)]
7312    fn set_sender_user_name<'a>(&'a mut self, sender_user_name: String) -> &'a mut Self;
7313}
7314#[allow(dead_code)]
7315trait TraitStoryAreaTypeLocation {
7316    #[allow(rustdoc::invalid_html_tags)]
7317    #[doc = "Type of the area, always \"location\""]
7318    #[allow(clippy::needless_lifetimes)]
7319    fn get_tg_type<'a>(&'a self) -> &'a str;
7320    #[allow(rustdoc::invalid_html_tags)]
7321    #[doc = "Type of the area, always \"location\""]
7322    #[allow(clippy::needless_lifetimes)]
7323    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
7324    #[allow(rustdoc::invalid_html_tags)]
7325    #[doc = "Location latitude in degrees"]
7326    #[allow(clippy::needless_lifetimes)]
7327    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
7328    #[allow(rustdoc::invalid_html_tags)]
7329    #[doc = "Location latitude in degrees"]
7330    #[allow(clippy::needless_lifetimes)]
7331    fn set_latitude<'a>(&'a mut self, latitude: ::ordered_float::OrderedFloat<f64>)
7332        -> &'a mut Self;
7333    #[allow(rustdoc::invalid_html_tags)]
7334    #[doc = "Location longitude in degrees"]
7335    #[allow(clippy::needless_lifetimes)]
7336    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
7337    #[allow(rustdoc::invalid_html_tags)]
7338    #[doc = "Location longitude in degrees"]
7339    #[allow(clippy::needless_lifetimes)]
7340    fn set_longitude<'a>(
7341        &'a mut self,
7342        longitude: ::ordered_float::OrderedFloat<f64>,
7343    ) -> &'a mut Self;
7344    #[allow(rustdoc::invalid_html_tags)]
7345    #[doc = "Optional. Address of the location"]
7346    #[allow(clippy::needless_lifetimes)]
7347    fn get_address<'a>(&'a self) -> Option<&'a LocationAddress>;
7348    #[allow(rustdoc::invalid_html_tags)]
7349    #[doc = "Optional. Address of the location"]
7350    #[allow(clippy::needless_lifetimes)]
7351    fn set_address<'a>(&'a mut self, address: Option<LocationAddress>) -> &'a mut Self;
7352}
7353#[allow(dead_code)]
7354trait TraitSuggestedPostParameters {
7355    #[allow(rustdoc::invalid_html_tags)]
7356    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
7357    #[allow(clippy::needless_lifetimes)]
7358    fn get_price<'a>(&'a self) -> Option<&'a SuggestedPostPrice>;
7359    #[allow(rustdoc::invalid_html_tags)]
7360    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
7361    #[allow(clippy::needless_lifetimes)]
7362    fn set_price<'a>(&'a mut self, price: Option<SuggestedPostPrice>) -> &'a mut Self;
7363    #[allow(rustdoc::invalid_html_tags)]
7364    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
7365    #[allow(clippy::needless_lifetimes)]
7366    fn get_send_date<'a>(&'a self) -> Option<i64>;
7367    #[allow(rustdoc::invalid_html_tags)]
7368    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
7369    #[allow(clippy::needless_lifetimes)]
7370    fn set_send_date<'a>(&'a mut self, send_date: Option<i64>) -> &'a mut Self;
7371}
7372#[allow(dead_code)]
7373trait TraitStickerSet {
7374    #[allow(rustdoc::invalid_html_tags)]
7375    #[doc = "Sticker set name"]
7376    #[allow(clippy::needless_lifetimes)]
7377    fn get_name<'a>(&'a self) -> &'a str;
7378    #[allow(rustdoc::invalid_html_tags)]
7379    #[doc = "Sticker set name"]
7380    #[allow(clippy::needless_lifetimes)]
7381    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
7382    #[allow(rustdoc::invalid_html_tags)]
7383    #[doc = "Sticker set title"]
7384    #[allow(clippy::needless_lifetimes)]
7385    fn get_title<'a>(&'a self) -> &'a str;
7386    #[allow(rustdoc::invalid_html_tags)]
7387    #[doc = "Sticker set title"]
7388    #[allow(clippy::needless_lifetimes)]
7389    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
7390    #[allow(rustdoc::invalid_html_tags)]
7391    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
7392    #[allow(clippy::needless_lifetimes)]
7393    fn get_sticker_type<'a>(&'a self) -> &'a str;
7394    #[allow(rustdoc::invalid_html_tags)]
7395    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
7396    #[allow(clippy::needless_lifetimes)]
7397    fn set_sticker_type<'a>(&'a mut self, sticker_type: String) -> &'a mut Self;
7398    #[allow(rustdoc::invalid_html_tags)]
7399    #[doc = "List of all set stickers"]
7400    #[allow(clippy::needless_lifetimes)]
7401    fn get_stickers<'a>(&'a self) -> &'a Vec<Sticker>;
7402    #[allow(rustdoc::invalid_html_tags)]
7403    #[doc = "List of all set stickers"]
7404    #[allow(clippy::needless_lifetimes)]
7405    fn set_stickers<'a>(&'a mut self, stickers: Vec<Sticker>) -> &'a mut Self;
7406    #[allow(rustdoc::invalid_html_tags)]
7407    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
7408    #[allow(clippy::needless_lifetimes)]
7409    fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize>;
7410    #[allow(rustdoc::invalid_html_tags)]
7411    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
7412    #[allow(clippy::needless_lifetimes)]
7413    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self;
7414}
7415#[allow(dead_code)]
7416trait TraitPoll {
7417    #[allow(rustdoc::invalid_html_tags)]
7418    #[doc = "Unique poll identifier"]
7419    #[allow(clippy::needless_lifetimes)]
7420    fn get_id<'a>(&'a self) -> &'a str;
7421    #[allow(rustdoc::invalid_html_tags)]
7422    #[doc = "Unique poll identifier"]
7423    #[allow(clippy::needless_lifetimes)]
7424    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
7425    #[allow(rustdoc::invalid_html_tags)]
7426    #[doc = "Poll question, 1-300 characters"]
7427    #[allow(clippy::needless_lifetimes)]
7428    fn get_question<'a>(&'a self) -> &'a str;
7429    #[allow(rustdoc::invalid_html_tags)]
7430    #[doc = "Poll question, 1-300 characters"]
7431    #[allow(clippy::needless_lifetimes)]
7432    fn set_question<'a>(&'a mut self, question: String) -> &'a mut Self;
7433    #[allow(rustdoc::invalid_html_tags)]
7434    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
7435    #[allow(clippy::needless_lifetimes)]
7436    fn get_question_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
7437    #[allow(rustdoc::invalid_html_tags)]
7438    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
7439    #[allow(clippy::needless_lifetimes)]
7440    fn set_question_entities<'a>(
7441        &'a mut self,
7442        question_entities: Option<Vec<MessageEntity>>,
7443    ) -> &'a mut Self;
7444    #[allow(rustdoc::invalid_html_tags)]
7445    #[doc = "List of poll options"]
7446    #[allow(clippy::needless_lifetimes)]
7447    fn get_options<'a>(&'a self) -> &'a Vec<PollOption>;
7448    #[allow(rustdoc::invalid_html_tags)]
7449    #[doc = "List of poll options"]
7450    #[allow(clippy::needless_lifetimes)]
7451    fn set_options<'a>(&'a mut self, options: Vec<PollOption>) -> &'a mut Self;
7452    #[allow(rustdoc::invalid_html_tags)]
7453    #[doc = "Total number of users that voted in the poll"]
7454    #[allow(clippy::needless_lifetimes)]
7455    fn get_total_voter_count<'a>(&'a self) -> i64;
7456    #[allow(rustdoc::invalid_html_tags)]
7457    #[doc = "Total number of users that voted in the poll"]
7458    #[allow(clippy::needless_lifetimes)]
7459    fn set_total_voter_count<'a>(&'a mut self, total_voter_count: i64) -> &'a mut Self;
7460    #[allow(rustdoc::invalid_html_tags)]
7461    #[doc = "True, if the poll is closed"]
7462    #[allow(clippy::needless_lifetimes)]
7463    fn get_is_closed<'a>(&'a self) -> bool;
7464    #[allow(rustdoc::invalid_html_tags)]
7465    #[doc = "True, if the poll is closed"]
7466    #[allow(clippy::needless_lifetimes)]
7467    fn set_is_closed<'a>(&'a mut self, is_closed: bool) -> &'a mut Self;
7468    #[allow(rustdoc::invalid_html_tags)]
7469    #[doc = "True, if the poll is anonymous"]
7470    #[allow(clippy::needless_lifetimes)]
7471    fn get_is_anonymous<'a>(&'a self) -> bool;
7472    #[allow(rustdoc::invalid_html_tags)]
7473    #[doc = "True, if the poll is anonymous"]
7474    #[allow(clippy::needless_lifetimes)]
7475    fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self;
7476    #[allow(rustdoc::invalid_html_tags)]
7477    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
7478    #[allow(clippy::needless_lifetimes)]
7479    fn get_tg_type<'a>(&'a self) -> &'a str;
7480    #[allow(rustdoc::invalid_html_tags)]
7481    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
7482    #[allow(clippy::needless_lifetimes)]
7483    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
7484    #[allow(rustdoc::invalid_html_tags)]
7485    #[doc = "True, if the poll allows multiple answers"]
7486    #[allow(clippy::needless_lifetimes)]
7487    fn get_allows_multiple_answers<'a>(&'a self) -> bool;
7488    #[allow(rustdoc::invalid_html_tags)]
7489    #[doc = "True, if the poll allows multiple answers"]
7490    #[allow(clippy::needless_lifetimes)]
7491    fn set_allows_multiple_answers<'a>(&'a mut self, allows_multiple_answers: bool)
7492        -> &'a mut Self;
7493    #[allow(rustdoc::invalid_html_tags)]
7494    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
7495    #[allow(clippy::needless_lifetimes)]
7496    fn get_correct_option_id<'a>(&'a self) -> Option<i64>;
7497    #[allow(rustdoc::invalid_html_tags)]
7498    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
7499    #[allow(clippy::needless_lifetimes)]
7500    fn set_correct_option_id<'a>(&'a mut self, correct_option_id: Option<i64>) -> &'a mut Self;
7501    #[allow(rustdoc::invalid_html_tags)]
7502    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
7503    #[allow(clippy::needless_lifetimes)]
7504    fn get_explanation<'a>(&'a self) -> Option<&'a str>;
7505    #[allow(rustdoc::invalid_html_tags)]
7506    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
7507    #[allow(clippy::needless_lifetimes)]
7508    fn set_explanation<'a>(&'a mut self, explanation: Option<String>) -> &'a mut Self;
7509    #[allow(rustdoc::invalid_html_tags)]
7510    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
7511    #[allow(clippy::needless_lifetimes)]
7512    fn get_explanation_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
7513    #[allow(rustdoc::invalid_html_tags)]
7514    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
7515    #[allow(clippy::needless_lifetimes)]
7516    fn set_explanation_entities<'a>(
7517        &'a mut self,
7518        explanation_entities: Option<Vec<MessageEntity>>,
7519    ) -> &'a mut Self;
7520    #[allow(rustdoc::invalid_html_tags)]
7521    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
7522    #[allow(clippy::needless_lifetimes)]
7523    fn get_open_period<'a>(&'a self) -> Option<i64>;
7524    #[allow(rustdoc::invalid_html_tags)]
7525    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
7526    #[allow(clippy::needless_lifetimes)]
7527    fn set_open_period<'a>(&'a mut self, open_period: Option<i64>) -> &'a mut Self;
7528    #[allow(rustdoc::invalid_html_tags)]
7529    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
7530    #[allow(clippy::needless_lifetimes)]
7531    fn get_close_date<'a>(&'a self) -> Option<i64>;
7532    #[allow(rustdoc::invalid_html_tags)]
7533    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
7534    #[allow(clippy::needless_lifetimes)]
7535    fn set_close_date<'a>(&'a mut self, close_date: Option<i64>) -> &'a mut Self;
7536}
7537#[allow(dead_code)]
7538trait TraitVideo {
7539    #[allow(rustdoc::invalid_html_tags)]
7540    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
7541    #[allow(clippy::needless_lifetimes)]
7542    fn get_file_id<'a>(&'a self) -> &'a str;
7543    #[allow(rustdoc::invalid_html_tags)]
7544    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
7545    #[allow(clippy::needless_lifetimes)]
7546    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
7547    #[allow(rustdoc::invalid_html_tags)]
7548    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
7549    #[allow(clippy::needless_lifetimes)]
7550    fn get_file_unique_id<'a>(&'a self) -> &'a str;
7551    #[allow(rustdoc::invalid_html_tags)]
7552    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
7553    #[allow(clippy::needless_lifetimes)]
7554    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
7555    #[allow(rustdoc::invalid_html_tags)]
7556    #[doc = "Video width as defined by the sender"]
7557    #[allow(clippy::needless_lifetimes)]
7558    fn get_width<'a>(&'a self) -> i64;
7559    #[allow(rustdoc::invalid_html_tags)]
7560    #[doc = "Video width as defined by the sender"]
7561    #[allow(clippy::needless_lifetimes)]
7562    fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self;
7563    #[allow(rustdoc::invalid_html_tags)]
7564    #[doc = "Video height as defined by the sender"]
7565    #[allow(clippy::needless_lifetimes)]
7566    fn get_height<'a>(&'a self) -> i64;
7567    #[allow(rustdoc::invalid_html_tags)]
7568    #[doc = "Video height as defined by the sender"]
7569    #[allow(clippy::needless_lifetimes)]
7570    fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self;
7571    #[allow(rustdoc::invalid_html_tags)]
7572    #[doc = "Duration of the video in seconds as defined by the sender"]
7573    #[allow(clippy::needless_lifetimes)]
7574    fn get_duration<'a>(&'a self) -> i64;
7575    #[allow(rustdoc::invalid_html_tags)]
7576    #[doc = "Duration of the video in seconds as defined by the sender"]
7577    #[allow(clippy::needless_lifetimes)]
7578    fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self;
7579    #[allow(rustdoc::invalid_html_tags)]
7580    #[doc = "Optional. Video thumbnail"]
7581    #[allow(clippy::needless_lifetimes)]
7582    fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize>;
7583    #[allow(rustdoc::invalid_html_tags)]
7584    #[doc = "Optional. Video thumbnail"]
7585    #[allow(clippy::needless_lifetimes)]
7586    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self;
7587    #[allow(rustdoc::invalid_html_tags)]
7588    #[doc = "Optional. Available sizes of the cover of the video in the message"]
7589    #[allow(clippy::needless_lifetimes)]
7590    fn get_cover<'a>(&'a self) -> Option<&'a Vec<PhotoSize>>;
7591    #[allow(rustdoc::invalid_html_tags)]
7592    #[doc = "Optional. Available sizes of the cover of the video in the message"]
7593    #[allow(clippy::needless_lifetimes)]
7594    fn set_cover<'a>(&'a mut self, cover: Option<Vec<PhotoSize>>) -> &'a mut Self;
7595    #[allow(rustdoc::invalid_html_tags)]
7596    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
7597    #[allow(clippy::needless_lifetimes)]
7598    fn get_start_timestamp<'a>(&'a self) -> Option<i64>;
7599    #[allow(rustdoc::invalid_html_tags)]
7600    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
7601    #[allow(clippy::needless_lifetimes)]
7602    fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self;
7603    #[allow(rustdoc::invalid_html_tags)]
7604    #[doc = "Optional. Original filename as defined by the sender"]
7605    #[allow(clippy::needless_lifetimes)]
7606    fn get_file_name<'a>(&'a self) -> Option<&'a str>;
7607    #[allow(rustdoc::invalid_html_tags)]
7608    #[doc = "Optional. Original filename as defined by the sender"]
7609    #[allow(clippy::needless_lifetimes)]
7610    fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self;
7611    #[allow(rustdoc::invalid_html_tags)]
7612    #[doc = "Optional. MIME type of the file as defined by the sender"]
7613    #[allow(clippy::needless_lifetimes)]
7614    fn get_mime_type<'a>(&'a self) -> Option<&'a str>;
7615    #[allow(rustdoc::invalid_html_tags)]
7616    #[doc = "Optional. MIME type of the file as defined by the sender"]
7617    #[allow(clippy::needless_lifetimes)]
7618    fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self;
7619    #[allow(rustdoc::invalid_html_tags)]
7620    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
7621    #[allow(clippy::needless_lifetimes)]
7622    fn get_file_size<'a>(&'a self) -> Option<i64>;
7623    #[allow(rustdoc::invalid_html_tags)]
7624    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
7625    #[allow(clippy::needless_lifetimes)]
7626    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
7627}
7628#[allow(dead_code)]
7629trait TraitGeneralForumTopicHidden {}
7630#[allow(dead_code)]
7631trait TraitChatAdministratorRights {
7632    #[allow(rustdoc::invalid_html_tags)]
7633    #[doc = "True, if the user's presence in the chat is hidden"]
7634    #[allow(clippy::needless_lifetimes)]
7635    fn get_is_anonymous<'a>(&'a self) -> bool;
7636    #[allow(rustdoc::invalid_html_tags)]
7637    #[doc = "True, if the user's presence in the chat is hidden"]
7638    #[allow(clippy::needless_lifetimes)]
7639    fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self;
7640    #[allow(rustdoc::invalid_html_tags)]
7641    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
7642    #[allow(clippy::needless_lifetimes)]
7643    fn get_can_manage_chat<'a>(&'a self) -> bool;
7644    #[allow(rustdoc::invalid_html_tags)]
7645    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
7646    #[allow(clippy::needless_lifetimes)]
7647    fn set_can_manage_chat<'a>(&'a mut self, can_manage_chat: bool) -> &'a mut Self;
7648    #[allow(rustdoc::invalid_html_tags)]
7649    #[doc = "True, if the administrator can delete messages of other users"]
7650    #[allow(clippy::needless_lifetimes)]
7651    fn get_can_delete_messages<'a>(&'a self) -> bool;
7652    #[allow(rustdoc::invalid_html_tags)]
7653    #[doc = "True, if the administrator can delete messages of other users"]
7654    #[allow(clippy::needless_lifetimes)]
7655    fn set_can_delete_messages<'a>(&'a mut self, can_delete_messages: bool) -> &'a mut Self;
7656    #[allow(rustdoc::invalid_html_tags)]
7657    #[doc = "True, if the administrator can manage video chats"]
7658    #[allow(clippy::needless_lifetimes)]
7659    fn get_can_manage_video_chats<'a>(&'a self) -> bool;
7660    #[allow(rustdoc::invalid_html_tags)]
7661    #[doc = "True, if the administrator can manage video chats"]
7662    #[allow(clippy::needless_lifetimes)]
7663    fn set_can_manage_video_chats<'a>(&'a mut self, can_manage_video_chats: bool) -> &'a mut Self;
7664    #[allow(rustdoc::invalid_html_tags)]
7665    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
7666    #[allow(clippy::needless_lifetimes)]
7667    fn get_can_restrict_members<'a>(&'a self) -> bool;
7668    #[allow(rustdoc::invalid_html_tags)]
7669    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
7670    #[allow(clippy::needless_lifetimes)]
7671    fn set_can_restrict_members<'a>(&'a mut self, can_restrict_members: bool) -> &'a mut Self;
7672    #[allow(rustdoc::invalid_html_tags)]
7673    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
7674    #[allow(clippy::needless_lifetimes)]
7675    fn get_can_promote_members<'a>(&'a self) -> bool;
7676    #[allow(rustdoc::invalid_html_tags)]
7677    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
7678    #[allow(clippy::needless_lifetimes)]
7679    fn set_can_promote_members<'a>(&'a mut self, can_promote_members: bool) -> &'a mut Self;
7680    #[allow(rustdoc::invalid_html_tags)]
7681    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
7682    #[allow(clippy::needless_lifetimes)]
7683    fn get_can_change_info<'a>(&'a self) -> bool;
7684    #[allow(rustdoc::invalid_html_tags)]
7685    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
7686    #[allow(clippy::needless_lifetimes)]
7687    fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self;
7688    #[allow(rustdoc::invalid_html_tags)]
7689    #[doc = "True, if the user is allowed to invite new users to the chat"]
7690    #[allow(clippy::needless_lifetimes)]
7691    fn get_can_invite_users<'a>(&'a self) -> bool;
7692    #[allow(rustdoc::invalid_html_tags)]
7693    #[doc = "True, if the user is allowed to invite new users to the chat"]
7694    #[allow(clippy::needless_lifetimes)]
7695    fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self;
7696    #[allow(rustdoc::invalid_html_tags)]
7697    #[doc = "True, if the administrator can post stories to the chat"]
7698    #[allow(clippy::needless_lifetimes)]
7699    fn get_can_post_stories<'a>(&'a self) -> bool;
7700    #[allow(rustdoc::invalid_html_tags)]
7701    #[doc = "True, if the administrator can post stories to the chat"]
7702    #[allow(clippy::needless_lifetimes)]
7703    fn set_can_post_stories<'a>(&'a mut self, can_post_stories: bool) -> &'a mut Self;
7704    #[allow(rustdoc::invalid_html_tags)]
7705    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
7706    #[allow(clippy::needless_lifetimes)]
7707    fn get_can_edit_stories<'a>(&'a self) -> bool;
7708    #[allow(rustdoc::invalid_html_tags)]
7709    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
7710    #[allow(clippy::needless_lifetimes)]
7711    fn set_can_edit_stories<'a>(&'a mut self, can_edit_stories: bool) -> &'a mut Self;
7712    #[allow(rustdoc::invalid_html_tags)]
7713    #[doc = "True, if the administrator can delete stories posted by other users"]
7714    #[allow(clippy::needless_lifetimes)]
7715    fn get_can_delete_stories<'a>(&'a self) -> bool;
7716    #[allow(rustdoc::invalid_html_tags)]
7717    #[doc = "True, if the administrator can delete stories posted by other users"]
7718    #[allow(clippy::needless_lifetimes)]
7719    fn set_can_delete_stories<'a>(&'a mut self, can_delete_stories: bool) -> &'a mut Self;
7720    #[allow(rustdoc::invalid_html_tags)]
7721    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
7722    #[allow(clippy::needless_lifetimes)]
7723    fn get_can_post_messages<'a>(&'a self) -> Option<bool>;
7724    #[allow(rustdoc::invalid_html_tags)]
7725    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
7726    #[allow(clippy::needless_lifetimes)]
7727    fn set_can_post_messages<'a>(&'a mut self, can_post_messages: Option<bool>) -> &'a mut Self;
7728    #[allow(rustdoc::invalid_html_tags)]
7729    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
7730    #[allow(clippy::needless_lifetimes)]
7731    fn get_can_edit_messages<'a>(&'a self) -> Option<bool>;
7732    #[allow(rustdoc::invalid_html_tags)]
7733    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
7734    #[allow(clippy::needless_lifetimes)]
7735    fn set_can_edit_messages<'a>(&'a mut self, can_edit_messages: Option<bool>) -> &'a mut Self;
7736    #[allow(rustdoc::invalid_html_tags)]
7737    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
7738    #[allow(clippy::needless_lifetimes)]
7739    fn get_can_pin_messages<'a>(&'a self) -> Option<bool>;
7740    #[allow(rustdoc::invalid_html_tags)]
7741    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
7742    #[allow(clippy::needless_lifetimes)]
7743    fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: Option<bool>) -> &'a mut Self;
7744    #[allow(rustdoc::invalid_html_tags)]
7745    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
7746    #[allow(clippy::needless_lifetimes)]
7747    fn get_can_manage_topics<'a>(&'a self) -> Option<bool>;
7748    #[allow(rustdoc::invalid_html_tags)]
7749    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
7750    #[allow(clippy::needless_lifetimes)]
7751    fn set_can_manage_topics<'a>(&'a mut self, can_manage_topics: Option<bool>) -> &'a mut Self;
7752    #[allow(rustdoc::invalid_html_tags)]
7753    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
7754    #[allow(clippy::needless_lifetimes)]
7755    fn get_can_manage_direct_messages<'a>(&'a self) -> Option<bool>;
7756    #[allow(rustdoc::invalid_html_tags)]
7757    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
7758    #[allow(clippy::needless_lifetimes)]
7759    fn set_can_manage_direct_messages<'a>(
7760        &'a mut self,
7761        can_manage_direct_messages: Option<bool>,
7762    ) -> &'a mut Self;
7763}
7764#[allow(dead_code)]
7765trait TraitResponseParameters {
7766    #[allow(rustdoc::invalid_html_tags)]
7767    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
7768    #[allow(clippy::needless_lifetimes)]
7769    fn get_migrate_to_chat_id<'a>(&'a self) -> Option<i64>;
7770    #[allow(rustdoc::invalid_html_tags)]
7771    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
7772    #[allow(clippy::needless_lifetimes)]
7773    fn set_migrate_to_chat_id<'a>(&'a mut self, migrate_to_chat_id: Option<i64>) -> &'a mut Self;
7774    #[allow(rustdoc::invalid_html_tags)]
7775    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
7776    #[allow(clippy::needless_lifetimes)]
7777    fn get_retry_after<'a>(&'a self) -> Option<i64>;
7778    #[allow(rustdoc::invalid_html_tags)]
7779    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
7780    #[allow(clippy::needless_lifetimes)]
7781    fn set_retry_after<'a>(&'a mut self, retry_after: Option<i64>) -> &'a mut Self;
7782}
7783#[allow(dead_code)]
7784trait TraitVideoNote {
7785    #[allow(rustdoc::invalid_html_tags)]
7786    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
7787    #[allow(clippy::needless_lifetimes)]
7788    fn get_file_id<'a>(&'a self) -> &'a str;
7789    #[allow(rustdoc::invalid_html_tags)]
7790    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
7791    #[allow(clippy::needless_lifetimes)]
7792    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
7793    #[allow(rustdoc::invalid_html_tags)]
7794    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
7795    #[allow(clippy::needless_lifetimes)]
7796    fn get_file_unique_id<'a>(&'a self) -> &'a str;
7797    #[allow(rustdoc::invalid_html_tags)]
7798    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
7799    #[allow(clippy::needless_lifetimes)]
7800    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
7801    #[allow(rustdoc::invalid_html_tags)]
7802    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
7803    #[allow(clippy::needless_lifetimes)]
7804    fn get_length<'a>(&'a self) -> i64;
7805    #[allow(rustdoc::invalid_html_tags)]
7806    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
7807    #[allow(clippy::needless_lifetimes)]
7808    fn set_length<'a>(&'a mut self, length: i64) -> &'a mut Self;
7809    #[allow(rustdoc::invalid_html_tags)]
7810    #[doc = "Duration of the video in seconds as defined by the sender"]
7811    #[allow(clippy::needless_lifetimes)]
7812    fn get_duration<'a>(&'a self) -> i64;
7813    #[allow(rustdoc::invalid_html_tags)]
7814    #[doc = "Duration of the video in seconds as defined by the sender"]
7815    #[allow(clippy::needless_lifetimes)]
7816    fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self;
7817    #[allow(rustdoc::invalid_html_tags)]
7818    #[doc = "Optional. Video thumbnail"]
7819    #[allow(clippy::needless_lifetimes)]
7820    fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize>;
7821    #[allow(rustdoc::invalid_html_tags)]
7822    #[doc = "Optional. Video thumbnail"]
7823    #[allow(clippy::needless_lifetimes)]
7824    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self;
7825    #[allow(rustdoc::invalid_html_tags)]
7826    #[doc = "Optional. File size in bytes"]
7827    #[allow(clippy::needless_lifetimes)]
7828    fn get_file_size<'a>(&'a self) -> Option<i64>;
7829    #[allow(rustdoc::invalid_html_tags)]
7830    #[doc = "Optional. File size in bytes"]
7831    #[allow(clippy::needless_lifetimes)]
7832    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
7833}
7834#[allow(dead_code)]
7835trait TraitReplyKeyboardRemove {
7836    #[allow(rustdoc::invalid_html_tags)]
7837    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
7838    #[allow(clippy::needless_lifetimes)]
7839    fn get_remove_keyboard<'a>(&'a self) -> bool;
7840    #[allow(rustdoc::invalid_html_tags)]
7841    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
7842    #[allow(clippy::needless_lifetimes)]
7843    fn set_remove_keyboard<'a>(&'a mut self, remove_keyboard: bool) -> &'a mut Self;
7844    #[allow(rustdoc::invalid_html_tags)]
7845    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
7846    #[allow(clippy::needless_lifetimes)]
7847    fn get_selective<'a>(&'a self) -> Option<bool>;
7848    #[allow(rustdoc::invalid_html_tags)]
7849    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
7850    #[allow(clippy::needless_lifetimes)]
7851    fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self;
7852}
7853#[allow(dead_code)]
7854trait TraitLabeledPrice {
7855    #[allow(rustdoc::invalid_html_tags)]
7856    #[doc = "Portion label"]
7857    #[allow(clippy::needless_lifetimes)]
7858    fn get_label<'a>(&'a self) -> &'a str;
7859    #[allow(rustdoc::invalid_html_tags)]
7860    #[doc = "Portion label"]
7861    #[allow(clippy::needless_lifetimes)]
7862    fn set_label<'a>(&'a mut self, label: String) -> &'a mut Self;
7863    #[allow(rustdoc::invalid_html_tags)]
7864    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
7865    #[allow(clippy::needless_lifetimes)]
7866    fn get_amount<'a>(&'a self) -> i64;
7867    #[allow(rustdoc::invalid_html_tags)]
7868    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
7869    #[allow(clippy::needless_lifetimes)]
7870    fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self;
7871}
7872#[allow(dead_code)]
7873trait TraitInputPollOption {
7874    #[allow(rustdoc::invalid_html_tags)]
7875    #[doc = "Option text, 1-100 characters"]
7876    #[allow(clippy::needless_lifetimes)]
7877    fn get_text<'a>(&'a self) -> &'a str;
7878    #[allow(rustdoc::invalid_html_tags)]
7879    #[doc = "Option text, 1-100 characters"]
7880    #[allow(clippy::needless_lifetimes)]
7881    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
7882    #[allow(rustdoc::invalid_html_tags)]
7883    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
7884    #[allow(clippy::needless_lifetimes)]
7885    fn get_text_parse_mode<'a>(&'a self) -> Option<&'a str>;
7886    #[allow(rustdoc::invalid_html_tags)]
7887    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
7888    #[allow(clippy::needless_lifetimes)]
7889    fn set_text_parse_mode<'a>(&'a mut self, text_parse_mode: Option<String>) -> &'a mut Self;
7890    #[allow(rustdoc::invalid_html_tags)]
7891    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
7892    #[allow(clippy::needless_lifetimes)]
7893    fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
7894    #[allow(rustdoc::invalid_html_tags)]
7895    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
7896    #[allow(clippy::needless_lifetimes)]
7897    fn set_text_entities<'a>(
7898        &'a mut self,
7899        text_entities: Option<Vec<MessageEntity>>,
7900    ) -> &'a mut Self;
7901}
7902#[allow(dead_code)]
7903trait TraitChatBoostSourcePremium {
7904    #[allow(rustdoc::invalid_html_tags)]
7905    #[doc = "Source of the boost, always \"premium\""]
7906    #[allow(clippy::needless_lifetimes)]
7907    fn get_source<'a>(&'a self) -> &'a str;
7908    #[allow(rustdoc::invalid_html_tags)]
7909    #[doc = "Source of the boost, always \"premium\""]
7910    #[allow(clippy::needless_lifetimes)]
7911    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
7912    #[allow(rustdoc::invalid_html_tags)]
7913    #[doc = "User that boosted the chat"]
7914    #[allow(clippy::needless_lifetimes)]
7915    fn get_user<'a>(&'a self) -> &'a User;
7916    #[allow(rustdoc::invalid_html_tags)]
7917    #[doc = "User that boosted the chat"]
7918    #[allow(clippy::needless_lifetimes)]
7919    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
7920}
7921#[allow(dead_code)]
7922trait TraitInputMediaVideo {
7923    #[allow(rustdoc::invalid_html_tags)]
7924    #[doc = "Type of the result, must be video"]
7925    #[allow(clippy::needless_lifetimes)]
7926    fn get_tg_type<'a>(&'a self) -> &'a str;
7927    #[allow(rustdoc::invalid_html_tags)]
7928    #[doc = "Type of the result, must be video"]
7929    #[allow(clippy::needless_lifetimes)]
7930    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
7931    #[allow(rustdoc::invalid_html_tags)]
7932    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
7933    #[allow(clippy::needless_lifetimes)]
7934    fn get_media<'a>(&'a self) -> &'a Option<InputFile>;
7935    #[allow(rustdoc::invalid_html_tags)]
7936    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
7937    #[allow(clippy::needless_lifetimes)]
7938    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self;
7939    #[allow(rustdoc::invalid_html_tags)]
7940    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
7941    #[allow(clippy::needless_lifetimes)]
7942    fn get_thumbnail<'a>(&'a self) -> Option<&'a str>;
7943    #[allow(rustdoc::invalid_html_tags)]
7944    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
7945    #[allow(clippy::needless_lifetimes)]
7946    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self;
7947    #[allow(rustdoc::invalid_html_tags)]
7948    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
7949    #[allow(clippy::needless_lifetimes)]
7950    fn get_cover<'a>(&'a self) -> Option<&'a str>;
7951    #[allow(rustdoc::invalid_html_tags)]
7952    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
7953    #[allow(clippy::needless_lifetimes)]
7954    fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self;
7955    #[allow(rustdoc::invalid_html_tags)]
7956    #[doc = "Optional. Start timestamp for the video in the message"]
7957    #[allow(clippy::needless_lifetimes)]
7958    fn get_start_timestamp<'a>(&'a self) -> Option<i64>;
7959    #[allow(rustdoc::invalid_html_tags)]
7960    #[doc = "Optional. Start timestamp for the video in the message"]
7961    #[allow(clippy::needless_lifetimes)]
7962    fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self;
7963    #[allow(rustdoc::invalid_html_tags)]
7964    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
7965    #[allow(clippy::needless_lifetimes)]
7966    fn get_caption<'a>(&'a self) -> Option<&'a str>;
7967    #[allow(rustdoc::invalid_html_tags)]
7968    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
7969    #[allow(clippy::needless_lifetimes)]
7970    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
7971    #[allow(rustdoc::invalid_html_tags)]
7972    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
7973    #[allow(clippy::needless_lifetimes)]
7974    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
7975    #[allow(rustdoc::invalid_html_tags)]
7976    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
7977    #[allow(clippy::needless_lifetimes)]
7978    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
7979    #[allow(rustdoc::invalid_html_tags)]
7980    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
7981    #[allow(clippy::needless_lifetimes)]
7982    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
7983    #[allow(rustdoc::invalid_html_tags)]
7984    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
7985    #[allow(clippy::needless_lifetimes)]
7986    fn set_caption_entities<'a>(
7987        &'a mut self,
7988        caption_entities: Option<Vec<MessageEntity>>,
7989    ) -> &'a mut Self;
7990    #[allow(rustdoc::invalid_html_tags)]
7991    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
7992    #[allow(clippy::needless_lifetimes)]
7993    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
7994    #[allow(rustdoc::invalid_html_tags)]
7995    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
7996    #[allow(clippy::needless_lifetimes)]
7997    fn set_show_caption_above_media<'a>(
7998        &'a mut self,
7999        show_caption_above_media: Option<bool>,
8000    ) -> &'a mut Self;
8001    #[allow(rustdoc::invalid_html_tags)]
8002    #[doc = "Optional. Video width"]
8003    #[allow(clippy::needless_lifetimes)]
8004    fn get_width<'a>(&'a self) -> Option<i64>;
8005    #[allow(rustdoc::invalid_html_tags)]
8006    #[doc = "Optional. Video width"]
8007    #[allow(clippy::needless_lifetimes)]
8008    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self;
8009    #[allow(rustdoc::invalid_html_tags)]
8010    #[doc = "Optional. Video height"]
8011    #[allow(clippy::needless_lifetimes)]
8012    fn get_height<'a>(&'a self) -> Option<i64>;
8013    #[allow(rustdoc::invalid_html_tags)]
8014    #[doc = "Optional. Video height"]
8015    #[allow(clippy::needless_lifetimes)]
8016    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self;
8017    #[allow(rustdoc::invalid_html_tags)]
8018    #[doc = "Optional. Video duration in seconds"]
8019    #[allow(clippy::needless_lifetimes)]
8020    fn get_duration<'a>(&'a self) -> Option<i64>;
8021    #[allow(rustdoc::invalid_html_tags)]
8022    #[doc = "Optional. Video duration in seconds"]
8023    #[allow(clippy::needless_lifetimes)]
8024    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self;
8025    #[allow(rustdoc::invalid_html_tags)]
8026    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
8027    #[allow(clippy::needless_lifetimes)]
8028    fn get_supports_streaming<'a>(&'a self) -> Option<bool>;
8029    #[allow(rustdoc::invalid_html_tags)]
8030    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
8031    #[allow(clippy::needless_lifetimes)]
8032    fn set_supports_streaming<'a>(&'a mut self, supports_streaming: Option<bool>) -> &'a mut Self;
8033    #[allow(rustdoc::invalid_html_tags)]
8034    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
8035    #[allow(clippy::needless_lifetimes)]
8036    fn get_has_spoiler<'a>(&'a self) -> Option<bool>;
8037    #[allow(rustdoc::invalid_html_tags)]
8038    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
8039    #[allow(clippy::needless_lifetimes)]
8040    fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self;
8041}
8042#[allow(dead_code)]
8043trait TraitInputMediaAudio {
8044    #[allow(rustdoc::invalid_html_tags)]
8045    #[doc = "Type of the result, must be audio"]
8046    #[allow(clippy::needless_lifetimes)]
8047    fn get_tg_type<'a>(&'a self) -> &'a str;
8048    #[allow(rustdoc::invalid_html_tags)]
8049    #[doc = "Type of the result, must be audio"]
8050    #[allow(clippy::needless_lifetimes)]
8051    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
8052    #[allow(rustdoc::invalid_html_tags)]
8053    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
8054    #[allow(clippy::needless_lifetimes)]
8055    fn get_media<'a>(&'a self) -> &'a Option<InputFile>;
8056    #[allow(rustdoc::invalid_html_tags)]
8057    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
8058    #[allow(clippy::needless_lifetimes)]
8059    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self;
8060    #[allow(rustdoc::invalid_html_tags)]
8061    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
8062    #[allow(clippy::needless_lifetimes)]
8063    fn get_thumbnail<'a>(&'a self) -> Option<&'a str>;
8064    #[allow(rustdoc::invalid_html_tags)]
8065    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
8066    #[allow(clippy::needless_lifetimes)]
8067    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self;
8068    #[allow(rustdoc::invalid_html_tags)]
8069    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
8070    #[allow(clippy::needless_lifetimes)]
8071    fn get_caption<'a>(&'a self) -> Option<&'a str>;
8072    #[allow(rustdoc::invalid_html_tags)]
8073    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
8074    #[allow(clippy::needless_lifetimes)]
8075    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
8076    #[allow(rustdoc::invalid_html_tags)]
8077    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
8078    #[allow(clippy::needless_lifetimes)]
8079    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
8080    #[allow(rustdoc::invalid_html_tags)]
8081    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
8082    #[allow(clippy::needless_lifetimes)]
8083    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
8084    #[allow(rustdoc::invalid_html_tags)]
8085    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
8086    #[allow(clippy::needless_lifetimes)]
8087    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
8088    #[allow(rustdoc::invalid_html_tags)]
8089    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
8090    #[allow(clippy::needless_lifetimes)]
8091    fn set_caption_entities<'a>(
8092        &'a mut self,
8093        caption_entities: Option<Vec<MessageEntity>>,
8094    ) -> &'a mut Self;
8095    #[allow(rustdoc::invalid_html_tags)]
8096    #[doc = "Optional. Duration of the audio in seconds"]
8097    #[allow(clippy::needless_lifetimes)]
8098    fn get_duration<'a>(&'a self) -> Option<i64>;
8099    #[allow(rustdoc::invalid_html_tags)]
8100    #[doc = "Optional. Duration of the audio in seconds"]
8101    #[allow(clippy::needless_lifetimes)]
8102    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self;
8103    #[allow(rustdoc::invalid_html_tags)]
8104    #[doc = "Optional. Performer of the audio"]
8105    #[allow(clippy::needless_lifetimes)]
8106    fn get_performer<'a>(&'a self) -> Option<&'a str>;
8107    #[allow(rustdoc::invalid_html_tags)]
8108    #[doc = "Optional. Performer of the audio"]
8109    #[allow(clippy::needless_lifetimes)]
8110    fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self;
8111    #[allow(rustdoc::invalid_html_tags)]
8112    #[doc = "Optional. Title of the audio"]
8113    #[allow(clippy::needless_lifetimes)]
8114    fn get_title<'a>(&'a self) -> Option<&'a str>;
8115    #[allow(rustdoc::invalid_html_tags)]
8116    #[doc = "Optional. Title of the audio"]
8117    #[allow(clippy::needless_lifetimes)]
8118    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
8119}
8120#[allow(dead_code)]
8121trait TraitChatBoostSource:
8122    TraitChatBoostSourcePremium + TraitChatBoostSourceGiftCode + TraitChatBoostSourceGiveaway
8123{
8124}
8125#[allow(dead_code)]
8126trait TraitBotCommandScope:
8127    TraitBotCommandScopeDefault
8128    + TraitBotCommandScopeAllPrivateChats
8129    + TraitBotCommandScopeAllGroupChats
8130    + TraitBotCommandScopeAllChatAdministrators
8131    + TraitBotCommandScopeChat
8132    + TraitBotCommandScopeChatAdministrators
8133    + TraitBotCommandScopeChatMember
8134{
8135}
8136#[allow(dead_code)]
8137trait TraitOwnedGifts {
8138    #[allow(rustdoc::invalid_html_tags)]
8139    #[doc = "The total number of gifts owned by the user or the chat"]
8140    #[allow(clippy::needless_lifetimes)]
8141    fn get_total_count<'a>(&'a self) -> i64;
8142    #[allow(rustdoc::invalid_html_tags)]
8143    #[doc = "The total number of gifts owned by the user or the chat"]
8144    #[allow(clippy::needless_lifetimes)]
8145    fn set_total_count<'a>(&'a mut self, total_count: i64) -> &'a mut Self;
8146    #[allow(rustdoc::invalid_html_tags)]
8147    #[doc = "The list of gifts"]
8148    #[allow(clippy::needless_lifetimes)]
8149    fn get_gifts<'a>(&'a self) -> &'a Vec<OwnedGift>;
8150    #[allow(rustdoc::invalid_html_tags)]
8151    #[doc = "The list of gifts"]
8152    #[allow(clippy::needless_lifetimes)]
8153    fn set_gifts<'a>(&'a mut self, gifts: Vec<OwnedGift>) -> &'a mut Self;
8154    #[allow(rustdoc::invalid_html_tags)]
8155    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
8156    #[allow(clippy::needless_lifetimes)]
8157    fn get_next_offset<'a>(&'a self) -> Option<&'a str>;
8158    #[allow(rustdoc::invalid_html_tags)]
8159    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
8160    #[allow(clippy::needless_lifetimes)]
8161    fn set_next_offset<'a>(&'a mut self, next_offset: Option<String>) -> &'a mut Self;
8162}
8163#[allow(dead_code)]
8164trait TraitEncryptedPassportElement {
8165    #[allow(rustdoc::invalid_html_tags)]
8166    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
8167    #[allow(clippy::needless_lifetimes)]
8168    fn get_tg_type<'a>(&'a self) -> &'a str;
8169    #[allow(rustdoc::invalid_html_tags)]
8170    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
8171    #[allow(clippy::needless_lifetimes)]
8172    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
8173    #[allow(rustdoc::invalid_html_tags)]
8174    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
8175    #[allow(clippy::needless_lifetimes)]
8176    fn get_data<'a>(&'a self) -> Option<&'a str>;
8177    #[allow(rustdoc::invalid_html_tags)]
8178    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
8179    #[allow(clippy::needless_lifetimes)]
8180    fn set_data<'a>(&'a mut self, data: Option<String>) -> &'a mut Self;
8181    #[allow(rustdoc::invalid_html_tags)]
8182    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
8183    #[allow(clippy::needless_lifetimes)]
8184    fn get_phone_number<'a>(&'a self) -> Option<&'a str>;
8185    #[allow(rustdoc::invalid_html_tags)]
8186    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
8187    #[allow(clippy::needless_lifetimes)]
8188    fn set_phone_number<'a>(&'a mut self, phone_number: Option<String>) -> &'a mut Self;
8189    #[allow(rustdoc::invalid_html_tags)]
8190    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
8191    #[allow(clippy::needless_lifetimes)]
8192    fn get_email<'a>(&'a self) -> Option<&'a str>;
8193    #[allow(rustdoc::invalid_html_tags)]
8194    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
8195    #[allow(clippy::needless_lifetimes)]
8196    fn set_email<'a>(&'a mut self, email: Option<String>) -> &'a mut Self;
8197    #[allow(rustdoc::invalid_html_tags)]
8198    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
8199    #[allow(clippy::needless_lifetimes)]
8200    fn get_files<'a>(&'a self) -> Option<&'a Vec<PassportFile>>;
8201    #[allow(rustdoc::invalid_html_tags)]
8202    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
8203    #[allow(clippy::needless_lifetimes)]
8204    fn set_files<'a>(&'a mut self, files: Option<Vec<PassportFile>>) -> &'a mut Self;
8205    #[allow(rustdoc::invalid_html_tags)]
8206    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
8207    #[allow(clippy::needless_lifetimes)]
8208    fn get_front_side<'a>(&'a self) -> Option<&'a PassportFile>;
8209    #[allow(rustdoc::invalid_html_tags)]
8210    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
8211    #[allow(clippy::needless_lifetimes)]
8212    fn set_front_side<'a>(&'a mut self, front_side: Option<PassportFile>) -> &'a mut Self;
8213    #[allow(rustdoc::invalid_html_tags)]
8214    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
8215    #[allow(clippy::needless_lifetimes)]
8216    fn get_reverse_side<'a>(&'a self) -> Option<&'a PassportFile>;
8217    #[allow(rustdoc::invalid_html_tags)]
8218    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
8219    #[allow(clippy::needless_lifetimes)]
8220    fn set_reverse_side<'a>(&'a mut self, reverse_side: Option<PassportFile>) -> &'a mut Self;
8221    #[allow(rustdoc::invalid_html_tags)]
8222    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
8223    #[allow(clippy::needless_lifetimes)]
8224    fn get_selfie<'a>(&'a self) -> Option<&'a PassportFile>;
8225    #[allow(rustdoc::invalid_html_tags)]
8226    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
8227    #[allow(clippy::needless_lifetimes)]
8228    fn set_selfie<'a>(&'a mut self, selfie: Option<PassportFile>) -> &'a mut Self;
8229    #[allow(rustdoc::invalid_html_tags)]
8230    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
8231    #[allow(clippy::needless_lifetimes)]
8232    fn get_translation<'a>(&'a self) -> Option<&'a Vec<PassportFile>>;
8233    #[allow(rustdoc::invalid_html_tags)]
8234    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
8235    #[allow(clippy::needless_lifetimes)]
8236    fn set_translation<'a>(&'a mut self, translation: Option<Vec<PassportFile>>) -> &'a mut Self;
8237    #[allow(rustdoc::invalid_html_tags)]
8238    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
8239    #[allow(clippy::needless_lifetimes)]
8240    fn get_hash<'a>(&'a self) -> &'a str;
8241    #[allow(rustdoc::invalid_html_tags)]
8242    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
8243    #[allow(clippy::needless_lifetimes)]
8244    fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self;
8245}
8246#[allow(dead_code)]
8247trait TraitPaidMedia: TraitPaidMediaPreview + TraitPaidMediaPhoto + TraitPaidMediaVideo {}
8248#[allow(dead_code)]
8249trait TraitInvoice {
8250    #[allow(rustdoc::invalid_html_tags)]
8251    #[doc = "Product name"]
8252    #[allow(clippy::needless_lifetimes)]
8253    fn get_title<'a>(&'a self) -> &'a str;
8254    #[allow(rustdoc::invalid_html_tags)]
8255    #[doc = "Product name"]
8256    #[allow(clippy::needless_lifetimes)]
8257    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
8258    #[allow(rustdoc::invalid_html_tags)]
8259    #[doc = "Product description"]
8260    #[allow(clippy::needless_lifetimes)]
8261    fn get_description<'a>(&'a self) -> &'a str;
8262    #[allow(rustdoc::invalid_html_tags)]
8263    #[doc = "Product description"]
8264    #[allow(clippy::needless_lifetimes)]
8265    fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self;
8266    #[allow(rustdoc::invalid_html_tags)]
8267    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
8268    #[allow(clippy::needless_lifetimes)]
8269    fn get_start_parameter<'a>(&'a self) -> &'a str;
8270    #[allow(rustdoc::invalid_html_tags)]
8271    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
8272    #[allow(clippy::needless_lifetimes)]
8273    fn set_start_parameter<'a>(&'a mut self, start_parameter: String) -> &'a mut Self;
8274    #[allow(rustdoc::invalid_html_tags)]
8275    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
8276    #[allow(clippy::needless_lifetimes)]
8277    fn get_currency<'a>(&'a self) -> &'a str;
8278    #[allow(rustdoc::invalid_html_tags)]
8279    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
8280    #[allow(clippy::needless_lifetimes)]
8281    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self;
8282    #[allow(rustdoc::invalid_html_tags)]
8283    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
8284    #[allow(clippy::needless_lifetimes)]
8285    fn get_total_amount<'a>(&'a self) -> i64;
8286    #[allow(rustdoc::invalid_html_tags)]
8287    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
8288    #[allow(clippy::needless_lifetimes)]
8289    fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self;
8290}
8291#[allow(dead_code)]
8292trait TraitOwnedGift: TraitOwnedGiftRegular + TraitOwnedGiftUnique {}
8293#[allow(dead_code)]
8294trait TraitBotShortDescription {
8295    #[allow(rustdoc::invalid_html_tags)]
8296    #[doc = "The bot's short description"]
8297    #[allow(clippy::needless_lifetimes)]
8298    fn get_short_description<'a>(&'a self) -> &'a str;
8299    #[allow(rustdoc::invalid_html_tags)]
8300    #[doc = "The bot's short description"]
8301    #[allow(clippy::needless_lifetimes)]
8302    fn set_short_description<'a>(&'a mut self, short_description: String) -> &'a mut Self;
8303}
8304#[allow(dead_code)]
8305trait TraitChatFullInfo {
8306    #[allow(rustdoc::invalid_html_tags)]
8307    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
8308    #[allow(clippy::needless_lifetimes)]
8309    fn get_id<'a>(&'a self) -> i64;
8310    #[allow(rustdoc::invalid_html_tags)]
8311    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
8312    #[allow(clippy::needless_lifetimes)]
8313    fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self;
8314    #[allow(rustdoc::invalid_html_tags)]
8315    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
8316    #[allow(clippy::needless_lifetimes)]
8317    fn get_tg_type<'a>(&'a self) -> &'a str;
8318    #[allow(rustdoc::invalid_html_tags)]
8319    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
8320    #[allow(clippy::needless_lifetimes)]
8321    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
8322    #[allow(rustdoc::invalid_html_tags)]
8323    #[doc = "Optional. Title, for supergroups, channels and group chats"]
8324    #[allow(clippy::needless_lifetimes)]
8325    fn get_title<'a>(&'a self) -> Option<&'a str>;
8326    #[allow(rustdoc::invalid_html_tags)]
8327    #[doc = "Optional. Title, for supergroups, channels and group chats"]
8328    #[allow(clippy::needless_lifetimes)]
8329    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
8330    #[allow(rustdoc::invalid_html_tags)]
8331    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
8332    #[allow(clippy::needless_lifetimes)]
8333    fn get_username<'a>(&'a self) -> Option<&'a str>;
8334    #[allow(rustdoc::invalid_html_tags)]
8335    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
8336    #[allow(clippy::needless_lifetimes)]
8337    fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self;
8338    #[allow(rustdoc::invalid_html_tags)]
8339    #[doc = "Optional. First name of the other party in a private chat"]
8340    #[allow(clippy::needless_lifetimes)]
8341    fn get_first_name<'a>(&'a self) -> Option<&'a str>;
8342    #[allow(rustdoc::invalid_html_tags)]
8343    #[doc = "Optional. First name of the other party in a private chat"]
8344    #[allow(clippy::needless_lifetimes)]
8345    fn set_first_name<'a>(&'a mut self, first_name: Option<String>) -> &'a mut Self;
8346    #[allow(rustdoc::invalid_html_tags)]
8347    #[doc = "Optional. Last name of the other party in a private chat"]
8348    #[allow(clippy::needless_lifetimes)]
8349    fn get_last_name<'a>(&'a self) -> Option<&'a str>;
8350    #[allow(rustdoc::invalid_html_tags)]
8351    #[doc = "Optional. Last name of the other party in a private chat"]
8352    #[allow(clippy::needless_lifetimes)]
8353    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self;
8354    #[allow(rustdoc::invalid_html_tags)]
8355    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
8356    #[allow(clippy::needless_lifetimes)]
8357    fn get_is_forum<'a>(&'a self) -> Option<bool>;
8358    #[allow(rustdoc::invalid_html_tags)]
8359    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
8360    #[allow(clippy::needless_lifetimes)]
8361    fn set_is_forum<'a>(&'a mut self, is_forum: Option<bool>) -> &'a mut Self;
8362    #[allow(rustdoc::invalid_html_tags)]
8363    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
8364    #[allow(clippy::needless_lifetimes)]
8365    fn get_is_direct_messages<'a>(&'a self) -> Option<bool>;
8366    #[allow(rustdoc::invalid_html_tags)]
8367    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
8368    #[allow(clippy::needless_lifetimes)]
8369    fn set_is_direct_messages<'a>(&'a mut self, is_direct_messages: Option<bool>) -> &'a mut Self;
8370    #[allow(rustdoc::invalid_html_tags)]
8371    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
8372    #[allow(clippy::needless_lifetimes)]
8373    fn get_accent_color_id<'a>(&'a self) -> i64;
8374    #[allow(rustdoc::invalid_html_tags)]
8375    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
8376    #[allow(clippy::needless_lifetimes)]
8377    fn set_accent_color_id<'a>(&'a mut self, accent_color_id: i64) -> &'a mut Self;
8378    #[allow(rustdoc::invalid_html_tags)]
8379    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
8380    #[allow(clippy::needless_lifetimes)]
8381    fn get_max_reaction_count<'a>(&'a self) -> i64;
8382    #[allow(rustdoc::invalid_html_tags)]
8383    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
8384    #[allow(clippy::needless_lifetimes)]
8385    fn set_max_reaction_count<'a>(&'a mut self, max_reaction_count: i64) -> &'a mut Self;
8386    #[allow(rustdoc::invalid_html_tags)]
8387    #[doc = "Optional. Chat photo"]
8388    #[allow(clippy::needless_lifetimes)]
8389    fn get_photo<'a>(&'a self) -> Option<&'a ChatPhoto>;
8390    #[allow(rustdoc::invalid_html_tags)]
8391    #[doc = "Optional. Chat photo"]
8392    #[allow(clippy::needless_lifetimes)]
8393    fn set_photo<'a>(&'a mut self, photo: Option<ChatPhoto>) -> &'a mut Self;
8394    #[allow(rustdoc::invalid_html_tags)]
8395    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
8396    #[allow(clippy::needless_lifetimes)]
8397    fn get_active_usernames<'a>(&'a self) -> Option<&'a Vec<String>>;
8398    #[allow(rustdoc::invalid_html_tags)]
8399    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
8400    #[allow(clippy::needless_lifetimes)]
8401    fn set_active_usernames<'a>(
8402        &'a mut self,
8403        active_usernames: Option<Vec<String>>,
8404    ) -> &'a mut Self;
8405    #[allow(rustdoc::invalid_html_tags)]
8406    #[doc = "Optional. For private chats, the date of birth of the user"]
8407    #[allow(clippy::needless_lifetimes)]
8408    fn get_birthdate<'a>(&'a self) -> Option<&'a Birthdate>;
8409    #[allow(rustdoc::invalid_html_tags)]
8410    #[doc = "Optional. For private chats, the date of birth of the user"]
8411    #[allow(clippy::needless_lifetimes)]
8412    fn set_birthdate<'a>(&'a mut self, birthdate: Option<Birthdate>) -> &'a mut Self;
8413    #[allow(rustdoc::invalid_html_tags)]
8414    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
8415    #[allow(clippy::needless_lifetimes)]
8416    fn get_business_intro<'a>(&'a self) -> Option<&'a BusinessIntro>;
8417    #[allow(rustdoc::invalid_html_tags)]
8418    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
8419    #[allow(clippy::needless_lifetimes)]
8420    fn set_business_intro<'a>(&'a mut self, business_intro: Option<BusinessIntro>) -> &'a mut Self;
8421    #[allow(rustdoc::invalid_html_tags)]
8422    #[doc = "Optional. For private chats with business accounts, the location of the business"]
8423    #[allow(clippy::needless_lifetimes)]
8424    fn get_business_location<'a>(&'a self) -> Option<&'a BusinessLocation>;
8425    #[allow(rustdoc::invalid_html_tags)]
8426    #[doc = "Optional. For private chats with business accounts, the location of the business"]
8427    #[allow(clippy::needless_lifetimes)]
8428    fn set_business_location<'a>(
8429        &'a mut self,
8430        business_location: Option<BusinessLocation>,
8431    ) -> &'a mut Self;
8432    #[allow(rustdoc::invalid_html_tags)]
8433    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
8434    #[allow(clippy::needless_lifetimes)]
8435    fn get_business_opening_hours<'a>(&'a self) -> Option<&'a BusinessOpeningHours>;
8436    #[allow(rustdoc::invalid_html_tags)]
8437    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
8438    #[allow(clippy::needless_lifetimes)]
8439    fn set_business_opening_hours<'a>(
8440        &'a mut self,
8441        business_opening_hours: Option<BusinessOpeningHours>,
8442    ) -> &'a mut Self;
8443    #[allow(rustdoc::invalid_html_tags)]
8444    #[doc = "Optional. For private chats, the personal channel of the user"]
8445    #[allow(clippy::needless_lifetimes)]
8446    fn get_personal_chat<'a>(&'a self) -> Option<&'a Chat>;
8447    #[allow(rustdoc::invalid_html_tags)]
8448    #[doc = "Optional. For private chats, the personal channel of the user"]
8449    #[allow(clippy::needless_lifetimes)]
8450    fn set_personal_chat<'a>(&'a mut self, personal_chat: Option<Chat>) -> &'a mut Self;
8451    #[allow(rustdoc::invalid_html_tags)]
8452    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
8453    #[allow(clippy::needless_lifetimes)]
8454    fn get_parent_chat<'a>(&'a self) -> Option<&'a Chat>;
8455    #[allow(rustdoc::invalid_html_tags)]
8456    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
8457    #[allow(clippy::needless_lifetimes)]
8458    fn set_parent_chat<'a>(&'a mut self, parent_chat: Option<Chat>) -> &'a mut Self;
8459    #[allow(rustdoc::invalid_html_tags)]
8460    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
8461    #[allow(clippy::needless_lifetimes)]
8462    fn get_available_reactions<'a>(&'a self) -> Option<&'a Vec<ReactionType>>;
8463    #[allow(rustdoc::invalid_html_tags)]
8464    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
8465    #[allow(clippy::needless_lifetimes)]
8466    fn set_available_reactions<'a>(
8467        &'a mut self,
8468        available_reactions: Option<Vec<ReactionType>>,
8469    ) -> &'a mut Self;
8470    #[allow(rustdoc::invalid_html_tags)]
8471    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
8472    #[allow(clippy::needless_lifetimes)]
8473    fn get_background_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
8474    #[allow(rustdoc::invalid_html_tags)]
8475    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
8476    #[allow(clippy::needless_lifetimes)]
8477    fn set_background_custom_emoji_id<'a>(
8478        &'a mut self,
8479        background_custom_emoji_id: Option<String>,
8480    ) -> &'a mut Self;
8481    #[allow(rustdoc::invalid_html_tags)]
8482    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
8483    #[allow(clippy::needless_lifetimes)]
8484    fn get_profile_accent_color_id<'a>(&'a self) -> Option<i64>;
8485    #[allow(rustdoc::invalid_html_tags)]
8486    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
8487    #[allow(clippy::needless_lifetimes)]
8488    fn set_profile_accent_color_id<'a>(
8489        &'a mut self,
8490        profile_accent_color_id: Option<i64>,
8491    ) -> &'a mut Self;
8492    #[allow(rustdoc::invalid_html_tags)]
8493    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
8494    #[allow(clippy::needless_lifetimes)]
8495    fn get_profile_background_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
8496    #[allow(rustdoc::invalid_html_tags)]
8497    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
8498    #[allow(clippy::needless_lifetimes)]
8499    fn set_profile_background_custom_emoji_id<'a>(
8500        &'a mut self,
8501        profile_background_custom_emoji_id: Option<String>,
8502    ) -> &'a mut Self;
8503    #[allow(rustdoc::invalid_html_tags)]
8504    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
8505    #[allow(clippy::needless_lifetimes)]
8506    fn get_emoji_status_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
8507    #[allow(rustdoc::invalid_html_tags)]
8508    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
8509    #[allow(clippy::needless_lifetimes)]
8510    fn set_emoji_status_custom_emoji_id<'a>(
8511        &'a mut self,
8512        emoji_status_custom_emoji_id: Option<String>,
8513    ) -> &'a mut Self;
8514    #[allow(rustdoc::invalid_html_tags)]
8515    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
8516    #[allow(clippy::needless_lifetimes)]
8517    fn get_emoji_status_expiration_date<'a>(&'a self) -> Option<i64>;
8518    #[allow(rustdoc::invalid_html_tags)]
8519    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
8520    #[allow(clippy::needless_lifetimes)]
8521    fn set_emoji_status_expiration_date<'a>(
8522        &'a mut self,
8523        emoji_status_expiration_date: Option<i64>,
8524    ) -> &'a mut Self;
8525    #[allow(rustdoc::invalid_html_tags)]
8526    #[doc = "Optional. Bio of the other party in a private chat"]
8527    #[allow(clippy::needless_lifetimes)]
8528    fn get_bio<'a>(&'a self) -> Option<&'a str>;
8529    #[allow(rustdoc::invalid_html_tags)]
8530    #[doc = "Optional. Bio of the other party in a private chat"]
8531    #[allow(clippy::needless_lifetimes)]
8532    fn set_bio<'a>(&'a mut self, bio: Option<String>) -> &'a mut Self;
8533    #[allow(rustdoc::invalid_html_tags)]
8534    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
8535    #[allow(clippy::needless_lifetimes)]
8536    fn get_has_private_forwards<'a>(&'a self) -> Option<bool>;
8537    #[allow(rustdoc::invalid_html_tags)]
8538    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
8539    #[allow(clippy::needless_lifetimes)]
8540    fn set_has_private_forwards<'a>(
8541        &'a mut self,
8542        has_private_forwards: Option<bool>,
8543    ) -> &'a mut Self;
8544    #[allow(rustdoc::invalid_html_tags)]
8545    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
8546    #[allow(clippy::needless_lifetimes)]
8547    fn get_has_restricted_voice_and_video_messages<'a>(&'a self) -> Option<bool>;
8548    #[allow(rustdoc::invalid_html_tags)]
8549    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
8550    #[allow(clippy::needless_lifetimes)]
8551    fn set_has_restricted_voice_and_video_messages<'a>(
8552        &'a mut self,
8553        has_restricted_voice_and_video_messages: Option<bool>,
8554    ) -> &'a mut Self;
8555    #[allow(rustdoc::invalid_html_tags)]
8556    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
8557    #[allow(clippy::needless_lifetimes)]
8558    fn get_join_to_send_messages<'a>(&'a self) -> Option<bool>;
8559    #[allow(rustdoc::invalid_html_tags)]
8560    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
8561    #[allow(clippy::needless_lifetimes)]
8562    fn set_join_to_send_messages<'a>(
8563        &'a mut self,
8564        join_to_send_messages: Option<bool>,
8565    ) -> &'a mut Self;
8566    #[allow(rustdoc::invalid_html_tags)]
8567    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
8568    #[allow(clippy::needless_lifetimes)]
8569    fn get_join_by_request<'a>(&'a self) -> Option<bool>;
8570    #[allow(rustdoc::invalid_html_tags)]
8571    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
8572    #[allow(clippy::needless_lifetimes)]
8573    fn set_join_by_request<'a>(&'a mut self, join_by_request: Option<bool>) -> &'a mut Self;
8574    #[allow(rustdoc::invalid_html_tags)]
8575    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
8576    #[allow(clippy::needless_lifetimes)]
8577    fn get_description<'a>(&'a self) -> Option<&'a str>;
8578    #[allow(rustdoc::invalid_html_tags)]
8579    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
8580    #[allow(clippy::needless_lifetimes)]
8581    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
8582    #[allow(rustdoc::invalid_html_tags)]
8583    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
8584    #[allow(clippy::needless_lifetimes)]
8585    fn get_invite_link<'a>(&'a self) -> Option<&'a str>;
8586    #[allow(rustdoc::invalid_html_tags)]
8587    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
8588    #[allow(clippy::needless_lifetimes)]
8589    fn set_invite_link<'a>(&'a mut self, invite_link: Option<String>) -> &'a mut Self;
8590    #[allow(rustdoc::invalid_html_tags)]
8591    #[doc = "Optional. The most recent pinned message (by sending date)"]
8592    #[allow(clippy::needless_lifetimes)]
8593    fn get_pinned_message<'a>(&'a self) -> Option<&'a Message>;
8594    #[allow(rustdoc::invalid_html_tags)]
8595    #[doc = "Optional. The most recent pinned message (by sending date)"]
8596    #[allow(clippy::needless_lifetimes)]
8597    fn set_pinned_message<'a>(&'a mut self, pinned_message: Option<Message>) -> &'a mut Self;
8598    #[allow(rustdoc::invalid_html_tags)]
8599    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
8600    #[allow(clippy::needless_lifetimes)]
8601    fn get_permissions<'a>(&'a self) -> Option<&'a ChatPermissions>;
8602    #[allow(rustdoc::invalid_html_tags)]
8603    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
8604    #[allow(clippy::needless_lifetimes)]
8605    fn set_permissions<'a>(&'a mut self, permissions: Option<ChatPermissions>) -> &'a mut Self;
8606    #[allow(rustdoc::invalid_html_tags)]
8607    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
8608    #[allow(clippy::needless_lifetimes)]
8609    fn get_accepted_gift_types<'a>(&'a self) -> &'a AcceptedGiftTypes;
8610    #[allow(rustdoc::invalid_html_tags)]
8611    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
8612    #[allow(clippy::needless_lifetimes)]
8613    fn set_accepted_gift_types<'a>(
8614        &'a mut self,
8615        accepted_gift_types: AcceptedGiftTypes,
8616    ) -> &'a mut Self;
8617    #[allow(rustdoc::invalid_html_tags)]
8618    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
8619    #[allow(clippy::needless_lifetimes)]
8620    fn get_can_send_paid_media<'a>(&'a self) -> Option<bool>;
8621    #[allow(rustdoc::invalid_html_tags)]
8622    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
8623    #[allow(clippy::needless_lifetimes)]
8624    fn set_can_send_paid_media<'a>(&'a mut self, can_send_paid_media: Option<bool>)
8625        -> &'a mut Self;
8626    #[allow(rustdoc::invalid_html_tags)]
8627    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
8628    #[allow(clippy::needless_lifetimes)]
8629    fn get_slow_mode_delay<'a>(&'a self) -> Option<i64>;
8630    #[allow(rustdoc::invalid_html_tags)]
8631    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
8632    #[allow(clippy::needless_lifetimes)]
8633    fn set_slow_mode_delay<'a>(&'a mut self, slow_mode_delay: Option<i64>) -> &'a mut Self;
8634    #[allow(rustdoc::invalid_html_tags)]
8635    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
8636    #[allow(clippy::needless_lifetimes)]
8637    fn get_unrestrict_boost_count<'a>(&'a self) -> Option<i64>;
8638    #[allow(rustdoc::invalid_html_tags)]
8639    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
8640    #[allow(clippy::needless_lifetimes)]
8641    fn set_unrestrict_boost_count<'a>(
8642        &'a mut self,
8643        unrestrict_boost_count: Option<i64>,
8644    ) -> &'a mut Self;
8645    #[allow(rustdoc::invalid_html_tags)]
8646    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
8647    #[allow(clippy::needless_lifetimes)]
8648    fn get_message_auto_delete_time<'a>(&'a self) -> Option<i64>;
8649    #[allow(rustdoc::invalid_html_tags)]
8650    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
8651    #[allow(clippy::needless_lifetimes)]
8652    fn set_message_auto_delete_time<'a>(
8653        &'a mut self,
8654        message_auto_delete_time: Option<i64>,
8655    ) -> &'a mut Self;
8656    #[allow(rustdoc::invalid_html_tags)]
8657    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
8658    #[allow(clippy::needless_lifetimes)]
8659    fn get_has_aggressive_anti_spam_enabled<'a>(&'a self) -> Option<bool>;
8660    #[allow(rustdoc::invalid_html_tags)]
8661    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
8662    #[allow(clippy::needless_lifetimes)]
8663    fn set_has_aggressive_anti_spam_enabled<'a>(
8664        &'a mut self,
8665        has_aggressive_anti_spam_enabled: Option<bool>,
8666    ) -> &'a mut Self;
8667    #[allow(rustdoc::invalid_html_tags)]
8668    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
8669    #[allow(clippy::needless_lifetimes)]
8670    fn get_has_hidden_members<'a>(&'a self) -> Option<bool>;
8671    #[allow(rustdoc::invalid_html_tags)]
8672    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
8673    #[allow(clippy::needless_lifetimes)]
8674    fn set_has_hidden_members<'a>(&'a mut self, has_hidden_members: Option<bool>) -> &'a mut Self;
8675    #[allow(rustdoc::invalid_html_tags)]
8676    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
8677    #[allow(clippy::needless_lifetimes)]
8678    fn get_has_protected_content<'a>(&'a self) -> Option<bool>;
8679    #[allow(rustdoc::invalid_html_tags)]
8680    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
8681    #[allow(clippy::needless_lifetimes)]
8682    fn set_has_protected_content<'a>(
8683        &'a mut self,
8684        has_protected_content: Option<bool>,
8685    ) -> &'a mut Self;
8686    #[allow(rustdoc::invalid_html_tags)]
8687    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
8688    #[allow(clippy::needless_lifetimes)]
8689    fn get_has_visible_history<'a>(&'a self) -> Option<bool>;
8690    #[allow(rustdoc::invalid_html_tags)]
8691    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
8692    #[allow(clippy::needless_lifetimes)]
8693    fn set_has_visible_history<'a>(&'a mut self, has_visible_history: Option<bool>)
8694        -> &'a mut Self;
8695    #[allow(rustdoc::invalid_html_tags)]
8696    #[doc = "Optional. For supergroups, name of the group sticker set"]
8697    #[allow(clippy::needless_lifetimes)]
8698    fn get_sticker_set_name<'a>(&'a self) -> Option<&'a str>;
8699    #[allow(rustdoc::invalid_html_tags)]
8700    #[doc = "Optional. For supergroups, name of the group sticker set"]
8701    #[allow(clippy::needless_lifetimes)]
8702    fn set_sticker_set_name<'a>(&'a mut self, sticker_set_name: Option<String>) -> &'a mut Self;
8703    #[allow(rustdoc::invalid_html_tags)]
8704    #[doc = "Optional. True, if the bot can change the group sticker set"]
8705    #[allow(clippy::needless_lifetimes)]
8706    fn get_can_set_sticker_set<'a>(&'a self) -> Option<bool>;
8707    #[allow(rustdoc::invalid_html_tags)]
8708    #[doc = "Optional. True, if the bot can change the group sticker set"]
8709    #[allow(clippy::needless_lifetimes)]
8710    fn set_can_set_sticker_set<'a>(&'a mut self, can_set_sticker_set: Option<bool>)
8711        -> &'a mut Self;
8712    #[allow(rustdoc::invalid_html_tags)]
8713    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
8714    #[allow(clippy::needless_lifetimes)]
8715    fn get_custom_emoji_sticker_set_name<'a>(&'a self) -> Option<&'a str>;
8716    #[allow(rustdoc::invalid_html_tags)]
8717    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
8718    #[allow(clippy::needless_lifetimes)]
8719    fn set_custom_emoji_sticker_set_name<'a>(
8720        &'a mut self,
8721        custom_emoji_sticker_set_name: Option<String>,
8722    ) -> &'a mut Self;
8723    #[allow(rustdoc::invalid_html_tags)]
8724    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
8725    #[allow(clippy::needless_lifetimes)]
8726    fn get_linked_chat_id<'a>(&'a self) -> Option<i64>;
8727    #[allow(rustdoc::invalid_html_tags)]
8728    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
8729    #[allow(clippy::needless_lifetimes)]
8730    fn set_linked_chat_id<'a>(&'a mut self, linked_chat_id: Option<i64>) -> &'a mut Self;
8731    #[allow(rustdoc::invalid_html_tags)]
8732    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
8733    #[allow(clippy::needless_lifetimes)]
8734    fn get_location<'a>(&'a self) -> Option<&'a ChatLocation>;
8735    #[allow(rustdoc::invalid_html_tags)]
8736    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
8737    #[allow(clippy::needless_lifetimes)]
8738    fn set_location<'a>(&'a mut self, location: Option<ChatLocation>) -> &'a mut Self;
8739}
8740#[allow(dead_code)]
8741trait TraitMessageOrigin:
8742    TraitMessageOriginUser
8743    + TraitMessageOriginHiddenUser
8744    + TraitMessageOriginChat
8745    + TraitMessageOriginChannel
8746{
8747}
8748#[allow(dead_code)]
8749trait TraitPollAnswer {
8750    #[allow(rustdoc::invalid_html_tags)]
8751    #[doc = "Unique poll identifier"]
8752    #[allow(clippy::needless_lifetimes)]
8753    fn get_poll_id<'a>(&'a self) -> &'a str;
8754    #[allow(rustdoc::invalid_html_tags)]
8755    #[doc = "Unique poll identifier"]
8756    #[allow(clippy::needless_lifetimes)]
8757    fn set_poll_id<'a>(&'a mut self, poll_id: String) -> &'a mut Self;
8758    #[allow(rustdoc::invalid_html_tags)]
8759    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
8760    #[allow(clippy::needless_lifetimes)]
8761    fn get_voter_chat<'a>(&'a self) -> Option<&'a Chat>;
8762    #[allow(rustdoc::invalid_html_tags)]
8763    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
8764    #[allow(clippy::needless_lifetimes)]
8765    fn set_voter_chat<'a>(&'a mut self, voter_chat: Option<Chat>) -> &'a mut Self;
8766    #[allow(rustdoc::invalid_html_tags)]
8767    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
8768    #[allow(clippy::needless_lifetimes)]
8769    fn get_user<'a>(&'a self) -> Option<&'a User>;
8770    #[allow(rustdoc::invalid_html_tags)]
8771    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
8772    #[allow(clippy::needless_lifetimes)]
8773    fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self;
8774    #[allow(rustdoc::invalid_html_tags)]
8775    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
8776    #[allow(clippy::needless_lifetimes)]
8777    fn get_option_ids<'a>(&'a self) -> &'a Vec<i64>;
8778    #[allow(rustdoc::invalid_html_tags)]
8779    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
8780    #[allow(clippy::needless_lifetimes)]
8781    fn set_option_ids<'a>(&'a mut self, option_ids: Vec<i64>) -> &'a mut Self;
8782}
8783#[allow(dead_code)]
8784trait TraitWebhookInfo {
8785    #[allow(rustdoc::invalid_html_tags)]
8786    #[doc = "Webhook URL, may be empty if webhook is not set up"]
8787    #[allow(clippy::needless_lifetimes)]
8788    fn get_url<'a>(&'a self) -> &'a str;
8789    #[allow(rustdoc::invalid_html_tags)]
8790    #[doc = "Webhook URL, may be empty if webhook is not set up"]
8791    #[allow(clippy::needless_lifetimes)]
8792    fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self;
8793    #[allow(rustdoc::invalid_html_tags)]
8794    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
8795    #[allow(clippy::needless_lifetimes)]
8796    fn get_has_custom_certificate<'a>(&'a self) -> bool;
8797    #[allow(rustdoc::invalid_html_tags)]
8798    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
8799    #[allow(clippy::needless_lifetimes)]
8800    fn set_has_custom_certificate<'a>(&'a mut self, has_custom_certificate: bool) -> &'a mut Self;
8801    #[allow(rustdoc::invalid_html_tags)]
8802    #[doc = "Number of updates awaiting delivery"]
8803    #[allow(clippy::needless_lifetimes)]
8804    fn get_pending_update_count<'a>(&'a self) -> i64;
8805    #[allow(rustdoc::invalid_html_tags)]
8806    #[doc = "Number of updates awaiting delivery"]
8807    #[allow(clippy::needless_lifetimes)]
8808    fn set_pending_update_count<'a>(&'a mut self, pending_update_count: i64) -> &'a mut Self;
8809    #[allow(rustdoc::invalid_html_tags)]
8810    #[doc = "Optional. Currently used webhook IP address"]
8811    #[allow(clippy::needless_lifetimes)]
8812    fn get_ip_address<'a>(&'a self) -> Option<&'a str>;
8813    #[allow(rustdoc::invalid_html_tags)]
8814    #[doc = "Optional. Currently used webhook IP address"]
8815    #[allow(clippy::needless_lifetimes)]
8816    fn set_ip_address<'a>(&'a mut self, ip_address: Option<String>) -> &'a mut Self;
8817    #[allow(rustdoc::invalid_html_tags)]
8818    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
8819    #[allow(clippy::needless_lifetimes)]
8820    fn get_last_error_date<'a>(&'a self) -> Option<i64>;
8821    #[allow(rustdoc::invalid_html_tags)]
8822    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
8823    #[allow(clippy::needless_lifetimes)]
8824    fn set_last_error_date<'a>(&'a mut self, last_error_date: Option<i64>) -> &'a mut Self;
8825    #[allow(rustdoc::invalid_html_tags)]
8826    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
8827    #[allow(clippy::needless_lifetimes)]
8828    fn get_last_error_message<'a>(&'a self) -> Option<&'a str>;
8829    #[allow(rustdoc::invalid_html_tags)]
8830    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
8831    #[allow(clippy::needless_lifetimes)]
8832    fn set_last_error_message<'a>(&'a mut self, last_error_message: Option<String>)
8833        -> &'a mut Self;
8834    #[allow(rustdoc::invalid_html_tags)]
8835    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
8836    #[allow(clippy::needless_lifetimes)]
8837    fn get_last_synchronization_error_date<'a>(&'a self) -> Option<i64>;
8838    #[allow(rustdoc::invalid_html_tags)]
8839    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
8840    #[allow(clippy::needless_lifetimes)]
8841    fn set_last_synchronization_error_date<'a>(
8842        &'a mut self,
8843        last_synchronization_error_date: Option<i64>,
8844    ) -> &'a mut Self;
8845    #[allow(rustdoc::invalid_html_tags)]
8846    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
8847    #[allow(clippy::needless_lifetimes)]
8848    fn get_max_connections<'a>(&'a self) -> Option<i64>;
8849    #[allow(rustdoc::invalid_html_tags)]
8850    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
8851    #[allow(clippy::needless_lifetimes)]
8852    fn set_max_connections<'a>(&'a mut self, max_connections: Option<i64>) -> &'a mut Self;
8853    #[allow(rustdoc::invalid_html_tags)]
8854    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
8855    #[allow(clippy::needless_lifetimes)]
8856    fn get_allowed_updates<'a>(&'a self) -> Option<&'a Vec<String>>;
8857    #[allow(rustdoc::invalid_html_tags)]
8858    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
8859    #[allow(clippy::needless_lifetimes)]
8860    fn set_allowed_updates<'a>(&'a mut self, allowed_updates: Option<Vec<String>>) -> &'a mut Self;
8861}
8862#[allow(dead_code)]
8863trait TraitBusinessMessagesDeleted {
8864    #[allow(rustdoc::invalid_html_tags)]
8865    #[doc = "Unique identifier of the business connection"]
8866    #[allow(clippy::needless_lifetimes)]
8867    fn get_business_connection_id<'a>(&'a self) -> &'a str;
8868    #[allow(rustdoc::invalid_html_tags)]
8869    #[doc = "Unique identifier of the business connection"]
8870    #[allow(clippy::needless_lifetimes)]
8871    fn set_business_connection_id<'a>(&'a mut self, business_connection_id: String)
8872        -> &'a mut Self;
8873    #[allow(rustdoc::invalid_html_tags)]
8874    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
8875    #[allow(clippy::needless_lifetimes)]
8876    fn get_chat<'a>(&'a self) -> &'a Chat;
8877    #[allow(rustdoc::invalid_html_tags)]
8878    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
8879    #[allow(clippy::needless_lifetimes)]
8880    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
8881    #[allow(rustdoc::invalid_html_tags)]
8882    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
8883    #[allow(clippy::needless_lifetimes)]
8884    fn get_message_ids<'a>(&'a self) -> &'a Vec<i64>;
8885    #[allow(rustdoc::invalid_html_tags)]
8886    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
8887    #[allow(clippy::needless_lifetimes)]
8888    fn set_message_ids<'a>(&'a mut self, message_ids: Vec<i64>) -> &'a mut Self;
8889}
8890#[allow(dead_code)]
8891trait TraitBotCommandScopeDefault {
8892    #[allow(rustdoc::invalid_html_tags)]
8893    #[doc = "Scope type, must be default"]
8894    #[allow(clippy::needless_lifetimes)]
8895    fn get_tg_type<'a>(&'a self) -> &'a str;
8896    #[allow(rustdoc::invalid_html_tags)]
8897    #[doc = "Scope type, must be default"]
8898    #[allow(clippy::needless_lifetimes)]
8899    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
8900}
8901#[allow(dead_code)]
8902trait TraitChatInviteLink {
8903    #[allow(rustdoc::invalid_html_tags)]
8904    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
8905    #[allow(clippy::needless_lifetimes)]
8906    fn get_invite_link<'a>(&'a self) -> &'a str;
8907    #[allow(rustdoc::invalid_html_tags)]
8908    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
8909    #[allow(clippy::needless_lifetimes)]
8910    fn set_invite_link<'a>(&'a mut self, invite_link: String) -> &'a mut Self;
8911    #[allow(rustdoc::invalid_html_tags)]
8912    #[doc = "Creator of the link"]
8913    #[allow(clippy::needless_lifetimes)]
8914    fn get_creator<'a>(&'a self) -> &'a User;
8915    #[allow(rustdoc::invalid_html_tags)]
8916    #[doc = "Creator of the link"]
8917    #[allow(clippy::needless_lifetimes)]
8918    fn set_creator<'a>(&'a mut self, creator: User) -> &'a mut Self;
8919    #[allow(rustdoc::invalid_html_tags)]
8920    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
8921    #[allow(clippy::needless_lifetimes)]
8922    fn get_creates_join_request<'a>(&'a self) -> bool;
8923    #[allow(rustdoc::invalid_html_tags)]
8924    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
8925    #[allow(clippy::needless_lifetimes)]
8926    fn set_creates_join_request<'a>(&'a mut self, creates_join_request: bool) -> &'a mut Self;
8927    #[allow(rustdoc::invalid_html_tags)]
8928    #[doc = "True, if the link is primary"]
8929    #[allow(clippy::needless_lifetimes)]
8930    fn get_is_primary<'a>(&'a self) -> bool;
8931    #[allow(rustdoc::invalid_html_tags)]
8932    #[doc = "True, if the link is primary"]
8933    #[allow(clippy::needless_lifetimes)]
8934    fn set_is_primary<'a>(&'a mut self, is_primary: bool) -> &'a mut Self;
8935    #[allow(rustdoc::invalid_html_tags)]
8936    #[doc = "True, if the link is revoked"]
8937    #[allow(clippy::needless_lifetimes)]
8938    fn get_is_revoked<'a>(&'a self) -> bool;
8939    #[allow(rustdoc::invalid_html_tags)]
8940    #[doc = "True, if the link is revoked"]
8941    #[allow(clippy::needless_lifetimes)]
8942    fn set_is_revoked<'a>(&'a mut self, is_revoked: bool) -> &'a mut Self;
8943    #[allow(rustdoc::invalid_html_tags)]
8944    #[doc = "Optional. Invite link name"]
8945    #[allow(clippy::needless_lifetimes)]
8946    fn get_name<'a>(&'a self) -> Option<&'a str>;
8947    #[allow(rustdoc::invalid_html_tags)]
8948    #[doc = "Optional. Invite link name"]
8949    #[allow(clippy::needless_lifetimes)]
8950    fn set_name<'a>(&'a mut self, name: Option<String>) -> &'a mut Self;
8951    #[allow(rustdoc::invalid_html_tags)]
8952    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
8953    #[allow(clippy::needless_lifetimes)]
8954    fn get_expire_date<'a>(&'a self) -> Option<i64>;
8955    #[allow(rustdoc::invalid_html_tags)]
8956    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
8957    #[allow(clippy::needless_lifetimes)]
8958    fn set_expire_date<'a>(&'a mut self, expire_date: Option<i64>) -> &'a mut Self;
8959    #[allow(rustdoc::invalid_html_tags)]
8960    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
8961    #[allow(clippy::needless_lifetimes)]
8962    fn get_member_limit<'a>(&'a self) -> Option<i64>;
8963    #[allow(rustdoc::invalid_html_tags)]
8964    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
8965    #[allow(clippy::needless_lifetimes)]
8966    fn set_member_limit<'a>(&'a mut self, member_limit: Option<i64>) -> &'a mut Self;
8967    #[allow(rustdoc::invalid_html_tags)]
8968    #[doc = "Optional. Number of pending join requests created using this link"]
8969    #[allow(clippy::needless_lifetimes)]
8970    fn get_pending_join_request_count<'a>(&'a self) -> Option<i64>;
8971    #[allow(rustdoc::invalid_html_tags)]
8972    #[doc = "Optional. Number of pending join requests created using this link"]
8973    #[allow(clippy::needless_lifetimes)]
8974    fn set_pending_join_request_count<'a>(
8975        &'a mut self,
8976        pending_join_request_count: Option<i64>,
8977    ) -> &'a mut Self;
8978    #[allow(rustdoc::invalid_html_tags)]
8979    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
8980    #[allow(clippy::needless_lifetimes)]
8981    fn get_subscription_period<'a>(&'a self) -> Option<i64>;
8982    #[allow(rustdoc::invalid_html_tags)]
8983    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
8984    #[allow(clippy::needless_lifetimes)]
8985    fn set_subscription_period<'a>(&'a mut self, subscription_period: Option<i64>) -> &'a mut Self;
8986    #[allow(rustdoc::invalid_html_tags)]
8987    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
8988    #[allow(clippy::needless_lifetimes)]
8989    fn get_subscription_price<'a>(&'a self) -> Option<i64>;
8990    #[allow(rustdoc::invalid_html_tags)]
8991    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
8992    #[allow(clippy::needless_lifetimes)]
8993    fn set_subscription_price<'a>(&'a mut self, subscription_price: Option<i64>) -> &'a mut Self;
8994}
8995#[allow(dead_code)]
8996trait TraitInlineQueryResultCachedVoice {
8997    #[allow(rustdoc::invalid_html_tags)]
8998    #[doc = "Type of the result, must be voice"]
8999    #[allow(clippy::needless_lifetimes)]
9000    fn get_tg_type<'a>(&'a self) -> &'a str;
9001    #[allow(rustdoc::invalid_html_tags)]
9002    #[doc = "Type of the result, must be voice"]
9003    #[allow(clippy::needless_lifetimes)]
9004    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9005    #[allow(rustdoc::invalid_html_tags)]
9006    #[doc = "Unique identifier for this result, 1-64 bytes"]
9007    #[allow(clippy::needless_lifetimes)]
9008    fn get_id<'a>(&'a self) -> &'a str;
9009    #[allow(rustdoc::invalid_html_tags)]
9010    #[doc = "Unique identifier for this result, 1-64 bytes"]
9011    #[allow(clippy::needless_lifetimes)]
9012    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
9013    #[allow(rustdoc::invalid_html_tags)]
9014    #[doc = "A valid file identifier for the voice message"]
9015    #[allow(clippy::needless_lifetimes)]
9016    fn get_voice_file_id<'a>(&'a self) -> &'a str;
9017    #[allow(rustdoc::invalid_html_tags)]
9018    #[doc = "A valid file identifier for the voice message"]
9019    #[allow(clippy::needless_lifetimes)]
9020    fn set_voice_file_id<'a>(&'a mut self, voice_file_id: String) -> &'a mut Self;
9021    #[allow(rustdoc::invalid_html_tags)]
9022    #[doc = "Voice message title"]
9023    #[allow(clippy::needless_lifetimes)]
9024    fn get_title<'a>(&'a self) -> &'a str;
9025    #[allow(rustdoc::invalid_html_tags)]
9026    #[doc = "Voice message title"]
9027    #[allow(clippy::needless_lifetimes)]
9028    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
9029    #[allow(rustdoc::invalid_html_tags)]
9030    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
9031    #[allow(clippy::needless_lifetimes)]
9032    fn get_caption<'a>(&'a self) -> Option<&'a str>;
9033    #[allow(rustdoc::invalid_html_tags)]
9034    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
9035    #[allow(clippy::needless_lifetimes)]
9036    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
9037    #[allow(rustdoc::invalid_html_tags)]
9038    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
9039    #[allow(clippy::needless_lifetimes)]
9040    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
9041    #[allow(rustdoc::invalid_html_tags)]
9042    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
9043    #[allow(clippy::needless_lifetimes)]
9044    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
9045    #[allow(rustdoc::invalid_html_tags)]
9046    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
9047    #[allow(clippy::needless_lifetimes)]
9048    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
9049    #[allow(rustdoc::invalid_html_tags)]
9050    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
9051    #[allow(clippy::needless_lifetimes)]
9052    fn set_caption_entities<'a>(
9053        &'a mut self,
9054        caption_entities: Option<Vec<MessageEntity>>,
9055    ) -> &'a mut Self;
9056    #[allow(rustdoc::invalid_html_tags)]
9057    #[doc = "Optional. Inline keyboard attached to the message"]
9058    #[allow(clippy::needless_lifetimes)]
9059    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
9060    #[allow(rustdoc::invalid_html_tags)]
9061    #[doc = "Optional. Inline keyboard attached to the message"]
9062    #[allow(clippy::needless_lifetimes)]
9063    fn set_reply_markup<'a>(
9064        &'a mut self,
9065        reply_markup: Option<InlineKeyboardMarkup>,
9066    ) -> &'a mut Self;
9067    #[allow(rustdoc::invalid_html_tags)]
9068    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
9069    #[allow(clippy::needless_lifetimes)]
9070    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
9071    #[allow(rustdoc::invalid_html_tags)]
9072    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
9073    #[allow(clippy::needless_lifetimes)]
9074    fn set_input_message_content<'a>(
9075        &'a mut self,
9076        input_message_content: Option<InputMessageContent>,
9077    ) -> &'a mut Self;
9078}
9079#[allow(dead_code)]
9080trait TraitPassportElementErrorTranslationFiles {
9081    #[allow(rustdoc::invalid_html_tags)]
9082    #[doc = "Error source, must be translation_files"]
9083    #[allow(clippy::needless_lifetimes)]
9084    fn get_source<'a>(&'a self) -> &'a str;
9085    #[allow(rustdoc::invalid_html_tags)]
9086    #[doc = "Error source, must be translation_files"]
9087    #[allow(clippy::needless_lifetimes)]
9088    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
9089    #[allow(rustdoc::invalid_html_tags)]
9090    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
9091    #[allow(clippy::needless_lifetimes)]
9092    fn get_tg_type<'a>(&'a self) -> &'a str;
9093    #[allow(rustdoc::invalid_html_tags)]
9094    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
9095    #[allow(clippy::needless_lifetimes)]
9096    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9097    #[allow(rustdoc::invalid_html_tags)]
9098    #[doc = "List of base64-encoded file hashes"]
9099    #[allow(clippy::needless_lifetimes)]
9100    fn get_file_hashes<'a>(&'a self) -> &'a Vec<String>;
9101    #[allow(rustdoc::invalid_html_tags)]
9102    #[doc = "List of base64-encoded file hashes"]
9103    #[allow(clippy::needless_lifetimes)]
9104    fn set_file_hashes<'a>(&'a mut self, file_hashes: Vec<String>) -> &'a mut Self;
9105    #[allow(rustdoc::invalid_html_tags)]
9106    #[doc = "Error message"]
9107    #[allow(clippy::needless_lifetimes)]
9108    fn get_message<'a>(&'a self) -> &'a str;
9109    #[allow(rustdoc::invalid_html_tags)]
9110    #[doc = "Error message"]
9111    #[allow(clippy::needless_lifetimes)]
9112    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
9113}
9114#[allow(dead_code)]
9115trait TraitAnimation {
9116    #[allow(rustdoc::invalid_html_tags)]
9117    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
9118    #[allow(clippy::needless_lifetimes)]
9119    fn get_file_id<'a>(&'a self) -> &'a str;
9120    #[allow(rustdoc::invalid_html_tags)]
9121    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
9122    #[allow(clippy::needless_lifetimes)]
9123    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
9124    #[allow(rustdoc::invalid_html_tags)]
9125    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
9126    #[allow(clippy::needless_lifetimes)]
9127    fn get_file_unique_id<'a>(&'a self) -> &'a str;
9128    #[allow(rustdoc::invalid_html_tags)]
9129    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
9130    #[allow(clippy::needless_lifetimes)]
9131    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
9132    #[allow(rustdoc::invalid_html_tags)]
9133    #[doc = "Video width as defined by the sender"]
9134    #[allow(clippy::needless_lifetimes)]
9135    fn get_width<'a>(&'a self) -> i64;
9136    #[allow(rustdoc::invalid_html_tags)]
9137    #[doc = "Video width as defined by the sender"]
9138    #[allow(clippy::needless_lifetimes)]
9139    fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self;
9140    #[allow(rustdoc::invalid_html_tags)]
9141    #[doc = "Video height as defined by the sender"]
9142    #[allow(clippy::needless_lifetimes)]
9143    fn get_height<'a>(&'a self) -> i64;
9144    #[allow(rustdoc::invalid_html_tags)]
9145    #[doc = "Video height as defined by the sender"]
9146    #[allow(clippy::needless_lifetimes)]
9147    fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self;
9148    #[allow(rustdoc::invalid_html_tags)]
9149    #[doc = "Duration of the video in seconds as defined by the sender"]
9150    #[allow(clippy::needless_lifetimes)]
9151    fn get_duration<'a>(&'a self) -> i64;
9152    #[allow(rustdoc::invalid_html_tags)]
9153    #[doc = "Duration of the video in seconds as defined by the sender"]
9154    #[allow(clippy::needless_lifetimes)]
9155    fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self;
9156    #[allow(rustdoc::invalid_html_tags)]
9157    #[doc = "Optional. Animation thumbnail as defined by the sender"]
9158    #[allow(clippy::needless_lifetimes)]
9159    fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize>;
9160    #[allow(rustdoc::invalid_html_tags)]
9161    #[doc = "Optional. Animation thumbnail as defined by the sender"]
9162    #[allow(clippy::needless_lifetimes)]
9163    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self;
9164    #[allow(rustdoc::invalid_html_tags)]
9165    #[doc = "Optional. Original animation filename as defined by the sender"]
9166    #[allow(clippy::needless_lifetimes)]
9167    fn get_file_name<'a>(&'a self) -> Option<&'a str>;
9168    #[allow(rustdoc::invalid_html_tags)]
9169    #[doc = "Optional. Original animation filename as defined by the sender"]
9170    #[allow(clippy::needless_lifetimes)]
9171    fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self;
9172    #[allow(rustdoc::invalid_html_tags)]
9173    #[doc = "Optional. MIME type of the file as defined by the sender"]
9174    #[allow(clippy::needless_lifetimes)]
9175    fn get_mime_type<'a>(&'a self) -> Option<&'a str>;
9176    #[allow(rustdoc::invalid_html_tags)]
9177    #[doc = "Optional. MIME type of the file as defined by the sender"]
9178    #[allow(clippy::needless_lifetimes)]
9179    fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self;
9180    #[allow(rustdoc::invalid_html_tags)]
9181    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
9182    #[allow(clippy::needless_lifetimes)]
9183    fn get_file_size<'a>(&'a self) -> Option<i64>;
9184    #[allow(rustdoc::invalid_html_tags)]
9185    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
9186    #[allow(clippy::needless_lifetimes)]
9187    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
9188}
9189#[allow(dead_code)]
9190trait TraitAudio {
9191    #[allow(rustdoc::invalid_html_tags)]
9192    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
9193    #[allow(clippy::needless_lifetimes)]
9194    fn get_file_id<'a>(&'a self) -> &'a str;
9195    #[allow(rustdoc::invalid_html_tags)]
9196    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
9197    #[allow(clippy::needless_lifetimes)]
9198    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
9199    #[allow(rustdoc::invalid_html_tags)]
9200    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
9201    #[allow(clippy::needless_lifetimes)]
9202    fn get_file_unique_id<'a>(&'a self) -> &'a str;
9203    #[allow(rustdoc::invalid_html_tags)]
9204    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
9205    #[allow(clippy::needless_lifetimes)]
9206    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
9207    #[allow(rustdoc::invalid_html_tags)]
9208    #[doc = "Duration of the audio in seconds as defined by the sender"]
9209    #[allow(clippy::needless_lifetimes)]
9210    fn get_duration<'a>(&'a self) -> i64;
9211    #[allow(rustdoc::invalid_html_tags)]
9212    #[doc = "Duration of the audio in seconds as defined by the sender"]
9213    #[allow(clippy::needless_lifetimes)]
9214    fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self;
9215    #[allow(rustdoc::invalid_html_tags)]
9216    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
9217    #[allow(clippy::needless_lifetimes)]
9218    fn get_performer<'a>(&'a self) -> Option<&'a str>;
9219    #[allow(rustdoc::invalid_html_tags)]
9220    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
9221    #[allow(clippy::needless_lifetimes)]
9222    fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self;
9223    #[allow(rustdoc::invalid_html_tags)]
9224    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
9225    #[allow(clippy::needless_lifetimes)]
9226    fn get_title<'a>(&'a self) -> Option<&'a str>;
9227    #[allow(rustdoc::invalid_html_tags)]
9228    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
9229    #[allow(clippy::needless_lifetimes)]
9230    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
9231    #[allow(rustdoc::invalid_html_tags)]
9232    #[doc = "Optional. Original filename as defined by the sender"]
9233    #[allow(clippy::needless_lifetimes)]
9234    fn get_file_name<'a>(&'a self) -> Option<&'a str>;
9235    #[allow(rustdoc::invalid_html_tags)]
9236    #[doc = "Optional. Original filename as defined by the sender"]
9237    #[allow(clippy::needless_lifetimes)]
9238    fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self;
9239    #[allow(rustdoc::invalid_html_tags)]
9240    #[doc = "Optional. MIME type of the file as defined by the sender"]
9241    #[allow(clippy::needless_lifetimes)]
9242    fn get_mime_type<'a>(&'a self) -> Option<&'a str>;
9243    #[allow(rustdoc::invalid_html_tags)]
9244    #[doc = "Optional. MIME type of the file as defined by the sender"]
9245    #[allow(clippy::needless_lifetimes)]
9246    fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self;
9247    #[allow(rustdoc::invalid_html_tags)]
9248    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
9249    #[allow(clippy::needless_lifetimes)]
9250    fn get_file_size<'a>(&'a self) -> Option<i64>;
9251    #[allow(rustdoc::invalid_html_tags)]
9252    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
9253    #[allow(clippy::needless_lifetimes)]
9254    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
9255    #[allow(rustdoc::invalid_html_tags)]
9256    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
9257    #[allow(clippy::needless_lifetimes)]
9258    fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize>;
9259    #[allow(rustdoc::invalid_html_tags)]
9260    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
9261    #[allow(clippy::needless_lifetimes)]
9262    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self;
9263}
9264#[allow(dead_code)]
9265trait TraitRefundedPayment {
9266    #[allow(rustdoc::invalid_html_tags)]
9267    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
9268    #[allow(clippy::needless_lifetimes)]
9269    fn get_currency<'a>(&'a self) -> &'a str;
9270    #[allow(rustdoc::invalid_html_tags)]
9271    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
9272    #[allow(clippy::needless_lifetimes)]
9273    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self;
9274    #[allow(rustdoc::invalid_html_tags)]
9275    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
9276    #[allow(clippy::needless_lifetimes)]
9277    fn get_total_amount<'a>(&'a self) -> i64;
9278    #[allow(rustdoc::invalid_html_tags)]
9279    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
9280    #[allow(clippy::needless_lifetimes)]
9281    fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self;
9282    #[allow(rustdoc::invalid_html_tags)]
9283    #[doc = "Bot-specified invoice payload"]
9284    #[allow(clippy::needless_lifetimes)]
9285    fn get_invoice_payload<'a>(&'a self) -> &'a str;
9286    #[allow(rustdoc::invalid_html_tags)]
9287    #[doc = "Bot-specified invoice payload"]
9288    #[allow(clippy::needless_lifetimes)]
9289    fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self;
9290    #[allow(rustdoc::invalid_html_tags)]
9291    #[doc = "Telegram payment identifier"]
9292    #[allow(clippy::needless_lifetimes)]
9293    fn get_telegram_payment_charge_id<'a>(&'a self) -> &'a str;
9294    #[allow(rustdoc::invalid_html_tags)]
9295    #[doc = "Telegram payment identifier"]
9296    #[allow(clippy::needless_lifetimes)]
9297    fn set_telegram_payment_charge_id<'a>(
9298        &'a mut self,
9299        telegram_payment_charge_id: String,
9300    ) -> &'a mut Self;
9301    #[allow(rustdoc::invalid_html_tags)]
9302    #[doc = "Optional. Provider payment identifier"]
9303    #[allow(clippy::needless_lifetimes)]
9304    fn get_provider_payment_charge_id<'a>(&'a self) -> Option<&'a str>;
9305    #[allow(rustdoc::invalid_html_tags)]
9306    #[doc = "Optional. Provider payment identifier"]
9307    #[allow(clippy::needless_lifetimes)]
9308    fn set_provider_payment_charge_id<'a>(
9309        &'a mut self,
9310        provider_payment_charge_id: Option<String>,
9311    ) -> &'a mut Self;
9312}
9313#[allow(dead_code)]
9314trait TraitInputMediaAnimation {
9315    #[allow(rustdoc::invalid_html_tags)]
9316    #[doc = "Type of the result, must be animation"]
9317    #[allow(clippy::needless_lifetimes)]
9318    fn get_tg_type<'a>(&'a self) -> &'a str;
9319    #[allow(rustdoc::invalid_html_tags)]
9320    #[doc = "Type of the result, must be animation"]
9321    #[allow(clippy::needless_lifetimes)]
9322    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9323    #[allow(rustdoc::invalid_html_tags)]
9324    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
9325    #[allow(clippy::needless_lifetimes)]
9326    fn get_media<'a>(&'a self) -> &'a Option<InputFile>;
9327    #[allow(rustdoc::invalid_html_tags)]
9328    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
9329    #[allow(clippy::needless_lifetimes)]
9330    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self;
9331    #[allow(rustdoc::invalid_html_tags)]
9332    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
9333    #[allow(clippy::needless_lifetimes)]
9334    fn get_thumbnail<'a>(&'a self) -> Option<&'a str>;
9335    #[allow(rustdoc::invalid_html_tags)]
9336    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
9337    #[allow(clippy::needless_lifetimes)]
9338    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self;
9339    #[allow(rustdoc::invalid_html_tags)]
9340    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
9341    #[allow(clippy::needless_lifetimes)]
9342    fn get_caption<'a>(&'a self) -> Option<&'a str>;
9343    #[allow(rustdoc::invalid_html_tags)]
9344    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
9345    #[allow(clippy::needless_lifetimes)]
9346    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
9347    #[allow(rustdoc::invalid_html_tags)]
9348    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
9349    #[allow(clippy::needless_lifetimes)]
9350    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
9351    #[allow(rustdoc::invalid_html_tags)]
9352    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
9353    #[allow(clippy::needless_lifetimes)]
9354    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
9355    #[allow(rustdoc::invalid_html_tags)]
9356    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
9357    #[allow(clippy::needless_lifetimes)]
9358    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
9359    #[allow(rustdoc::invalid_html_tags)]
9360    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
9361    #[allow(clippy::needless_lifetimes)]
9362    fn set_caption_entities<'a>(
9363        &'a mut self,
9364        caption_entities: Option<Vec<MessageEntity>>,
9365    ) -> &'a mut Self;
9366    #[allow(rustdoc::invalid_html_tags)]
9367    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
9368    #[allow(clippy::needless_lifetimes)]
9369    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
9370    #[allow(rustdoc::invalid_html_tags)]
9371    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
9372    #[allow(clippy::needless_lifetimes)]
9373    fn set_show_caption_above_media<'a>(
9374        &'a mut self,
9375        show_caption_above_media: Option<bool>,
9376    ) -> &'a mut Self;
9377    #[allow(rustdoc::invalid_html_tags)]
9378    #[doc = "Optional. Animation width"]
9379    #[allow(clippy::needless_lifetimes)]
9380    fn get_width<'a>(&'a self) -> Option<i64>;
9381    #[allow(rustdoc::invalid_html_tags)]
9382    #[doc = "Optional. Animation width"]
9383    #[allow(clippy::needless_lifetimes)]
9384    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self;
9385    #[allow(rustdoc::invalid_html_tags)]
9386    #[doc = "Optional. Animation height"]
9387    #[allow(clippy::needless_lifetimes)]
9388    fn get_height<'a>(&'a self) -> Option<i64>;
9389    #[allow(rustdoc::invalid_html_tags)]
9390    #[doc = "Optional. Animation height"]
9391    #[allow(clippy::needless_lifetimes)]
9392    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self;
9393    #[allow(rustdoc::invalid_html_tags)]
9394    #[doc = "Optional. Animation duration in seconds"]
9395    #[allow(clippy::needless_lifetimes)]
9396    fn get_duration<'a>(&'a self) -> Option<i64>;
9397    #[allow(rustdoc::invalid_html_tags)]
9398    #[doc = "Optional. Animation duration in seconds"]
9399    #[allow(clippy::needless_lifetimes)]
9400    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self;
9401    #[allow(rustdoc::invalid_html_tags)]
9402    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
9403    #[allow(clippy::needless_lifetimes)]
9404    fn get_has_spoiler<'a>(&'a self) -> Option<bool>;
9405    #[allow(rustdoc::invalid_html_tags)]
9406    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
9407    #[allow(clippy::needless_lifetimes)]
9408    fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self;
9409}
9410#[allow(dead_code)]
9411trait TraitGame {
9412    #[allow(rustdoc::invalid_html_tags)]
9413    #[doc = "Title of the game"]
9414    #[allow(clippy::needless_lifetimes)]
9415    fn get_title<'a>(&'a self) -> &'a str;
9416    #[allow(rustdoc::invalid_html_tags)]
9417    #[doc = "Title of the game"]
9418    #[allow(clippy::needless_lifetimes)]
9419    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
9420    #[allow(rustdoc::invalid_html_tags)]
9421    #[doc = "Description of the game"]
9422    #[allow(clippy::needless_lifetimes)]
9423    fn get_description<'a>(&'a self) -> &'a str;
9424    #[allow(rustdoc::invalid_html_tags)]
9425    #[doc = "Description of the game"]
9426    #[allow(clippy::needless_lifetimes)]
9427    fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self;
9428    #[allow(rustdoc::invalid_html_tags)]
9429    #[doc = "Photo that will be displayed in the game message in chats."]
9430    #[allow(clippy::needless_lifetimes)]
9431    fn get_photo<'a>(&'a self) -> &'a Vec<PhotoSize>;
9432    #[allow(rustdoc::invalid_html_tags)]
9433    #[doc = "Photo that will be displayed in the game message in chats."]
9434    #[allow(clippy::needless_lifetimes)]
9435    fn set_photo<'a>(&'a mut self, photo: Vec<PhotoSize>) -> &'a mut Self;
9436    #[allow(rustdoc::invalid_html_tags)]
9437    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
9438    #[allow(clippy::needless_lifetimes)]
9439    fn get_text<'a>(&'a self) -> Option<&'a str>;
9440    #[allow(rustdoc::invalid_html_tags)]
9441    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
9442    #[allow(clippy::needless_lifetimes)]
9443    fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self;
9444    #[allow(rustdoc::invalid_html_tags)]
9445    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
9446    #[allow(clippy::needless_lifetimes)]
9447    fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
9448    #[allow(rustdoc::invalid_html_tags)]
9449    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
9450    #[allow(clippy::needless_lifetimes)]
9451    fn set_text_entities<'a>(
9452        &'a mut self,
9453        text_entities: Option<Vec<MessageEntity>>,
9454    ) -> &'a mut Self;
9455    #[allow(rustdoc::invalid_html_tags)]
9456    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
9457    #[allow(clippy::needless_lifetimes)]
9458    fn get_animation<'a>(&'a self) -> Option<&'a Animation>;
9459    #[allow(rustdoc::invalid_html_tags)]
9460    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
9461    #[allow(clippy::needless_lifetimes)]
9462    fn set_animation<'a>(&'a mut self, animation: Option<Animation>) -> &'a mut Self;
9463}
9464#[allow(dead_code)]
9465trait TraitChatMemberMember {
9466    #[allow(rustdoc::invalid_html_tags)]
9467    #[doc = "Information about the user"]
9468    #[allow(clippy::needless_lifetimes)]
9469    fn get_user<'a>(&'a self) -> &'a User;
9470    #[allow(rustdoc::invalid_html_tags)]
9471    #[doc = "Information about the user"]
9472    #[allow(clippy::needless_lifetimes)]
9473    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
9474    #[allow(rustdoc::invalid_html_tags)]
9475    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
9476    #[allow(clippy::needless_lifetimes)]
9477    fn get_until_date<'a>(&'a self) -> Option<i64>;
9478    #[allow(rustdoc::invalid_html_tags)]
9479    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
9480    #[allow(clippy::needless_lifetimes)]
9481    fn set_until_date<'a>(&'a mut self, until_date: Option<i64>) -> &'a mut Self;
9482}
9483#[allow(dead_code)]
9484trait TraitChatPermissions {
9485    #[allow(rustdoc::invalid_html_tags)]
9486    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
9487    #[allow(clippy::needless_lifetimes)]
9488    fn get_can_send_messages<'a>(&'a self) -> Option<bool>;
9489    #[allow(rustdoc::invalid_html_tags)]
9490    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
9491    #[allow(clippy::needless_lifetimes)]
9492    fn set_can_send_messages<'a>(&'a mut self, can_send_messages: Option<bool>) -> &'a mut Self;
9493    #[allow(rustdoc::invalid_html_tags)]
9494    #[doc = "Optional. True, if the user is allowed to send audios"]
9495    #[allow(clippy::needless_lifetimes)]
9496    fn get_can_send_audios<'a>(&'a self) -> Option<bool>;
9497    #[allow(rustdoc::invalid_html_tags)]
9498    #[doc = "Optional. True, if the user is allowed to send audios"]
9499    #[allow(clippy::needless_lifetimes)]
9500    fn set_can_send_audios<'a>(&'a mut self, can_send_audios: Option<bool>) -> &'a mut Self;
9501    #[allow(rustdoc::invalid_html_tags)]
9502    #[doc = "Optional. True, if the user is allowed to send documents"]
9503    #[allow(clippy::needless_lifetimes)]
9504    fn get_can_send_documents<'a>(&'a self) -> Option<bool>;
9505    #[allow(rustdoc::invalid_html_tags)]
9506    #[doc = "Optional. True, if the user is allowed to send documents"]
9507    #[allow(clippy::needless_lifetimes)]
9508    fn set_can_send_documents<'a>(&'a mut self, can_send_documents: Option<bool>) -> &'a mut Self;
9509    #[allow(rustdoc::invalid_html_tags)]
9510    #[doc = "Optional. True, if the user is allowed to send photos"]
9511    #[allow(clippy::needless_lifetimes)]
9512    fn get_can_send_photos<'a>(&'a self) -> Option<bool>;
9513    #[allow(rustdoc::invalid_html_tags)]
9514    #[doc = "Optional. True, if the user is allowed to send photos"]
9515    #[allow(clippy::needless_lifetimes)]
9516    fn set_can_send_photos<'a>(&'a mut self, can_send_photos: Option<bool>) -> &'a mut Self;
9517    #[allow(rustdoc::invalid_html_tags)]
9518    #[doc = "Optional. True, if the user is allowed to send videos"]
9519    #[allow(clippy::needless_lifetimes)]
9520    fn get_can_send_videos<'a>(&'a self) -> Option<bool>;
9521    #[allow(rustdoc::invalid_html_tags)]
9522    #[doc = "Optional. True, if the user is allowed to send videos"]
9523    #[allow(clippy::needless_lifetimes)]
9524    fn set_can_send_videos<'a>(&'a mut self, can_send_videos: Option<bool>) -> &'a mut Self;
9525    #[allow(rustdoc::invalid_html_tags)]
9526    #[doc = "Optional. True, if the user is allowed to send video notes"]
9527    #[allow(clippy::needless_lifetimes)]
9528    fn get_can_send_video_notes<'a>(&'a self) -> Option<bool>;
9529    #[allow(rustdoc::invalid_html_tags)]
9530    #[doc = "Optional. True, if the user is allowed to send video notes"]
9531    #[allow(clippy::needless_lifetimes)]
9532    fn set_can_send_video_notes<'a>(
9533        &'a mut self,
9534        can_send_video_notes: Option<bool>,
9535    ) -> &'a mut Self;
9536    #[allow(rustdoc::invalid_html_tags)]
9537    #[doc = "Optional. True, if the user is allowed to send voice notes"]
9538    #[allow(clippy::needless_lifetimes)]
9539    fn get_can_send_voice_notes<'a>(&'a self) -> Option<bool>;
9540    #[allow(rustdoc::invalid_html_tags)]
9541    #[doc = "Optional. True, if the user is allowed to send voice notes"]
9542    #[allow(clippy::needless_lifetimes)]
9543    fn set_can_send_voice_notes<'a>(
9544        &'a mut self,
9545        can_send_voice_notes: Option<bool>,
9546    ) -> &'a mut Self;
9547    #[allow(rustdoc::invalid_html_tags)]
9548    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
9549    #[allow(clippy::needless_lifetimes)]
9550    fn get_can_send_polls<'a>(&'a self) -> Option<bool>;
9551    #[allow(rustdoc::invalid_html_tags)]
9552    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
9553    #[allow(clippy::needless_lifetimes)]
9554    fn set_can_send_polls<'a>(&'a mut self, can_send_polls: Option<bool>) -> &'a mut Self;
9555    #[allow(rustdoc::invalid_html_tags)]
9556    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
9557    #[allow(clippy::needless_lifetimes)]
9558    fn get_can_send_other_messages<'a>(&'a self) -> Option<bool>;
9559    #[allow(rustdoc::invalid_html_tags)]
9560    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
9561    #[allow(clippy::needless_lifetimes)]
9562    fn set_can_send_other_messages<'a>(
9563        &'a mut self,
9564        can_send_other_messages: Option<bool>,
9565    ) -> &'a mut Self;
9566    #[allow(rustdoc::invalid_html_tags)]
9567    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
9568    #[allow(clippy::needless_lifetimes)]
9569    fn get_can_add_web_page_previews<'a>(&'a self) -> Option<bool>;
9570    #[allow(rustdoc::invalid_html_tags)]
9571    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
9572    #[allow(clippy::needless_lifetimes)]
9573    fn set_can_add_web_page_previews<'a>(
9574        &'a mut self,
9575        can_add_web_page_previews: Option<bool>,
9576    ) -> &'a mut Self;
9577    #[allow(rustdoc::invalid_html_tags)]
9578    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
9579    #[allow(clippy::needless_lifetimes)]
9580    fn get_can_change_info<'a>(&'a self) -> Option<bool>;
9581    #[allow(rustdoc::invalid_html_tags)]
9582    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
9583    #[allow(clippy::needless_lifetimes)]
9584    fn set_can_change_info<'a>(&'a mut self, can_change_info: Option<bool>) -> &'a mut Self;
9585    #[allow(rustdoc::invalid_html_tags)]
9586    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
9587    #[allow(clippy::needless_lifetimes)]
9588    fn get_can_invite_users<'a>(&'a self) -> Option<bool>;
9589    #[allow(rustdoc::invalid_html_tags)]
9590    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
9591    #[allow(clippy::needless_lifetimes)]
9592    fn set_can_invite_users<'a>(&'a mut self, can_invite_users: Option<bool>) -> &'a mut Self;
9593    #[allow(rustdoc::invalid_html_tags)]
9594    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
9595    #[allow(clippy::needless_lifetimes)]
9596    fn get_can_pin_messages<'a>(&'a self) -> Option<bool>;
9597    #[allow(rustdoc::invalid_html_tags)]
9598    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
9599    #[allow(clippy::needless_lifetimes)]
9600    fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: Option<bool>) -> &'a mut Self;
9601    #[allow(rustdoc::invalid_html_tags)]
9602    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
9603    #[allow(clippy::needless_lifetimes)]
9604    fn get_can_manage_topics<'a>(&'a self) -> Option<bool>;
9605    #[allow(rustdoc::invalid_html_tags)]
9606    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
9607    #[allow(clippy::needless_lifetimes)]
9608    fn set_can_manage_topics<'a>(&'a mut self, can_manage_topics: Option<bool>) -> &'a mut Self;
9609}
9610#[allow(dead_code)]
9611trait TraitStarTransactions {
9612    #[allow(rustdoc::invalid_html_tags)]
9613    #[doc = "The list of transactions"]
9614    #[allow(clippy::needless_lifetimes)]
9615    fn get_transactions<'a>(&'a self) -> &'a Vec<StarTransaction>;
9616    #[allow(rustdoc::invalid_html_tags)]
9617    #[doc = "The list of transactions"]
9618    #[allow(clippy::needless_lifetimes)]
9619    fn set_transactions<'a>(&'a mut self, transactions: Vec<StarTransaction>) -> &'a mut Self;
9620}
9621#[allow(dead_code)]
9622trait TraitEncryptedCredentials {
9623    #[allow(rustdoc::invalid_html_tags)]
9624    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
9625    #[allow(clippy::needless_lifetimes)]
9626    fn get_data<'a>(&'a self) -> &'a str;
9627    #[allow(rustdoc::invalid_html_tags)]
9628    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
9629    #[allow(clippy::needless_lifetimes)]
9630    fn set_data<'a>(&'a mut self, data: String) -> &'a mut Self;
9631    #[allow(rustdoc::invalid_html_tags)]
9632    #[doc = "Base64-encoded data hash for data authentication"]
9633    #[allow(clippy::needless_lifetimes)]
9634    fn get_hash<'a>(&'a self) -> &'a str;
9635    #[allow(rustdoc::invalid_html_tags)]
9636    #[doc = "Base64-encoded data hash for data authentication"]
9637    #[allow(clippy::needless_lifetimes)]
9638    fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self;
9639    #[allow(rustdoc::invalid_html_tags)]
9640    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
9641    #[allow(clippy::needless_lifetimes)]
9642    fn get_secret<'a>(&'a self) -> &'a str;
9643    #[allow(rustdoc::invalid_html_tags)]
9644    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
9645    #[allow(clippy::needless_lifetimes)]
9646    fn set_secret<'a>(&'a mut self, secret: String) -> &'a mut Self;
9647}
9648#[allow(dead_code)]
9649trait TraitStoryAreaTypeSuggestedReaction {
9650    #[allow(rustdoc::invalid_html_tags)]
9651    #[doc = "Type of the area, always \"suggested_reaction\""]
9652    #[allow(clippy::needless_lifetimes)]
9653    fn get_tg_type<'a>(&'a self) -> &'a str;
9654    #[allow(rustdoc::invalid_html_tags)]
9655    #[doc = "Type of the area, always \"suggested_reaction\""]
9656    #[allow(clippy::needless_lifetimes)]
9657    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9658    #[allow(rustdoc::invalid_html_tags)]
9659    #[doc = "Type of the reaction"]
9660    #[allow(clippy::needless_lifetimes)]
9661    fn get_reaction_type<'a>(&'a self) -> &'a ReactionType;
9662    #[allow(rustdoc::invalid_html_tags)]
9663    #[doc = "Type of the reaction"]
9664    #[allow(clippy::needless_lifetimes)]
9665    fn set_reaction_type<'a>(&'a mut self, reaction_type: ReactionType) -> &'a mut Self;
9666    #[allow(rustdoc::invalid_html_tags)]
9667    #[doc = "Optional. Pass True if the reaction area has a dark background"]
9668    #[allow(clippy::needless_lifetimes)]
9669    fn get_is_dark<'a>(&'a self) -> Option<bool>;
9670    #[allow(rustdoc::invalid_html_tags)]
9671    #[doc = "Optional. Pass True if the reaction area has a dark background"]
9672    #[allow(clippy::needless_lifetimes)]
9673    fn set_is_dark<'a>(&'a mut self, is_dark: Option<bool>) -> &'a mut Self;
9674    #[allow(rustdoc::invalid_html_tags)]
9675    #[doc = "Optional. Pass True if reaction area corner is flipped"]
9676    #[allow(clippy::needless_lifetimes)]
9677    fn get_is_flipped<'a>(&'a self) -> Option<bool>;
9678    #[allow(rustdoc::invalid_html_tags)]
9679    #[doc = "Optional. Pass True if reaction area corner is flipped"]
9680    #[allow(clippy::needless_lifetimes)]
9681    fn set_is_flipped<'a>(&'a mut self, is_flipped: Option<bool>) -> &'a mut Self;
9682}
9683#[allow(dead_code)]
9684trait TraitChecklistTasksAdded {
9685    #[allow(rustdoc::invalid_html_tags)]
9686    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
9687    #[allow(clippy::needless_lifetimes)]
9688    fn get_checklist_message<'a>(&'a self) -> Option<&'a Message>;
9689    #[allow(rustdoc::invalid_html_tags)]
9690    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
9691    #[allow(clippy::needless_lifetimes)]
9692    fn set_checklist_message<'a>(&'a mut self, checklist_message: Option<Message>) -> &'a mut Self;
9693    #[allow(rustdoc::invalid_html_tags)]
9694    #[doc = "List of tasks added to the checklist"]
9695    #[allow(clippy::needless_lifetimes)]
9696    fn get_tasks<'a>(&'a self) -> &'a Vec<ChecklistTask>;
9697    #[allow(rustdoc::invalid_html_tags)]
9698    #[doc = "List of tasks added to the checklist"]
9699    #[allow(clippy::needless_lifetimes)]
9700    fn set_tasks<'a>(&'a mut self, tasks: Vec<ChecklistTask>) -> &'a mut Self;
9701}
9702#[allow(dead_code)]
9703trait TraitInputMessageContent:
9704    TraitInputTextMessageContent
9705    + TraitInputLocationMessageContent
9706    + TraitInputVenueMessageContent
9707    + TraitInputContactMessageContent
9708    + TraitInputInvoiceMessageContent
9709{
9710}
9711#[allow(dead_code)]
9712trait TraitBackgroundFillGradient {
9713    #[allow(rustdoc::invalid_html_tags)]
9714    #[doc = "Type of the background fill, always \"gradient\""]
9715    #[allow(clippy::needless_lifetimes)]
9716    fn get_tg_type<'a>(&'a self) -> &'a str;
9717    #[allow(rustdoc::invalid_html_tags)]
9718    #[doc = "Type of the background fill, always \"gradient\""]
9719    #[allow(clippy::needless_lifetimes)]
9720    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9721    #[allow(rustdoc::invalid_html_tags)]
9722    #[doc = "Top color of the gradient in the RGB24 format"]
9723    #[allow(clippy::needless_lifetimes)]
9724    fn get_top_color<'a>(&'a self) -> i64;
9725    #[allow(rustdoc::invalid_html_tags)]
9726    #[doc = "Top color of the gradient in the RGB24 format"]
9727    #[allow(clippy::needless_lifetimes)]
9728    fn set_top_color<'a>(&'a mut self, top_color: i64) -> &'a mut Self;
9729    #[allow(rustdoc::invalid_html_tags)]
9730    #[doc = "Bottom color of the gradient in the RGB24 format"]
9731    #[allow(clippy::needless_lifetimes)]
9732    fn get_bottom_color<'a>(&'a self) -> i64;
9733    #[allow(rustdoc::invalid_html_tags)]
9734    #[doc = "Bottom color of the gradient in the RGB24 format"]
9735    #[allow(clippy::needless_lifetimes)]
9736    fn set_bottom_color<'a>(&'a mut self, bottom_color: i64) -> &'a mut Self;
9737    #[allow(rustdoc::invalid_html_tags)]
9738    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
9739    #[allow(clippy::needless_lifetimes)]
9740    fn get_rotation_angle<'a>(&'a self) -> i64;
9741    #[allow(rustdoc::invalid_html_tags)]
9742    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
9743    #[allow(clippy::needless_lifetimes)]
9744    fn set_rotation_angle<'a>(&'a mut self, rotation_angle: i64) -> &'a mut Self;
9745}
9746#[allow(dead_code)]
9747trait TraitSuggestedPostRefunded {
9748    #[allow(rustdoc::invalid_html_tags)]
9749    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
9750    #[allow(clippy::needless_lifetimes)]
9751    fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message>;
9752    #[allow(rustdoc::invalid_html_tags)]
9753    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
9754    #[allow(clippy::needless_lifetimes)]
9755    fn set_suggested_post_message<'a>(
9756        &'a mut self,
9757        suggested_post_message: Option<Message>,
9758    ) -> &'a mut Self;
9759    #[allow(rustdoc::invalid_html_tags)]
9760    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
9761    #[allow(clippy::needless_lifetimes)]
9762    fn get_reason<'a>(&'a self) -> &'a str;
9763    #[allow(rustdoc::invalid_html_tags)]
9764    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
9765    #[allow(clippy::needless_lifetimes)]
9766    fn set_reason<'a>(&'a mut self, reason: String) -> &'a mut Self;
9767}
9768#[allow(dead_code)]
9769trait TraitCallbackQuery {
9770    #[allow(rustdoc::invalid_html_tags)]
9771    #[doc = "Unique identifier for this query"]
9772    #[allow(clippy::needless_lifetimes)]
9773    fn get_id<'a>(&'a self) -> &'a str;
9774    #[allow(rustdoc::invalid_html_tags)]
9775    #[doc = "Unique identifier for this query"]
9776    #[allow(clippy::needless_lifetimes)]
9777    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
9778    #[allow(rustdoc::invalid_html_tags)]
9779    #[doc = "Sender"]
9780    #[allow(clippy::needless_lifetimes)]
9781    fn get_from<'a>(&'a self) -> &'a User;
9782    #[allow(rustdoc::invalid_html_tags)]
9783    #[doc = "Sender"]
9784    #[allow(clippy::needless_lifetimes)]
9785    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
9786    #[allow(rustdoc::invalid_html_tags)]
9787    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
9788    #[allow(clippy::needless_lifetimes)]
9789    fn get_message<'a>(&'a self) -> Option<&'a MaybeInaccessibleMessage>;
9790    #[allow(rustdoc::invalid_html_tags)]
9791    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
9792    #[allow(clippy::needless_lifetimes)]
9793    fn set_message<'a>(&'a mut self, message: Option<MaybeInaccessibleMessage>) -> &'a mut Self;
9794    #[allow(rustdoc::invalid_html_tags)]
9795    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
9796    #[allow(clippy::needless_lifetimes)]
9797    fn get_inline_message_id<'a>(&'a self) -> Option<&'a str>;
9798    #[allow(rustdoc::invalid_html_tags)]
9799    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
9800    #[allow(clippy::needless_lifetimes)]
9801    fn set_inline_message_id<'a>(&'a mut self, inline_message_id: Option<String>) -> &'a mut Self;
9802    #[allow(rustdoc::invalid_html_tags)]
9803    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
9804    #[allow(clippy::needless_lifetimes)]
9805    fn get_chat_instance<'a>(&'a self) -> &'a str;
9806    #[allow(rustdoc::invalid_html_tags)]
9807    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
9808    #[allow(clippy::needless_lifetimes)]
9809    fn set_chat_instance<'a>(&'a mut self, chat_instance: String) -> &'a mut Self;
9810    #[allow(rustdoc::invalid_html_tags)]
9811    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
9812    #[allow(clippy::needless_lifetimes)]
9813    fn get_data<'a>(&'a self) -> Option<&'a str>;
9814    #[allow(rustdoc::invalid_html_tags)]
9815    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
9816    #[allow(clippy::needless_lifetimes)]
9817    fn set_data<'a>(&'a mut self, data: Option<String>) -> &'a mut Self;
9818    #[allow(rustdoc::invalid_html_tags)]
9819    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
9820    #[allow(clippy::needless_lifetimes)]
9821    fn get_game_short_name<'a>(&'a self) -> Option<&'a str>;
9822    #[allow(rustdoc::invalid_html_tags)]
9823    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
9824    #[allow(clippy::needless_lifetimes)]
9825    fn set_game_short_name<'a>(&'a mut self, game_short_name: Option<String>) -> &'a mut Self;
9826}
9827#[allow(dead_code)]
9828trait TraitPassportElementErrorFiles {
9829    #[allow(rustdoc::invalid_html_tags)]
9830    #[doc = "Error source, must be files"]
9831    #[allow(clippy::needless_lifetimes)]
9832    fn get_source<'a>(&'a self) -> &'a str;
9833    #[allow(rustdoc::invalid_html_tags)]
9834    #[doc = "Error source, must be files"]
9835    #[allow(clippy::needless_lifetimes)]
9836    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
9837    #[allow(rustdoc::invalid_html_tags)]
9838    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
9839    #[allow(clippy::needless_lifetimes)]
9840    fn get_tg_type<'a>(&'a self) -> &'a str;
9841    #[allow(rustdoc::invalid_html_tags)]
9842    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
9843    #[allow(clippy::needless_lifetimes)]
9844    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9845    #[allow(rustdoc::invalid_html_tags)]
9846    #[doc = "List of base64-encoded file hashes"]
9847    #[allow(clippy::needless_lifetimes)]
9848    fn get_file_hashes<'a>(&'a self) -> &'a Vec<String>;
9849    #[allow(rustdoc::invalid_html_tags)]
9850    #[doc = "List of base64-encoded file hashes"]
9851    #[allow(clippy::needless_lifetimes)]
9852    fn set_file_hashes<'a>(&'a mut self, file_hashes: Vec<String>) -> &'a mut Self;
9853    #[allow(rustdoc::invalid_html_tags)]
9854    #[doc = "Error message"]
9855    #[allow(clippy::needless_lifetimes)]
9856    fn get_message<'a>(&'a self) -> &'a str;
9857    #[allow(rustdoc::invalid_html_tags)]
9858    #[doc = "Error message"]
9859    #[allow(clippy::needless_lifetimes)]
9860    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
9861}
9862#[allow(dead_code)]
9863trait TraitMenuButtonDefault {
9864    #[allow(rustdoc::invalid_html_tags)]
9865    #[doc = "Type of the button, must be default"]
9866    #[allow(clippy::needless_lifetimes)]
9867    fn get_tg_type<'a>(&'a self) -> &'a str;
9868    #[allow(rustdoc::invalid_html_tags)]
9869    #[doc = "Type of the button, must be default"]
9870    #[allow(clippy::needless_lifetimes)]
9871    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9872}
9873#[allow(dead_code)]
9874trait TraitForumTopicEdited {
9875    #[allow(rustdoc::invalid_html_tags)]
9876    #[doc = "Optional. New name of the topic, if it was edited"]
9877    #[allow(clippy::needless_lifetimes)]
9878    fn get_name<'a>(&'a self) -> Option<&'a str>;
9879    #[allow(rustdoc::invalid_html_tags)]
9880    #[doc = "Optional. New name of the topic, if it was edited"]
9881    #[allow(clippy::needless_lifetimes)]
9882    fn set_name<'a>(&'a mut self, name: Option<String>) -> &'a mut Self;
9883    #[allow(rustdoc::invalid_html_tags)]
9884    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
9885    #[allow(clippy::needless_lifetimes)]
9886    fn get_icon_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
9887    #[allow(rustdoc::invalid_html_tags)]
9888    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
9889    #[allow(clippy::needless_lifetimes)]
9890    fn set_icon_custom_emoji_id<'a>(
9891        &'a mut self,
9892        icon_custom_emoji_id: Option<String>,
9893    ) -> &'a mut Self;
9894}
9895#[allow(dead_code)]
9896trait TraitGiveawayCompleted {
9897    #[allow(rustdoc::invalid_html_tags)]
9898    #[doc = "Number of winners in the giveaway"]
9899    #[allow(clippy::needless_lifetimes)]
9900    fn get_winner_count<'a>(&'a self) -> i64;
9901    #[allow(rustdoc::invalid_html_tags)]
9902    #[doc = "Number of winners in the giveaway"]
9903    #[allow(clippy::needless_lifetimes)]
9904    fn set_winner_count<'a>(&'a mut self, winner_count: i64) -> &'a mut Self;
9905    #[allow(rustdoc::invalid_html_tags)]
9906    #[doc = "Optional. Number of undistributed prizes"]
9907    #[allow(clippy::needless_lifetimes)]
9908    fn get_unclaimed_prize_count<'a>(&'a self) -> Option<i64>;
9909    #[allow(rustdoc::invalid_html_tags)]
9910    #[doc = "Optional. Number of undistributed prizes"]
9911    #[allow(clippy::needless_lifetimes)]
9912    fn set_unclaimed_prize_count<'a>(
9913        &'a mut self,
9914        unclaimed_prize_count: Option<i64>,
9915    ) -> &'a mut Self;
9916    #[allow(rustdoc::invalid_html_tags)]
9917    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
9918    #[allow(clippy::needless_lifetimes)]
9919    fn get_giveaway_message<'a>(&'a self) -> Option<&'a Message>;
9920    #[allow(rustdoc::invalid_html_tags)]
9921    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
9922    #[allow(clippy::needless_lifetimes)]
9923    fn set_giveaway_message<'a>(&'a mut self, giveaway_message: Option<Message>) -> &'a mut Self;
9924    #[allow(rustdoc::invalid_html_tags)]
9925    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
9926    #[allow(clippy::needless_lifetimes)]
9927    fn get_is_star_giveaway<'a>(&'a self) -> Option<bool>;
9928    #[allow(rustdoc::invalid_html_tags)]
9929    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
9930    #[allow(clippy::needless_lifetimes)]
9931    fn set_is_star_giveaway<'a>(&'a mut self, is_star_giveaway: Option<bool>) -> &'a mut Self;
9932}
9933#[allow(dead_code)]
9934trait TraitReplyKeyboardMarkup {
9935    #[allow(rustdoc::invalid_html_tags)]
9936    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
9937    #[allow(clippy::needless_lifetimes)]
9938    fn get_keyboard<'a>(&'a self) -> &'a Vec<Vec<KeyboardButton>>;
9939    #[allow(rustdoc::invalid_html_tags)]
9940    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
9941    #[allow(clippy::needless_lifetimes)]
9942    fn set_keyboard<'a>(&'a mut self, keyboard: Vec<Vec<KeyboardButton>>) -> &'a mut Self;
9943    #[allow(rustdoc::invalid_html_tags)]
9944    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
9945    #[allow(clippy::needless_lifetimes)]
9946    fn get_is_persistent<'a>(&'a self) -> Option<bool>;
9947    #[allow(rustdoc::invalid_html_tags)]
9948    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
9949    #[allow(clippy::needless_lifetimes)]
9950    fn set_is_persistent<'a>(&'a mut self, is_persistent: Option<bool>) -> &'a mut Self;
9951    #[allow(rustdoc::invalid_html_tags)]
9952    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
9953    #[allow(clippy::needless_lifetimes)]
9954    fn get_resize_keyboard<'a>(&'a self) -> Option<bool>;
9955    #[allow(rustdoc::invalid_html_tags)]
9956    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
9957    #[allow(clippy::needless_lifetimes)]
9958    fn set_resize_keyboard<'a>(&'a mut self, resize_keyboard: Option<bool>) -> &'a mut Self;
9959    #[allow(rustdoc::invalid_html_tags)]
9960    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
9961    #[allow(clippy::needless_lifetimes)]
9962    fn get_one_time_keyboard<'a>(&'a self) -> Option<bool>;
9963    #[allow(rustdoc::invalid_html_tags)]
9964    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
9965    #[allow(clippy::needless_lifetimes)]
9966    fn set_one_time_keyboard<'a>(&'a mut self, one_time_keyboard: Option<bool>) -> &'a mut Self;
9967    #[allow(rustdoc::invalid_html_tags)]
9968    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
9969    #[allow(clippy::needless_lifetimes)]
9970    fn get_input_field_placeholder<'a>(&'a self) -> Option<&'a str>;
9971    #[allow(rustdoc::invalid_html_tags)]
9972    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
9973    #[allow(clippy::needless_lifetimes)]
9974    fn set_input_field_placeholder<'a>(
9975        &'a mut self,
9976        input_field_placeholder: Option<String>,
9977    ) -> &'a mut Self;
9978    #[allow(rustdoc::invalid_html_tags)]
9979    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
9980    #[allow(clippy::needless_lifetimes)]
9981    fn get_selective<'a>(&'a self) -> Option<bool>;
9982    #[allow(rustdoc::invalid_html_tags)]
9983    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
9984    #[allow(clippy::needless_lifetimes)]
9985    fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self;
9986}
9987#[allow(dead_code)]
9988trait TraitInlineQueryResultCachedAudio {
9989    #[allow(rustdoc::invalid_html_tags)]
9990    #[doc = "Type of the result, must be audio"]
9991    #[allow(clippy::needless_lifetimes)]
9992    fn get_tg_type<'a>(&'a self) -> &'a str;
9993    #[allow(rustdoc::invalid_html_tags)]
9994    #[doc = "Type of the result, must be audio"]
9995    #[allow(clippy::needless_lifetimes)]
9996    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
9997    #[allow(rustdoc::invalid_html_tags)]
9998    #[doc = "Unique identifier for this result, 1-64 bytes"]
9999    #[allow(clippy::needless_lifetimes)]
10000    fn get_id<'a>(&'a self) -> &'a str;
10001    #[allow(rustdoc::invalid_html_tags)]
10002    #[doc = "Unique identifier for this result, 1-64 bytes"]
10003    #[allow(clippy::needless_lifetimes)]
10004    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
10005    #[allow(rustdoc::invalid_html_tags)]
10006    #[doc = "A valid file identifier for the audio file"]
10007    #[allow(clippy::needless_lifetimes)]
10008    fn get_audio_file_id<'a>(&'a self) -> &'a str;
10009    #[allow(rustdoc::invalid_html_tags)]
10010    #[doc = "A valid file identifier for the audio file"]
10011    #[allow(clippy::needless_lifetimes)]
10012    fn set_audio_file_id<'a>(&'a mut self, audio_file_id: String) -> &'a mut Self;
10013    #[allow(rustdoc::invalid_html_tags)]
10014    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
10015    #[allow(clippy::needless_lifetimes)]
10016    fn get_caption<'a>(&'a self) -> Option<&'a str>;
10017    #[allow(rustdoc::invalid_html_tags)]
10018    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
10019    #[allow(clippy::needless_lifetimes)]
10020    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
10021    #[allow(rustdoc::invalid_html_tags)]
10022    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
10023    #[allow(clippy::needless_lifetimes)]
10024    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
10025    #[allow(rustdoc::invalid_html_tags)]
10026    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
10027    #[allow(clippy::needless_lifetimes)]
10028    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
10029    #[allow(rustdoc::invalid_html_tags)]
10030    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
10031    #[allow(clippy::needless_lifetimes)]
10032    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
10033    #[allow(rustdoc::invalid_html_tags)]
10034    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
10035    #[allow(clippy::needless_lifetimes)]
10036    fn set_caption_entities<'a>(
10037        &'a mut self,
10038        caption_entities: Option<Vec<MessageEntity>>,
10039    ) -> &'a mut Self;
10040    #[allow(rustdoc::invalid_html_tags)]
10041    #[doc = "Optional. Inline keyboard attached to the message"]
10042    #[allow(clippy::needless_lifetimes)]
10043    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
10044    #[allow(rustdoc::invalid_html_tags)]
10045    #[doc = "Optional. Inline keyboard attached to the message"]
10046    #[allow(clippy::needless_lifetimes)]
10047    fn set_reply_markup<'a>(
10048        &'a mut self,
10049        reply_markup: Option<InlineKeyboardMarkup>,
10050    ) -> &'a mut Self;
10051    #[allow(rustdoc::invalid_html_tags)]
10052    #[doc = "Optional. Content of the message to be sent instead of the audio"]
10053    #[allow(clippy::needless_lifetimes)]
10054    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
10055    #[allow(rustdoc::invalid_html_tags)]
10056    #[doc = "Optional. Content of the message to be sent instead of the audio"]
10057    #[allow(clippy::needless_lifetimes)]
10058    fn set_input_message_content<'a>(
10059        &'a mut self,
10060        input_message_content: Option<InputMessageContent>,
10061    ) -> &'a mut Self;
10062}
10063#[allow(dead_code)]
10064trait TraitCopyTextButton {
10065    #[allow(rustdoc::invalid_html_tags)]
10066    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
10067    #[allow(clippy::needless_lifetimes)]
10068    fn get_text<'a>(&'a self) -> &'a str;
10069    #[allow(rustdoc::invalid_html_tags)]
10070    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
10071    #[allow(clippy::needless_lifetimes)]
10072    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
10073}
10074#[allow(dead_code)]
10075trait TraitBackgroundTypeWallpaper {
10076    #[allow(rustdoc::invalid_html_tags)]
10077    #[doc = "Type of the background, always \"wallpaper\""]
10078    #[allow(clippy::needless_lifetimes)]
10079    fn get_tg_type<'a>(&'a self) -> &'a str;
10080    #[allow(rustdoc::invalid_html_tags)]
10081    #[doc = "Type of the background, always \"wallpaper\""]
10082    #[allow(clippy::needless_lifetimes)]
10083    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
10084    #[allow(rustdoc::invalid_html_tags)]
10085    #[doc = "Document with the wallpaper"]
10086    #[allow(clippy::needless_lifetimes)]
10087    fn get_document<'a>(&'a self) -> &'a Document;
10088    #[allow(rustdoc::invalid_html_tags)]
10089    #[doc = "Document with the wallpaper"]
10090    #[allow(clippy::needless_lifetimes)]
10091    fn set_document<'a>(&'a mut self, document: Document) -> &'a mut Self;
10092    #[allow(rustdoc::invalid_html_tags)]
10093    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
10094    #[allow(clippy::needless_lifetimes)]
10095    fn get_dark_theme_dimming<'a>(&'a self) -> i64;
10096    #[allow(rustdoc::invalid_html_tags)]
10097    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
10098    #[allow(clippy::needless_lifetimes)]
10099    fn set_dark_theme_dimming<'a>(&'a mut self, dark_theme_dimming: i64) -> &'a mut Self;
10100    #[allow(rustdoc::invalid_html_tags)]
10101    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
10102    #[allow(clippy::needless_lifetimes)]
10103    fn get_is_blurred<'a>(&'a self) -> Option<bool>;
10104    #[allow(rustdoc::invalid_html_tags)]
10105    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
10106    #[allow(clippy::needless_lifetimes)]
10107    fn set_is_blurred<'a>(&'a mut self, is_blurred: Option<bool>) -> &'a mut Self;
10108    #[allow(rustdoc::invalid_html_tags)]
10109    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
10110    #[allow(clippy::needless_lifetimes)]
10111    fn get_is_moving<'a>(&'a self) -> Option<bool>;
10112    #[allow(rustdoc::invalid_html_tags)]
10113    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
10114    #[allow(clippy::needless_lifetimes)]
10115    fn set_is_moving<'a>(&'a mut self, is_moving: Option<bool>) -> &'a mut Self;
10116}
10117#[allow(dead_code)]
10118trait TraitForumTopic {
10119    #[allow(rustdoc::invalid_html_tags)]
10120    #[doc = "Unique identifier of the forum topic"]
10121    #[allow(clippy::needless_lifetimes)]
10122    fn get_message_thread_id<'a>(&'a self) -> i64;
10123    #[allow(rustdoc::invalid_html_tags)]
10124    #[doc = "Unique identifier of the forum topic"]
10125    #[allow(clippy::needless_lifetimes)]
10126    fn set_message_thread_id<'a>(&'a mut self, message_thread_id: i64) -> &'a mut Self;
10127    #[allow(rustdoc::invalid_html_tags)]
10128    #[doc = "Name of the topic"]
10129    #[allow(clippy::needless_lifetimes)]
10130    fn get_name<'a>(&'a self) -> &'a str;
10131    #[allow(rustdoc::invalid_html_tags)]
10132    #[doc = "Name of the topic"]
10133    #[allow(clippy::needless_lifetimes)]
10134    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
10135    #[allow(rustdoc::invalid_html_tags)]
10136    #[doc = "Color of the topic icon in RGB format"]
10137    #[allow(clippy::needless_lifetimes)]
10138    fn get_icon_color<'a>(&'a self) -> i64;
10139    #[allow(rustdoc::invalid_html_tags)]
10140    #[doc = "Color of the topic icon in RGB format"]
10141    #[allow(clippy::needless_lifetimes)]
10142    fn set_icon_color<'a>(&'a mut self, icon_color: i64) -> &'a mut Self;
10143    #[allow(rustdoc::invalid_html_tags)]
10144    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
10145    #[allow(clippy::needless_lifetimes)]
10146    fn get_icon_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
10147    #[allow(rustdoc::invalid_html_tags)]
10148    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
10149    #[allow(clippy::needless_lifetimes)]
10150    fn set_icon_custom_emoji_id<'a>(
10151        &'a mut self,
10152        icon_custom_emoji_id: Option<String>,
10153    ) -> &'a mut Self;
10154}
10155#[allow(dead_code)]
10156trait TraitInputContactMessageContent {
10157    #[allow(rustdoc::invalid_html_tags)]
10158    #[doc = "Contact's phone number"]
10159    #[allow(clippy::needless_lifetimes)]
10160    fn get_phone_number<'a>(&'a self) -> &'a str;
10161    #[allow(rustdoc::invalid_html_tags)]
10162    #[doc = "Contact's phone number"]
10163    #[allow(clippy::needless_lifetimes)]
10164    fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self;
10165    #[allow(rustdoc::invalid_html_tags)]
10166    #[doc = "Contact's first name"]
10167    #[allow(clippy::needless_lifetimes)]
10168    fn get_first_name<'a>(&'a self) -> &'a str;
10169    #[allow(rustdoc::invalid_html_tags)]
10170    #[doc = "Contact's first name"]
10171    #[allow(clippy::needless_lifetimes)]
10172    fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self;
10173    #[allow(rustdoc::invalid_html_tags)]
10174    #[doc = "Optional. Contact's last name"]
10175    #[allow(clippy::needless_lifetimes)]
10176    fn get_last_name<'a>(&'a self) -> Option<&'a str>;
10177    #[allow(rustdoc::invalid_html_tags)]
10178    #[doc = "Optional. Contact's last name"]
10179    #[allow(clippy::needless_lifetimes)]
10180    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self;
10181    #[allow(rustdoc::invalid_html_tags)]
10182    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
10183    #[allow(clippy::needless_lifetimes)]
10184    fn get_vcard<'a>(&'a self) -> Option<&'a str>;
10185    #[allow(rustdoc::invalid_html_tags)]
10186    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
10187    #[allow(clippy::needless_lifetimes)]
10188    fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self;
10189}
10190#[allow(dead_code)]
10191trait TraitReplyParameters {
10192    #[allow(rustdoc::invalid_html_tags)]
10193    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
10194    #[allow(clippy::needless_lifetimes)]
10195    fn get_message_id<'a>(&'a self) -> i64;
10196    #[allow(rustdoc::invalid_html_tags)]
10197    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
10198    #[allow(clippy::needless_lifetimes)]
10199    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self;
10200    #[allow(rustdoc::invalid_html_tags)]
10201    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
10202    #[allow(clippy::needless_lifetimes)]
10203    fn get_chat_id<'a>(&'a self) -> Option<&'a ChatHandle>;
10204    #[allow(rustdoc::invalid_html_tags)]
10205    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
10206    #[allow(clippy::needless_lifetimes)]
10207    fn set_chat_id<'a>(&'a mut self, chat_id: Option<ChatHandle>) -> &'a mut Self;
10208    #[allow(rustdoc::invalid_html_tags)]
10209    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
10210    #[allow(clippy::needless_lifetimes)]
10211    fn get_allow_sending_without_reply<'a>(&'a self) -> Option<bool>;
10212    #[allow(rustdoc::invalid_html_tags)]
10213    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
10214    #[allow(clippy::needless_lifetimes)]
10215    fn set_allow_sending_without_reply<'a>(
10216        &'a mut self,
10217        allow_sending_without_reply: Option<bool>,
10218    ) -> &'a mut Self;
10219    #[allow(rustdoc::invalid_html_tags)]
10220    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
10221    #[allow(clippy::needless_lifetimes)]
10222    fn get_quote<'a>(&'a self) -> Option<&'a str>;
10223    #[allow(rustdoc::invalid_html_tags)]
10224    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
10225    #[allow(clippy::needless_lifetimes)]
10226    fn set_quote<'a>(&'a mut self, quote: Option<String>) -> &'a mut Self;
10227    #[allow(rustdoc::invalid_html_tags)]
10228    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
10229    #[allow(clippy::needless_lifetimes)]
10230    fn get_quote_parse_mode<'a>(&'a self) -> Option<&'a str>;
10231    #[allow(rustdoc::invalid_html_tags)]
10232    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
10233    #[allow(clippy::needless_lifetimes)]
10234    fn set_quote_parse_mode<'a>(&'a mut self, quote_parse_mode: Option<String>) -> &'a mut Self;
10235    #[allow(rustdoc::invalid_html_tags)]
10236    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
10237    #[allow(clippy::needless_lifetimes)]
10238    fn get_quote_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
10239    #[allow(rustdoc::invalid_html_tags)]
10240    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
10241    #[allow(clippy::needless_lifetimes)]
10242    fn set_quote_entities<'a>(
10243        &'a mut self,
10244        quote_entities: Option<Vec<MessageEntity>>,
10245    ) -> &'a mut Self;
10246    #[allow(rustdoc::invalid_html_tags)]
10247    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
10248    #[allow(clippy::needless_lifetimes)]
10249    fn get_quote_position<'a>(&'a self) -> Option<i64>;
10250    #[allow(rustdoc::invalid_html_tags)]
10251    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
10252    #[allow(clippy::needless_lifetimes)]
10253    fn set_quote_position<'a>(&'a mut self, quote_position: Option<i64>) -> &'a mut Self;
10254    #[allow(rustdoc::invalid_html_tags)]
10255    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
10256    #[allow(clippy::needless_lifetimes)]
10257    fn get_checklist_task_id<'a>(&'a self) -> Option<i64>;
10258    #[allow(rustdoc::invalid_html_tags)]
10259    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
10260    #[allow(clippy::needless_lifetimes)]
10261    fn set_checklist_task_id<'a>(&'a mut self, checklist_task_id: Option<i64>) -> &'a mut Self;
10262}
10263#[allow(dead_code)]
10264trait TraitInputMediaDocument {
10265    #[allow(rustdoc::invalid_html_tags)]
10266    #[doc = "Type of the result, must be document"]
10267    #[allow(clippy::needless_lifetimes)]
10268    fn get_tg_type<'a>(&'a self) -> &'a str;
10269    #[allow(rustdoc::invalid_html_tags)]
10270    #[doc = "Type of the result, must be document"]
10271    #[allow(clippy::needless_lifetimes)]
10272    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
10273    #[allow(rustdoc::invalid_html_tags)]
10274    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
10275    #[allow(clippy::needless_lifetimes)]
10276    fn get_media<'a>(&'a self) -> &'a Option<InputFile>;
10277    #[allow(rustdoc::invalid_html_tags)]
10278    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
10279    #[allow(clippy::needless_lifetimes)]
10280    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self;
10281    #[allow(rustdoc::invalid_html_tags)]
10282    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
10283    #[allow(clippy::needless_lifetimes)]
10284    fn get_thumbnail<'a>(&'a self) -> Option<&'a str>;
10285    #[allow(rustdoc::invalid_html_tags)]
10286    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
10287    #[allow(clippy::needless_lifetimes)]
10288    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self;
10289    #[allow(rustdoc::invalid_html_tags)]
10290    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
10291    #[allow(clippy::needless_lifetimes)]
10292    fn get_caption<'a>(&'a self) -> Option<&'a str>;
10293    #[allow(rustdoc::invalid_html_tags)]
10294    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
10295    #[allow(clippy::needless_lifetimes)]
10296    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
10297    #[allow(rustdoc::invalid_html_tags)]
10298    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
10299    #[allow(clippy::needless_lifetimes)]
10300    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
10301    #[allow(rustdoc::invalid_html_tags)]
10302    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
10303    #[allow(clippy::needless_lifetimes)]
10304    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
10305    #[allow(rustdoc::invalid_html_tags)]
10306    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
10307    #[allow(clippy::needless_lifetimes)]
10308    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
10309    #[allow(rustdoc::invalid_html_tags)]
10310    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
10311    #[allow(clippy::needless_lifetimes)]
10312    fn set_caption_entities<'a>(
10313        &'a mut self,
10314        caption_entities: Option<Vec<MessageEntity>>,
10315    ) -> &'a mut Self;
10316    #[allow(rustdoc::invalid_html_tags)]
10317    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
10318    #[allow(clippy::needless_lifetimes)]
10319    fn get_disable_content_type_detection<'a>(&'a self) -> Option<bool>;
10320    #[allow(rustdoc::invalid_html_tags)]
10321    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
10322    #[allow(clippy::needless_lifetimes)]
10323    fn set_disable_content_type_detection<'a>(
10324        &'a mut self,
10325        disable_content_type_detection: Option<bool>,
10326    ) -> &'a mut Self;
10327}
10328#[allow(dead_code)]
10329trait TraitBusinessIntro {
10330    #[allow(rustdoc::invalid_html_tags)]
10331    #[doc = "Optional. Title text of the business intro"]
10332    #[allow(clippy::needless_lifetimes)]
10333    fn get_title<'a>(&'a self) -> Option<&'a str>;
10334    #[allow(rustdoc::invalid_html_tags)]
10335    #[doc = "Optional. Title text of the business intro"]
10336    #[allow(clippy::needless_lifetimes)]
10337    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
10338    #[allow(rustdoc::invalid_html_tags)]
10339    #[doc = "Optional. Message text of the business intro"]
10340    #[allow(clippy::needless_lifetimes)]
10341    fn get_message<'a>(&'a self) -> Option<&'a str>;
10342    #[allow(rustdoc::invalid_html_tags)]
10343    #[doc = "Optional. Message text of the business intro"]
10344    #[allow(clippy::needless_lifetimes)]
10345    fn set_message<'a>(&'a mut self, message: Option<String>) -> &'a mut Self;
10346    #[allow(rustdoc::invalid_html_tags)]
10347    #[doc = "Optional. Sticker of the business intro"]
10348    #[allow(clippy::needless_lifetimes)]
10349    fn get_sticker<'a>(&'a self) -> Option<&'a Sticker>;
10350    #[allow(rustdoc::invalid_html_tags)]
10351    #[doc = "Optional. Sticker of the business intro"]
10352    #[allow(clippy::needless_lifetimes)]
10353    fn set_sticker<'a>(&'a mut self, sticker: Option<Sticker>) -> &'a mut Self;
10354}
10355#[allow(dead_code)]
10356trait TraitGiveawayCreated {
10357    #[allow(rustdoc::invalid_html_tags)]
10358    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
10359    #[allow(clippy::needless_lifetimes)]
10360    fn get_prize_star_count<'a>(&'a self) -> Option<i64>;
10361    #[allow(rustdoc::invalid_html_tags)]
10362    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
10363    #[allow(clippy::needless_lifetimes)]
10364    fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self;
10365}
10366#[allow(dead_code)]
10367trait TraitInputProfilePhoto: TraitInputProfilePhotoStatic + TraitInputProfilePhotoAnimated {}
10368#[allow(dead_code)]
10369trait TraitChatMemberAdministrator {
10370    #[allow(rustdoc::invalid_html_tags)]
10371    #[doc = "Information about the user"]
10372    #[allow(clippy::needless_lifetimes)]
10373    fn get_user<'a>(&'a self) -> &'a User;
10374    #[allow(rustdoc::invalid_html_tags)]
10375    #[doc = "Information about the user"]
10376    #[allow(clippy::needless_lifetimes)]
10377    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
10378    #[allow(rustdoc::invalid_html_tags)]
10379    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
10380    #[allow(clippy::needless_lifetimes)]
10381    fn get_can_be_edited<'a>(&'a self) -> bool;
10382    #[allow(rustdoc::invalid_html_tags)]
10383    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
10384    #[allow(clippy::needless_lifetimes)]
10385    fn set_can_be_edited<'a>(&'a mut self, can_be_edited: bool) -> &'a mut Self;
10386    #[allow(rustdoc::invalid_html_tags)]
10387    #[doc = "True, if the user's presence in the chat is hidden"]
10388    #[allow(clippy::needless_lifetimes)]
10389    fn get_is_anonymous<'a>(&'a self) -> bool;
10390    #[allow(rustdoc::invalid_html_tags)]
10391    #[doc = "True, if the user's presence in the chat is hidden"]
10392    #[allow(clippy::needless_lifetimes)]
10393    fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self;
10394    #[allow(rustdoc::invalid_html_tags)]
10395    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
10396    #[allow(clippy::needless_lifetimes)]
10397    fn get_can_manage_chat<'a>(&'a self) -> bool;
10398    #[allow(rustdoc::invalid_html_tags)]
10399    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
10400    #[allow(clippy::needless_lifetimes)]
10401    fn set_can_manage_chat<'a>(&'a mut self, can_manage_chat: bool) -> &'a mut Self;
10402    #[allow(rustdoc::invalid_html_tags)]
10403    #[doc = "True, if the administrator can delete messages of other users"]
10404    #[allow(clippy::needless_lifetimes)]
10405    fn get_can_delete_messages<'a>(&'a self) -> bool;
10406    #[allow(rustdoc::invalid_html_tags)]
10407    #[doc = "True, if the administrator can delete messages of other users"]
10408    #[allow(clippy::needless_lifetimes)]
10409    fn set_can_delete_messages<'a>(&'a mut self, can_delete_messages: bool) -> &'a mut Self;
10410    #[allow(rustdoc::invalid_html_tags)]
10411    #[doc = "True, if the administrator can manage video chats"]
10412    #[allow(clippy::needless_lifetimes)]
10413    fn get_can_manage_video_chats<'a>(&'a self) -> bool;
10414    #[allow(rustdoc::invalid_html_tags)]
10415    #[doc = "True, if the administrator can manage video chats"]
10416    #[allow(clippy::needless_lifetimes)]
10417    fn set_can_manage_video_chats<'a>(&'a mut self, can_manage_video_chats: bool) -> &'a mut Self;
10418    #[allow(rustdoc::invalid_html_tags)]
10419    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
10420    #[allow(clippy::needless_lifetimes)]
10421    fn get_can_restrict_members<'a>(&'a self) -> bool;
10422    #[allow(rustdoc::invalid_html_tags)]
10423    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
10424    #[allow(clippy::needless_lifetimes)]
10425    fn set_can_restrict_members<'a>(&'a mut self, can_restrict_members: bool) -> &'a mut Self;
10426    #[allow(rustdoc::invalid_html_tags)]
10427    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
10428    #[allow(clippy::needless_lifetimes)]
10429    fn get_can_promote_members<'a>(&'a self) -> bool;
10430    #[allow(rustdoc::invalid_html_tags)]
10431    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
10432    #[allow(clippy::needless_lifetimes)]
10433    fn set_can_promote_members<'a>(&'a mut self, can_promote_members: bool) -> &'a mut Self;
10434    #[allow(rustdoc::invalid_html_tags)]
10435    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
10436    #[allow(clippy::needless_lifetimes)]
10437    fn get_can_change_info<'a>(&'a self) -> bool;
10438    #[allow(rustdoc::invalid_html_tags)]
10439    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
10440    #[allow(clippy::needless_lifetimes)]
10441    fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self;
10442    #[allow(rustdoc::invalid_html_tags)]
10443    #[doc = "True, if the user is allowed to invite new users to the chat"]
10444    #[allow(clippy::needless_lifetimes)]
10445    fn get_can_invite_users<'a>(&'a self) -> bool;
10446    #[allow(rustdoc::invalid_html_tags)]
10447    #[doc = "True, if the user is allowed to invite new users to the chat"]
10448    #[allow(clippy::needless_lifetimes)]
10449    fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self;
10450    #[allow(rustdoc::invalid_html_tags)]
10451    #[doc = "True, if the administrator can post stories to the chat"]
10452    #[allow(clippy::needless_lifetimes)]
10453    fn get_can_post_stories<'a>(&'a self) -> bool;
10454    #[allow(rustdoc::invalid_html_tags)]
10455    #[doc = "True, if the administrator can post stories to the chat"]
10456    #[allow(clippy::needless_lifetimes)]
10457    fn set_can_post_stories<'a>(&'a mut self, can_post_stories: bool) -> &'a mut Self;
10458    #[allow(rustdoc::invalid_html_tags)]
10459    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
10460    #[allow(clippy::needless_lifetimes)]
10461    fn get_can_edit_stories<'a>(&'a self) -> bool;
10462    #[allow(rustdoc::invalid_html_tags)]
10463    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
10464    #[allow(clippy::needless_lifetimes)]
10465    fn set_can_edit_stories<'a>(&'a mut self, can_edit_stories: bool) -> &'a mut Self;
10466    #[allow(rustdoc::invalid_html_tags)]
10467    #[doc = "True, if the administrator can delete stories posted by other users"]
10468    #[allow(clippy::needless_lifetimes)]
10469    fn get_can_delete_stories<'a>(&'a self) -> bool;
10470    #[allow(rustdoc::invalid_html_tags)]
10471    #[doc = "True, if the administrator can delete stories posted by other users"]
10472    #[allow(clippy::needless_lifetimes)]
10473    fn set_can_delete_stories<'a>(&'a mut self, can_delete_stories: bool) -> &'a mut Self;
10474    #[allow(rustdoc::invalid_html_tags)]
10475    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
10476    #[allow(clippy::needless_lifetimes)]
10477    fn get_can_post_messages<'a>(&'a self) -> Option<bool>;
10478    #[allow(rustdoc::invalid_html_tags)]
10479    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
10480    #[allow(clippy::needless_lifetimes)]
10481    fn set_can_post_messages<'a>(&'a mut self, can_post_messages: Option<bool>) -> &'a mut Self;
10482    #[allow(rustdoc::invalid_html_tags)]
10483    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
10484    #[allow(clippy::needless_lifetimes)]
10485    fn get_can_edit_messages<'a>(&'a self) -> Option<bool>;
10486    #[allow(rustdoc::invalid_html_tags)]
10487    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
10488    #[allow(clippy::needless_lifetimes)]
10489    fn set_can_edit_messages<'a>(&'a mut self, can_edit_messages: Option<bool>) -> &'a mut Self;
10490    #[allow(rustdoc::invalid_html_tags)]
10491    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
10492    #[allow(clippy::needless_lifetimes)]
10493    fn get_can_pin_messages<'a>(&'a self) -> Option<bool>;
10494    #[allow(rustdoc::invalid_html_tags)]
10495    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
10496    #[allow(clippy::needless_lifetimes)]
10497    fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: Option<bool>) -> &'a mut Self;
10498    #[allow(rustdoc::invalid_html_tags)]
10499    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
10500    #[allow(clippy::needless_lifetimes)]
10501    fn get_can_manage_topics<'a>(&'a self) -> Option<bool>;
10502    #[allow(rustdoc::invalid_html_tags)]
10503    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
10504    #[allow(clippy::needless_lifetimes)]
10505    fn set_can_manage_topics<'a>(&'a mut self, can_manage_topics: Option<bool>) -> &'a mut Self;
10506    #[allow(rustdoc::invalid_html_tags)]
10507    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
10508    #[allow(clippy::needless_lifetimes)]
10509    fn get_can_manage_direct_messages<'a>(&'a self) -> Option<bool>;
10510    #[allow(rustdoc::invalid_html_tags)]
10511    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
10512    #[allow(clippy::needless_lifetimes)]
10513    fn set_can_manage_direct_messages<'a>(
10514        &'a mut self,
10515        can_manage_direct_messages: Option<bool>,
10516    ) -> &'a mut Self;
10517    #[allow(rustdoc::invalid_html_tags)]
10518    #[doc = "Optional. Custom title for this user"]
10519    #[allow(clippy::needless_lifetimes)]
10520    fn get_custom_title<'a>(&'a self) -> Option<&'a str>;
10521    #[allow(rustdoc::invalid_html_tags)]
10522    #[doc = "Optional. Custom title for this user"]
10523    #[allow(clippy::needless_lifetimes)]
10524    fn set_custom_title<'a>(&'a mut self, custom_title: Option<String>) -> &'a mut Self;
10525}
10526#[allow(dead_code)]
10527trait TraitInlineQueryResultGif {
10528    #[allow(rustdoc::invalid_html_tags)]
10529    #[doc = "Type of the result, must be gif"]
10530    #[allow(clippy::needless_lifetimes)]
10531    fn get_tg_type<'a>(&'a self) -> &'a str;
10532    #[allow(rustdoc::invalid_html_tags)]
10533    #[doc = "Type of the result, must be gif"]
10534    #[allow(clippy::needless_lifetimes)]
10535    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
10536    #[allow(rustdoc::invalid_html_tags)]
10537    #[doc = "Unique identifier for this result, 1-64 bytes"]
10538    #[allow(clippy::needless_lifetimes)]
10539    fn get_id<'a>(&'a self) -> &'a str;
10540    #[allow(rustdoc::invalid_html_tags)]
10541    #[doc = "Unique identifier for this result, 1-64 bytes"]
10542    #[allow(clippy::needless_lifetimes)]
10543    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
10544    #[allow(rustdoc::invalid_html_tags)]
10545    #[doc = "A valid URL for the GIF file"]
10546    #[allow(clippy::needless_lifetimes)]
10547    fn get_gif_url<'a>(&'a self) -> &'a str;
10548    #[allow(rustdoc::invalid_html_tags)]
10549    #[doc = "A valid URL for the GIF file"]
10550    #[allow(clippy::needless_lifetimes)]
10551    fn set_gif_url<'a>(&'a mut self, gif_url: String) -> &'a mut Self;
10552    #[allow(rustdoc::invalid_html_tags)]
10553    #[doc = "Optional. Width of the GIF"]
10554    #[allow(clippy::needless_lifetimes)]
10555    fn get_gif_width<'a>(&'a self) -> Option<i64>;
10556    #[allow(rustdoc::invalid_html_tags)]
10557    #[doc = "Optional. Width of the GIF"]
10558    #[allow(clippy::needless_lifetimes)]
10559    fn set_gif_width<'a>(&'a mut self, gif_width: Option<i64>) -> &'a mut Self;
10560    #[allow(rustdoc::invalid_html_tags)]
10561    #[doc = "Optional. Height of the GIF"]
10562    #[allow(clippy::needless_lifetimes)]
10563    fn get_gif_height<'a>(&'a self) -> Option<i64>;
10564    #[allow(rustdoc::invalid_html_tags)]
10565    #[doc = "Optional. Height of the GIF"]
10566    #[allow(clippy::needless_lifetimes)]
10567    fn set_gif_height<'a>(&'a mut self, gif_height: Option<i64>) -> &'a mut Self;
10568    #[allow(rustdoc::invalid_html_tags)]
10569    #[doc = "Optional. Duration of the GIF in seconds"]
10570    #[allow(clippy::needless_lifetimes)]
10571    fn get_gif_duration<'a>(&'a self) -> Option<i64>;
10572    #[allow(rustdoc::invalid_html_tags)]
10573    #[doc = "Optional. Duration of the GIF in seconds"]
10574    #[allow(clippy::needless_lifetimes)]
10575    fn set_gif_duration<'a>(&'a mut self, gif_duration: Option<i64>) -> &'a mut Self;
10576    #[allow(rustdoc::invalid_html_tags)]
10577    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
10578    #[allow(clippy::needless_lifetimes)]
10579    fn get_thumbnail_url<'a>(&'a self) -> &'a str;
10580    #[allow(rustdoc::invalid_html_tags)]
10581    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
10582    #[allow(clippy::needless_lifetimes)]
10583    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self;
10584    #[allow(rustdoc::invalid_html_tags)]
10585    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
10586    #[allow(clippy::needless_lifetimes)]
10587    fn get_thumbnail_mime_type<'a>(&'a self) -> Option<&'a str>;
10588    #[allow(rustdoc::invalid_html_tags)]
10589    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
10590    #[allow(clippy::needless_lifetimes)]
10591    fn set_thumbnail_mime_type<'a>(
10592        &'a mut self,
10593        thumbnail_mime_type: Option<String>,
10594    ) -> &'a mut Self;
10595    #[allow(rustdoc::invalid_html_tags)]
10596    #[doc = "Optional. Title for the result"]
10597    #[allow(clippy::needless_lifetimes)]
10598    fn get_title<'a>(&'a self) -> Option<&'a str>;
10599    #[allow(rustdoc::invalid_html_tags)]
10600    #[doc = "Optional. Title for the result"]
10601    #[allow(clippy::needless_lifetimes)]
10602    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
10603    #[allow(rustdoc::invalid_html_tags)]
10604    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
10605    #[allow(clippy::needless_lifetimes)]
10606    fn get_caption<'a>(&'a self) -> Option<&'a str>;
10607    #[allow(rustdoc::invalid_html_tags)]
10608    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
10609    #[allow(clippy::needless_lifetimes)]
10610    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
10611    #[allow(rustdoc::invalid_html_tags)]
10612    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
10613    #[allow(clippy::needless_lifetimes)]
10614    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
10615    #[allow(rustdoc::invalid_html_tags)]
10616    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
10617    #[allow(clippy::needless_lifetimes)]
10618    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
10619    #[allow(rustdoc::invalid_html_tags)]
10620    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
10621    #[allow(clippy::needless_lifetimes)]
10622    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
10623    #[allow(rustdoc::invalid_html_tags)]
10624    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
10625    #[allow(clippy::needless_lifetimes)]
10626    fn set_caption_entities<'a>(
10627        &'a mut self,
10628        caption_entities: Option<Vec<MessageEntity>>,
10629    ) -> &'a mut Self;
10630    #[allow(rustdoc::invalid_html_tags)]
10631    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
10632    #[allow(clippy::needless_lifetimes)]
10633    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
10634    #[allow(rustdoc::invalid_html_tags)]
10635    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
10636    #[allow(clippy::needless_lifetimes)]
10637    fn set_show_caption_above_media<'a>(
10638        &'a mut self,
10639        show_caption_above_media: Option<bool>,
10640    ) -> &'a mut Self;
10641    #[allow(rustdoc::invalid_html_tags)]
10642    #[doc = "Optional. Inline keyboard attached to the message"]
10643    #[allow(clippy::needless_lifetimes)]
10644    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
10645    #[allow(rustdoc::invalid_html_tags)]
10646    #[doc = "Optional. Inline keyboard attached to the message"]
10647    #[allow(clippy::needless_lifetimes)]
10648    fn set_reply_markup<'a>(
10649        &'a mut self,
10650        reply_markup: Option<InlineKeyboardMarkup>,
10651    ) -> &'a mut Self;
10652    #[allow(rustdoc::invalid_html_tags)]
10653    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
10654    #[allow(clippy::needless_lifetimes)]
10655    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
10656    #[allow(rustdoc::invalid_html_tags)]
10657    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
10658    #[allow(clippy::needless_lifetimes)]
10659    fn set_input_message_content<'a>(
10660        &'a mut self,
10661        input_message_content: Option<InputMessageContent>,
10662    ) -> &'a mut Self;
10663}
10664#[allow(dead_code)]
10665trait TraitInputProfilePhotoAnimated {
10666    #[allow(rustdoc::invalid_html_tags)]
10667    #[doc = "Type of the profile photo, must be animated"]
10668    #[allow(clippy::needless_lifetimes)]
10669    fn get_tg_type<'a>(&'a self) -> &'a str;
10670    #[allow(rustdoc::invalid_html_tags)]
10671    #[doc = "Type of the profile photo, must be animated"]
10672    #[allow(clippy::needless_lifetimes)]
10673    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
10674    #[allow(rustdoc::invalid_html_tags)]
10675    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
10676    #[allow(clippy::needless_lifetimes)]
10677    fn get_animation<'a>(&'a self) -> &'a str;
10678    #[allow(rustdoc::invalid_html_tags)]
10679    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
10680    #[allow(clippy::needless_lifetimes)]
10681    fn set_animation<'a>(&'a mut self, animation: String) -> &'a mut Self;
10682    #[allow(rustdoc::invalid_html_tags)]
10683    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
10684    #[allow(clippy::needless_lifetimes)]
10685    fn get_main_frame_timestamp<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>>;
10686    #[allow(rustdoc::invalid_html_tags)]
10687    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
10688    #[allow(clippy::needless_lifetimes)]
10689    fn set_main_frame_timestamp<'a>(
10690        &'a mut self,
10691        main_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
10692    ) -> &'a mut Self;
10693}
10694#[allow(dead_code)]
10695trait TraitVideoChatParticipantsInvited {
10696    #[allow(rustdoc::invalid_html_tags)]
10697    #[doc = "New members that were invited to the video chat"]
10698    #[allow(clippy::needless_lifetimes)]
10699    fn get_users<'a>(&'a self) -> &'a Vec<User>;
10700    #[allow(rustdoc::invalid_html_tags)]
10701    #[doc = "New members that were invited to the video chat"]
10702    #[allow(clippy::needless_lifetimes)]
10703    fn set_users<'a>(&'a mut self, users: Vec<User>) -> &'a mut Self;
10704}
10705#[allow(dead_code)]
10706trait TraitLoginUrl {
10707    #[allow(rustdoc::invalid_html_tags)]
10708    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
10709    #[allow(clippy::needless_lifetimes)]
10710    fn get_url<'a>(&'a self) -> &'a str;
10711    #[allow(rustdoc::invalid_html_tags)]
10712    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
10713    #[allow(clippy::needless_lifetimes)]
10714    fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self;
10715    #[allow(rustdoc::invalid_html_tags)]
10716    #[doc = "Optional. New text of the button in forwarded messages."]
10717    #[allow(clippy::needless_lifetimes)]
10718    fn get_forward_text<'a>(&'a self) -> Option<&'a str>;
10719    #[allow(rustdoc::invalid_html_tags)]
10720    #[doc = "Optional. New text of the button in forwarded messages."]
10721    #[allow(clippy::needless_lifetimes)]
10722    fn set_forward_text<'a>(&'a mut self, forward_text: Option<String>) -> &'a mut Self;
10723    #[allow(rustdoc::invalid_html_tags)]
10724    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
10725    #[allow(clippy::needless_lifetimes)]
10726    fn get_bot_username<'a>(&'a self) -> Option<&'a str>;
10727    #[allow(rustdoc::invalid_html_tags)]
10728    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
10729    #[allow(clippy::needless_lifetimes)]
10730    fn set_bot_username<'a>(&'a mut self, bot_username: Option<String>) -> &'a mut Self;
10731    #[allow(rustdoc::invalid_html_tags)]
10732    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
10733    #[allow(clippy::needless_lifetimes)]
10734    fn get_request_write_access<'a>(&'a self) -> Option<bool>;
10735    #[allow(rustdoc::invalid_html_tags)]
10736    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
10737    #[allow(clippy::needless_lifetimes)]
10738    fn set_request_write_access<'a>(
10739        &'a mut self,
10740        request_write_access: Option<bool>,
10741    ) -> &'a mut Self;
10742}
10743#[allow(dead_code)]
10744trait TraitChosenInlineResult {
10745    #[allow(rustdoc::invalid_html_tags)]
10746    #[doc = "The unique identifier for the result that was chosen"]
10747    #[allow(clippy::needless_lifetimes)]
10748    fn get_result_id<'a>(&'a self) -> &'a str;
10749    #[allow(rustdoc::invalid_html_tags)]
10750    #[doc = "The unique identifier for the result that was chosen"]
10751    #[allow(clippy::needless_lifetimes)]
10752    fn set_result_id<'a>(&'a mut self, result_id: String) -> &'a mut Self;
10753    #[allow(rustdoc::invalid_html_tags)]
10754    #[doc = "The user that chose the result"]
10755    #[allow(clippy::needless_lifetimes)]
10756    fn get_from<'a>(&'a self) -> &'a User;
10757    #[allow(rustdoc::invalid_html_tags)]
10758    #[doc = "The user that chose the result"]
10759    #[allow(clippy::needless_lifetimes)]
10760    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
10761    #[allow(rustdoc::invalid_html_tags)]
10762    #[doc = "Optional. Sender location, only for bots that require user location"]
10763    #[allow(clippy::needless_lifetimes)]
10764    fn get_location<'a>(&'a self) -> Option<&'a Location>;
10765    #[allow(rustdoc::invalid_html_tags)]
10766    #[doc = "Optional. Sender location, only for bots that require user location"]
10767    #[allow(clippy::needless_lifetimes)]
10768    fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self;
10769    #[allow(rustdoc::invalid_html_tags)]
10770    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
10771    #[allow(clippy::needless_lifetimes)]
10772    fn get_inline_message_id<'a>(&'a self) -> Option<&'a str>;
10773    #[allow(rustdoc::invalid_html_tags)]
10774    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
10775    #[allow(clippy::needless_lifetimes)]
10776    fn set_inline_message_id<'a>(&'a mut self, inline_message_id: Option<String>) -> &'a mut Self;
10777    #[allow(rustdoc::invalid_html_tags)]
10778    #[doc = "The query that was used to obtain the result"]
10779    #[allow(clippy::needless_lifetimes)]
10780    fn get_query<'a>(&'a self) -> &'a str;
10781    #[allow(rustdoc::invalid_html_tags)]
10782    #[doc = "The query that was used to obtain the result"]
10783    #[allow(clippy::needless_lifetimes)]
10784    fn set_query<'a>(&'a mut self, query: String) -> &'a mut Self;
10785}
10786#[allow(dead_code)]
10787trait TraitPassportElementErrorUnspecified {
10788    #[allow(rustdoc::invalid_html_tags)]
10789    #[doc = "Error source, must be unspecified"]
10790    #[allow(clippy::needless_lifetimes)]
10791    fn get_source<'a>(&'a self) -> &'a str;
10792    #[allow(rustdoc::invalid_html_tags)]
10793    #[doc = "Error source, must be unspecified"]
10794    #[allow(clippy::needless_lifetimes)]
10795    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
10796    #[allow(rustdoc::invalid_html_tags)]
10797    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
10798    #[allow(clippy::needless_lifetimes)]
10799    fn get_tg_type<'a>(&'a self) -> &'a str;
10800    #[allow(rustdoc::invalid_html_tags)]
10801    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
10802    #[allow(clippy::needless_lifetimes)]
10803    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
10804    #[allow(rustdoc::invalid_html_tags)]
10805    #[doc = "Base64-encoded element hash"]
10806    #[allow(clippy::needless_lifetimes)]
10807    fn get_element_hash<'a>(&'a self) -> &'a str;
10808    #[allow(rustdoc::invalid_html_tags)]
10809    #[doc = "Base64-encoded element hash"]
10810    #[allow(clippy::needless_lifetimes)]
10811    fn set_element_hash<'a>(&'a mut self, element_hash: String) -> &'a mut Self;
10812    #[allow(rustdoc::invalid_html_tags)]
10813    #[doc = "Error message"]
10814    #[allow(clippy::needless_lifetimes)]
10815    fn get_message<'a>(&'a self) -> &'a str;
10816    #[allow(rustdoc::invalid_html_tags)]
10817    #[doc = "Error message"]
10818    #[allow(clippy::needless_lifetimes)]
10819    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
10820}
10821#[allow(dead_code)]
10822trait TraitMenuButtonWebApp {
10823    #[allow(rustdoc::invalid_html_tags)]
10824    #[doc = "Type of the button, must be web_app"]
10825    #[allow(clippy::needless_lifetimes)]
10826    fn get_tg_type<'a>(&'a self) -> &'a str;
10827    #[allow(rustdoc::invalid_html_tags)]
10828    #[doc = "Type of the button, must be web_app"]
10829    #[allow(clippy::needless_lifetimes)]
10830    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
10831    #[allow(rustdoc::invalid_html_tags)]
10832    #[doc = "Text on the button"]
10833    #[allow(clippy::needless_lifetimes)]
10834    fn get_text<'a>(&'a self) -> &'a str;
10835    #[allow(rustdoc::invalid_html_tags)]
10836    #[doc = "Text on the button"]
10837    #[allow(clippy::needless_lifetimes)]
10838    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
10839    #[allow(rustdoc::invalid_html_tags)]
10840    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
10841    #[allow(clippy::needless_lifetimes)]
10842    fn get_web_app<'a>(&'a self) -> &'a WebAppInfo;
10843    #[allow(rustdoc::invalid_html_tags)]
10844    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
10845    #[allow(clippy::needless_lifetimes)]
10846    fn set_web_app<'a>(&'a mut self, web_app: WebAppInfo) -> &'a mut Self;
10847}
10848#[allow(dead_code)]
10849trait TraitUserChatBoosts {
10850    #[allow(rustdoc::invalid_html_tags)]
10851    #[doc = "The list of boosts added to the chat by the user"]
10852    #[allow(clippy::needless_lifetimes)]
10853    fn get_boosts<'a>(&'a self) -> &'a Vec<ChatBoost>;
10854    #[allow(rustdoc::invalid_html_tags)]
10855    #[doc = "The list of boosts added to the chat by the user"]
10856    #[allow(clippy::needless_lifetimes)]
10857    fn set_boosts<'a>(&'a mut self, boosts: Vec<ChatBoost>) -> &'a mut Self;
10858}
10859#[allow(dead_code)]
10860trait TraitGiftInfo {
10861    #[allow(rustdoc::invalid_html_tags)]
10862    #[doc = "Information about the gift"]
10863    #[allow(clippy::needless_lifetimes)]
10864    fn get_gift<'a>(&'a self) -> &'a Gift;
10865    #[allow(rustdoc::invalid_html_tags)]
10866    #[doc = "Information about the gift"]
10867    #[allow(clippy::needless_lifetimes)]
10868    fn set_gift<'a>(&'a mut self, gift: Gift) -> &'a mut Self;
10869    #[allow(rustdoc::invalid_html_tags)]
10870    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
10871    #[allow(clippy::needless_lifetimes)]
10872    fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str>;
10873    #[allow(rustdoc::invalid_html_tags)]
10874    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
10875    #[allow(clippy::needless_lifetimes)]
10876    fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self;
10877    #[allow(rustdoc::invalid_html_tags)]
10878    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
10879    #[allow(clippy::needless_lifetimes)]
10880    fn get_convert_star_count<'a>(&'a self) -> Option<i64>;
10881    #[allow(rustdoc::invalid_html_tags)]
10882    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
10883    #[allow(clippy::needless_lifetimes)]
10884    fn set_convert_star_count<'a>(&'a mut self, convert_star_count: Option<i64>) -> &'a mut Self;
10885    #[allow(rustdoc::invalid_html_tags)]
10886    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
10887    #[allow(clippy::needless_lifetimes)]
10888    fn get_prepaid_upgrade_star_count<'a>(&'a self) -> Option<i64>;
10889    #[allow(rustdoc::invalid_html_tags)]
10890    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
10891    #[allow(clippy::needless_lifetimes)]
10892    fn set_prepaid_upgrade_star_count<'a>(
10893        &'a mut self,
10894        prepaid_upgrade_star_count: Option<i64>,
10895    ) -> &'a mut Self;
10896    #[allow(rustdoc::invalid_html_tags)]
10897    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
10898    #[allow(clippy::needless_lifetimes)]
10899    fn get_can_be_upgraded<'a>(&'a self) -> Option<bool>;
10900    #[allow(rustdoc::invalid_html_tags)]
10901    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
10902    #[allow(clippy::needless_lifetimes)]
10903    fn set_can_be_upgraded<'a>(&'a mut self, can_be_upgraded: Option<bool>) -> &'a mut Self;
10904    #[allow(rustdoc::invalid_html_tags)]
10905    #[doc = "Optional. Text of the message that was added to the gift"]
10906    #[allow(clippy::needless_lifetimes)]
10907    fn get_text<'a>(&'a self) -> Option<&'a str>;
10908    #[allow(rustdoc::invalid_html_tags)]
10909    #[doc = "Optional. Text of the message that was added to the gift"]
10910    #[allow(clippy::needless_lifetimes)]
10911    fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self;
10912    #[allow(rustdoc::invalid_html_tags)]
10913    #[doc = "Optional. Special entities that appear in the text"]
10914    #[allow(clippy::needless_lifetimes)]
10915    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
10916    #[allow(rustdoc::invalid_html_tags)]
10917    #[doc = "Optional. Special entities that appear in the text"]
10918    #[allow(clippy::needless_lifetimes)]
10919    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self;
10920    #[allow(rustdoc::invalid_html_tags)]
10921    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
10922    #[allow(clippy::needless_lifetimes)]
10923    fn get_is_private<'a>(&'a self) -> Option<bool>;
10924    #[allow(rustdoc::invalid_html_tags)]
10925    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
10926    #[allow(clippy::needless_lifetimes)]
10927    fn set_is_private<'a>(&'a mut self, is_private: Option<bool>) -> &'a mut Self;
10928}
10929#[allow(dead_code)]
10930trait TraitShippingAddress {
10931    #[allow(rustdoc::invalid_html_tags)]
10932    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
10933    #[allow(clippy::needless_lifetimes)]
10934    fn get_country_code<'a>(&'a self) -> &'a str;
10935    #[allow(rustdoc::invalid_html_tags)]
10936    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
10937    #[allow(clippy::needless_lifetimes)]
10938    fn set_country_code<'a>(&'a mut self, country_code: String) -> &'a mut Self;
10939    #[allow(rustdoc::invalid_html_tags)]
10940    #[doc = "State, if applicable"]
10941    #[allow(clippy::needless_lifetimes)]
10942    fn get_state<'a>(&'a self) -> &'a str;
10943    #[allow(rustdoc::invalid_html_tags)]
10944    #[doc = "State, if applicable"]
10945    #[allow(clippy::needless_lifetimes)]
10946    fn set_state<'a>(&'a mut self, state: String) -> &'a mut Self;
10947    #[allow(rustdoc::invalid_html_tags)]
10948    #[doc = "City"]
10949    #[allow(clippy::needless_lifetimes)]
10950    fn get_city<'a>(&'a self) -> &'a str;
10951    #[allow(rustdoc::invalid_html_tags)]
10952    #[doc = "City"]
10953    #[allow(clippy::needless_lifetimes)]
10954    fn set_city<'a>(&'a mut self, city: String) -> &'a mut Self;
10955    #[allow(rustdoc::invalid_html_tags)]
10956    #[doc = "First line for the address"]
10957    #[allow(clippy::needless_lifetimes)]
10958    fn get_street_line_1<'a>(&'a self) -> &'a str;
10959    #[allow(rustdoc::invalid_html_tags)]
10960    #[doc = "First line for the address"]
10961    #[allow(clippy::needless_lifetimes)]
10962    fn set_street_line_1<'a>(&'a mut self, street_line_1: String) -> &'a mut Self;
10963    #[allow(rustdoc::invalid_html_tags)]
10964    #[doc = "Second line for the address"]
10965    #[allow(clippy::needless_lifetimes)]
10966    fn get_street_line_2<'a>(&'a self) -> &'a str;
10967    #[allow(rustdoc::invalid_html_tags)]
10968    #[doc = "Second line for the address"]
10969    #[allow(clippy::needless_lifetimes)]
10970    fn set_street_line_2<'a>(&'a mut self, street_line_2: String) -> &'a mut Self;
10971    #[allow(rustdoc::invalid_html_tags)]
10972    #[doc = "Address post code"]
10973    #[allow(clippy::needless_lifetimes)]
10974    fn get_post_code<'a>(&'a self) -> &'a str;
10975    #[allow(rustdoc::invalid_html_tags)]
10976    #[doc = "Address post code"]
10977    #[allow(clippy::needless_lifetimes)]
10978    fn set_post_code<'a>(&'a mut self, post_code: String) -> &'a mut Self;
10979}
10980#[allow(dead_code)]
10981trait TraitMessageAutoDeleteTimerChanged {
10982    #[allow(rustdoc::invalid_html_tags)]
10983    #[doc = "New auto-delete time for messages in the chat; in seconds"]
10984    #[allow(clippy::needless_lifetimes)]
10985    fn get_message_auto_delete_time<'a>(&'a self) -> i64;
10986    #[allow(rustdoc::invalid_html_tags)]
10987    #[doc = "New auto-delete time for messages in the chat; in seconds"]
10988    #[allow(clippy::needless_lifetimes)]
10989    fn set_message_auto_delete_time<'a>(
10990        &'a mut self,
10991        message_auto_delete_time: i64,
10992    ) -> &'a mut Self;
10993}
10994#[allow(dead_code)]
10995trait TraitBackgroundFill:
10996    TraitBackgroundFillSolid + TraitBackgroundFillGradient + TraitBackgroundFillFreeformGradient
10997{
10998}
10999#[allow(dead_code)]
11000trait TraitInlineQueryResultsButton {
11001    #[allow(rustdoc::invalid_html_tags)]
11002    #[doc = "Label text on the button"]
11003    #[allow(clippy::needless_lifetimes)]
11004    fn get_text<'a>(&'a self) -> &'a str;
11005    #[allow(rustdoc::invalid_html_tags)]
11006    #[doc = "Label text on the button"]
11007    #[allow(clippy::needless_lifetimes)]
11008    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
11009    #[allow(rustdoc::invalid_html_tags)]
11010    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
11011    #[allow(clippy::needless_lifetimes)]
11012    fn get_web_app<'a>(&'a self) -> Option<&'a WebAppInfo>;
11013    #[allow(rustdoc::invalid_html_tags)]
11014    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
11015    #[allow(clippy::needless_lifetimes)]
11016    fn set_web_app<'a>(&'a mut self, web_app: Option<WebAppInfo>) -> &'a mut Self;
11017    #[allow(rustdoc::invalid_html_tags)]
11018    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
11019    #[allow(clippy::needless_lifetimes)]
11020    fn get_start_parameter<'a>(&'a self) -> Option<&'a str>;
11021    #[allow(rustdoc::invalid_html_tags)]
11022    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
11023    #[allow(clippy::needless_lifetimes)]
11024    fn set_start_parameter<'a>(&'a mut self, start_parameter: Option<String>) -> &'a mut Self;
11025}
11026#[allow(dead_code)]
11027trait TraitBackgroundFillSolid {
11028    #[allow(rustdoc::invalid_html_tags)]
11029    #[doc = "Type of the background fill, always \"solid\""]
11030    #[allow(clippy::needless_lifetimes)]
11031    fn get_tg_type<'a>(&'a self) -> &'a str;
11032    #[allow(rustdoc::invalid_html_tags)]
11033    #[doc = "Type of the background fill, always \"solid\""]
11034    #[allow(clippy::needless_lifetimes)]
11035    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11036    #[allow(rustdoc::invalid_html_tags)]
11037    #[doc = "The color of the background fill in the RGB24 format"]
11038    #[allow(clippy::needless_lifetimes)]
11039    fn get_color<'a>(&'a self) -> i64;
11040    #[allow(rustdoc::invalid_html_tags)]
11041    #[doc = "The color of the background fill in the RGB24 format"]
11042    #[allow(clippy::needless_lifetimes)]
11043    fn set_color<'a>(&'a mut self, color: i64) -> &'a mut Self;
11044}
11045#[allow(dead_code)]
11046trait TraitBotCommandScopeAllGroupChats {
11047    #[allow(rustdoc::invalid_html_tags)]
11048    #[doc = "Scope type, must be all_group_chats"]
11049    #[allow(clippy::needless_lifetimes)]
11050    fn get_tg_type<'a>(&'a self) -> &'a str;
11051    #[allow(rustdoc::invalid_html_tags)]
11052    #[doc = "Scope type, must be all_group_chats"]
11053    #[allow(clippy::needless_lifetimes)]
11054    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11055}
11056#[allow(dead_code)]
11057trait TraitChatBoostUpdated {
11058    #[allow(rustdoc::invalid_html_tags)]
11059    #[doc = "Chat which was boosted"]
11060    #[allow(clippy::needless_lifetimes)]
11061    fn get_chat<'a>(&'a self) -> &'a Chat;
11062    #[allow(rustdoc::invalid_html_tags)]
11063    #[doc = "Chat which was boosted"]
11064    #[allow(clippy::needless_lifetimes)]
11065    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
11066    #[allow(rustdoc::invalid_html_tags)]
11067    #[doc = "Information about the chat boost"]
11068    #[allow(clippy::needless_lifetimes)]
11069    fn get_boost<'a>(&'a self) -> &'a ChatBoost;
11070    #[allow(rustdoc::invalid_html_tags)]
11071    #[doc = "Information about the chat boost"]
11072    #[allow(clippy::needless_lifetimes)]
11073    fn set_boost<'a>(&'a mut self, boost: ChatBoost) -> &'a mut Self;
11074}
11075#[allow(dead_code)]
11076trait TraitMaskPosition {
11077    #[allow(rustdoc::invalid_html_tags)]
11078    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
11079    #[allow(clippy::needless_lifetimes)]
11080    fn get_point<'a>(&'a self) -> &'a str;
11081    #[allow(rustdoc::invalid_html_tags)]
11082    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
11083    #[allow(clippy::needless_lifetimes)]
11084    fn set_point<'a>(&'a mut self, point: String) -> &'a mut Self;
11085    #[allow(rustdoc::invalid_html_tags)]
11086    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
11087    #[allow(clippy::needless_lifetimes)]
11088    fn get_x_shift<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
11089    #[allow(rustdoc::invalid_html_tags)]
11090    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
11091    #[allow(clippy::needless_lifetimes)]
11092    fn set_x_shift<'a>(&'a mut self, x_shift: ::ordered_float::OrderedFloat<f64>) -> &'a mut Self;
11093    #[allow(rustdoc::invalid_html_tags)]
11094    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
11095    #[allow(clippy::needless_lifetimes)]
11096    fn get_y_shift<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
11097    #[allow(rustdoc::invalid_html_tags)]
11098    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
11099    #[allow(clippy::needless_lifetimes)]
11100    fn set_y_shift<'a>(&'a mut self, y_shift: ::ordered_float::OrderedFloat<f64>) -> &'a mut Self;
11101    #[allow(rustdoc::invalid_html_tags)]
11102    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
11103    #[allow(clippy::needless_lifetimes)]
11104    fn get_scale<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64>;
11105    #[allow(rustdoc::invalid_html_tags)]
11106    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
11107    #[allow(clippy::needless_lifetimes)]
11108    fn set_scale<'a>(&'a mut self, scale: ::ordered_float::OrderedFloat<f64>) -> &'a mut Self;
11109}
11110#[allow(dead_code)]
11111trait TraitPassportElementErrorFile {
11112    #[allow(rustdoc::invalid_html_tags)]
11113    #[doc = "Error source, must be file"]
11114    #[allow(clippy::needless_lifetimes)]
11115    fn get_source<'a>(&'a self) -> &'a str;
11116    #[allow(rustdoc::invalid_html_tags)]
11117    #[doc = "Error source, must be file"]
11118    #[allow(clippy::needless_lifetimes)]
11119    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
11120    #[allow(rustdoc::invalid_html_tags)]
11121    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
11122    #[allow(clippy::needless_lifetimes)]
11123    fn get_tg_type<'a>(&'a self) -> &'a str;
11124    #[allow(rustdoc::invalid_html_tags)]
11125    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
11126    #[allow(clippy::needless_lifetimes)]
11127    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11128    #[allow(rustdoc::invalid_html_tags)]
11129    #[doc = "Base64-encoded file hash"]
11130    #[allow(clippy::needless_lifetimes)]
11131    fn get_file_hash<'a>(&'a self) -> &'a str;
11132    #[allow(rustdoc::invalid_html_tags)]
11133    #[doc = "Base64-encoded file hash"]
11134    #[allow(clippy::needless_lifetimes)]
11135    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self;
11136    #[allow(rustdoc::invalid_html_tags)]
11137    #[doc = "Error message"]
11138    #[allow(clippy::needless_lifetimes)]
11139    fn get_message<'a>(&'a self) -> &'a str;
11140    #[allow(rustdoc::invalid_html_tags)]
11141    #[doc = "Error message"]
11142    #[allow(clippy::needless_lifetimes)]
11143    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
11144}
11145#[allow(dead_code)]
11146trait TraitSticker {
11147    #[allow(rustdoc::invalid_html_tags)]
11148    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
11149    #[allow(clippy::needless_lifetimes)]
11150    fn get_file_id<'a>(&'a self) -> &'a str;
11151    #[allow(rustdoc::invalid_html_tags)]
11152    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
11153    #[allow(clippy::needless_lifetimes)]
11154    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
11155    #[allow(rustdoc::invalid_html_tags)]
11156    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
11157    #[allow(clippy::needless_lifetimes)]
11158    fn get_file_unique_id<'a>(&'a self) -> &'a str;
11159    #[allow(rustdoc::invalid_html_tags)]
11160    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
11161    #[allow(clippy::needless_lifetimes)]
11162    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
11163    #[allow(rustdoc::invalid_html_tags)]
11164    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
11165    #[allow(clippy::needless_lifetimes)]
11166    fn get_tg_type<'a>(&'a self) -> &'a str;
11167    #[allow(rustdoc::invalid_html_tags)]
11168    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
11169    #[allow(clippy::needless_lifetimes)]
11170    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11171    #[allow(rustdoc::invalid_html_tags)]
11172    #[doc = "Sticker width"]
11173    #[allow(clippy::needless_lifetimes)]
11174    fn get_width<'a>(&'a self) -> i64;
11175    #[allow(rustdoc::invalid_html_tags)]
11176    #[doc = "Sticker width"]
11177    #[allow(clippy::needless_lifetimes)]
11178    fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self;
11179    #[allow(rustdoc::invalid_html_tags)]
11180    #[doc = "Sticker height"]
11181    #[allow(clippy::needless_lifetimes)]
11182    fn get_height<'a>(&'a self) -> i64;
11183    #[allow(rustdoc::invalid_html_tags)]
11184    #[doc = "Sticker height"]
11185    #[allow(clippy::needless_lifetimes)]
11186    fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self;
11187    #[allow(rustdoc::invalid_html_tags)]
11188    #[doc = "True, if the sticker is animated"]
11189    #[allow(clippy::needless_lifetimes)]
11190    fn get_is_animated<'a>(&'a self) -> bool;
11191    #[allow(rustdoc::invalid_html_tags)]
11192    #[doc = "True, if the sticker is animated"]
11193    #[allow(clippy::needless_lifetimes)]
11194    fn set_is_animated<'a>(&'a mut self, is_animated: bool) -> &'a mut Self;
11195    #[allow(rustdoc::invalid_html_tags)]
11196    #[doc = "True, if the sticker is a video sticker"]
11197    #[allow(clippy::needless_lifetimes)]
11198    fn get_is_video<'a>(&'a self) -> bool;
11199    #[allow(rustdoc::invalid_html_tags)]
11200    #[doc = "True, if the sticker is a video sticker"]
11201    #[allow(clippy::needless_lifetimes)]
11202    fn set_is_video<'a>(&'a mut self, is_video: bool) -> &'a mut Self;
11203    #[allow(rustdoc::invalid_html_tags)]
11204    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
11205    #[allow(clippy::needless_lifetimes)]
11206    fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize>;
11207    #[allow(rustdoc::invalid_html_tags)]
11208    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
11209    #[allow(clippy::needless_lifetimes)]
11210    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self;
11211    #[allow(rustdoc::invalid_html_tags)]
11212    #[doc = "Optional. Emoji associated with the sticker"]
11213    #[allow(clippy::needless_lifetimes)]
11214    fn get_emoji<'a>(&'a self) -> Option<&'a str>;
11215    #[allow(rustdoc::invalid_html_tags)]
11216    #[doc = "Optional. Emoji associated with the sticker"]
11217    #[allow(clippy::needless_lifetimes)]
11218    fn set_emoji<'a>(&'a mut self, emoji: Option<String>) -> &'a mut Self;
11219    #[allow(rustdoc::invalid_html_tags)]
11220    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
11221    #[allow(clippy::needless_lifetimes)]
11222    fn get_set_name<'a>(&'a self) -> Option<&'a str>;
11223    #[allow(rustdoc::invalid_html_tags)]
11224    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
11225    #[allow(clippy::needless_lifetimes)]
11226    fn set_set_name<'a>(&'a mut self, set_name: Option<String>) -> &'a mut Self;
11227    #[allow(rustdoc::invalid_html_tags)]
11228    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
11229    #[allow(clippy::needless_lifetimes)]
11230    fn get_premium_animation<'a>(&'a self) -> Option<&'a File>;
11231    #[allow(rustdoc::invalid_html_tags)]
11232    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
11233    #[allow(clippy::needless_lifetimes)]
11234    fn set_premium_animation<'a>(&'a mut self, premium_animation: Option<File>) -> &'a mut Self;
11235    #[allow(rustdoc::invalid_html_tags)]
11236    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
11237    #[allow(clippy::needless_lifetimes)]
11238    fn get_mask_position<'a>(&'a self) -> Option<&'a MaskPosition>;
11239    #[allow(rustdoc::invalid_html_tags)]
11240    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
11241    #[allow(clippy::needless_lifetimes)]
11242    fn set_mask_position<'a>(&'a mut self, mask_position: Option<MaskPosition>) -> &'a mut Self;
11243    #[allow(rustdoc::invalid_html_tags)]
11244    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
11245    #[allow(clippy::needless_lifetimes)]
11246    fn get_custom_emoji_id<'a>(&'a self) -> Option<&'a str>;
11247    #[allow(rustdoc::invalid_html_tags)]
11248    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
11249    #[allow(clippy::needless_lifetimes)]
11250    fn set_custom_emoji_id<'a>(&'a mut self, custom_emoji_id: Option<String>) -> &'a mut Self;
11251    #[allow(rustdoc::invalid_html_tags)]
11252    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
11253    #[allow(clippy::needless_lifetimes)]
11254    fn get_needs_repainting<'a>(&'a self) -> Option<bool>;
11255    #[allow(rustdoc::invalid_html_tags)]
11256    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
11257    #[allow(clippy::needless_lifetimes)]
11258    fn set_needs_repainting<'a>(&'a mut self, needs_repainting: Option<bool>) -> &'a mut Self;
11259    #[allow(rustdoc::invalid_html_tags)]
11260    #[doc = "Optional. File size in bytes"]
11261    #[allow(clippy::needless_lifetimes)]
11262    fn get_file_size<'a>(&'a self) -> Option<i64>;
11263    #[allow(rustdoc::invalid_html_tags)]
11264    #[doc = "Optional. File size in bytes"]
11265    #[allow(clippy::needless_lifetimes)]
11266    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
11267}
11268#[allow(dead_code)]
11269trait TraitPassportElementErrorSelfie {
11270    #[allow(rustdoc::invalid_html_tags)]
11271    #[doc = "Error source, must be selfie"]
11272    #[allow(clippy::needless_lifetimes)]
11273    fn get_source<'a>(&'a self) -> &'a str;
11274    #[allow(rustdoc::invalid_html_tags)]
11275    #[doc = "Error source, must be selfie"]
11276    #[allow(clippy::needless_lifetimes)]
11277    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
11278    #[allow(rustdoc::invalid_html_tags)]
11279    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
11280    #[allow(clippy::needless_lifetimes)]
11281    fn get_tg_type<'a>(&'a self) -> &'a str;
11282    #[allow(rustdoc::invalid_html_tags)]
11283    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
11284    #[allow(clippy::needless_lifetimes)]
11285    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11286    #[allow(rustdoc::invalid_html_tags)]
11287    #[doc = "Base64-encoded hash of the file with the selfie"]
11288    #[allow(clippy::needless_lifetimes)]
11289    fn get_file_hash<'a>(&'a self) -> &'a str;
11290    #[allow(rustdoc::invalid_html_tags)]
11291    #[doc = "Base64-encoded hash of the file with the selfie"]
11292    #[allow(clippy::needless_lifetimes)]
11293    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self;
11294    #[allow(rustdoc::invalid_html_tags)]
11295    #[doc = "Error message"]
11296    #[allow(clippy::needless_lifetimes)]
11297    fn get_message<'a>(&'a self) -> &'a str;
11298    #[allow(rustdoc::invalid_html_tags)]
11299    #[doc = "Error message"]
11300    #[allow(clippy::needless_lifetimes)]
11301    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
11302}
11303#[allow(dead_code)]
11304trait TraitBackgroundTypePattern {
11305    #[allow(rustdoc::invalid_html_tags)]
11306    #[doc = "Type of the background, always \"pattern\""]
11307    #[allow(clippy::needless_lifetimes)]
11308    fn get_tg_type<'a>(&'a self) -> &'a str;
11309    #[allow(rustdoc::invalid_html_tags)]
11310    #[doc = "Type of the background, always \"pattern\""]
11311    #[allow(clippy::needless_lifetimes)]
11312    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11313    #[allow(rustdoc::invalid_html_tags)]
11314    #[doc = "Document with the pattern"]
11315    #[allow(clippy::needless_lifetimes)]
11316    fn get_document<'a>(&'a self) -> &'a Document;
11317    #[allow(rustdoc::invalid_html_tags)]
11318    #[doc = "Document with the pattern"]
11319    #[allow(clippy::needless_lifetimes)]
11320    fn set_document<'a>(&'a mut self, document: Document) -> &'a mut Self;
11321    #[allow(rustdoc::invalid_html_tags)]
11322    #[doc = "The background fill that is combined with the pattern"]
11323    #[allow(clippy::needless_lifetimes)]
11324    fn get_fill<'a>(&'a self) -> &'a BackgroundFill;
11325    #[allow(rustdoc::invalid_html_tags)]
11326    #[doc = "The background fill that is combined with the pattern"]
11327    #[allow(clippy::needless_lifetimes)]
11328    fn set_fill<'a>(&'a mut self, fill: BackgroundFill) -> &'a mut Self;
11329    #[allow(rustdoc::invalid_html_tags)]
11330    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
11331    #[allow(clippy::needless_lifetimes)]
11332    fn get_intensity<'a>(&'a self) -> i64;
11333    #[allow(rustdoc::invalid_html_tags)]
11334    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
11335    #[allow(clippy::needless_lifetimes)]
11336    fn set_intensity<'a>(&'a mut self, intensity: i64) -> &'a mut Self;
11337    #[allow(rustdoc::invalid_html_tags)]
11338    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
11339    #[allow(clippy::needless_lifetimes)]
11340    fn get_is_inverted<'a>(&'a self) -> Option<bool>;
11341    #[allow(rustdoc::invalid_html_tags)]
11342    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
11343    #[allow(clippy::needless_lifetimes)]
11344    fn set_is_inverted<'a>(&'a mut self, is_inverted: Option<bool>) -> &'a mut Self;
11345    #[allow(rustdoc::invalid_html_tags)]
11346    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
11347    #[allow(clippy::needless_lifetimes)]
11348    fn get_is_moving<'a>(&'a self) -> Option<bool>;
11349    #[allow(rustdoc::invalid_html_tags)]
11350    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
11351    #[allow(clippy::needless_lifetimes)]
11352    fn set_is_moving<'a>(&'a mut self, is_moving: Option<bool>) -> &'a mut Self;
11353}
11354#[allow(dead_code)]
11355trait TraitStarAmount {
11356    #[allow(rustdoc::invalid_html_tags)]
11357    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
11358    #[allow(clippy::needless_lifetimes)]
11359    fn get_amount<'a>(&'a self) -> i64;
11360    #[allow(rustdoc::invalid_html_tags)]
11361    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
11362    #[allow(clippy::needless_lifetimes)]
11363    fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self;
11364    #[allow(rustdoc::invalid_html_tags)]
11365    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
11366    #[allow(clippy::needless_lifetimes)]
11367    fn get_nanostar_amount<'a>(&'a self) -> Option<i64>;
11368    #[allow(rustdoc::invalid_html_tags)]
11369    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
11370    #[allow(clippy::needless_lifetimes)]
11371    fn set_nanostar_amount<'a>(&'a mut self, nanostar_amount: Option<i64>) -> &'a mut Self;
11372}
11373#[allow(dead_code)]
11374trait TraitTransactionPartnerFragment {
11375    #[allow(rustdoc::invalid_html_tags)]
11376    #[doc = "Type of the transaction partner, always \"fragment\""]
11377    #[allow(clippy::needless_lifetimes)]
11378    fn get_tg_type<'a>(&'a self) -> &'a str;
11379    #[allow(rustdoc::invalid_html_tags)]
11380    #[doc = "Type of the transaction partner, always \"fragment\""]
11381    #[allow(clippy::needless_lifetimes)]
11382    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11383    #[allow(rustdoc::invalid_html_tags)]
11384    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
11385    #[allow(clippy::needless_lifetimes)]
11386    fn get_withdrawal_state<'a>(&'a self) -> Option<&'a RevenueWithdrawalState>;
11387    #[allow(rustdoc::invalid_html_tags)]
11388    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
11389    #[allow(clippy::needless_lifetimes)]
11390    fn set_withdrawal_state<'a>(
11391        &'a mut self,
11392        withdrawal_state: Option<RevenueWithdrawalState>,
11393    ) -> &'a mut Self;
11394}
11395#[allow(dead_code)]
11396trait TraitChatMemberLeft {
11397    #[allow(rustdoc::invalid_html_tags)]
11398    #[doc = "Information about the user"]
11399    #[allow(clippy::needless_lifetimes)]
11400    fn get_user<'a>(&'a self) -> &'a User;
11401    #[allow(rustdoc::invalid_html_tags)]
11402    #[doc = "Information about the user"]
11403    #[allow(clippy::needless_lifetimes)]
11404    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
11405}
11406#[allow(dead_code)]
11407trait TraitPaidMediaPhoto {
11408    #[allow(rustdoc::invalid_html_tags)]
11409    #[doc = "Type of the paid media, always \"photo\""]
11410    #[allow(clippy::needless_lifetimes)]
11411    fn get_tg_type<'a>(&'a self) -> &'a str;
11412    #[allow(rustdoc::invalid_html_tags)]
11413    #[doc = "Type of the paid media, always \"photo\""]
11414    #[allow(clippy::needless_lifetimes)]
11415    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11416    #[allow(rustdoc::invalid_html_tags)]
11417    #[doc = "The photo"]
11418    #[allow(clippy::needless_lifetimes)]
11419    fn get_photo<'a>(&'a self) -> &'a Vec<PhotoSize>;
11420    #[allow(rustdoc::invalid_html_tags)]
11421    #[doc = "The photo"]
11422    #[allow(clippy::needless_lifetimes)]
11423    fn set_photo<'a>(&'a mut self, photo: Vec<PhotoSize>) -> &'a mut Self;
11424}
11425#[allow(dead_code)]
11426trait TraitUniqueGift {
11427    #[allow(rustdoc::invalid_html_tags)]
11428    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
11429    #[allow(clippy::needless_lifetimes)]
11430    fn get_base_name<'a>(&'a self) -> &'a str;
11431    #[allow(rustdoc::invalid_html_tags)]
11432    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
11433    #[allow(clippy::needless_lifetimes)]
11434    fn set_base_name<'a>(&'a mut self, base_name: String) -> &'a mut Self;
11435    #[allow(rustdoc::invalid_html_tags)]
11436    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
11437    #[allow(clippy::needless_lifetimes)]
11438    fn get_name<'a>(&'a self) -> &'a str;
11439    #[allow(rustdoc::invalid_html_tags)]
11440    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
11441    #[allow(clippy::needless_lifetimes)]
11442    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
11443    #[allow(rustdoc::invalid_html_tags)]
11444    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
11445    #[allow(clippy::needless_lifetimes)]
11446    fn get_number<'a>(&'a self) -> i64;
11447    #[allow(rustdoc::invalid_html_tags)]
11448    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
11449    #[allow(clippy::needless_lifetimes)]
11450    fn set_number<'a>(&'a mut self, number: i64) -> &'a mut Self;
11451    #[allow(rustdoc::invalid_html_tags)]
11452    #[doc = "Model of the gift"]
11453    #[allow(clippy::needless_lifetimes)]
11454    fn get_model<'a>(&'a self) -> &'a UniqueGiftModel;
11455    #[allow(rustdoc::invalid_html_tags)]
11456    #[doc = "Model of the gift"]
11457    #[allow(clippy::needless_lifetimes)]
11458    fn set_model<'a>(&'a mut self, model: UniqueGiftModel) -> &'a mut Self;
11459    #[allow(rustdoc::invalid_html_tags)]
11460    #[doc = "Symbol of the gift"]
11461    #[allow(clippy::needless_lifetimes)]
11462    fn get_symbol<'a>(&'a self) -> &'a UniqueGiftSymbol;
11463    #[allow(rustdoc::invalid_html_tags)]
11464    #[doc = "Symbol of the gift"]
11465    #[allow(clippy::needless_lifetimes)]
11466    fn set_symbol<'a>(&'a mut self, symbol: UniqueGiftSymbol) -> &'a mut Self;
11467    #[allow(rustdoc::invalid_html_tags)]
11468    #[doc = "Backdrop of the gift"]
11469    #[allow(clippy::needless_lifetimes)]
11470    fn get_backdrop<'a>(&'a self) -> &'a UniqueGiftBackdrop;
11471    #[allow(rustdoc::invalid_html_tags)]
11472    #[doc = "Backdrop of the gift"]
11473    #[allow(clippy::needless_lifetimes)]
11474    fn set_backdrop<'a>(&'a mut self, backdrop: UniqueGiftBackdrop) -> &'a mut Self;
11475    #[allow(rustdoc::invalid_html_tags)]
11476    #[doc = "Optional. Information about the chat that published the gift"]
11477    #[allow(clippy::needless_lifetimes)]
11478    fn get_publisher_chat<'a>(&'a self) -> Option<&'a Chat>;
11479    #[allow(rustdoc::invalid_html_tags)]
11480    #[doc = "Optional. Information about the chat that published the gift"]
11481    #[allow(clippy::needless_lifetimes)]
11482    fn set_publisher_chat<'a>(&'a mut self, publisher_chat: Option<Chat>) -> &'a mut Self;
11483}
11484#[allow(dead_code)]
11485trait TraitMenuButtonCommands {
11486    #[allow(rustdoc::invalid_html_tags)]
11487    #[doc = "Type of the button, must be commands"]
11488    #[allow(clippy::needless_lifetimes)]
11489    fn get_tg_type<'a>(&'a self) -> &'a str;
11490    #[allow(rustdoc::invalid_html_tags)]
11491    #[doc = "Type of the button, must be commands"]
11492    #[allow(clippy::needless_lifetimes)]
11493    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11494}
11495#[allow(dead_code)]
11496trait TraitTransactionPartnerOther {
11497    #[allow(rustdoc::invalid_html_tags)]
11498    #[doc = "Type of the transaction partner, always \"other\""]
11499    #[allow(clippy::needless_lifetimes)]
11500    fn get_tg_type<'a>(&'a self) -> &'a str;
11501    #[allow(rustdoc::invalid_html_tags)]
11502    #[doc = "Type of the transaction partner, always \"other\""]
11503    #[allow(clippy::needless_lifetimes)]
11504    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11505}
11506#[allow(dead_code)]
11507trait TraitGifts {
11508    #[allow(rustdoc::invalid_html_tags)]
11509    #[doc = "The list of gifts"]
11510    #[allow(clippy::needless_lifetimes)]
11511    fn get_gifts<'a>(&'a self) -> &'a Vec<Gift>;
11512    #[allow(rustdoc::invalid_html_tags)]
11513    #[doc = "The list of gifts"]
11514    #[allow(clippy::needless_lifetimes)]
11515    fn set_gifts<'a>(&'a mut self, gifts: Vec<Gift>) -> &'a mut Self;
11516}
11517#[allow(dead_code)]
11518trait TraitFile {
11519    #[allow(rustdoc::invalid_html_tags)]
11520    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
11521    #[allow(clippy::needless_lifetimes)]
11522    fn get_file_id<'a>(&'a self) -> &'a str;
11523    #[allow(rustdoc::invalid_html_tags)]
11524    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
11525    #[allow(clippy::needless_lifetimes)]
11526    fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self;
11527    #[allow(rustdoc::invalid_html_tags)]
11528    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
11529    #[allow(clippy::needless_lifetimes)]
11530    fn get_file_unique_id<'a>(&'a self) -> &'a str;
11531    #[allow(rustdoc::invalid_html_tags)]
11532    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
11533    #[allow(clippy::needless_lifetimes)]
11534    fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self;
11535    #[allow(rustdoc::invalid_html_tags)]
11536    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
11537    #[allow(clippy::needless_lifetimes)]
11538    fn get_file_size<'a>(&'a self) -> Option<i64>;
11539    #[allow(rustdoc::invalid_html_tags)]
11540    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
11541    #[allow(clippy::needless_lifetimes)]
11542    fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self;
11543    #[allow(rustdoc::invalid_html_tags)]
11544    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
11545    #[allow(clippy::needless_lifetimes)]
11546    fn get_file_path<'a>(&'a self) -> Option<&'a str>;
11547    #[allow(rustdoc::invalid_html_tags)]
11548    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
11549    #[allow(clippy::needless_lifetimes)]
11550    fn set_file_path<'a>(&'a mut self, file_path: Option<String>) -> &'a mut Self;
11551}
11552#[allow(dead_code)]
11553trait TraitBirthdate {
11554    #[allow(rustdoc::invalid_html_tags)]
11555    #[doc = "Day of the user's birth; 1-31"]
11556    #[allow(clippy::needless_lifetimes)]
11557    fn get_day<'a>(&'a self) -> i64;
11558    #[allow(rustdoc::invalid_html_tags)]
11559    #[doc = "Day of the user's birth; 1-31"]
11560    #[allow(clippy::needless_lifetimes)]
11561    fn set_day<'a>(&'a mut self, day: i64) -> &'a mut Self;
11562    #[allow(rustdoc::invalid_html_tags)]
11563    #[doc = "Month of the user's birth; 1-12"]
11564    #[allow(clippy::needless_lifetimes)]
11565    fn get_month<'a>(&'a self) -> i64;
11566    #[allow(rustdoc::invalid_html_tags)]
11567    #[doc = "Month of the user's birth; 1-12"]
11568    #[allow(clippy::needless_lifetimes)]
11569    fn set_month<'a>(&'a mut self, month: i64) -> &'a mut Self;
11570    #[allow(rustdoc::invalid_html_tags)]
11571    #[doc = "Optional. Year of the user's birth"]
11572    #[allow(clippy::needless_lifetimes)]
11573    fn get_year<'a>(&'a self) -> Option<i64>;
11574    #[allow(rustdoc::invalid_html_tags)]
11575    #[doc = "Optional. Year of the user's birth"]
11576    #[allow(clippy::needless_lifetimes)]
11577    fn set_year<'a>(&'a mut self, year: Option<i64>) -> &'a mut Self;
11578}
11579#[allow(dead_code)]
11580trait TraitTransactionPartnerTelegramAds {
11581    #[allow(rustdoc::invalid_html_tags)]
11582    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
11583    #[allow(clippy::needless_lifetimes)]
11584    fn get_tg_type<'a>(&'a self) -> &'a str;
11585    #[allow(rustdoc::invalid_html_tags)]
11586    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
11587    #[allow(clippy::needless_lifetimes)]
11588    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11589}
11590#[allow(dead_code)]
11591trait TraitInlineQueryResultContact {
11592    #[allow(rustdoc::invalid_html_tags)]
11593    #[doc = "Type of the result, must be contact"]
11594    #[allow(clippy::needless_lifetimes)]
11595    fn get_tg_type<'a>(&'a self) -> &'a str;
11596    #[allow(rustdoc::invalid_html_tags)]
11597    #[doc = "Type of the result, must be contact"]
11598    #[allow(clippy::needless_lifetimes)]
11599    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11600    #[allow(rustdoc::invalid_html_tags)]
11601    #[doc = "Unique identifier for this result, 1-64 Bytes"]
11602    #[allow(clippy::needless_lifetimes)]
11603    fn get_id<'a>(&'a self) -> &'a str;
11604    #[allow(rustdoc::invalid_html_tags)]
11605    #[doc = "Unique identifier for this result, 1-64 Bytes"]
11606    #[allow(clippy::needless_lifetimes)]
11607    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
11608    #[allow(rustdoc::invalid_html_tags)]
11609    #[doc = "Contact's phone number"]
11610    #[allow(clippy::needless_lifetimes)]
11611    fn get_phone_number<'a>(&'a self) -> &'a str;
11612    #[allow(rustdoc::invalid_html_tags)]
11613    #[doc = "Contact's phone number"]
11614    #[allow(clippy::needless_lifetimes)]
11615    fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self;
11616    #[allow(rustdoc::invalid_html_tags)]
11617    #[doc = "Contact's first name"]
11618    #[allow(clippy::needless_lifetimes)]
11619    fn get_first_name<'a>(&'a self) -> &'a str;
11620    #[allow(rustdoc::invalid_html_tags)]
11621    #[doc = "Contact's first name"]
11622    #[allow(clippy::needless_lifetimes)]
11623    fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self;
11624    #[allow(rustdoc::invalid_html_tags)]
11625    #[doc = "Optional. Contact's last name"]
11626    #[allow(clippy::needless_lifetimes)]
11627    fn get_last_name<'a>(&'a self) -> Option<&'a str>;
11628    #[allow(rustdoc::invalid_html_tags)]
11629    #[doc = "Optional. Contact's last name"]
11630    #[allow(clippy::needless_lifetimes)]
11631    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self;
11632    #[allow(rustdoc::invalid_html_tags)]
11633    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
11634    #[allow(clippy::needless_lifetimes)]
11635    fn get_vcard<'a>(&'a self) -> Option<&'a str>;
11636    #[allow(rustdoc::invalid_html_tags)]
11637    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
11638    #[allow(clippy::needless_lifetimes)]
11639    fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self;
11640    #[allow(rustdoc::invalid_html_tags)]
11641    #[doc = "Optional. Inline keyboard attached to the message"]
11642    #[allow(clippy::needless_lifetimes)]
11643    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
11644    #[allow(rustdoc::invalid_html_tags)]
11645    #[doc = "Optional. Inline keyboard attached to the message"]
11646    #[allow(clippy::needless_lifetimes)]
11647    fn set_reply_markup<'a>(
11648        &'a mut self,
11649        reply_markup: Option<InlineKeyboardMarkup>,
11650    ) -> &'a mut Self;
11651    #[allow(rustdoc::invalid_html_tags)]
11652    #[doc = "Optional. Content of the message to be sent instead of the contact"]
11653    #[allow(clippy::needless_lifetimes)]
11654    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
11655    #[allow(rustdoc::invalid_html_tags)]
11656    #[doc = "Optional. Content of the message to be sent instead of the contact"]
11657    #[allow(clippy::needless_lifetimes)]
11658    fn set_input_message_content<'a>(
11659        &'a mut self,
11660        input_message_content: Option<InputMessageContent>,
11661    ) -> &'a mut Self;
11662    #[allow(rustdoc::invalid_html_tags)]
11663    #[doc = "Optional. Url of the thumbnail for the result"]
11664    #[allow(clippy::needless_lifetimes)]
11665    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str>;
11666    #[allow(rustdoc::invalid_html_tags)]
11667    #[doc = "Optional. Url of the thumbnail for the result"]
11668    #[allow(clippy::needless_lifetimes)]
11669    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self;
11670    #[allow(rustdoc::invalid_html_tags)]
11671    #[doc = "Optional. Thumbnail width"]
11672    #[allow(clippy::needless_lifetimes)]
11673    fn get_thumbnail_width<'a>(&'a self) -> Option<i64>;
11674    #[allow(rustdoc::invalid_html_tags)]
11675    #[doc = "Optional. Thumbnail width"]
11676    #[allow(clippy::needless_lifetimes)]
11677    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self;
11678    #[allow(rustdoc::invalid_html_tags)]
11679    #[doc = "Optional. Thumbnail height"]
11680    #[allow(clippy::needless_lifetimes)]
11681    fn get_thumbnail_height<'a>(&'a self) -> Option<i64>;
11682    #[allow(rustdoc::invalid_html_tags)]
11683    #[doc = "Optional. Thumbnail height"]
11684    #[allow(clippy::needless_lifetimes)]
11685    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self;
11686}
11687#[allow(dead_code)]
11688trait TraitChatMemberRestricted {
11689    #[allow(rustdoc::invalid_html_tags)]
11690    #[doc = "Information about the user"]
11691    #[allow(clippy::needless_lifetimes)]
11692    fn get_user<'a>(&'a self) -> &'a User;
11693    #[allow(rustdoc::invalid_html_tags)]
11694    #[doc = "Information about the user"]
11695    #[allow(clippy::needless_lifetimes)]
11696    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self;
11697    #[allow(rustdoc::invalid_html_tags)]
11698    #[doc = "True, if the user is a member of the chat at the moment of the request"]
11699    #[allow(clippy::needless_lifetimes)]
11700    fn get_is_member<'a>(&'a self) -> bool;
11701    #[allow(rustdoc::invalid_html_tags)]
11702    #[doc = "True, if the user is a member of the chat at the moment of the request"]
11703    #[allow(clippy::needless_lifetimes)]
11704    fn set_is_member<'a>(&'a mut self, is_member: bool) -> &'a mut Self;
11705    #[allow(rustdoc::invalid_html_tags)]
11706    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
11707    #[allow(clippy::needless_lifetimes)]
11708    fn get_can_send_messages<'a>(&'a self) -> bool;
11709    #[allow(rustdoc::invalid_html_tags)]
11710    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
11711    #[allow(clippy::needless_lifetimes)]
11712    fn set_can_send_messages<'a>(&'a mut self, can_send_messages: bool) -> &'a mut Self;
11713    #[allow(rustdoc::invalid_html_tags)]
11714    #[doc = "True, if the user is allowed to send audios"]
11715    #[allow(clippy::needless_lifetimes)]
11716    fn get_can_send_audios<'a>(&'a self) -> bool;
11717    #[allow(rustdoc::invalid_html_tags)]
11718    #[doc = "True, if the user is allowed to send audios"]
11719    #[allow(clippy::needless_lifetimes)]
11720    fn set_can_send_audios<'a>(&'a mut self, can_send_audios: bool) -> &'a mut Self;
11721    #[allow(rustdoc::invalid_html_tags)]
11722    #[doc = "True, if the user is allowed to send documents"]
11723    #[allow(clippy::needless_lifetimes)]
11724    fn get_can_send_documents<'a>(&'a self) -> bool;
11725    #[allow(rustdoc::invalid_html_tags)]
11726    #[doc = "True, if the user is allowed to send documents"]
11727    #[allow(clippy::needless_lifetimes)]
11728    fn set_can_send_documents<'a>(&'a mut self, can_send_documents: bool) -> &'a mut Self;
11729    #[allow(rustdoc::invalid_html_tags)]
11730    #[doc = "True, if the user is allowed to send photos"]
11731    #[allow(clippy::needless_lifetimes)]
11732    fn get_can_send_photos<'a>(&'a self) -> bool;
11733    #[allow(rustdoc::invalid_html_tags)]
11734    #[doc = "True, if the user is allowed to send photos"]
11735    #[allow(clippy::needless_lifetimes)]
11736    fn set_can_send_photos<'a>(&'a mut self, can_send_photos: bool) -> &'a mut Self;
11737    #[allow(rustdoc::invalid_html_tags)]
11738    #[doc = "True, if the user is allowed to send videos"]
11739    #[allow(clippy::needless_lifetimes)]
11740    fn get_can_send_videos<'a>(&'a self) -> bool;
11741    #[allow(rustdoc::invalid_html_tags)]
11742    #[doc = "True, if the user is allowed to send videos"]
11743    #[allow(clippy::needless_lifetimes)]
11744    fn set_can_send_videos<'a>(&'a mut self, can_send_videos: bool) -> &'a mut Self;
11745    #[allow(rustdoc::invalid_html_tags)]
11746    #[doc = "True, if the user is allowed to send video notes"]
11747    #[allow(clippy::needless_lifetimes)]
11748    fn get_can_send_video_notes<'a>(&'a self) -> bool;
11749    #[allow(rustdoc::invalid_html_tags)]
11750    #[doc = "True, if the user is allowed to send video notes"]
11751    #[allow(clippy::needless_lifetimes)]
11752    fn set_can_send_video_notes<'a>(&'a mut self, can_send_video_notes: bool) -> &'a mut Self;
11753    #[allow(rustdoc::invalid_html_tags)]
11754    #[doc = "True, if the user is allowed to send voice notes"]
11755    #[allow(clippy::needless_lifetimes)]
11756    fn get_can_send_voice_notes<'a>(&'a self) -> bool;
11757    #[allow(rustdoc::invalid_html_tags)]
11758    #[doc = "True, if the user is allowed to send voice notes"]
11759    #[allow(clippy::needless_lifetimes)]
11760    fn set_can_send_voice_notes<'a>(&'a mut self, can_send_voice_notes: bool) -> &'a mut Self;
11761    #[allow(rustdoc::invalid_html_tags)]
11762    #[doc = "True, if the user is allowed to send polls and checklists"]
11763    #[allow(clippy::needless_lifetimes)]
11764    fn get_can_send_polls<'a>(&'a self) -> bool;
11765    #[allow(rustdoc::invalid_html_tags)]
11766    #[doc = "True, if the user is allowed to send polls and checklists"]
11767    #[allow(clippy::needless_lifetimes)]
11768    fn set_can_send_polls<'a>(&'a mut self, can_send_polls: bool) -> &'a mut Self;
11769    #[allow(rustdoc::invalid_html_tags)]
11770    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
11771    #[allow(clippy::needless_lifetimes)]
11772    fn get_can_send_other_messages<'a>(&'a self) -> bool;
11773    #[allow(rustdoc::invalid_html_tags)]
11774    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
11775    #[allow(clippy::needless_lifetimes)]
11776    fn set_can_send_other_messages<'a>(&'a mut self, can_send_other_messages: bool)
11777        -> &'a mut Self;
11778    #[allow(rustdoc::invalid_html_tags)]
11779    #[doc = "True, if the user is allowed to add web page previews to their messages"]
11780    #[allow(clippy::needless_lifetimes)]
11781    fn get_can_add_web_page_previews<'a>(&'a self) -> bool;
11782    #[allow(rustdoc::invalid_html_tags)]
11783    #[doc = "True, if the user is allowed to add web page previews to their messages"]
11784    #[allow(clippy::needless_lifetimes)]
11785    fn set_can_add_web_page_previews<'a>(
11786        &'a mut self,
11787        can_add_web_page_previews: bool,
11788    ) -> &'a mut Self;
11789    #[allow(rustdoc::invalid_html_tags)]
11790    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
11791    #[allow(clippy::needless_lifetimes)]
11792    fn get_can_change_info<'a>(&'a self) -> bool;
11793    #[allow(rustdoc::invalid_html_tags)]
11794    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
11795    #[allow(clippy::needless_lifetimes)]
11796    fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self;
11797    #[allow(rustdoc::invalid_html_tags)]
11798    #[doc = "True, if the user is allowed to invite new users to the chat"]
11799    #[allow(clippy::needless_lifetimes)]
11800    fn get_can_invite_users<'a>(&'a self) -> bool;
11801    #[allow(rustdoc::invalid_html_tags)]
11802    #[doc = "True, if the user is allowed to invite new users to the chat"]
11803    #[allow(clippy::needless_lifetimes)]
11804    fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self;
11805    #[allow(rustdoc::invalid_html_tags)]
11806    #[doc = "True, if the user is allowed to pin messages"]
11807    #[allow(clippy::needless_lifetimes)]
11808    fn get_can_pin_messages<'a>(&'a self) -> bool;
11809    #[allow(rustdoc::invalid_html_tags)]
11810    #[doc = "True, if the user is allowed to pin messages"]
11811    #[allow(clippy::needless_lifetimes)]
11812    fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: bool) -> &'a mut Self;
11813    #[allow(rustdoc::invalid_html_tags)]
11814    #[doc = "True, if the user is allowed to create forum topics"]
11815    #[allow(clippy::needless_lifetimes)]
11816    fn get_can_manage_topics<'a>(&'a self) -> bool;
11817    #[allow(rustdoc::invalid_html_tags)]
11818    #[doc = "True, if the user is allowed to create forum topics"]
11819    #[allow(clippy::needless_lifetimes)]
11820    fn set_can_manage_topics<'a>(&'a mut self, can_manage_topics: bool) -> &'a mut Self;
11821    #[allow(rustdoc::invalid_html_tags)]
11822    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
11823    #[allow(clippy::needless_lifetimes)]
11824    fn get_until_date<'a>(&'a self) -> i64;
11825    #[allow(rustdoc::invalid_html_tags)]
11826    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
11827    #[allow(clippy::needless_lifetimes)]
11828    fn set_until_date<'a>(&'a mut self, until_date: i64) -> &'a mut Self;
11829}
11830#[allow(dead_code)]
11831trait TraitLinkPreviewOptions {
11832    #[allow(rustdoc::invalid_html_tags)]
11833    #[doc = "Optional. True, if the link preview is disabled"]
11834    #[allow(clippy::needless_lifetimes)]
11835    fn get_is_disabled<'a>(&'a self) -> Option<bool>;
11836    #[allow(rustdoc::invalid_html_tags)]
11837    #[doc = "Optional. True, if the link preview is disabled"]
11838    #[allow(clippy::needless_lifetimes)]
11839    fn set_is_disabled<'a>(&'a mut self, is_disabled: Option<bool>) -> &'a mut Self;
11840    #[allow(rustdoc::invalid_html_tags)]
11841    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
11842    #[allow(clippy::needless_lifetimes)]
11843    fn get_url<'a>(&'a self) -> Option<&'a str>;
11844    #[allow(rustdoc::invalid_html_tags)]
11845    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
11846    #[allow(clippy::needless_lifetimes)]
11847    fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self;
11848    #[allow(rustdoc::invalid_html_tags)]
11849    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
11850    #[allow(clippy::needless_lifetimes)]
11851    fn get_prefer_small_media<'a>(&'a self) -> Option<bool>;
11852    #[allow(rustdoc::invalid_html_tags)]
11853    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
11854    #[allow(clippy::needless_lifetimes)]
11855    fn set_prefer_small_media<'a>(&'a mut self, prefer_small_media: Option<bool>) -> &'a mut Self;
11856    #[allow(rustdoc::invalid_html_tags)]
11857    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
11858    #[allow(clippy::needless_lifetimes)]
11859    fn get_prefer_large_media<'a>(&'a self) -> Option<bool>;
11860    #[allow(rustdoc::invalid_html_tags)]
11861    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
11862    #[allow(clippy::needless_lifetimes)]
11863    fn set_prefer_large_media<'a>(&'a mut self, prefer_large_media: Option<bool>) -> &'a mut Self;
11864    #[allow(rustdoc::invalid_html_tags)]
11865    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
11866    #[allow(clippy::needless_lifetimes)]
11867    fn get_show_above_text<'a>(&'a self) -> Option<bool>;
11868    #[allow(rustdoc::invalid_html_tags)]
11869    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
11870    #[allow(clippy::needless_lifetimes)]
11871    fn set_show_above_text<'a>(&'a mut self, show_above_text: Option<bool>) -> &'a mut Self;
11872}
11873#[allow(dead_code)]
11874trait TraitPreparedInlineMessage {
11875    #[allow(rustdoc::invalid_html_tags)]
11876    #[doc = "Unique identifier of the prepared message"]
11877    #[allow(clippy::needless_lifetimes)]
11878    fn get_id<'a>(&'a self) -> &'a str;
11879    #[allow(rustdoc::invalid_html_tags)]
11880    #[doc = "Unique identifier of the prepared message"]
11881    #[allow(clippy::needless_lifetimes)]
11882    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
11883    #[allow(rustdoc::invalid_html_tags)]
11884    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
11885    #[allow(clippy::needless_lifetimes)]
11886    fn get_expiration_date<'a>(&'a self) -> i64;
11887    #[allow(rustdoc::invalid_html_tags)]
11888    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
11889    #[allow(clippy::needless_lifetimes)]
11890    fn set_expiration_date<'a>(&'a mut self, expiration_date: i64) -> &'a mut Self;
11891}
11892#[allow(dead_code)]
11893trait TraitTextQuote {
11894    #[allow(rustdoc::invalid_html_tags)]
11895    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
11896    #[allow(clippy::needless_lifetimes)]
11897    fn get_text<'a>(&'a self) -> &'a str;
11898    #[allow(rustdoc::invalid_html_tags)]
11899    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
11900    #[allow(clippy::needless_lifetimes)]
11901    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self;
11902    #[allow(rustdoc::invalid_html_tags)]
11903    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
11904    #[allow(clippy::needless_lifetimes)]
11905    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
11906    #[allow(rustdoc::invalid_html_tags)]
11907    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
11908    #[allow(clippy::needless_lifetimes)]
11909    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self;
11910    #[allow(rustdoc::invalid_html_tags)]
11911    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
11912    #[allow(clippy::needless_lifetimes)]
11913    fn get_position<'a>(&'a self) -> i64;
11914    #[allow(rustdoc::invalid_html_tags)]
11915    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
11916    #[allow(clippy::needless_lifetimes)]
11917    fn set_position<'a>(&'a mut self, position: i64) -> &'a mut Self;
11918    #[allow(rustdoc::invalid_html_tags)]
11919    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
11920    #[allow(clippy::needless_lifetimes)]
11921    fn get_is_manual<'a>(&'a self) -> Option<bool>;
11922    #[allow(rustdoc::invalid_html_tags)]
11923    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
11924    #[allow(clippy::needless_lifetimes)]
11925    fn set_is_manual<'a>(&'a mut self, is_manual: Option<bool>) -> &'a mut Self;
11926}
11927#[allow(dead_code)]
11928trait TraitChecklistTasksDone {
11929    #[allow(rustdoc::invalid_html_tags)]
11930    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
11931    #[allow(clippy::needless_lifetimes)]
11932    fn get_checklist_message<'a>(&'a self) -> Option<&'a Message>;
11933    #[allow(rustdoc::invalid_html_tags)]
11934    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
11935    #[allow(clippy::needless_lifetimes)]
11936    fn set_checklist_message<'a>(&'a mut self, checklist_message: Option<Message>) -> &'a mut Self;
11937    #[allow(rustdoc::invalid_html_tags)]
11938    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
11939    #[allow(clippy::needless_lifetimes)]
11940    fn get_marked_as_done_task_ids<'a>(&'a self) -> Option<&'a Vec<i64>>;
11941    #[allow(rustdoc::invalid_html_tags)]
11942    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
11943    #[allow(clippy::needless_lifetimes)]
11944    fn set_marked_as_done_task_ids<'a>(
11945        &'a mut self,
11946        marked_as_done_task_ids: Option<Vec<i64>>,
11947    ) -> &'a mut Self;
11948    #[allow(rustdoc::invalid_html_tags)]
11949    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
11950    #[allow(clippy::needless_lifetimes)]
11951    fn get_marked_as_not_done_task_ids<'a>(&'a self) -> Option<&'a Vec<i64>>;
11952    #[allow(rustdoc::invalid_html_tags)]
11953    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
11954    #[allow(clippy::needless_lifetimes)]
11955    fn set_marked_as_not_done_task_ids<'a>(
11956        &'a mut self,
11957        marked_as_not_done_task_ids: Option<Vec<i64>>,
11958    ) -> &'a mut Self;
11959}
11960#[allow(dead_code)]
11961trait TraitInputStoryContentVideo {
11962    #[allow(rustdoc::invalid_html_tags)]
11963    #[doc = "Type of the content, must be video"]
11964    #[allow(clippy::needless_lifetimes)]
11965    fn get_tg_type<'a>(&'a self) -> &'a str;
11966    #[allow(rustdoc::invalid_html_tags)]
11967    #[doc = "Type of the content, must be video"]
11968    #[allow(clippy::needless_lifetimes)]
11969    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
11970    #[allow(rustdoc::invalid_html_tags)]
11971    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
11972    #[allow(clippy::needless_lifetimes)]
11973    fn get_video<'a>(&'a self) -> &'a str;
11974    #[allow(rustdoc::invalid_html_tags)]
11975    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
11976    #[allow(clippy::needless_lifetimes)]
11977    fn set_video<'a>(&'a mut self, video: String) -> &'a mut Self;
11978    #[allow(rustdoc::invalid_html_tags)]
11979    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
11980    #[allow(clippy::needless_lifetimes)]
11981    fn get_duration<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>>;
11982    #[allow(rustdoc::invalid_html_tags)]
11983    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
11984    #[allow(clippy::needless_lifetimes)]
11985    fn set_duration<'a>(
11986        &'a mut self,
11987        duration: Option<::ordered_float::OrderedFloat<f64>>,
11988    ) -> &'a mut Self;
11989    #[allow(rustdoc::invalid_html_tags)]
11990    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
11991    #[allow(clippy::needless_lifetimes)]
11992    fn get_cover_frame_timestamp<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>>;
11993    #[allow(rustdoc::invalid_html_tags)]
11994    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
11995    #[allow(clippy::needless_lifetimes)]
11996    fn set_cover_frame_timestamp<'a>(
11997        &'a mut self,
11998        cover_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
11999    ) -> &'a mut Self;
12000    #[allow(rustdoc::invalid_html_tags)]
12001    #[doc = "Optional. Pass True if the video has no sound"]
12002    #[allow(clippy::needless_lifetimes)]
12003    fn get_is_animation<'a>(&'a self) -> Option<bool>;
12004    #[allow(rustdoc::invalid_html_tags)]
12005    #[doc = "Optional. Pass True if the video has no sound"]
12006    #[allow(clippy::needless_lifetimes)]
12007    fn set_is_animation<'a>(&'a mut self, is_animation: Option<bool>) -> &'a mut Self;
12008}
12009#[allow(dead_code)]
12010trait TraitBackgroundTypeChatTheme {
12011    #[allow(rustdoc::invalid_html_tags)]
12012    #[doc = "Type of the background, always \"chat_theme\""]
12013    #[allow(clippy::needless_lifetimes)]
12014    fn get_tg_type<'a>(&'a self) -> &'a str;
12015    #[allow(rustdoc::invalid_html_tags)]
12016    #[doc = "Type of the background, always \"chat_theme\""]
12017    #[allow(clippy::needless_lifetimes)]
12018    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12019    #[allow(rustdoc::invalid_html_tags)]
12020    #[doc = "Name of the chat theme, which is usually an emoji"]
12021    #[allow(clippy::needless_lifetimes)]
12022    fn get_theme_name<'a>(&'a self) -> &'a str;
12023    #[allow(rustdoc::invalid_html_tags)]
12024    #[doc = "Name of the chat theme, which is usually an emoji"]
12025    #[allow(clippy::needless_lifetimes)]
12026    fn set_theme_name<'a>(&'a mut self, theme_name: String) -> &'a mut Self;
12027}
12028#[allow(dead_code)]
12029trait TraitInaccessibleMessage {
12030    #[allow(rustdoc::invalid_html_tags)]
12031    #[doc = "Chat the message belonged to"]
12032    #[allow(clippy::needless_lifetimes)]
12033    fn get_chat<'a>(&'a self) -> &'a Chat;
12034    #[allow(rustdoc::invalid_html_tags)]
12035    #[doc = "Chat the message belonged to"]
12036    #[allow(clippy::needless_lifetimes)]
12037    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
12038    #[allow(rustdoc::invalid_html_tags)]
12039    #[doc = "Unique message identifier inside the chat"]
12040    #[allow(clippy::needless_lifetimes)]
12041    fn get_message_id<'a>(&'a self) -> i64;
12042    #[allow(rustdoc::invalid_html_tags)]
12043    #[doc = "Unique message identifier inside the chat"]
12044    #[allow(clippy::needless_lifetimes)]
12045    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self;
12046    #[allow(rustdoc::invalid_html_tags)]
12047    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
12048    #[allow(clippy::needless_lifetimes)]
12049    fn get_date<'a>(&'a self) -> i64;
12050    #[allow(rustdoc::invalid_html_tags)]
12051    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
12052    #[allow(clippy::needless_lifetimes)]
12053    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
12054}
12055#[allow(dead_code)]
12056trait TraitInputChecklist {
12057    #[allow(rustdoc::invalid_html_tags)]
12058    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
12059    #[allow(clippy::needless_lifetimes)]
12060    fn get_title<'a>(&'a self) -> &'a str;
12061    #[allow(rustdoc::invalid_html_tags)]
12062    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
12063    #[allow(clippy::needless_lifetimes)]
12064    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
12065    #[allow(rustdoc::invalid_html_tags)]
12066    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
12067    #[allow(clippy::needless_lifetimes)]
12068    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
12069    #[allow(rustdoc::invalid_html_tags)]
12070    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
12071    #[allow(clippy::needless_lifetimes)]
12072    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
12073    #[allow(rustdoc::invalid_html_tags)]
12074    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
12075    #[allow(clippy::needless_lifetimes)]
12076    fn get_title_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
12077    #[allow(rustdoc::invalid_html_tags)]
12078    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
12079    #[allow(clippy::needless_lifetimes)]
12080    fn set_title_entities<'a>(
12081        &'a mut self,
12082        title_entities: Option<Vec<MessageEntity>>,
12083    ) -> &'a mut Self;
12084    #[allow(rustdoc::invalid_html_tags)]
12085    #[doc = "List of 1-30 tasks in the checklist"]
12086    #[allow(clippy::needless_lifetimes)]
12087    fn get_tasks<'a>(&'a self) -> &'a Vec<InputChecklistTask>;
12088    #[allow(rustdoc::invalid_html_tags)]
12089    #[doc = "List of 1-30 tasks in the checklist"]
12090    #[allow(clippy::needless_lifetimes)]
12091    fn set_tasks<'a>(&'a mut self, tasks: Vec<InputChecklistTask>) -> &'a mut Self;
12092    #[allow(rustdoc::invalid_html_tags)]
12093    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
12094    #[allow(clippy::needless_lifetimes)]
12095    fn get_others_can_add_tasks<'a>(&'a self) -> Option<bool>;
12096    #[allow(rustdoc::invalid_html_tags)]
12097    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
12098    #[allow(clippy::needless_lifetimes)]
12099    fn set_others_can_add_tasks<'a>(
12100        &'a mut self,
12101        others_can_add_tasks: Option<bool>,
12102    ) -> &'a mut Self;
12103    #[allow(rustdoc::invalid_html_tags)]
12104    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
12105    #[allow(clippy::needless_lifetimes)]
12106    fn get_others_can_mark_tasks_as_done<'a>(&'a self) -> Option<bool>;
12107    #[allow(rustdoc::invalid_html_tags)]
12108    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
12109    #[allow(clippy::needless_lifetimes)]
12110    fn set_others_can_mark_tasks_as_done<'a>(
12111        &'a mut self,
12112        others_can_mark_tasks_as_done: Option<bool>,
12113    ) -> &'a mut Self;
12114}
12115#[allow(dead_code)]
12116trait TraitSuggestedPostInfo {
12117    #[allow(rustdoc::invalid_html_tags)]
12118    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
12119    #[allow(clippy::needless_lifetimes)]
12120    fn get_state<'a>(&'a self) -> &'a str;
12121    #[allow(rustdoc::invalid_html_tags)]
12122    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
12123    #[allow(clippy::needless_lifetimes)]
12124    fn set_state<'a>(&'a mut self, state: String) -> &'a mut Self;
12125    #[allow(rustdoc::invalid_html_tags)]
12126    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
12127    #[allow(clippy::needless_lifetimes)]
12128    fn get_price<'a>(&'a self) -> Option<&'a SuggestedPostPrice>;
12129    #[allow(rustdoc::invalid_html_tags)]
12130    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
12131    #[allow(clippy::needless_lifetimes)]
12132    fn set_price<'a>(&'a mut self, price: Option<SuggestedPostPrice>) -> &'a mut Self;
12133    #[allow(rustdoc::invalid_html_tags)]
12134    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
12135    #[allow(clippy::needless_lifetimes)]
12136    fn get_send_date<'a>(&'a self) -> Option<i64>;
12137    #[allow(rustdoc::invalid_html_tags)]
12138    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
12139    #[allow(clippy::needless_lifetimes)]
12140    fn set_send_date<'a>(&'a mut self, send_date: Option<i64>) -> &'a mut Self;
12141}
12142#[allow(dead_code)]
12143trait TraitSwitchInlineQueryChosenChat {
12144    #[allow(rustdoc::invalid_html_tags)]
12145    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
12146    #[allow(clippy::needless_lifetimes)]
12147    fn get_query<'a>(&'a self) -> Option<&'a str>;
12148    #[allow(rustdoc::invalid_html_tags)]
12149    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
12150    #[allow(clippy::needless_lifetimes)]
12151    fn set_query<'a>(&'a mut self, query: Option<String>) -> &'a mut Self;
12152    #[allow(rustdoc::invalid_html_tags)]
12153    #[doc = "Optional. True, if private chats with users can be chosen"]
12154    #[allow(clippy::needless_lifetimes)]
12155    fn get_allow_user_chats<'a>(&'a self) -> Option<bool>;
12156    #[allow(rustdoc::invalid_html_tags)]
12157    #[doc = "Optional. True, if private chats with users can be chosen"]
12158    #[allow(clippy::needless_lifetimes)]
12159    fn set_allow_user_chats<'a>(&'a mut self, allow_user_chats: Option<bool>) -> &'a mut Self;
12160    #[allow(rustdoc::invalid_html_tags)]
12161    #[doc = "Optional. True, if private chats with bots can be chosen"]
12162    #[allow(clippy::needless_lifetimes)]
12163    fn get_allow_bot_chats<'a>(&'a self) -> Option<bool>;
12164    #[allow(rustdoc::invalid_html_tags)]
12165    #[doc = "Optional. True, if private chats with bots can be chosen"]
12166    #[allow(clippy::needless_lifetimes)]
12167    fn set_allow_bot_chats<'a>(&'a mut self, allow_bot_chats: Option<bool>) -> &'a mut Self;
12168    #[allow(rustdoc::invalid_html_tags)]
12169    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
12170    #[allow(clippy::needless_lifetimes)]
12171    fn get_allow_group_chats<'a>(&'a self) -> Option<bool>;
12172    #[allow(rustdoc::invalid_html_tags)]
12173    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
12174    #[allow(clippy::needless_lifetimes)]
12175    fn set_allow_group_chats<'a>(&'a mut self, allow_group_chats: Option<bool>) -> &'a mut Self;
12176    #[allow(rustdoc::invalid_html_tags)]
12177    #[doc = "Optional. True, if channel chats can be chosen"]
12178    #[allow(clippy::needless_lifetimes)]
12179    fn get_allow_channel_chats<'a>(&'a self) -> Option<bool>;
12180    #[allow(rustdoc::invalid_html_tags)]
12181    #[doc = "Optional. True, if channel chats can be chosen"]
12182    #[allow(clippy::needless_lifetimes)]
12183    fn set_allow_channel_chats<'a>(&'a mut self, allow_channel_chats: Option<bool>)
12184        -> &'a mut Self;
12185}
12186#[allow(dead_code)]
12187trait TraitAcceptedGiftTypes {
12188    #[allow(rustdoc::invalid_html_tags)]
12189    #[doc = "True, if unlimited regular gifts are accepted"]
12190    #[allow(clippy::needless_lifetimes)]
12191    fn get_unlimited_gifts<'a>(&'a self) -> bool;
12192    #[allow(rustdoc::invalid_html_tags)]
12193    #[doc = "True, if unlimited regular gifts are accepted"]
12194    #[allow(clippy::needless_lifetimes)]
12195    fn set_unlimited_gifts<'a>(&'a mut self, unlimited_gifts: bool) -> &'a mut Self;
12196    #[allow(rustdoc::invalid_html_tags)]
12197    #[doc = "True, if limited regular gifts are accepted"]
12198    #[allow(clippy::needless_lifetimes)]
12199    fn get_limited_gifts<'a>(&'a self) -> bool;
12200    #[allow(rustdoc::invalid_html_tags)]
12201    #[doc = "True, if limited regular gifts are accepted"]
12202    #[allow(clippy::needless_lifetimes)]
12203    fn set_limited_gifts<'a>(&'a mut self, limited_gifts: bool) -> &'a mut Self;
12204    #[allow(rustdoc::invalid_html_tags)]
12205    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
12206    #[allow(clippy::needless_lifetimes)]
12207    fn get_unique_gifts<'a>(&'a self) -> bool;
12208    #[allow(rustdoc::invalid_html_tags)]
12209    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
12210    #[allow(clippy::needless_lifetimes)]
12211    fn set_unique_gifts<'a>(&'a mut self, unique_gifts: bool) -> &'a mut Self;
12212    #[allow(rustdoc::invalid_html_tags)]
12213    #[doc = "True, if a Telegram Premium subscription is accepted"]
12214    #[allow(clippy::needless_lifetimes)]
12215    fn get_premium_subscription<'a>(&'a self) -> bool;
12216    #[allow(rustdoc::invalid_html_tags)]
12217    #[doc = "True, if a Telegram Premium subscription is accepted"]
12218    #[allow(clippy::needless_lifetimes)]
12219    fn set_premium_subscription<'a>(&'a mut self, premium_subscription: bool) -> &'a mut Self;
12220}
12221#[allow(dead_code)]
12222trait TraitPassportElementErrorTranslationFile {
12223    #[allow(rustdoc::invalid_html_tags)]
12224    #[doc = "Error source, must be translation_file"]
12225    #[allow(clippy::needless_lifetimes)]
12226    fn get_source<'a>(&'a self) -> &'a str;
12227    #[allow(rustdoc::invalid_html_tags)]
12228    #[doc = "Error source, must be translation_file"]
12229    #[allow(clippy::needless_lifetimes)]
12230    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
12231    #[allow(rustdoc::invalid_html_tags)]
12232    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
12233    #[allow(clippy::needless_lifetimes)]
12234    fn get_tg_type<'a>(&'a self) -> &'a str;
12235    #[allow(rustdoc::invalid_html_tags)]
12236    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
12237    #[allow(clippy::needless_lifetimes)]
12238    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12239    #[allow(rustdoc::invalid_html_tags)]
12240    #[doc = "Base64-encoded file hash"]
12241    #[allow(clippy::needless_lifetimes)]
12242    fn get_file_hash<'a>(&'a self) -> &'a str;
12243    #[allow(rustdoc::invalid_html_tags)]
12244    #[doc = "Base64-encoded file hash"]
12245    #[allow(clippy::needless_lifetimes)]
12246    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self;
12247    #[allow(rustdoc::invalid_html_tags)]
12248    #[doc = "Error message"]
12249    #[allow(clippy::needless_lifetimes)]
12250    fn get_message<'a>(&'a self) -> &'a str;
12251    #[allow(rustdoc::invalid_html_tags)]
12252    #[doc = "Error message"]
12253    #[allow(clippy::needless_lifetimes)]
12254    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
12255}
12256#[allow(dead_code)]
12257trait TraitBusinessLocation {
12258    #[allow(rustdoc::invalid_html_tags)]
12259    #[doc = "Address of the business"]
12260    #[allow(clippy::needless_lifetimes)]
12261    fn get_address<'a>(&'a self) -> &'a str;
12262    #[allow(rustdoc::invalid_html_tags)]
12263    #[doc = "Address of the business"]
12264    #[allow(clippy::needless_lifetimes)]
12265    fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self;
12266    #[allow(rustdoc::invalid_html_tags)]
12267    #[doc = "Optional. Location of the business"]
12268    #[allow(clippy::needless_lifetimes)]
12269    fn get_location<'a>(&'a self) -> Option<&'a Location>;
12270    #[allow(rustdoc::invalid_html_tags)]
12271    #[doc = "Optional. Location of the business"]
12272    #[allow(clippy::needless_lifetimes)]
12273    fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self;
12274}
12275#[allow(dead_code)]
12276trait TraitAffiliateInfo {
12277    #[allow(rustdoc::invalid_html_tags)]
12278    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
12279    #[allow(clippy::needless_lifetimes)]
12280    fn get_affiliate_user<'a>(&'a self) -> Option<&'a User>;
12281    #[allow(rustdoc::invalid_html_tags)]
12282    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
12283    #[allow(clippy::needless_lifetimes)]
12284    fn set_affiliate_user<'a>(&'a mut self, affiliate_user: Option<User>) -> &'a mut Self;
12285    #[allow(rustdoc::invalid_html_tags)]
12286    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
12287    #[allow(clippy::needless_lifetimes)]
12288    fn get_affiliate_chat<'a>(&'a self) -> Option<&'a Chat>;
12289    #[allow(rustdoc::invalid_html_tags)]
12290    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
12291    #[allow(clippy::needless_lifetimes)]
12292    fn set_affiliate_chat<'a>(&'a mut self, affiliate_chat: Option<Chat>) -> &'a mut Self;
12293    #[allow(rustdoc::invalid_html_tags)]
12294    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
12295    #[allow(clippy::needless_lifetimes)]
12296    fn get_commission_per_mille<'a>(&'a self) -> i64;
12297    #[allow(rustdoc::invalid_html_tags)]
12298    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
12299    #[allow(clippy::needless_lifetimes)]
12300    fn set_commission_per_mille<'a>(&'a mut self, commission_per_mille: i64) -> &'a mut Self;
12301    #[allow(rustdoc::invalid_html_tags)]
12302    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
12303    #[allow(clippy::needless_lifetimes)]
12304    fn get_amount<'a>(&'a self) -> i64;
12305    #[allow(rustdoc::invalid_html_tags)]
12306    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
12307    #[allow(clippy::needless_lifetimes)]
12308    fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self;
12309    #[allow(rustdoc::invalid_html_tags)]
12310    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
12311    #[allow(clippy::needless_lifetimes)]
12312    fn get_nanostar_amount<'a>(&'a self) -> Option<i64>;
12313    #[allow(rustdoc::invalid_html_tags)]
12314    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
12315    #[allow(clippy::needless_lifetimes)]
12316    fn set_nanostar_amount<'a>(&'a mut self, nanostar_amount: Option<i64>) -> &'a mut Self;
12317}
12318#[allow(dead_code)]
12319trait TraitMessageOriginChat {
12320    #[allow(rustdoc::invalid_html_tags)]
12321    #[doc = "Type of the message origin, always \"chat\""]
12322    #[allow(clippy::needless_lifetimes)]
12323    fn get_tg_type<'a>(&'a self) -> &'a str;
12324    #[allow(rustdoc::invalid_html_tags)]
12325    #[doc = "Type of the message origin, always \"chat\""]
12326    #[allow(clippy::needless_lifetimes)]
12327    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12328    #[allow(rustdoc::invalid_html_tags)]
12329    #[doc = "Date the message was sent originally in Unix time"]
12330    #[allow(clippy::needless_lifetimes)]
12331    fn get_date<'a>(&'a self) -> i64;
12332    #[allow(rustdoc::invalid_html_tags)]
12333    #[doc = "Date the message was sent originally in Unix time"]
12334    #[allow(clippy::needless_lifetimes)]
12335    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
12336    #[allow(rustdoc::invalid_html_tags)]
12337    #[doc = "Chat that sent the message originally"]
12338    #[allow(clippy::needless_lifetimes)]
12339    fn get_sender_chat<'a>(&'a self) -> &'a Chat;
12340    #[allow(rustdoc::invalid_html_tags)]
12341    #[doc = "Chat that sent the message originally"]
12342    #[allow(clippy::needless_lifetimes)]
12343    fn set_sender_chat<'a>(&'a mut self, sender_chat: Chat) -> &'a mut Self;
12344    #[allow(rustdoc::invalid_html_tags)]
12345    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
12346    #[allow(clippy::needless_lifetimes)]
12347    fn get_author_signature<'a>(&'a self) -> Option<&'a str>;
12348    #[allow(rustdoc::invalid_html_tags)]
12349    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
12350    #[allow(clippy::needless_lifetimes)]
12351    fn set_author_signature<'a>(&'a mut self, author_signature: Option<String>) -> &'a mut Self;
12352}
12353#[allow(dead_code)]
12354trait TraitBotCommandScopeChat {
12355    #[allow(rustdoc::invalid_html_tags)]
12356    #[doc = "Scope type, must be chat"]
12357    #[allow(clippy::needless_lifetimes)]
12358    fn get_tg_type<'a>(&'a self) -> &'a str;
12359    #[allow(rustdoc::invalid_html_tags)]
12360    #[doc = "Scope type, must be chat"]
12361    #[allow(clippy::needless_lifetimes)]
12362    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12363    #[allow(rustdoc::invalid_html_tags)]
12364    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
12365    #[allow(clippy::needless_lifetimes)]
12366    fn get_chat_id<'a>(&'a self) -> &'a ChatHandle;
12367    #[allow(rustdoc::invalid_html_tags)]
12368    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
12369    #[allow(clippy::needless_lifetimes)]
12370    fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self;
12371}
12372#[allow(dead_code)]
12373trait TraitPassportElementErrorReverseSide {
12374    #[allow(rustdoc::invalid_html_tags)]
12375    #[doc = "Error source, must be reverse_side"]
12376    #[allow(clippy::needless_lifetimes)]
12377    fn get_source<'a>(&'a self) -> &'a str;
12378    #[allow(rustdoc::invalid_html_tags)]
12379    #[doc = "Error source, must be reverse_side"]
12380    #[allow(clippy::needless_lifetimes)]
12381    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self;
12382    #[allow(rustdoc::invalid_html_tags)]
12383    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
12384    #[allow(clippy::needless_lifetimes)]
12385    fn get_tg_type<'a>(&'a self) -> &'a str;
12386    #[allow(rustdoc::invalid_html_tags)]
12387    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
12388    #[allow(clippy::needless_lifetimes)]
12389    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12390    #[allow(rustdoc::invalid_html_tags)]
12391    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
12392    #[allow(clippy::needless_lifetimes)]
12393    fn get_file_hash<'a>(&'a self) -> &'a str;
12394    #[allow(rustdoc::invalid_html_tags)]
12395    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
12396    #[allow(clippy::needless_lifetimes)]
12397    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self;
12398    #[allow(rustdoc::invalid_html_tags)]
12399    #[doc = "Error message"]
12400    #[allow(clippy::needless_lifetimes)]
12401    fn get_message<'a>(&'a self) -> &'a str;
12402    #[allow(rustdoc::invalid_html_tags)]
12403    #[doc = "Error message"]
12404    #[allow(clippy::needless_lifetimes)]
12405    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self;
12406}
12407#[allow(dead_code)]
12408trait TraitInlineQueryResultPhoto {
12409    #[allow(rustdoc::invalid_html_tags)]
12410    #[doc = "Type of the result, must be photo"]
12411    #[allow(clippy::needless_lifetimes)]
12412    fn get_tg_type<'a>(&'a self) -> &'a str;
12413    #[allow(rustdoc::invalid_html_tags)]
12414    #[doc = "Type of the result, must be photo"]
12415    #[allow(clippy::needless_lifetimes)]
12416    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12417    #[allow(rustdoc::invalid_html_tags)]
12418    #[doc = "Unique identifier for this result, 1-64 bytes"]
12419    #[allow(clippy::needless_lifetimes)]
12420    fn get_id<'a>(&'a self) -> &'a str;
12421    #[allow(rustdoc::invalid_html_tags)]
12422    #[doc = "Unique identifier for this result, 1-64 bytes"]
12423    #[allow(clippy::needless_lifetimes)]
12424    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self;
12425    #[allow(rustdoc::invalid_html_tags)]
12426    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
12427    #[allow(clippy::needless_lifetimes)]
12428    fn get_photo_url<'a>(&'a self) -> &'a str;
12429    #[allow(rustdoc::invalid_html_tags)]
12430    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
12431    #[allow(clippy::needless_lifetimes)]
12432    fn set_photo_url<'a>(&'a mut self, photo_url: String) -> &'a mut Self;
12433    #[allow(rustdoc::invalid_html_tags)]
12434    #[doc = "URL of the thumbnail for the photo"]
12435    #[allow(clippy::needless_lifetimes)]
12436    fn get_thumbnail_url<'a>(&'a self) -> &'a str;
12437    #[allow(rustdoc::invalid_html_tags)]
12438    #[doc = "URL of the thumbnail for the photo"]
12439    #[allow(clippy::needless_lifetimes)]
12440    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self;
12441    #[allow(rustdoc::invalid_html_tags)]
12442    #[doc = "Optional. Width of the photo"]
12443    #[allow(clippy::needless_lifetimes)]
12444    fn get_photo_width<'a>(&'a self) -> Option<i64>;
12445    #[allow(rustdoc::invalid_html_tags)]
12446    #[doc = "Optional. Width of the photo"]
12447    #[allow(clippy::needless_lifetimes)]
12448    fn set_photo_width<'a>(&'a mut self, photo_width: Option<i64>) -> &'a mut Self;
12449    #[allow(rustdoc::invalid_html_tags)]
12450    #[doc = "Optional. Height of the photo"]
12451    #[allow(clippy::needless_lifetimes)]
12452    fn get_photo_height<'a>(&'a self) -> Option<i64>;
12453    #[allow(rustdoc::invalid_html_tags)]
12454    #[doc = "Optional. Height of the photo"]
12455    #[allow(clippy::needless_lifetimes)]
12456    fn set_photo_height<'a>(&'a mut self, photo_height: Option<i64>) -> &'a mut Self;
12457    #[allow(rustdoc::invalid_html_tags)]
12458    #[doc = "Optional. Title for the result"]
12459    #[allow(clippy::needless_lifetimes)]
12460    fn get_title<'a>(&'a self) -> Option<&'a str>;
12461    #[allow(rustdoc::invalid_html_tags)]
12462    #[doc = "Optional. Title for the result"]
12463    #[allow(clippy::needless_lifetimes)]
12464    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self;
12465    #[allow(rustdoc::invalid_html_tags)]
12466    #[doc = "Optional. Short description of the result"]
12467    #[allow(clippy::needless_lifetimes)]
12468    fn get_description<'a>(&'a self) -> Option<&'a str>;
12469    #[allow(rustdoc::invalid_html_tags)]
12470    #[doc = "Optional. Short description of the result"]
12471    #[allow(clippy::needless_lifetimes)]
12472    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self;
12473    #[allow(rustdoc::invalid_html_tags)]
12474    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
12475    #[allow(clippy::needless_lifetimes)]
12476    fn get_caption<'a>(&'a self) -> Option<&'a str>;
12477    #[allow(rustdoc::invalid_html_tags)]
12478    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
12479    #[allow(clippy::needless_lifetimes)]
12480    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self;
12481    #[allow(rustdoc::invalid_html_tags)]
12482    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
12483    #[allow(clippy::needless_lifetimes)]
12484    fn get_parse_mode<'a>(&'a self) -> Option<&'a str>;
12485    #[allow(rustdoc::invalid_html_tags)]
12486    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
12487    #[allow(clippy::needless_lifetimes)]
12488    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self;
12489    #[allow(rustdoc::invalid_html_tags)]
12490    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
12491    #[allow(clippy::needless_lifetimes)]
12492    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
12493    #[allow(rustdoc::invalid_html_tags)]
12494    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
12495    #[allow(clippy::needless_lifetimes)]
12496    fn set_caption_entities<'a>(
12497        &'a mut self,
12498        caption_entities: Option<Vec<MessageEntity>>,
12499    ) -> &'a mut Self;
12500    #[allow(rustdoc::invalid_html_tags)]
12501    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
12502    #[allow(clippy::needless_lifetimes)]
12503    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>;
12504    #[allow(rustdoc::invalid_html_tags)]
12505    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
12506    #[allow(clippy::needless_lifetimes)]
12507    fn set_show_caption_above_media<'a>(
12508        &'a mut self,
12509        show_caption_above_media: Option<bool>,
12510    ) -> &'a mut Self;
12511    #[allow(rustdoc::invalid_html_tags)]
12512    #[doc = "Optional. Inline keyboard attached to the message"]
12513    #[allow(clippy::needless_lifetimes)]
12514    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>;
12515    #[allow(rustdoc::invalid_html_tags)]
12516    #[doc = "Optional. Inline keyboard attached to the message"]
12517    #[allow(clippy::needless_lifetimes)]
12518    fn set_reply_markup<'a>(
12519        &'a mut self,
12520        reply_markup: Option<InlineKeyboardMarkup>,
12521    ) -> &'a mut Self;
12522    #[allow(rustdoc::invalid_html_tags)]
12523    #[doc = "Optional. Content of the message to be sent instead of the photo"]
12524    #[allow(clippy::needless_lifetimes)]
12525    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent>;
12526    #[allow(rustdoc::invalid_html_tags)]
12527    #[doc = "Optional. Content of the message to be sent instead of the photo"]
12528    #[allow(clippy::needless_lifetimes)]
12529    fn set_input_message_content<'a>(
12530        &'a mut self,
12531        input_message_content: Option<InputMessageContent>,
12532    ) -> &'a mut Self;
12533}
12534#[allow(dead_code)]
12535trait TraitStoryAreaTypeLink {
12536    #[allow(rustdoc::invalid_html_tags)]
12537    #[doc = "Type of the area, always \"link\""]
12538    #[allow(clippy::needless_lifetimes)]
12539    fn get_tg_type<'a>(&'a self) -> &'a str;
12540    #[allow(rustdoc::invalid_html_tags)]
12541    #[doc = "Type of the area, always \"link\""]
12542    #[allow(clippy::needless_lifetimes)]
12543    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12544    #[allow(rustdoc::invalid_html_tags)]
12545    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
12546    #[allow(clippy::needless_lifetimes)]
12547    fn get_url<'a>(&'a self) -> &'a str;
12548    #[allow(rustdoc::invalid_html_tags)]
12549    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
12550    #[allow(clippy::needless_lifetimes)]
12551    fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self;
12552}
12553#[allow(dead_code)]
12554trait TraitInputSticker {
12555    #[allow(rustdoc::invalid_html_tags)]
12556    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
12557    #[allow(clippy::needless_lifetimes)]
12558    fn get_sticker<'a>(&'a self) -> &'a str;
12559    #[allow(rustdoc::invalid_html_tags)]
12560    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
12561    #[allow(clippy::needless_lifetimes)]
12562    fn set_sticker<'a>(&'a mut self, sticker: String) -> &'a mut Self;
12563    #[allow(rustdoc::invalid_html_tags)]
12564    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
12565    #[allow(clippy::needless_lifetimes)]
12566    fn get_format<'a>(&'a self) -> &'a str;
12567    #[allow(rustdoc::invalid_html_tags)]
12568    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
12569    #[allow(clippy::needless_lifetimes)]
12570    fn set_format<'a>(&'a mut self, format: String) -> &'a mut Self;
12571    #[allow(rustdoc::invalid_html_tags)]
12572    #[doc = "List of 1-20 emoji associated with the sticker"]
12573    #[allow(clippy::needless_lifetimes)]
12574    fn get_emoji_list<'a>(&'a self) -> &'a Vec<String>;
12575    #[allow(rustdoc::invalid_html_tags)]
12576    #[doc = "List of 1-20 emoji associated with the sticker"]
12577    #[allow(clippy::needless_lifetimes)]
12578    fn set_emoji_list<'a>(&'a mut self, emoji_list: Vec<String>) -> &'a mut Self;
12579    #[allow(rustdoc::invalid_html_tags)]
12580    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
12581    #[allow(clippy::needless_lifetimes)]
12582    fn get_mask_position<'a>(&'a self) -> Option<&'a MaskPosition>;
12583    #[allow(rustdoc::invalid_html_tags)]
12584    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
12585    #[allow(clippy::needless_lifetimes)]
12586    fn set_mask_position<'a>(&'a mut self, mask_position: Option<MaskPosition>) -> &'a mut Self;
12587    #[allow(rustdoc::invalid_html_tags)]
12588    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
12589    #[allow(clippy::needless_lifetimes)]
12590    fn get_keywords<'a>(&'a self) -> Option<&'a Vec<String>>;
12591    #[allow(rustdoc::invalid_html_tags)]
12592    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
12593    #[allow(clippy::needless_lifetimes)]
12594    fn set_keywords<'a>(&'a mut self, keywords: Option<Vec<String>>) -> &'a mut Self;
12595}
12596#[allow(dead_code)]
12597trait TraitInputPaidMediaPhoto {
12598    #[allow(rustdoc::invalid_html_tags)]
12599    #[doc = "Type of the media, must be photo"]
12600    #[allow(clippy::needless_lifetimes)]
12601    fn get_tg_type<'a>(&'a self) -> &'a str;
12602    #[allow(rustdoc::invalid_html_tags)]
12603    #[doc = "Type of the media, must be photo"]
12604    #[allow(clippy::needless_lifetimes)]
12605    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12606    #[allow(rustdoc::invalid_html_tags)]
12607    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
12608    #[allow(clippy::needless_lifetimes)]
12609    fn get_media<'a>(&'a self) -> &'a String;
12610    #[allow(rustdoc::invalid_html_tags)]
12611    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
12612    #[allow(clippy::needless_lifetimes)]
12613    fn set_media<'a>(&'a mut self, media: String) -> &'a mut Self;
12614}
12615#[allow(dead_code)]
12616trait TraitInputProfilePhotoStatic {
12617    #[allow(rustdoc::invalid_html_tags)]
12618    #[doc = "Type of the profile photo, must be static"]
12619    #[allow(clippy::needless_lifetimes)]
12620    fn get_tg_type<'a>(&'a self) -> &'a str;
12621    #[allow(rustdoc::invalid_html_tags)]
12622    #[doc = "Type of the profile photo, must be static"]
12623    #[allow(clippy::needless_lifetimes)]
12624    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12625    #[allow(rustdoc::invalid_html_tags)]
12626    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
12627    #[allow(clippy::needless_lifetimes)]
12628    fn get_photo<'a>(&'a self) -> &'a str;
12629    #[allow(rustdoc::invalid_html_tags)]
12630    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
12631    #[allow(clippy::needless_lifetimes)]
12632    fn set_photo<'a>(&'a mut self, photo: String) -> &'a mut Self;
12633}
12634#[allow(dead_code)]
12635trait TraitTransactionPartnerChat {
12636    #[allow(rustdoc::invalid_html_tags)]
12637    #[doc = "Type of the transaction partner, always \"chat\""]
12638    #[allow(clippy::needless_lifetimes)]
12639    fn get_tg_type<'a>(&'a self) -> &'a str;
12640    #[allow(rustdoc::invalid_html_tags)]
12641    #[doc = "Type of the transaction partner, always \"chat\""]
12642    #[allow(clippy::needless_lifetimes)]
12643    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12644    #[allow(rustdoc::invalid_html_tags)]
12645    #[doc = "Information about the chat"]
12646    #[allow(clippy::needless_lifetimes)]
12647    fn get_chat<'a>(&'a self) -> &'a Chat;
12648    #[allow(rustdoc::invalid_html_tags)]
12649    #[doc = "Information about the chat"]
12650    #[allow(clippy::needless_lifetimes)]
12651    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
12652    #[allow(rustdoc::invalid_html_tags)]
12653    #[doc = "Optional. The gift sent to the chat by the bot"]
12654    #[allow(clippy::needless_lifetimes)]
12655    fn get_gift<'a>(&'a self) -> Option<&'a Gift>;
12656    #[allow(rustdoc::invalid_html_tags)]
12657    #[doc = "Optional. The gift sent to the chat by the bot"]
12658    #[allow(clippy::needless_lifetimes)]
12659    fn set_gift<'a>(&'a mut self, gift: Option<Gift>) -> &'a mut Self;
12660}
12661#[allow(dead_code)]
12662trait TraitBotCommandScopeChatAdministrators {
12663    #[allow(rustdoc::invalid_html_tags)]
12664    #[doc = "Scope type, must be chat_administrators"]
12665    #[allow(clippy::needless_lifetimes)]
12666    fn get_tg_type<'a>(&'a self) -> &'a str;
12667    #[allow(rustdoc::invalid_html_tags)]
12668    #[doc = "Scope type, must be chat_administrators"]
12669    #[allow(clippy::needless_lifetimes)]
12670    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12671    #[allow(rustdoc::invalid_html_tags)]
12672    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
12673    #[allow(clippy::needless_lifetimes)]
12674    fn get_chat_id<'a>(&'a self) -> &'a ChatHandle;
12675    #[allow(rustdoc::invalid_html_tags)]
12676    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
12677    #[allow(clippy::needless_lifetimes)]
12678    fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self;
12679}
12680#[allow(dead_code)]
12681trait TraitForumTopicClosed {}
12682#[allow(dead_code)]
12683trait TraitPaidMediaPurchased {
12684    #[allow(rustdoc::invalid_html_tags)]
12685    #[doc = "User who purchased the media"]
12686    #[allow(clippy::needless_lifetimes)]
12687    fn get_from<'a>(&'a self) -> &'a User;
12688    #[allow(rustdoc::invalid_html_tags)]
12689    #[doc = "User who purchased the media"]
12690    #[allow(clippy::needless_lifetimes)]
12691    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
12692    #[allow(rustdoc::invalid_html_tags)]
12693    #[doc = "Bot-specified paid media payload"]
12694    #[allow(clippy::needless_lifetimes)]
12695    fn get_paid_media_payload<'a>(&'a self) -> &'a str;
12696    #[allow(rustdoc::invalid_html_tags)]
12697    #[doc = "Bot-specified paid media payload"]
12698    #[allow(clippy::needless_lifetimes)]
12699    fn set_paid_media_payload<'a>(&'a mut self, paid_media_payload: String) -> &'a mut Self;
12700}
12701#[allow(dead_code)]
12702trait TraitChatLocation {
12703    #[allow(rustdoc::invalid_html_tags)]
12704    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
12705    #[allow(clippy::needless_lifetimes)]
12706    fn get_location<'a>(&'a self) -> &'a Location;
12707    #[allow(rustdoc::invalid_html_tags)]
12708    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
12709    #[allow(clippy::needless_lifetimes)]
12710    fn set_location<'a>(&'a mut self, location: Location) -> &'a mut Self;
12711    #[allow(rustdoc::invalid_html_tags)]
12712    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
12713    #[allow(clippy::needless_lifetimes)]
12714    fn get_address<'a>(&'a self) -> &'a str;
12715    #[allow(rustdoc::invalid_html_tags)]
12716    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
12717    #[allow(clippy::needless_lifetimes)]
12718    fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self;
12719}
12720#[allow(dead_code)]
12721trait TraitVideoChatStarted {}
12722#[allow(dead_code)]
12723trait TraitChatMemberUpdated {
12724    #[allow(rustdoc::invalid_html_tags)]
12725    #[doc = "Chat the user belongs to"]
12726    #[allow(clippy::needless_lifetimes)]
12727    fn get_chat<'a>(&'a self) -> &'a Chat;
12728    #[allow(rustdoc::invalid_html_tags)]
12729    #[doc = "Chat the user belongs to"]
12730    #[allow(clippy::needless_lifetimes)]
12731    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self;
12732    #[allow(rustdoc::invalid_html_tags)]
12733    #[doc = "Performer of the action, which resulted in the change"]
12734    #[allow(clippy::needless_lifetimes)]
12735    fn get_from<'a>(&'a self) -> &'a User;
12736    #[allow(rustdoc::invalid_html_tags)]
12737    #[doc = "Performer of the action, which resulted in the change"]
12738    #[allow(clippy::needless_lifetimes)]
12739    fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self;
12740    #[allow(rustdoc::invalid_html_tags)]
12741    #[doc = "Date the change was done in Unix time"]
12742    #[allow(clippy::needless_lifetimes)]
12743    fn get_date<'a>(&'a self) -> i64;
12744    #[allow(rustdoc::invalid_html_tags)]
12745    #[doc = "Date the change was done in Unix time"]
12746    #[allow(clippy::needless_lifetimes)]
12747    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self;
12748    #[allow(rustdoc::invalid_html_tags)]
12749    #[doc = "Previous information about the chat member"]
12750    #[allow(clippy::needless_lifetimes)]
12751    fn get_old_chat_member<'a>(&'a self) -> &'a ChatMember;
12752    #[allow(rustdoc::invalid_html_tags)]
12753    #[doc = "Previous information about the chat member"]
12754    #[allow(clippy::needless_lifetimes)]
12755    fn set_old_chat_member<'a>(&'a mut self, old_chat_member: ChatMember) -> &'a mut Self;
12756    #[allow(rustdoc::invalid_html_tags)]
12757    #[doc = "New information about the chat member"]
12758    #[allow(clippy::needless_lifetimes)]
12759    fn get_new_chat_member<'a>(&'a self) -> &'a ChatMember;
12760    #[allow(rustdoc::invalid_html_tags)]
12761    #[doc = "New information about the chat member"]
12762    #[allow(clippy::needless_lifetimes)]
12763    fn set_new_chat_member<'a>(&'a mut self, new_chat_member: ChatMember) -> &'a mut Self;
12764    #[allow(rustdoc::invalid_html_tags)]
12765    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
12766    #[allow(clippy::needless_lifetimes)]
12767    fn get_invite_link<'a>(&'a self) -> Option<&'a ChatInviteLink>;
12768    #[allow(rustdoc::invalid_html_tags)]
12769    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
12770    #[allow(clippy::needless_lifetimes)]
12771    fn set_invite_link<'a>(&'a mut self, invite_link: Option<ChatInviteLink>) -> &'a mut Self;
12772    #[allow(rustdoc::invalid_html_tags)]
12773    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
12774    #[allow(clippy::needless_lifetimes)]
12775    fn get_via_join_request<'a>(&'a self) -> Option<bool>;
12776    #[allow(rustdoc::invalid_html_tags)]
12777    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
12778    #[allow(clippy::needless_lifetimes)]
12779    fn set_via_join_request<'a>(&'a mut self, via_join_request: Option<bool>) -> &'a mut Self;
12780    #[allow(rustdoc::invalid_html_tags)]
12781    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
12782    #[allow(clippy::needless_lifetimes)]
12783    fn get_via_chat_folder_invite_link<'a>(&'a self) -> Option<bool>;
12784    #[allow(rustdoc::invalid_html_tags)]
12785    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
12786    #[allow(clippy::needless_lifetimes)]
12787    fn set_via_chat_folder_invite_link<'a>(
12788        &'a mut self,
12789        via_chat_folder_invite_link: Option<bool>,
12790    ) -> &'a mut Self;
12791}
12792#[allow(dead_code)]
12793trait TraitVenue {
12794    #[allow(rustdoc::invalid_html_tags)]
12795    #[doc = "Venue location. Can't be a live location"]
12796    #[allow(clippy::needless_lifetimes)]
12797    fn get_location<'a>(&'a self) -> &'a Location;
12798    #[allow(rustdoc::invalid_html_tags)]
12799    #[doc = "Venue location. Can't be a live location"]
12800    #[allow(clippy::needless_lifetimes)]
12801    fn set_location<'a>(&'a mut self, location: Location) -> &'a mut Self;
12802    #[allow(rustdoc::invalid_html_tags)]
12803    #[doc = "Name of the venue"]
12804    #[allow(clippy::needless_lifetimes)]
12805    fn get_title<'a>(&'a self) -> &'a str;
12806    #[allow(rustdoc::invalid_html_tags)]
12807    #[doc = "Name of the venue"]
12808    #[allow(clippy::needless_lifetimes)]
12809    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self;
12810    #[allow(rustdoc::invalid_html_tags)]
12811    #[doc = "Address of the venue"]
12812    #[allow(clippy::needless_lifetimes)]
12813    fn get_address<'a>(&'a self) -> &'a str;
12814    #[allow(rustdoc::invalid_html_tags)]
12815    #[doc = "Address of the venue"]
12816    #[allow(clippy::needless_lifetimes)]
12817    fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self;
12818    #[allow(rustdoc::invalid_html_tags)]
12819    #[doc = "Optional. Foursquare identifier of the venue"]
12820    #[allow(clippy::needless_lifetimes)]
12821    fn get_foursquare_id<'a>(&'a self) -> Option<&'a str>;
12822    #[allow(rustdoc::invalid_html_tags)]
12823    #[doc = "Optional. Foursquare identifier of the venue"]
12824    #[allow(clippy::needless_lifetimes)]
12825    fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self;
12826    #[allow(rustdoc::invalid_html_tags)]
12827    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
12828    #[allow(clippy::needless_lifetimes)]
12829    fn get_foursquare_type<'a>(&'a self) -> Option<&'a str>;
12830    #[allow(rustdoc::invalid_html_tags)]
12831    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
12832    #[allow(clippy::needless_lifetimes)]
12833    fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self;
12834    #[allow(rustdoc::invalid_html_tags)]
12835    #[doc = "Optional. Google Places identifier of the venue"]
12836    #[allow(clippy::needless_lifetimes)]
12837    fn get_google_place_id<'a>(&'a self) -> Option<&'a str>;
12838    #[allow(rustdoc::invalid_html_tags)]
12839    #[doc = "Optional. Google Places identifier of the venue"]
12840    #[allow(clippy::needless_lifetimes)]
12841    fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self;
12842    #[allow(rustdoc::invalid_html_tags)]
12843    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
12844    #[allow(clippy::needless_lifetimes)]
12845    fn get_google_place_type<'a>(&'a self) -> Option<&'a str>;
12846    #[allow(rustdoc::invalid_html_tags)]
12847    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
12848    #[allow(clippy::needless_lifetimes)]
12849    fn set_google_place_type<'a>(&'a mut self, google_place_type: Option<String>) -> &'a mut Self;
12850}
12851#[allow(dead_code)]
12852trait TraitChatBoostAdded {
12853    #[allow(rustdoc::invalid_html_tags)]
12854    #[doc = "Number of boosts added by the user"]
12855    #[allow(clippy::needless_lifetimes)]
12856    fn get_boost_count<'a>(&'a self) -> i64;
12857    #[allow(rustdoc::invalid_html_tags)]
12858    #[doc = "Number of boosts added by the user"]
12859    #[allow(clippy::needless_lifetimes)]
12860    fn set_boost_count<'a>(&'a mut self, boost_count: i64) -> &'a mut Self;
12861}
12862#[allow(dead_code)]
12863trait TraitReactionTypeCustomEmoji {
12864    #[allow(rustdoc::invalid_html_tags)]
12865    #[doc = "Type of the reaction, always \"custom_emoji\""]
12866    #[allow(clippy::needless_lifetimes)]
12867    fn get_tg_type<'a>(&'a self) -> &'a str;
12868    #[allow(rustdoc::invalid_html_tags)]
12869    #[doc = "Type of the reaction, always \"custom_emoji\""]
12870    #[allow(clippy::needless_lifetimes)]
12871    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12872    #[allow(rustdoc::invalid_html_tags)]
12873    #[doc = "Custom emoji identifier"]
12874    #[allow(clippy::needless_lifetimes)]
12875    fn get_custom_emoji_id<'a>(&'a self) -> &'a str;
12876    #[allow(rustdoc::invalid_html_tags)]
12877    #[doc = "Custom emoji identifier"]
12878    #[allow(clippy::needless_lifetimes)]
12879    fn set_custom_emoji_id<'a>(&'a mut self, custom_emoji_id: String) -> &'a mut Self;
12880}
12881#[allow(dead_code)]
12882trait TraitLocationAddress {
12883    #[allow(rustdoc::invalid_html_tags)]
12884    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
12885    #[allow(clippy::needless_lifetimes)]
12886    fn get_country_code<'a>(&'a self) -> &'a str;
12887    #[allow(rustdoc::invalid_html_tags)]
12888    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
12889    #[allow(clippy::needless_lifetimes)]
12890    fn set_country_code<'a>(&'a mut self, country_code: String) -> &'a mut Self;
12891    #[allow(rustdoc::invalid_html_tags)]
12892    #[doc = "Optional. State of the location"]
12893    #[allow(clippy::needless_lifetimes)]
12894    fn get_state<'a>(&'a self) -> Option<&'a str>;
12895    #[allow(rustdoc::invalid_html_tags)]
12896    #[doc = "Optional. State of the location"]
12897    #[allow(clippy::needless_lifetimes)]
12898    fn set_state<'a>(&'a mut self, state: Option<String>) -> &'a mut Self;
12899    #[allow(rustdoc::invalid_html_tags)]
12900    #[doc = "Optional. City of the location"]
12901    #[allow(clippy::needless_lifetimes)]
12902    fn get_city<'a>(&'a self) -> Option<&'a str>;
12903    #[allow(rustdoc::invalid_html_tags)]
12904    #[doc = "Optional. City of the location"]
12905    #[allow(clippy::needless_lifetimes)]
12906    fn set_city<'a>(&'a mut self, city: Option<String>) -> &'a mut Self;
12907    #[allow(rustdoc::invalid_html_tags)]
12908    #[doc = "Optional. Street address of the location"]
12909    #[allow(clippy::needless_lifetimes)]
12910    fn get_street<'a>(&'a self) -> Option<&'a str>;
12911    #[allow(rustdoc::invalid_html_tags)]
12912    #[doc = "Optional. Street address of the location"]
12913    #[allow(clippy::needless_lifetimes)]
12914    fn set_street<'a>(&'a mut self, street: Option<String>) -> &'a mut Self;
12915}
12916#[allow(dead_code)]
12917trait TraitPassportElementError:
12918    TraitPassportElementErrorDataField
12919    + TraitPassportElementErrorFrontSide
12920    + TraitPassportElementErrorReverseSide
12921    + TraitPassportElementErrorSelfie
12922    + TraitPassportElementErrorFile
12923    + TraitPassportElementErrorFiles
12924    + TraitPassportElementErrorTranslationFile
12925    + TraitPassportElementErrorTranslationFiles
12926    + TraitPassportElementErrorUnspecified
12927{
12928}
12929#[allow(dead_code)]
12930trait TraitOwnedGiftRegular {
12931    #[allow(rustdoc::invalid_html_tags)]
12932    #[doc = "Type of the gift, always \"regular\""]
12933    #[allow(clippy::needless_lifetimes)]
12934    fn get_tg_type<'a>(&'a self) -> &'a str;
12935    #[allow(rustdoc::invalid_html_tags)]
12936    #[doc = "Type of the gift, always \"regular\""]
12937    #[allow(clippy::needless_lifetimes)]
12938    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
12939    #[allow(rustdoc::invalid_html_tags)]
12940    #[doc = "Information about the regular gift"]
12941    #[allow(clippy::needless_lifetimes)]
12942    fn get_gift<'a>(&'a self) -> &'a Gift;
12943    #[allow(rustdoc::invalid_html_tags)]
12944    #[doc = "Information about the regular gift"]
12945    #[allow(clippy::needless_lifetimes)]
12946    fn set_gift<'a>(&'a mut self, gift: Gift) -> &'a mut Self;
12947    #[allow(rustdoc::invalid_html_tags)]
12948    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
12949    #[allow(clippy::needless_lifetimes)]
12950    fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str>;
12951    #[allow(rustdoc::invalid_html_tags)]
12952    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
12953    #[allow(clippy::needless_lifetimes)]
12954    fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self;
12955    #[allow(rustdoc::invalid_html_tags)]
12956    #[doc = "Optional. Sender of the gift if it is a known user"]
12957    #[allow(clippy::needless_lifetimes)]
12958    fn get_sender_user<'a>(&'a self) -> Option<&'a User>;
12959    #[allow(rustdoc::invalid_html_tags)]
12960    #[doc = "Optional. Sender of the gift if it is a known user"]
12961    #[allow(clippy::needless_lifetimes)]
12962    fn set_sender_user<'a>(&'a mut self, sender_user: Option<User>) -> &'a mut Self;
12963    #[allow(rustdoc::invalid_html_tags)]
12964    #[doc = "Date the gift was sent in Unix time"]
12965    #[allow(clippy::needless_lifetimes)]
12966    fn get_send_date<'a>(&'a self) -> i64;
12967    #[allow(rustdoc::invalid_html_tags)]
12968    #[doc = "Date the gift was sent in Unix time"]
12969    #[allow(clippy::needless_lifetimes)]
12970    fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self;
12971    #[allow(rustdoc::invalid_html_tags)]
12972    #[doc = "Optional. Text of the message that was added to the gift"]
12973    #[allow(clippy::needless_lifetimes)]
12974    fn get_text<'a>(&'a self) -> Option<&'a str>;
12975    #[allow(rustdoc::invalid_html_tags)]
12976    #[doc = "Optional. Text of the message that was added to the gift"]
12977    #[allow(clippy::needless_lifetimes)]
12978    fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self;
12979    #[allow(rustdoc::invalid_html_tags)]
12980    #[doc = "Optional. Special entities that appear in the text"]
12981    #[allow(clippy::needless_lifetimes)]
12982    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>;
12983    #[allow(rustdoc::invalid_html_tags)]
12984    #[doc = "Optional. Special entities that appear in the text"]
12985    #[allow(clippy::needless_lifetimes)]
12986    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self;
12987    #[allow(rustdoc::invalid_html_tags)]
12988    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
12989    #[allow(clippy::needless_lifetimes)]
12990    fn get_is_private<'a>(&'a self) -> Option<bool>;
12991    #[allow(rustdoc::invalid_html_tags)]
12992    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
12993    #[allow(clippy::needless_lifetimes)]
12994    fn set_is_private<'a>(&'a mut self, is_private: Option<bool>) -> &'a mut Self;
12995    #[allow(rustdoc::invalid_html_tags)]
12996    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
12997    #[allow(clippy::needless_lifetimes)]
12998    fn get_is_saved<'a>(&'a self) -> Option<bool>;
12999    #[allow(rustdoc::invalid_html_tags)]
13000    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
13001    #[allow(clippy::needless_lifetimes)]
13002    fn set_is_saved<'a>(&'a mut self, is_saved: Option<bool>) -> &'a mut Self;
13003    #[allow(rustdoc::invalid_html_tags)]
13004    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
13005    #[allow(clippy::needless_lifetimes)]
13006    fn get_can_be_upgraded<'a>(&'a self) -> Option<bool>;
13007    #[allow(rustdoc::invalid_html_tags)]
13008    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
13009    #[allow(clippy::needless_lifetimes)]
13010    fn set_can_be_upgraded<'a>(&'a mut self, can_be_upgraded: Option<bool>) -> &'a mut Self;
13011    #[allow(rustdoc::invalid_html_tags)]
13012    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
13013    #[allow(clippy::needless_lifetimes)]
13014    fn get_was_refunded<'a>(&'a self) -> Option<bool>;
13015    #[allow(rustdoc::invalid_html_tags)]
13016    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
13017    #[allow(clippy::needless_lifetimes)]
13018    fn set_was_refunded<'a>(&'a mut self, was_refunded: Option<bool>) -> &'a mut Self;
13019    #[allow(rustdoc::invalid_html_tags)]
13020    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
13021    #[allow(clippy::needless_lifetimes)]
13022    fn get_convert_star_count<'a>(&'a self) -> Option<i64>;
13023    #[allow(rustdoc::invalid_html_tags)]
13024    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
13025    #[allow(clippy::needless_lifetimes)]
13026    fn set_convert_star_count<'a>(&'a mut self, convert_star_count: Option<i64>) -> &'a mut Self;
13027    #[allow(rustdoc::invalid_html_tags)]
13028    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
13029    #[allow(clippy::needless_lifetimes)]
13030    fn get_prepaid_upgrade_star_count<'a>(&'a self) -> Option<i64>;
13031    #[allow(rustdoc::invalid_html_tags)]
13032    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
13033    #[allow(clippy::needless_lifetimes)]
13034    fn set_prepaid_upgrade_star_count<'a>(
13035        &'a mut self,
13036        prepaid_upgrade_star_count: Option<i64>,
13037    ) -> &'a mut Self;
13038}
13039#[allow(dead_code)]
13040trait TraitInlineKeyboardMarkup {
13041    #[allow(rustdoc::invalid_html_tags)]
13042    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
13043    #[allow(clippy::needless_lifetimes)]
13044    fn get_inline_keyboard<'a>(&'a self) -> &'a Vec<Vec<InlineKeyboardButton>>;
13045    #[allow(rustdoc::invalid_html_tags)]
13046    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
13047    #[allow(clippy::needless_lifetimes)]
13048    fn set_inline_keyboard<'a>(
13049        &'a mut self,
13050        inline_keyboard: Vec<Vec<InlineKeyboardButton>>,
13051    ) -> &'a mut Self;
13052}
13053#[allow(dead_code)]
13054trait TraitStoryArea {
13055    #[allow(rustdoc::invalid_html_tags)]
13056    #[doc = "Position of the area"]
13057    #[allow(clippy::needless_lifetimes)]
13058    fn get_position<'a>(&'a self) -> &'a StoryAreaPosition;
13059    #[allow(rustdoc::invalid_html_tags)]
13060    #[doc = "Position of the area"]
13061    #[allow(clippy::needless_lifetimes)]
13062    fn set_position<'a>(&'a mut self, position: StoryAreaPosition) -> &'a mut Self;
13063    #[allow(rustdoc::invalid_html_tags)]
13064    #[doc = "Type of the area"]
13065    #[allow(clippy::needless_lifetimes)]
13066    fn get_tg_type<'a>(&'a self) -> &'a StoryAreaType;
13067    #[allow(rustdoc::invalid_html_tags)]
13068    #[doc = "Type of the area"]
13069    #[allow(clippy::needless_lifetimes)]
13070    fn set_tg_type<'a>(&'a mut self, tg_type: StoryAreaType) -> &'a mut Self;
13071}
13072#[allow(dead_code)]
13073trait TraitMaybeInaccessibleMessage: TraitMessage + TraitInaccessibleMessage {}
13074#[allow(dead_code)]
13075trait TraitStoryAreaTypeUniqueGift {
13076    #[allow(rustdoc::invalid_html_tags)]
13077    #[doc = "Type of the area, always \"unique_gift\""]
13078    #[allow(clippy::needless_lifetimes)]
13079    fn get_tg_type<'a>(&'a self) -> &'a str;
13080    #[allow(rustdoc::invalid_html_tags)]
13081    #[doc = "Type of the area, always \"unique_gift\""]
13082    #[allow(clippy::needless_lifetimes)]
13083    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self;
13084    #[allow(rustdoc::invalid_html_tags)]
13085    #[doc = "Unique name of the gift"]
13086    #[allow(clippy::needless_lifetimes)]
13087    fn get_name<'a>(&'a self) -> &'a str;
13088    #[allow(rustdoc::invalid_html_tags)]
13089    #[doc = "Unique name of the gift"]
13090    #[allow(clippy::needless_lifetimes)]
13091    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self;
13092}
13093#[allow(dead_code)]
13094trait TraitPassportData {
13095    #[allow(rustdoc::invalid_html_tags)]
13096    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
13097    #[allow(clippy::needless_lifetimes)]
13098    fn get_data<'a>(&'a self) -> &'a Vec<EncryptedPassportElement>;
13099    #[allow(rustdoc::invalid_html_tags)]
13100    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
13101    #[allow(clippy::needless_lifetimes)]
13102    fn set_data<'a>(&'a mut self, data: Vec<EncryptedPassportElement>) -> &'a mut Self;
13103    #[allow(rustdoc::invalid_html_tags)]
13104    #[doc = "Encrypted credentials required to decrypt the data"]
13105    #[allow(clippy::needless_lifetimes)]
13106    fn get_credentials<'a>(&'a self) -> &'a EncryptedCredentials;
13107    #[allow(rustdoc::invalid_html_tags)]
13108    #[doc = "Encrypted credentials required to decrypt the data"]
13109    #[allow(clippy::needless_lifetimes)]
13110    fn set_credentials<'a>(&'a mut self, credentials: EncryptedCredentials) -> &'a mut Self;
13111}
13112#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13113#[serde(untagged)]
13114pub enum InputPaidMedia {
13115    InputPaidMediaPhoto(InputPaidMediaPhoto),
13116    InputPaidMediaVideo(InputPaidMediaVideo),
13117}
13118impl Default for InputPaidMedia {
13119    fn default() -> Self {
13120        InputPaidMedia::InputPaidMediaPhoto(InputPaidMediaPhoto::default())
13121    }
13122}
13123impl InputPaidMedia {
13124    #[allow(rustdoc::invalid_html_tags)]
13125    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
13126    #[allow(clippy::needless_lifetimes)]
13127    pub fn get_media<'a>(&'a self) -> &'a String {
13128        match self {
13129            Self::InputPaidMediaPhoto(ref v) => v.get_media(),
13130            Self::InputPaidMediaVideo(ref v) => v.get_media(),
13131        }
13132    }
13133}
13134#[allow(rustdoc::invalid_html_tags)]
13135#[doc = "This object represents information about an order."]
13136#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13137pub struct OrderInfo {
13138    #[allow(rustdoc::invalid_html_tags)]
13139    #[doc = "Optional. User name"]
13140    #[serde(skip_serializing_if = "Option::is_none", rename = "name", default)]
13141    pub name: Option<String>,
13142    #[allow(rustdoc::invalid_html_tags)]
13143    #[doc = "Optional. User's phone number"]
13144    #[serde(
13145        skip_serializing_if = "Option::is_none",
13146        rename = "phone_number",
13147        default
13148    )]
13149    pub phone_number: Option<String>,
13150    #[allow(rustdoc::invalid_html_tags)]
13151    #[doc = "Optional. User email"]
13152    #[serde(skip_serializing_if = "Option::is_none", rename = "email", default)]
13153    pub email: Option<String>,
13154    #[allow(rustdoc::invalid_html_tags)]
13155    #[doc = "Optional. User shipping address"]
13156    #[serde(
13157        skip_serializing_if = "Option::is_none",
13158        rename = "shipping_address",
13159        default
13160    )]
13161    pub shipping_address: Option<BoxWrapper<Unbox<ShippingAddress>>>,
13162}
13163#[allow(rustdoc::invalid_html_tags)]
13164#[doc = "Companion type to OrderInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
13165#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13166pub struct NoSkipOrderInfo {
13167    pub name: Option<String>,
13168    pub phone_number: Option<String>,
13169    pub email: Option<String>,
13170    pub shipping_address: Option<BoxWrapper<Unbox<ShippingAddress>>>,
13171}
13172impl From<NoSkipOrderInfo> for OrderInfo {
13173    fn from(t: NoSkipOrderInfo) -> Self {
13174        Self {
13175            name: t.name,
13176            phone_number: t.phone_number,
13177            email: t.email,
13178            shipping_address: t.shipping_address,
13179        }
13180    }
13181}
13182#[allow(clippy::from_over_into)]
13183impl Into<NoSkipOrderInfo> for OrderInfo {
13184    fn into(self) -> NoSkipOrderInfo {
13185        NoSkipOrderInfo {
13186            name: self.name,
13187            phone_number: self.phone_number,
13188            email: self.email,
13189            shipping_address: self.shipping_address,
13190        }
13191    }
13192}
13193impl NoSkipOrderInfo {
13194    pub fn skip(self) -> OrderInfo {
13195        self.into()
13196    }
13197}
13198impl OrderInfo {
13199    pub fn noskip(self) -> NoSkipOrderInfo {
13200        self.into()
13201    }
13202}
13203#[allow(rustdoc::invalid_html_tags)]
13204#[doc = "This object represents information about an order."]
13205#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13206pub struct OrderInfoBuilder {
13207    #[allow(rustdoc::invalid_html_tags)]
13208    #[doc = "Optional. User name"]
13209    #[serde(skip_serializing_if = "Option::is_none", rename = "name", default)]
13210    pub name: Option<String>,
13211    #[allow(rustdoc::invalid_html_tags)]
13212    #[doc = "Optional. User's phone number"]
13213    #[serde(
13214        skip_serializing_if = "Option::is_none",
13215        rename = "phone_number",
13216        default
13217    )]
13218    pub phone_number: Option<String>,
13219    #[allow(rustdoc::invalid_html_tags)]
13220    #[doc = "Optional. User email"]
13221    #[serde(skip_serializing_if = "Option::is_none", rename = "email", default)]
13222    pub email: Option<String>,
13223    #[allow(rustdoc::invalid_html_tags)]
13224    #[doc = "Optional. User shipping address"]
13225    #[serde(
13226        skip_serializing_if = "Option::is_none",
13227        rename = "shipping_address",
13228        default
13229    )]
13230    pub shipping_address: Option<BoxWrapper<Unbox<ShippingAddress>>>,
13231}
13232impl OrderInfoBuilder {
13233    #[allow(clippy::too_many_arguments)]
13234    pub fn new() -> Self {
13235        Self {
13236            name: None,
13237            phone_number: None,
13238            email: None,
13239            shipping_address: None,
13240        }
13241    }
13242    #[allow(rustdoc::invalid_html_tags)]
13243    #[doc = "Optional. User name"]
13244    pub fn set_name(mut self, name: String) -> Self {
13245        self.name = Some(name);
13246        self
13247    }
13248    #[allow(rustdoc::invalid_html_tags)]
13249    #[doc = "Optional. User's phone number"]
13250    pub fn set_phone_number(mut self, phone_number: String) -> Self {
13251        self.phone_number = Some(phone_number);
13252        self
13253    }
13254    #[allow(rustdoc::invalid_html_tags)]
13255    #[doc = "Optional. User email"]
13256    pub fn set_email(mut self, email: String) -> Self {
13257        self.email = Some(email);
13258        self
13259    }
13260    #[allow(rustdoc::invalid_html_tags)]
13261    #[doc = "Optional. User shipping address"]
13262    pub fn set_shipping_address(mut self, shipping_address: ShippingAddress) -> Self {
13263        self.shipping_address = Some(BoxWrapper(Unbox(shipping_address)));
13264        self
13265    }
13266    pub fn build(self) -> OrderInfo {
13267        OrderInfo {
13268            name: self.name,
13269            phone_number: self.phone_number,
13270            email: self.email,
13271            shipping_address: self.shipping_address,
13272        }
13273    }
13274}
13275#[allow(rustdoc::invalid_html_tags)]
13276#[doc = "Describes the price of a suggested post."]
13277#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13278pub struct SuggestedPostPrice {
13279    #[allow(rustdoc::invalid_html_tags)]
13280    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
13281    #[serde(rename = "currency")]
13282    pub currency: String,
13283    #[allow(rustdoc::invalid_html_tags)]
13284    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
13285    #[serde(rename = "amount")]
13286    pub amount: i64,
13287}
13288#[allow(rustdoc::invalid_html_tags)]
13289#[doc = "Companion type to SuggestedPostPrice that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
13290#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13291pub struct NoSkipSuggestedPostPrice {
13292    #[allow(rustdoc::invalid_html_tags)]
13293    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
13294    #[serde(rename = "currency")]
13295    pub currency: String,
13296    #[allow(rustdoc::invalid_html_tags)]
13297    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
13298    #[serde(rename = "amount")]
13299    pub amount: i64,
13300}
13301impl From<NoSkipSuggestedPostPrice> for SuggestedPostPrice {
13302    fn from(t: NoSkipSuggestedPostPrice) -> Self {
13303        Self {
13304            currency: t.currency,
13305            amount: t.amount,
13306        }
13307    }
13308}
13309#[allow(clippy::from_over_into)]
13310impl Into<NoSkipSuggestedPostPrice> for SuggestedPostPrice {
13311    fn into(self) -> NoSkipSuggestedPostPrice {
13312        NoSkipSuggestedPostPrice {
13313            currency: self.currency,
13314            amount: self.amount,
13315        }
13316    }
13317}
13318impl NoSkipSuggestedPostPrice {
13319    pub fn skip(self) -> SuggestedPostPrice {
13320        self.into()
13321    }
13322}
13323impl SuggestedPostPrice {
13324    pub fn noskip(self) -> NoSkipSuggestedPostPrice {
13325        self.into()
13326    }
13327}
13328#[allow(rustdoc::invalid_html_tags)]
13329#[doc = "Describes the price of a suggested post."]
13330#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13331pub struct SuggestedPostPriceBuilder {
13332    #[allow(rustdoc::invalid_html_tags)]
13333    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
13334    #[serde(rename = "currency")]
13335    pub currency: String,
13336    #[allow(rustdoc::invalid_html_tags)]
13337    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
13338    #[serde(rename = "amount")]
13339    pub amount: i64,
13340}
13341impl SuggestedPostPriceBuilder {
13342    #[allow(clippy::too_many_arguments)]
13343    pub fn new(currency: String, amount: i64) -> Self {
13344        Self { currency, amount }
13345    }
13346    #[allow(rustdoc::invalid_html_tags)]
13347    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
13348    pub fn set_currency(mut self, currency: String) -> Self {
13349        self.currency = currency;
13350        self
13351    }
13352    #[allow(rustdoc::invalid_html_tags)]
13353    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
13354    pub fn set_amount(mut self, amount: i64) -> Self {
13355        self.amount = amount;
13356        self
13357    }
13358    pub fn build(self) -> SuggestedPostPrice {
13359        SuggestedPostPrice {
13360            currency: self.currency,
13361            amount: self.amount,
13362        }
13363    }
13364}
13365#[allow(rustdoc::invalid_html_tags)]
13366#[doc = "This object represents a chat."]
13367#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13368pub struct Chat {
13369    #[allow(rustdoc::invalid_html_tags)]
13370    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
13371    #[serde(rename = "id")]
13372    pub id: i64,
13373    #[allow(rustdoc::invalid_html_tags)]
13374    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
13375    #[serde(rename = "type")]
13376    pub tg_type: String,
13377    #[allow(rustdoc::invalid_html_tags)]
13378    #[doc = "Optional. Title, for supergroups, channels and group chats"]
13379    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
13380    pub title: Option<String>,
13381    #[allow(rustdoc::invalid_html_tags)]
13382    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
13383    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
13384    pub username: Option<String>,
13385    #[allow(rustdoc::invalid_html_tags)]
13386    #[doc = "Optional. First name of the other party in a private chat"]
13387    #[serde(
13388        skip_serializing_if = "Option::is_none",
13389        rename = "first_name",
13390        default
13391    )]
13392    pub first_name: Option<String>,
13393    #[allow(rustdoc::invalid_html_tags)]
13394    #[doc = "Optional. Last name of the other party in a private chat"]
13395    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
13396    pub last_name: Option<String>,
13397    #[allow(rustdoc::invalid_html_tags)]
13398    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
13399    #[serde(skip_serializing_if = "Option::is_none", rename = "is_forum", default)]
13400    pub is_forum: Option<bool>,
13401    #[allow(rustdoc::invalid_html_tags)]
13402    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
13403    #[serde(
13404        skip_serializing_if = "Option::is_none",
13405        rename = "is_direct_messages",
13406        default
13407    )]
13408    pub is_direct_messages: Option<bool>,
13409}
13410#[allow(rustdoc::invalid_html_tags)]
13411#[doc = "Companion type to Chat that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
13412#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13413pub struct NoSkipChat {
13414    #[allow(rustdoc::invalid_html_tags)]
13415    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
13416    #[serde(rename = "id")]
13417    pub id: i64,
13418    #[allow(rustdoc::invalid_html_tags)]
13419    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
13420    #[serde(rename = "type")]
13421    pub tg_type: String,
13422    pub title: Option<String>,
13423    pub username: Option<String>,
13424    pub first_name: Option<String>,
13425    pub last_name: Option<String>,
13426    pub is_forum: Option<bool>,
13427    pub is_direct_messages: Option<bool>,
13428}
13429impl From<NoSkipChat> for Chat {
13430    fn from(t: NoSkipChat) -> Self {
13431        Self {
13432            id: t.id,
13433            tg_type: t.tg_type,
13434            title: t.title,
13435            username: t.username,
13436            first_name: t.first_name,
13437            last_name: t.last_name,
13438            is_forum: t.is_forum,
13439            is_direct_messages: t.is_direct_messages,
13440        }
13441    }
13442}
13443#[allow(clippy::from_over_into)]
13444impl Into<NoSkipChat> for Chat {
13445    fn into(self) -> NoSkipChat {
13446        NoSkipChat {
13447            id: self.id,
13448            tg_type: self.tg_type,
13449            title: self.title,
13450            username: self.username,
13451            first_name: self.first_name,
13452            last_name: self.last_name,
13453            is_forum: self.is_forum,
13454            is_direct_messages: self.is_direct_messages,
13455        }
13456    }
13457}
13458impl NoSkipChat {
13459    pub fn skip(self) -> Chat {
13460        self.into()
13461    }
13462}
13463impl Chat {
13464    pub fn noskip(self) -> NoSkipChat {
13465        self.into()
13466    }
13467}
13468#[allow(rustdoc::invalid_html_tags)]
13469#[doc = "This object represents a chat."]
13470#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13471pub struct ChatBuilder {
13472    #[allow(rustdoc::invalid_html_tags)]
13473    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
13474    #[serde(rename = "id")]
13475    pub id: i64,
13476    #[allow(rustdoc::invalid_html_tags)]
13477    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
13478    #[serde(rename = "type")]
13479    pub tg_type: String,
13480    #[allow(rustdoc::invalid_html_tags)]
13481    #[doc = "Optional. Title, for supergroups, channels and group chats"]
13482    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
13483    pub title: Option<String>,
13484    #[allow(rustdoc::invalid_html_tags)]
13485    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
13486    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
13487    pub username: Option<String>,
13488    #[allow(rustdoc::invalid_html_tags)]
13489    #[doc = "Optional. First name of the other party in a private chat"]
13490    #[serde(
13491        skip_serializing_if = "Option::is_none",
13492        rename = "first_name",
13493        default
13494    )]
13495    pub first_name: Option<String>,
13496    #[allow(rustdoc::invalid_html_tags)]
13497    #[doc = "Optional. Last name of the other party in a private chat"]
13498    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
13499    pub last_name: Option<String>,
13500    #[allow(rustdoc::invalid_html_tags)]
13501    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
13502    #[serde(skip_serializing_if = "Option::is_none", rename = "is_forum", default)]
13503    pub is_forum: Option<bool>,
13504    #[allow(rustdoc::invalid_html_tags)]
13505    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
13506    #[serde(
13507        skip_serializing_if = "Option::is_none",
13508        rename = "is_direct_messages",
13509        default
13510    )]
13511    pub is_direct_messages: Option<bool>,
13512}
13513impl ChatBuilder {
13514    #[allow(clippy::too_many_arguments)]
13515    pub fn new(id: i64) -> Self {
13516        Self {
13517            tg_type: "Chat".to_owned(),
13518            id,
13519            title: None,
13520            username: None,
13521            first_name: None,
13522            last_name: None,
13523            is_forum: None,
13524            is_direct_messages: None,
13525        }
13526    }
13527    #[allow(rustdoc::invalid_html_tags)]
13528    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
13529    pub fn set_id(mut self, id: i64) -> Self {
13530        self.id = id;
13531        self
13532    }
13533    #[allow(rustdoc::invalid_html_tags)]
13534    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
13535    pub fn set_type(mut self, tg_type: String) -> Self {
13536        self.tg_type = tg_type;
13537        self
13538    }
13539    #[allow(rustdoc::invalid_html_tags)]
13540    #[doc = "Optional. Title, for supergroups, channels and group chats"]
13541    pub fn set_title(mut self, title: String) -> Self {
13542        self.title = Some(title);
13543        self
13544    }
13545    #[allow(rustdoc::invalid_html_tags)]
13546    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
13547    pub fn set_username(mut self, username: String) -> Self {
13548        self.username = Some(username);
13549        self
13550    }
13551    #[allow(rustdoc::invalid_html_tags)]
13552    #[doc = "Optional. First name of the other party in a private chat"]
13553    pub fn set_first_name(mut self, first_name: String) -> Self {
13554        self.first_name = Some(first_name);
13555        self
13556    }
13557    #[allow(rustdoc::invalid_html_tags)]
13558    #[doc = "Optional. Last name of the other party in a private chat"]
13559    pub fn set_last_name(mut self, last_name: String) -> Self {
13560        self.last_name = Some(last_name);
13561        self
13562    }
13563    #[allow(rustdoc::invalid_html_tags)]
13564    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
13565    pub fn set_is_forum(mut self, is_forum: bool) -> Self {
13566        self.is_forum = Some(is_forum);
13567        self
13568    }
13569    #[allow(rustdoc::invalid_html_tags)]
13570    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
13571    pub fn set_is_direct_messages(mut self, is_direct_messages: bool) -> Self {
13572        self.is_direct_messages = Some(is_direct_messages);
13573        self
13574    }
13575    pub fn build(self) -> Chat {
13576        Chat {
13577            id: self.id,
13578            tg_type: self.tg_type,
13579            title: self.title,
13580            username: self.username,
13581            first_name: self.first_name,
13582            last_name: self.last_name,
13583            is_forum: self.is_forum,
13584            is_direct_messages: self.is_direct_messages,
13585        }
13586    }
13587}
13588#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
13589pub struct CallbackGame {}
13590impl CallbackGame {}
13591#[allow(rustdoc::invalid_html_tags)]
13592#[doc = "This object represents an incoming update.At most one of the optional parameters can be present in any given update."]
13593#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13594pub struct Update {
13595    #[allow(rustdoc::invalid_html_tags)]
13596    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
13597    #[serde(rename = "update_id")]
13598    pub update_id: i64,
13599    #[allow(rustdoc::invalid_html_tags)]
13600    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
13601    #[serde(skip_serializing_if = "Option::is_none", rename = "message", default)]
13602    pub message: Option<BoxWrapper<Box<Message>>>,
13603    #[allow(rustdoc::invalid_html_tags)]
13604    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
13605    #[serde(
13606        skip_serializing_if = "Option::is_none",
13607        rename = "edited_message",
13608        default
13609    )]
13610    pub edited_message: Option<BoxWrapper<Box<Message>>>,
13611    #[allow(rustdoc::invalid_html_tags)]
13612    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
13613    #[serde(
13614        skip_serializing_if = "Option::is_none",
13615        rename = "channel_post",
13616        default
13617    )]
13618    pub channel_post: Option<BoxWrapper<Box<Message>>>,
13619    #[allow(rustdoc::invalid_html_tags)]
13620    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
13621    #[serde(
13622        skip_serializing_if = "Option::is_none",
13623        rename = "edited_channel_post",
13624        default
13625    )]
13626    pub edited_channel_post: Option<BoxWrapper<Box<Message>>>,
13627    #[allow(rustdoc::invalid_html_tags)]
13628    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
13629    #[serde(
13630        skip_serializing_if = "Option::is_none",
13631        rename = "business_connection",
13632        default
13633    )]
13634    pub business_connection: Option<BoxWrapper<Box<BusinessConnection>>>,
13635    #[allow(rustdoc::invalid_html_tags)]
13636    #[doc = "Optional. New message from a connected business account"]
13637    #[serde(
13638        skip_serializing_if = "Option::is_none",
13639        rename = "business_message",
13640        default
13641    )]
13642    pub business_message: Option<BoxWrapper<Box<Message>>>,
13643    #[allow(rustdoc::invalid_html_tags)]
13644    #[doc = "Optional. New version of a message from a connected business account"]
13645    #[serde(
13646        skip_serializing_if = "Option::is_none",
13647        rename = "edited_business_message",
13648        default
13649    )]
13650    pub edited_business_message: Option<BoxWrapper<Box<Message>>>,
13651    #[allow(rustdoc::invalid_html_tags)]
13652    #[doc = "Optional. Messages were deleted from a connected business account"]
13653    #[serde(
13654        skip_serializing_if = "Option::is_none",
13655        rename = "deleted_business_messages",
13656        default
13657    )]
13658    pub deleted_business_messages: Option<BoxWrapper<Box<BusinessMessagesDeleted>>>,
13659    #[allow(rustdoc::invalid_html_tags)]
13660    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
13661    #[serde(
13662        skip_serializing_if = "Option::is_none",
13663        rename = "message_reaction",
13664        default
13665    )]
13666    pub message_reaction: Option<BoxWrapper<Box<MessageReactionUpdated>>>,
13667    #[allow(rustdoc::invalid_html_tags)]
13668    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
13669    #[serde(
13670        skip_serializing_if = "Option::is_none",
13671        rename = "message_reaction_count",
13672        default
13673    )]
13674    pub message_reaction_count: Option<BoxWrapper<Box<MessageReactionCountUpdated>>>,
13675    #[allow(rustdoc::invalid_html_tags)]
13676    #[doc = "Optional. New incoming inline query"]
13677    #[serde(
13678        skip_serializing_if = "Option::is_none",
13679        rename = "inline_query",
13680        default
13681    )]
13682    pub inline_query: Option<BoxWrapper<Box<InlineQuery>>>,
13683    #[allow(rustdoc::invalid_html_tags)]
13684    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
13685    #[serde(
13686        skip_serializing_if = "Option::is_none",
13687        rename = "chosen_inline_result",
13688        default
13689    )]
13690    pub chosen_inline_result: Option<BoxWrapper<Box<ChosenInlineResult>>>,
13691    #[allow(rustdoc::invalid_html_tags)]
13692    #[doc = "Optional. New incoming callback query"]
13693    #[serde(
13694        skip_serializing_if = "Option::is_none",
13695        rename = "callback_query",
13696        default
13697    )]
13698    pub callback_query: Option<BoxWrapper<Box<CallbackQuery>>>,
13699    #[allow(rustdoc::invalid_html_tags)]
13700    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
13701    #[serde(
13702        skip_serializing_if = "Option::is_none",
13703        rename = "shipping_query",
13704        default
13705    )]
13706    pub shipping_query: Option<BoxWrapper<Box<ShippingQuery>>>,
13707    #[allow(rustdoc::invalid_html_tags)]
13708    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
13709    #[serde(
13710        skip_serializing_if = "Option::is_none",
13711        rename = "pre_checkout_query",
13712        default
13713    )]
13714    pub pre_checkout_query: Option<BoxWrapper<Box<PreCheckoutQuery>>>,
13715    #[allow(rustdoc::invalid_html_tags)]
13716    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
13717    #[serde(
13718        skip_serializing_if = "Option::is_none",
13719        rename = "purchased_paid_media",
13720        default
13721    )]
13722    pub purchased_paid_media: Option<BoxWrapper<Box<PaidMediaPurchased>>>,
13723    #[allow(rustdoc::invalid_html_tags)]
13724    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
13725    #[serde(skip_serializing_if = "Option::is_none", rename = "poll", default)]
13726    pub poll: Option<BoxWrapper<Box<Poll>>>,
13727    #[allow(rustdoc::invalid_html_tags)]
13728    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
13729    #[serde(
13730        skip_serializing_if = "Option::is_none",
13731        rename = "poll_answer",
13732        default
13733    )]
13734    pub poll_answer: Option<BoxWrapper<Box<PollAnswer>>>,
13735    #[allow(rustdoc::invalid_html_tags)]
13736    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
13737    #[serde(
13738        skip_serializing_if = "Option::is_none",
13739        rename = "my_chat_member",
13740        default
13741    )]
13742    pub my_chat_member: Option<BoxWrapper<Box<ChatMemberUpdated>>>,
13743    #[allow(rustdoc::invalid_html_tags)]
13744    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
13745    #[serde(
13746        skip_serializing_if = "Option::is_none",
13747        rename = "chat_member",
13748        default
13749    )]
13750    pub chat_member: Option<BoxWrapper<Box<ChatMemberUpdated>>>,
13751    #[allow(rustdoc::invalid_html_tags)]
13752    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
13753    #[serde(
13754        skip_serializing_if = "Option::is_none",
13755        rename = "chat_join_request",
13756        default
13757    )]
13758    pub chat_join_request: Option<BoxWrapper<Box<ChatJoinRequest>>>,
13759    #[allow(rustdoc::invalid_html_tags)]
13760    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
13761    #[serde(
13762        skip_serializing_if = "Option::is_none",
13763        rename = "chat_boost",
13764        default
13765    )]
13766    pub chat_boost: Option<BoxWrapper<Box<ChatBoostUpdated>>>,
13767    #[allow(rustdoc::invalid_html_tags)]
13768    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
13769    #[serde(
13770        skip_serializing_if = "Option::is_none",
13771        rename = "removed_chat_boost",
13772        default
13773    )]
13774    pub removed_chat_boost: Option<BoxWrapper<Box<ChatBoostRemoved>>>,
13775}
13776#[allow(rustdoc::invalid_html_tags)]
13777#[doc = "Companion type to Update that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
13778#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13779pub struct NoSkipUpdate {
13780    #[allow(rustdoc::invalid_html_tags)]
13781    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
13782    #[serde(rename = "update_id")]
13783    pub update_id: i64,
13784    pub message: Option<BoxWrapper<Box<Message>>>,
13785    pub edited_message: Option<BoxWrapper<Box<Message>>>,
13786    pub channel_post: Option<BoxWrapper<Box<Message>>>,
13787    pub edited_channel_post: Option<BoxWrapper<Box<Message>>>,
13788    pub business_connection: Option<BoxWrapper<Box<BusinessConnection>>>,
13789    pub business_message: Option<BoxWrapper<Box<Message>>>,
13790    pub edited_business_message: Option<BoxWrapper<Box<Message>>>,
13791    pub deleted_business_messages: Option<BoxWrapper<Box<BusinessMessagesDeleted>>>,
13792    pub message_reaction: Option<BoxWrapper<Box<MessageReactionUpdated>>>,
13793    pub message_reaction_count: Option<BoxWrapper<Box<MessageReactionCountUpdated>>>,
13794    pub inline_query: Option<BoxWrapper<Box<InlineQuery>>>,
13795    pub chosen_inline_result: Option<BoxWrapper<Box<ChosenInlineResult>>>,
13796    pub callback_query: Option<BoxWrapper<Box<CallbackQuery>>>,
13797    pub shipping_query: Option<BoxWrapper<Box<ShippingQuery>>>,
13798    pub pre_checkout_query: Option<BoxWrapper<Box<PreCheckoutQuery>>>,
13799    pub purchased_paid_media: Option<BoxWrapper<Box<PaidMediaPurchased>>>,
13800    pub poll: Option<BoxWrapper<Box<Poll>>>,
13801    pub poll_answer: Option<BoxWrapper<Box<PollAnswer>>>,
13802    pub my_chat_member: Option<BoxWrapper<Box<ChatMemberUpdated>>>,
13803    pub chat_member: Option<BoxWrapper<Box<ChatMemberUpdated>>>,
13804    pub chat_join_request: Option<BoxWrapper<Box<ChatJoinRequest>>>,
13805    pub chat_boost: Option<BoxWrapper<Box<ChatBoostUpdated>>>,
13806    pub removed_chat_boost: Option<BoxWrapper<Box<ChatBoostRemoved>>>,
13807}
13808impl From<NoSkipUpdate> for Update {
13809    fn from(t: NoSkipUpdate) -> Self {
13810        Self {
13811            update_id: t.update_id,
13812            message: t.message,
13813            edited_message: t.edited_message,
13814            channel_post: t.channel_post,
13815            edited_channel_post: t.edited_channel_post,
13816            business_connection: t.business_connection,
13817            business_message: t.business_message,
13818            edited_business_message: t.edited_business_message,
13819            deleted_business_messages: t.deleted_business_messages,
13820            message_reaction: t.message_reaction,
13821            message_reaction_count: t.message_reaction_count,
13822            inline_query: t.inline_query,
13823            chosen_inline_result: t.chosen_inline_result,
13824            callback_query: t.callback_query,
13825            shipping_query: t.shipping_query,
13826            pre_checkout_query: t.pre_checkout_query,
13827            purchased_paid_media: t.purchased_paid_media,
13828            poll: t.poll,
13829            poll_answer: t.poll_answer,
13830            my_chat_member: t.my_chat_member,
13831            chat_member: t.chat_member,
13832            chat_join_request: t.chat_join_request,
13833            chat_boost: t.chat_boost,
13834            removed_chat_boost: t.removed_chat_boost,
13835        }
13836    }
13837}
13838#[allow(clippy::from_over_into)]
13839impl Into<NoSkipUpdate> for Update {
13840    fn into(self) -> NoSkipUpdate {
13841        NoSkipUpdate {
13842            update_id: self.update_id,
13843            message: self.message,
13844            edited_message: self.edited_message,
13845            channel_post: self.channel_post,
13846            edited_channel_post: self.edited_channel_post,
13847            business_connection: self.business_connection,
13848            business_message: self.business_message,
13849            edited_business_message: self.edited_business_message,
13850            deleted_business_messages: self.deleted_business_messages,
13851            message_reaction: self.message_reaction,
13852            message_reaction_count: self.message_reaction_count,
13853            inline_query: self.inline_query,
13854            chosen_inline_result: self.chosen_inline_result,
13855            callback_query: self.callback_query,
13856            shipping_query: self.shipping_query,
13857            pre_checkout_query: self.pre_checkout_query,
13858            purchased_paid_media: self.purchased_paid_media,
13859            poll: self.poll,
13860            poll_answer: self.poll_answer,
13861            my_chat_member: self.my_chat_member,
13862            chat_member: self.chat_member,
13863            chat_join_request: self.chat_join_request,
13864            chat_boost: self.chat_boost,
13865            removed_chat_boost: self.removed_chat_boost,
13866        }
13867    }
13868}
13869impl NoSkipUpdate {
13870    pub fn skip(self) -> Update {
13871        self.into()
13872    }
13873}
13874impl Update {
13875    pub fn noskip(self) -> NoSkipUpdate {
13876        self.into()
13877    }
13878}
13879#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)]
13880pub enum UpdateExt {
13881    #[allow(rustdoc::invalid_html_tags)]
13882    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
13883    Message(Message),
13884    #[allow(rustdoc::invalid_html_tags)]
13885    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
13886    EditedMessage(Message),
13887    #[allow(rustdoc::invalid_html_tags)]
13888    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
13889    ChannelPost(Message),
13890    #[allow(rustdoc::invalid_html_tags)]
13891    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
13892    EditedChannelPost(Message),
13893    #[allow(rustdoc::invalid_html_tags)]
13894    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
13895    BusinessConnection(BusinessConnection),
13896    #[allow(rustdoc::invalid_html_tags)]
13897    #[doc = "Optional. New message from a connected business account"]
13898    BusinessMessage(Message),
13899    #[allow(rustdoc::invalid_html_tags)]
13900    #[doc = "Optional. New version of a message from a connected business account"]
13901    EditedBusinessMessage(Message),
13902    #[allow(rustdoc::invalid_html_tags)]
13903    #[doc = "Optional. Messages were deleted from a connected business account"]
13904    DeletedBusinessMessages(BusinessMessagesDeleted),
13905    #[allow(rustdoc::invalid_html_tags)]
13906    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
13907    MessageReaction(MessageReactionUpdated),
13908    #[allow(rustdoc::invalid_html_tags)]
13909    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
13910    MessageReactionCount(MessageReactionCountUpdated),
13911    #[allow(rustdoc::invalid_html_tags)]
13912    #[doc = "Optional. New incoming inline query"]
13913    InlineQuery(InlineQuery),
13914    #[allow(rustdoc::invalid_html_tags)]
13915    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
13916    ChosenInlineResult(ChosenInlineResult),
13917    #[allow(rustdoc::invalid_html_tags)]
13918    #[doc = "Optional. New incoming callback query"]
13919    CallbackQuery(CallbackQuery),
13920    #[allow(rustdoc::invalid_html_tags)]
13921    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
13922    ShippingQuery(ShippingQuery),
13923    #[allow(rustdoc::invalid_html_tags)]
13924    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
13925    PreCheckoutQuery(PreCheckoutQuery),
13926    #[allow(rustdoc::invalid_html_tags)]
13927    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
13928    PurchasedPaidMedia(PaidMediaPurchased),
13929    #[allow(rustdoc::invalid_html_tags)]
13930    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
13931    Poll(Poll),
13932    #[allow(rustdoc::invalid_html_tags)]
13933    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
13934    PollAnswer(PollAnswer),
13935    #[allow(rustdoc::invalid_html_tags)]
13936    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
13937    MyChatMember(ChatMemberUpdated),
13938    #[allow(rustdoc::invalid_html_tags)]
13939    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
13940    ChatMember(ChatMemberUpdated),
13941    #[allow(rustdoc::invalid_html_tags)]
13942    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
13943    ChatJoinRequest(ChatJoinRequest),
13944    #[allow(rustdoc::invalid_html_tags)]
13945    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
13946    ChatBoost(ChatBoostUpdated),
13947    #[allow(rustdoc::invalid_html_tags)]
13948    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
13949    RemovedChatBoost(ChatBoostRemoved),
13950    Invalid,
13951}
13952impl UpdateExt {
13953    #[allow(rustdoc::invalid_html_tags)]
13954    #[doc = "Optional. Service message: users were shared with the bot"]
13955    #[allow(clippy::needless_lifetimes)]
13956    pub fn get_users_shared<'a>(&'a self) -> Option<&'a UsersShared> {
13957        match self {
13958            Self::Message(ref v) => Some(v.get_users_shared()),
13959            Self::EditedMessage(ref v) => Some(v.get_users_shared()),
13960            Self::ChannelPost(ref v) => Some(v.get_users_shared()),
13961            Self::EditedChannelPost(ref v) => Some(v.get_users_shared()),
13962            Self::BusinessMessage(ref v) => Some(v.get_users_shared()),
13963            Self::EditedBusinessMessage(ref v) => Some(v.get_users_shared()),
13964            _ => None,
13965        }
13966        .flatten()
13967    }
13968    #[allow(rustdoc::invalid_html_tags)]
13969    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
13970    #[allow(clippy::needless_lifetimes)]
13971    pub fn get_sender_chat<'a>(&'a self) -> Option<&'a Chat> {
13972        match self {
13973            Self::Message(ref v) => Some(v.get_sender_chat()),
13974            Self::EditedMessage(ref v) => Some(v.get_sender_chat()),
13975            Self::ChannelPost(ref v) => Some(v.get_sender_chat()),
13976            Self::EditedChannelPost(ref v) => Some(v.get_sender_chat()),
13977            Self::BusinessMessage(ref v) => Some(v.get_sender_chat()),
13978            Self::EditedBusinessMessage(ref v) => Some(v.get_sender_chat()),
13979            _ => None,
13980        }
13981        .flatten()
13982    }
13983    #[allow(rustdoc::invalid_html_tags)]
13984    #[doc = "The user that chose the result"]
13985    #[allow(clippy::needless_lifetimes)]
13986    pub fn get_from<'a>(&'a self) -> Option<&'a User> {
13987        match self {
13988            Self::ChosenInlineResult(ref v) => Some(v.get_from()),
13989            _ => None,
13990        }
13991    }
13992    #[allow(rustdoc::invalid_html_tags)]
13993    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
13994    #[allow(clippy::needless_lifetimes)]
13995    pub fn get_chat_instance<'a>(&'a self) -> Option<&'a str> {
13996        match self {
13997            Self::CallbackQuery(ref v) => Some(v.get_chat_instance()),
13998            _ => None,
13999        }
14000    }
14001    #[allow(rustdoc::invalid_html_tags)]
14002    #[doc = "New list of reaction types that have been set by the user"]
14003    #[allow(clippy::needless_lifetimes)]
14004    pub fn get_new_reaction<'a>(&'a self) -> Option<&'a Vec<ReactionType>> {
14005        match self {
14006            Self::MessageReaction(ref v) => Some(v.get_new_reaction()),
14007            _ => None,
14008        }
14009    }
14010    #[allow(rustdoc::invalid_html_tags)]
14011    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
14012    #[allow(clippy::needless_lifetimes)]
14013    pub fn get_voter_chat<'a>(&'a self) -> Option<&'a Chat> {
14014        match self {
14015            Self::PollAnswer(ref v) => Some(v.get_voter_chat()),
14016            _ => None,
14017        }
14018        .flatten()
14019    }
14020    #[allow(rustdoc::invalid_html_tags)]
14021    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
14022    #[allow(clippy::needless_lifetimes)]
14023    pub fn get_correct_option_id<'a>(&'a self) -> Option<i64> {
14024        match self {
14025            Self::Poll(ref v) => Some(v.get_correct_option_id()),
14026            _ => None,
14027        }
14028        .flatten()
14029    }
14030    #[allow(rustdoc::invalid_html_tags)]
14031    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
14032    #[allow(clippy::needless_lifetimes)]
14033    pub fn get_suggested_post_info<'a>(&'a self) -> Option<&'a SuggestedPostInfo> {
14034        match self {
14035            Self::Message(ref v) => Some(v.get_suggested_post_info()),
14036            Self::EditedMessage(ref v) => Some(v.get_suggested_post_info()),
14037            Self::ChannelPost(ref v) => Some(v.get_suggested_post_info()),
14038            Self::EditedChannelPost(ref v) => Some(v.get_suggested_post_info()),
14039            Self::BusinessMessage(ref v) => Some(v.get_suggested_post_info()),
14040            Self::EditedBusinessMessage(ref v) => Some(v.get_suggested_post_info()),
14041            _ => None,
14042        }
14043        .flatten()
14044    }
14045    #[allow(rustdoc::invalid_html_tags)]
14046    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
14047    #[allow(clippy::needless_lifetimes)]
14048    pub fn get_successful_payment<'a>(&'a self) -> Option<&'a SuccessfulPayment> {
14049        match self {
14050            Self::Message(ref v) => Some(v.get_successful_payment()),
14051            Self::EditedMessage(ref v) => Some(v.get_successful_payment()),
14052            Self::ChannelPost(ref v) => Some(v.get_successful_payment()),
14053            Self::EditedChannelPost(ref v) => Some(v.get_successful_payment()),
14054            Self::BusinessMessage(ref v) => Some(v.get_successful_payment()),
14055            Self::EditedBusinessMessage(ref v) => Some(v.get_successful_payment()),
14056            _ => None,
14057        }
14058        .flatten()
14059    }
14060    #[allow(rustdoc::invalid_html_tags)]
14061    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
14062    #[allow(clippy::needless_lifetimes)]
14063    pub fn get_game<'a>(&'a self) -> Option<&'a Game> {
14064        match self {
14065            Self::Message(ref v) => Some(v.get_game()),
14066            Self::EditedMessage(ref v) => Some(v.get_game()),
14067            Self::ChannelPost(ref v) => Some(v.get_game()),
14068            Self::EditedChannelPost(ref v) => Some(v.get_game()),
14069            Self::BusinessMessage(ref v) => Some(v.get_game()),
14070            Self::EditedBusinessMessage(ref v) => Some(v.get_game()),
14071            _ => None,
14072        }
14073        .flatten()
14074    }
14075    #[allow(rustdoc::invalid_html_tags)]
14076    #[doc = "Information about the chat boost"]
14077    #[allow(clippy::needless_lifetimes)]
14078    pub fn get_boost<'a>(&'a self) -> Option<&'a ChatBoost> {
14079        match self {
14080            Self::ChatBoost(ref v) => Some(v.get_boost()),
14081            _ => None,
14082        }
14083    }
14084    #[allow(rustdoc::invalid_html_tags)]
14085    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
14086    #[allow(clippy::needless_lifetimes)]
14087    pub fn get_checklist_tasks_done<'a>(&'a self) -> Option<&'a ChecklistTasksDone> {
14088        match self {
14089            Self::Message(ref v) => Some(v.get_checklist_tasks_done()),
14090            Self::EditedMessage(ref v) => Some(v.get_checklist_tasks_done()),
14091            Self::ChannelPost(ref v) => Some(v.get_checklist_tasks_done()),
14092            Self::EditedChannelPost(ref v) => Some(v.get_checklist_tasks_done()),
14093            Self::BusinessMessage(ref v) => Some(v.get_checklist_tasks_done()),
14094            Self::EditedBusinessMessage(ref v) => Some(v.get_checklist_tasks_done()),
14095            _ => None,
14096        }
14097        .flatten()
14098    }
14099    #[allow(rustdoc::invalid_html_tags)]
14100    #[doc = "Optional. Message is an audio file, information about the file"]
14101    #[allow(clippy::needless_lifetimes)]
14102    pub fn get_audio<'a>(&'a self) -> Option<&'a Audio> {
14103        match self {
14104            Self::Message(ref v) => Some(v.get_audio()),
14105            Self::EditedMessage(ref v) => Some(v.get_audio()),
14106            Self::ChannelPost(ref v) => Some(v.get_audio()),
14107            Self::EditedChannelPost(ref v) => Some(v.get_audio()),
14108            Self::BusinessMessage(ref v) => Some(v.get_audio()),
14109            Self::EditedBusinessMessage(ref v) => Some(v.get_audio()),
14110            _ => None,
14111        }
14112        .flatten()
14113    }
14114    #[allow(rustdoc::invalid_html_tags)]
14115    #[doc = "Optional. Service message: a suggested post was declined"]
14116    #[allow(clippy::needless_lifetimes)]
14117    pub fn get_suggested_post_declined<'a>(&'a self) -> Option<&'a SuggestedPostDeclined> {
14118        match self {
14119            Self::Message(ref v) => Some(v.get_suggested_post_declined()),
14120            Self::EditedMessage(ref v) => Some(v.get_suggested_post_declined()),
14121            Self::ChannelPost(ref v) => Some(v.get_suggested_post_declined()),
14122            Self::EditedChannelPost(ref v) => Some(v.get_suggested_post_declined()),
14123            Self::BusinessMessage(ref v) => Some(v.get_suggested_post_declined()),
14124            Self::EditedBusinessMessage(ref v) => Some(v.get_suggested_post_declined()),
14125            _ => None,
14126        }
14127        .flatten()
14128    }
14129    #[allow(rustdoc::invalid_html_tags)]
14130    #[doc = "True, if the poll allows multiple answers"]
14131    #[allow(clippy::needless_lifetimes)]
14132    pub fn get_allows_multiple_answers<'a>(&'a self) -> Option<bool> {
14133        match self {
14134            Self::Poll(ref v) => Some(v.get_allows_multiple_answers()),
14135            _ => None,
14136        }
14137    }
14138    #[allow(rustdoc::invalid_html_tags)]
14139    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
14140    #[allow(clippy::needless_lifetimes)]
14141    pub fn get_reply_to_checklist_task_id<'a>(&'a self) -> Option<i64> {
14142        match self {
14143            Self::Message(ref v) => Some(v.get_reply_to_checklist_task_id()),
14144            Self::EditedMessage(ref v) => Some(v.get_reply_to_checklist_task_id()),
14145            Self::ChannelPost(ref v) => Some(v.get_reply_to_checklist_task_id()),
14146            Self::EditedChannelPost(ref v) => Some(v.get_reply_to_checklist_task_id()),
14147            Self::BusinessMessage(ref v) => Some(v.get_reply_to_checklist_task_id()),
14148            Self::EditedBusinessMessage(ref v) => Some(v.get_reply_to_checklist_task_id()),
14149            _ => None,
14150        }
14151        .flatten()
14152    }
14153    #[allow(rustdoc::invalid_html_tags)]
14154    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
14155    #[allow(clippy::needless_lifetimes)]
14156    pub fn get_left_chat_member<'a>(&'a self) -> Option<&'a User> {
14157        match self {
14158            Self::Message(ref v) => Some(v.get_left_chat_member()),
14159            Self::EditedMessage(ref v) => Some(v.get_left_chat_member()),
14160            Self::ChannelPost(ref v) => Some(v.get_left_chat_member()),
14161            Self::EditedChannelPost(ref v) => Some(v.get_left_chat_member()),
14162            Self::BusinessMessage(ref v) => Some(v.get_left_chat_member()),
14163            Self::EditedBusinessMessage(ref v) => Some(v.get_left_chat_member()),
14164            _ => None,
14165        }
14166        .flatten()
14167    }
14168    #[allow(rustdoc::invalid_html_tags)]
14169    #[doc = "True, if the connection is active"]
14170    #[allow(clippy::needless_lifetimes)]
14171    pub fn get_is_enabled<'a>(&'a self) -> Option<bool> {
14172        match self {
14173            Self::BusinessConnection(ref v) => Some(v.get_is_enabled()),
14174            _ => None,
14175        }
14176    }
14177    #[allow(rustdoc::invalid_html_tags)]
14178    #[doc = "Optional. Service message: a regular gift was sent or received"]
14179    #[allow(clippy::needless_lifetimes)]
14180    pub fn get_gift<'a>(&'a self) -> Option<&'a GiftInfo> {
14181        match self {
14182            Self::Message(ref v) => Some(v.get_gift()),
14183            Self::EditedMessage(ref v) => Some(v.get_gift()),
14184            Self::ChannelPost(ref v) => Some(v.get_gift()),
14185            Self::EditedChannelPost(ref v) => Some(v.get_gift()),
14186            Self::BusinessMessage(ref v) => Some(v.get_gift()),
14187            Self::EditedBusinessMessage(ref v) => Some(v.get_gift()),
14188            _ => None,
14189        }
14190        .flatten()
14191    }
14192    #[allow(rustdoc::invalid_html_tags)]
14193    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
14194    #[allow(clippy::needless_lifetimes)]
14195    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
14196        match self {
14197            Self::Message(ref v) => Some(v.get_reply_markup()),
14198            Self::EditedMessage(ref v) => Some(v.get_reply_markup()),
14199            Self::ChannelPost(ref v) => Some(v.get_reply_markup()),
14200            Self::EditedChannelPost(ref v) => Some(v.get_reply_markup()),
14201            Self::BusinessMessage(ref v) => Some(v.get_reply_markup()),
14202            Self::EditedBusinessMessage(ref v) => Some(v.get_reply_markup()),
14203            _ => None,
14204        }
14205        .flatten()
14206    }
14207    #[allow(rustdoc::invalid_html_tags)]
14208    #[doc = "Optional. Service message: video chat ended"]
14209    #[allow(clippy::needless_lifetimes)]
14210    pub fn get_video_chat_ended<'a>(&'a self) -> Option<&'a VideoChatEnded> {
14211        match self {
14212            Self::Message(ref v) => Some(v.get_video_chat_ended()),
14213            Self::EditedMessage(ref v) => Some(v.get_video_chat_ended()),
14214            Self::ChannelPost(ref v) => Some(v.get_video_chat_ended()),
14215            Self::EditedChannelPost(ref v) => Some(v.get_video_chat_ended()),
14216            Self::BusinessMessage(ref v) => Some(v.get_video_chat_ended()),
14217            Self::EditedBusinessMessage(ref v) => Some(v.get_video_chat_ended()),
14218            _ => None,
14219        }
14220        .flatten()
14221    }
14222    #[allow(rustdoc::invalid_html_tags)]
14223    #[doc = "Optional. Service message: forum topic reopened"]
14224    #[allow(clippy::needless_lifetimes)]
14225    pub fn get_forum_topic_reopened<'a>(&'a self) -> Option<&'a ForumTopicReopened> {
14226        match self {
14227            Self::Message(ref v) => Some(v.get_forum_topic_reopened()),
14228            Self::EditedMessage(ref v) => Some(v.get_forum_topic_reopened()),
14229            Self::ChannelPost(ref v) => Some(v.get_forum_topic_reopened()),
14230            Self::EditedChannelPost(ref v) => Some(v.get_forum_topic_reopened()),
14231            Self::BusinessMessage(ref v) => Some(v.get_forum_topic_reopened()),
14232            Self::EditedBusinessMessage(ref v) => Some(v.get_forum_topic_reopened()),
14233            _ => None,
14234        }
14235        .flatten()
14236    }
14237    #[allow(rustdoc::invalid_html_tags)]
14238    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
14239    #[allow(clippy::needless_lifetimes)]
14240    pub fn get_shipping_option_id<'a>(&'a self) -> Option<&'a str> {
14241        match self {
14242            Self::PreCheckoutQuery(ref v) => Some(v.get_shipping_option_id()),
14243            _ => None,
14244        }
14245        .flatten()
14246    }
14247    #[allow(rustdoc::invalid_html_tags)]
14248    #[doc = "Unique query identifier"]
14249    #[allow(clippy::needless_lifetimes)]
14250    pub fn get_id<'a>(&'a self) -> Option<&'a str> {
14251        match self {
14252            Self::ShippingQuery(ref v) => Some(v.get_id()),
14253            Self::PreCheckoutQuery(ref v) => Some(v.get_id()),
14254            _ => None,
14255        }
14256    }
14257    #[allow(rustdoc::invalid_html_tags)]
14258    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
14259    #[allow(clippy::needless_lifetimes)]
14260    pub fn get_message_ids<'a>(&'a self) -> Option<&'a Vec<i64>> {
14261        match self {
14262            Self::DeletedBusinessMessages(ref v) => Some(v.get_message_ids()),
14263            _ => None,
14264        }
14265    }
14266    #[allow(rustdoc::invalid_html_tags)]
14267    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
14268    #[allow(clippy::needless_lifetimes)]
14269    pub fn get_proximity_alert_triggered<'a>(&'a self) -> Option<&'a ProximityAlertTriggered> {
14270        match self {
14271            Self::Message(ref v) => Some(v.get_proximity_alert_triggered()),
14272            Self::EditedMessage(ref v) => Some(v.get_proximity_alert_triggered()),
14273            Self::ChannelPost(ref v) => Some(v.get_proximity_alert_triggered()),
14274            Self::EditedChannelPost(ref v) => Some(v.get_proximity_alert_triggered()),
14275            Self::BusinessMessage(ref v) => Some(v.get_proximity_alert_triggered()),
14276            Self::EditedBusinessMessage(ref v) => Some(v.get_proximity_alert_triggered()),
14277            _ => None,
14278        }
14279        .flatten()
14280    }
14281    #[allow(rustdoc::invalid_html_tags)]
14282    #[doc = "Optional. Order information provided by the user"]
14283    #[allow(clippy::needless_lifetimes)]
14284    pub fn get_order_info<'a>(&'a self) -> Option<&'a OrderInfo> {
14285        match self {
14286            Self::PreCheckoutQuery(ref v) => Some(v.get_order_info()),
14287            _ => None,
14288        }
14289        .flatten()
14290    }
14291    #[allow(rustdoc::invalid_html_tags)]
14292    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
14293    #[allow(clippy::needless_lifetimes)]
14294    pub fn get_sender_business_bot<'a>(&'a self) -> Option<&'a User> {
14295        match self {
14296            Self::Message(ref v) => Some(v.get_sender_business_bot()),
14297            Self::EditedMessage(ref v) => Some(v.get_sender_business_bot()),
14298            Self::ChannelPost(ref v) => Some(v.get_sender_business_bot()),
14299            Self::EditedChannelPost(ref v) => Some(v.get_sender_business_bot()),
14300            Self::BusinessMessage(ref v) => Some(v.get_sender_business_bot()),
14301            Self::EditedBusinessMessage(ref v) => Some(v.get_sender_business_bot()),
14302            _ => None,
14303        }
14304        .flatten()
14305    }
14306    #[allow(rustdoc::invalid_html_tags)]
14307    #[doc = "Unique message identifier inside the chat"]
14308    #[allow(clippy::needless_lifetimes)]
14309    pub fn get_message_id<'a>(&'a self) -> Option<i64> {
14310        match self {
14311            Self::MessageReactionCount(ref v) => Some(v.get_message_id()),
14312            _ => None,
14313        }
14314    }
14315    #[allow(rustdoc::invalid_html_tags)]
14316    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
14317    #[allow(clippy::needless_lifetimes)]
14318    pub fn get_open_period<'a>(&'a self) -> Option<i64> {
14319        match self {
14320            Self::Poll(ref v) => Some(v.get_open_period()),
14321            _ => None,
14322        }
14323        .flatten()
14324    }
14325    #[allow(rustdoc::invalid_html_tags)]
14326    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
14327    #[allow(clippy::needless_lifetimes)]
14328    pub fn get_has_media_spoiler<'a>(&'a self) -> Option<bool> {
14329        match self {
14330            Self::Message(ref v) => Some(v.get_has_media_spoiler()),
14331            Self::EditedMessage(ref v) => Some(v.get_has_media_spoiler()),
14332            Self::ChannelPost(ref v) => Some(v.get_has_media_spoiler()),
14333            Self::EditedChannelPost(ref v) => Some(v.get_has_media_spoiler()),
14334            Self::BusinessMessage(ref v) => Some(v.get_has_media_spoiler()),
14335            Self::EditedBusinessMessage(ref v) => Some(v.get_has_media_spoiler()),
14336            _ => None,
14337        }
14338        .flatten()
14339    }
14340    #[allow(rustdoc::invalid_html_tags)]
14341    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
14342    #[allow(clippy::needless_lifetimes)]
14343    pub fn get_quote<'a>(&'a self) -> Option<&'a TextQuote> {
14344        match self {
14345            Self::Message(ref v) => Some(v.get_quote()),
14346            Self::EditedMessage(ref v) => Some(v.get_quote()),
14347            Self::ChannelPost(ref v) => Some(v.get_quote()),
14348            Self::EditedChannelPost(ref v) => Some(v.get_quote()),
14349            Self::BusinessMessage(ref v) => Some(v.get_quote()),
14350            Self::EditedBusinessMessage(ref v) => Some(v.get_quote()),
14351            _ => None,
14352        }
14353        .flatten()
14354    }
14355    #[allow(rustdoc::invalid_html_tags)]
14356    #[doc = "Unique identifier of the boost"]
14357    #[allow(clippy::needless_lifetimes)]
14358    pub fn get_boost_id<'a>(&'a self) -> Option<&'a str> {
14359        match self {
14360            Self::RemovedChatBoost(ref v) => Some(v.get_boost_id()),
14361            _ => None,
14362        }
14363    }
14364    #[allow(rustdoc::invalid_html_tags)]
14365    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
14366    #[allow(clippy::needless_lifetimes)]
14367    pub fn get_close_date<'a>(&'a self) -> Option<i64> {
14368        match self {
14369            Self::Poll(ref v) => Some(v.get_close_date()),
14370            _ => None,
14371        }
14372        .flatten()
14373    }
14374    #[allow(rustdoc::invalid_html_tags)]
14375    #[doc = "Optional. For replies to a story, the original story"]
14376    #[allow(clippy::needless_lifetimes)]
14377    pub fn get_reply_to_story<'a>(&'a self) -> Option<&'a Story> {
14378        match self {
14379            Self::Message(ref v) => Some(v.get_reply_to_story()),
14380            Self::EditedMessage(ref v) => Some(v.get_reply_to_story()),
14381            Self::ChannelPost(ref v) => Some(v.get_reply_to_story()),
14382            Self::EditedChannelPost(ref v) => Some(v.get_reply_to_story()),
14383            Self::BusinessMessage(ref v) => Some(v.get_reply_to_story()),
14384            Self::EditedBusinessMessage(ref v) => Some(v.get_reply_to_story()),
14385            _ => None,
14386        }
14387        .flatten()
14388    }
14389    #[allow(rustdoc::invalid_html_tags)]
14390    #[doc = "Optional. True, if the message can't be forwarded"]
14391    #[allow(clippy::needless_lifetimes)]
14392    pub fn get_has_protected_content<'a>(&'a self) -> Option<bool> {
14393        match self {
14394            Self::Message(ref v) => Some(v.get_has_protected_content()),
14395            Self::EditedMessage(ref v) => Some(v.get_has_protected_content()),
14396            Self::ChannelPost(ref v) => Some(v.get_has_protected_content()),
14397            Self::EditedChannelPost(ref v) => Some(v.get_has_protected_content()),
14398            Self::BusinessMessage(ref v) => Some(v.get_has_protected_content()),
14399            Self::EditedBusinessMessage(ref v) => Some(v.get_has_protected_content()),
14400            _ => None,
14401        }
14402        .flatten()
14403    }
14404    #[allow(rustdoc::invalid_html_tags)]
14405    #[doc = "Optional. Service message: user boosted the chat"]
14406    #[allow(clippy::needless_lifetimes)]
14407    pub fn get_boost_added<'a>(&'a self) -> Option<&'a ChatBoostAdded> {
14408        match self {
14409            Self::Message(ref v) => Some(v.get_boost_added()),
14410            Self::EditedMessage(ref v) => Some(v.get_boost_added()),
14411            Self::ChannelPost(ref v) => Some(v.get_boost_added()),
14412            Self::EditedChannelPost(ref v) => Some(v.get_boost_added()),
14413            Self::BusinessMessage(ref v) => Some(v.get_boost_added()),
14414            Self::EditedBusinessMessage(ref v) => Some(v.get_boost_added()),
14415            _ => None,
14416        }
14417        .flatten()
14418    }
14419    #[allow(rustdoc::invalid_html_tags)]
14420    #[doc = "Optional. Message is a native poll, information about the poll"]
14421    #[allow(clippy::needless_lifetimes)]
14422    pub fn get_poll<'a>(&'a self) -> Option<&'a Poll> {
14423        match self {
14424            Self::Message(ref v) => Some(v.get_poll()),
14425            Self::EditedMessage(ref v) => Some(v.get_poll()),
14426            Self::ChannelPost(ref v) => Some(v.get_poll()),
14427            Self::EditedChannelPost(ref v) => Some(v.get_poll()),
14428            Self::BusinessMessage(ref v) => Some(v.get_poll()),
14429            Self::EditedBusinessMessage(ref v) => Some(v.get_poll()),
14430            _ => None,
14431        }
14432        .flatten()
14433    }
14434    #[allow(rustdoc::invalid_html_tags)]
14435    #[doc = "The unique identifier for the result that was chosen"]
14436    #[allow(clippy::needless_lifetimes)]
14437    pub fn get_result_id<'a>(&'a self) -> Option<&'a str> {
14438        match self {
14439            Self::ChosenInlineResult(ref v) => Some(v.get_result_id()),
14440            _ => None,
14441        }
14442    }
14443    #[allow(rustdoc::invalid_html_tags)]
14444    #[doc = "Optional. The message is a scheduled giveaway message"]
14445    #[allow(clippy::needless_lifetimes)]
14446    pub fn get_giveaway<'a>(&'a self) -> Option<&'a Giveaway> {
14447        match self {
14448            Self::Message(ref v) => Some(v.get_giveaway()),
14449            Self::EditedMessage(ref v) => Some(v.get_giveaway()),
14450            Self::ChannelPost(ref v) => Some(v.get_giveaway()),
14451            Self::EditedChannelPost(ref v) => Some(v.get_giveaway()),
14452            Self::BusinessMessage(ref v) => Some(v.get_giveaway()),
14453            Self::EditedBusinessMessage(ref v) => Some(v.get_giveaway()),
14454            _ => None,
14455        }
14456        .flatten()
14457    }
14458    #[allow(rustdoc::invalid_html_tags)]
14459    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
14460    #[allow(clippy::needless_lifetimes)]
14461    pub fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
14462        match self {
14463            Self::Message(ref v) => Some(v.get_entities()),
14464            Self::EditedMessage(ref v) => Some(v.get_entities()),
14465            Self::ChannelPost(ref v) => Some(v.get_entities()),
14466            Self::EditedChannelPost(ref v) => Some(v.get_entities()),
14467            Self::BusinessMessage(ref v) => Some(v.get_entities()),
14468            Self::EditedBusinessMessage(ref v) => Some(v.get_entities()),
14469            _ => None,
14470        }
14471        .flatten()
14472    }
14473    #[allow(rustdoc::invalid_html_tags)]
14474    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
14475    #[allow(clippy::needless_lifetimes)]
14476    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
14477        match self {
14478            Self::Message(ref v) => Some(v.get_caption()),
14479            Self::EditedMessage(ref v) => Some(v.get_caption()),
14480            Self::ChannelPost(ref v) => Some(v.get_caption()),
14481            Self::EditedChannelPost(ref v) => Some(v.get_caption()),
14482            Self::BusinessMessage(ref v) => Some(v.get_caption()),
14483            Self::EditedBusinessMessage(ref v) => Some(v.get_caption()),
14484            _ => None,
14485        }
14486        .flatten()
14487    }
14488    #[allow(rustdoc::invalid_html_tags)]
14489    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
14490    #[allow(clippy::needless_lifetimes)]
14491    pub fn get_question_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
14492        match self {
14493            Self::Poll(ref v) => Some(v.get_question_entities()),
14494            _ => None,
14495        }
14496        .flatten()
14497    }
14498    #[allow(rustdoc::invalid_html_tags)]
14499    #[doc = "Optional. Service message: new participants invited to a video chat"]
14500    #[allow(clippy::needless_lifetimes)]
14501    pub fn get_video_chat_participants_invited<'a>(
14502        &'a self,
14503    ) -> Option<&'a VideoChatParticipantsInvited> {
14504        match self {
14505            Self::Message(ref v) => Some(v.get_video_chat_participants_invited()),
14506            Self::EditedMessage(ref v) => Some(v.get_video_chat_participants_invited()),
14507            Self::ChannelPost(ref v) => Some(v.get_video_chat_participants_invited()),
14508            Self::EditedChannelPost(ref v) => Some(v.get_video_chat_participants_invited()),
14509            Self::BusinessMessage(ref v) => Some(v.get_video_chat_participants_invited()),
14510            Self::EditedBusinessMessage(ref v) => Some(v.get_video_chat_participants_invited()),
14511            _ => None,
14512        }
14513        .flatten()
14514    }
14515    #[allow(rustdoc::invalid_html_tags)]
14516    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
14517    #[allow(clippy::needless_lifetimes)]
14518    pub fn get_invoice<'a>(&'a self) -> Option<&'a Invoice> {
14519        match self {
14520            Self::Message(ref v) => Some(v.get_invoice()),
14521            Self::EditedMessage(ref v) => Some(v.get_invoice()),
14522            Self::ChannelPost(ref v) => Some(v.get_invoice()),
14523            Self::EditedChannelPost(ref v) => Some(v.get_invoice()),
14524            Self::BusinessMessage(ref v) => Some(v.get_invoice()),
14525            Self::EditedBusinessMessage(ref v) => Some(v.get_invoice()),
14526            _ => None,
14527        }
14528        .flatten()
14529    }
14530    #[allow(rustdoc::invalid_html_tags)]
14531    #[doc = "Optional. Message contains paid media; information about the paid media"]
14532    #[allow(clippy::needless_lifetimes)]
14533    pub fn get_paid_media<'a>(&'a self) -> Option<&'a PaidMediaInfo> {
14534        match self {
14535            Self::Message(ref v) => Some(v.get_paid_media()),
14536            Self::EditedMessage(ref v) => Some(v.get_paid_media()),
14537            Self::ChannelPost(ref v) => Some(v.get_paid_media()),
14538            Self::EditedChannelPost(ref v) => Some(v.get_paid_media()),
14539            Self::BusinessMessage(ref v) => Some(v.get_paid_media()),
14540            Self::EditedBusinessMessage(ref v) => Some(v.get_paid_media()),
14541            _ => None,
14542        }
14543        .flatten()
14544    }
14545    #[allow(rustdoc::invalid_html_tags)]
14546    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
14547    #[allow(clippy::needless_lifetimes)]
14548    pub fn get_migrate_from_chat_id<'a>(&'a self) -> Option<i64> {
14549        match self {
14550            Self::Message(ref v) => Some(v.get_migrate_from_chat_id()),
14551            Self::EditedMessage(ref v) => Some(v.get_migrate_from_chat_id()),
14552            Self::ChannelPost(ref v) => Some(v.get_migrate_from_chat_id()),
14553            Self::EditedChannelPost(ref v) => Some(v.get_migrate_from_chat_id()),
14554            Self::BusinessMessage(ref v) => Some(v.get_migrate_from_chat_id()),
14555            Self::EditedBusinessMessage(ref v) => Some(v.get_migrate_from_chat_id()),
14556            _ => None,
14557        }
14558        .flatten()
14559    }
14560    #[allow(rustdoc::invalid_html_tags)]
14561    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
14562    #[allow(clippy::needless_lifetimes)]
14563    pub fn get_explanation<'a>(&'a self) -> Option<&'a str> {
14564        match self {
14565            Self::Poll(ref v) => Some(v.get_explanation()),
14566            _ => None,
14567        }
14568        .flatten()
14569    }
14570    #[allow(rustdoc::invalid_html_tags)]
14571    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
14572    #[allow(clippy::needless_lifetimes)]
14573    pub fn get_total_amount<'a>(&'a self) -> Option<i64> {
14574        match self {
14575            Self::PreCheckoutQuery(ref v) => Some(v.get_total_amount()),
14576            _ => None,
14577        }
14578    }
14579    #[allow(rustdoc::invalid_html_tags)]
14580    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
14581    #[allow(clippy::needless_lifetimes)]
14582    pub fn get_message<'a>(&'a self) -> Option<&'a MaybeInaccessibleMessage> {
14583        match self {
14584            Self::CallbackQuery(ref v) => Some(v.get_message()),
14585            _ => None,
14586        }
14587        .flatten()
14588    }
14589    #[allow(rustdoc::invalid_html_tags)]
14590    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
14591    #[allow(clippy::needless_lifetimes)]
14592    pub fn get_refunded_payment<'a>(&'a self) -> Option<&'a RefundedPayment> {
14593        match self {
14594            Self::Message(ref v) => Some(v.get_refunded_payment()),
14595            Self::EditedMessage(ref v) => Some(v.get_refunded_payment()),
14596            Self::ChannelPost(ref v) => Some(v.get_refunded_payment()),
14597            Self::EditedChannelPost(ref v) => Some(v.get_refunded_payment()),
14598            Self::BusinessMessage(ref v) => Some(v.get_refunded_payment()),
14599            Self::EditedBusinessMessage(ref v) => Some(v.get_refunded_payment()),
14600            _ => None,
14601        }
14602        .flatten()
14603    }
14604    #[allow(rustdoc::invalid_html_tags)]
14605    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
14606    #[allow(clippy::needless_lifetimes)]
14607    pub fn get_supergroup_chat_created<'a>(&'a self) -> Option<bool> {
14608        match self {
14609            Self::Message(ref v) => Some(v.get_supergroup_chat_created()),
14610            Self::EditedMessage(ref v) => Some(v.get_supergroup_chat_created()),
14611            Self::ChannelPost(ref v) => Some(v.get_supergroup_chat_created()),
14612            Self::EditedChannelPost(ref v) => Some(v.get_supergroup_chat_created()),
14613            Self::BusinessMessage(ref v) => Some(v.get_supergroup_chat_created()),
14614            Self::EditedBusinessMessage(ref v) => Some(v.get_supergroup_chat_created()),
14615            _ => None,
14616        }
14617        .flatten()
14618    }
14619    #[allow(rustdoc::invalid_html_tags)]
14620    #[doc = "Optional. Service message: a suggested post was approved"]
14621    #[allow(clippy::needless_lifetimes)]
14622    pub fn get_suggested_post_approved<'a>(&'a self) -> Option<&'a SuggestedPostApproved> {
14623        match self {
14624            Self::Message(ref v) => Some(v.get_suggested_post_approved()),
14625            Self::EditedMessage(ref v) => Some(v.get_suggested_post_approved()),
14626            Self::ChannelPost(ref v) => Some(v.get_suggested_post_approved()),
14627            Self::EditedChannelPost(ref v) => Some(v.get_suggested_post_approved()),
14628            Self::BusinessMessage(ref v) => Some(v.get_suggested_post_approved()),
14629            Self::EditedBusinessMessage(ref v) => Some(v.get_suggested_post_approved()),
14630            _ => None,
14631        }
14632        .flatten()
14633    }
14634    #[allow(rustdoc::invalid_html_tags)]
14635    #[doc = "Optional. Telegram Passport data"]
14636    #[allow(clippy::needless_lifetimes)]
14637    pub fn get_passport_data<'a>(&'a self) -> Option<&'a PassportData> {
14638        match self {
14639            Self::Message(ref v) => Some(v.get_passport_data()),
14640            Self::EditedMessage(ref v) => Some(v.get_passport_data()),
14641            Self::ChannelPost(ref v) => Some(v.get_passport_data()),
14642            Self::EditedChannelPost(ref v) => Some(v.get_passport_data()),
14643            Self::BusinessMessage(ref v) => Some(v.get_passport_data()),
14644            Self::EditedBusinessMessage(ref v) => Some(v.get_passport_data()),
14645            _ => None,
14646        }
14647        .flatten()
14648    }
14649    #[allow(rustdoc::invalid_html_tags)]
14650    #[doc = "Optional. Message is a shared contact, information about the contact"]
14651    #[allow(clippy::needless_lifetimes)]
14652    pub fn get_contact<'a>(&'a self) -> Option<&'a Contact> {
14653        match self {
14654            Self::Message(ref v) => Some(v.get_contact()),
14655            Self::EditedMessage(ref v) => Some(v.get_contact()),
14656            Self::ChannelPost(ref v) => Some(v.get_contact()),
14657            Self::EditedChannelPost(ref v) => Some(v.get_contact()),
14658            Self::BusinessMessage(ref v) => Some(v.get_contact()),
14659            Self::EditedBusinessMessage(ref v) => Some(v.get_contact()),
14660            _ => None,
14661        }
14662        .flatten()
14663    }
14664    #[allow(rustdoc::invalid_html_tags)]
14665    #[doc = "Optional. Message is a checklist"]
14666    #[allow(clippy::needless_lifetimes)]
14667    pub fn get_checklist<'a>(&'a self) -> Option<&'a Checklist> {
14668        match self {
14669            Self::Message(ref v) => Some(v.get_checklist()),
14670            Self::EditedMessage(ref v) => Some(v.get_checklist()),
14671            Self::ChannelPost(ref v) => Some(v.get_checklist()),
14672            Self::EditedChannelPost(ref v) => Some(v.get_checklist()),
14673            Self::BusinessMessage(ref v) => Some(v.get_checklist()),
14674            Self::EditedBusinessMessage(ref v) => Some(v.get_checklist()),
14675            _ => None,
14676        }
14677        .flatten()
14678    }
14679    #[allow(rustdoc::invalid_html_tags)]
14680    #[doc = "Optional. Service message: video chat scheduled"]
14681    #[allow(clippy::needless_lifetimes)]
14682    pub fn get_video_chat_scheduled<'a>(&'a self) -> Option<&'a VideoChatScheduled> {
14683        match self {
14684            Self::Message(ref v) => Some(v.get_video_chat_scheduled()),
14685            Self::EditedMessage(ref v) => Some(v.get_video_chat_scheduled()),
14686            Self::ChannelPost(ref v) => Some(v.get_video_chat_scheduled()),
14687            Self::EditedChannelPost(ref v) => Some(v.get_video_chat_scheduled()),
14688            Self::BusinessMessage(ref v) => Some(v.get_video_chat_scheduled()),
14689            Self::EditedBusinessMessage(ref v) => Some(v.get_video_chat_scheduled()),
14690            _ => None,
14691        }
14692        .flatten()
14693    }
14694    #[allow(rustdoc::invalid_html_tags)]
14695    #[doc = "Optional. Date the message was last edited in Unix time"]
14696    #[allow(clippy::needless_lifetimes)]
14697    pub fn get_edit_date<'a>(&'a self) -> Option<i64> {
14698        match self {
14699            Self::Message(ref v) => Some(v.get_edit_date()),
14700            Self::EditedMessage(ref v) => Some(v.get_edit_date()),
14701            Self::ChannelPost(ref v) => Some(v.get_edit_date()),
14702            Self::EditedChannelPost(ref v) => Some(v.get_edit_date()),
14703            Self::BusinessMessage(ref v) => Some(v.get_edit_date()),
14704            Self::EditedBusinessMessage(ref v) => Some(v.get_edit_date()),
14705            _ => None,
14706        }
14707        .flatten()
14708    }
14709    #[allow(rustdoc::invalid_html_tags)]
14710    #[doc = "True, if the poll is anonymous"]
14711    #[allow(clippy::needless_lifetimes)]
14712    pub fn get_is_anonymous<'a>(&'a self) -> Option<bool> {
14713        match self {
14714            Self::Poll(ref v) => Some(v.get_is_anonymous()),
14715            _ => None,
14716        }
14717    }
14718    #[allow(rustdoc::invalid_html_tags)]
14719    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
14720    #[allow(clippy::needless_lifetimes)]
14721    pub fn get_data<'a>(&'a self) -> Option<&'a str> {
14722        match self {
14723            Self::CallbackQuery(ref v) => Some(v.get_data()),
14724            _ => None,
14725        }
14726        .flatten()
14727    }
14728    #[allow(rustdoc::invalid_html_tags)]
14729    #[doc = "Optional. Bio of the user."]
14730    #[allow(clippy::needless_lifetimes)]
14731    pub fn get_bio<'a>(&'a self) -> Option<&'a str> {
14732        match self {
14733            Self::ChatJoinRequest(ref v) => Some(v.get_bio()),
14734            _ => None,
14735        }
14736        .flatten()
14737    }
14738    #[allow(rustdoc::invalid_html_tags)]
14739    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
14740    #[allow(clippy::needless_lifetimes)]
14741    pub fn get_write_access_allowed<'a>(&'a self) -> Option<&'a WriteAccessAllowed> {
14742        match self {
14743            Self::Message(ref v) => Some(v.get_write_access_allowed()),
14744            Self::EditedMessage(ref v) => Some(v.get_write_access_allowed()),
14745            Self::ChannelPost(ref v) => Some(v.get_write_access_allowed()),
14746            Self::EditedChannelPost(ref v) => Some(v.get_write_access_allowed()),
14747            Self::BusinessMessage(ref v) => Some(v.get_write_access_allowed()),
14748            Self::EditedBusinessMessage(ref v) => Some(v.get_write_access_allowed()),
14749            _ => None,
14750        }
14751        .flatten()
14752    }
14753    #[allow(rustdoc::invalid_html_tags)]
14754    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
14755    #[allow(clippy::needless_lifetimes)]
14756    pub fn get_paid_star_count<'a>(&'a self) -> Option<i64> {
14757        match self {
14758            Self::Message(ref v) => Some(v.get_paid_star_count()),
14759            Self::EditedMessage(ref v) => Some(v.get_paid_star_count()),
14760            Self::ChannelPost(ref v) => Some(v.get_paid_star_count()),
14761            Self::EditedChannelPost(ref v) => Some(v.get_paid_star_count()),
14762            Self::BusinessMessage(ref v) => Some(v.get_paid_star_count()),
14763            Self::EditedBusinessMessage(ref v) => Some(v.get_paid_star_count()),
14764            _ => None,
14765        }
14766        .flatten()
14767    }
14768    #[allow(rustdoc::invalid_html_tags)]
14769    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
14770    #[allow(clippy::needless_lifetimes)]
14771    pub fn get_suggested_post_refunded<'a>(&'a self) -> Option<&'a SuggestedPostRefunded> {
14772        match self {
14773            Self::Message(ref v) => Some(v.get_suggested_post_refunded()),
14774            Self::EditedMessage(ref v) => Some(v.get_suggested_post_refunded()),
14775            Self::ChannelPost(ref v) => Some(v.get_suggested_post_refunded()),
14776            Self::EditedChannelPost(ref v) => Some(v.get_suggested_post_refunded()),
14777            Self::BusinessMessage(ref v) => Some(v.get_suggested_post_refunded()),
14778            Self::EditedBusinessMessage(ref v) => Some(v.get_suggested_post_refunded()),
14779            _ => None,
14780        }
14781        .flatten()
14782    }
14783    #[allow(rustdoc::invalid_html_tags)]
14784    #[doc = "Poll question, 1-300 characters"]
14785    #[allow(clippy::needless_lifetimes)]
14786    pub fn get_question<'a>(&'a self) -> Option<&'a str> {
14787        match self {
14788            Self::Poll(ref v) => Some(v.get_question()),
14789            _ => None,
14790        }
14791    }
14792    #[allow(rustdoc::invalid_html_tags)]
14793    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
14794    #[allow(clippy::needless_lifetimes)]
14795    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
14796        match self {
14797            Self::Message(ref v) => Some(v.get_caption_entities()),
14798            Self::EditedMessage(ref v) => Some(v.get_caption_entities()),
14799            Self::ChannelPost(ref v) => Some(v.get_caption_entities()),
14800            Self::EditedChannelPost(ref v) => Some(v.get_caption_entities()),
14801            Self::BusinessMessage(ref v) => Some(v.get_caption_entities()),
14802            Self::EditedBusinessMessage(ref v) => Some(v.get_caption_entities()),
14803            _ => None,
14804        }
14805        .flatten()
14806    }
14807    #[allow(rustdoc::invalid_html_tags)]
14808    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
14809    #[allow(clippy::needless_lifetimes)]
14810    pub fn get_general_forum_topic_hidden<'a>(&'a self) -> Option<&'a GeneralForumTopicHidden> {
14811        match self {
14812            Self::Message(ref v) => Some(v.get_general_forum_topic_hidden()),
14813            Self::EditedMessage(ref v) => Some(v.get_general_forum_topic_hidden()),
14814            Self::ChannelPost(ref v) => Some(v.get_general_forum_topic_hidden()),
14815            Self::EditedChannelPost(ref v) => Some(v.get_general_forum_topic_hidden()),
14816            Self::BusinessMessage(ref v) => Some(v.get_general_forum_topic_hidden()),
14817            Self::EditedBusinessMessage(ref v) => Some(v.get_general_forum_topic_hidden()),
14818            _ => None,
14819        }
14820        .flatten()
14821    }
14822    #[allow(rustdoc::invalid_html_tags)]
14823    #[doc = "Optional. Service message: chat background set"]
14824    #[allow(clippy::needless_lifetimes)]
14825    pub fn get_chat_background_set<'a>(&'a self) -> Option<&'a ChatBackground> {
14826        match self {
14827            Self::Message(ref v) => Some(v.get_chat_background_set()),
14828            Self::EditedMessage(ref v) => Some(v.get_chat_background_set()),
14829            Self::ChannelPost(ref v) => Some(v.get_chat_background_set()),
14830            Self::EditedChannelPost(ref v) => Some(v.get_chat_background_set()),
14831            Self::BusinessMessage(ref v) => Some(v.get_chat_background_set()),
14832            Self::EditedBusinessMessage(ref v) => Some(v.get_chat_background_set()),
14833            _ => None,
14834        }
14835        .flatten()
14836    }
14837    #[allow(rustdoc::invalid_html_tags)]
14838    #[doc = "Optional. Service message: a unique gift was sent or received"]
14839    #[allow(clippy::needless_lifetimes)]
14840    pub fn get_unique_gift<'a>(&'a self) -> Option<&'a UniqueGiftInfo> {
14841        match self {
14842            Self::Message(ref v) => Some(v.get_unique_gift()),
14843            Self::EditedMessage(ref v) => Some(v.get_unique_gift()),
14844            Self::ChannelPost(ref v) => Some(v.get_unique_gift()),
14845            Self::EditedChannelPost(ref v) => Some(v.get_unique_gift()),
14846            Self::BusinessMessage(ref v) => Some(v.get_unique_gift()),
14847            Self::EditedBusinessMessage(ref v) => Some(v.get_unique_gift()),
14848            _ => None,
14849        }
14850        .flatten()
14851    }
14852    #[allow(rustdoc::invalid_html_tags)]
14853    #[doc = "Optional. Message is a photo, available sizes of the photo"]
14854    #[allow(clippy::needless_lifetimes)]
14855    pub fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
14856        match self {
14857            Self::Message(ref v) => Some(v.get_photo()),
14858            Self::EditedMessage(ref v) => Some(v.get_photo()),
14859            Self::ChannelPost(ref v) => Some(v.get_photo()),
14860            Self::EditedChannelPost(ref v) => Some(v.get_photo()),
14861            Self::BusinessMessage(ref v) => Some(v.get_photo()),
14862            Self::EditedBusinessMessage(ref v) => Some(v.get_photo()),
14863            _ => None,
14864        }
14865        .flatten()
14866    }
14867    #[allow(rustdoc::invalid_html_tags)]
14868    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
14869    #[allow(clippy::needless_lifetimes)]
14870    pub fn get_message_thread_id<'a>(&'a self) -> Option<i64> {
14871        match self {
14872            Self::Message(ref v) => Some(v.get_message_thread_id()),
14873            Self::EditedMessage(ref v) => Some(v.get_message_thread_id()),
14874            Self::ChannelPost(ref v) => Some(v.get_message_thread_id()),
14875            Self::EditedChannelPost(ref v) => Some(v.get_message_thread_id()),
14876            Self::BusinessMessage(ref v) => Some(v.get_message_thread_id()),
14877            Self::EditedBusinessMessage(ref v) => Some(v.get_message_thread_id()),
14878            _ => None,
14879        }
14880        .flatten()
14881    }
14882    #[allow(rustdoc::invalid_html_tags)]
14883    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
14884    #[allow(clippy::needless_lifetimes)]
14885    pub fn get_chat_type<'a>(&'a self) -> Option<&'a str> {
14886        match self {
14887            Self::InlineQuery(ref v) => Some(v.get_chat_type()),
14888            _ => None,
14889        }
14890        .flatten()
14891    }
14892    #[allow(rustdoc::invalid_html_tags)]
14893    #[doc = "True, if the poll is closed"]
14894    #[allow(clippy::needless_lifetimes)]
14895    pub fn get_is_closed<'a>(&'a self) -> Option<bool> {
14896        match self {
14897            Self::Poll(ref v) => Some(v.get_is_closed()),
14898            _ => None,
14899        }
14900    }
14901    #[allow(rustdoc::invalid_html_tags)]
14902    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
14903    #[allow(clippy::needless_lifetimes)]
14904    pub fn get_inline_message_id<'a>(&'a self) -> Option<&'a str> {
14905        match self {
14906            Self::CallbackQuery(ref v) => Some(v.get_inline_message_id()),
14907            _ => None,
14908        }
14909        .flatten()
14910    }
14911    #[allow(rustdoc::invalid_html_tags)]
14912    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
14913    #[allow(clippy::needless_lifetimes)]
14914    pub fn get_remove_date<'a>(&'a self) -> Option<i64> {
14915        match self {
14916            Self::RemovedChatBoost(ref v) => Some(v.get_remove_date()),
14917            _ => None,
14918        }
14919    }
14920    #[allow(rustdoc::invalid_html_tags)]
14921    #[doc = "List of reactions that are present on the message"]
14922    #[allow(clippy::needless_lifetimes)]
14923    pub fn get_reactions<'a>(&'a self) -> Option<&'a Vec<ReactionCount>> {
14924        match self {
14925            Self::MessageReactionCount(ref v) => Some(v.get_reactions()),
14926            _ => None,
14927        }
14928    }
14929    #[allow(rustdoc::invalid_html_tags)]
14930    #[doc = "Optional. Service message: data sent by a Web App"]
14931    #[allow(clippy::needless_lifetimes)]
14932    pub fn get_web_app_data<'a>(&'a self) -> Option<&'a WebAppData> {
14933        match self {
14934            Self::Message(ref v) => Some(v.get_web_app_data()),
14935            Self::EditedMessage(ref v) => Some(v.get_web_app_data()),
14936            Self::ChannelPost(ref v) => Some(v.get_web_app_data()),
14937            Self::EditedChannelPost(ref v) => Some(v.get_web_app_data()),
14938            Self::BusinessMessage(ref v) => Some(v.get_web_app_data()),
14939            Self::EditedBusinessMessage(ref v) => Some(v.get_web_app_data()),
14940            _ => None,
14941        }
14942        .flatten()
14943    }
14944    #[allow(rustdoc::invalid_html_tags)]
14945    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
14946    #[allow(clippy::needless_lifetimes)]
14947    pub fn get_business_connection_id<'a>(&'a self) -> Option<&'a str> {
14948        match self {
14949            Self::Message(ref v) => Some(v.get_business_connection_id()),
14950            Self::EditedMessage(ref v) => Some(v.get_business_connection_id()),
14951            Self::ChannelPost(ref v) => Some(v.get_business_connection_id()),
14952            Self::EditedChannelPost(ref v) => Some(v.get_business_connection_id()),
14953            Self::BusinessMessage(ref v) => Some(v.get_business_connection_id()),
14954            Self::EditedBusinessMessage(ref v) => Some(v.get_business_connection_id()),
14955            _ => None,
14956        }
14957        .flatten()
14958    }
14959    #[allow(rustdoc::invalid_html_tags)]
14960    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
14961    #[allow(clippy::needless_lifetimes)]
14962    pub fn get_game_short_name<'a>(&'a self) -> Option<&'a str> {
14963        match self {
14964            Self::CallbackQuery(ref v) => Some(v.get_game_short_name()),
14965            _ => None,
14966        }
14967        .flatten()
14968    }
14969    #[allow(rustdoc::invalid_html_tags)]
14970    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
14971    #[allow(clippy::needless_lifetimes)]
14972    pub fn get_media_group_id<'a>(&'a self) -> Option<&'a str> {
14973        match self {
14974            Self::Message(ref v) => Some(v.get_media_group_id()),
14975            Self::EditedMessage(ref v) => Some(v.get_media_group_id()),
14976            Self::ChannelPost(ref v) => Some(v.get_media_group_id()),
14977            Self::EditedChannelPost(ref v) => Some(v.get_media_group_id()),
14978            Self::BusinessMessage(ref v) => Some(v.get_media_group_id()),
14979            Self::EditedBusinessMessage(ref v) => Some(v.get_media_group_id()),
14980            _ => None,
14981        }
14982        .flatten()
14983    }
14984    #[allow(rustdoc::invalid_html_tags)]
14985    #[doc = "The query that was used to obtain the result"]
14986    #[allow(clippy::needless_lifetimes)]
14987    pub fn get_query<'a>(&'a self) -> Option<&'a str> {
14988        match self {
14989            Self::ChosenInlineResult(ref v) => Some(v.get_query()),
14990            _ => None,
14991        }
14992    }
14993    #[allow(rustdoc::invalid_html_tags)]
14994    #[doc = "Previous information about the chat member"]
14995    #[allow(clippy::needless_lifetimes)]
14996    pub fn get_old_chat_member<'a>(&'a self) -> Option<&'a ChatMember> {
14997        match self {
14998            Self::MyChatMember(ref v) => Some(v.get_old_chat_member()),
14999            Self::ChatMember(ref v) => Some(v.get_old_chat_member()),
15000            _ => None,
15001        }
15002    }
15003    #[allow(rustdoc::invalid_html_tags)]
15004    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
15005    #[allow(clippy::needless_lifetimes)]
15006    pub fn get_via_join_request<'a>(&'a self) -> Option<bool> {
15007        match self {
15008            Self::MyChatMember(ref v) => Some(v.get_via_join_request()),
15009            Self::ChatMember(ref v) => Some(v.get_via_join_request()),
15010            _ => None,
15011        }
15012        .flatten()
15013    }
15014    #[allow(rustdoc::invalid_html_tags)]
15015    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
15016    #[allow(clippy::needless_lifetimes)]
15017    pub fn get_message_auto_delete_timer_changed<'a>(
15018        &'a self,
15019    ) -> Option<&'a MessageAutoDeleteTimerChanged> {
15020        match self {
15021            Self::Message(ref v) => Some(v.get_message_auto_delete_timer_changed()),
15022            Self::EditedMessage(ref v) => Some(v.get_message_auto_delete_timer_changed()),
15023            Self::ChannelPost(ref v) => Some(v.get_message_auto_delete_timer_changed()),
15024            Self::EditedChannelPost(ref v) => Some(v.get_message_auto_delete_timer_changed()),
15025            Self::BusinessMessage(ref v) => Some(v.get_message_auto_delete_timer_changed()),
15026            Self::EditedBusinessMessage(ref v) => Some(v.get_message_auto_delete_timer_changed()),
15027            _ => None,
15028        }
15029        .flatten()
15030    }
15031    #[allow(rustdoc::invalid_html_tags)]
15032    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
15033    #[allow(clippy::needless_lifetimes)]
15034    pub fn get_venue<'a>(&'a self) -> Option<&'a Venue> {
15035        match self {
15036            Self::Message(ref v) => Some(v.get_venue()),
15037            Self::EditedMessage(ref v) => Some(v.get_venue()),
15038            Self::ChannelPost(ref v) => Some(v.get_venue()),
15039            Self::EditedChannelPost(ref v) => Some(v.get_venue()),
15040            Self::BusinessMessage(ref v) => Some(v.get_venue()),
15041            Self::EditedBusinessMessage(ref v) => Some(v.get_venue()),
15042            _ => None,
15043        }
15044        .flatten()
15045    }
15046    #[allow(rustdoc::invalid_html_tags)]
15047    #[doc = "Bot-specified invoice payload"]
15048    #[allow(clippy::needless_lifetimes)]
15049    pub fn get_invoice_payload<'a>(&'a self) -> Option<&'a str> {
15050        match self {
15051            Self::ShippingQuery(ref v) => Some(v.get_invoice_payload()),
15052            Self::PreCheckoutQuery(ref v) => Some(v.get_invoice_payload()),
15053            _ => None,
15054        }
15055    }
15056    #[allow(rustdoc::invalid_html_tags)]
15057    #[doc = "Previous list of reaction types that were set by the user"]
15058    #[allow(clippy::needless_lifetimes)]
15059    pub fn get_old_reaction<'a>(&'a self) -> Option<&'a Vec<ReactionType>> {
15060        match self {
15061            Self::MessageReaction(ref v) => Some(v.get_old_reaction()),
15062            _ => None,
15063        }
15064    }
15065    #[allow(rustdoc::invalid_html_tags)]
15066    #[doc = "Optional. Service message: forum topic created"]
15067    #[allow(clippy::needless_lifetimes)]
15068    pub fn get_forum_topic_created<'a>(&'a self) -> Option<&'a ForumTopicCreated> {
15069        match self {
15070            Self::Message(ref v) => Some(v.get_forum_topic_created()),
15071            Self::EditedMessage(ref v) => Some(v.get_forum_topic_created()),
15072            Self::ChannelPost(ref v) => Some(v.get_forum_topic_created()),
15073            Self::EditedChannelPost(ref v) => Some(v.get_forum_topic_created()),
15074            Self::BusinessMessage(ref v) => Some(v.get_forum_topic_created()),
15075            Self::EditedBusinessMessage(ref v) => Some(v.get_forum_topic_created()),
15076            _ => None,
15077        }
15078        .flatten()
15079    }
15080    #[allow(rustdoc::invalid_html_tags)]
15081    #[doc = "List of poll options"]
15082    #[allow(clippy::needless_lifetimes)]
15083    pub fn get_options<'a>(&'a self) -> Option<&'a Vec<PollOption>> {
15084        match self {
15085            Self::Poll(ref v) => Some(v.get_options()),
15086            _ => None,
15087        }
15088    }
15089    #[allow(rustdoc::invalid_html_tags)]
15090    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
15091    #[allow(clippy::needless_lifetimes)]
15092    pub fn get_giveaway_completed<'a>(&'a self) -> Option<&'a GiveawayCompleted> {
15093        match self {
15094            Self::Message(ref v) => Some(v.get_giveaway_completed()),
15095            Self::EditedMessage(ref v) => Some(v.get_giveaway_completed()),
15096            Self::ChannelPost(ref v) => Some(v.get_giveaway_completed()),
15097            Self::EditedChannelPost(ref v) => Some(v.get_giveaway_completed()),
15098            Self::BusinessMessage(ref v) => Some(v.get_giveaway_completed()),
15099            Self::EditedBusinessMessage(ref v) => Some(v.get_giveaway_completed()),
15100            _ => None,
15101        }
15102        .flatten()
15103    }
15104    #[allow(rustdoc::invalid_html_tags)]
15105    #[doc = "Optional. Service message: tasks were added to a checklist"]
15106    #[allow(clippy::needless_lifetimes)]
15107    pub fn get_checklist_tasks_added<'a>(&'a self) -> Option<&'a ChecklistTasksAdded> {
15108        match self {
15109            Self::Message(ref v) => Some(v.get_checklist_tasks_added()),
15110            Self::EditedMessage(ref v) => Some(v.get_checklist_tasks_added()),
15111            Self::ChannelPost(ref v) => Some(v.get_checklist_tasks_added()),
15112            Self::EditedChannelPost(ref v) => Some(v.get_checklist_tasks_added()),
15113            Self::BusinessMessage(ref v) => Some(v.get_checklist_tasks_added()),
15114            Self::EditedBusinessMessage(ref v) => Some(v.get_checklist_tasks_added()),
15115            _ => None,
15116        }
15117        .flatten()
15118    }
15119    #[allow(rustdoc::invalid_html_tags)]
15120    #[doc = "New information about the chat member"]
15121    #[allow(clippy::needless_lifetimes)]
15122    pub fn get_new_chat_member<'a>(&'a self) -> Option<&'a ChatMember> {
15123        match self {
15124            Self::MyChatMember(ref v) => Some(v.get_new_chat_member()),
15125            Self::ChatMember(ref v) => Some(v.get_new_chat_member()),
15126            _ => None,
15127        }
15128    }
15129    #[allow(rustdoc::invalid_html_tags)]
15130    #[doc = "Optional. Bot through which the message was sent"]
15131    #[allow(clippy::needless_lifetimes)]
15132    pub fn get_via_bot<'a>(&'a self) -> Option<&'a User> {
15133        match self {
15134            Self::Message(ref v) => Some(v.get_via_bot()),
15135            Self::EditedMessage(ref v) => Some(v.get_via_bot()),
15136            Self::ChannelPost(ref v) => Some(v.get_via_bot()),
15137            Self::EditedChannelPost(ref v) => Some(v.get_via_bot()),
15138            Self::BusinessMessage(ref v) => Some(v.get_via_bot()),
15139            Self::EditedBusinessMessage(ref v) => Some(v.get_via_bot()),
15140            _ => None,
15141        }
15142        .flatten()
15143    }
15144    #[allow(rustdoc::invalid_html_tags)]
15145    #[doc = "Bot-specified paid media payload"]
15146    #[allow(clippy::needless_lifetimes)]
15147    pub fn get_paid_media_payload<'a>(&'a self) -> Option<&'a str> {
15148        match self {
15149            Self::PurchasedPaidMedia(ref v) => Some(v.get_paid_media_payload()),
15150            _ => None,
15151        }
15152    }
15153    #[allow(rustdoc::invalid_html_tags)]
15154    #[doc = "Optional. Service message: forum topic edited"]
15155    #[allow(clippy::needless_lifetimes)]
15156    pub fn get_forum_topic_edited<'a>(&'a self) -> Option<&'a ForumTopicEdited> {
15157        match self {
15158            Self::Message(ref v) => Some(v.get_forum_topic_edited()),
15159            Self::EditedMessage(ref v) => Some(v.get_forum_topic_edited()),
15160            Self::ChannelPost(ref v) => Some(v.get_forum_topic_edited()),
15161            Self::EditedChannelPost(ref v) => Some(v.get_forum_topic_edited()),
15162            Self::BusinessMessage(ref v) => Some(v.get_forum_topic_edited()),
15163            Self::EditedBusinessMessage(ref v) => Some(v.get_forum_topic_edited()),
15164            _ => None,
15165        }
15166        .flatten()
15167    }
15168    #[allow(rustdoc::invalid_html_tags)]
15169    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
15170    #[allow(clippy::needless_lifetimes)]
15171    pub fn get_date<'a>(&'a self) -> Option<i64> {
15172        match self {
15173            Self::Message(ref v) => Some(v.get_date()),
15174            Self::EditedMessage(ref v) => Some(v.get_date()),
15175            Self::ChannelPost(ref v) => Some(v.get_date()),
15176            Self::EditedChannelPost(ref v) => Some(v.get_date()),
15177            Self::BusinessMessage(ref v) => Some(v.get_date()),
15178            Self::EditedBusinessMessage(ref v) => Some(v.get_date()),
15179            _ => None,
15180        }
15181    }
15182    #[allow(rustdoc::invalid_html_tags)]
15183    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
15184    #[allow(clippy::needless_lifetimes)]
15185    pub fn get_connected_website<'a>(&'a self) -> Option<&'a str> {
15186        match self {
15187            Self::Message(ref v) => Some(v.get_connected_website()),
15188            Self::EditedMessage(ref v) => Some(v.get_connected_website()),
15189            Self::ChannelPost(ref v) => Some(v.get_connected_website()),
15190            Self::EditedChannelPost(ref v) => Some(v.get_connected_website()),
15191            Self::BusinessMessage(ref v) => Some(v.get_connected_website()),
15192            Self::EditedBusinessMessage(ref v) => Some(v.get_connected_website()),
15193            _ => None,
15194        }
15195        .flatten()
15196    }
15197    #[allow(rustdoc::invalid_html_tags)]
15198    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
15199    #[allow(clippy::needless_lifetimes)]
15200    pub fn get_general_forum_topic_unhidden<'a>(&'a self) -> Option<&'a GeneralForumTopicUnhidden> {
15201        match self {
15202            Self::Message(ref v) => Some(v.get_general_forum_topic_unhidden()),
15203            Self::EditedMessage(ref v) => Some(v.get_general_forum_topic_unhidden()),
15204            Self::ChannelPost(ref v) => Some(v.get_general_forum_topic_unhidden()),
15205            Self::EditedChannelPost(ref v) => Some(v.get_general_forum_topic_unhidden()),
15206            Self::BusinessMessage(ref v) => Some(v.get_general_forum_topic_unhidden()),
15207            Self::EditedBusinessMessage(ref v) => Some(v.get_general_forum_topic_unhidden()),
15208            _ => None,
15209        }
15210        .flatten()
15211    }
15212    #[allow(rustdoc::invalid_html_tags)]
15213    #[doc = "Optional. Message is a general file, information about the file"]
15214    #[allow(clippy::needless_lifetimes)]
15215    pub fn get_document<'a>(&'a self) -> Option<&'a Document> {
15216        match self {
15217            Self::Message(ref v) => Some(v.get_document()),
15218            Self::EditedMessage(ref v) => Some(v.get_document()),
15219            Self::ChannelPost(ref v) => Some(v.get_document()),
15220            Self::EditedChannelPost(ref v) => Some(v.get_document()),
15221            Self::BusinessMessage(ref v) => Some(v.get_document()),
15222            Self::EditedBusinessMessage(ref v) => Some(v.get_document()),
15223            _ => None,
15224        }
15225        .flatten()
15226    }
15227    #[allow(rustdoc::invalid_html_tags)]
15228    #[doc = "Source of the removed boost"]
15229    #[allow(clippy::needless_lifetimes)]
15230    pub fn get_source<'a>(&'a self) -> Option<&'a ChatBoostSource> {
15231        match self {
15232            Self::RemovedChatBoost(ref v) => Some(v.get_source()),
15233            _ => None,
15234        }
15235    }
15236    #[allow(rustdoc::invalid_html_tags)]
15237    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
15238    #[allow(clippy::needless_lifetimes)]
15239    pub fn get_animation<'a>(&'a self) -> Option<&'a Animation> {
15240        match self {
15241            Self::Message(ref v) => Some(v.get_animation()),
15242            Self::EditedMessage(ref v) => Some(v.get_animation()),
15243            Self::ChannelPost(ref v) => Some(v.get_animation()),
15244            Self::EditedChannelPost(ref v) => Some(v.get_animation()),
15245            Self::BusinessMessage(ref v) => Some(v.get_animation()),
15246            Self::EditedBusinessMessage(ref v) => Some(v.get_animation()),
15247            _ => None,
15248        }
15249        .flatten()
15250    }
15251    #[allow(rustdoc::invalid_html_tags)]
15252    #[doc = "Optional. Service message: the group has been created"]
15253    #[allow(clippy::needless_lifetimes)]
15254    pub fn get_group_chat_created<'a>(&'a self) -> Option<bool> {
15255        match self {
15256            Self::Message(ref v) => Some(v.get_group_chat_created()),
15257            Self::EditedMessage(ref v) => Some(v.get_group_chat_created()),
15258            Self::ChannelPost(ref v) => Some(v.get_group_chat_created()),
15259            Self::EditedChannelPost(ref v) => Some(v.get_group_chat_created()),
15260            Self::BusinessMessage(ref v) => Some(v.get_group_chat_created()),
15261            Self::EditedBusinessMessage(ref v) => Some(v.get_group_chat_created()),
15262            _ => None,
15263        }
15264        .flatten()
15265    }
15266    #[allow(rustdoc::invalid_html_tags)]
15267    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
15268    #[allow(clippy::needless_lifetimes)]
15269    pub fn get_is_paid_post<'a>(&'a self) -> Option<bool> {
15270        match self {
15271            Self::Message(ref v) => Some(v.get_is_paid_post()),
15272            Self::EditedMessage(ref v) => Some(v.get_is_paid_post()),
15273            Self::ChannelPost(ref v) => Some(v.get_is_paid_post()),
15274            Self::EditedChannelPost(ref v) => Some(v.get_is_paid_post()),
15275            Self::BusinessMessage(ref v) => Some(v.get_is_paid_post()),
15276            Self::EditedBusinessMessage(ref v) => Some(v.get_is_paid_post()),
15277            _ => None,
15278        }
15279        .flatten()
15280    }
15281    #[allow(rustdoc::invalid_html_tags)]
15282    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
15283    #[allow(clippy::needless_lifetimes)]
15284    pub fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions> {
15285        match self {
15286            Self::Message(ref v) => Some(v.get_link_preview_options()),
15287            Self::EditedMessage(ref v) => Some(v.get_link_preview_options()),
15288            Self::ChannelPost(ref v) => Some(v.get_link_preview_options()),
15289            Self::EditedChannelPost(ref v) => Some(v.get_link_preview_options()),
15290            Self::BusinessMessage(ref v) => Some(v.get_link_preview_options()),
15291            Self::EditedBusinessMessage(ref v) => Some(v.get_link_preview_options()),
15292            _ => None,
15293        }
15294        .flatten()
15295    }
15296    #[allow(rustdoc::invalid_html_tags)]
15297    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
15298    #[allow(clippy::needless_lifetimes)]
15299    pub fn get_is_automatic_forward<'a>(&'a self) -> Option<bool> {
15300        match self {
15301            Self::Message(ref v) => Some(v.get_is_automatic_forward()),
15302            Self::EditedMessage(ref v) => Some(v.get_is_automatic_forward()),
15303            Self::ChannelPost(ref v) => Some(v.get_is_automatic_forward()),
15304            Self::EditedChannelPost(ref v) => Some(v.get_is_automatic_forward()),
15305            Self::BusinessMessage(ref v) => Some(v.get_is_automatic_forward()),
15306            Self::EditedBusinessMessage(ref v) => Some(v.get_is_automatic_forward()),
15307            _ => None,
15308        }
15309        .flatten()
15310    }
15311    #[allow(rustdoc::invalid_html_tags)]
15312    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
15313    #[allow(clippy::needless_lifetimes)]
15314    pub fn get_via_chat_folder_invite_link<'a>(&'a self) -> Option<bool> {
15315        match self {
15316            Self::MyChatMember(ref v) => Some(v.get_via_chat_folder_invite_link()),
15317            Self::ChatMember(ref v) => Some(v.get_via_chat_folder_invite_link()),
15318            _ => None,
15319        }
15320        .flatten()
15321    }
15322    #[allow(rustdoc::invalid_html_tags)]
15323    #[doc = "Optional. Service message: a scheduled giveaway was created"]
15324    #[allow(clippy::needless_lifetimes)]
15325    pub fn get_giveaway_created<'a>(&'a self) -> Option<&'a GiveawayCreated> {
15326        match self {
15327            Self::Message(ref v) => Some(v.get_giveaway_created()),
15328            Self::EditedMessage(ref v) => Some(v.get_giveaway_created()),
15329            Self::ChannelPost(ref v) => Some(v.get_giveaway_created()),
15330            Self::EditedChannelPost(ref v) => Some(v.get_giveaway_created()),
15331            Self::BusinessMessage(ref v) => Some(v.get_giveaway_created()),
15332            Self::EditedBusinessMessage(ref v) => Some(v.get_giveaway_created()),
15333            _ => None,
15334        }
15335        .flatten()
15336    }
15337    #[allow(rustdoc::invalid_html_tags)]
15338    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
15339    #[allow(clippy::needless_lifetimes)]
15340    pub fn get_tg_type<'a>(&'a self) -> Option<&'a str> {
15341        match self {
15342            Self::Poll(ref v) => Some(v.get_tg_type()),
15343            _ => None,
15344        }
15345    }
15346    #[allow(rustdoc::invalid_html_tags)]
15347    #[doc = "Optional. Information about the original message for forwarded messages"]
15348    #[allow(clippy::needless_lifetimes)]
15349    pub fn get_forward_origin<'a>(&'a self) -> Option<&'a MessageOrigin> {
15350        match self {
15351            Self::Message(ref v) => Some(v.get_forward_origin()),
15352            Self::EditedMessage(ref v) => Some(v.get_forward_origin()),
15353            Self::ChannelPost(ref v) => Some(v.get_forward_origin()),
15354            Self::EditedChannelPost(ref v) => Some(v.get_forward_origin()),
15355            Self::BusinessMessage(ref v) => Some(v.get_forward_origin()),
15356            Self::EditedBusinessMessage(ref v) => Some(v.get_forward_origin()),
15357            _ => None,
15358        }
15359        .flatten()
15360    }
15361    #[allow(rustdoc::invalid_html_tags)]
15362    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
15363    #[allow(clippy::needless_lifetimes)]
15364    pub fn get_text<'a>(&'a self) -> Option<&'a str> {
15365        match self {
15366            Self::Message(ref v) => Some(v.get_text()),
15367            Self::EditedMessage(ref v) => Some(v.get_text()),
15368            Self::ChannelPost(ref v) => Some(v.get_text()),
15369            Self::EditedChannelPost(ref v) => Some(v.get_text()),
15370            Self::BusinessMessage(ref v) => Some(v.get_text()),
15371            Self::EditedBusinessMessage(ref v) => Some(v.get_text()),
15372            _ => None,
15373        }
15374        .flatten()
15375    }
15376    #[allow(rustdoc::invalid_html_tags)]
15377    #[doc = "Unique poll identifier"]
15378    #[allow(clippy::needless_lifetimes)]
15379    pub fn get_poll_id<'a>(&'a self) -> Option<&'a str> {
15380        match self {
15381            Self::PollAnswer(ref v) => Some(v.get_poll_id()),
15382            _ => None,
15383        }
15384    }
15385    #[allow(rustdoc::invalid_html_tags)]
15386    #[doc = "Optional. Service message: video chat started"]
15387    #[allow(clippy::needless_lifetimes)]
15388    pub fn get_video_chat_started<'a>(&'a self) -> Option<&'a VideoChatStarted> {
15389        match self {
15390            Self::Message(ref v) => Some(v.get_video_chat_started()),
15391            Self::EditedMessage(ref v) => Some(v.get_video_chat_started()),
15392            Self::ChannelPost(ref v) => Some(v.get_video_chat_started()),
15393            Self::EditedChannelPost(ref v) => Some(v.get_video_chat_started()),
15394            Self::BusinessMessage(ref v) => Some(v.get_video_chat_started()),
15395            Self::EditedBusinessMessage(ref v) => Some(v.get_video_chat_started()),
15396            _ => None,
15397        }
15398        .flatten()
15399    }
15400    #[allow(rustdoc::invalid_html_tags)]
15401    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
15402    #[allow(clippy::needless_lifetimes)]
15403    pub fn get_user_chat_id<'a>(&'a self) -> Option<i64> {
15404        match self {
15405            Self::BusinessConnection(ref v) => Some(v.get_user_chat_id()),
15406            _ => None,
15407        }
15408    }
15409    #[allow(rustdoc::invalid_html_tags)]
15410    #[doc = "Optional. Message is a sticker, information about the sticker"]
15411    #[allow(clippy::needless_lifetimes)]
15412    pub fn get_sticker<'a>(&'a self) -> Option<&'a Sticker> {
15413        match self {
15414            Self::Message(ref v) => Some(v.get_sticker()),
15415            Self::EditedMessage(ref v) => Some(v.get_sticker()),
15416            Self::ChannelPost(ref v) => Some(v.get_sticker()),
15417            Self::EditedChannelPost(ref v) => Some(v.get_sticker()),
15418            Self::BusinessMessage(ref v) => Some(v.get_sticker()),
15419            Self::EditedBusinessMessage(ref v) => Some(v.get_sticker()),
15420            _ => None,
15421        }
15422        .flatten()
15423    }
15424    #[allow(rustdoc::invalid_html_tags)]
15425    #[doc = "Optional. Sender location, only for bots that require user location"]
15426    #[allow(clippy::needless_lifetimes)]
15427    pub fn get_location<'a>(&'a self) -> Option<&'a Location> {
15428        match self {
15429            Self::ChosenInlineResult(ref v) => Some(v.get_location()),
15430            _ => None,
15431        }
15432        .flatten()
15433    }
15434    #[allow(rustdoc::invalid_html_tags)]
15435    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
15436    #[allow(clippy::needless_lifetimes)]
15437    pub fn get_pinned_message<'a>(&'a self) -> Option<&'a MaybeInaccessibleMessage> {
15438        match self {
15439            Self::Message(ref v) => Some(v.get_pinned_message()),
15440            Self::EditedMessage(ref v) => Some(v.get_pinned_message()),
15441            Self::ChannelPost(ref v) => Some(v.get_pinned_message()),
15442            Self::EditedChannelPost(ref v) => Some(v.get_pinned_message()),
15443            Self::BusinessMessage(ref v) => Some(v.get_pinned_message()),
15444            Self::EditedBusinessMessage(ref v) => Some(v.get_pinned_message()),
15445            _ => None,
15446        }
15447        .flatten()
15448    }
15449    #[allow(rustdoc::invalid_html_tags)]
15450    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
15451    #[allow(clippy::needless_lifetimes)]
15452    pub fn get_channel_chat_created<'a>(&'a self) -> Option<bool> {
15453        match self {
15454            Self::Message(ref v) => Some(v.get_channel_chat_created()),
15455            Self::EditedMessage(ref v) => Some(v.get_channel_chat_created()),
15456            Self::ChannelPost(ref v) => Some(v.get_channel_chat_created()),
15457            Self::EditedChannelPost(ref v) => Some(v.get_channel_chat_created()),
15458            Self::BusinessMessage(ref v) => Some(v.get_channel_chat_created()),
15459            Self::EditedBusinessMessage(ref v) => Some(v.get_channel_chat_created()),
15460            _ => None,
15461        }
15462        .flatten()
15463    }
15464    #[allow(rustdoc::invalid_html_tags)]
15465    #[doc = "Optional. Service message: forum topic closed"]
15466    #[allow(clippy::needless_lifetimes)]
15467    pub fn get_forum_topic_closed<'a>(&'a self) -> Option<&'a ForumTopicClosed> {
15468        match self {
15469            Self::Message(ref v) => Some(v.get_forum_topic_closed()),
15470            Self::EditedMessage(ref v) => Some(v.get_forum_topic_closed()),
15471            Self::ChannelPost(ref v) => Some(v.get_forum_topic_closed()),
15472            Self::EditedChannelPost(ref v) => Some(v.get_forum_topic_closed()),
15473            Self::BusinessMessage(ref v) => Some(v.get_forum_topic_closed()),
15474            Self::EditedBusinessMessage(ref v) => Some(v.get_forum_topic_closed()),
15475            _ => None,
15476        }
15477        .flatten()
15478    }
15479    #[allow(rustdoc::invalid_html_tags)]
15480    #[doc = "Optional. A chat title was changed to this value"]
15481    #[allow(clippy::needless_lifetimes)]
15482    pub fn get_new_chat_title<'a>(&'a self) -> Option<&'a str> {
15483        match self {
15484            Self::Message(ref v) => Some(v.get_new_chat_title()),
15485            Self::EditedMessage(ref v) => Some(v.get_new_chat_title()),
15486            Self::ChannelPost(ref v) => Some(v.get_new_chat_title()),
15487            Self::EditedChannelPost(ref v) => Some(v.get_new_chat_title()),
15488            Self::BusinessMessage(ref v) => Some(v.get_new_chat_title()),
15489            Self::EditedBusinessMessage(ref v) => Some(v.get_new_chat_title()),
15490            _ => None,
15491        }
15492        .flatten()
15493    }
15494    #[allow(rustdoc::invalid_html_tags)]
15495    #[doc = "User specified shipping address"]
15496    #[allow(clippy::needless_lifetimes)]
15497    pub fn get_shipping_address<'a>(&'a self) -> Option<&'a ShippingAddress> {
15498        match self {
15499            Self::ShippingQuery(ref v) => Some(v.get_shipping_address()),
15500            _ => None,
15501        }
15502    }
15503    #[allow(rustdoc::invalid_html_tags)]
15504    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
15505    #[allow(clippy::needless_lifetimes)]
15506    pub fn get_actor_chat<'a>(&'a self) -> Option<&'a Chat> {
15507        match self {
15508            Self::MessageReaction(ref v) => Some(v.get_actor_chat()),
15509            _ => None,
15510        }
15511        .flatten()
15512    }
15513    #[allow(rustdoc::invalid_html_tags)]
15514    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
15515    #[allow(clippy::needless_lifetimes)]
15516    pub fn get_new_chat_members<'a>(&'a self) -> Option<&'a Vec<User>> {
15517        match self {
15518            Self::Message(ref v) => Some(v.get_new_chat_members()),
15519            Self::EditedMessage(ref v) => Some(v.get_new_chat_members()),
15520            Self::ChannelPost(ref v) => Some(v.get_new_chat_members()),
15521            Self::EditedChannelPost(ref v) => Some(v.get_new_chat_members()),
15522            Self::BusinessMessage(ref v) => Some(v.get_new_chat_members()),
15523            Self::EditedBusinessMessage(ref v) => Some(v.get_new_chat_members()),
15524            _ => None,
15525        }
15526        .flatten()
15527    }
15528    #[allow(rustdoc::invalid_html_tags)]
15529    #[doc = "Optional. Unique identifier of the message effect added to the message"]
15530    #[allow(clippy::needless_lifetimes)]
15531    pub fn get_effect_id<'a>(&'a self) -> Option<&'a str> {
15532        match self {
15533            Self::Message(ref v) => Some(v.get_effect_id()),
15534            Self::EditedMessage(ref v) => Some(v.get_effect_id()),
15535            Self::ChannelPost(ref v) => Some(v.get_effect_id()),
15536            Self::EditedChannelPost(ref v) => Some(v.get_effect_id()),
15537            Self::BusinessMessage(ref v) => Some(v.get_effect_id()),
15538            Self::EditedBusinessMessage(ref v) => Some(v.get_effect_id()),
15539            _ => None,
15540        }
15541        .flatten()
15542    }
15543    #[allow(rustdoc::invalid_html_tags)]
15544    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
15545    #[allow(clippy::needless_lifetimes)]
15546    pub fn get_option_ids<'a>(&'a self) -> Option<&'a Vec<i64>> {
15547        match self {
15548            Self::PollAnswer(ref v) => Some(v.get_option_ids()),
15549            _ => None,
15550        }
15551    }
15552    #[allow(rustdoc::invalid_html_tags)]
15553    #[doc = "Optional. Message is a video note, information about the video message"]
15554    #[allow(clippy::needless_lifetimes)]
15555    pub fn get_video_note<'a>(&'a self) -> Option<&'a VideoNote> {
15556        match self {
15557            Self::Message(ref v) => Some(v.get_video_note()),
15558            Self::EditedMessage(ref v) => Some(v.get_video_note()),
15559            Self::ChannelPost(ref v) => Some(v.get_video_note()),
15560            Self::EditedChannelPost(ref v) => Some(v.get_video_note()),
15561            Self::BusinessMessage(ref v) => Some(v.get_video_note()),
15562            Self::EditedBusinessMessage(ref v) => Some(v.get_video_note()),
15563            _ => None,
15564        }
15565        .flatten()
15566    }
15567    #[allow(rustdoc::invalid_html_tags)]
15568    #[doc = "Optional. Service message: approval of a suggested post has failed"]
15569    #[allow(clippy::needless_lifetimes)]
15570    pub fn get_suggested_post_approval_failed<'a>(
15571        &'a self,
15572    ) -> Option<&'a SuggestedPostApprovalFailed> {
15573        match self {
15574            Self::Message(ref v) => Some(v.get_suggested_post_approval_failed()),
15575            Self::EditedMessage(ref v) => Some(v.get_suggested_post_approval_failed()),
15576            Self::ChannelPost(ref v) => Some(v.get_suggested_post_approval_failed()),
15577            Self::EditedChannelPost(ref v) => Some(v.get_suggested_post_approval_failed()),
15578            Self::BusinessMessage(ref v) => Some(v.get_suggested_post_approval_failed()),
15579            Self::EditedBusinessMessage(ref v) => Some(v.get_suggested_post_approval_failed()),
15580            _ => None,
15581        }
15582        .flatten()
15583    }
15584    #[allow(rustdoc::invalid_html_tags)]
15585    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
15586    #[allow(clippy::needless_lifetimes)]
15587    pub fn get_currency<'a>(&'a self) -> Option<&'a str> {
15588        match self {
15589            Self::PreCheckoutQuery(ref v) => Some(v.get_currency()),
15590            _ => None,
15591        }
15592    }
15593    #[allow(rustdoc::invalid_html_tags)]
15594    #[doc = "Optional. A chat photo was change to this value"]
15595    #[allow(clippy::needless_lifetimes)]
15596    pub fn get_new_chat_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
15597        match self {
15598            Self::Message(ref v) => Some(v.get_new_chat_photo()),
15599            Self::EditedMessage(ref v) => Some(v.get_new_chat_photo()),
15600            Self::ChannelPost(ref v) => Some(v.get_new_chat_photo()),
15601            Self::EditedChannelPost(ref v) => Some(v.get_new_chat_photo()),
15602            Self::BusinessMessage(ref v) => Some(v.get_new_chat_photo()),
15603            Self::EditedBusinessMessage(ref v) => Some(v.get_new_chat_photo()),
15604            _ => None,
15605        }
15606        .flatten()
15607    }
15608    #[allow(rustdoc::invalid_html_tags)]
15609    #[doc = "Optional. Service message: a chat was shared with the bot"]
15610    #[allow(clippy::needless_lifetimes)]
15611    pub fn get_chat_shared<'a>(&'a self) -> Option<&'a ChatShared> {
15612        match self {
15613            Self::Message(ref v) => Some(v.get_chat_shared()),
15614            Self::EditedMessage(ref v) => Some(v.get_chat_shared()),
15615            Self::ChannelPost(ref v) => Some(v.get_chat_shared()),
15616            Self::EditedChannelPost(ref v) => Some(v.get_chat_shared()),
15617            Self::BusinessMessage(ref v) => Some(v.get_chat_shared()),
15618            Self::EditedBusinessMessage(ref v) => Some(v.get_chat_shared()),
15619            _ => None,
15620        }
15621        .flatten()
15622    }
15623    #[allow(rustdoc::invalid_html_tags)]
15624    #[doc = "Optional. Message is a forwarded story"]
15625    #[allow(clippy::needless_lifetimes)]
15626    pub fn get_story<'a>(&'a self) -> Option<&'a Story> {
15627        match self {
15628            Self::Message(ref v) => Some(v.get_story()),
15629            Self::EditedMessage(ref v) => Some(v.get_story()),
15630            Self::ChannelPost(ref v) => Some(v.get_story()),
15631            Self::EditedChannelPost(ref v) => Some(v.get_story()),
15632            Self::BusinessMessage(ref v) => Some(v.get_story()),
15633            Self::EditedBusinessMessage(ref v) => Some(v.get_story()),
15634            _ => None,
15635        }
15636        .flatten()
15637    }
15638    #[allow(rustdoc::invalid_html_tags)]
15639    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
15640    #[allow(clippy::needless_lifetimes)]
15641    pub fn get_migrate_to_chat_id<'a>(&'a self) -> Option<i64> {
15642        match self {
15643            Self::Message(ref v) => Some(v.get_migrate_to_chat_id()),
15644            Self::EditedMessage(ref v) => Some(v.get_migrate_to_chat_id()),
15645            Self::ChannelPost(ref v) => Some(v.get_migrate_to_chat_id()),
15646            Self::EditedChannelPost(ref v) => Some(v.get_migrate_to_chat_id()),
15647            Self::BusinessMessage(ref v) => Some(v.get_migrate_to_chat_id()),
15648            Self::EditedBusinessMessage(ref v) => Some(v.get_migrate_to_chat_id()),
15649            _ => None,
15650        }
15651        .flatten()
15652    }
15653    #[allow(rustdoc::invalid_html_tags)]
15654    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
15655    #[allow(clippy::needless_lifetimes)]
15656    pub fn get_paid_message_price_changed<'a>(&'a self) -> Option<&'a PaidMessagePriceChanged> {
15657        match self {
15658            Self::Message(ref v) => Some(v.get_paid_message_price_changed()),
15659            Self::EditedMessage(ref v) => Some(v.get_paid_message_price_changed()),
15660            Self::ChannelPost(ref v) => Some(v.get_paid_message_price_changed()),
15661            Self::EditedChannelPost(ref v) => Some(v.get_paid_message_price_changed()),
15662            Self::BusinessMessage(ref v) => Some(v.get_paid_message_price_changed()),
15663            Self::EditedBusinessMessage(ref v) => Some(v.get_paid_message_price_changed()),
15664            _ => None,
15665        }
15666        .flatten()
15667    }
15668    #[allow(rustdoc::invalid_html_tags)]
15669    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
15670    #[allow(clippy::needless_lifetimes)]
15671    pub fn get_reply_to_message<'a>(&'a self) -> Option<&'a Message> {
15672        match self {
15673            Self::Message(ref v) => Some(v.get_reply_to_message()),
15674            Self::EditedMessage(ref v) => Some(v.get_reply_to_message()),
15675            Self::ChannelPost(ref v) => Some(v.get_reply_to_message()),
15676            Self::EditedChannelPost(ref v) => Some(v.get_reply_to_message()),
15677            Self::BusinessMessage(ref v) => Some(v.get_reply_to_message()),
15678            Self::EditedBusinessMessage(ref v) => Some(v.get_reply_to_message()),
15679            _ => None,
15680        }
15681        .flatten()
15682    }
15683    #[allow(rustdoc::invalid_html_tags)]
15684    #[doc = "Optional. True, if the caption must be shown above the message media"]
15685    #[allow(clippy::needless_lifetimes)]
15686    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
15687        match self {
15688            Self::Message(ref v) => Some(v.get_show_caption_above_media()),
15689            Self::EditedMessage(ref v) => Some(v.get_show_caption_above_media()),
15690            Self::ChannelPost(ref v) => Some(v.get_show_caption_above_media()),
15691            Self::EditedChannelPost(ref v) => Some(v.get_show_caption_above_media()),
15692            Self::BusinessMessage(ref v) => Some(v.get_show_caption_above_media()),
15693            Self::EditedBusinessMessage(ref v) => Some(v.get_show_caption_above_media()),
15694            _ => None,
15695        }
15696        .flatten()
15697    }
15698    #[allow(rustdoc::invalid_html_tags)]
15699    #[doc = "Optional. True, if the message is sent to a forum topic"]
15700    #[allow(clippy::needless_lifetimes)]
15701    pub fn get_is_topic_message<'a>(&'a self) -> Option<bool> {
15702        match self {
15703            Self::Message(ref v) => Some(v.get_is_topic_message()),
15704            Self::EditedMessage(ref v) => Some(v.get_is_topic_message()),
15705            Self::ChannelPost(ref v) => Some(v.get_is_topic_message()),
15706            Self::EditedChannelPost(ref v) => Some(v.get_is_topic_message()),
15707            Self::BusinessMessage(ref v) => Some(v.get_is_topic_message()),
15708            Self::EditedBusinessMessage(ref v) => Some(v.get_is_topic_message()),
15709            _ => None,
15710        }
15711        .flatten()
15712    }
15713    #[allow(rustdoc::invalid_html_tags)]
15714    #[doc = "Optional. Rights of the business bot"]
15715    #[allow(clippy::needless_lifetimes)]
15716    pub fn get_rights<'a>(&'a self) -> Option<&'a BusinessBotRights> {
15717        match self {
15718            Self::BusinessConnection(ref v) => Some(v.get_rights()),
15719            _ => None,
15720        }
15721        .flatten()
15722    }
15723    #[allow(rustdoc::invalid_html_tags)]
15724    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
15725    #[allow(clippy::needless_lifetimes)]
15726    pub fn get_sender_boost_count<'a>(&'a self) -> Option<i64> {
15727        match self {
15728            Self::Message(ref v) => Some(v.get_sender_boost_count()),
15729            Self::EditedMessage(ref v) => Some(v.get_sender_boost_count()),
15730            Self::ChannelPost(ref v) => Some(v.get_sender_boost_count()),
15731            Self::EditedChannelPost(ref v) => Some(v.get_sender_boost_count()),
15732            Self::BusinessMessage(ref v) => Some(v.get_sender_boost_count()),
15733            Self::EditedBusinessMessage(ref v) => Some(v.get_sender_boost_count()),
15734            _ => None,
15735        }
15736        .flatten()
15737    }
15738    #[allow(rustdoc::invalid_html_tags)]
15739    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
15740    #[allow(clippy::needless_lifetimes)]
15741    pub fn get_explanation_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
15742        match self {
15743            Self::Poll(ref v) => Some(v.get_explanation_entities()),
15744            _ => None,
15745        }
15746        .flatten()
15747    }
15748    #[allow(rustdoc::invalid_html_tags)]
15749    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
15750    #[allow(clippy::needless_lifetimes)]
15751    pub fn get_invite_link<'a>(&'a self) -> Option<&'a ChatInviteLink> {
15752        match self {
15753            Self::ChatJoinRequest(ref v) => Some(v.get_invite_link()),
15754            _ => None,
15755        }
15756        .flatten()
15757    }
15758    #[allow(rustdoc::invalid_html_tags)]
15759    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
15760    #[allow(clippy::needless_lifetimes)]
15761    pub fn get_external_reply<'a>(&'a self) -> Option<&'a ExternalReplyInfo> {
15762        match self {
15763            Self::Message(ref v) => Some(v.get_external_reply()),
15764            Self::EditedMessage(ref v) => Some(v.get_external_reply()),
15765            Self::ChannelPost(ref v) => Some(v.get_external_reply()),
15766            Self::EditedChannelPost(ref v) => Some(v.get_external_reply()),
15767            Self::BusinessMessage(ref v) => Some(v.get_external_reply()),
15768            Self::EditedBusinessMessage(ref v) => Some(v.get_external_reply()),
15769            _ => None,
15770        }
15771        .flatten()
15772    }
15773    #[allow(rustdoc::invalid_html_tags)]
15774    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
15775    #[allow(clippy::needless_lifetimes)]
15776    pub fn get_user<'a>(&'a self) -> Option<&'a User> {
15777        match self {
15778            Self::MessageReaction(ref v) => Some(v.get_user()),
15779            _ => None,
15780        }
15781        .flatten()
15782    }
15783    #[allow(rustdoc::invalid_html_tags)]
15784    #[doc = "Optional. A giveaway with public winners was completed"]
15785    #[allow(clippy::needless_lifetimes)]
15786    pub fn get_giveaway_winners<'a>(&'a self) -> Option<&'a GiveawayWinners> {
15787        match self {
15788            Self::Message(ref v) => Some(v.get_giveaway_winners()),
15789            Self::EditedMessage(ref v) => Some(v.get_giveaway_winners()),
15790            Self::ChannelPost(ref v) => Some(v.get_giveaway_winners()),
15791            Self::EditedChannelPost(ref v) => Some(v.get_giveaway_winners()),
15792            Self::BusinessMessage(ref v) => Some(v.get_giveaway_winners()),
15793            Self::EditedBusinessMessage(ref v) => Some(v.get_giveaway_winners()),
15794            _ => None,
15795        }
15796        .flatten()
15797    }
15798    #[allow(rustdoc::invalid_html_tags)]
15799    #[doc = "Optional. Message is a dice with random value"]
15800    #[allow(clippy::needless_lifetimes)]
15801    pub fn get_dice<'a>(&'a self) -> Option<&'a Dice> {
15802        match self {
15803            Self::Message(ref v) => Some(v.get_dice()),
15804            Self::EditedMessage(ref v) => Some(v.get_dice()),
15805            Self::ChannelPost(ref v) => Some(v.get_dice()),
15806            Self::EditedChannelPost(ref v) => Some(v.get_dice()),
15807            Self::BusinessMessage(ref v) => Some(v.get_dice()),
15808            Self::EditedBusinessMessage(ref v) => Some(v.get_dice()),
15809            _ => None,
15810        }
15811        .flatten()
15812    }
15813    #[allow(rustdoc::invalid_html_tags)]
15814    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
15815    #[allow(clippy::needless_lifetimes)]
15816    pub fn get_is_from_offline<'a>(&'a self) -> Option<bool> {
15817        match self {
15818            Self::Message(ref v) => Some(v.get_is_from_offline()),
15819            Self::EditedMessage(ref v) => Some(v.get_is_from_offline()),
15820            Self::ChannelPost(ref v) => Some(v.get_is_from_offline()),
15821            Self::EditedChannelPost(ref v) => Some(v.get_is_from_offline()),
15822            Self::BusinessMessage(ref v) => Some(v.get_is_from_offline()),
15823            Self::EditedBusinessMessage(ref v) => Some(v.get_is_from_offline()),
15824            _ => None,
15825        }
15826        .flatten()
15827    }
15828    #[allow(rustdoc::invalid_html_tags)]
15829    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
15830    #[allow(clippy::needless_lifetimes)]
15831    pub fn get_direct_messages_topic<'a>(&'a self) -> Option<&'a DirectMessagesTopic> {
15832        match self {
15833            Self::Message(ref v) => Some(v.get_direct_messages_topic()),
15834            Self::EditedMessage(ref v) => Some(v.get_direct_messages_topic()),
15835            Self::ChannelPost(ref v) => Some(v.get_direct_messages_topic()),
15836            Self::EditedChannelPost(ref v) => Some(v.get_direct_messages_topic()),
15837            Self::BusinessMessage(ref v) => Some(v.get_direct_messages_topic()),
15838            Self::EditedBusinessMessage(ref v) => Some(v.get_direct_messages_topic()),
15839            _ => None,
15840        }
15841        .flatten()
15842    }
15843    #[allow(rustdoc::invalid_html_tags)]
15844    #[doc = "Optional. Service message: payment for a suggested post was received"]
15845    #[allow(clippy::needless_lifetimes)]
15846    pub fn get_suggested_post_paid<'a>(&'a self) -> Option<&'a SuggestedPostPaid> {
15847        match self {
15848            Self::Message(ref v) => Some(v.get_suggested_post_paid()),
15849            Self::EditedMessage(ref v) => Some(v.get_suggested_post_paid()),
15850            Self::ChannelPost(ref v) => Some(v.get_suggested_post_paid()),
15851            Self::EditedChannelPost(ref v) => Some(v.get_suggested_post_paid()),
15852            Self::BusinessMessage(ref v) => Some(v.get_suggested_post_paid()),
15853            Self::EditedBusinessMessage(ref v) => Some(v.get_suggested_post_paid()),
15854            _ => None,
15855        }
15856        .flatten()
15857    }
15858    #[allow(rustdoc::invalid_html_tags)]
15859    #[doc = "Optional. Service message: the chat photo was deleted"]
15860    #[allow(clippy::needless_lifetimes)]
15861    pub fn get_delete_chat_photo<'a>(&'a self) -> Option<bool> {
15862        match self {
15863            Self::Message(ref v) => Some(v.get_delete_chat_photo()),
15864            Self::EditedMessage(ref v) => Some(v.get_delete_chat_photo()),
15865            Self::ChannelPost(ref v) => Some(v.get_delete_chat_photo()),
15866            Self::EditedChannelPost(ref v) => Some(v.get_delete_chat_photo()),
15867            Self::BusinessMessage(ref v) => Some(v.get_delete_chat_photo()),
15868            Self::EditedBusinessMessage(ref v) => Some(v.get_delete_chat_photo()),
15869            _ => None,
15870        }
15871        .flatten()
15872    }
15873    #[allow(rustdoc::invalid_html_tags)]
15874    #[doc = "Total number of users that voted in the poll"]
15875    #[allow(clippy::needless_lifetimes)]
15876    pub fn get_total_voter_count<'a>(&'a self) -> Option<i64> {
15877        match self {
15878            Self::Poll(ref v) => Some(v.get_total_voter_count()),
15879            _ => None,
15880        }
15881    }
15882    #[allow(rustdoc::invalid_html_tags)]
15883    #[doc = "The chat containing the message"]
15884    #[allow(clippy::needless_lifetimes)]
15885    pub fn get_chat<'a>(&'a self) -> Option<&'a Chat> {
15886        match self {
15887            Self::MessageReactionCount(ref v) => Some(v.get_chat()),
15888            _ => None,
15889        }
15890    }
15891    #[allow(rustdoc::invalid_html_tags)]
15892    #[doc = "Optional. Message is a video, information about the video"]
15893    #[allow(clippy::needless_lifetimes)]
15894    pub fn get_video<'a>(&'a self) -> Option<&'a Video> {
15895        match self {
15896            Self::Message(ref v) => Some(v.get_video()),
15897            Self::EditedMessage(ref v) => Some(v.get_video()),
15898            Self::ChannelPost(ref v) => Some(v.get_video()),
15899            Self::EditedChannelPost(ref v) => Some(v.get_video()),
15900            Self::BusinessMessage(ref v) => Some(v.get_video()),
15901            Self::EditedBusinessMessage(ref v) => Some(v.get_video()),
15902            _ => None,
15903        }
15904        .flatten()
15905    }
15906    #[allow(rustdoc::invalid_html_tags)]
15907    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
15908    #[allow(clippy::needless_lifetimes)]
15909    pub fn get_direct_message_price_changed<'a>(&'a self) -> Option<&'a DirectMessagePriceChanged> {
15910        match self {
15911            Self::Message(ref v) => Some(v.get_direct_message_price_changed()),
15912            Self::EditedMessage(ref v) => Some(v.get_direct_message_price_changed()),
15913            Self::ChannelPost(ref v) => Some(v.get_direct_message_price_changed()),
15914            Self::EditedChannelPost(ref v) => Some(v.get_direct_message_price_changed()),
15915            Self::BusinessMessage(ref v) => Some(v.get_direct_message_price_changed()),
15916            Self::EditedBusinessMessage(ref v) => Some(v.get_direct_message_price_changed()),
15917            _ => None,
15918        }
15919        .flatten()
15920    }
15921    #[allow(rustdoc::invalid_html_tags)]
15922    #[doc = "Optional. Message is a voice message, information about the file"]
15923    #[allow(clippy::needless_lifetimes)]
15924    pub fn get_voice<'a>(&'a self) -> Option<&'a Voice> {
15925        match self {
15926            Self::Message(ref v) => Some(v.get_voice()),
15927            Self::EditedMessage(ref v) => Some(v.get_voice()),
15928            Self::ChannelPost(ref v) => Some(v.get_voice()),
15929            Self::EditedChannelPost(ref v) => Some(v.get_voice()),
15930            Self::BusinessMessage(ref v) => Some(v.get_voice()),
15931            Self::EditedBusinessMessage(ref v) => Some(v.get_voice()),
15932            _ => None,
15933        }
15934        .flatten()
15935    }
15936    #[allow(rustdoc::invalid_html_tags)]
15937    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
15938    #[allow(clippy::needless_lifetimes)]
15939    pub fn get_offset<'a>(&'a self) -> Option<&'a str> {
15940        match self {
15941            Self::InlineQuery(ref v) => Some(v.get_offset()),
15942            _ => None,
15943        }
15944    }
15945    #[allow(rustdoc::invalid_html_tags)]
15946    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
15947    #[allow(clippy::needless_lifetimes)]
15948    pub fn get_author_signature<'a>(&'a self) -> Option<&'a str> {
15949        match self {
15950            Self::Message(ref v) => Some(v.get_author_signature()),
15951            Self::EditedMessage(ref v) => Some(v.get_author_signature()),
15952            Self::ChannelPost(ref v) => Some(v.get_author_signature()),
15953            Self::EditedChannelPost(ref v) => Some(v.get_author_signature()),
15954            Self::BusinessMessage(ref v) => Some(v.get_author_signature()),
15955            Self::EditedBusinessMessage(ref v) => Some(v.get_author_signature()),
15956            _ => None,
15957        }
15958        .flatten()
15959    }
15960}
15961impl From<Update> for UpdateExt {
15962    fn from(update: Update) -> Self {
15963        if let Some(thing) = update.message {
15964            return Self::Message(thing.consume());
15965        }
15966        if let Some(thing) = update.edited_message {
15967            return Self::EditedMessage(thing.consume());
15968        }
15969        if let Some(thing) = update.channel_post {
15970            return Self::ChannelPost(thing.consume());
15971        }
15972        if let Some(thing) = update.edited_channel_post {
15973            return Self::EditedChannelPost(thing.consume());
15974        }
15975        if let Some(thing) = update.business_connection {
15976            return Self::BusinessConnection(thing.consume());
15977        }
15978        if let Some(thing) = update.business_message {
15979            return Self::BusinessMessage(thing.consume());
15980        }
15981        if let Some(thing) = update.edited_business_message {
15982            return Self::EditedBusinessMessage(thing.consume());
15983        }
15984        if let Some(thing) = update.deleted_business_messages {
15985            return Self::DeletedBusinessMessages(thing.consume());
15986        }
15987        if let Some(thing) = update.message_reaction {
15988            return Self::MessageReaction(thing.consume());
15989        }
15990        if let Some(thing) = update.message_reaction_count {
15991            return Self::MessageReactionCount(thing.consume());
15992        }
15993        if let Some(thing) = update.inline_query {
15994            return Self::InlineQuery(thing.consume());
15995        }
15996        if let Some(thing) = update.chosen_inline_result {
15997            return Self::ChosenInlineResult(thing.consume());
15998        }
15999        if let Some(thing) = update.callback_query {
16000            return Self::CallbackQuery(thing.consume());
16001        }
16002        if let Some(thing) = update.shipping_query {
16003            return Self::ShippingQuery(thing.consume());
16004        }
16005        if let Some(thing) = update.pre_checkout_query {
16006            return Self::PreCheckoutQuery(thing.consume());
16007        }
16008        if let Some(thing) = update.purchased_paid_media {
16009            return Self::PurchasedPaidMedia(thing.consume());
16010        }
16011        if let Some(thing) = update.poll {
16012            return Self::Poll(thing.consume());
16013        }
16014        if let Some(thing) = update.poll_answer {
16015            return Self::PollAnswer(thing.consume());
16016        }
16017        if let Some(thing) = update.my_chat_member {
16018            return Self::MyChatMember(thing.consume());
16019        }
16020        if let Some(thing) = update.chat_member {
16021            return Self::ChatMember(thing.consume());
16022        }
16023        if let Some(thing) = update.chat_join_request {
16024            return Self::ChatJoinRequest(thing.consume());
16025        }
16026        if let Some(thing) = update.chat_boost {
16027            return Self::ChatBoost(thing.consume());
16028        }
16029        if let Some(thing) = update.removed_chat_boost {
16030            return Self::RemovedChatBoost(thing.consume());
16031        }
16032        Self::Invalid
16033    }
16034}
16035#[allow(rustdoc::invalid_html_tags)]
16036#[doc = "This object represents an incoming update.At most one of the optional parameters can be present in any given update."]
16037#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16038pub struct UpdateBuilder {
16039    #[allow(rustdoc::invalid_html_tags)]
16040    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
16041    #[serde(rename = "update_id")]
16042    pub update_id: i64,
16043    #[allow(rustdoc::invalid_html_tags)]
16044    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
16045    #[serde(skip_serializing_if = "Option::is_none", rename = "message", default)]
16046    pub message: Option<BoxWrapper<Box<Message>>>,
16047    #[allow(rustdoc::invalid_html_tags)]
16048    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
16049    #[serde(
16050        skip_serializing_if = "Option::is_none",
16051        rename = "edited_message",
16052        default
16053    )]
16054    pub edited_message: Option<BoxWrapper<Box<Message>>>,
16055    #[allow(rustdoc::invalid_html_tags)]
16056    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
16057    #[serde(
16058        skip_serializing_if = "Option::is_none",
16059        rename = "channel_post",
16060        default
16061    )]
16062    pub channel_post: Option<BoxWrapper<Box<Message>>>,
16063    #[allow(rustdoc::invalid_html_tags)]
16064    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
16065    #[serde(
16066        skip_serializing_if = "Option::is_none",
16067        rename = "edited_channel_post",
16068        default
16069    )]
16070    pub edited_channel_post: Option<BoxWrapper<Box<Message>>>,
16071    #[allow(rustdoc::invalid_html_tags)]
16072    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
16073    #[serde(
16074        skip_serializing_if = "Option::is_none",
16075        rename = "business_connection",
16076        default
16077    )]
16078    pub business_connection: Option<BoxWrapper<Box<BusinessConnection>>>,
16079    #[allow(rustdoc::invalid_html_tags)]
16080    #[doc = "Optional. New message from a connected business account"]
16081    #[serde(
16082        skip_serializing_if = "Option::is_none",
16083        rename = "business_message",
16084        default
16085    )]
16086    pub business_message: Option<BoxWrapper<Box<Message>>>,
16087    #[allow(rustdoc::invalid_html_tags)]
16088    #[doc = "Optional. New version of a message from a connected business account"]
16089    #[serde(
16090        skip_serializing_if = "Option::is_none",
16091        rename = "edited_business_message",
16092        default
16093    )]
16094    pub edited_business_message: Option<BoxWrapper<Box<Message>>>,
16095    #[allow(rustdoc::invalid_html_tags)]
16096    #[doc = "Optional. Messages were deleted from a connected business account"]
16097    #[serde(
16098        skip_serializing_if = "Option::is_none",
16099        rename = "deleted_business_messages",
16100        default
16101    )]
16102    pub deleted_business_messages: Option<BoxWrapper<Box<BusinessMessagesDeleted>>>,
16103    #[allow(rustdoc::invalid_html_tags)]
16104    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
16105    #[serde(
16106        skip_serializing_if = "Option::is_none",
16107        rename = "message_reaction",
16108        default
16109    )]
16110    pub message_reaction: Option<BoxWrapper<Box<MessageReactionUpdated>>>,
16111    #[allow(rustdoc::invalid_html_tags)]
16112    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
16113    #[serde(
16114        skip_serializing_if = "Option::is_none",
16115        rename = "message_reaction_count",
16116        default
16117    )]
16118    pub message_reaction_count: Option<BoxWrapper<Box<MessageReactionCountUpdated>>>,
16119    #[allow(rustdoc::invalid_html_tags)]
16120    #[doc = "Optional. New incoming inline query"]
16121    #[serde(
16122        skip_serializing_if = "Option::is_none",
16123        rename = "inline_query",
16124        default
16125    )]
16126    pub inline_query: Option<BoxWrapper<Box<InlineQuery>>>,
16127    #[allow(rustdoc::invalid_html_tags)]
16128    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
16129    #[serde(
16130        skip_serializing_if = "Option::is_none",
16131        rename = "chosen_inline_result",
16132        default
16133    )]
16134    pub chosen_inline_result: Option<BoxWrapper<Box<ChosenInlineResult>>>,
16135    #[allow(rustdoc::invalid_html_tags)]
16136    #[doc = "Optional. New incoming callback query"]
16137    #[serde(
16138        skip_serializing_if = "Option::is_none",
16139        rename = "callback_query",
16140        default
16141    )]
16142    pub callback_query: Option<BoxWrapper<Box<CallbackQuery>>>,
16143    #[allow(rustdoc::invalid_html_tags)]
16144    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
16145    #[serde(
16146        skip_serializing_if = "Option::is_none",
16147        rename = "shipping_query",
16148        default
16149    )]
16150    pub shipping_query: Option<BoxWrapper<Box<ShippingQuery>>>,
16151    #[allow(rustdoc::invalid_html_tags)]
16152    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
16153    #[serde(
16154        skip_serializing_if = "Option::is_none",
16155        rename = "pre_checkout_query",
16156        default
16157    )]
16158    pub pre_checkout_query: Option<BoxWrapper<Box<PreCheckoutQuery>>>,
16159    #[allow(rustdoc::invalid_html_tags)]
16160    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
16161    #[serde(
16162        skip_serializing_if = "Option::is_none",
16163        rename = "purchased_paid_media",
16164        default
16165    )]
16166    pub purchased_paid_media: Option<BoxWrapper<Box<PaidMediaPurchased>>>,
16167    #[allow(rustdoc::invalid_html_tags)]
16168    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
16169    #[serde(skip_serializing_if = "Option::is_none", rename = "poll", default)]
16170    pub poll: Option<BoxWrapper<Box<Poll>>>,
16171    #[allow(rustdoc::invalid_html_tags)]
16172    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
16173    #[serde(
16174        skip_serializing_if = "Option::is_none",
16175        rename = "poll_answer",
16176        default
16177    )]
16178    pub poll_answer: Option<BoxWrapper<Box<PollAnswer>>>,
16179    #[allow(rustdoc::invalid_html_tags)]
16180    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
16181    #[serde(
16182        skip_serializing_if = "Option::is_none",
16183        rename = "my_chat_member",
16184        default
16185    )]
16186    pub my_chat_member: Option<BoxWrapper<Box<ChatMemberUpdated>>>,
16187    #[allow(rustdoc::invalid_html_tags)]
16188    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
16189    #[serde(
16190        skip_serializing_if = "Option::is_none",
16191        rename = "chat_member",
16192        default
16193    )]
16194    pub chat_member: Option<BoxWrapper<Box<ChatMemberUpdated>>>,
16195    #[allow(rustdoc::invalid_html_tags)]
16196    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
16197    #[serde(
16198        skip_serializing_if = "Option::is_none",
16199        rename = "chat_join_request",
16200        default
16201    )]
16202    pub chat_join_request: Option<BoxWrapper<Box<ChatJoinRequest>>>,
16203    #[allow(rustdoc::invalid_html_tags)]
16204    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
16205    #[serde(
16206        skip_serializing_if = "Option::is_none",
16207        rename = "chat_boost",
16208        default
16209    )]
16210    pub chat_boost: Option<BoxWrapper<Box<ChatBoostUpdated>>>,
16211    #[allow(rustdoc::invalid_html_tags)]
16212    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
16213    #[serde(
16214        skip_serializing_if = "Option::is_none",
16215        rename = "removed_chat_boost",
16216        default
16217    )]
16218    pub removed_chat_boost: Option<BoxWrapper<Box<ChatBoostRemoved>>>,
16219}
16220impl UpdateBuilder {
16221    #[allow(clippy::too_many_arguments)]
16222    pub fn new(update_id: i64) -> Self {
16223        Self {
16224            update_id,
16225            message: None,
16226            edited_message: None,
16227            channel_post: None,
16228            edited_channel_post: None,
16229            business_connection: None,
16230            business_message: None,
16231            edited_business_message: None,
16232            deleted_business_messages: None,
16233            message_reaction: None,
16234            message_reaction_count: None,
16235            inline_query: None,
16236            chosen_inline_result: None,
16237            callback_query: None,
16238            shipping_query: None,
16239            pre_checkout_query: None,
16240            purchased_paid_media: None,
16241            poll: None,
16242            poll_answer: None,
16243            my_chat_member: None,
16244            chat_member: None,
16245            chat_join_request: None,
16246            chat_boost: None,
16247            removed_chat_boost: None,
16248        }
16249    }
16250    #[allow(rustdoc::invalid_html_tags)]
16251    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
16252    pub fn set_update_id(mut self, update_id: i64) -> Self {
16253        self.update_id = update_id;
16254        self
16255    }
16256    #[allow(rustdoc::invalid_html_tags)]
16257    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
16258    pub fn set_message(mut self, message: Box<Message>) -> Self {
16259        self.message = Some(BoxWrapper(message));
16260        self
16261    }
16262    #[allow(rustdoc::invalid_html_tags)]
16263    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
16264    pub fn set_edited_message(mut self, edited_message: Box<Message>) -> Self {
16265        self.edited_message = Some(BoxWrapper(edited_message));
16266        self
16267    }
16268    #[allow(rustdoc::invalid_html_tags)]
16269    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
16270    pub fn set_channel_post(mut self, channel_post: Box<Message>) -> Self {
16271        self.channel_post = Some(BoxWrapper(channel_post));
16272        self
16273    }
16274    #[allow(rustdoc::invalid_html_tags)]
16275    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
16276    pub fn set_edited_channel_post(mut self, edited_channel_post: Box<Message>) -> Self {
16277        self.edited_channel_post = Some(BoxWrapper(edited_channel_post));
16278        self
16279    }
16280    #[allow(rustdoc::invalid_html_tags)]
16281    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
16282    pub fn set_business_connection(mut self, business_connection: Box<BusinessConnection>) -> Self {
16283        self.business_connection = Some(BoxWrapper(business_connection));
16284        self
16285    }
16286    #[allow(rustdoc::invalid_html_tags)]
16287    #[doc = "Optional. New message from a connected business account"]
16288    pub fn set_business_message(mut self, business_message: Box<Message>) -> Self {
16289        self.business_message = Some(BoxWrapper(business_message));
16290        self
16291    }
16292    #[allow(rustdoc::invalid_html_tags)]
16293    #[doc = "Optional. New version of a message from a connected business account"]
16294    pub fn set_edited_business_message(mut self, edited_business_message: Box<Message>) -> Self {
16295        self.edited_business_message = Some(BoxWrapper(edited_business_message));
16296        self
16297    }
16298    #[allow(rustdoc::invalid_html_tags)]
16299    #[doc = "Optional. Messages were deleted from a connected business account"]
16300    pub fn set_deleted_business_messages(
16301        mut self,
16302        deleted_business_messages: Box<BusinessMessagesDeleted>,
16303    ) -> Self {
16304        self.deleted_business_messages = Some(BoxWrapper(deleted_business_messages));
16305        self
16306    }
16307    #[allow(rustdoc::invalid_html_tags)]
16308    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
16309    pub fn set_message_reaction(mut self, message_reaction: Box<MessageReactionUpdated>) -> Self {
16310        self.message_reaction = Some(BoxWrapper(message_reaction));
16311        self
16312    }
16313    #[allow(rustdoc::invalid_html_tags)]
16314    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
16315    pub fn set_message_reaction_count(
16316        mut self,
16317        message_reaction_count: Box<MessageReactionCountUpdated>,
16318    ) -> Self {
16319        self.message_reaction_count = Some(BoxWrapper(message_reaction_count));
16320        self
16321    }
16322    #[allow(rustdoc::invalid_html_tags)]
16323    #[doc = "Optional. New incoming inline query"]
16324    pub fn set_inline_query(mut self, inline_query: Box<InlineQuery>) -> Self {
16325        self.inline_query = Some(BoxWrapper(inline_query));
16326        self
16327    }
16328    #[allow(rustdoc::invalid_html_tags)]
16329    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
16330    pub fn set_chosen_inline_result(
16331        mut self,
16332        chosen_inline_result: Box<ChosenInlineResult>,
16333    ) -> Self {
16334        self.chosen_inline_result = Some(BoxWrapper(chosen_inline_result));
16335        self
16336    }
16337    #[allow(rustdoc::invalid_html_tags)]
16338    #[doc = "Optional. New incoming callback query"]
16339    pub fn set_callback_query(mut self, callback_query: Box<CallbackQuery>) -> Self {
16340        self.callback_query = Some(BoxWrapper(callback_query));
16341        self
16342    }
16343    #[allow(rustdoc::invalid_html_tags)]
16344    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
16345    pub fn set_shipping_query(mut self, shipping_query: Box<ShippingQuery>) -> Self {
16346        self.shipping_query = Some(BoxWrapper(shipping_query));
16347        self
16348    }
16349    #[allow(rustdoc::invalid_html_tags)]
16350    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
16351    pub fn set_pre_checkout_query(mut self, pre_checkout_query: Box<PreCheckoutQuery>) -> Self {
16352        self.pre_checkout_query = Some(BoxWrapper(pre_checkout_query));
16353        self
16354    }
16355    #[allow(rustdoc::invalid_html_tags)]
16356    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
16357    pub fn set_purchased_paid_media(
16358        mut self,
16359        purchased_paid_media: Box<PaidMediaPurchased>,
16360    ) -> Self {
16361        self.purchased_paid_media = Some(BoxWrapper(purchased_paid_media));
16362        self
16363    }
16364    #[allow(rustdoc::invalid_html_tags)]
16365    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
16366    pub fn set_poll(mut self, poll: Box<Poll>) -> Self {
16367        self.poll = Some(BoxWrapper(poll));
16368        self
16369    }
16370    #[allow(rustdoc::invalid_html_tags)]
16371    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
16372    pub fn set_poll_answer(mut self, poll_answer: Box<PollAnswer>) -> Self {
16373        self.poll_answer = Some(BoxWrapper(poll_answer));
16374        self
16375    }
16376    #[allow(rustdoc::invalid_html_tags)]
16377    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
16378    pub fn set_my_chat_member(mut self, my_chat_member: Box<ChatMemberUpdated>) -> Self {
16379        self.my_chat_member = Some(BoxWrapper(my_chat_member));
16380        self
16381    }
16382    #[allow(rustdoc::invalid_html_tags)]
16383    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
16384    pub fn set_chat_member(mut self, chat_member: Box<ChatMemberUpdated>) -> Self {
16385        self.chat_member = Some(BoxWrapper(chat_member));
16386        self
16387    }
16388    #[allow(rustdoc::invalid_html_tags)]
16389    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
16390    pub fn set_chat_join_request(mut self, chat_join_request: Box<ChatJoinRequest>) -> Self {
16391        self.chat_join_request = Some(BoxWrapper(chat_join_request));
16392        self
16393    }
16394    #[allow(rustdoc::invalid_html_tags)]
16395    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
16396    pub fn set_chat_boost(mut self, chat_boost: Box<ChatBoostUpdated>) -> Self {
16397        self.chat_boost = Some(BoxWrapper(chat_boost));
16398        self
16399    }
16400    #[allow(rustdoc::invalid_html_tags)]
16401    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
16402    pub fn set_removed_chat_boost(mut self, removed_chat_boost: Box<ChatBoostRemoved>) -> Self {
16403        self.removed_chat_boost = Some(BoxWrapper(removed_chat_boost));
16404        self
16405    }
16406    pub fn build(self) -> Update {
16407        Update {
16408            update_id: self.update_id,
16409            message: self.message,
16410            edited_message: self.edited_message,
16411            channel_post: self.channel_post,
16412            edited_channel_post: self.edited_channel_post,
16413            business_connection: self.business_connection,
16414            business_message: self.business_message,
16415            edited_business_message: self.edited_business_message,
16416            deleted_business_messages: self.deleted_business_messages,
16417            message_reaction: self.message_reaction,
16418            message_reaction_count: self.message_reaction_count,
16419            inline_query: self.inline_query,
16420            chosen_inline_result: self.chosen_inline_result,
16421            callback_query: self.callback_query,
16422            shipping_query: self.shipping_query,
16423            pre_checkout_query: self.pre_checkout_query,
16424            purchased_paid_media: self.purchased_paid_media,
16425            poll: self.poll,
16426            poll_answer: self.poll_answer,
16427            my_chat_member: self.my_chat_member,
16428            chat_member: self.chat_member,
16429            chat_join_request: self.chat_join_request,
16430            chat_boost: self.chat_boost,
16431            removed_chat_boost: self.removed_chat_boost,
16432        }
16433    }
16434}
16435#[allow(rustdoc::invalid_html_tags)]
16436#[doc = "This object represents one size of a photo or a file / sticker thumbnail."]
16437#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16438pub struct PhotoSize {
16439    #[allow(rustdoc::invalid_html_tags)]
16440    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
16441    #[serde(rename = "file_id")]
16442    pub file_id: String,
16443    #[allow(rustdoc::invalid_html_tags)]
16444    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
16445    #[serde(rename = "file_unique_id")]
16446    pub file_unique_id: String,
16447    #[allow(rustdoc::invalid_html_tags)]
16448    #[doc = "Photo width"]
16449    #[serde(rename = "width")]
16450    pub width: i64,
16451    #[allow(rustdoc::invalid_html_tags)]
16452    #[doc = "Photo height"]
16453    #[serde(rename = "height")]
16454    pub height: i64,
16455    #[allow(rustdoc::invalid_html_tags)]
16456    #[doc = "Optional. File size in bytes"]
16457    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
16458    pub file_size: Option<i64>,
16459}
16460#[allow(rustdoc::invalid_html_tags)]
16461#[doc = "Companion type to PhotoSize that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
16462#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16463pub struct NoSkipPhotoSize {
16464    #[allow(rustdoc::invalid_html_tags)]
16465    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
16466    #[serde(rename = "file_id")]
16467    pub file_id: String,
16468    #[allow(rustdoc::invalid_html_tags)]
16469    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
16470    #[serde(rename = "file_unique_id")]
16471    pub file_unique_id: String,
16472    #[allow(rustdoc::invalid_html_tags)]
16473    #[doc = "Photo width"]
16474    #[serde(rename = "width")]
16475    pub width: i64,
16476    #[allow(rustdoc::invalid_html_tags)]
16477    #[doc = "Photo height"]
16478    #[serde(rename = "height")]
16479    pub height: i64,
16480    pub file_size: Option<i64>,
16481}
16482impl From<NoSkipPhotoSize> for PhotoSize {
16483    fn from(t: NoSkipPhotoSize) -> Self {
16484        Self {
16485            file_id: t.file_id,
16486            file_unique_id: t.file_unique_id,
16487            width: t.width,
16488            height: t.height,
16489            file_size: t.file_size,
16490        }
16491    }
16492}
16493#[allow(clippy::from_over_into)]
16494impl Into<NoSkipPhotoSize> for PhotoSize {
16495    fn into(self) -> NoSkipPhotoSize {
16496        NoSkipPhotoSize {
16497            file_id: self.file_id,
16498            file_unique_id: self.file_unique_id,
16499            width: self.width,
16500            height: self.height,
16501            file_size: self.file_size,
16502        }
16503    }
16504}
16505impl NoSkipPhotoSize {
16506    pub fn skip(self) -> PhotoSize {
16507        self.into()
16508    }
16509}
16510impl PhotoSize {
16511    pub fn noskip(self) -> NoSkipPhotoSize {
16512        self.into()
16513    }
16514}
16515#[allow(rustdoc::invalid_html_tags)]
16516#[doc = "This object represents one size of a photo or a file / sticker thumbnail."]
16517#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16518pub struct PhotoSizeBuilder {
16519    #[allow(rustdoc::invalid_html_tags)]
16520    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
16521    #[serde(rename = "file_id")]
16522    pub file_id: String,
16523    #[allow(rustdoc::invalid_html_tags)]
16524    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
16525    #[serde(rename = "file_unique_id")]
16526    pub file_unique_id: String,
16527    #[allow(rustdoc::invalid_html_tags)]
16528    #[doc = "Photo width"]
16529    #[serde(rename = "width")]
16530    pub width: i64,
16531    #[allow(rustdoc::invalid_html_tags)]
16532    #[doc = "Photo height"]
16533    #[serde(rename = "height")]
16534    pub height: i64,
16535    #[allow(rustdoc::invalid_html_tags)]
16536    #[doc = "Optional. File size in bytes"]
16537    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
16538    pub file_size: Option<i64>,
16539}
16540impl PhotoSizeBuilder {
16541    #[allow(clippy::too_many_arguments)]
16542    pub fn new(file_id: String, file_unique_id: String, width: i64, height: i64) -> Self {
16543        Self {
16544            file_id,
16545            file_unique_id,
16546            width,
16547            height,
16548            file_size: None,
16549        }
16550    }
16551    #[allow(rustdoc::invalid_html_tags)]
16552    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
16553    pub fn set_file_id(mut self, file_id: String) -> Self {
16554        self.file_id = file_id;
16555        self
16556    }
16557    #[allow(rustdoc::invalid_html_tags)]
16558    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
16559    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
16560        self.file_unique_id = file_unique_id;
16561        self
16562    }
16563    #[allow(rustdoc::invalid_html_tags)]
16564    #[doc = "Photo width"]
16565    pub fn set_width(mut self, width: i64) -> Self {
16566        self.width = width;
16567        self
16568    }
16569    #[allow(rustdoc::invalid_html_tags)]
16570    #[doc = "Photo height"]
16571    pub fn set_height(mut self, height: i64) -> Self {
16572        self.height = height;
16573        self
16574    }
16575    #[allow(rustdoc::invalid_html_tags)]
16576    #[doc = "Optional. File size in bytes"]
16577    pub fn set_file_size(mut self, file_size: i64) -> Self {
16578        self.file_size = Some(file_size);
16579        self
16580    }
16581    pub fn build(self) -> PhotoSize {
16582        PhotoSize {
16583            file_id: self.file_id,
16584            file_unique_id: self.file_unique_id,
16585            width: self.width,
16586            height: self.height,
16587            file_size: self.file_size,
16588        }
16589    }
16590}
16591#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16592#[serde(tag = "status")]
16593pub enum ChatMember {
16594    #[serde(rename = "creator")]
16595    ChatMemberOwner(ChatMemberOwner),
16596    #[serde(rename = "kicked")]
16597    ChatMemberBanned(ChatMemberBanned),
16598    #[serde(rename = "left")]
16599    ChatMemberLeft(ChatMemberLeft),
16600    #[serde(rename = "restricted")]
16601    ChatMemberRestricted(ChatMemberRestricted),
16602    #[serde(rename = "member")]
16603    ChatMemberMember(ChatMemberMember),
16604    #[serde(rename = "administrator")]
16605    ChatMemberAdministrator(ChatMemberAdministrator),
16606}
16607impl Default for ChatMember {
16608    fn default() -> Self {
16609        ChatMember::ChatMemberOwner(ChatMemberOwner::default())
16610    }
16611}
16612impl ChatMember {
16613    #[allow(rustdoc::invalid_html_tags)]
16614    #[doc = "Information about the user"]
16615    #[allow(clippy::needless_lifetimes)]
16616    pub fn get_user<'a>(&'a self) -> &'a User {
16617        match self {
16618            Self::ChatMemberOwner(ref v) => v.get_user(),
16619            Self::ChatMemberAdministrator(ref v) => v.get_user(),
16620            Self::ChatMemberMember(ref v) => v.get_user(),
16621            Self::ChatMemberRestricted(ref v) => v.get_user(),
16622            Self::ChatMemberLeft(ref v) => v.get_user(),
16623            Self::ChatMemberBanned(ref v) => v.get_user(),
16624        }
16625    }
16626}
16627#[allow(rustdoc::invalid_html_tags)]
16628#[doc = "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription."]
16629#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16630pub struct ChatBoostSourceGiftCode {
16631    #[allow(rustdoc::invalid_html_tags)]
16632    #[doc = "Source of the boost, always \"gift_code\""]
16633    #[serde(rename = "source")]
16634    pub source: String,
16635    #[allow(rustdoc::invalid_html_tags)]
16636    #[doc = "User for which the gift code was created"]
16637    #[serde(rename = "user")]
16638    pub user: BoxWrapper<Unbox<User>>,
16639}
16640#[allow(rustdoc::invalid_html_tags)]
16641#[doc = "Companion type to ChatBoostSourceGiftCode that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
16642#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16643pub struct NoSkipChatBoostSourceGiftCode {
16644    #[allow(rustdoc::invalid_html_tags)]
16645    #[doc = "Source of the boost, always \"gift_code\""]
16646    #[serde(rename = "source")]
16647    pub source: String,
16648    #[allow(rustdoc::invalid_html_tags)]
16649    #[doc = "User for which the gift code was created"]
16650    #[serde(rename = "user")]
16651    pub user: BoxWrapper<Unbox<User>>,
16652}
16653impl From<NoSkipChatBoostSourceGiftCode> for ChatBoostSourceGiftCode {
16654    fn from(t: NoSkipChatBoostSourceGiftCode) -> Self {
16655        Self {
16656            source: t.source,
16657            user: t.user,
16658        }
16659    }
16660}
16661#[allow(clippy::from_over_into)]
16662impl Into<NoSkipChatBoostSourceGiftCode> for ChatBoostSourceGiftCode {
16663    fn into(self) -> NoSkipChatBoostSourceGiftCode {
16664        NoSkipChatBoostSourceGiftCode {
16665            source: self.source,
16666            user: self.user,
16667        }
16668    }
16669}
16670impl NoSkipChatBoostSourceGiftCode {
16671    pub fn skip(self) -> ChatBoostSourceGiftCode {
16672        self.into()
16673    }
16674}
16675impl ChatBoostSourceGiftCode {
16676    pub fn noskip(self) -> NoSkipChatBoostSourceGiftCode {
16677        self.into()
16678    }
16679}
16680#[allow(rustdoc::invalid_html_tags)]
16681#[doc = "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription."]
16682#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16683pub struct ChatBoostSourceGiftCodeBuilder {
16684    #[allow(rustdoc::invalid_html_tags)]
16685    #[doc = "Source of the boost, always \"gift_code\""]
16686    #[serde(rename = "source")]
16687    pub source: String,
16688    #[allow(rustdoc::invalid_html_tags)]
16689    #[doc = "User for which the gift code was created"]
16690    #[serde(rename = "user")]
16691    pub user: BoxWrapper<Unbox<User>>,
16692}
16693impl ChatBoostSourceGiftCodeBuilder {
16694    #[allow(clippy::too_many_arguments)]
16695    pub fn new<A: Into<User>>(source: String, user: A) -> Self {
16696        Self {
16697            source,
16698            user: BoxWrapper::new_unbox(user.into()),
16699        }
16700    }
16701    #[allow(rustdoc::invalid_html_tags)]
16702    #[doc = "Source of the boost, always \"gift_code\""]
16703    pub fn set_source(mut self, source: String) -> Self {
16704        self.source = source;
16705        self
16706    }
16707    #[allow(rustdoc::invalid_html_tags)]
16708    #[doc = "User for which the gift code was created"]
16709    pub fn set_user(mut self, user: User) -> Self {
16710        self.user = BoxWrapper(Unbox(user));
16711        self
16712    }
16713    pub fn build(self) -> ChatBoostSourceGiftCode {
16714        ChatBoostSourceGiftCode {
16715            source: self.source,
16716            user: self.user,
16717        }
16718    }
16719}
16720#[allow(rustdoc::invalid_html_tags)]
16721#[doc = "This object contains information about one answer option in a poll."]
16722#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16723pub struct PollOption {
16724    #[allow(rustdoc::invalid_html_tags)]
16725    #[doc = "Option text, 1-100 characters"]
16726    #[serde(rename = "text")]
16727    pub text: String,
16728    #[allow(rustdoc::invalid_html_tags)]
16729    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
16730    #[serde(
16731        skip_serializing_if = "Option::is_none",
16732        rename = "text_entities",
16733        default
16734    )]
16735    pub text_entities: Option<Vec<MessageEntity>>,
16736    #[allow(rustdoc::invalid_html_tags)]
16737    #[doc = "Number of users that voted for this option"]
16738    #[serde(rename = "voter_count")]
16739    pub voter_count: i64,
16740}
16741#[allow(rustdoc::invalid_html_tags)]
16742#[doc = "Companion type to PollOption that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
16743#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16744pub struct NoSkipPollOption {
16745    #[allow(rustdoc::invalid_html_tags)]
16746    #[doc = "Option text, 1-100 characters"]
16747    #[serde(rename = "text")]
16748    pub text: String,
16749    pub text_entities: Option<Vec<MessageEntity>>,
16750    #[allow(rustdoc::invalid_html_tags)]
16751    #[doc = "Number of users that voted for this option"]
16752    #[serde(rename = "voter_count")]
16753    pub voter_count: i64,
16754}
16755impl From<NoSkipPollOption> for PollOption {
16756    fn from(t: NoSkipPollOption) -> Self {
16757        Self {
16758            text: t.text,
16759            text_entities: t.text_entities,
16760            voter_count: t.voter_count,
16761        }
16762    }
16763}
16764#[allow(clippy::from_over_into)]
16765impl Into<NoSkipPollOption> for PollOption {
16766    fn into(self) -> NoSkipPollOption {
16767        NoSkipPollOption {
16768            text: self.text,
16769            text_entities: self.text_entities,
16770            voter_count: self.voter_count,
16771        }
16772    }
16773}
16774impl NoSkipPollOption {
16775    pub fn skip(self) -> PollOption {
16776        self.into()
16777    }
16778}
16779impl PollOption {
16780    pub fn noskip(self) -> NoSkipPollOption {
16781        self.into()
16782    }
16783}
16784#[allow(rustdoc::invalid_html_tags)]
16785#[doc = "This object contains information about one answer option in a poll."]
16786#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16787pub struct PollOptionBuilder {
16788    #[allow(rustdoc::invalid_html_tags)]
16789    #[doc = "Option text, 1-100 characters"]
16790    #[serde(rename = "text")]
16791    pub text: String,
16792    #[allow(rustdoc::invalid_html_tags)]
16793    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
16794    #[serde(
16795        skip_serializing_if = "Option::is_none",
16796        rename = "text_entities",
16797        default
16798    )]
16799    pub text_entities: Option<Vec<MessageEntity>>,
16800    #[allow(rustdoc::invalid_html_tags)]
16801    #[doc = "Number of users that voted for this option"]
16802    #[serde(rename = "voter_count")]
16803    pub voter_count: i64,
16804}
16805impl PollOptionBuilder {
16806    #[allow(clippy::too_many_arguments)]
16807    pub fn new(text: String, voter_count: i64) -> Self {
16808        Self {
16809            text,
16810            voter_count,
16811            text_entities: None,
16812        }
16813    }
16814    #[allow(rustdoc::invalid_html_tags)]
16815    #[doc = "Option text, 1-100 characters"]
16816    pub fn set_text(mut self, text: String) -> Self {
16817        self.text = text;
16818        self
16819    }
16820    #[allow(rustdoc::invalid_html_tags)]
16821    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
16822    pub fn set_text_entities(mut self, text_entities: Vec<MessageEntity>) -> Self {
16823        self.text_entities = Some(text_entities);
16824        self
16825    }
16826    #[allow(rustdoc::invalid_html_tags)]
16827    #[doc = "Number of users that voted for this option"]
16828    pub fn set_voter_count(mut self, voter_count: i64) -> Self {
16829        self.voter_count = voter_count;
16830        self
16831    }
16832    pub fn build(self) -> PollOption {
16833        PollOption {
16834            text: self.text,
16835            text_entities: self.text_entities,
16836            voter_count: self.voter_count,
16837        }
16838    }
16839}
16840#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16841#[serde(untagged)]
16842pub enum StoryAreaType {
16843    StoryAreaTypeLocation(StoryAreaTypeLocation),
16844    StoryAreaTypeSuggestedReaction(StoryAreaTypeSuggestedReaction),
16845    StoryAreaTypeLink(StoryAreaTypeLink),
16846    StoryAreaTypeWeather(StoryAreaTypeWeather),
16847    StoryAreaTypeUniqueGift(StoryAreaTypeUniqueGift),
16848}
16849impl Default for StoryAreaType {
16850    fn default() -> Self {
16851        StoryAreaType::StoryAreaTypeLocation(StoryAreaTypeLocation::default())
16852    }
16853}
16854impl StoryAreaType {}
16855#[allow(rustdoc::invalid_html_tags)]
16856#[doc = "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results."]
16857#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16858pub struct InlineQuery {
16859    #[allow(rustdoc::invalid_html_tags)]
16860    #[doc = "Unique identifier for this query"]
16861    #[serde(rename = "id")]
16862    pub id: String,
16863    #[allow(rustdoc::invalid_html_tags)]
16864    #[doc = "Sender"]
16865    #[serde(rename = "from")]
16866    pub from: BoxWrapper<Unbox<User>>,
16867    #[allow(rustdoc::invalid_html_tags)]
16868    #[doc = "Text of the query (up to 256 characters)"]
16869    #[serde(rename = "query")]
16870    pub query: String,
16871    #[allow(rustdoc::invalid_html_tags)]
16872    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
16873    #[serde(rename = "offset")]
16874    pub offset: String,
16875    #[allow(rustdoc::invalid_html_tags)]
16876    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
16877    #[serde(skip_serializing_if = "Option::is_none", rename = "chat_type", default)]
16878    pub chat_type: Option<String>,
16879    #[allow(rustdoc::invalid_html_tags)]
16880    #[doc = "Optional. Sender location, only for bots that request user location"]
16881    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
16882    pub location: Option<BoxWrapper<Unbox<Location>>>,
16883}
16884#[allow(rustdoc::invalid_html_tags)]
16885#[doc = "Companion type to InlineQuery that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
16886#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16887pub struct NoSkipInlineQuery {
16888    #[allow(rustdoc::invalid_html_tags)]
16889    #[doc = "Unique identifier for this query"]
16890    #[serde(rename = "id")]
16891    pub id: String,
16892    #[allow(rustdoc::invalid_html_tags)]
16893    #[doc = "Sender"]
16894    #[serde(rename = "from")]
16895    pub from: BoxWrapper<Unbox<User>>,
16896    #[allow(rustdoc::invalid_html_tags)]
16897    #[doc = "Text of the query (up to 256 characters)"]
16898    #[serde(rename = "query")]
16899    pub query: String,
16900    #[allow(rustdoc::invalid_html_tags)]
16901    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
16902    #[serde(rename = "offset")]
16903    pub offset: String,
16904    pub chat_type: Option<String>,
16905    pub location: Option<BoxWrapper<Unbox<Location>>>,
16906}
16907impl From<NoSkipInlineQuery> for InlineQuery {
16908    fn from(t: NoSkipInlineQuery) -> Self {
16909        Self {
16910            id: t.id,
16911            from: t.from,
16912            query: t.query,
16913            offset: t.offset,
16914            chat_type: t.chat_type,
16915            location: t.location,
16916        }
16917    }
16918}
16919#[allow(clippy::from_over_into)]
16920impl Into<NoSkipInlineQuery> for InlineQuery {
16921    fn into(self) -> NoSkipInlineQuery {
16922        NoSkipInlineQuery {
16923            id: self.id,
16924            from: self.from,
16925            query: self.query,
16926            offset: self.offset,
16927            chat_type: self.chat_type,
16928            location: self.location,
16929        }
16930    }
16931}
16932impl NoSkipInlineQuery {
16933    pub fn skip(self) -> InlineQuery {
16934        self.into()
16935    }
16936}
16937impl InlineQuery {
16938    pub fn noskip(self) -> NoSkipInlineQuery {
16939        self.into()
16940    }
16941}
16942#[allow(rustdoc::invalid_html_tags)]
16943#[doc = "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results."]
16944#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16945pub struct InlineQueryBuilder {
16946    #[allow(rustdoc::invalid_html_tags)]
16947    #[doc = "Unique identifier for this query"]
16948    #[serde(rename = "id")]
16949    pub id: String,
16950    #[allow(rustdoc::invalid_html_tags)]
16951    #[doc = "Sender"]
16952    #[serde(rename = "from")]
16953    pub from: BoxWrapper<Unbox<User>>,
16954    #[allow(rustdoc::invalid_html_tags)]
16955    #[doc = "Text of the query (up to 256 characters)"]
16956    #[serde(rename = "query")]
16957    pub query: String,
16958    #[allow(rustdoc::invalid_html_tags)]
16959    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
16960    #[serde(rename = "offset")]
16961    pub offset: String,
16962    #[allow(rustdoc::invalid_html_tags)]
16963    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
16964    #[serde(skip_serializing_if = "Option::is_none", rename = "chat_type", default)]
16965    pub chat_type: Option<String>,
16966    #[allow(rustdoc::invalid_html_tags)]
16967    #[doc = "Optional. Sender location, only for bots that request user location"]
16968    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
16969    pub location: Option<BoxWrapper<Unbox<Location>>>,
16970}
16971impl InlineQueryBuilder {
16972    #[allow(clippy::too_many_arguments)]
16973    pub fn new<A: Into<User>>(id: String, from: A, query: String, offset: String) -> Self {
16974        Self {
16975            id,
16976            from: BoxWrapper::new_unbox(from.into()),
16977            query,
16978            offset,
16979            chat_type: None,
16980            location: None,
16981        }
16982    }
16983    #[allow(rustdoc::invalid_html_tags)]
16984    #[doc = "Unique identifier for this query"]
16985    pub fn set_id(mut self, id: String) -> Self {
16986        self.id = id;
16987        self
16988    }
16989    #[allow(rustdoc::invalid_html_tags)]
16990    #[doc = "Sender"]
16991    pub fn set_from(mut self, from: User) -> Self {
16992        self.from = BoxWrapper(Unbox(from));
16993        self
16994    }
16995    #[allow(rustdoc::invalid_html_tags)]
16996    #[doc = "Text of the query (up to 256 characters)"]
16997    pub fn set_query(mut self, query: String) -> Self {
16998        self.query = query;
16999        self
17000    }
17001    #[allow(rustdoc::invalid_html_tags)]
17002    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
17003    pub fn set_offset(mut self, offset: String) -> Self {
17004        self.offset = offset;
17005        self
17006    }
17007    #[allow(rustdoc::invalid_html_tags)]
17008    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
17009    pub fn set_chat_type(mut self, chat_type: String) -> Self {
17010        self.chat_type = Some(chat_type);
17011        self
17012    }
17013    #[allow(rustdoc::invalid_html_tags)]
17014    #[doc = "Optional. Sender location, only for bots that request user location"]
17015    pub fn set_location(mut self, location: Location) -> Self {
17016        self.location = Some(BoxWrapper(Unbox(location)));
17017        self
17018    }
17019    pub fn build(self) -> InlineQuery {
17020        InlineQuery {
17021            id: self.id,
17022            from: self.from,
17023            query: self.query,
17024            offset: self.offset,
17025            chat_type: self.chat_type,
17026            location: self.location,
17027        }
17028    }
17029}
17030#[allow(rustdoc::invalid_html_tags)]
17031#[doc = "Describes a transaction with a user."]
17032#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17033pub struct TransactionPartnerUser {
17034    #[allow(rustdoc::invalid_html_tags)]
17035    #[doc = "Type of the transaction partner, always \"user\""]
17036    #[serde(rename = "type")]
17037    pub tg_type: String,
17038    #[allow(rustdoc::invalid_html_tags)]
17039    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
17040    #[serde(rename = "transaction_type")]
17041    pub transaction_type: String,
17042    #[allow(rustdoc::invalid_html_tags)]
17043    #[doc = "Information about the user"]
17044    #[serde(rename = "user")]
17045    pub user: BoxWrapper<Unbox<User>>,
17046    #[allow(rustdoc::invalid_html_tags)]
17047    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
17048    #[serde(skip_serializing_if = "Option::is_none", rename = "affiliate", default)]
17049    pub affiliate: Option<BoxWrapper<Unbox<AffiliateInfo>>>,
17050    #[allow(rustdoc::invalid_html_tags)]
17051    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
17052    #[serde(
17053        skip_serializing_if = "Option::is_none",
17054        rename = "invoice_payload",
17055        default
17056    )]
17057    pub invoice_payload: Option<String>,
17058    #[allow(rustdoc::invalid_html_tags)]
17059    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
17060    #[serde(
17061        skip_serializing_if = "Option::is_none",
17062        rename = "subscription_period",
17063        default
17064    )]
17065    pub subscription_period: Option<i64>,
17066    #[allow(rustdoc::invalid_html_tags)]
17067    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
17068    #[serde(
17069        skip_serializing_if = "Option::is_none",
17070        rename = "paid_media",
17071        default
17072    )]
17073    pub paid_media: Option<Vec<PaidMedia>>,
17074    #[allow(rustdoc::invalid_html_tags)]
17075    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
17076    #[serde(
17077        skip_serializing_if = "Option::is_none",
17078        rename = "paid_media_payload",
17079        default
17080    )]
17081    pub paid_media_payload: Option<String>,
17082    #[allow(rustdoc::invalid_html_tags)]
17083    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
17084    #[serde(skip_serializing_if = "Option::is_none", rename = "gift", default)]
17085    pub gift: Option<BoxWrapper<Unbox<Gift>>>,
17086    #[allow(rustdoc::invalid_html_tags)]
17087    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
17088    #[serde(
17089        skip_serializing_if = "Option::is_none",
17090        rename = "premium_subscription_duration",
17091        default
17092    )]
17093    pub premium_subscription_duration: Option<i64>,
17094}
17095#[allow(rustdoc::invalid_html_tags)]
17096#[doc = "Companion type to TransactionPartnerUser that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
17097#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17098pub struct NoSkipTransactionPartnerUser {
17099    #[allow(rustdoc::invalid_html_tags)]
17100    #[doc = "Type of the transaction partner, always \"user\""]
17101    #[serde(rename = "type")]
17102    pub tg_type: String,
17103    #[allow(rustdoc::invalid_html_tags)]
17104    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
17105    #[serde(rename = "transaction_type")]
17106    pub transaction_type: String,
17107    #[allow(rustdoc::invalid_html_tags)]
17108    #[doc = "Information about the user"]
17109    #[serde(rename = "user")]
17110    pub user: BoxWrapper<Unbox<User>>,
17111    pub affiliate: Option<BoxWrapper<Unbox<AffiliateInfo>>>,
17112    pub invoice_payload: Option<String>,
17113    pub subscription_period: Option<i64>,
17114    pub paid_media: Option<Vec<PaidMedia>>,
17115    pub paid_media_payload: Option<String>,
17116    pub gift: Option<BoxWrapper<Unbox<Gift>>>,
17117    pub premium_subscription_duration: Option<i64>,
17118}
17119impl From<NoSkipTransactionPartnerUser> for TransactionPartnerUser {
17120    fn from(t: NoSkipTransactionPartnerUser) -> Self {
17121        Self {
17122            tg_type: t.tg_type,
17123            transaction_type: t.transaction_type,
17124            user: t.user,
17125            affiliate: t.affiliate,
17126            invoice_payload: t.invoice_payload,
17127            subscription_period: t.subscription_period,
17128            paid_media: t.paid_media,
17129            paid_media_payload: t.paid_media_payload,
17130            gift: t.gift,
17131            premium_subscription_duration: t.premium_subscription_duration,
17132        }
17133    }
17134}
17135#[allow(clippy::from_over_into)]
17136impl Into<NoSkipTransactionPartnerUser> for TransactionPartnerUser {
17137    fn into(self) -> NoSkipTransactionPartnerUser {
17138        NoSkipTransactionPartnerUser {
17139            tg_type: self.tg_type,
17140            transaction_type: self.transaction_type,
17141            user: self.user,
17142            affiliate: self.affiliate,
17143            invoice_payload: self.invoice_payload,
17144            subscription_period: self.subscription_period,
17145            paid_media: self.paid_media,
17146            paid_media_payload: self.paid_media_payload,
17147            gift: self.gift,
17148            premium_subscription_duration: self.premium_subscription_duration,
17149        }
17150    }
17151}
17152impl NoSkipTransactionPartnerUser {
17153    pub fn skip(self) -> TransactionPartnerUser {
17154        self.into()
17155    }
17156}
17157impl TransactionPartnerUser {
17158    pub fn noskip(self) -> NoSkipTransactionPartnerUser {
17159        self.into()
17160    }
17161}
17162#[allow(rustdoc::invalid_html_tags)]
17163#[doc = "Describes a transaction with a user."]
17164#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17165pub struct TransactionPartnerUserBuilder {
17166    #[allow(rustdoc::invalid_html_tags)]
17167    #[doc = "Type of the transaction partner, always \"user\""]
17168    #[serde(rename = "type")]
17169    pub tg_type: String,
17170    #[allow(rustdoc::invalid_html_tags)]
17171    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
17172    #[serde(rename = "transaction_type")]
17173    pub transaction_type: String,
17174    #[allow(rustdoc::invalid_html_tags)]
17175    #[doc = "Information about the user"]
17176    #[serde(rename = "user")]
17177    pub user: BoxWrapper<Unbox<User>>,
17178    #[allow(rustdoc::invalid_html_tags)]
17179    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
17180    #[serde(skip_serializing_if = "Option::is_none", rename = "affiliate", default)]
17181    pub affiliate: Option<BoxWrapper<Unbox<AffiliateInfo>>>,
17182    #[allow(rustdoc::invalid_html_tags)]
17183    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
17184    #[serde(
17185        skip_serializing_if = "Option::is_none",
17186        rename = "invoice_payload",
17187        default
17188    )]
17189    pub invoice_payload: Option<String>,
17190    #[allow(rustdoc::invalid_html_tags)]
17191    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
17192    #[serde(
17193        skip_serializing_if = "Option::is_none",
17194        rename = "subscription_period",
17195        default
17196    )]
17197    pub subscription_period: Option<i64>,
17198    #[allow(rustdoc::invalid_html_tags)]
17199    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
17200    #[serde(
17201        skip_serializing_if = "Option::is_none",
17202        rename = "paid_media",
17203        default
17204    )]
17205    pub paid_media: Option<Vec<PaidMedia>>,
17206    #[allow(rustdoc::invalid_html_tags)]
17207    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
17208    #[serde(
17209        skip_serializing_if = "Option::is_none",
17210        rename = "paid_media_payload",
17211        default
17212    )]
17213    pub paid_media_payload: Option<String>,
17214    #[allow(rustdoc::invalid_html_tags)]
17215    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
17216    #[serde(skip_serializing_if = "Option::is_none", rename = "gift", default)]
17217    pub gift: Option<BoxWrapper<Unbox<Gift>>>,
17218    #[allow(rustdoc::invalid_html_tags)]
17219    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
17220    #[serde(
17221        skip_serializing_if = "Option::is_none",
17222        rename = "premium_subscription_duration",
17223        default
17224    )]
17225    pub premium_subscription_duration: Option<i64>,
17226}
17227impl TransactionPartnerUserBuilder {
17228    #[allow(clippy::too_many_arguments)]
17229    pub fn new<A: Into<User>>(transaction_type: String, user: A) -> Self {
17230        Self {
17231            tg_type: "TransactionPartnerUser".to_owned(),
17232            transaction_type,
17233            user: BoxWrapper::new_unbox(user.into()),
17234            affiliate: None,
17235            invoice_payload: None,
17236            subscription_period: None,
17237            paid_media: None,
17238            paid_media_payload: None,
17239            gift: None,
17240            premium_subscription_duration: None,
17241        }
17242    }
17243    #[allow(rustdoc::invalid_html_tags)]
17244    #[doc = "Type of the transaction partner, always \"user\""]
17245    pub fn set_type(mut self, tg_type: String) -> Self {
17246        self.tg_type = tg_type;
17247        self
17248    }
17249    #[allow(rustdoc::invalid_html_tags)]
17250    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
17251    pub fn set_transaction_type(mut self, transaction_type: String) -> Self {
17252        self.transaction_type = transaction_type;
17253        self
17254    }
17255    #[allow(rustdoc::invalid_html_tags)]
17256    #[doc = "Information about the user"]
17257    pub fn set_user(mut self, user: User) -> Self {
17258        self.user = BoxWrapper(Unbox(user));
17259        self
17260    }
17261    #[allow(rustdoc::invalid_html_tags)]
17262    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
17263    pub fn set_affiliate(mut self, affiliate: AffiliateInfo) -> Self {
17264        self.affiliate = Some(BoxWrapper(Unbox(affiliate)));
17265        self
17266    }
17267    #[allow(rustdoc::invalid_html_tags)]
17268    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
17269    pub fn set_invoice_payload(mut self, invoice_payload: String) -> Self {
17270        self.invoice_payload = Some(invoice_payload);
17271        self
17272    }
17273    #[allow(rustdoc::invalid_html_tags)]
17274    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
17275    pub fn set_subscription_period(mut self, subscription_period: i64) -> Self {
17276        self.subscription_period = Some(subscription_period);
17277        self
17278    }
17279    #[allow(rustdoc::invalid_html_tags)]
17280    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
17281    pub fn set_paid_media(mut self, paid_media: Vec<PaidMedia>) -> Self {
17282        self.paid_media = Some(paid_media);
17283        self
17284    }
17285    #[allow(rustdoc::invalid_html_tags)]
17286    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
17287    pub fn set_paid_media_payload(mut self, paid_media_payload: String) -> Self {
17288        self.paid_media_payload = Some(paid_media_payload);
17289        self
17290    }
17291    #[allow(rustdoc::invalid_html_tags)]
17292    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
17293    pub fn set_gift(mut self, gift: Gift) -> Self {
17294        self.gift = Some(BoxWrapper(Unbox(gift)));
17295        self
17296    }
17297    #[allow(rustdoc::invalid_html_tags)]
17298    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
17299    pub fn set_premium_subscription_duration(mut self, premium_subscription_duration: i64) -> Self {
17300        self.premium_subscription_duration = Some(premium_subscription_duration);
17301        self
17302    }
17303    pub fn build(self) -> TransactionPartnerUser {
17304        TransactionPartnerUser {
17305            tg_type: self.tg_type,
17306            transaction_type: self.transaction_type,
17307            user: self.user,
17308            affiliate: self.affiliate,
17309            invoice_payload: self.invoice_payload,
17310            subscription_period: self.subscription_period,
17311            paid_media: self.paid_media,
17312            paid_media_payload: self.paid_media_payload,
17313            gift: self.gift,
17314            premium_subscription_duration: self.premium_subscription_duration,
17315        }
17316    }
17317}
17318#[allow(rustdoc::invalid_html_tags)]
17319#[doc = "Represents a photo to be sent."]
17320#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17321pub struct InputMediaPhoto {
17322    #[allow(rustdoc::invalid_html_tags)]
17323    #[doc = "Type of the result, must be photo"]
17324    #[serde(rename = "type")]
17325    pub tg_type: String,
17326    #[allow(rustdoc::invalid_html_tags)]
17327    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
17328    #[serde(rename = "media")]
17329    pub media: Option<InputFile>,
17330    #[allow(rustdoc::invalid_html_tags)]
17331    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
17332    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
17333    pub caption: Option<String>,
17334    #[allow(rustdoc::invalid_html_tags)]
17335    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
17336    #[serde(
17337        skip_serializing_if = "Option::is_none",
17338        rename = "parse_mode",
17339        default
17340    )]
17341    pub parse_mode: Option<String>,
17342    #[allow(rustdoc::invalid_html_tags)]
17343    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
17344    #[serde(
17345        skip_serializing_if = "Option::is_none",
17346        rename = "caption_entities",
17347        default
17348    )]
17349    pub caption_entities: Option<Vec<MessageEntity>>,
17350    #[allow(rustdoc::invalid_html_tags)]
17351    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
17352    #[serde(
17353        skip_serializing_if = "Option::is_none",
17354        rename = "show_caption_above_media",
17355        default
17356    )]
17357    pub show_caption_above_media: Option<bool>,
17358    #[allow(rustdoc::invalid_html_tags)]
17359    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
17360    #[serde(
17361        skip_serializing_if = "Option::is_none",
17362        rename = "has_spoiler",
17363        default
17364    )]
17365    pub has_spoiler: Option<bool>,
17366}
17367#[allow(rustdoc::invalid_html_tags)]
17368#[doc = "Companion type to InputMediaPhoto that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
17369#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17370pub struct NoSkipInputMediaPhoto {
17371    #[allow(rustdoc::invalid_html_tags)]
17372    #[doc = "Type of the result, must be photo"]
17373    #[serde(rename = "type")]
17374    pub tg_type: String,
17375    #[allow(rustdoc::invalid_html_tags)]
17376    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
17377    #[serde(rename = "media")]
17378    pub media: Option<InputFile>,
17379    pub caption: Option<String>,
17380    pub parse_mode: Option<String>,
17381    pub caption_entities: Option<Vec<MessageEntity>>,
17382    pub show_caption_above_media: Option<bool>,
17383    pub has_spoiler: Option<bool>,
17384}
17385impl From<NoSkipInputMediaPhoto> for InputMediaPhoto {
17386    fn from(t: NoSkipInputMediaPhoto) -> Self {
17387        Self {
17388            tg_type: t.tg_type,
17389            media: t.media,
17390            caption: t.caption,
17391            parse_mode: t.parse_mode,
17392            caption_entities: t.caption_entities,
17393            show_caption_above_media: t.show_caption_above_media,
17394            has_spoiler: t.has_spoiler,
17395        }
17396    }
17397}
17398#[allow(clippy::from_over_into)]
17399impl Into<NoSkipInputMediaPhoto> for InputMediaPhoto {
17400    fn into(self) -> NoSkipInputMediaPhoto {
17401        NoSkipInputMediaPhoto {
17402            tg_type: self.tg_type,
17403            media: self.media,
17404            caption: self.caption,
17405            parse_mode: self.parse_mode,
17406            caption_entities: self.caption_entities,
17407            show_caption_above_media: self.show_caption_above_media,
17408            has_spoiler: self.has_spoiler,
17409        }
17410    }
17411}
17412impl NoSkipInputMediaPhoto {
17413    pub fn skip(self) -> InputMediaPhoto {
17414        self.into()
17415    }
17416}
17417impl InputMediaPhoto {
17418    pub fn noskip(self) -> NoSkipInputMediaPhoto {
17419        self.into()
17420    }
17421}
17422#[allow(rustdoc::invalid_html_tags)]
17423#[doc = "Represents a photo to be sent."]
17424#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17425pub struct InputMediaPhotoBuilder {
17426    #[allow(rustdoc::invalid_html_tags)]
17427    #[doc = "Type of the result, must be photo"]
17428    #[serde(rename = "type")]
17429    pub tg_type: String,
17430    #[allow(rustdoc::invalid_html_tags)]
17431    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
17432    #[serde(rename = "media")]
17433    pub media: Option<InputFile>,
17434    #[allow(rustdoc::invalid_html_tags)]
17435    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
17436    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
17437    pub caption: Option<String>,
17438    #[allow(rustdoc::invalid_html_tags)]
17439    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
17440    #[serde(
17441        skip_serializing_if = "Option::is_none",
17442        rename = "parse_mode",
17443        default
17444    )]
17445    pub parse_mode: Option<String>,
17446    #[allow(rustdoc::invalid_html_tags)]
17447    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
17448    #[serde(
17449        skip_serializing_if = "Option::is_none",
17450        rename = "caption_entities",
17451        default
17452    )]
17453    pub caption_entities: Option<Vec<MessageEntity>>,
17454    #[allow(rustdoc::invalid_html_tags)]
17455    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
17456    #[serde(
17457        skip_serializing_if = "Option::is_none",
17458        rename = "show_caption_above_media",
17459        default
17460    )]
17461    pub show_caption_above_media: Option<bool>,
17462    #[allow(rustdoc::invalid_html_tags)]
17463    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
17464    #[serde(
17465        skip_serializing_if = "Option::is_none",
17466        rename = "has_spoiler",
17467        default
17468    )]
17469    pub has_spoiler: Option<bool>,
17470}
17471impl InputMediaPhotoBuilder {
17472    #[allow(clippy::too_many_arguments)]
17473    pub fn new(media: Option<InputFile>) -> Self {
17474        Self {
17475            tg_type: "photo".to_owned(),
17476            media,
17477            caption: None,
17478            parse_mode: None,
17479            caption_entities: None,
17480            show_caption_above_media: None,
17481            has_spoiler: None,
17482        }
17483    }
17484    #[allow(rustdoc::invalid_html_tags)]
17485    #[doc = "Type of the result, must be photo"]
17486    pub fn set_type(mut self, tg_type: String) -> Self {
17487        self.tg_type = tg_type;
17488        self
17489    }
17490    #[allow(rustdoc::invalid_html_tags)]
17491    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
17492    pub fn set_media(mut self, media: Option<InputFile>) -> Self {
17493        self.media = media;
17494        self
17495    }
17496    #[allow(rustdoc::invalid_html_tags)]
17497    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
17498    pub fn set_caption(mut self, caption: String) -> Self {
17499        self.caption = Some(caption);
17500        self
17501    }
17502    #[allow(rustdoc::invalid_html_tags)]
17503    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
17504    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
17505        self.parse_mode = Some(parse_mode);
17506        self
17507    }
17508    #[allow(rustdoc::invalid_html_tags)]
17509    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
17510    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
17511        self.caption_entities = Some(caption_entities);
17512        self
17513    }
17514    #[allow(rustdoc::invalid_html_tags)]
17515    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
17516    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
17517        self.show_caption_above_media = Some(show_caption_above_media);
17518        self
17519    }
17520    #[allow(rustdoc::invalid_html_tags)]
17521    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
17522    pub fn set_has_spoiler(mut self, has_spoiler: bool) -> Self {
17523        self.has_spoiler = Some(has_spoiler);
17524        self
17525    }
17526    pub fn build(self) -> InputMediaPhoto {
17527        InputMediaPhoto {
17528            tg_type: self.tg_type,
17529            media: self.media,
17530            caption: self.caption,
17531            parse_mode: self.parse_mode,
17532            caption_entities: self.caption_entities,
17533            show_caption_above_media: self.show_caption_above_media,
17534            has_spoiler: self.has_spoiler,
17535        }
17536    }
17537}
17538#[allow(rustdoc::invalid_html_tags)]
17539#[doc = "This object represents a service message about a video chat scheduled in the chat."]
17540#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17541pub struct VideoChatScheduled {
17542    #[allow(rustdoc::invalid_html_tags)]
17543    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
17544    #[serde(rename = "start_date")]
17545    pub start_date: i64,
17546}
17547#[allow(rustdoc::invalid_html_tags)]
17548#[doc = "Companion type to VideoChatScheduled that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
17549#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17550pub struct NoSkipVideoChatScheduled {
17551    #[allow(rustdoc::invalid_html_tags)]
17552    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
17553    #[serde(rename = "start_date")]
17554    pub start_date: i64,
17555}
17556impl From<NoSkipVideoChatScheduled> for VideoChatScheduled {
17557    fn from(t: NoSkipVideoChatScheduled) -> Self {
17558        Self {
17559            start_date: t.start_date,
17560        }
17561    }
17562}
17563#[allow(clippy::from_over_into)]
17564impl Into<NoSkipVideoChatScheduled> for VideoChatScheduled {
17565    fn into(self) -> NoSkipVideoChatScheduled {
17566        NoSkipVideoChatScheduled {
17567            start_date: self.start_date,
17568        }
17569    }
17570}
17571impl NoSkipVideoChatScheduled {
17572    pub fn skip(self) -> VideoChatScheduled {
17573        self.into()
17574    }
17575}
17576impl VideoChatScheduled {
17577    pub fn noskip(self) -> NoSkipVideoChatScheduled {
17578        self.into()
17579    }
17580}
17581#[allow(rustdoc::invalid_html_tags)]
17582#[doc = "This object represents a service message about a video chat scheduled in the chat."]
17583#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17584pub struct VideoChatScheduledBuilder {
17585    #[allow(rustdoc::invalid_html_tags)]
17586    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
17587    #[serde(rename = "start_date")]
17588    pub start_date: i64,
17589}
17590impl VideoChatScheduledBuilder {
17591    #[allow(clippy::too_many_arguments)]
17592    pub fn new(start_date: i64) -> Self {
17593        Self { start_date }
17594    }
17595    #[allow(rustdoc::invalid_html_tags)]
17596    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
17597    pub fn set_start_date(mut self, start_date: i64) -> Self {
17598        self.start_date = start_date;
17599        self
17600    }
17601    pub fn build(self) -> VideoChatScheduled {
17602        VideoChatScheduled {
17603            start_date: self.start_date,
17604        }
17605    }
17606}
17607#[allow(rustdoc::invalid_html_tags)]
17608#[doc = "This object represents a service message about a new forum topic created in the chat."]
17609#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17610pub struct ForumTopicCreated {
17611    #[allow(rustdoc::invalid_html_tags)]
17612    #[doc = "Name of the topic"]
17613    #[serde(rename = "name")]
17614    pub name: String,
17615    #[allow(rustdoc::invalid_html_tags)]
17616    #[doc = "Color of the topic icon in RGB format"]
17617    #[serde(rename = "icon_color")]
17618    pub icon_color: i64,
17619    #[allow(rustdoc::invalid_html_tags)]
17620    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
17621    #[serde(
17622        skip_serializing_if = "Option::is_none",
17623        rename = "icon_custom_emoji_id",
17624        default
17625    )]
17626    pub icon_custom_emoji_id: Option<String>,
17627}
17628#[allow(rustdoc::invalid_html_tags)]
17629#[doc = "Companion type to ForumTopicCreated that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
17630#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17631pub struct NoSkipForumTopicCreated {
17632    #[allow(rustdoc::invalid_html_tags)]
17633    #[doc = "Name of the topic"]
17634    #[serde(rename = "name")]
17635    pub name: String,
17636    #[allow(rustdoc::invalid_html_tags)]
17637    #[doc = "Color of the topic icon in RGB format"]
17638    #[serde(rename = "icon_color")]
17639    pub icon_color: i64,
17640    pub icon_custom_emoji_id: Option<String>,
17641}
17642impl From<NoSkipForumTopicCreated> for ForumTopicCreated {
17643    fn from(t: NoSkipForumTopicCreated) -> Self {
17644        Self {
17645            name: t.name,
17646            icon_color: t.icon_color,
17647            icon_custom_emoji_id: t.icon_custom_emoji_id,
17648        }
17649    }
17650}
17651#[allow(clippy::from_over_into)]
17652impl Into<NoSkipForumTopicCreated> for ForumTopicCreated {
17653    fn into(self) -> NoSkipForumTopicCreated {
17654        NoSkipForumTopicCreated {
17655            name: self.name,
17656            icon_color: self.icon_color,
17657            icon_custom_emoji_id: self.icon_custom_emoji_id,
17658        }
17659    }
17660}
17661impl NoSkipForumTopicCreated {
17662    pub fn skip(self) -> ForumTopicCreated {
17663        self.into()
17664    }
17665}
17666impl ForumTopicCreated {
17667    pub fn noskip(self) -> NoSkipForumTopicCreated {
17668        self.into()
17669    }
17670}
17671#[allow(rustdoc::invalid_html_tags)]
17672#[doc = "This object represents a service message about a new forum topic created in the chat."]
17673#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17674pub struct ForumTopicCreatedBuilder {
17675    #[allow(rustdoc::invalid_html_tags)]
17676    #[doc = "Name of the topic"]
17677    #[serde(rename = "name")]
17678    pub name: String,
17679    #[allow(rustdoc::invalid_html_tags)]
17680    #[doc = "Color of the topic icon in RGB format"]
17681    #[serde(rename = "icon_color")]
17682    pub icon_color: i64,
17683    #[allow(rustdoc::invalid_html_tags)]
17684    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
17685    #[serde(
17686        skip_serializing_if = "Option::is_none",
17687        rename = "icon_custom_emoji_id",
17688        default
17689    )]
17690    pub icon_custom_emoji_id: Option<String>,
17691}
17692impl ForumTopicCreatedBuilder {
17693    #[allow(clippy::too_many_arguments)]
17694    pub fn new(name: String, icon_color: i64) -> Self {
17695        Self {
17696            name,
17697            icon_color,
17698            icon_custom_emoji_id: None,
17699        }
17700    }
17701    #[allow(rustdoc::invalid_html_tags)]
17702    #[doc = "Name of the topic"]
17703    pub fn set_name(mut self, name: String) -> Self {
17704        self.name = name;
17705        self
17706    }
17707    #[allow(rustdoc::invalid_html_tags)]
17708    #[doc = "Color of the topic icon in RGB format"]
17709    pub fn set_icon_color(mut self, icon_color: i64) -> Self {
17710        self.icon_color = icon_color;
17711        self
17712    }
17713    #[allow(rustdoc::invalid_html_tags)]
17714    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
17715    pub fn set_icon_custom_emoji_id(mut self, icon_custom_emoji_id: String) -> Self {
17716        self.icon_custom_emoji_id = Some(icon_custom_emoji_id);
17717        self
17718    }
17719    pub fn build(self) -> ForumTopicCreated {
17720        ForumTopicCreated {
17721            name: self.name,
17722            icon_color: self.icon_color,
17723            icon_custom_emoji_id: self.icon_custom_emoji_id,
17724        }
17725    }
17726}
17727#[allow(rustdoc::invalid_html_tags)]
17728#[doc = "This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button."]
17729#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17730pub struct InlineKeyboardButton {
17731    #[allow(rustdoc::invalid_html_tags)]
17732    #[doc = "Label text on the button"]
17733    #[serde(rename = "text")]
17734    pub text: String,
17735    #[allow(rustdoc::invalid_html_tags)]
17736    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
17737    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
17738    pub url: Option<String>,
17739    #[allow(rustdoc::invalid_html_tags)]
17740    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
17741    #[serde(
17742        skip_serializing_if = "Option::is_none",
17743        rename = "callback_data",
17744        default
17745    )]
17746    pub callback_data: Option<String>,
17747    #[allow(rustdoc::invalid_html_tags)]
17748    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
17749    #[serde(skip_serializing_if = "Option::is_none", rename = "web_app", default)]
17750    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
17751    #[allow(rustdoc::invalid_html_tags)]
17752    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
17753    #[serde(skip_serializing_if = "Option::is_none", rename = "login_url", default)]
17754    pub login_url: Option<BoxWrapper<Unbox<LoginUrl>>>,
17755    #[allow(rustdoc::invalid_html_tags)]
17756    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17757    #[serde(
17758        skip_serializing_if = "Option::is_none",
17759        rename = "switch_inline_query",
17760        default
17761    )]
17762    pub switch_inline_query: Option<String>,
17763    #[allow(rustdoc::invalid_html_tags)]
17764    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17765    #[serde(
17766        skip_serializing_if = "Option::is_none",
17767        rename = "switch_inline_query_current_chat",
17768        default
17769    )]
17770    pub switch_inline_query_current_chat: Option<String>,
17771    #[allow(rustdoc::invalid_html_tags)]
17772    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17773    #[serde(
17774        skip_serializing_if = "Option::is_none",
17775        rename = "switch_inline_query_chosen_chat",
17776        default
17777    )]
17778    pub switch_inline_query_chosen_chat: Option<BoxWrapper<Unbox<SwitchInlineQueryChosenChat>>>,
17779    #[allow(rustdoc::invalid_html_tags)]
17780    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
17781    #[serde(skip_serializing_if = "Option::is_none", rename = "copy_text", default)]
17782    pub copy_text: Option<BoxWrapper<Unbox<CopyTextButton>>>,
17783    #[allow(rustdoc::invalid_html_tags)]
17784    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
17785    #[serde(
17786        skip_serializing_if = "Option::is_none",
17787        rename = "callback_game",
17788        default
17789    )]
17790    pub callback_game: Option<BoxWrapper<Unbox<CallbackGame>>>,
17791    #[allow(rustdoc::invalid_html_tags)]
17792    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
17793    #[serde(skip_serializing_if = "Option::is_none", rename = "pay", default)]
17794    pub pay: Option<bool>,
17795}
17796#[allow(rustdoc::invalid_html_tags)]
17797#[doc = "Companion type to InlineKeyboardButton that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
17798#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17799pub struct NoSkipInlineKeyboardButton {
17800    #[allow(rustdoc::invalid_html_tags)]
17801    #[doc = "Label text on the button"]
17802    #[serde(rename = "text")]
17803    pub text: String,
17804    pub url: Option<String>,
17805    pub callback_data: Option<String>,
17806    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
17807    pub login_url: Option<BoxWrapper<Unbox<LoginUrl>>>,
17808    pub switch_inline_query: Option<String>,
17809    pub switch_inline_query_current_chat: Option<String>,
17810    pub switch_inline_query_chosen_chat: Option<BoxWrapper<Unbox<SwitchInlineQueryChosenChat>>>,
17811    pub copy_text: Option<BoxWrapper<Unbox<CopyTextButton>>>,
17812    pub callback_game: Option<BoxWrapper<Unbox<CallbackGame>>>,
17813    pub pay: Option<bool>,
17814}
17815impl From<NoSkipInlineKeyboardButton> for InlineKeyboardButton {
17816    fn from(t: NoSkipInlineKeyboardButton) -> Self {
17817        Self {
17818            text: t.text,
17819            url: t.url,
17820            callback_data: t.callback_data,
17821            web_app: t.web_app,
17822            login_url: t.login_url,
17823            switch_inline_query: t.switch_inline_query,
17824            switch_inline_query_current_chat: t.switch_inline_query_current_chat,
17825            switch_inline_query_chosen_chat: t.switch_inline_query_chosen_chat,
17826            copy_text: t.copy_text,
17827            callback_game: t.callback_game,
17828            pay: t.pay,
17829        }
17830    }
17831}
17832#[allow(clippy::from_over_into)]
17833impl Into<NoSkipInlineKeyboardButton> for InlineKeyboardButton {
17834    fn into(self) -> NoSkipInlineKeyboardButton {
17835        NoSkipInlineKeyboardButton {
17836            text: self.text,
17837            url: self.url,
17838            callback_data: self.callback_data,
17839            web_app: self.web_app,
17840            login_url: self.login_url,
17841            switch_inline_query: self.switch_inline_query,
17842            switch_inline_query_current_chat: self.switch_inline_query_current_chat,
17843            switch_inline_query_chosen_chat: self.switch_inline_query_chosen_chat,
17844            copy_text: self.copy_text,
17845            callback_game: self.callback_game,
17846            pay: self.pay,
17847        }
17848    }
17849}
17850impl NoSkipInlineKeyboardButton {
17851    pub fn skip(self) -> InlineKeyboardButton {
17852        self.into()
17853    }
17854}
17855impl InlineKeyboardButton {
17856    pub fn noskip(self) -> NoSkipInlineKeyboardButton {
17857        self.into()
17858    }
17859}
17860#[allow(rustdoc::invalid_html_tags)]
17861#[doc = "This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button."]
17862#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17863pub struct InlineKeyboardButtonBuilder {
17864    #[allow(rustdoc::invalid_html_tags)]
17865    #[doc = "Label text on the button"]
17866    #[serde(rename = "text")]
17867    pub text: String,
17868    #[allow(rustdoc::invalid_html_tags)]
17869    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
17870    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
17871    pub url: Option<String>,
17872    #[allow(rustdoc::invalid_html_tags)]
17873    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
17874    #[serde(
17875        skip_serializing_if = "Option::is_none",
17876        rename = "callback_data",
17877        default
17878    )]
17879    pub callback_data: Option<String>,
17880    #[allow(rustdoc::invalid_html_tags)]
17881    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
17882    #[serde(skip_serializing_if = "Option::is_none", rename = "web_app", default)]
17883    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
17884    #[allow(rustdoc::invalid_html_tags)]
17885    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
17886    #[serde(skip_serializing_if = "Option::is_none", rename = "login_url", default)]
17887    pub login_url: Option<BoxWrapper<Unbox<LoginUrl>>>,
17888    #[allow(rustdoc::invalid_html_tags)]
17889    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17890    #[serde(
17891        skip_serializing_if = "Option::is_none",
17892        rename = "switch_inline_query",
17893        default
17894    )]
17895    pub switch_inline_query: Option<String>,
17896    #[allow(rustdoc::invalid_html_tags)]
17897    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17898    #[serde(
17899        skip_serializing_if = "Option::is_none",
17900        rename = "switch_inline_query_current_chat",
17901        default
17902    )]
17903    pub switch_inline_query_current_chat: Option<String>,
17904    #[allow(rustdoc::invalid_html_tags)]
17905    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17906    #[serde(
17907        skip_serializing_if = "Option::is_none",
17908        rename = "switch_inline_query_chosen_chat",
17909        default
17910    )]
17911    pub switch_inline_query_chosen_chat: Option<BoxWrapper<Unbox<SwitchInlineQueryChosenChat>>>,
17912    #[allow(rustdoc::invalid_html_tags)]
17913    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
17914    #[serde(skip_serializing_if = "Option::is_none", rename = "copy_text", default)]
17915    pub copy_text: Option<BoxWrapper<Unbox<CopyTextButton>>>,
17916    #[allow(rustdoc::invalid_html_tags)]
17917    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
17918    #[serde(
17919        skip_serializing_if = "Option::is_none",
17920        rename = "callback_game",
17921        default
17922    )]
17923    pub callback_game: Option<BoxWrapper<Unbox<CallbackGame>>>,
17924    #[allow(rustdoc::invalid_html_tags)]
17925    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
17926    #[serde(skip_serializing_if = "Option::is_none", rename = "pay", default)]
17927    pub pay: Option<bool>,
17928}
17929impl InlineKeyboardButtonBuilder {
17930    #[allow(clippy::too_many_arguments)]
17931    pub fn new(text: String) -> Self {
17932        Self {
17933            text,
17934            url: None,
17935            callback_data: None,
17936            web_app: None,
17937            login_url: None,
17938            switch_inline_query: None,
17939            switch_inline_query_current_chat: None,
17940            switch_inline_query_chosen_chat: None,
17941            copy_text: None,
17942            callback_game: None,
17943            pay: None,
17944        }
17945    }
17946    #[allow(rustdoc::invalid_html_tags)]
17947    #[doc = "Label text on the button"]
17948    pub fn set_text(mut self, text: String) -> Self {
17949        self.text = text;
17950        self
17951    }
17952    #[allow(rustdoc::invalid_html_tags)]
17953    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
17954    pub fn set_url(mut self, url: String) -> Self {
17955        self.url = Some(url);
17956        self
17957    }
17958    #[allow(rustdoc::invalid_html_tags)]
17959    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
17960    pub fn set_callback_data(mut self, callback_data: String) -> Self {
17961        self.callback_data = Some(callback_data);
17962        self
17963    }
17964    #[allow(rustdoc::invalid_html_tags)]
17965    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
17966    pub fn set_web_app(mut self, web_app: WebAppInfo) -> Self {
17967        self.web_app = Some(BoxWrapper(Unbox(web_app)));
17968        self
17969    }
17970    #[allow(rustdoc::invalid_html_tags)]
17971    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
17972    pub fn set_login_url(mut self, login_url: LoginUrl) -> Self {
17973        self.login_url = Some(BoxWrapper(Unbox(login_url)));
17974        self
17975    }
17976    #[allow(rustdoc::invalid_html_tags)]
17977    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17978    pub fn set_switch_inline_query(mut self, switch_inline_query: String) -> Self {
17979        self.switch_inline_query = Some(switch_inline_query);
17980        self
17981    }
17982    #[allow(rustdoc::invalid_html_tags)]
17983    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17984    pub fn set_switch_inline_query_current_chat(
17985        mut self,
17986        switch_inline_query_current_chat: String,
17987    ) -> Self {
17988        self.switch_inline_query_current_chat = Some(switch_inline_query_current_chat);
17989        self
17990    }
17991    #[allow(rustdoc::invalid_html_tags)]
17992    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
17993    pub fn set_switch_inline_query_chosen_chat(
17994        mut self,
17995        switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat,
17996    ) -> Self {
17997        self.switch_inline_query_chosen_chat =
17998            Some(BoxWrapper(Unbox(switch_inline_query_chosen_chat)));
17999        self
18000    }
18001    #[allow(rustdoc::invalid_html_tags)]
18002    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
18003    pub fn set_copy_text(mut self, copy_text: CopyTextButton) -> Self {
18004        self.copy_text = Some(BoxWrapper(Unbox(copy_text)));
18005        self
18006    }
18007    #[allow(rustdoc::invalid_html_tags)]
18008    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
18009    pub fn set_callback_game(mut self, callback_game: CallbackGame) -> Self {
18010        self.callback_game = Some(BoxWrapper(Unbox(callback_game)));
18011        self
18012    }
18013    #[allow(rustdoc::invalid_html_tags)]
18014    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
18015    pub fn set_pay(mut self, pay: bool) -> Self {
18016        self.pay = Some(pay);
18017        self
18018    }
18019    pub fn build(self) -> InlineKeyboardButton {
18020        InlineKeyboardButton {
18021            text: self.text,
18022            url: self.url,
18023            callback_data: self.callback_data,
18024            web_app: self.web_app,
18025            login_url: self.login_url,
18026            switch_inline_query: self.switch_inline_query,
18027            switch_inline_query_current_chat: self.switch_inline_query_current_chat,
18028            switch_inline_query_chosen_chat: self.switch_inline_query_chosen_chat,
18029            copy_text: self.copy_text,
18030            callback_game: self.callback_game,
18031            pay: self.pay,
18032        }
18033    }
18034}
18035#[allow(rustdoc::invalid_html_tags)]
18036#[doc = "The paid media is a video."]
18037#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18038pub struct PaidMediaVideo {
18039    #[allow(rustdoc::invalid_html_tags)]
18040    #[doc = "Type of the paid media, always \"video\""]
18041    #[serde(rename = "type")]
18042    pub tg_type: String,
18043    #[allow(rustdoc::invalid_html_tags)]
18044    #[doc = "The video"]
18045    #[serde(rename = "video")]
18046    pub video: BoxWrapper<Unbox<Video>>,
18047}
18048#[allow(rustdoc::invalid_html_tags)]
18049#[doc = "Companion type to PaidMediaVideo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
18050#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18051pub struct NoSkipPaidMediaVideo {
18052    #[allow(rustdoc::invalid_html_tags)]
18053    #[doc = "Type of the paid media, always \"video\""]
18054    #[serde(rename = "type")]
18055    pub tg_type: String,
18056    #[allow(rustdoc::invalid_html_tags)]
18057    #[doc = "The video"]
18058    #[serde(rename = "video")]
18059    pub video: BoxWrapper<Unbox<Video>>,
18060}
18061impl From<NoSkipPaidMediaVideo> for PaidMediaVideo {
18062    fn from(t: NoSkipPaidMediaVideo) -> Self {
18063        Self {
18064            tg_type: t.tg_type,
18065            video: t.video,
18066        }
18067    }
18068}
18069#[allow(clippy::from_over_into)]
18070impl Into<NoSkipPaidMediaVideo> for PaidMediaVideo {
18071    fn into(self) -> NoSkipPaidMediaVideo {
18072        NoSkipPaidMediaVideo {
18073            tg_type: self.tg_type,
18074            video: self.video,
18075        }
18076    }
18077}
18078impl NoSkipPaidMediaVideo {
18079    pub fn skip(self) -> PaidMediaVideo {
18080        self.into()
18081    }
18082}
18083impl PaidMediaVideo {
18084    pub fn noskip(self) -> NoSkipPaidMediaVideo {
18085        self.into()
18086    }
18087}
18088#[allow(rustdoc::invalid_html_tags)]
18089#[doc = "The paid media is a video."]
18090#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18091pub struct PaidMediaVideoBuilder {
18092    #[allow(rustdoc::invalid_html_tags)]
18093    #[doc = "Type of the paid media, always \"video\""]
18094    #[serde(rename = "type")]
18095    pub tg_type: String,
18096    #[allow(rustdoc::invalid_html_tags)]
18097    #[doc = "The video"]
18098    #[serde(rename = "video")]
18099    pub video: BoxWrapper<Unbox<Video>>,
18100}
18101impl PaidMediaVideoBuilder {
18102    #[allow(clippy::too_many_arguments)]
18103    pub fn new<A: Into<Video>>(video: A) -> Self {
18104        Self {
18105            tg_type: "PaidMediaVideo".to_owned(),
18106            video: BoxWrapper::new_unbox(video.into()),
18107        }
18108    }
18109    #[allow(rustdoc::invalid_html_tags)]
18110    #[doc = "Type of the paid media, always \"video\""]
18111    pub fn set_type(mut self, tg_type: String) -> Self {
18112        self.tg_type = tg_type;
18113        self
18114    }
18115    #[allow(rustdoc::invalid_html_tags)]
18116    #[doc = "The video"]
18117    pub fn set_video(mut self, video: Video) -> Self {
18118        self.video = BoxWrapper(Unbox(video));
18119        self
18120    }
18121    pub fn build(self) -> PaidMediaVideo {
18122        PaidMediaVideo {
18123            tg_type: self.tg_type,
18124            video: self.video,
18125        }
18126    }
18127}
18128#[allow(rustdoc::invalid_html_tags)]
18129#[doc = "Represents a join request sent to a chat."]
18130#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18131pub struct ChatJoinRequest {
18132    #[allow(rustdoc::invalid_html_tags)]
18133    #[doc = "Chat to which the request was sent"]
18134    #[serde(rename = "chat")]
18135    pub chat: BoxWrapper<Unbox<Chat>>,
18136    #[allow(rustdoc::invalid_html_tags)]
18137    #[doc = "User that sent the join request"]
18138    #[serde(rename = "from")]
18139    pub from: BoxWrapper<Unbox<User>>,
18140    #[allow(rustdoc::invalid_html_tags)]
18141    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
18142    #[serde(rename = "user_chat_id")]
18143    pub user_chat_id: i64,
18144    #[allow(rustdoc::invalid_html_tags)]
18145    #[doc = "Date the request was sent in Unix time"]
18146    #[serde(rename = "date")]
18147    pub date: i64,
18148    #[allow(rustdoc::invalid_html_tags)]
18149    #[doc = "Optional. Bio of the user."]
18150    #[serde(skip_serializing_if = "Option::is_none", rename = "bio", default)]
18151    pub bio: Option<String>,
18152    #[allow(rustdoc::invalid_html_tags)]
18153    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
18154    #[serde(
18155        skip_serializing_if = "Option::is_none",
18156        rename = "invite_link",
18157        default
18158    )]
18159    pub invite_link: Option<BoxWrapper<Unbox<ChatInviteLink>>>,
18160}
18161#[allow(rustdoc::invalid_html_tags)]
18162#[doc = "Companion type to ChatJoinRequest that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
18163#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18164pub struct NoSkipChatJoinRequest {
18165    #[allow(rustdoc::invalid_html_tags)]
18166    #[doc = "Chat to which the request was sent"]
18167    #[serde(rename = "chat")]
18168    pub chat: BoxWrapper<Unbox<Chat>>,
18169    #[allow(rustdoc::invalid_html_tags)]
18170    #[doc = "User that sent the join request"]
18171    #[serde(rename = "from")]
18172    pub from: BoxWrapper<Unbox<User>>,
18173    #[allow(rustdoc::invalid_html_tags)]
18174    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
18175    #[serde(rename = "user_chat_id")]
18176    pub user_chat_id: i64,
18177    #[allow(rustdoc::invalid_html_tags)]
18178    #[doc = "Date the request was sent in Unix time"]
18179    #[serde(rename = "date")]
18180    pub date: i64,
18181    pub bio: Option<String>,
18182    pub invite_link: Option<BoxWrapper<Unbox<ChatInviteLink>>>,
18183}
18184impl From<NoSkipChatJoinRequest> for ChatJoinRequest {
18185    fn from(t: NoSkipChatJoinRequest) -> Self {
18186        Self {
18187            chat: t.chat,
18188            from: t.from,
18189            user_chat_id: t.user_chat_id,
18190            date: t.date,
18191            bio: t.bio,
18192            invite_link: t.invite_link,
18193        }
18194    }
18195}
18196#[allow(clippy::from_over_into)]
18197impl Into<NoSkipChatJoinRequest> for ChatJoinRequest {
18198    fn into(self) -> NoSkipChatJoinRequest {
18199        NoSkipChatJoinRequest {
18200            chat: self.chat,
18201            from: self.from,
18202            user_chat_id: self.user_chat_id,
18203            date: self.date,
18204            bio: self.bio,
18205            invite_link: self.invite_link,
18206        }
18207    }
18208}
18209impl NoSkipChatJoinRequest {
18210    pub fn skip(self) -> ChatJoinRequest {
18211        self.into()
18212    }
18213}
18214impl ChatJoinRequest {
18215    pub fn noskip(self) -> NoSkipChatJoinRequest {
18216        self.into()
18217    }
18218}
18219#[allow(rustdoc::invalid_html_tags)]
18220#[doc = "Represents a join request sent to a chat."]
18221#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18222pub struct ChatJoinRequestBuilder {
18223    #[allow(rustdoc::invalid_html_tags)]
18224    #[doc = "Chat to which the request was sent"]
18225    #[serde(rename = "chat")]
18226    pub chat: BoxWrapper<Unbox<Chat>>,
18227    #[allow(rustdoc::invalid_html_tags)]
18228    #[doc = "User that sent the join request"]
18229    #[serde(rename = "from")]
18230    pub from: BoxWrapper<Unbox<User>>,
18231    #[allow(rustdoc::invalid_html_tags)]
18232    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
18233    #[serde(rename = "user_chat_id")]
18234    pub user_chat_id: i64,
18235    #[allow(rustdoc::invalid_html_tags)]
18236    #[doc = "Date the request was sent in Unix time"]
18237    #[serde(rename = "date")]
18238    pub date: i64,
18239    #[allow(rustdoc::invalid_html_tags)]
18240    #[doc = "Optional. Bio of the user."]
18241    #[serde(skip_serializing_if = "Option::is_none", rename = "bio", default)]
18242    pub bio: Option<String>,
18243    #[allow(rustdoc::invalid_html_tags)]
18244    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
18245    #[serde(
18246        skip_serializing_if = "Option::is_none",
18247        rename = "invite_link",
18248        default
18249    )]
18250    pub invite_link: Option<BoxWrapper<Unbox<ChatInviteLink>>>,
18251}
18252impl ChatJoinRequestBuilder {
18253    #[allow(clippy::too_many_arguments)]
18254    pub fn new<A: Into<Chat>, B: Into<User>>(
18255        chat: A,
18256        from: B,
18257        user_chat_id: i64,
18258        date: i64,
18259    ) -> Self {
18260        Self {
18261            chat: BoxWrapper::new_unbox(chat.into()),
18262            from: BoxWrapper::new_unbox(from.into()),
18263            user_chat_id,
18264            date,
18265            bio: None,
18266            invite_link: None,
18267        }
18268    }
18269    #[allow(rustdoc::invalid_html_tags)]
18270    #[doc = "Chat to which the request was sent"]
18271    pub fn set_chat(mut self, chat: Chat) -> Self {
18272        self.chat = BoxWrapper(Unbox(chat));
18273        self
18274    }
18275    #[allow(rustdoc::invalid_html_tags)]
18276    #[doc = "User that sent the join request"]
18277    pub fn set_from(mut self, from: User) -> Self {
18278        self.from = BoxWrapper(Unbox(from));
18279        self
18280    }
18281    #[allow(rustdoc::invalid_html_tags)]
18282    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
18283    pub fn set_user_chat_id(mut self, user_chat_id: i64) -> Self {
18284        self.user_chat_id = user_chat_id;
18285        self
18286    }
18287    #[allow(rustdoc::invalid_html_tags)]
18288    #[doc = "Date the request was sent in Unix time"]
18289    pub fn set_date(mut self, date: i64) -> Self {
18290        self.date = date;
18291        self
18292    }
18293    #[allow(rustdoc::invalid_html_tags)]
18294    #[doc = "Optional. Bio of the user."]
18295    pub fn set_bio(mut self, bio: String) -> Self {
18296        self.bio = Some(bio);
18297        self
18298    }
18299    #[allow(rustdoc::invalid_html_tags)]
18300    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
18301    pub fn set_invite_link(mut self, invite_link: ChatInviteLink) -> Self {
18302        self.invite_link = Some(BoxWrapper(Unbox(invite_link)));
18303        self
18304    }
18305    pub fn build(self) -> ChatJoinRequest {
18306        ChatJoinRequest {
18307            chat: self.chat,
18308            from: self.from,
18309            user_chat_id: self.user_chat_id,
18310            date: self.date,
18311            bio: self.bio,
18312            invite_link: self.invite_link,
18313        }
18314    }
18315}
18316#[allow(rustdoc::invalid_html_tags)]
18317#[doc = "Describes the position of a clickable area within a story."]
18318#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18319pub struct StoryAreaPosition {
18320    #[allow(rustdoc::invalid_html_tags)]
18321    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
18322    #[serde(rename = "x_percentage")]
18323    pub x_percentage: ::ordered_float::OrderedFloat<f64>,
18324    #[allow(rustdoc::invalid_html_tags)]
18325    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
18326    #[serde(rename = "y_percentage")]
18327    pub y_percentage: ::ordered_float::OrderedFloat<f64>,
18328    #[allow(rustdoc::invalid_html_tags)]
18329    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
18330    #[serde(rename = "width_percentage")]
18331    pub width_percentage: ::ordered_float::OrderedFloat<f64>,
18332    #[allow(rustdoc::invalid_html_tags)]
18333    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
18334    #[serde(rename = "height_percentage")]
18335    pub height_percentage: ::ordered_float::OrderedFloat<f64>,
18336    #[allow(rustdoc::invalid_html_tags)]
18337    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
18338    #[serde(rename = "rotation_angle")]
18339    pub rotation_angle: ::ordered_float::OrderedFloat<f64>,
18340    #[allow(rustdoc::invalid_html_tags)]
18341    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
18342    #[serde(rename = "corner_radius_percentage")]
18343    pub corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
18344}
18345#[allow(rustdoc::invalid_html_tags)]
18346#[doc = "Companion type to StoryAreaPosition that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
18347#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18348pub struct NoSkipStoryAreaPosition {
18349    #[allow(rustdoc::invalid_html_tags)]
18350    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
18351    #[serde(rename = "x_percentage")]
18352    pub x_percentage: ::ordered_float::OrderedFloat<f64>,
18353    #[allow(rustdoc::invalid_html_tags)]
18354    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
18355    #[serde(rename = "y_percentage")]
18356    pub y_percentage: ::ordered_float::OrderedFloat<f64>,
18357    #[allow(rustdoc::invalid_html_tags)]
18358    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
18359    #[serde(rename = "width_percentage")]
18360    pub width_percentage: ::ordered_float::OrderedFloat<f64>,
18361    #[allow(rustdoc::invalid_html_tags)]
18362    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
18363    #[serde(rename = "height_percentage")]
18364    pub height_percentage: ::ordered_float::OrderedFloat<f64>,
18365    #[allow(rustdoc::invalid_html_tags)]
18366    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
18367    #[serde(rename = "rotation_angle")]
18368    pub rotation_angle: ::ordered_float::OrderedFloat<f64>,
18369    #[allow(rustdoc::invalid_html_tags)]
18370    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
18371    #[serde(rename = "corner_radius_percentage")]
18372    pub corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
18373}
18374impl From<NoSkipStoryAreaPosition> for StoryAreaPosition {
18375    fn from(t: NoSkipStoryAreaPosition) -> Self {
18376        Self {
18377            x_percentage: t.x_percentage,
18378            y_percentage: t.y_percentage,
18379            width_percentage: t.width_percentage,
18380            height_percentage: t.height_percentage,
18381            rotation_angle: t.rotation_angle,
18382            corner_radius_percentage: t.corner_radius_percentage,
18383        }
18384    }
18385}
18386#[allow(clippy::from_over_into)]
18387impl Into<NoSkipStoryAreaPosition> for StoryAreaPosition {
18388    fn into(self) -> NoSkipStoryAreaPosition {
18389        NoSkipStoryAreaPosition {
18390            x_percentage: self.x_percentage,
18391            y_percentage: self.y_percentage,
18392            width_percentage: self.width_percentage,
18393            height_percentage: self.height_percentage,
18394            rotation_angle: self.rotation_angle,
18395            corner_radius_percentage: self.corner_radius_percentage,
18396        }
18397    }
18398}
18399impl NoSkipStoryAreaPosition {
18400    pub fn skip(self) -> StoryAreaPosition {
18401        self.into()
18402    }
18403}
18404impl StoryAreaPosition {
18405    pub fn noskip(self) -> NoSkipStoryAreaPosition {
18406        self.into()
18407    }
18408}
18409#[allow(rustdoc::invalid_html_tags)]
18410#[doc = "Describes the position of a clickable area within a story."]
18411#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18412pub struct StoryAreaPositionBuilder {
18413    #[allow(rustdoc::invalid_html_tags)]
18414    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
18415    #[serde(rename = "x_percentage")]
18416    pub x_percentage: ::ordered_float::OrderedFloat<f64>,
18417    #[allow(rustdoc::invalid_html_tags)]
18418    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
18419    #[serde(rename = "y_percentage")]
18420    pub y_percentage: ::ordered_float::OrderedFloat<f64>,
18421    #[allow(rustdoc::invalid_html_tags)]
18422    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
18423    #[serde(rename = "width_percentage")]
18424    pub width_percentage: ::ordered_float::OrderedFloat<f64>,
18425    #[allow(rustdoc::invalid_html_tags)]
18426    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
18427    #[serde(rename = "height_percentage")]
18428    pub height_percentage: ::ordered_float::OrderedFloat<f64>,
18429    #[allow(rustdoc::invalid_html_tags)]
18430    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
18431    #[serde(rename = "rotation_angle")]
18432    pub rotation_angle: ::ordered_float::OrderedFloat<f64>,
18433    #[allow(rustdoc::invalid_html_tags)]
18434    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
18435    #[serde(rename = "corner_radius_percentage")]
18436    pub corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
18437}
18438impl StoryAreaPositionBuilder {
18439    #[allow(clippy::too_many_arguments)]
18440    pub fn new(
18441        x_percentage: ::ordered_float::OrderedFloat<f64>,
18442        y_percentage: ::ordered_float::OrderedFloat<f64>,
18443        width_percentage: ::ordered_float::OrderedFloat<f64>,
18444        height_percentage: ::ordered_float::OrderedFloat<f64>,
18445        rotation_angle: ::ordered_float::OrderedFloat<f64>,
18446        corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
18447    ) -> Self {
18448        Self {
18449            x_percentage,
18450            y_percentage,
18451            width_percentage,
18452            height_percentage,
18453            rotation_angle,
18454            corner_radius_percentage,
18455        }
18456    }
18457    #[allow(rustdoc::invalid_html_tags)]
18458    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
18459    pub fn set_x_percentage(mut self, x_percentage: ::ordered_float::OrderedFloat<f64>) -> Self {
18460        self.x_percentage = x_percentage;
18461        self
18462    }
18463    #[allow(rustdoc::invalid_html_tags)]
18464    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
18465    pub fn set_y_percentage(mut self, y_percentage: ::ordered_float::OrderedFloat<f64>) -> Self {
18466        self.y_percentage = y_percentage;
18467        self
18468    }
18469    #[allow(rustdoc::invalid_html_tags)]
18470    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
18471    pub fn set_width_percentage(
18472        mut self,
18473        width_percentage: ::ordered_float::OrderedFloat<f64>,
18474    ) -> Self {
18475        self.width_percentage = width_percentage;
18476        self
18477    }
18478    #[allow(rustdoc::invalid_html_tags)]
18479    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
18480    pub fn set_height_percentage(
18481        mut self,
18482        height_percentage: ::ordered_float::OrderedFloat<f64>,
18483    ) -> Self {
18484        self.height_percentage = height_percentage;
18485        self
18486    }
18487    #[allow(rustdoc::invalid_html_tags)]
18488    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
18489    pub fn set_rotation_angle(
18490        mut self,
18491        rotation_angle: ::ordered_float::OrderedFloat<f64>,
18492    ) -> Self {
18493        self.rotation_angle = rotation_angle;
18494        self
18495    }
18496    #[allow(rustdoc::invalid_html_tags)]
18497    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
18498    pub fn set_corner_radius_percentage(
18499        mut self,
18500        corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
18501    ) -> Self {
18502        self.corner_radius_percentage = corner_radius_percentage;
18503        self
18504    }
18505    pub fn build(self) -> StoryAreaPosition {
18506        StoryAreaPosition {
18507            x_percentage: self.x_percentage,
18508            y_percentage: self.y_percentage,
18509            width_percentage: self.width_percentage,
18510            height_percentage: self.height_percentage,
18511            rotation_angle: self.rotation_angle,
18512            corner_radius_percentage: self.corner_radius_percentage,
18513        }
18514    }
18515}
18516#[allow(rustdoc::invalid_html_tags)]
18517#[doc = "This object represents a bot command."]
18518#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18519pub struct BotCommand {
18520    #[allow(rustdoc::invalid_html_tags)]
18521    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
18522    #[serde(rename = "command")]
18523    pub command: String,
18524    #[allow(rustdoc::invalid_html_tags)]
18525    #[doc = "Description of the command; 1-256 characters."]
18526    #[serde(rename = "description")]
18527    pub description: String,
18528}
18529#[allow(rustdoc::invalid_html_tags)]
18530#[doc = "Companion type to BotCommand that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
18531#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18532pub struct NoSkipBotCommand {
18533    #[allow(rustdoc::invalid_html_tags)]
18534    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
18535    #[serde(rename = "command")]
18536    pub command: String,
18537    #[allow(rustdoc::invalid_html_tags)]
18538    #[doc = "Description of the command; 1-256 characters."]
18539    #[serde(rename = "description")]
18540    pub description: String,
18541}
18542impl From<NoSkipBotCommand> for BotCommand {
18543    fn from(t: NoSkipBotCommand) -> Self {
18544        Self {
18545            command: t.command,
18546            description: t.description,
18547        }
18548    }
18549}
18550#[allow(clippy::from_over_into)]
18551impl Into<NoSkipBotCommand> for BotCommand {
18552    fn into(self) -> NoSkipBotCommand {
18553        NoSkipBotCommand {
18554            command: self.command,
18555            description: self.description,
18556        }
18557    }
18558}
18559impl NoSkipBotCommand {
18560    pub fn skip(self) -> BotCommand {
18561        self.into()
18562    }
18563}
18564impl BotCommand {
18565    pub fn noskip(self) -> NoSkipBotCommand {
18566        self.into()
18567    }
18568}
18569#[allow(rustdoc::invalid_html_tags)]
18570#[doc = "This object represents a bot command."]
18571#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18572pub struct BotCommandBuilder {
18573    #[allow(rustdoc::invalid_html_tags)]
18574    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
18575    #[serde(rename = "command")]
18576    pub command: String,
18577    #[allow(rustdoc::invalid_html_tags)]
18578    #[doc = "Description of the command; 1-256 characters."]
18579    #[serde(rename = "description")]
18580    pub description: String,
18581}
18582impl BotCommandBuilder {
18583    #[allow(clippy::too_many_arguments)]
18584    pub fn new(command: String, description: String) -> Self {
18585        Self {
18586            command,
18587            description,
18588        }
18589    }
18590    #[allow(rustdoc::invalid_html_tags)]
18591    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
18592    pub fn set_command(mut self, command: String) -> Self {
18593        self.command = command;
18594        self
18595    }
18596    #[allow(rustdoc::invalid_html_tags)]
18597    #[doc = "Description of the command; 1-256 characters."]
18598    pub fn set_description(mut self, description: String) -> Self {
18599        self.description = description;
18600        self
18601    }
18602    pub fn build(self) -> BotCommand {
18603        BotCommand {
18604            command: self.command,
18605            description: self.description,
18606        }
18607    }
18608}
18609#[allow(rustdoc::invalid_html_tags)]
18610#[doc = "Describes a service message about a successful payment for a suggested post."]
18611#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18612pub struct SuggestedPostPaid {
18613    #[allow(rustdoc::invalid_html_tags)]
18614    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
18615    #[serde(
18616        skip_serializing_if = "Option::is_none",
18617        rename = "suggested_post_message",
18618        default
18619    )]
18620    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
18621    #[allow(rustdoc::invalid_html_tags)]
18622    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
18623    #[serde(rename = "currency")]
18624    pub currency: String,
18625    #[allow(rustdoc::invalid_html_tags)]
18626    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
18627    #[serde(skip_serializing_if = "Option::is_none", rename = "amount", default)]
18628    pub amount: Option<i64>,
18629    #[allow(rustdoc::invalid_html_tags)]
18630    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
18631    #[serde(
18632        skip_serializing_if = "Option::is_none",
18633        rename = "star_amount",
18634        default
18635    )]
18636    pub star_amount: Option<BoxWrapper<Unbox<StarAmount>>>,
18637}
18638#[allow(rustdoc::invalid_html_tags)]
18639#[doc = "Companion type to SuggestedPostPaid that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
18640#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18641pub struct NoSkipSuggestedPostPaid {
18642    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
18643    #[allow(rustdoc::invalid_html_tags)]
18644    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
18645    #[serde(rename = "currency")]
18646    pub currency: String,
18647    pub amount: Option<i64>,
18648    pub star_amount: Option<BoxWrapper<Unbox<StarAmount>>>,
18649}
18650impl From<NoSkipSuggestedPostPaid> for SuggestedPostPaid {
18651    fn from(t: NoSkipSuggestedPostPaid) -> Self {
18652        Self {
18653            suggested_post_message: t.suggested_post_message,
18654            currency: t.currency,
18655            amount: t.amount,
18656            star_amount: t.star_amount,
18657        }
18658    }
18659}
18660#[allow(clippy::from_over_into)]
18661impl Into<NoSkipSuggestedPostPaid> for SuggestedPostPaid {
18662    fn into(self) -> NoSkipSuggestedPostPaid {
18663        NoSkipSuggestedPostPaid {
18664            suggested_post_message: self.suggested_post_message,
18665            currency: self.currency,
18666            amount: self.amount,
18667            star_amount: self.star_amount,
18668        }
18669    }
18670}
18671impl NoSkipSuggestedPostPaid {
18672    pub fn skip(self) -> SuggestedPostPaid {
18673        self.into()
18674    }
18675}
18676impl SuggestedPostPaid {
18677    pub fn noskip(self) -> NoSkipSuggestedPostPaid {
18678        self.into()
18679    }
18680}
18681#[allow(rustdoc::invalid_html_tags)]
18682#[doc = "Describes a service message about a successful payment for a suggested post."]
18683#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18684pub struct SuggestedPostPaidBuilder {
18685    #[allow(rustdoc::invalid_html_tags)]
18686    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
18687    #[serde(
18688        skip_serializing_if = "Option::is_none",
18689        rename = "suggested_post_message",
18690        default
18691    )]
18692    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
18693    #[allow(rustdoc::invalid_html_tags)]
18694    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
18695    #[serde(rename = "currency")]
18696    pub currency: String,
18697    #[allow(rustdoc::invalid_html_tags)]
18698    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
18699    #[serde(skip_serializing_if = "Option::is_none", rename = "amount", default)]
18700    pub amount: Option<i64>,
18701    #[allow(rustdoc::invalid_html_tags)]
18702    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
18703    #[serde(
18704        skip_serializing_if = "Option::is_none",
18705        rename = "star_amount",
18706        default
18707    )]
18708    pub star_amount: Option<BoxWrapper<Unbox<StarAmount>>>,
18709}
18710impl SuggestedPostPaidBuilder {
18711    #[allow(clippy::too_many_arguments)]
18712    pub fn new(currency: String) -> Self {
18713        Self {
18714            currency,
18715            suggested_post_message: None,
18716            amount: None,
18717            star_amount: None,
18718        }
18719    }
18720    #[allow(rustdoc::invalid_html_tags)]
18721    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
18722    pub fn set_suggested_post_message(mut self, suggested_post_message: Box<Message>) -> Self {
18723        self.suggested_post_message = Some(BoxWrapper(suggested_post_message));
18724        self
18725    }
18726    #[allow(rustdoc::invalid_html_tags)]
18727    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
18728    pub fn set_currency(mut self, currency: String) -> Self {
18729        self.currency = currency;
18730        self
18731    }
18732    #[allow(rustdoc::invalid_html_tags)]
18733    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
18734    pub fn set_amount(mut self, amount: i64) -> Self {
18735        self.amount = Some(amount);
18736        self
18737    }
18738    #[allow(rustdoc::invalid_html_tags)]
18739    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
18740    pub fn set_star_amount(mut self, star_amount: StarAmount) -> Self {
18741        self.star_amount = Some(BoxWrapper(Unbox(star_amount)));
18742        self
18743    }
18744    pub fn build(self) -> SuggestedPostPaid {
18745        SuggestedPostPaid {
18746            suggested_post_message: self.suggested_post_message,
18747            currency: self.currency,
18748            amount: self.amount,
18749            star_amount: self.star_amount,
18750        }
18751    }
18752}
18753#[allow(rustdoc::invalid_html_tags)]
18754#[doc = "This object represents a phone contact."]
18755#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18756pub struct Contact {
18757    #[allow(rustdoc::invalid_html_tags)]
18758    #[doc = "Contact's phone number"]
18759    #[serde(rename = "phone_number")]
18760    pub phone_number: String,
18761    #[allow(rustdoc::invalid_html_tags)]
18762    #[doc = "Contact's first name"]
18763    #[serde(rename = "first_name")]
18764    pub first_name: String,
18765    #[allow(rustdoc::invalid_html_tags)]
18766    #[doc = "Optional. Contact's last name"]
18767    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
18768    pub last_name: Option<String>,
18769    #[allow(rustdoc::invalid_html_tags)]
18770    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
18771    #[serde(skip_serializing_if = "Option::is_none", rename = "user_id", default)]
18772    pub user_id: Option<i64>,
18773    #[allow(rustdoc::invalid_html_tags)]
18774    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
18775    #[serde(skip_serializing_if = "Option::is_none", rename = "vcard", default)]
18776    pub vcard: Option<String>,
18777}
18778#[allow(rustdoc::invalid_html_tags)]
18779#[doc = "Companion type to Contact that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
18780#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18781pub struct NoSkipContact {
18782    #[allow(rustdoc::invalid_html_tags)]
18783    #[doc = "Contact's phone number"]
18784    #[serde(rename = "phone_number")]
18785    pub phone_number: String,
18786    #[allow(rustdoc::invalid_html_tags)]
18787    #[doc = "Contact's first name"]
18788    #[serde(rename = "first_name")]
18789    pub first_name: String,
18790    pub last_name: Option<String>,
18791    pub user_id: Option<i64>,
18792    pub vcard: Option<String>,
18793}
18794impl From<NoSkipContact> for Contact {
18795    fn from(t: NoSkipContact) -> Self {
18796        Self {
18797            phone_number: t.phone_number,
18798            first_name: t.first_name,
18799            last_name: t.last_name,
18800            user_id: t.user_id,
18801            vcard: t.vcard,
18802        }
18803    }
18804}
18805#[allow(clippy::from_over_into)]
18806impl Into<NoSkipContact> for Contact {
18807    fn into(self) -> NoSkipContact {
18808        NoSkipContact {
18809            phone_number: self.phone_number,
18810            first_name: self.first_name,
18811            last_name: self.last_name,
18812            user_id: self.user_id,
18813            vcard: self.vcard,
18814        }
18815    }
18816}
18817impl NoSkipContact {
18818    pub fn skip(self) -> Contact {
18819        self.into()
18820    }
18821}
18822impl Contact {
18823    pub fn noskip(self) -> NoSkipContact {
18824        self.into()
18825    }
18826}
18827#[allow(rustdoc::invalid_html_tags)]
18828#[doc = "This object represents a phone contact."]
18829#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18830pub struct ContactBuilder {
18831    #[allow(rustdoc::invalid_html_tags)]
18832    #[doc = "Contact's phone number"]
18833    #[serde(rename = "phone_number")]
18834    pub phone_number: String,
18835    #[allow(rustdoc::invalid_html_tags)]
18836    #[doc = "Contact's first name"]
18837    #[serde(rename = "first_name")]
18838    pub first_name: String,
18839    #[allow(rustdoc::invalid_html_tags)]
18840    #[doc = "Optional. Contact's last name"]
18841    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
18842    pub last_name: Option<String>,
18843    #[allow(rustdoc::invalid_html_tags)]
18844    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
18845    #[serde(skip_serializing_if = "Option::is_none", rename = "user_id", default)]
18846    pub user_id: Option<i64>,
18847    #[allow(rustdoc::invalid_html_tags)]
18848    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
18849    #[serde(skip_serializing_if = "Option::is_none", rename = "vcard", default)]
18850    pub vcard: Option<String>,
18851}
18852impl ContactBuilder {
18853    #[allow(clippy::too_many_arguments)]
18854    pub fn new(phone_number: String, first_name: String) -> Self {
18855        Self {
18856            phone_number,
18857            first_name,
18858            last_name: None,
18859            user_id: None,
18860            vcard: None,
18861        }
18862    }
18863    #[allow(rustdoc::invalid_html_tags)]
18864    #[doc = "Contact's phone number"]
18865    pub fn set_phone_number(mut self, phone_number: String) -> Self {
18866        self.phone_number = phone_number;
18867        self
18868    }
18869    #[allow(rustdoc::invalid_html_tags)]
18870    #[doc = "Contact's first name"]
18871    pub fn set_first_name(mut self, first_name: String) -> Self {
18872        self.first_name = first_name;
18873        self
18874    }
18875    #[allow(rustdoc::invalid_html_tags)]
18876    #[doc = "Optional. Contact's last name"]
18877    pub fn set_last_name(mut self, last_name: String) -> Self {
18878        self.last_name = Some(last_name);
18879        self
18880    }
18881    #[allow(rustdoc::invalid_html_tags)]
18882    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
18883    pub fn set_user_id(mut self, user_id: i64) -> Self {
18884        self.user_id = Some(user_id);
18885        self
18886    }
18887    #[allow(rustdoc::invalid_html_tags)]
18888    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
18889    pub fn set_vcard(mut self, vcard: String) -> Self {
18890        self.vcard = Some(vcard);
18891        self
18892    }
18893    pub fn build(self) -> Contact {
18894        Contact {
18895            phone_number: self.phone_number,
18896            first_name: self.first_name,
18897            last_name: self.last_name,
18898            user_id: self.user_id,
18899            vcard: self.vcard,
18900        }
18901    }
18902}
18903#[allow(rustdoc::invalid_html_tags)]
18904#[doc = "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways."]
18905#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18906pub struct ChatBoostSourceGiveaway {
18907    #[allow(rustdoc::invalid_html_tags)]
18908    #[doc = "Source of the boost, always \"giveaway\""]
18909    #[serde(rename = "source")]
18910    pub source: String,
18911    #[allow(rustdoc::invalid_html_tags)]
18912    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
18913    #[serde(rename = "giveaway_message_id")]
18914    pub giveaway_message_id: i64,
18915    #[allow(rustdoc::invalid_html_tags)]
18916    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
18917    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
18918    pub user: Option<BoxWrapper<Unbox<User>>>,
18919    #[allow(rustdoc::invalid_html_tags)]
18920    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
18921    #[serde(
18922        skip_serializing_if = "Option::is_none",
18923        rename = "prize_star_count",
18924        default
18925    )]
18926    pub prize_star_count: Option<i64>,
18927    #[allow(rustdoc::invalid_html_tags)]
18928    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
18929    #[serde(
18930        skip_serializing_if = "Option::is_none",
18931        rename = "is_unclaimed",
18932        default
18933    )]
18934    pub is_unclaimed: Option<bool>,
18935}
18936#[allow(rustdoc::invalid_html_tags)]
18937#[doc = "Companion type to ChatBoostSourceGiveaway that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
18938#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18939pub struct NoSkipChatBoostSourceGiveaway {
18940    #[allow(rustdoc::invalid_html_tags)]
18941    #[doc = "Source of the boost, always \"giveaway\""]
18942    #[serde(rename = "source")]
18943    pub source: String,
18944    #[allow(rustdoc::invalid_html_tags)]
18945    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
18946    #[serde(rename = "giveaway_message_id")]
18947    pub giveaway_message_id: i64,
18948    pub user: Option<BoxWrapper<Unbox<User>>>,
18949    pub prize_star_count: Option<i64>,
18950    pub is_unclaimed: Option<bool>,
18951}
18952impl From<NoSkipChatBoostSourceGiveaway> for ChatBoostSourceGiveaway {
18953    fn from(t: NoSkipChatBoostSourceGiveaway) -> Self {
18954        Self {
18955            source: t.source,
18956            giveaway_message_id: t.giveaway_message_id,
18957            user: t.user,
18958            prize_star_count: t.prize_star_count,
18959            is_unclaimed: t.is_unclaimed,
18960        }
18961    }
18962}
18963#[allow(clippy::from_over_into)]
18964impl Into<NoSkipChatBoostSourceGiveaway> for ChatBoostSourceGiveaway {
18965    fn into(self) -> NoSkipChatBoostSourceGiveaway {
18966        NoSkipChatBoostSourceGiveaway {
18967            source: self.source,
18968            giveaway_message_id: self.giveaway_message_id,
18969            user: self.user,
18970            prize_star_count: self.prize_star_count,
18971            is_unclaimed: self.is_unclaimed,
18972        }
18973    }
18974}
18975impl NoSkipChatBoostSourceGiveaway {
18976    pub fn skip(self) -> ChatBoostSourceGiveaway {
18977        self.into()
18978    }
18979}
18980impl ChatBoostSourceGiveaway {
18981    pub fn noskip(self) -> NoSkipChatBoostSourceGiveaway {
18982        self.into()
18983    }
18984}
18985#[allow(rustdoc::invalid_html_tags)]
18986#[doc = "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways."]
18987#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
18988pub struct ChatBoostSourceGiveawayBuilder {
18989    #[allow(rustdoc::invalid_html_tags)]
18990    #[doc = "Source of the boost, always \"giveaway\""]
18991    #[serde(rename = "source")]
18992    pub source: String,
18993    #[allow(rustdoc::invalid_html_tags)]
18994    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
18995    #[serde(rename = "giveaway_message_id")]
18996    pub giveaway_message_id: i64,
18997    #[allow(rustdoc::invalid_html_tags)]
18998    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
18999    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
19000    pub user: Option<BoxWrapper<Unbox<User>>>,
19001    #[allow(rustdoc::invalid_html_tags)]
19002    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
19003    #[serde(
19004        skip_serializing_if = "Option::is_none",
19005        rename = "prize_star_count",
19006        default
19007    )]
19008    pub prize_star_count: Option<i64>,
19009    #[allow(rustdoc::invalid_html_tags)]
19010    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
19011    #[serde(
19012        skip_serializing_if = "Option::is_none",
19013        rename = "is_unclaimed",
19014        default
19015    )]
19016    pub is_unclaimed: Option<bool>,
19017}
19018impl ChatBoostSourceGiveawayBuilder {
19019    #[allow(clippy::too_many_arguments)]
19020    pub fn new(source: String, giveaway_message_id: i64) -> Self {
19021        Self {
19022            source,
19023            giveaway_message_id,
19024            user: None,
19025            prize_star_count: None,
19026            is_unclaimed: None,
19027        }
19028    }
19029    #[allow(rustdoc::invalid_html_tags)]
19030    #[doc = "Source of the boost, always \"giveaway\""]
19031    pub fn set_source(mut self, source: String) -> Self {
19032        self.source = source;
19033        self
19034    }
19035    #[allow(rustdoc::invalid_html_tags)]
19036    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
19037    pub fn set_giveaway_message_id(mut self, giveaway_message_id: i64) -> Self {
19038        self.giveaway_message_id = giveaway_message_id;
19039        self
19040    }
19041    #[allow(rustdoc::invalid_html_tags)]
19042    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
19043    pub fn set_user(mut self, user: User) -> Self {
19044        self.user = Some(BoxWrapper(Unbox(user)));
19045        self
19046    }
19047    #[allow(rustdoc::invalid_html_tags)]
19048    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
19049    pub fn set_prize_star_count(mut self, prize_star_count: i64) -> Self {
19050        self.prize_star_count = Some(prize_star_count);
19051        self
19052    }
19053    #[allow(rustdoc::invalid_html_tags)]
19054    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
19055    pub fn set_is_unclaimed(mut self, is_unclaimed: bool) -> Self {
19056        self.is_unclaimed = Some(is_unclaimed);
19057        self
19058    }
19059    pub fn build(self) -> ChatBoostSourceGiveaway {
19060        ChatBoostSourceGiveaway {
19061            source: self.source,
19062            giveaway_message_id: self.giveaway_message_id,
19063            user: self.user,
19064            prize_star_count: self.prize_star_count,
19065            is_unclaimed: self.is_unclaimed,
19066        }
19067    }
19068}
19069#[allow(rustdoc::invalid_html_tags)]
19070#[doc = "This object represents the bot's name."]
19071#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19072pub struct BotName {
19073    #[allow(rustdoc::invalid_html_tags)]
19074    #[doc = "The bot's name"]
19075    #[serde(rename = "name")]
19076    pub name: String,
19077}
19078#[allow(rustdoc::invalid_html_tags)]
19079#[doc = "Companion type to BotName that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
19080#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19081pub struct NoSkipBotName {
19082    #[allow(rustdoc::invalid_html_tags)]
19083    #[doc = "The bot's name"]
19084    #[serde(rename = "name")]
19085    pub name: String,
19086}
19087impl From<NoSkipBotName> for BotName {
19088    fn from(t: NoSkipBotName) -> Self {
19089        Self { name: t.name }
19090    }
19091}
19092#[allow(clippy::from_over_into)]
19093impl Into<NoSkipBotName> for BotName {
19094    fn into(self) -> NoSkipBotName {
19095        NoSkipBotName { name: self.name }
19096    }
19097}
19098impl NoSkipBotName {
19099    pub fn skip(self) -> BotName {
19100        self.into()
19101    }
19102}
19103impl BotName {
19104    pub fn noskip(self) -> NoSkipBotName {
19105        self.into()
19106    }
19107}
19108#[allow(rustdoc::invalid_html_tags)]
19109#[doc = "This object represents the bot's name."]
19110#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19111pub struct BotNameBuilder {
19112    #[allow(rustdoc::invalid_html_tags)]
19113    #[doc = "The bot's name"]
19114    #[serde(rename = "name")]
19115    pub name: String,
19116}
19117impl BotNameBuilder {
19118    #[allow(clippy::too_many_arguments)]
19119    pub fn new(name: String) -> Self {
19120        Self { name }
19121    }
19122    #[allow(rustdoc::invalid_html_tags)]
19123    #[doc = "The bot's name"]
19124    pub fn set_name(mut self, name: String) -> Self {
19125        self.name = name;
19126        self
19127    }
19128    pub fn build(self) -> BotName {
19129        BotName { name: self.name }
19130    }
19131}
19132#[allow(rustdoc::invalid_html_tags)]
19133#[doc = "Describes a service message about the rejection of a suggested post."]
19134#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19135pub struct SuggestedPostDeclined {
19136    #[allow(rustdoc::invalid_html_tags)]
19137    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
19138    #[serde(
19139        skip_serializing_if = "Option::is_none",
19140        rename = "suggested_post_message",
19141        default
19142    )]
19143    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
19144    #[allow(rustdoc::invalid_html_tags)]
19145    #[doc = "Optional. Comment with which the post was declined"]
19146    #[serde(skip_serializing_if = "Option::is_none", rename = "comment", default)]
19147    pub comment: Option<String>,
19148}
19149#[allow(rustdoc::invalid_html_tags)]
19150#[doc = "Companion type to SuggestedPostDeclined that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
19151#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19152pub struct NoSkipSuggestedPostDeclined {
19153    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
19154    pub comment: Option<String>,
19155}
19156impl From<NoSkipSuggestedPostDeclined> for SuggestedPostDeclined {
19157    fn from(t: NoSkipSuggestedPostDeclined) -> Self {
19158        Self {
19159            suggested_post_message: t.suggested_post_message,
19160            comment: t.comment,
19161        }
19162    }
19163}
19164#[allow(clippy::from_over_into)]
19165impl Into<NoSkipSuggestedPostDeclined> for SuggestedPostDeclined {
19166    fn into(self) -> NoSkipSuggestedPostDeclined {
19167        NoSkipSuggestedPostDeclined {
19168            suggested_post_message: self.suggested_post_message,
19169            comment: self.comment,
19170        }
19171    }
19172}
19173impl NoSkipSuggestedPostDeclined {
19174    pub fn skip(self) -> SuggestedPostDeclined {
19175        self.into()
19176    }
19177}
19178impl SuggestedPostDeclined {
19179    pub fn noskip(self) -> NoSkipSuggestedPostDeclined {
19180        self.into()
19181    }
19182}
19183#[allow(rustdoc::invalid_html_tags)]
19184#[doc = "Describes a service message about the rejection of a suggested post."]
19185#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19186pub struct SuggestedPostDeclinedBuilder {
19187    #[allow(rustdoc::invalid_html_tags)]
19188    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
19189    #[serde(
19190        skip_serializing_if = "Option::is_none",
19191        rename = "suggested_post_message",
19192        default
19193    )]
19194    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
19195    #[allow(rustdoc::invalid_html_tags)]
19196    #[doc = "Optional. Comment with which the post was declined"]
19197    #[serde(skip_serializing_if = "Option::is_none", rename = "comment", default)]
19198    pub comment: Option<String>,
19199}
19200impl SuggestedPostDeclinedBuilder {
19201    #[allow(clippy::too_many_arguments)]
19202    pub fn new() -> Self {
19203        Self {
19204            suggested_post_message: None,
19205            comment: None,
19206        }
19207    }
19208    #[allow(rustdoc::invalid_html_tags)]
19209    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
19210    pub fn set_suggested_post_message(mut self, suggested_post_message: Box<Message>) -> Self {
19211        self.suggested_post_message = Some(BoxWrapper(suggested_post_message));
19212        self
19213    }
19214    #[allow(rustdoc::invalid_html_tags)]
19215    #[doc = "Optional. Comment with which the post was declined"]
19216    pub fn set_comment(mut self, comment: String) -> Self {
19217        self.comment = Some(comment);
19218        self
19219    }
19220    pub fn build(self) -> SuggestedPostDeclined {
19221        SuggestedPostDeclined {
19222            suggested_post_message: self.suggested_post_message,
19223            comment: self.comment,
19224        }
19225    }
19226}
19227#[allow(rustdoc::invalid_html_tags)]
19228#[doc = "Describes an interval of time during which a business is open."]
19229#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19230pub struct BusinessOpeningHoursInterval {
19231    #[allow(rustdoc::invalid_html_tags)]
19232    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
19233    #[serde(rename = "opening_minute")]
19234    pub opening_minute: i64,
19235    #[allow(rustdoc::invalid_html_tags)]
19236    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
19237    #[serde(rename = "closing_minute")]
19238    pub closing_minute: i64,
19239}
19240#[allow(rustdoc::invalid_html_tags)]
19241#[doc = "Companion type to BusinessOpeningHoursInterval that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
19242#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19243pub struct NoSkipBusinessOpeningHoursInterval {
19244    #[allow(rustdoc::invalid_html_tags)]
19245    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
19246    #[serde(rename = "opening_minute")]
19247    pub opening_minute: i64,
19248    #[allow(rustdoc::invalid_html_tags)]
19249    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
19250    #[serde(rename = "closing_minute")]
19251    pub closing_minute: i64,
19252}
19253impl From<NoSkipBusinessOpeningHoursInterval> for BusinessOpeningHoursInterval {
19254    fn from(t: NoSkipBusinessOpeningHoursInterval) -> Self {
19255        Self {
19256            opening_minute: t.opening_minute,
19257            closing_minute: t.closing_minute,
19258        }
19259    }
19260}
19261#[allow(clippy::from_over_into)]
19262impl Into<NoSkipBusinessOpeningHoursInterval> for BusinessOpeningHoursInterval {
19263    fn into(self) -> NoSkipBusinessOpeningHoursInterval {
19264        NoSkipBusinessOpeningHoursInterval {
19265            opening_minute: self.opening_minute,
19266            closing_minute: self.closing_minute,
19267        }
19268    }
19269}
19270impl NoSkipBusinessOpeningHoursInterval {
19271    pub fn skip(self) -> BusinessOpeningHoursInterval {
19272        self.into()
19273    }
19274}
19275impl BusinessOpeningHoursInterval {
19276    pub fn noskip(self) -> NoSkipBusinessOpeningHoursInterval {
19277        self.into()
19278    }
19279}
19280#[allow(rustdoc::invalid_html_tags)]
19281#[doc = "Describes an interval of time during which a business is open."]
19282#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19283pub struct BusinessOpeningHoursIntervalBuilder {
19284    #[allow(rustdoc::invalid_html_tags)]
19285    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
19286    #[serde(rename = "opening_minute")]
19287    pub opening_minute: i64,
19288    #[allow(rustdoc::invalid_html_tags)]
19289    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
19290    #[serde(rename = "closing_minute")]
19291    pub closing_minute: i64,
19292}
19293impl BusinessOpeningHoursIntervalBuilder {
19294    #[allow(clippy::too_many_arguments)]
19295    pub fn new(opening_minute: i64, closing_minute: i64) -> Self {
19296        Self {
19297            opening_minute,
19298            closing_minute,
19299        }
19300    }
19301    #[allow(rustdoc::invalid_html_tags)]
19302    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
19303    pub fn set_opening_minute(mut self, opening_minute: i64) -> Self {
19304        self.opening_minute = opening_minute;
19305        self
19306    }
19307    #[allow(rustdoc::invalid_html_tags)]
19308    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
19309    pub fn set_closing_minute(mut self, closing_minute: i64) -> Self {
19310        self.closing_minute = closing_minute;
19311        self
19312    }
19313    pub fn build(self) -> BusinessOpeningHoursInterval {
19314        BusinessOpeningHoursInterval {
19315            opening_minute: self.opening_minute,
19316            closing_minute: self.closing_minute,
19317        }
19318    }
19319}
19320#[allow(rustdoc::invalid_html_tags)]
19321#[doc = "This object represents an animated emoji that displays a random value."]
19322#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19323pub struct Dice {
19324    #[allow(rustdoc::invalid_html_tags)]
19325    #[doc = "Emoji on which the dice throw animation is based"]
19326    #[serde(rename = "emoji")]
19327    pub emoji: String,
19328    #[allow(rustdoc::invalid_html_tags)]
19329    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
19330    #[serde(rename = "value")]
19331    pub value: i64,
19332}
19333#[allow(rustdoc::invalid_html_tags)]
19334#[doc = "Companion type to Dice that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
19335#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19336pub struct NoSkipDice {
19337    #[allow(rustdoc::invalid_html_tags)]
19338    #[doc = "Emoji on which the dice throw animation is based"]
19339    #[serde(rename = "emoji")]
19340    pub emoji: String,
19341    #[allow(rustdoc::invalid_html_tags)]
19342    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
19343    #[serde(rename = "value")]
19344    pub value: i64,
19345}
19346impl From<NoSkipDice> for Dice {
19347    fn from(t: NoSkipDice) -> Self {
19348        Self {
19349            emoji: t.emoji,
19350            value: t.value,
19351        }
19352    }
19353}
19354#[allow(clippy::from_over_into)]
19355impl Into<NoSkipDice> for Dice {
19356    fn into(self) -> NoSkipDice {
19357        NoSkipDice {
19358            emoji: self.emoji,
19359            value: self.value,
19360        }
19361    }
19362}
19363impl NoSkipDice {
19364    pub fn skip(self) -> Dice {
19365        self.into()
19366    }
19367}
19368impl Dice {
19369    pub fn noskip(self) -> NoSkipDice {
19370        self.into()
19371    }
19372}
19373#[allow(rustdoc::invalid_html_tags)]
19374#[doc = "This object represents an animated emoji that displays a random value."]
19375#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19376pub struct DiceBuilder {
19377    #[allow(rustdoc::invalid_html_tags)]
19378    #[doc = "Emoji on which the dice throw animation is based"]
19379    #[serde(rename = "emoji")]
19380    pub emoji: String,
19381    #[allow(rustdoc::invalid_html_tags)]
19382    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
19383    #[serde(rename = "value")]
19384    pub value: i64,
19385}
19386impl DiceBuilder {
19387    #[allow(clippy::too_many_arguments)]
19388    pub fn new(emoji: String, value: i64) -> Self {
19389        Self { emoji, value }
19390    }
19391    #[allow(rustdoc::invalid_html_tags)]
19392    #[doc = "Emoji on which the dice throw animation is based"]
19393    pub fn set_emoji(mut self, emoji: String) -> Self {
19394        self.emoji = emoji;
19395        self
19396    }
19397    #[allow(rustdoc::invalid_html_tags)]
19398    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
19399    pub fn set_value(mut self, value: i64) -> Self {
19400        self.value = value;
19401        self
19402    }
19403    pub fn build(self) -> Dice {
19404        Dice {
19405            emoji: self.emoji,
19406            value: self.value,
19407        }
19408    }
19409}
19410#[allow(rustdoc::invalid_html_tags)]
19411#[doc = "Represents a link to an article or web page."]
19412#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19413pub struct InlineQueryResultArticle {
19414    #[allow(rustdoc::invalid_html_tags)]
19415    #[doc = "Type of the result, must be article"]
19416    #[serde(rename = "type")]
19417    pub tg_type: String,
19418    #[allow(rustdoc::invalid_html_tags)]
19419    #[doc = "Unique identifier for this result, 1-64 Bytes"]
19420    #[serde(rename = "id")]
19421    pub id: String,
19422    #[allow(rustdoc::invalid_html_tags)]
19423    #[doc = "Title of the result"]
19424    #[serde(rename = "title")]
19425    pub title: String,
19426    #[allow(rustdoc::invalid_html_tags)]
19427    #[doc = "Content of the message to be sent"]
19428    #[serde(rename = "input_message_content")]
19429    pub input_message_content: BoxWrapper<Unbox<InputMessageContent>>,
19430    #[allow(rustdoc::invalid_html_tags)]
19431    #[doc = "Optional. Inline keyboard attached to the message"]
19432    #[serde(
19433        skip_serializing_if = "Option::is_none",
19434        rename = "reply_markup",
19435        default
19436    )]
19437    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
19438    #[allow(rustdoc::invalid_html_tags)]
19439    #[doc = "Optional. URL of the result"]
19440    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
19441    pub url: Option<String>,
19442    #[allow(rustdoc::invalid_html_tags)]
19443    #[doc = "Optional. Short description of the result"]
19444    #[serde(
19445        skip_serializing_if = "Option::is_none",
19446        rename = "description",
19447        default
19448    )]
19449    pub description: Option<String>,
19450    #[allow(rustdoc::invalid_html_tags)]
19451    #[doc = "Optional. Url of the thumbnail for the result"]
19452    #[serde(
19453        skip_serializing_if = "Option::is_none",
19454        rename = "thumbnail_url",
19455        default
19456    )]
19457    pub thumbnail_url: Option<String>,
19458    #[allow(rustdoc::invalid_html_tags)]
19459    #[doc = "Optional. Thumbnail width"]
19460    #[serde(
19461        skip_serializing_if = "Option::is_none",
19462        rename = "thumbnail_width",
19463        default
19464    )]
19465    pub thumbnail_width: Option<i64>,
19466    #[allow(rustdoc::invalid_html_tags)]
19467    #[doc = "Optional. Thumbnail height"]
19468    #[serde(
19469        skip_serializing_if = "Option::is_none",
19470        rename = "thumbnail_height",
19471        default
19472    )]
19473    pub thumbnail_height: Option<i64>,
19474}
19475#[allow(rustdoc::invalid_html_tags)]
19476#[doc = "Companion type to InlineQueryResultArticle that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
19477#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19478pub struct NoSkipInlineQueryResultArticle {
19479    #[allow(rustdoc::invalid_html_tags)]
19480    #[doc = "Type of the result, must be article"]
19481    #[serde(rename = "type")]
19482    pub tg_type: String,
19483    #[allow(rustdoc::invalid_html_tags)]
19484    #[doc = "Unique identifier for this result, 1-64 Bytes"]
19485    #[serde(rename = "id")]
19486    pub id: String,
19487    #[allow(rustdoc::invalid_html_tags)]
19488    #[doc = "Title of the result"]
19489    #[serde(rename = "title")]
19490    pub title: String,
19491    #[allow(rustdoc::invalid_html_tags)]
19492    #[doc = "Content of the message to be sent"]
19493    #[serde(rename = "input_message_content")]
19494    pub input_message_content: BoxWrapper<Unbox<InputMessageContent>>,
19495    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
19496    pub url: Option<String>,
19497    pub description: Option<String>,
19498    pub thumbnail_url: Option<String>,
19499    pub thumbnail_width: Option<i64>,
19500    pub thumbnail_height: Option<i64>,
19501}
19502impl From<NoSkipInlineQueryResultArticle> for InlineQueryResultArticle {
19503    fn from(t: NoSkipInlineQueryResultArticle) -> Self {
19504        Self {
19505            tg_type: t.tg_type,
19506            id: t.id,
19507            title: t.title,
19508            input_message_content: t.input_message_content,
19509            reply_markup: t.reply_markup,
19510            url: t.url,
19511            description: t.description,
19512            thumbnail_url: t.thumbnail_url,
19513            thumbnail_width: t.thumbnail_width,
19514            thumbnail_height: t.thumbnail_height,
19515        }
19516    }
19517}
19518#[allow(clippy::from_over_into)]
19519impl Into<NoSkipInlineQueryResultArticle> for InlineQueryResultArticle {
19520    fn into(self) -> NoSkipInlineQueryResultArticle {
19521        NoSkipInlineQueryResultArticle {
19522            tg_type: self.tg_type,
19523            id: self.id,
19524            title: self.title,
19525            input_message_content: self.input_message_content,
19526            reply_markup: self.reply_markup,
19527            url: self.url,
19528            description: self.description,
19529            thumbnail_url: self.thumbnail_url,
19530            thumbnail_width: self.thumbnail_width,
19531            thumbnail_height: self.thumbnail_height,
19532        }
19533    }
19534}
19535impl NoSkipInlineQueryResultArticle {
19536    pub fn skip(self) -> InlineQueryResultArticle {
19537        self.into()
19538    }
19539}
19540impl InlineQueryResultArticle {
19541    pub fn noskip(self) -> NoSkipInlineQueryResultArticle {
19542        self.into()
19543    }
19544}
19545#[allow(rustdoc::invalid_html_tags)]
19546#[doc = "Represents a link to an article or web page."]
19547#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19548pub struct InlineQueryResultArticleBuilder {
19549    #[allow(rustdoc::invalid_html_tags)]
19550    #[doc = "Type of the result, must be article"]
19551    #[serde(rename = "type")]
19552    pub tg_type: String,
19553    #[allow(rustdoc::invalid_html_tags)]
19554    #[doc = "Unique identifier for this result, 1-64 Bytes"]
19555    #[serde(rename = "id")]
19556    pub id: String,
19557    #[allow(rustdoc::invalid_html_tags)]
19558    #[doc = "Title of the result"]
19559    #[serde(rename = "title")]
19560    pub title: String,
19561    #[allow(rustdoc::invalid_html_tags)]
19562    #[doc = "Content of the message to be sent"]
19563    #[serde(rename = "input_message_content")]
19564    pub input_message_content: BoxWrapper<Unbox<InputMessageContent>>,
19565    #[allow(rustdoc::invalid_html_tags)]
19566    #[doc = "Optional. Inline keyboard attached to the message"]
19567    #[serde(
19568        skip_serializing_if = "Option::is_none",
19569        rename = "reply_markup",
19570        default
19571    )]
19572    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
19573    #[allow(rustdoc::invalid_html_tags)]
19574    #[doc = "Optional. URL of the result"]
19575    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
19576    pub url: Option<String>,
19577    #[allow(rustdoc::invalid_html_tags)]
19578    #[doc = "Optional. Short description of the result"]
19579    #[serde(
19580        skip_serializing_if = "Option::is_none",
19581        rename = "description",
19582        default
19583    )]
19584    pub description: Option<String>,
19585    #[allow(rustdoc::invalid_html_tags)]
19586    #[doc = "Optional. Url of the thumbnail for the result"]
19587    #[serde(
19588        skip_serializing_if = "Option::is_none",
19589        rename = "thumbnail_url",
19590        default
19591    )]
19592    pub thumbnail_url: Option<String>,
19593    #[allow(rustdoc::invalid_html_tags)]
19594    #[doc = "Optional. Thumbnail width"]
19595    #[serde(
19596        skip_serializing_if = "Option::is_none",
19597        rename = "thumbnail_width",
19598        default
19599    )]
19600    pub thumbnail_width: Option<i64>,
19601    #[allow(rustdoc::invalid_html_tags)]
19602    #[doc = "Optional. Thumbnail height"]
19603    #[serde(
19604        skip_serializing_if = "Option::is_none",
19605        rename = "thumbnail_height",
19606        default
19607    )]
19608    pub thumbnail_height: Option<i64>,
19609}
19610impl InlineQueryResultArticleBuilder {
19611    #[allow(clippy::too_many_arguments)]
19612    pub fn new<A: Into<InputMessageContent>>(
19613        id: String,
19614        title: String,
19615        input_message_content: A,
19616    ) -> Self {
19617        Self {
19618            tg_type: "article".to_owned(),
19619            id,
19620            title,
19621            input_message_content: BoxWrapper::new_unbox(input_message_content.into()),
19622            reply_markup: None,
19623            url: None,
19624            description: None,
19625            thumbnail_url: None,
19626            thumbnail_width: None,
19627            thumbnail_height: None,
19628        }
19629    }
19630    #[allow(rustdoc::invalid_html_tags)]
19631    #[doc = "Type of the result, must be article"]
19632    pub fn set_type(mut self, tg_type: String) -> Self {
19633        self.tg_type = tg_type;
19634        self
19635    }
19636    #[allow(rustdoc::invalid_html_tags)]
19637    #[doc = "Unique identifier for this result, 1-64 Bytes"]
19638    pub fn set_id(mut self, id: String) -> Self {
19639        self.id = id;
19640        self
19641    }
19642    #[allow(rustdoc::invalid_html_tags)]
19643    #[doc = "Title of the result"]
19644    pub fn set_title(mut self, title: String) -> Self {
19645        self.title = title;
19646        self
19647    }
19648    #[allow(rustdoc::invalid_html_tags)]
19649    #[doc = "Content of the message to be sent"]
19650    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
19651        self.input_message_content = BoxWrapper(Unbox(input_message_content));
19652        self
19653    }
19654    #[allow(rustdoc::invalid_html_tags)]
19655    #[doc = "Optional. Inline keyboard attached to the message"]
19656    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
19657        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
19658        self
19659    }
19660    #[allow(rustdoc::invalid_html_tags)]
19661    #[doc = "Optional. URL of the result"]
19662    pub fn set_url(mut self, url: String) -> Self {
19663        self.url = Some(url);
19664        self
19665    }
19666    #[allow(rustdoc::invalid_html_tags)]
19667    #[doc = "Optional. Short description of the result"]
19668    pub fn set_description(mut self, description: String) -> Self {
19669        self.description = Some(description);
19670        self
19671    }
19672    #[allow(rustdoc::invalid_html_tags)]
19673    #[doc = "Optional. Url of the thumbnail for the result"]
19674    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
19675        self.thumbnail_url = Some(thumbnail_url);
19676        self
19677    }
19678    #[allow(rustdoc::invalid_html_tags)]
19679    #[doc = "Optional. Thumbnail width"]
19680    pub fn set_thumbnail_width(mut self, thumbnail_width: i64) -> Self {
19681        self.thumbnail_width = Some(thumbnail_width);
19682        self
19683    }
19684    #[allow(rustdoc::invalid_html_tags)]
19685    #[doc = "Optional. Thumbnail height"]
19686    pub fn set_thumbnail_height(mut self, thumbnail_height: i64) -> Self {
19687        self.thumbnail_height = Some(thumbnail_height);
19688        self
19689    }
19690    pub fn build(self) -> InlineQueryResultArticle {
19691        InlineQueryResultArticle {
19692            tg_type: self.tg_type,
19693            id: self.id,
19694            title: self.title,
19695            input_message_content: self.input_message_content,
19696            reply_markup: self.reply_markup,
19697            url: self.url,
19698            description: self.description,
19699            thumbnail_url: self.thumbnail_url,
19700            thumbnail_width: self.thumbnail_width,
19701            thumbnail_height: self.thumbnail_height,
19702        }
19703    }
19704}
19705#[allow(rustdoc::invalid_html_tags)]
19706#[doc = "Represents the content of a location message to be sent as the result of an inline query."]
19707#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19708pub struct InputLocationMessageContent {
19709    #[allow(rustdoc::invalid_html_tags)]
19710    #[doc = "Latitude of the location in degrees"]
19711    #[serde(rename = "latitude")]
19712    pub latitude: ::ordered_float::OrderedFloat<f64>,
19713    #[allow(rustdoc::invalid_html_tags)]
19714    #[doc = "Longitude of the location in degrees"]
19715    #[serde(rename = "longitude")]
19716    pub longitude: ::ordered_float::OrderedFloat<f64>,
19717    #[allow(rustdoc::invalid_html_tags)]
19718    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
19719    #[serde(
19720        skip_serializing_if = "Option::is_none",
19721        rename = "horizontal_accuracy",
19722        default
19723    )]
19724    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
19725    #[allow(rustdoc::invalid_html_tags)]
19726    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
19727    #[serde(
19728        skip_serializing_if = "Option::is_none",
19729        rename = "live_period",
19730        default
19731    )]
19732    pub live_period: Option<i64>,
19733    #[allow(rustdoc::invalid_html_tags)]
19734    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
19735    #[serde(skip_serializing_if = "Option::is_none", rename = "heading", default)]
19736    pub heading: Option<i64>,
19737    #[allow(rustdoc::invalid_html_tags)]
19738    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
19739    #[serde(
19740        skip_serializing_if = "Option::is_none",
19741        rename = "proximity_alert_radius",
19742        default
19743    )]
19744    pub proximity_alert_radius: Option<i64>,
19745}
19746#[allow(rustdoc::invalid_html_tags)]
19747#[doc = "Companion type to InputLocationMessageContent that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
19748#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19749pub struct NoSkipInputLocationMessageContent {
19750    #[allow(rustdoc::invalid_html_tags)]
19751    #[doc = "Latitude of the location in degrees"]
19752    #[serde(rename = "latitude")]
19753    pub latitude: ::ordered_float::OrderedFloat<f64>,
19754    #[allow(rustdoc::invalid_html_tags)]
19755    #[doc = "Longitude of the location in degrees"]
19756    #[serde(rename = "longitude")]
19757    pub longitude: ::ordered_float::OrderedFloat<f64>,
19758    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
19759    pub live_period: Option<i64>,
19760    pub heading: Option<i64>,
19761    pub proximity_alert_radius: Option<i64>,
19762}
19763impl From<NoSkipInputLocationMessageContent> for InputLocationMessageContent {
19764    fn from(t: NoSkipInputLocationMessageContent) -> Self {
19765        Self {
19766            latitude: t.latitude,
19767            longitude: t.longitude,
19768            horizontal_accuracy: t.horizontal_accuracy,
19769            live_period: t.live_period,
19770            heading: t.heading,
19771            proximity_alert_radius: t.proximity_alert_radius,
19772        }
19773    }
19774}
19775#[allow(clippy::from_over_into)]
19776impl Into<NoSkipInputLocationMessageContent> for InputLocationMessageContent {
19777    fn into(self) -> NoSkipInputLocationMessageContent {
19778        NoSkipInputLocationMessageContent {
19779            latitude: self.latitude,
19780            longitude: self.longitude,
19781            horizontal_accuracy: self.horizontal_accuracy,
19782            live_period: self.live_period,
19783            heading: self.heading,
19784            proximity_alert_radius: self.proximity_alert_radius,
19785        }
19786    }
19787}
19788impl NoSkipInputLocationMessageContent {
19789    pub fn skip(self) -> InputLocationMessageContent {
19790        self.into()
19791    }
19792}
19793impl InputLocationMessageContent {
19794    pub fn noskip(self) -> NoSkipInputLocationMessageContent {
19795        self.into()
19796    }
19797}
19798#[allow(rustdoc::invalid_html_tags)]
19799#[doc = "Represents the content of a location message to be sent as the result of an inline query."]
19800#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19801pub struct InputLocationMessageContentBuilder {
19802    #[allow(rustdoc::invalid_html_tags)]
19803    #[doc = "Latitude of the location in degrees"]
19804    #[serde(rename = "latitude")]
19805    pub latitude: ::ordered_float::OrderedFloat<f64>,
19806    #[allow(rustdoc::invalid_html_tags)]
19807    #[doc = "Longitude of the location in degrees"]
19808    #[serde(rename = "longitude")]
19809    pub longitude: ::ordered_float::OrderedFloat<f64>,
19810    #[allow(rustdoc::invalid_html_tags)]
19811    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
19812    #[serde(
19813        skip_serializing_if = "Option::is_none",
19814        rename = "horizontal_accuracy",
19815        default
19816    )]
19817    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
19818    #[allow(rustdoc::invalid_html_tags)]
19819    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
19820    #[serde(
19821        skip_serializing_if = "Option::is_none",
19822        rename = "live_period",
19823        default
19824    )]
19825    pub live_period: Option<i64>,
19826    #[allow(rustdoc::invalid_html_tags)]
19827    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
19828    #[serde(skip_serializing_if = "Option::is_none", rename = "heading", default)]
19829    pub heading: Option<i64>,
19830    #[allow(rustdoc::invalid_html_tags)]
19831    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
19832    #[serde(
19833        skip_serializing_if = "Option::is_none",
19834        rename = "proximity_alert_radius",
19835        default
19836    )]
19837    pub proximity_alert_radius: Option<i64>,
19838}
19839impl InputLocationMessageContentBuilder {
19840    #[allow(clippy::too_many_arguments)]
19841    pub fn new(
19842        latitude: ::ordered_float::OrderedFloat<f64>,
19843        longitude: ::ordered_float::OrderedFloat<f64>,
19844    ) -> Self {
19845        Self {
19846            latitude,
19847            longitude,
19848            horizontal_accuracy: None,
19849            live_period: None,
19850            heading: None,
19851            proximity_alert_radius: None,
19852        }
19853    }
19854    #[allow(rustdoc::invalid_html_tags)]
19855    #[doc = "Latitude of the location in degrees"]
19856    pub fn set_latitude(mut self, latitude: ::ordered_float::OrderedFloat<f64>) -> Self {
19857        self.latitude = latitude;
19858        self
19859    }
19860    #[allow(rustdoc::invalid_html_tags)]
19861    #[doc = "Longitude of the location in degrees"]
19862    pub fn set_longitude(mut self, longitude: ::ordered_float::OrderedFloat<f64>) -> Self {
19863        self.longitude = longitude;
19864        self
19865    }
19866    #[allow(rustdoc::invalid_html_tags)]
19867    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
19868    pub fn set_horizontal_accuracy(
19869        mut self,
19870        horizontal_accuracy: ::ordered_float::OrderedFloat<f64>,
19871    ) -> Self {
19872        self.horizontal_accuracy = Some(horizontal_accuracy);
19873        self
19874    }
19875    #[allow(rustdoc::invalid_html_tags)]
19876    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
19877    pub fn set_live_period(mut self, live_period: i64) -> Self {
19878        self.live_period = Some(live_period);
19879        self
19880    }
19881    #[allow(rustdoc::invalid_html_tags)]
19882    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
19883    pub fn set_heading(mut self, heading: i64) -> Self {
19884        self.heading = Some(heading);
19885        self
19886    }
19887    #[allow(rustdoc::invalid_html_tags)]
19888    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
19889    pub fn set_proximity_alert_radius(mut self, proximity_alert_radius: i64) -> Self {
19890        self.proximity_alert_radius = Some(proximity_alert_radius);
19891        self
19892    }
19893    pub fn build(self) -> InputLocationMessageContent {
19894        InputLocationMessageContent {
19895            latitude: self.latitude,
19896            longitude: self.longitude,
19897            horizontal_accuracy: self.horizontal_accuracy,
19898            live_period: self.live_period,
19899            heading: self.heading,
19900            proximity_alert_radius: self.proximity_alert_radius,
19901        }
19902    }
19903}
19904#[allow(rustdoc::invalid_html_tags)]
19905#[doc = "Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker."]
19906#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19907pub struct InlineQueryResultCachedSticker {
19908    #[allow(rustdoc::invalid_html_tags)]
19909    #[doc = "Type of the result, must be sticker"]
19910    #[serde(rename = "type")]
19911    pub tg_type: String,
19912    #[allow(rustdoc::invalid_html_tags)]
19913    #[doc = "Unique identifier for this result, 1-64 bytes"]
19914    #[serde(rename = "id")]
19915    pub id: String,
19916    #[allow(rustdoc::invalid_html_tags)]
19917    #[doc = "A valid file identifier of the sticker"]
19918    #[serde(rename = "sticker_file_id")]
19919    pub sticker_file_id: String,
19920    #[allow(rustdoc::invalid_html_tags)]
19921    #[doc = "Optional. Inline keyboard attached to the message"]
19922    #[serde(
19923        skip_serializing_if = "Option::is_none",
19924        rename = "reply_markup",
19925        default
19926    )]
19927    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
19928    #[allow(rustdoc::invalid_html_tags)]
19929    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
19930    #[serde(
19931        skip_serializing_if = "Option::is_none",
19932        rename = "input_message_content",
19933        default
19934    )]
19935    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
19936}
19937#[allow(rustdoc::invalid_html_tags)]
19938#[doc = "Companion type to InlineQueryResultCachedSticker that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
19939#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19940pub struct NoSkipInlineQueryResultCachedSticker {
19941    #[allow(rustdoc::invalid_html_tags)]
19942    #[doc = "Type of the result, must be sticker"]
19943    #[serde(rename = "type")]
19944    pub tg_type: String,
19945    #[allow(rustdoc::invalid_html_tags)]
19946    #[doc = "Unique identifier for this result, 1-64 bytes"]
19947    #[serde(rename = "id")]
19948    pub id: String,
19949    #[allow(rustdoc::invalid_html_tags)]
19950    #[doc = "A valid file identifier of the sticker"]
19951    #[serde(rename = "sticker_file_id")]
19952    pub sticker_file_id: String,
19953    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
19954    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
19955}
19956impl From<NoSkipInlineQueryResultCachedSticker> for InlineQueryResultCachedSticker {
19957    fn from(t: NoSkipInlineQueryResultCachedSticker) -> Self {
19958        Self {
19959            tg_type: t.tg_type,
19960            id: t.id,
19961            sticker_file_id: t.sticker_file_id,
19962            reply_markup: t.reply_markup,
19963            input_message_content: t.input_message_content,
19964        }
19965    }
19966}
19967#[allow(clippy::from_over_into)]
19968impl Into<NoSkipInlineQueryResultCachedSticker> for InlineQueryResultCachedSticker {
19969    fn into(self) -> NoSkipInlineQueryResultCachedSticker {
19970        NoSkipInlineQueryResultCachedSticker {
19971            tg_type: self.tg_type,
19972            id: self.id,
19973            sticker_file_id: self.sticker_file_id,
19974            reply_markup: self.reply_markup,
19975            input_message_content: self.input_message_content,
19976        }
19977    }
19978}
19979impl NoSkipInlineQueryResultCachedSticker {
19980    pub fn skip(self) -> InlineQueryResultCachedSticker {
19981        self.into()
19982    }
19983}
19984impl InlineQueryResultCachedSticker {
19985    pub fn noskip(self) -> NoSkipInlineQueryResultCachedSticker {
19986        self.into()
19987    }
19988}
19989#[allow(rustdoc::invalid_html_tags)]
19990#[doc = "Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker."]
19991#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19992pub struct InlineQueryResultCachedStickerBuilder {
19993    #[allow(rustdoc::invalid_html_tags)]
19994    #[doc = "Type of the result, must be sticker"]
19995    #[serde(rename = "type")]
19996    pub tg_type: String,
19997    #[allow(rustdoc::invalid_html_tags)]
19998    #[doc = "Unique identifier for this result, 1-64 bytes"]
19999    #[serde(rename = "id")]
20000    pub id: String,
20001    #[allow(rustdoc::invalid_html_tags)]
20002    #[doc = "A valid file identifier of the sticker"]
20003    #[serde(rename = "sticker_file_id")]
20004    pub sticker_file_id: String,
20005    #[allow(rustdoc::invalid_html_tags)]
20006    #[doc = "Optional. Inline keyboard attached to the message"]
20007    #[serde(
20008        skip_serializing_if = "Option::is_none",
20009        rename = "reply_markup",
20010        default
20011    )]
20012    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
20013    #[allow(rustdoc::invalid_html_tags)]
20014    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
20015    #[serde(
20016        skip_serializing_if = "Option::is_none",
20017        rename = "input_message_content",
20018        default
20019    )]
20020    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
20021}
20022impl InlineQueryResultCachedStickerBuilder {
20023    #[allow(clippy::too_many_arguments)]
20024    pub fn new(id: String, sticker_file_id: String) -> Self {
20025        Self {
20026            tg_type: "sticker".to_owned(),
20027            id,
20028            sticker_file_id,
20029            reply_markup: None,
20030            input_message_content: None,
20031        }
20032    }
20033    #[allow(rustdoc::invalid_html_tags)]
20034    #[doc = "Type of the result, must be sticker"]
20035    pub fn set_type(mut self, tg_type: String) -> Self {
20036        self.tg_type = tg_type;
20037        self
20038    }
20039    #[allow(rustdoc::invalid_html_tags)]
20040    #[doc = "Unique identifier for this result, 1-64 bytes"]
20041    pub fn set_id(mut self, id: String) -> Self {
20042        self.id = id;
20043        self
20044    }
20045    #[allow(rustdoc::invalid_html_tags)]
20046    #[doc = "A valid file identifier of the sticker"]
20047    pub fn set_sticker_file_id(mut self, sticker_file_id: String) -> Self {
20048        self.sticker_file_id = sticker_file_id;
20049        self
20050    }
20051    #[allow(rustdoc::invalid_html_tags)]
20052    #[doc = "Optional. Inline keyboard attached to the message"]
20053    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
20054        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
20055        self
20056    }
20057    #[allow(rustdoc::invalid_html_tags)]
20058    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
20059    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
20060        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
20061        self
20062    }
20063    pub fn build(self) -> InlineQueryResultCachedSticker {
20064        InlineQueryResultCachedSticker {
20065            tg_type: self.tg_type,
20066            id: self.id,
20067            sticker_file_id: self.sticker_file_id,
20068            reply_markup: self.reply_markup,
20069            input_message_content: self.input_message_content,
20070        }
20071    }
20072}
20073#[allow(rustdoc::invalid_html_tags)]
20074#[doc = "The paid media to send is a video."]
20075#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20076pub struct InputPaidMediaVideo {
20077    #[allow(rustdoc::invalid_html_tags)]
20078    #[doc = "Type of the media, must be video"]
20079    #[serde(rename = "type")]
20080    pub tg_type: String,
20081    #[allow(rustdoc::invalid_html_tags)]
20082    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20083    #[serde(rename = "media")]
20084    pub media: String,
20085    #[allow(rustdoc::invalid_html_tags)]
20086    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20087    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
20088    pub thumbnail: Option<String>,
20089    #[allow(rustdoc::invalid_html_tags)]
20090    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20091    #[serde(skip_serializing_if = "Option::is_none", rename = "cover", default)]
20092    pub cover: Option<String>,
20093    #[allow(rustdoc::invalid_html_tags)]
20094    #[doc = "Optional. Start timestamp for the video in the message"]
20095    #[serde(
20096        skip_serializing_if = "Option::is_none",
20097        rename = "start_timestamp",
20098        default
20099    )]
20100    pub start_timestamp: Option<i64>,
20101    #[allow(rustdoc::invalid_html_tags)]
20102    #[doc = "Optional. Video width"]
20103    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
20104    pub width: Option<i64>,
20105    #[allow(rustdoc::invalid_html_tags)]
20106    #[doc = "Optional. Video height"]
20107    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
20108    pub height: Option<i64>,
20109    #[allow(rustdoc::invalid_html_tags)]
20110    #[doc = "Optional. Video duration in seconds"]
20111    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
20112    pub duration: Option<i64>,
20113    #[allow(rustdoc::invalid_html_tags)]
20114    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
20115    #[serde(
20116        skip_serializing_if = "Option::is_none",
20117        rename = "supports_streaming",
20118        default
20119    )]
20120    pub supports_streaming: Option<bool>,
20121}
20122#[allow(rustdoc::invalid_html_tags)]
20123#[doc = "Companion type to InputPaidMediaVideo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
20124#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20125pub struct NoSkipInputPaidMediaVideo {
20126    #[allow(rustdoc::invalid_html_tags)]
20127    #[doc = "Type of the media, must be video"]
20128    #[serde(rename = "type")]
20129    pub tg_type: String,
20130    #[allow(rustdoc::invalid_html_tags)]
20131    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20132    #[serde(rename = "media")]
20133    pub media: String,
20134    pub thumbnail: Option<String>,
20135    pub cover: Option<String>,
20136    pub start_timestamp: Option<i64>,
20137    pub width: Option<i64>,
20138    pub height: Option<i64>,
20139    pub duration: Option<i64>,
20140    pub supports_streaming: Option<bool>,
20141}
20142impl From<NoSkipInputPaidMediaVideo> for InputPaidMediaVideo {
20143    fn from(t: NoSkipInputPaidMediaVideo) -> Self {
20144        Self {
20145            tg_type: t.tg_type,
20146            media: t.media,
20147            thumbnail: t.thumbnail,
20148            cover: t.cover,
20149            start_timestamp: t.start_timestamp,
20150            width: t.width,
20151            height: t.height,
20152            duration: t.duration,
20153            supports_streaming: t.supports_streaming,
20154        }
20155    }
20156}
20157#[allow(clippy::from_over_into)]
20158impl Into<NoSkipInputPaidMediaVideo> for InputPaidMediaVideo {
20159    fn into(self) -> NoSkipInputPaidMediaVideo {
20160        NoSkipInputPaidMediaVideo {
20161            tg_type: self.tg_type,
20162            media: self.media,
20163            thumbnail: self.thumbnail,
20164            cover: self.cover,
20165            start_timestamp: self.start_timestamp,
20166            width: self.width,
20167            height: self.height,
20168            duration: self.duration,
20169            supports_streaming: self.supports_streaming,
20170        }
20171    }
20172}
20173impl NoSkipInputPaidMediaVideo {
20174    pub fn skip(self) -> InputPaidMediaVideo {
20175        self.into()
20176    }
20177}
20178impl InputPaidMediaVideo {
20179    pub fn noskip(self) -> NoSkipInputPaidMediaVideo {
20180        self.into()
20181    }
20182}
20183#[allow(rustdoc::invalid_html_tags)]
20184#[doc = "The paid media to send is a video."]
20185#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20186pub struct InputPaidMediaVideoBuilder {
20187    #[allow(rustdoc::invalid_html_tags)]
20188    #[doc = "Type of the media, must be video"]
20189    #[serde(rename = "type")]
20190    pub tg_type: String,
20191    #[allow(rustdoc::invalid_html_tags)]
20192    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20193    #[serde(rename = "media")]
20194    pub media: String,
20195    #[allow(rustdoc::invalid_html_tags)]
20196    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20197    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
20198    pub thumbnail: Option<String>,
20199    #[allow(rustdoc::invalid_html_tags)]
20200    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20201    #[serde(skip_serializing_if = "Option::is_none", rename = "cover", default)]
20202    pub cover: Option<String>,
20203    #[allow(rustdoc::invalid_html_tags)]
20204    #[doc = "Optional. Start timestamp for the video in the message"]
20205    #[serde(
20206        skip_serializing_if = "Option::is_none",
20207        rename = "start_timestamp",
20208        default
20209    )]
20210    pub start_timestamp: Option<i64>,
20211    #[allow(rustdoc::invalid_html_tags)]
20212    #[doc = "Optional. Video width"]
20213    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
20214    pub width: Option<i64>,
20215    #[allow(rustdoc::invalid_html_tags)]
20216    #[doc = "Optional. Video height"]
20217    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
20218    pub height: Option<i64>,
20219    #[allow(rustdoc::invalid_html_tags)]
20220    #[doc = "Optional. Video duration in seconds"]
20221    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
20222    pub duration: Option<i64>,
20223    #[allow(rustdoc::invalid_html_tags)]
20224    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
20225    #[serde(
20226        skip_serializing_if = "Option::is_none",
20227        rename = "supports_streaming",
20228        default
20229    )]
20230    pub supports_streaming: Option<bool>,
20231}
20232impl InputPaidMediaVideoBuilder {
20233    #[allow(clippy::too_many_arguments)]
20234    pub fn new(media: String) -> Self {
20235        Self {
20236            tg_type: "video".to_owned(),
20237            media,
20238            thumbnail: None,
20239            cover: None,
20240            start_timestamp: None,
20241            width: None,
20242            height: None,
20243            duration: None,
20244            supports_streaming: None,
20245        }
20246    }
20247    #[allow(rustdoc::invalid_html_tags)]
20248    #[doc = "Type of the media, must be video"]
20249    pub fn set_type(mut self, tg_type: String) -> Self {
20250        self.tg_type = tg_type;
20251        self
20252    }
20253    #[allow(rustdoc::invalid_html_tags)]
20254    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20255    pub fn set_media(mut self, media: String) -> Self {
20256        self.media = media;
20257        self
20258    }
20259    #[allow(rustdoc::invalid_html_tags)]
20260    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20261    pub fn set_thumbnail(mut self, thumbnail: String) -> Self {
20262        self.thumbnail = Some(thumbnail);
20263        self
20264    }
20265    #[allow(rustdoc::invalid_html_tags)]
20266    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
20267    pub fn set_cover(mut self, cover: String) -> Self {
20268        self.cover = Some(cover);
20269        self
20270    }
20271    #[allow(rustdoc::invalid_html_tags)]
20272    #[doc = "Optional. Start timestamp for the video in the message"]
20273    pub fn set_start_timestamp(mut self, start_timestamp: i64) -> Self {
20274        self.start_timestamp = Some(start_timestamp);
20275        self
20276    }
20277    #[allow(rustdoc::invalid_html_tags)]
20278    #[doc = "Optional. Video width"]
20279    pub fn set_width(mut self, width: i64) -> Self {
20280        self.width = Some(width);
20281        self
20282    }
20283    #[allow(rustdoc::invalid_html_tags)]
20284    #[doc = "Optional. Video height"]
20285    pub fn set_height(mut self, height: i64) -> Self {
20286        self.height = Some(height);
20287        self
20288    }
20289    #[allow(rustdoc::invalid_html_tags)]
20290    #[doc = "Optional. Video duration in seconds"]
20291    pub fn set_duration(mut self, duration: i64) -> Self {
20292        self.duration = Some(duration);
20293        self
20294    }
20295    #[allow(rustdoc::invalid_html_tags)]
20296    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
20297    pub fn set_supports_streaming(mut self, supports_streaming: bool) -> Self {
20298        self.supports_streaming = Some(supports_streaming);
20299        self
20300    }
20301    pub fn build(self) -> InputPaidMediaVideo {
20302        InputPaidMediaVideo {
20303            tg_type: self.tg_type,
20304            media: self.media,
20305            thumbnail: self.thumbnail,
20306            cover: self.cover,
20307            start_timestamp: self.start_timestamp,
20308            width: self.width,
20309            height: self.height,
20310            duration: self.duration,
20311            supports_streaming: self.supports_streaming,
20312        }
20313    }
20314}
20315#[allow(rustdoc::invalid_html_tags)]
20316#[doc = "This object represents a gift that can be sent by the bot."]
20317#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20318pub struct Gift {
20319    #[allow(rustdoc::invalid_html_tags)]
20320    #[doc = "Unique identifier of the gift"]
20321    #[serde(rename = "id")]
20322    pub id: String,
20323    #[allow(rustdoc::invalid_html_tags)]
20324    #[doc = "The sticker that represents the gift"]
20325    #[serde(rename = "sticker")]
20326    pub sticker: BoxWrapper<Unbox<Sticker>>,
20327    #[allow(rustdoc::invalid_html_tags)]
20328    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
20329    #[serde(rename = "star_count")]
20330    pub star_count: i64,
20331    #[allow(rustdoc::invalid_html_tags)]
20332    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
20333    #[serde(
20334        skip_serializing_if = "Option::is_none",
20335        rename = "upgrade_star_count",
20336        default
20337    )]
20338    pub upgrade_star_count: Option<i64>,
20339    #[allow(rustdoc::invalid_html_tags)]
20340    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
20341    #[serde(
20342        skip_serializing_if = "Option::is_none",
20343        rename = "total_count",
20344        default
20345    )]
20346    pub total_count: Option<i64>,
20347    #[allow(rustdoc::invalid_html_tags)]
20348    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
20349    #[serde(
20350        skip_serializing_if = "Option::is_none",
20351        rename = "remaining_count",
20352        default
20353    )]
20354    pub remaining_count: Option<i64>,
20355    #[allow(rustdoc::invalid_html_tags)]
20356    #[doc = "Optional. Information about the chat that published the gift"]
20357    #[serde(
20358        skip_serializing_if = "Option::is_none",
20359        rename = "publisher_chat",
20360        default
20361    )]
20362    pub publisher_chat: Option<BoxWrapper<Unbox<Chat>>>,
20363}
20364#[allow(rustdoc::invalid_html_tags)]
20365#[doc = "Companion type to Gift that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
20366#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20367pub struct NoSkipGift {
20368    #[allow(rustdoc::invalid_html_tags)]
20369    #[doc = "Unique identifier of the gift"]
20370    #[serde(rename = "id")]
20371    pub id: String,
20372    #[allow(rustdoc::invalid_html_tags)]
20373    #[doc = "The sticker that represents the gift"]
20374    #[serde(rename = "sticker")]
20375    pub sticker: BoxWrapper<Unbox<Sticker>>,
20376    #[allow(rustdoc::invalid_html_tags)]
20377    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
20378    #[serde(rename = "star_count")]
20379    pub star_count: i64,
20380    pub upgrade_star_count: Option<i64>,
20381    pub total_count: Option<i64>,
20382    pub remaining_count: Option<i64>,
20383    pub publisher_chat: Option<BoxWrapper<Unbox<Chat>>>,
20384}
20385impl From<NoSkipGift> for Gift {
20386    fn from(t: NoSkipGift) -> Self {
20387        Self {
20388            id: t.id,
20389            sticker: t.sticker,
20390            star_count: t.star_count,
20391            upgrade_star_count: t.upgrade_star_count,
20392            total_count: t.total_count,
20393            remaining_count: t.remaining_count,
20394            publisher_chat: t.publisher_chat,
20395        }
20396    }
20397}
20398#[allow(clippy::from_over_into)]
20399impl Into<NoSkipGift> for Gift {
20400    fn into(self) -> NoSkipGift {
20401        NoSkipGift {
20402            id: self.id,
20403            sticker: self.sticker,
20404            star_count: self.star_count,
20405            upgrade_star_count: self.upgrade_star_count,
20406            total_count: self.total_count,
20407            remaining_count: self.remaining_count,
20408            publisher_chat: self.publisher_chat,
20409        }
20410    }
20411}
20412impl NoSkipGift {
20413    pub fn skip(self) -> Gift {
20414        self.into()
20415    }
20416}
20417impl Gift {
20418    pub fn noskip(self) -> NoSkipGift {
20419        self.into()
20420    }
20421}
20422#[allow(rustdoc::invalid_html_tags)]
20423#[doc = "This object represents a gift that can be sent by the bot."]
20424#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20425pub struct GiftBuilder {
20426    #[allow(rustdoc::invalid_html_tags)]
20427    #[doc = "Unique identifier of the gift"]
20428    #[serde(rename = "id")]
20429    pub id: String,
20430    #[allow(rustdoc::invalid_html_tags)]
20431    #[doc = "The sticker that represents the gift"]
20432    #[serde(rename = "sticker")]
20433    pub sticker: BoxWrapper<Unbox<Sticker>>,
20434    #[allow(rustdoc::invalid_html_tags)]
20435    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
20436    #[serde(rename = "star_count")]
20437    pub star_count: i64,
20438    #[allow(rustdoc::invalid_html_tags)]
20439    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
20440    #[serde(
20441        skip_serializing_if = "Option::is_none",
20442        rename = "upgrade_star_count",
20443        default
20444    )]
20445    pub upgrade_star_count: Option<i64>,
20446    #[allow(rustdoc::invalid_html_tags)]
20447    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
20448    #[serde(
20449        skip_serializing_if = "Option::is_none",
20450        rename = "total_count",
20451        default
20452    )]
20453    pub total_count: Option<i64>,
20454    #[allow(rustdoc::invalid_html_tags)]
20455    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
20456    #[serde(
20457        skip_serializing_if = "Option::is_none",
20458        rename = "remaining_count",
20459        default
20460    )]
20461    pub remaining_count: Option<i64>,
20462    #[allow(rustdoc::invalid_html_tags)]
20463    #[doc = "Optional. Information about the chat that published the gift"]
20464    #[serde(
20465        skip_serializing_if = "Option::is_none",
20466        rename = "publisher_chat",
20467        default
20468    )]
20469    pub publisher_chat: Option<BoxWrapper<Unbox<Chat>>>,
20470}
20471impl GiftBuilder {
20472    #[allow(clippy::too_many_arguments)]
20473    pub fn new<A: Into<Sticker>>(id: String, sticker: A, star_count: i64) -> Self {
20474        Self {
20475            id,
20476            sticker: BoxWrapper::new_unbox(sticker.into()),
20477            star_count,
20478            upgrade_star_count: None,
20479            total_count: None,
20480            remaining_count: None,
20481            publisher_chat: None,
20482        }
20483    }
20484    #[allow(rustdoc::invalid_html_tags)]
20485    #[doc = "Unique identifier of the gift"]
20486    pub fn set_id(mut self, id: String) -> Self {
20487        self.id = id;
20488        self
20489    }
20490    #[allow(rustdoc::invalid_html_tags)]
20491    #[doc = "The sticker that represents the gift"]
20492    pub fn set_sticker(mut self, sticker: Sticker) -> Self {
20493        self.sticker = BoxWrapper(Unbox(sticker));
20494        self
20495    }
20496    #[allow(rustdoc::invalid_html_tags)]
20497    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
20498    pub fn set_star_count(mut self, star_count: i64) -> Self {
20499        self.star_count = star_count;
20500        self
20501    }
20502    #[allow(rustdoc::invalid_html_tags)]
20503    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
20504    pub fn set_upgrade_star_count(mut self, upgrade_star_count: i64) -> Self {
20505        self.upgrade_star_count = Some(upgrade_star_count);
20506        self
20507    }
20508    #[allow(rustdoc::invalid_html_tags)]
20509    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
20510    pub fn set_total_count(mut self, total_count: i64) -> Self {
20511        self.total_count = Some(total_count);
20512        self
20513    }
20514    #[allow(rustdoc::invalid_html_tags)]
20515    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
20516    pub fn set_remaining_count(mut self, remaining_count: i64) -> Self {
20517        self.remaining_count = Some(remaining_count);
20518        self
20519    }
20520    #[allow(rustdoc::invalid_html_tags)]
20521    #[doc = "Optional. Information about the chat that published the gift"]
20522    pub fn set_publisher_chat(mut self, publisher_chat: Chat) -> Self {
20523        self.publisher_chat = Some(BoxWrapper(Unbox(publisher_chat)));
20524        self
20525    }
20526    pub fn build(self) -> Gift {
20527        Gift {
20528            id: self.id,
20529            sticker: self.sticker,
20530            star_count: self.star_count,
20531            upgrade_star_count: self.upgrade_star_count,
20532            total_count: self.total_count,
20533            remaining_count: self.remaining_count,
20534            publisher_chat: self.publisher_chat,
20535        }
20536    }
20537}
20538#[allow(rustdoc::invalid_html_tags)]
20539#[doc = "The message was originally sent by a known user."]
20540#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20541pub struct MessageOriginUser {
20542    #[allow(rustdoc::invalid_html_tags)]
20543    #[doc = "Type of the message origin, always \"user\""]
20544    #[serde(rename = "type")]
20545    pub tg_type: String,
20546    #[allow(rustdoc::invalid_html_tags)]
20547    #[doc = "Date the message was sent originally in Unix time"]
20548    #[serde(rename = "date")]
20549    pub date: i64,
20550    #[allow(rustdoc::invalid_html_tags)]
20551    #[doc = "User that sent the message originally"]
20552    #[serde(rename = "sender_user")]
20553    pub sender_user: BoxWrapper<Unbox<User>>,
20554}
20555#[allow(rustdoc::invalid_html_tags)]
20556#[doc = "Companion type to MessageOriginUser that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
20557#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20558pub struct NoSkipMessageOriginUser {
20559    #[allow(rustdoc::invalid_html_tags)]
20560    #[doc = "Type of the message origin, always \"user\""]
20561    #[serde(rename = "type")]
20562    pub tg_type: String,
20563    #[allow(rustdoc::invalid_html_tags)]
20564    #[doc = "Date the message was sent originally in Unix time"]
20565    #[serde(rename = "date")]
20566    pub date: i64,
20567    #[allow(rustdoc::invalid_html_tags)]
20568    #[doc = "User that sent the message originally"]
20569    #[serde(rename = "sender_user")]
20570    pub sender_user: BoxWrapper<Unbox<User>>,
20571}
20572impl From<NoSkipMessageOriginUser> for MessageOriginUser {
20573    fn from(t: NoSkipMessageOriginUser) -> Self {
20574        Self {
20575            tg_type: t.tg_type,
20576            date: t.date,
20577            sender_user: t.sender_user,
20578        }
20579    }
20580}
20581#[allow(clippy::from_over_into)]
20582impl Into<NoSkipMessageOriginUser> for MessageOriginUser {
20583    fn into(self) -> NoSkipMessageOriginUser {
20584        NoSkipMessageOriginUser {
20585            tg_type: self.tg_type,
20586            date: self.date,
20587            sender_user: self.sender_user,
20588        }
20589    }
20590}
20591impl NoSkipMessageOriginUser {
20592    pub fn skip(self) -> MessageOriginUser {
20593        self.into()
20594    }
20595}
20596impl MessageOriginUser {
20597    pub fn noskip(self) -> NoSkipMessageOriginUser {
20598        self.into()
20599    }
20600}
20601#[allow(rustdoc::invalid_html_tags)]
20602#[doc = "The message was originally sent by a known user."]
20603#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20604pub struct MessageOriginUserBuilder {
20605    #[allow(rustdoc::invalid_html_tags)]
20606    #[doc = "Type of the message origin, always \"user\""]
20607    #[serde(rename = "type")]
20608    pub tg_type: String,
20609    #[allow(rustdoc::invalid_html_tags)]
20610    #[doc = "Date the message was sent originally in Unix time"]
20611    #[serde(rename = "date")]
20612    pub date: i64,
20613    #[allow(rustdoc::invalid_html_tags)]
20614    #[doc = "User that sent the message originally"]
20615    #[serde(rename = "sender_user")]
20616    pub sender_user: BoxWrapper<Unbox<User>>,
20617}
20618impl MessageOriginUserBuilder {
20619    #[allow(clippy::too_many_arguments)]
20620    pub fn new<A: Into<User>>(date: i64, sender_user: A) -> Self {
20621        Self {
20622            tg_type: "MessageOriginUser".to_owned(),
20623            date,
20624            sender_user: BoxWrapper::new_unbox(sender_user.into()),
20625        }
20626    }
20627    #[allow(rustdoc::invalid_html_tags)]
20628    #[doc = "Type of the message origin, always \"user\""]
20629    pub fn set_type(mut self, tg_type: String) -> Self {
20630        self.tg_type = tg_type;
20631        self
20632    }
20633    #[allow(rustdoc::invalid_html_tags)]
20634    #[doc = "Date the message was sent originally in Unix time"]
20635    pub fn set_date(mut self, date: i64) -> Self {
20636        self.date = date;
20637        self
20638    }
20639    #[allow(rustdoc::invalid_html_tags)]
20640    #[doc = "User that sent the message originally"]
20641    pub fn set_sender_user(mut self, sender_user: User) -> Self {
20642        self.sender_user = BoxWrapper(Unbox(sender_user));
20643        self
20644    }
20645    pub fn build(self) -> MessageOriginUser {
20646        MessageOriginUser {
20647            tg_type: self.tg_type,
20648            date: self.date,
20649            sender_user: self.sender_user,
20650        }
20651    }
20652}
20653#[allow(rustdoc::invalid_html_tags)]
20654#[doc = "This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.Note: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message."]
20655#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20656pub struct KeyboardButton {
20657    #[allow(rustdoc::invalid_html_tags)]
20658    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
20659    #[serde(rename = "text")]
20660    pub text: String,
20661    #[allow(rustdoc::invalid_html_tags)]
20662    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
20663    #[serde(
20664        skip_serializing_if = "Option::is_none",
20665        rename = "request_users",
20666        default
20667    )]
20668    pub request_users: Option<BoxWrapper<Unbox<KeyboardButtonRequestUsers>>>,
20669    #[allow(rustdoc::invalid_html_tags)]
20670    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
20671    #[serde(
20672        skip_serializing_if = "Option::is_none",
20673        rename = "request_chat",
20674        default
20675    )]
20676    pub request_chat: Option<BoxWrapper<Unbox<KeyboardButtonRequestChat>>>,
20677    #[allow(rustdoc::invalid_html_tags)]
20678    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
20679    #[serde(
20680        skip_serializing_if = "Option::is_none",
20681        rename = "request_contact",
20682        default
20683    )]
20684    pub request_contact: Option<bool>,
20685    #[allow(rustdoc::invalid_html_tags)]
20686    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
20687    #[serde(
20688        skip_serializing_if = "Option::is_none",
20689        rename = "request_location",
20690        default
20691    )]
20692    pub request_location: Option<bool>,
20693    #[allow(rustdoc::invalid_html_tags)]
20694    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
20695    #[serde(
20696        skip_serializing_if = "Option::is_none",
20697        rename = "request_poll",
20698        default
20699    )]
20700    pub request_poll: Option<BoxWrapper<Unbox<KeyboardButtonPollType>>>,
20701    #[allow(rustdoc::invalid_html_tags)]
20702    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
20703    #[serde(skip_serializing_if = "Option::is_none", rename = "web_app", default)]
20704    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
20705}
20706#[allow(rustdoc::invalid_html_tags)]
20707#[doc = "Companion type to KeyboardButton that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
20708#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20709pub struct NoSkipKeyboardButton {
20710    #[allow(rustdoc::invalid_html_tags)]
20711    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
20712    #[serde(rename = "text")]
20713    pub text: String,
20714    pub request_users: Option<BoxWrapper<Unbox<KeyboardButtonRequestUsers>>>,
20715    pub request_chat: Option<BoxWrapper<Unbox<KeyboardButtonRequestChat>>>,
20716    pub request_contact: Option<bool>,
20717    pub request_location: Option<bool>,
20718    pub request_poll: Option<BoxWrapper<Unbox<KeyboardButtonPollType>>>,
20719    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
20720}
20721impl From<NoSkipKeyboardButton> for KeyboardButton {
20722    fn from(t: NoSkipKeyboardButton) -> Self {
20723        Self {
20724            text: t.text,
20725            request_users: t.request_users,
20726            request_chat: t.request_chat,
20727            request_contact: t.request_contact,
20728            request_location: t.request_location,
20729            request_poll: t.request_poll,
20730            web_app: t.web_app,
20731        }
20732    }
20733}
20734#[allow(clippy::from_over_into)]
20735impl Into<NoSkipKeyboardButton> for KeyboardButton {
20736    fn into(self) -> NoSkipKeyboardButton {
20737        NoSkipKeyboardButton {
20738            text: self.text,
20739            request_users: self.request_users,
20740            request_chat: self.request_chat,
20741            request_contact: self.request_contact,
20742            request_location: self.request_location,
20743            request_poll: self.request_poll,
20744            web_app: self.web_app,
20745        }
20746    }
20747}
20748impl NoSkipKeyboardButton {
20749    pub fn skip(self) -> KeyboardButton {
20750        self.into()
20751    }
20752}
20753impl KeyboardButton {
20754    pub fn noskip(self) -> NoSkipKeyboardButton {
20755        self.into()
20756    }
20757}
20758#[allow(rustdoc::invalid_html_tags)]
20759#[doc = "This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.Note: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message."]
20760#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20761pub struct KeyboardButtonBuilder {
20762    #[allow(rustdoc::invalid_html_tags)]
20763    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
20764    #[serde(rename = "text")]
20765    pub text: String,
20766    #[allow(rustdoc::invalid_html_tags)]
20767    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
20768    #[serde(
20769        skip_serializing_if = "Option::is_none",
20770        rename = "request_users",
20771        default
20772    )]
20773    pub request_users: Option<BoxWrapper<Unbox<KeyboardButtonRequestUsers>>>,
20774    #[allow(rustdoc::invalid_html_tags)]
20775    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
20776    #[serde(
20777        skip_serializing_if = "Option::is_none",
20778        rename = "request_chat",
20779        default
20780    )]
20781    pub request_chat: Option<BoxWrapper<Unbox<KeyboardButtonRequestChat>>>,
20782    #[allow(rustdoc::invalid_html_tags)]
20783    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
20784    #[serde(
20785        skip_serializing_if = "Option::is_none",
20786        rename = "request_contact",
20787        default
20788    )]
20789    pub request_contact: Option<bool>,
20790    #[allow(rustdoc::invalid_html_tags)]
20791    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
20792    #[serde(
20793        skip_serializing_if = "Option::is_none",
20794        rename = "request_location",
20795        default
20796    )]
20797    pub request_location: Option<bool>,
20798    #[allow(rustdoc::invalid_html_tags)]
20799    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
20800    #[serde(
20801        skip_serializing_if = "Option::is_none",
20802        rename = "request_poll",
20803        default
20804    )]
20805    pub request_poll: Option<BoxWrapper<Unbox<KeyboardButtonPollType>>>,
20806    #[allow(rustdoc::invalid_html_tags)]
20807    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
20808    #[serde(skip_serializing_if = "Option::is_none", rename = "web_app", default)]
20809    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
20810}
20811impl KeyboardButtonBuilder {
20812    #[allow(clippy::too_many_arguments)]
20813    pub fn new(text: String) -> Self {
20814        Self {
20815            text,
20816            request_users: None,
20817            request_chat: None,
20818            request_contact: None,
20819            request_location: None,
20820            request_poll: None,
20821            web_app: None,
20822        }
20823    }
20824    #[allow(rustdoc::invalid_html_tags)]
20825    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
20826    pub fn set_text(mut self, text: String) -> Self {
20827        self.text = text;
20828        self
20829    }
20830    #[allow(rustdoc::invalid_html_tags)]
20831    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
20832    pub fn set_request_users(mut self, request_users: KeyboardButtonRequestUsers) -> Self {
20833        self.request_users = Some(BoxWrapper(Unbox(request_users)));
20834        self
20835    }
20836    #[allow(rustdoc::invalid_html_tags)]
20837    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
20838    pub fn set_request_chat(mut self, request_chat: KeyboardButtonRequestChat) -> Self {
20839        self.request_chat = Some(BoxWrapper(Unbox(request_chat)));
20840        self
20841    }
20842    #[allow(rustdoc::invalid_html_tags)]
20843    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
20844    pub fn set_request_contact(mut self, request_contact: bool) -> Self {
20845        self.request_contact = Some(request_contact);
20846        self
20847    }
20848    #[allow(rustdoc::invalid_html_tags)]
20849    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
20850    pub fn set_request_location(mut self, request_location: bool) -> Self {
20851        self.request_location = Some(request_location);
20852        self
20853    }
20854    #[allow(rustdoc::invalid_html_tags)]
20855    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
20856    pub fn set_request_poll(mut self, request_poll: KeyboardButtonPollType) -> Self {
20857        self.request_poll = Some(BoxWrapper(Unbox(request_poll)));
20858        self
20859    }
20860    #[allow(rustdoc::invalid_html_tags)]
20861    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
20862    pub fn set_web_app(mut self, web_app: WebAppInfo) -> Self {
20863        self.web_app = Some(BoxWrapper(Unbox(web_app)));
20864        self
20865    }
20866    pub fn build(self) -> KeyboardButton {
20867        KeyboardButton {
20868            text: self.text,
20869            request_users: self.request_users,
20870            request_chat: self.request_chat,
20871            request_contact: self.request_contact,
20872            request_location: self.request_location,
20873            request_poll: self.request_poll,
20874            web_app: self.web_app,
20875        }
20876    }
20877}
20878#[allow(rustdoc::invalid_html_tags)]
20879#[doc = "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation."]
20880#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20881pub struct InlineQueryResultCachedMpeg4Gif {
20882    #[allow(rustdoc::invalid_html_tags)]
20883    #[doc = "Type of the result, must be mpeg4_gif"]
20884    #[serde(rename = "type")]
20885    pub tg_type: String,
20886    #[allow(rustdoc::invalid_html_tags)]
20887    #[doc = "Unique identifier for this result, 1-64 bytes"]
20888    #[serde(rename = "id")]
20889    pub id: String,
20890    #[allow(rustdoc::invalid_html_tags)]
20891    #[doc = "A valid file identifier for the MPEG4 file"]
20892    #[serde(rename = "mpeg4_file_id")]
20893    pub mpeg_4_file_id: String,
20894    #[allow(rustdoc::invalid_html_tags)]
20895    #[doc = "Optional. Title for the result"]
20896    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
20897    pub title: Option<String>,
20898    #[allow(rustdoc::invalid_html_tags)]
20899    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
20900    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
20901    pub caption: Option<String>,
20902    #[allow(rustdoc::invalid_html_tags)]
20903    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
20904    #[serde(
20905        skip_serializing_if = "Option::is_none",
20906        rename = "parse_mode",
20907        default
20908    )]
20909    pub parse_mode: Option<String>,
20910    #[allow(rustdoc::invalid_html_tags)]
20911    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
20912    #[serde(
20913        skip_serializing_if = "Option::is_none",
20914        rename = "caption_entities",
20915        default
20916    )]
20917    pub caption_entities: Option<Vec<MessageEntity>>,
20918    #[allow(rustdoc::invalid_html_tags)]
20919    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
20920    #[serde(
20921        skip_serializing_if = "Option::is_none",
20922        rename = "show_caption_above_media",
20923        default
20924    )]
20925    pub show_caption_above_media: Option<bool>,
20926    #[allow(rustdoc::invalid_html_tags)]
20927    #[doc = "Optional. Inline keyboard attached to the message"]
20928    #[serde(
20929        skip_serializing_if = "Option::is_none",
20930        rename = "reply_markup",
20931        default
20932    )]
20933    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
20934    #[allow(rustdoc::invalid_html_tags)]
20935    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
20936    #[serde(
20937        skip_serializing_if = "Option::is_none",
20938        rename = "input_message_content",
20939        default
20940    )]
20941    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
20942}
20943#[allow(rustdoc::invalid_html_tags)]
20944#[doc = "Companion type to InlineQueryResultCachedMpeg4Gif that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
20945#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20946pub struct NoSkipInlineQueryResultCachedMpeg4Gif {
20947    #[allow(rustdoc::invalid_html_tags)]
20948    #[doc = "Type of the result, must be mpeg4_gif"]
20949    #[serde(rename = "type")]
20950    pub tg_type: String,
20951    #[allow(rustdoc::invalid_html_tags)]
20952    #[doc = "Unique identifier for this result, 1-64 bytes"]
20953    #[serde(rename = "id")]
20954    pub id: String,
20955    #[allow(rustdoc::invalid_html_tags)]
20956    #[doc = "A valid file identifier for the MPEG4 file"]
20957    #[serde(rename = "mpeg4_file_id")]
20958    pub mpeg_4_file_id: String,
20959    pub title: Option<String>,
20960    pub caption: Option<String>,
20961    pub parse_mode: Option<String>,
20962    pub caption_entities: Option<Vec<MessageEntity>>,
20963    pub show_caption_above_media: Option<bool>,
20964    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
20965    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
20966}
20967impl From<NoSkipInlineQueryResultCachedMpeg4Gif> for InlineQueryResultCachedMpeg4Gif {
20968    fn from(t: NoSkipInlineQueryResultCachedMpeg4Gif) -> Self {
20969        Self {
20970            tg_type: t.tg_type,
20971            id: t.id,
20972            mpeg_4_file_id: t.mpeg_4_file_id,
20973            title: t.title,
20974            caption: t.caption,
20975            parse_mode: t.parse_mode,
20976            caption_entities: t.caption_entities,
20977            show_caption_above_media: t.show_caption_above_media,
20978            reply_markup: t.reply_markup,
20979            input_message_content: t.input_message_content,
20980        }
20981    }
20982}
20983#[allow(clippy::from_over_into)]
20984impl Into<NoSkipInlineQueryResultCachedMpeg4Gif> for InlineQueryResultCachedMpeg4Gif {
20985    fn into(self) -> NoSkipInlineQueryResultCachedMpeg4Gif {
20986        NoSkipInlineQueryResultCachedMpeg4Gif {
20987            tg_type: self.tg_type,
20988            id: self.id,
20989            mpeg_4_file_id: self.mpeg_4_file_id,
20990            title: self.title,
20991            caption: self.caption,
20992            parse_mode: self.parse_mode,
20993            caption_entities: self.caption_entities,
20994            show_caption_above_media: self.show_caption_above_media,
20995            reply_markup: self.reply_markup,
20996            input_message_content: self.input_message_content,
20997        }
20998    }
20999}
21000impl NoSkipInlineQueryResultCachedMpeg4Gif {
21001    pub fn skip(self) -> InlineQueryResultCachedMpeg4Gif {
21002        self.into()
21003    }
21004}
21005impl InlineQueryResultCachedMpeg4Gif {
21006    pub fn noskip(self) -> NoSkipInlineQueryResultCachedMpeg4Gif {
21007        self.into()
21008    }
21009}
21010#[allow(rustdoc::invalid_html_tags)]
21011#[doc = "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation."]
21012#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21013pub struct InlineQueryResultCachedMpeg4GifBuilder {
21014    #[allow(rustdoc::invalid_html_tags)]
21015    #[doc = "Type of the result, must be mpeg4_gif"]
21016    #[serde(rename = "type")]
21017    pub tg_type: String,
21018    #[allow(rustdoc::invalid_html_tags)]
21019    #[doc = "Unique identifier for this result, 1-64 bytes"]
21020    #[serde(rename = "id")]
21021    pub id: String,
21022    #[allow(rustdoc::invalid_html_tags)]
21023    #[doc = "A valid file identifier for the MPEG4 file"]
21024    #[serde(rename = "mpeg4_file_id")]
21025    pub mpeg_4_file_id: String,
21026    #[allow(rustdoc::invalid_html_tags)]
21027    #[doc = "Optional. Title for the result"]
21028    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
21029    pub title: Option<String>,
21030    #[allow(rustdoc::invalid_html_tags)]
21031    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
21032    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
21033    pub caption: Option<String>,
21034    #[allow(rustdoc::invalid_html_tags)]
21035    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
21036    #[serde(
21037        skip_serializing_if = "Option::is_none",
21038        rename = "parse_mode",
21039        default
21040    )]
21041    pub parse_mode: Option<String>,
21042    #[allow(rustdoc::invalid_html_tags)]
21043    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
21044    #[serde(
21045        skip_serializing_if = "Option::is_none",
21046        rename = "caption_entities",
21047        default
21048    )]
21049    pub caption_entities: Option<Vec<MessageEntity>>,
21050    #[allow(rustdoc::invalid_html_tags)]
21051    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
21052    #[serde(
21053        skip_serializing_if = "Option::is_none",
21054        rename = "show_caption_above_media",
21055        default
21056    )]
21057    pub show_caption_above_media: Option<bool>,
21058    #[allow(rustdoc::invalid_html_tags)]
21059    #[doc = "Optional. Inline keyboard attached to the message"]
21060    #[serde(
21061        skip_serializing_if = "Option::is_none",
21062        rename = "reply_markup",
21063        default
21064    )]
21065    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
21066    #[allow(rustdoc::invalid_html_tags)]
21067    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
21068    #[serde(
21069        skip_serializing_if = "Option::is_none",
21070        rename = "input_message_content",
21071        default
21072    )]
21073    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
21074}
21075impl InlineQueryResultCachedMpeg4GifBuilder {
21076    #[allow(clippy::too_many_arguments)]
21077    pub fn new(id: String, mpeg_4_file_id: String) -> Self {
21078        Self {
21079            tg_type: "mpeg4_gif".to_owned(),
21080            id,
21081            mpeg_4_file_id,
21082            title: None,
21083            caption: None,
21084            parse_mode: None,
21085            caption_entities: None,
21086            show_caption_above_media: None,
21087            reply_markup: None,
21088            input_message_content: None,
21089        }
21090    }
21091    #[allow(rustdoc::invalid_html_tags)]
21092    #[doc = "Type of the result, must be mpeg4_gif"]
21093    pub fn set_type(mut self, tg_type: String) -> Self {
21094        self.tg_type = tg_type;
21095        self
21096    }
21097    #[allow(rustdoc::invalid_html_tags)]
21098    #[doc = "Unique identifier for this result, 1-64 bytes"]
21099    pub fn set_id(mut self, id: String) -> Self {
21100        self.id = id;
21101        self
21102    }
21103    #[allow(rustdoc::invalid_html_tags)]
21104    #[doc = "A valid file identifier for the MPEG4 file"]
21105    pub fn set_mpeg_4_file_id(mut self, mpeg_4_file_id: String) -> Self {
21106        self.mpeg_4_file_id = mpeg_4_file_id;
21107        self
21108    }
21109    #[allow(rustdoc::invalid_html_tags)]
21110    #[doc = "Optional. Title for the result"]
21111    pub fn set_title(mut self, title: String) -> Self {
21112        self.title = Some(title);
21113        self
21114    }
21115    #[allow(rustdoc::invalid_html_tags)]
21116    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
21117    pub fn set_caption(mut self, caption: String) -> Self {
21118        self.caption = Some(caption);
21119        self
21120    }
21121    #[allow(rustdoc::invalid_html_tags)]
21122    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
21123    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
21124        self.parse_mode = Some(parse_mode);
21125        self
21126    }
21127    #[allow(rustdoc::invalid_html_tags)]
21128    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
21129    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
21130        self.caption_entities = Some(caption_entities);
21131        self
21132    }
21133    #[allow(rustdoc::invalid_html_tags)]
21134    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
21135    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
21136        self.show_caption_above_media = Some(show_caption_above_media);
21137        self
21138    }
21139    #[allow(rustdoc::invalid_html_tags)]
21140    #[doc = "Optional. Inline keyboard attached to the message"]
21141    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
21142        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
21143        self
21144    }
21145    #[allow(rustdoc::invalid_html_tags)]
21146    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
21147    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
21148        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
21149        self
21150    }
21151    pub fn build(self) -> InlineQueryResultCachedMpeg4Gif {
21152        InlineQueryResultCachedMpeg4Gif {
21153            tg_type: self.tg_type,
21154            id: self.id,
21155            mpeg_4_file_id: self.mpeg_4_file_id,
21156            title: self.title,
21157            caption: self.caption,
21158            parse_mode: self.parse_mode,
21159            caption_entities: self.caption_entities,
21160            show_caption_above_media: self.show_caption_above_media,
21161            reply_markup: self.reply_markup,
21162            input_message_content: self.input_message_content,
21163        }
21164    }
21165}
21166#[allow(rustdoc::invalid_html_tags)]
21167#[doc = "Represents the content of an invoice message to be sent as the result of an inline query."]
21168#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21169pub struct InputInvoiceMessageContent {
21170    #[allow(rustdoc::invalid_html_tags)]
21171    #[doc = "Product name, 1-32 characters"]
21172    #[serde(rename = "title")]
21173    pub title: String,
21174    #[allow(rustdoc::invalid_html_tags)]
21175    #[doc = "Product description, 1-255 characters"]
21176    #[serde(rename = "description")]
21177    pub description: String,
21178    #[allow(rustdoc::invalid_html_tags)]
21179    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
21180    #[serde(rename = "payload")]
21181    pub payload: String,
21182    #[allow(rustdoc::invalid_html_tags)]
21183    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
21184    #[serde(
21185        skip_serializing_if = "Option::is_none",
21186        rename = "provider_token",
21187        default
21188    )]
21189    pub provider_token: Option<String>,
21190    #[allow(rustdoc::invalid_html_tags)]
21191    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
21192    #[serde(rename = "currency")]
21193    pub currency: String,
21194    #[allow(rustdoc::invalid_html_tags)]
21195    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
21196    #[serde(rename = "prices")]
21197    pub prices: Vec<LabeledPrice>,
21198    #[allow(rustdoc::invalid_html_tags)]
21199    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
21200    #[serde(
21201        skip_serializing_if = "Option::is_none",
21202        rename = "max_tip_amount",
21203        default
21204    )]
21205    pub max_tip_amount: Option<i64>,
21206    #[allow(rustdoc::invalid_html_tags)]
21207    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
21208    #[serde(
21209        skip_serializing_if = "Option::is_none",
21210        rename = "suggested_tip_amounts",
21211        default
21212    )]
21213    pub suggested_tip_amounts: Option<Vec<i64>>,
21214    #[allow(rustdoc::invalid_html_tags)]
21215    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
21216    #[serde(
21217        skip_serializing_if = "Option::is_none",
21218        rename = "provider_data",
21219        default
21220    )]
21221    pub provider_data: Option<String>,
21222    #[allow(rustdoc::invalid_html_tags)]
21223    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
21224    #[serde(skip_serializing_if = "Option::is_none", rename = "photo_url", default)]
21225    pub photo_url: Option<String>,
21226    #[allow(rustdoc::invalid_html_tags)]
21227    #[doc = "Optional. Photo size in bytes"]
21228    #[serde(
21229        skip_serializing_if = "Option::is_none",
21230        rename = "photo_size",
21231        default
21232    )]
21233    pub photo_size: Option<i64>,
21234    #[allow(rustdoc::invalid_html_tags)]
21235    #[doc = "Optional. Photo width"]
21236    #[serde(
21237        skip_serializing_if = "Option::is_none",
21238        rename = "photo_width",
21239        default
21240    )]
21241    pub photo_width: Option<i64>,
21242    #[allow(rustdoc::invalid_html_tags)]
21243    #[doc = "Optional. Photo height"]
21244    #[serde(
21245        skip_serializing_if = "Option::is_none",
21246        rename = "photo_height",
21247        default
21248    )]
21249    pub photo_height: Option<i64>,
21250    #[allow(rustdoc::invalid_html_tags)]
21251    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
21252    #[serde(skip_serializing_if = "Option::is_none", rename = "need_name", default)]
21253    pub need_name: Option<bool>,
21254    #[allow(rustdoc::invalid_html_tags)]
21255    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
21256    #[serde(
21257        skip_serializing_if = "Option::is_none",
21258        rename = "need_phone_number",
21259        default
21260    )]
21261    pub need_phone_number: Option<bool>,
21262    #[allow(rustdoc::invalid_html_tags)]
21263    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
21264    #[serde(
21265        skip_serializing_if = "Option::is_none",
21266        rename = "need_email",
21267        default
21268    )]
21269    pub need_email: Option<bool>,
21270    #[allow(rustdoc::invalid_html_tags)]
21271    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
21272    #[serde(
21273        skip_serializing_if = "Option::is_none",
21274        rename = "need_shipping_address",
21275        default
21276    )]
21277    pub need_shipping_address: Option<bool>,
21278    #[allow(rustdoc::invalid_html_tags)]
21279    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
21280    #[serde(
21281        skip_serializing_if = "Option::is_none",
21282        rename = "send_phone_number_to_provider",
21283        default
21284    )]
21285    pub send_phone_number_to_provider: Option<bool>,
21286    #[allow(rustdoc::invalid_html_tags)]
21287    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
21288    #[serde(
21289        skip_serializing_if = "Option::is_none",
21290        rename = "send_email_to_provider",
21291        default
21292    )]
21293    pub send_email_to_provider: Option<bool>,
21294    #[allow(rustdoc::invalid_html_tags)]
21295    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
21296    #[serde(
21297        skip_serializing_if = "Option::is_none",
21298        rename = "is_flexible",
21299        default
21300    )]
21301    pub is_flexible: Option<bool>,
21302}
21303#[allow(rustdoc::invalid_html_tags)]
21304#[doc = "Companion type to InputInvoiceMessageContent that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
21305#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21306pub struct NoSkipInputInvoiceMessageContent {
21307    #[allow(rustdoc::invalid_html_tags)]
21308    #[doc = "Product name, 1-32 characters"]
21309    #[serde(rename = "title")]
21310    pub title: String,
21311    #[allow(rustdoc::invalid_html_tags)]
21312    #[doc = "Product description, 1-255 characters"]
21313    #[serde(rename = "description")]
21314    pub description: String,
21315    #[allow(rustdoc::invalid_html_tags)]
21316    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
21317    #[serde(rename = "payload")]
21318    pub payload: String,
21319    pub provider_token: Option<String>,
21320    #[allow(rustdoc::invalid_html_tags)]
21321    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
21322    #[serde(rename = "currency")]
21323    pub currency: String,
21324    #[allow(rustdoc::invalid_html_tags)]
21325    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
21326    #[serde(rename = "prices")]
21327    pub prices: Vec<LabeledPrice>,
21328    pub max_tip_amount: Option<i64>,
21329    pub suggested_tip_amounts: Option<Vec<i64>>,
21330    pub provider_data: Option<String>,
21331    pub photo_url: Option<String>,
21332    pub photo_size: Option<i64>,
21333    pub photo_width: Option<i64>,
21334    pub photo_height: Option<i64>,
21335    pub need_name: Option<bool>,
21336    pub need_phone_number: Option<bool>,
21337    pub need_email: Option<bool>,
21338    pub need_shipping_address: Option<bool>,
21339    pub send_phone_number_to_provider: Option<bool>,
21340    pub send_email_to_provider: Option<bool>,
21341    pub is_flexible: Option<bool>,
21342}
21343impl From<NoSkipInputInvoiceMessageContent> for InputInvoiceMessageContent {
21344    fn from(t: NoSkipInputInvoiceMessageContent) -> Self {
21345        Self {
21346            title: t.title,
21347            description: t.description,
21348            payload: t.payload,
21349            provider_token: t.provider_token,
21350            currency: t.currency,
21351            prices: t.prices,
21352            max_tip_amount: t.max_tip_amount,
21353            suggested_tip_amounts: t.suggested_tip_amounts,
21354            provider_data: t.provider_data,
21355            photo_url: t.photo_url,
21356            photo_size: t.photo_size,
21357            photo_width: t.photo_width,
21358            photo_height: t.photo_height,
21359            need_name: t.need_name,
21360            need_phone_number: t.need_phone_number,
21361            need_email: t.need_email,
21362            need_shipping_address: t.need_shipping_address,
21363            send_phone_number_to_provider: t.send_phone_number_to_provider,
21364            send_email_to_provider: t.send_email_to_provider,
21365            is_flexible: t.is_flexible,
21366        }
21367    }
21368}
21369#[allow(clippy::from_over_into)]
21370impl Into<NoSkipInputInvoiceMessageContent> for InputInvoiceMessageContent {
21371    fn into(self) -> NoSkipInputInvoiceMessageContent {
21372        NoSkipInputInvoiceMessageContent {
21373            title: self.title,
21374            description: self.description,
21375            payload: self.payload,
21376            provider_token: self.provider_token,
21377            currency: self.currency,
21378            prices: self.prices,
21379            max_tip_amount: self.max_tip_amount,
21380            suggested_tip_amounts: self.suggested_tip_amounts,
21381            provider_data: self.provider_data,
21382            photo_url: self.photo_url,
21383            photo_size: self.photo_size,
21384            photo_width: self.photo_width,
21385            photo_height: self.photo_height,
21386            need_name: self.need_name,
21387            need_phone_number: self.need_phone_number,
21388            need_email: self.need_email,
21389            need_shipping_address: self.need_shipping_address,
21390            send_phone_number_to_provider: self.send_phone_number_to_provider,
21391            send_email_to_provider: self.send_email_to_provider,
21392            is_flexible: self.is_flexible,
21393        }
21394    }
21395}
21396impl NoSkipInputInvoiceMessageContent {
21397    pub fn skip(self) -> InputInvoiceMessageContent {
21398        self.into()
21399    }
21400}
21401impl InputInvoiceMessageContent {
21402    pub fn noskip(self) -> NoSkipInputInvoiceMessageContent {
21403        self.into()
21404    }
21405}
21406#[allow(rustdoc::invalid_html_tags)]
21407#[doc = "Represents the content of an invoice message to be sent as the result of an inline query."]
21408#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21409pub struct InputInvoiceMessageContentBuilder {
21410    #[allow(rustdoc::invalid_html_tags)]
21411    #[doc = "Product name, 1-32 characters"]
21412    #[serde(rename = "title")]
21413    pub title: String,
21414    #[allow(rustdoc::invalid_html_tags)]
21415    #[doc = "Product description, 1-255 characters"]
21416    #[serde(rename = "description")]
21417    pub description: String,
21418    #[allow(rustdoc::invalid_html_tags)]
21419    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
21420    #[serde(rename = "payload")]
21421    pub payload: String,
21422    #[allow(rustdoc::invalid_html_tags)]
21423    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
21424    #[serde(
21425        skip_serializing_if = "Option::is_none",
21426        rename = "provider_token",
21427        default
21428    )]
21429    pub provider_token: Option<String>,
21430    #[allow(rustdoc::invalid_html_tags)]
21431    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
21432    #[serde(rename = "currency")]
21433    pub currency: String,
21434    #[allow(rustdoc::invalid_html_tags)]
21435    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
21436    #[serde(rename = "prices")]
21437    pub prices: Vec<LabeledPrice>,
21438    #[allow(rustdoc::invalid_html_tags)]
21439    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
21440    #[serde(
21441        skip_serializing_if = "Option::is_none",
21442        rename = "max_tip_amount",
21443        default
21444    )]
21445    pub max_tip_amount: Option<i64>,
21446    #[allow(rustdoc::invalid_html_tags)]
21447    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
21448    #[serde(
21449        skip_serializing_if = "Option::is_none",
21450        rename = "suggested_tip_amounts",
21451        default
21452    )]
21453    pub suggested_tip_amounts: Option<Vec<i64>>,
21454    #[allow(rustdoc::invalid_html_tags)]
21455    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
21456    #[serde(
21457        skip_serializing_if = "Option::is_none",
21458        rename = "provider_data",
21459        default
21460    )]
21461    pub provider_data: Option<String>,
21462    #[allow(rustdoc::invalid_html_tags)]
21463    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
21464    #[serde(skip_serializing_if = "Option::is_none", rename = "photo_url", default)]
21465    pub photo_url: Option<String>,
21466    #[allow(rustdoc::invalid_html_tags)]
21467    #[doc = "Optional. Photo size in bytes"]
21468    #[serde(
21469        skip_serializing_if = "Option::is_none",
21470        rename = "photo_size",
21471        default
21472    )]
21473    pub photo_size: Option<i64>,
21474    #[allow(rustdoc::invalid_html_tags)]
21475    #[doc = "Optional. Photo width"]
21476    #[serde(
21477        skip_serializing_if = "Option::is_none",
21478        rename = "photo_width",
21479        default
21480    )]
21481    pub photo_width: Option<i64>,
21482    #[allow(rustdoc::invalid_html_tags)]
21483    #[doc = "Optional. Photo height"]
21484    #[serde(
21485        skip_serializing_if = "Option::is_none",
21486        rename = "photo_height",
21487        default
21488    )]
21489    pub photo_height: Option<i64>,
21490    #[allow(rustdoc::invalid_html_tags)]
21491    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
21492    #[serde(skip_serializing_if = "Option::is_none", rename = "need_name", default)]
21493    pub need_name: Option<bool>,
21494    #[allow(rustdoc::invalid_html_tags)]
21495    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
21496    #[serde(
21497        skip_serializing_if = "Option::is_none",
21498        rename = "need_phone_number",
21499        default
21500    )]
21501    pub need_phone_number: Option<bool>,
21502    #[allow(rustdoc::invalid_html_tags)]
21503    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
21504    #[serde(
21505        skip_serializing_if = "Option::is_none",
21506        rename = "need_email",
21507        default
21508    )]
21509    pub need_email: Option<bool>,
21510    #[allow(rustdoc::invalid_html_tags)]
21511    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
21512    #[serde(
21513        skip_serializing_if = "Option::is_none",
21514        rename = "need_shipping_address",
21515        default
21516    )]
21517    pub need_shipping_address: Option<bool>,
21518    #[allow(rustdoc::invalid_html_tags)]
21519    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
21520    #[serde(
21521        skip_serializing_if = "Option::is_none",
21522        rename = "send_phone_number_to_provider",
21523        default
21524    )]
21525    pub send_phone_number_to_provider: Option<bool>,
21526    #[allow(rustdoc::invalid_html_tags)]
21527    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
21528    #[serde(
21529        skip_serializing_if = "Option::is_none",
21530        rename = "send_email_to_provider",
21531        default
21532    )]
21533    pub send_email_to_provider: Option<bool>,
21534    #[allow(rustdoc::invalid_html_tags)]
21535    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
21536    #[serde(
21537        skip_serializing_if = "Option::is_none",
21538        rename = "is_flexible",
21539        default
21540    )]
21541    pub is_flexible: Option<bool>,
21542}
21543impl InputInvoiceMessageContentBuilder {
21544    #[allow(clippy::too_many_arguments)]
21545    pub fn new(
21546        title: String,
21547        description: String,
21548        payload: String,
21549        currency: String,
21550        prices: Vec<LabeledPrice>,
21551    ) -> Self {
21552        Self {
21553            title,
21554            description,
21555            payload,
21556            currency,
21557            prices,
21558            provider_token: None,
21559            max_tip_amount: None,
21560            suggested_tip_amounts: None,
21561            provider_data: None,
21562            photo_url: None,
21563            photo_size: None,
21564            photo_width: None,
21565            photo_height: None,
21566            need_name: None,
21567            need_phone_number: None,
21568            need_email: None,
21569            need_shipping_address: None,
21570            send_phone_number_to_provider: None,
21571            send_email_to_provider: None,
21572            is_flexible: None,
21573        }
21574    }
21575    #[allow(rustdoc::invalid_html_tags)]
21576    #[doc = "Product name, 1-32 characters"]
21577    pub fn set_title(mut self, title: String) -> Self {
21578        self.title = title;
21579        self
21580    }
21581    #[allow(rustdoc::invalid_html_tags)]
21582    #[doc = "Product description, 1-255 characters"]
21583    pub fn set_description(mut self, description: String) -> Self {
21584        self.description = description;
21585        self
21586    }
21587    #[allow(rustdoc::invalid_html_tags)]
21588    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
21589    pub fn set_payload(mut self, payload: String) -> Self {
21590        self.payload = payload;
21591        self
21592    }
21593    #[allow(rustdoc::invalid_html_tags)]
21594    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
21595    pub fn set_provider_token(mut self, provider_token: String) -> Self {
21596        self.provider_token = Some(provider_token);
21597        self
21598    }
21599    #[allow(rustdoc::invalid_html_tags)]
21600    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
21601    pub fn set_currency(mut self, currency: String) -> Self {
21602        self.currency = currency;
21603        self
21604    }
21605    #[allow(rustdoc::invalid_html_tags)]
21606    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
21607    pub fn set_prices(mut self, prices: Vec<LabeledPrice>) -> Self {
21608        self.prices = prices;
21609        self
21610    }
21611    #[allow(rustdoc::invalid_html_tags)]
21612    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
21613    pub fn set_max_tip_amount(mut self, max_tip_amount: i64) -> Self {
21614        self.max_tip_amount = Some(max_tip_amount);
21615        self
21616    }
21617    #[allow(rustdoc::invalid_html_tags)]
21618    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
21619    pub fn set_suggested_tip_amounts(mut self, suggested_tip_amounts: Vec<i64>) -> Self {
21620        self.suggested_tip_amounts = Some(suggested_tip_amounts);
21621        self
21622    }
21623    #[allow(rustdoc::invalid_html_tags)]
21624    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
21625    pub fn set_provider_data(mut self, provider_data: String) -> Self {
21626        self.provider_data = Some(provider_data);
21627        self
21628    }
21629    #[allow(rustdoc::invalid_html_tags)]
21630    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
21631    pub fn set_photo_url(mut self, photo_url: String) -> Self {
21632        self.photo_url = Some(photo_url);
21633        self
21634    }
21635    #[allow(rustdoc::invalid_html_tags)]
21636    #[doc = "Optional. Photo size in bytes"]
21637    pub fn set_photo_size(mut self, photo_size: i64) -> Self {
21638        self.photo_size = Some(photo_size);
21639        self
21640    }
21641    #[allow(rustdoc::invalid_html_tags)]
21642    #[doc = "Optional. Photo width"]
21643    pub fn set_photo_width(mut self, photo_width: i64) -> Self {
21644        self.photo_width = Some(photo_width);
21645        self
21646    }
21647    #[allow(rustdoc::invalid_html_tags)]
21648    #[doc = "Optional. Photo height"]
21649    pub fn set_photo_height(mut self, photo_height: i64) -> Self {
21650        self.photo_height = Some(photo_height);
21651        self
21652    }
21653    #[allow(rustdoc::invalid_html_tags)]
21654    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
21655    pub fn set_need_name(mut self, need_name: bool) -> Self {
21656        self.need_name = Some(need_name);
21657        self
21658    }
21659    #[allow(rustdoc::invalid_html_tags)]
21660    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
21661    pub fn set_need_phone_number(mut self, need_phone_number: bool) -> Self {
21662        self.need_phone_number = Some(need_phone_number);
21663        self
21664    }
21665    #[allow(rustdoc::invalid_html_tags)]
21666    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
21667    pub fn set_need_email(mut self, need_email: bool) -> Self {
21668        self.need_email = Some(need_email);
21669        self
21670    }
21671    #[allow(rustdoc::invalid_html_tags)]
21672    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
21673    pub fn set_need_shipping_address(mut self, need_shipping_address: bool) -> Self {
21674        self.need_shipping_address = Some(need_shipping_address);
21675        self
21676    }
21677    #[allow(rustdoc::invalid_html_tags)]
21678    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
21679    pub fn set_send_phone_number_to_provider(
21680        mut self,
21681        send_phone_number_to_provider: bool,
21682    ) -> Self {
21683        self.send_phone_number_to_provider = Some(send_phone_number_to_provider);
21684        self
21685    }
21686    #[allow(rustdoc::invalid_html_tags)]
21687    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
21688    pub fn set_send_email_to_provider(mut self, send_email_to_provider: bool) -> Self {
21689        self.send_email_to_provider = Some(send_email_to_provider);
21690        self
21691    }
21692    #[allow(rustdoc::invalid_html_tags)]
21693    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
21694    pub fn set_is_flexible(mut self, is_flexible: bool) -> Self {
21695        self.is_flexible = Some(is_flexible);
21696        self
21697    }
21698    pub fn build(self) -> InputInvoiceMessageContent {
21699        InputInvoiceMessageContent {
21700            title: self.title,
21701            description: self.description,
21702            payload: self.payload,
21703            provider_token: self.provider_token,
21704            currency: self.currency,
21705            prices: self.prices,
21706            max_tip_amount: self.max_tip_amount,
21707            suggested_tip_amounts: self.suggested_tip_amounts,
21708            provider_data: self.provider_data,
21709            photo_url: self.photo_url,
21710            photo_size: self.photo_size,
21711            photo_width: self.photo_width,
21712            photo_height: self.photo_height,
21713            need_name: self.need_name,
21714            need_phone_number: self.need_phone_number,
21715            need_email: self.need_email,
21716            need_shipping_address: self.need_shipping_address,
21717            send_phone_number_to_provider: self.send_phone_number_to_provider,
21718            send_email_to_provider: self.send_email_to_provider,
21719            is_flexible: self.is_flexible,
21720        }
21721    }
21722}
21723#[allow(rustdoc::invalid_html_tags)]
21724#[doc = "Represents the rights of a business bot."]
21725#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21726pub struct BusinessBotRights {
21727    #[allow(rustdoc::invalid_html_tags)]
21728    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
21729    #[serde(skip_serializing_if = "Option::is_none", rename = "can_reply", default)]
21730    pub can_reply: Option<bool>,
21731    #[allow(rustdoc::invalid_html_tags)]
21732    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
21733    #[serde(
21734        skip_serializing_if = "Option::is_none",
21735        rename = "can_read_messages",
21736        default
21737    )]
21738    pub can_read_messages: Option<bool>,
21739    #[allow(rustdoc::invalid_html_tags)]
21740    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
21741    #[serde(
21742        skip_serializing_if = "Option::is_none",
21743        rename = "can_delete_sent_messages",
21744        default
21745    )]
21746    pub can_delete_sent_messages: Option<bool>,
21747    #[allow(rustdoc::invalid_html_tags)]
21748    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
21749    #[serde(
21750        skip_serializing_if = "Option::is_none",
21751        rename = "can_delete_all_messages",
21752        default
21753    )]
21754    pub can_delete_all_messages: Option<bool>,
21755    #[allow(rustdoc::invalid_html_tags)]
21756    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
21757    #[serde(
21758        skip_serializing_if = "Option::is_none",
21759        rename = "can_edit_name",
21760        default
21761    )]
21762    pub can_edit_name: Option<bool>,
21763    #[allow(rustdoc::invalid_html_tags)]
21764    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
21765    #[serde(
21766        skip_serializing_if = "Option::is_none",
21767        rename = "can_edit_bio",
21768        default
21769    )]
21770    pub can_edit_bio: Option<bool>,
21771    #[allow(rustdoc::invalid_html_tags)]
21772    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
21773    #[serde(
21774        skip_serializing_if = "Option::is_none",
21775        rename = "can_edit_profile_photo",
21776        default
21777    )]
21778    pub can_edit_profile_photo: Option<bool>,
21779    #[allow(rustdoc::invalid_html_tags)]
21780    #[doc = "Optional. True, if the bot can edit the username of the business account"]
21781    #[serde(
21782        skip_serializing_if = "Option::is_none",
21783        rename = "can_edit_username",
21784        default
21785    )]
21786    pub can_edit_username: Option<bool>,
21787    #[allow(rustdoc::invalid_html_tags)]
21788    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
21789    #[serde(
21790        skip_serializing_if = "Option::is_none",
21791        rename = "can_change_gift_settings",
21792        default
21793    )]
21794    pub can_change_gift_settings: Option<bool>,
21795    #[allow(rustdoc::invalid_html_tags)]
21796    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
21797    #[serde(
21798        skip_serializing_if = "Option::is_none",
21799        rename = "can_view_gifts_and_stars",
21800        default
21801    )]
21802    pub can_view_gifts_and_stars: Option<bool>,
21803    #[allow(rustdoc::invalid_html_tags)]
21804    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
21805    #[serde(
21806        skip_serializing_if = "Option::is_none",
21807        rename = "can_convert_gifts_to_stars",
21808        default
21809    )]
21810    pub can_convert_gifts_to_stars: Option<bool>,
21811    #[allow(rustdoc::invalid_html_tags)]
21812    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
21813    #[serde(
21814        skip_serializing_if = "Option::is_none",
21815        rename = "can_transfer_and_upgrade_gifts",
21816        default
21817    )]
21818    pub can_transfer_and_upgrade_gifts: Option<bool>,
21819    #[allow(rustdoc::invalid_html_tags)]
21820    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
21821    #[serde(
21822        skip_serializing_if = "Option::is_none",
21823        rename = "can_transfer_stars",
21824        default
21825    )]
21826    pub can_transfer_stars: Option<bool>,
21827    #[allow(rustdoc::invalid_html_tags)]
21828    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
21829    #[serde(
21830        skip_serializing_if = "Option::is_none",
21831        rename = "can_manage_stories",
21832        default
21833    )]
21834    pub can_manage_stories: Option<bool>,
21835}
21836#[allow(rustdoc::invalid_html_tags)]
21837#[doc = "Companion type to BusinessBotRights that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
21838#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21839pub struct NoSkipBusinessBotRights {
21840    pub can_reply: Option<bool>,
21841    pub can_read_messages: Option<bool>,
21842    pub can_delete_sent_messages: Option<bool>,
21843    pub can_delete_all_messages: Option<bool>,
21844    pub can_edit_name: Option<bool>,
21845    pub can_edit_bio: Option<bool>,
21846    pub can_edit_profile_photo: Option<bool>,
21847    pub can_edit_username: Option<bool>,
21848    pub can_change_gift_settings: Option<bool>,
21849    pub can_view_gifts_and_stars: Option<bool>,
21850    pub can_convert_gifts_to_stars: Option<bool>,
21851    pub can_transfer_and_upgrade_gifts: Option<bool>,
21852    pub can_transfer_stars: Option<bool>,
21853    pub can_manage_stories: Option<bool>,
21854}
21855impl From<NoSkipBusinessBotRights> for BusinessBotRights {
21856    fn from(t: NoSkipBusinessBotRights) -> Self {
21857        Self {
21858            can_reply: t.can_reply,
21859            can_read_messages: t.can_read_messages,
21860            can_delete_sent_messages: t.can_delete_sent_messages,
21861            can_delete_all_messages: t.can_delete_all_messages,
21862            can_edit_name: t.can_edit_name,
21863            can_edit_bio: t.can_edit_bio,
21864            can_edit_profile_photo: t.can_edit_profile_photo,
21865            can_edit_username: t.can_edit_username,
21866            can_change_gift_settings: t.can_change_gift_settings,
21867            can_view_gifts_and_stars: t.can_view_gifts_and_stars,
21868            can_convert_gifts_to_stars: t.can_convert_gifts_to_stars,
21869            can_transfer_and_upgrade_gifts: t.can_transfer_and_upgrade_gifts,
21870            can_transfer_stars: t.can_transfer_stars,
21871            can_manage_stories: t.can_manage_stories,
21872        }
21873    }
21874}
21875#[allow(clippy::from_over_into)]
21876impl Into<NoSkipBusinessBotRights> for BusinessBotRights {
21877    fn into(self) -> NoSkipBusinessBotRights {
21878        NoSkipBusinessBotRights {
21879            can_reply: self.can_reply,
21880            can_read_messages: self.can_read_messages,
21881            can_delete_sent_messages: self.can_delete_sent_messages,
21882            can_delete_all_messages: self.can_delete_all_messages,
21883            can_edit_name: self.can_edit_name,
21884            can_edit_bio: self.can_edit_bio,
21885            can_edit_profile_photo: self.can_edit_profile_photo,
21886            can_edit_username: self.can_edit_username,
21887            can_change_gift_settings: self.can_change_gift_settings,
21888            can_view_gifts_and_stars: self.can_view_gifts_and_stars,
21889            can_convert_gifts_to_stars: self.can_convert_gifts_to_stars,
21890            can_transfer_and_upgrade_gifts: self.can_transfer_and_upgrade_gifts,
21891            can_transfer_stars: self.can_transfer_stars,
21892            can_manage_stories: self.can_manage_stories,
21893        }
21894    }
21895}
21896impl NoSkipBusinessBotRights {
21897    pub fn skip(self) -> BusinessBotRights {
21898        self.into()
21899    }
21900}
21901impl BusinessBotRights {
21902    pub fn noskip(self) -> NoSkipBusinessBotRights {
21903        self.into()
21904    }
21905}
21906#[allow(rustdoc::invalid_html_tags)]
21907#[doc = "Represents the rights of a business bot."]
21908#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
21909pub struct BusinessBotRightsBuilder {
21910    #[allow(rustdoc::invalid_html_tags)]
21911    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
21912    #[serde(skip_serializing_if = "Option::is_none", rename = "can_reply", default)]
21913    pub can_reply: Option<bool>,
21914    #[allow(rustdoc::invalid_html_tags)]
21915    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
21916    #[serde(
21917        skip_serializing_if = "Option::is_none",
21918        rename = "can_read_messages",
21919        default
21920    )]
21921    pub can_read_messages: Option<bool>,
21922    #[allow(rustdoc::invalid_html_tags)]
21923    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
21924    #[serde(
21925        skip_serializing_if = "Option::is_none",
21926        rename = "can_delete_sent_messages",
21927        default
21928    )]
21929    pub can_delete_sent_messages: Option<bool>,
21930    #[allow(rustdoc::invalid_html_tags)]
21931    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
21932    #[serde(
21933        skip_serializing_if = "Option::is_none",
21934        rename = "can_delete_all_messages",
21935        default
21936    )]
21937    pub can_delete_all_messages: Option<bool>,
21938    #[allow(rustdoc::invalid_html_tags)]
21939    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
21940    #[serde(
21941        skip_serializing_if = "Option::is_none",
21942        rename = "can_edit_name",
21943        default
21944    )]
21945    pub can_edit_name: Option<bool>,
21946    #[allow(rustdoc::invalid_html_tags)]
21947    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
21948    #[serde(
21949        skip_serializing_if = "Option::is_none",
21950        rename = "can_edit_bio",
21951        default
21952    )]
21953    pub can_edit_bio: Option<bool>,
21954    #[allow(rustdoc::invalid_html_tags)]
21955    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
21956    #[serde(
21957        skip_serializing_if = "Option::is_none",
21958        rename = "can_edit_profile_photo",
21959        default
21960    )]
21961    pub can_edit_profile_photo: Option<bool>,
21962    #[allow(rustdoc::invalid_html_tags)]
21963    #[doc = "Optional. True, if the bot can edit the username of the business account"]
21964    #[serde(
21965        skip_serializing_if = "Option::is_none",
21966        rename = "can_edit_username",
21967        default
21968    )]
21969    pub can_edit_username: Option<bool>,
21970    #[allow(rustdoc::invalid_html_tags)]
21971    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
21972    #[serde(
21973        skip_serializing_if = "Option::is_none",
21974        rename = "can_change_gift_settings",
21975        default
21976    )]
21977    pub can_change_gift_settings: Option<bool>,
21978    #[allow(rustdoc::invalid_html_tags)]
21979    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
21980    #[serde(
21981        skip_serializing_if = "Option::is_none",
21982        rename = "can_view_gifts_and_stars",
21983        default
21984    )]
21985    pub can_view_gifts_and_stars: Option<bool>,
21986    #[allow(rustdoc::invalid_html_tags)]
21987    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
21988    #[serde(
21989        skip_serializing_if = "Option::is_none",
21990        rename = "can_convert_gifts_to_stars",
21991        default
21992    )]
21993    pub can_convert_gifts_to_stars: Option<bool>,
21994    #[allow(rustdoc::invalid_html_tags)]
21995    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
21996    #[serde(
21997        skip_serializing_if = "Option::is_none",
21998        rename = "can_transfer_and_upgrade_gifts",
21999        default
22000    )]
22001    pub can_transfer_and_upgrade_gifts: Option<bool>,
22002    #[allow(rustdoc::invalid_html_tags)]
22003    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
22004    #[serde(
22005        skip_serializing_if = "Option::is_none",
22006        rename = "can_transfer_stars",
22007        default
22008    )]
22009    pub can_transfer_stars: Option<bool>,
22010    #[allow(rustdoc::invalid_html_tags)]
22011    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
22012    #[serde(
22013        skip_serializing_if = "Option::is_none",
22014        rename = "can_manage_stories",
22015        default
22016    )]
22017    pub can_manage_stories: Option<bool>,
22018}
22019impl BusinessBotRightsBuilder {
22020    #[allow(clippy::too_many_arguments)]
22021    pub fn new() -> Self {
22022        Self {
22023            can_reply: None,
22024            can_read_messages: None,
22025            can_delete_sent_messages: None,
22026            can_delete_all_messages: None,
22027            can_edit_name: None,
22028            can_edit_bio: None,
22029            can_edit_profile_photo: None,
22030            can_edit_username: None,
22031            can_change_gift_settings: None,
22032            can_view_gifts_and_stars: None,
22033            can_convert_gifts_to_stars: None,
22034            can_transfer_and_upgrade_gifts: None,
22035            can_transfer_stars: None,
22036            can_manage_stories: None,
22037        }
22038    }
22039    #[allow(rustdoc::invalid_html_tags)]
22040    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
22041    pub fn set_can_reply(mut self, can_reply: bool) -> Self {
22042        self.can_reply = Some(can_reply);
22043        self
22044    }
22045    #[allow(rustdoc::invalid_html_tags)]
22046    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
22047    pub fn set_can_read_messages(mut self, can_read_messages: bool) -> Self {
22048        self.can_read_messages = Some(can_read_messages);
22049        self
22050    }
22051    #[allow(rustdoc::invalid_html_tags)]
22052    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
22053    pub fn set_can_delete_sent_messages(mut self, can_delete_sent_messages: bool) -> Self {
22054        self.can_delete_sent_messages = Some(can_delete_sent_messages);
22055        self
22056    }
22057    #[allow(rustdoc::invalid_html_tags)]
22058    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
22059    pub fn set_can_delete_all_messages(mut self, can_delete_all_messages: bool) -> Self {
22060        self.can_delete_all_messages = Some(can_delete_all_messages);
22061        self
22062    }
22063    #[allow(rustdoc::invalid_html_tags)]
22064    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
22065    pub fn set_can_edit_name(mut self, can_edit_name: bool) -> Self {
22066        self.can_edit_name = Some(can_edit_name);
22067        self
22068    }
22069    #[allow(rustdoc::invalid_html_tags)]
22070    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
22071    pub fn set_can_edit_bio(mut self, can_edit_bio: bool) -> Self {
22072        self.can_edit_bio = Some(can_edit_bio);
22073        self
22074    }
22075    #[allow(rustdoc::invalid_html_tags)]
22076    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
22077    pub fn set_can_edit_profile_photo(mut self, can_edit_profile_photo: bool) -> Self {
22078        self.can_edit_profile_photo = Some(can_edit_profile_photo);
22079        self
22080    }
22081    #[allow(rustdoc::invalid_html_tags)]
22082    #[doc = "Optional. True, if the bot can edit the username of the business account"]
22083    pub fn set_can_edit_username(mut self, can_edit_username: bool) -> Self {
22084        self.can_edit_username = Some(can_edit_username);
22085        self
22086    }
22087    #[allow(rustdoc::invalid_html_tags)]
22088    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
22089    pub fn set_can_change_gift_settings(mut self, can_change_gift_settings: bool) -> Self {
22090        self.can_change_gift_settings = Some(can_change_gift_settings);
22091        self
22092    }
22093    #[allow(rustdoc::invalid_html_tags)]
22094    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
22095    pub fn set_can_view_gifts_and_stars(mut self, can_view_gifts_and_stars: bool) -> Self {
22096        self.can_view_gifts_and_stars = Some(can_view_gifts_and_stars);
22097        self
22098    }
22099    #[allow(rustdoc::invalid_html_tags)]
22100    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
22101    pub fn set_can_convert_gifts_to_stars(mut self, can_convert_gifts_to_stars: bool) -> Self {
22102        self.can_convert_gifts_to_stars = Some(can_convert_gifts_to_stars);
22103        self
22104    }
22105    #[allow(rustdoc::invalid_html_tags)]
22106    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
22107    pub fn set_can_transfer_and_upgrade_gifts(
22108        mut self,
22109        can_transfer_and_upgrade_gifts: bool,
22110    ) -> Self {
22111        self.can_transfer_and_upgrade_gifts = Some(can_transfer_and_upgrade_gifts);
22112        self
22113    }
22114    #[allow(rustdoc::invalid_html_tags)]
22115    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
22116    pub fn set_can_transfer_stars(mut self, can_transfer_stars: bool) -> Self {
22117        self.can_transfer_stars = Some(can_transfer_stars);
22118        self
22119    }
22120    #[allow(rustdoc::invalid_html_tags)]
22121    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
22122    pub fn set_can_manage_stories(mut self, can_manage_stories: bool) -> Self {
22123        self.can_manage_stories = Some(can_manage_stories);
22124        self
22125    }
22126    pub fn build(self) -> BusinessBotRights {
22127        BusinessBotRights {
22128            can_reply: self.can_reply,
22129            can_read_messages: self.can_read_messages,
22130            can_delete_sent_messages: self.can_delete_sent_messages,
22131            can_delete_all_messages: self.can_delete_all_messages,
22132            can_edit_name: self.can_edit_name,
22133            can_edit_bio: self.can_edit_bio,
22134            can_edit_profile_photo: self.can_edit_profile_photo,
22135            can_edit_username: self.can_edit_username,
22136            can_change_gift_settings: self.can_change_gift_settings,
22137            can_view_gifts_and_stars: self.can_view_gifts_and_stars,
22138            can_convert_gifts_to_stars: self.can_convert_gifts_to_stars,
22139            can_transfer_and_upgrade_gifts: self.can_transfer_and_upgrade_gifts,
22140            can_transfer_stars: self.can_transfer_stars,
22141            can_manage_stories: self.can_manage_stories,
22142        }
22143    }
22144}
22145#[allow(rustdoc::invalid_html_tags)]
22146#[doc = "Describes a photo to post as a story."]
22147#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22148pub struct InputStoryContentPhoto {
22149    #[allow(rustdoc::invalid_html_tags)]
22150    #[doc = "Type of the content, must be photo"]
22151    #[serde(rename = "type")]
22152    pub tg_type: String,
22153    #[allow(rustdoc::invalid_html_tags)]
22154    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
22155    #[serde(rename = "photo")]
22156    pub photo: String,
22157}
22158#[allow(rustdoc::invalid_html_tags)]
22159#[doc = "Companion type to InputStoryContentPhoto that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
22160#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22161pub struct NoSkipInputStoryContentPhoto {
22162    #[allow(rustdoc::invalid_html_tags)]
22163    #[doc = "Type of the content, must be photo"]
22164    #[serde(rename = "type")]
22165    pub tg_type: String,
22166    #[allow(rustdoc::invalid_html_tags)]
22167    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
22168    #[serde(rename = "photo")]
22169    pub photo: String,
22170}
22171impl From<NoSkipInputStoryContentPhoto> for InputStoryContentPhoto {
22172    fn from(t: NoSkipInputStoryContentPhoto) -> Self {
22173        Self {
22174            tg_type: t.tg_type,
22175            photo: t.photo,
22176        }
22177    }
22178}
22179#[allow(clippy::from_over_into)]
22180impl Into<NoSkipInputStoryContentPhoto> for InputStoryContentPhoto {
22181    fn into(self) -> NoSkipInputStoryContentPhoto {
22182        NoSkipInputStoryContentPhoto {
22183            tg_type: self.tg_type,
22184            photo: self.photo,
22185        }
22186    }
22187}
22188impl NoSkipInputStoryContentPhoto {
22189    pub fn skip(self) -> InputStoryContentPhoto {
22190        self.into()
22191    }
22192}
22193impl InputStoryContentPhoto {
22194    pub fn noskip(self) -> NoSkipInputStoryContentPhoto {
22195        self.into()
22196    }
22197}
22198#[allow(rustdoc::invalid_html_tags)]
22199#[doc = "Describes a photo to post as a story."]
22200#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22201pub struct InputStoryContentPhotoBuilder {
22202    #[allow(rustdoc::invalid_html_tags)]
22203    #[doc = "Type of the content, must be photo"]
22204    #[serde(rename = "type")]
22205    pub tg_type: String,
22206    #[allow(rustdoc::invalid_html_tags)]
22207    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
22208    #[serde(rename = "photo")]
22209    pub photo: String,
22210}
22211impl InputStoryContentPhotoBuilder {
22212    #[allow(clippy::too_many_arguments)]
22213    pub fn new(photo: String) -> Self {
22214        Self {
22215            tg_type: "photo".to_owned(),
22216            photo,
22217        }
22218    }
22219    #[allow(rustdoc::invalid_html_tags)]
22220    #[doc = "Type of the content, must be photo"]
22221    pub fn set_type(mut self, tg_type: String) -> Self {
22222        self.tg_type = tg_type;
22223        self
22224    }
22225    #[allow(rustdoc::invalid_html_tags)]
22226    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
22227    pub fn set_photo(mut self, photo: String) -> Self {
22228        self.photo = photo;
22229        self
22230    }
22231    pub fn build(self) -> InputStoryContentPhoto {
22232        InputStoryContentPhoto {
22233            tg_type: self.tg_type,
22234            photo: self.photo,
22235        }
22236    }
22237}
22238#[allow(rustdoc::invalid_html_tags)]
22239#[doc = "Represents the content of a venue message to be sent as the result of an inline query."]
22240#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22241pub struct InputVenueMessageContent {
22242    #[allow(rustdoc::invalid_html_tags)]
22243    #[doc = "Latitude of the venue in degrees"]
22244    #[serde(rename = "latitude")]
22245    pub latitude: ::ordered_float::OrderedFloat<f64>,
22246    #[allow(rustdoc::invalid_html_tags)]
22247    #[doc = "Longitude of the venue in degrees"]
22248    #[serde(rename = "longitude")]
22249    pub longitude: ::ordered_float::OrderedFloat<f64>,
22250    #[allow(rustdoc::invalid_html_tags)]
22251    #[doc = "Name of the venue"]
22252    #[serde(rename = "title")]
22253    pub title: String,
22254    #[allow(rustdoc::invalid_html_tags)]
22255    #[doc = "Address of the venue"]
22256    #[serde(rename = "address")]
22257    pub address: String,
22258    #[allow(rustdoc::invalid_html_tags)]
22259    #[doc = "Optional. Foursquare identifier of the venue, if known"]
22260    #[serde(
22261        skip_serializing_if = "Option::is_none",
22262        rename = "foursquare_id",
22263        default
22264    )]
22265    pub foursquare_id: Option<String>,
22266    #[allow(rustdoc::invalid_html_tags)]
22267    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
22268    #[serde(
22269        skip_serializing_if = "Option::is_none",
22270        rename = "foursquare_type",
22271        default
22272    )]
22273    pub foursquare_type: Option<String>,
22274    #[allow(rustdoc::invalid_html_tags)]
22275    #[doc = "Optional. Google Places identifier of the venue"]
22276    #[serde(
22277        skip_serializing_if = "Option::is_none",
22278        rename = "google_place_id",
22279        default
22280    )]
22281    pub google_place_id: Option<String>,
22282    #[allow(rustdoc::invalid_html_tags)]
22283    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
22284    #[serde(
22285        skip_serializing_if = "Option::is_none",
22286        rename = "google_place_type",
22287        default
22288    )]
22289    pub google_place_type: Option<String>,
22290}
22291#[allow(rustdoc::invalid_html_tags)]
22292#[doc = "Companion type to InputVenueMessageContent that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
22293#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22294pub struct NoSkipInputVenueMessageContent {
22295    #[allow(rustdoc::invalid_html_tags)]
22296    #[doc = "Latitude of the venue in degrees"]
22297    #[serde(rename = "latitude")]
22298    pub latitude: ::ordered_float::OrderedFloat<f64>,
22299    #[allow(rustdoc::invalid_html_tags)]
22300    #[doc = "Longitude of the venue in degrees"]
22301    #[serde(rename = "longitude")]
22302    pub longitude: ::ordered_float::OrderedFloat<f64>,
22303    #[allow(rustdoc::invalid_html_tags)]
22304    #[doc = "Name of the venue"]
22305    #[serde(rename = "title")]
22306    pub title: String,
22307    #[allow(rustdoc::invalid_html_tags)]
22308    #[doc = "Address of the venue"]
22309    #[serde(rename = "address")]
22310    pub address: String,
22311    pub foursquare_id: Option<String>,
22312    pub foursquare_type: Option<String>,
22313    pub google_place_id: Option<String>,
22314    pub google_place_type: Option<String>,
22315}
22316impl From<NoSkipInputVenueMessageContent> for InputVenueMessageContent {
22317    fn from(t: NoSkipInputVenueMessageContent) -> Self {
22318        Self {
22319            latitude: t.latitude,
22320            longitude: t.longitude,
22321            title: t.title,
22322            address: t.address,
22323            foursquare_id: t.foursquare_id,
22324            foursquare_type: t.foursquare_type,
22325            google_place_id: t.google_place_id,
22326            google_place_type: t.google_place_type,
22327        }
22328    }
22329}
22330#[allow(clippy::from_over_into)]
22331impl Into<NoSkipInputVenueMessageContent> for InputVenueMessageContent {
22332    fn into(self) -> NoSkipInputVenueMessageContent {
22333        NoSkipInputVenueMessageContent {
22334            latitude: self.latitude,
22335            longitude: self.longitude,
22336            title: self.title,
22337            address: self.address,
22338            foursquare_id: self.foursquare_id,
22339            foursquare_type: self.foursquare_type,
22340            google_place_id: self.google_place_id,
22341            google_place_type: self.google_place_type,
22342        }
22343    }
22344}
22345impl NoSkipInputVenueMessageContent {
22346    pub fn skip(self) -> InputVenueMessageContent {
22347        self.into()
22348    }
22349}
22350impl InputVenueMessageContent {
22351    pub fn noskip(self) -> NoSkipInputVenueMessageContent {
22352        self.into()
22353    }
22354}
22355#[allow(rustdoc::invalid_html_tags)]
22356#[doc = "Represents the content of a venue message to be sent as the result of an inline query."]
22357#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22358pub struct InputVenueMessageContentBuilder {
22359    #[allow(rustdoc::invalid_html_tags)]
22360    #[doc = "Latitude of the venue in degrees"]
22361    #[serde(rename = "latitude")]
22362    pub latitude: ::ordered_float::OrderedFloat<f64>,
22363    #[allow(rustdoc::invalid_html_tags)]
22364    #[doc = "Longitude of the venue in degrees"]
22365    #[serde(rename = "longitude")]
22366    pub longitude: ::ordered_float::OrderedFloat<f64>,
22367    #[allow(rustdoc::invalid_html_tags)]
22368    #[doc = "Name of the venue"]
22369    #[serde(rename = "title")]
22370    pub title: String,
22371    #[allow(rustdoc::invalid_html_tags)]
22372    #[doc = "Address of the venue"]
22373    #[serde(rename = "address")]
22374    pub address: String,
22375    #[allow(rustdoc::invalid_html_tags)]
22376    #[doc = "Optional. Foursquare identifier of the venue, if known"]
22377    #[serde(
22378        skip_serializing_if = "Option::is_none",
22379        rename = "foursquare_id",
22380        default
22381    )]
22382    pub foursquare_id: Option<String>,
22383    #[allow(rustdoc::invalid_html_tags)]
22384    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
22385    #[serde(
22386        skip_serializing_if = "Option::is_none",
22387        rename = "foursquare_type",
22388        default
22389    )]
22390    pub foursquare_type: Option<String>,
22391    #[allow(rustdoc::invalid_html_tags)]
22392    #[doc = "Optional. Google Places identifier of the venue"]
22393    #[serde(
22394        skip_serializing_if = "Option::is_none",
22395        rename = "google_place_id",
22396        default
22397    )]
22398    pub google_place_id: Option<String>,
22399    #[allow(rustdoc::invalid_html_tags)]
22400    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
22401    #[serde(
22402        skip_serializing_if = "Option::is_none",
22403        rename = "google_place_type",
22404        default
22405    )]
22406    pub google_place_type: Option<String>,
22407}
22408impl InputVenueMessageContentBuilder {
22409    #[allow(clippy::too_many_arguments)]
22410    pub fn new(
22411        latitude: ::ordered_float::OrderedFloat<f64>,
22412        longitude: ::ordered_float::OrderedFloat<f64>,
22413        title: String,
22414        address: String,
22415    ) -> Self {
22416        Self {
22417            latitude,
22418            longitude,
22419            title,
22420            address,
22421            foursquare_id: None,
22422            foursquare_type: None,
22423            google_place_id: None,
22424            google_place_type: None,
22425        }
22426    }
22427    #[allow(rustdoc::invalid_html_tags)]
22428    #[doc = "Latitude of the venue in degrees"]
22429    pub fn set_latitude(mut self, latitude: ::ordered_float::OrderedFloat<f64>) -> Self {
22430        self.latitude = latitude;
22431        self
22432    }
22433    #[allow(rustdoc::invalid_html_tags)]
22434    #[doc = "Longitude of the venue in degrees"]
22435    pub fn set_longitude(mut self, longitude: ::ordered_float::OrderedFloat<f64>) -> Self {
22436        self.longitude = longitude;
22437        self
22438    }
22439    #[allow(rustdoc::invalid_html_tags)]
22440    #[doc = "Name of the venue"]
22441    pub fn set_title(mut self, title: String) -> Self {
22442        self.title = title;
22443        self
22444    }
22445    #[allow(rustdoc::invalid_html_tags)]
22446    #[doc = "Address of the venue"]
22447    pub fn set_address(mut self, address: String) -> Self {
22448        self.address = address;
22449        self
22450    }
22451    #[allow(rustdoc::invalid_html_tags)]
22452    #[doc = "Optional. Foursquare identifier of the venue, if known"]
22453    pub fn set_foursquare_id(mut self, foursquare_id: String) -> Self {
22454        self.foursquare_id = Some(foursquare_id);
22455        self
22456    }
22457    #[allow(rustdoc::invalid_html_tags)]
22458    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
22459    pub fn set_foursquare_type(mut self, foursquare_type: String) -> Self {
22460        self.foursquare_type = Some(foursquare_type);
22461        self
22462    }
22463    #[allow(rustdoc::invalid_html_tags)]
22464    #[doc = "Optional. Google Places identifier of the venue"]
22465    pub fn set_google_place_id(mut self, google_place_id: String) -> Self {
22466        self.google_place_id = Some(google_place_id);
22467        self
22468    }
22469    #[allow(rustdoc::invalid_html_tags)]
22470    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
22471    pub fn set_google_place_type(mut self, google_place_type: String) -> Self {
22472        self.google_place_type = Some(google_place_type);
22473        self
22474    }
22475    pub fn build(self) -> InputVenueMessageContent {
22476        InputVenueMessageContent {
22477            latitude: self.latitude,
22478            longitude: self.longitude,
22479            title: self.title,
22480            address: self.address,
22481            foursquare_id: self.foursquare_id,
22482            foursquare_type: self.foursquare_type,
22483            google_place_id: self.google_place_id,
22484            google_place_type: self.google_place_type,
22485        }
22486    }
22487}
22488#[allow(rustdoc::invalid_html_tags)]
22489#[doc = "This object describes the symbol shown on the pattern of a unique gift."]
22490#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22491pub struct UniqueGiftSymbol {
22492    #[allow(rustdoc::invalid_html_tags)]
22493    #[doc = "Name of the symbol"]
22494    #[serde(rename = "name")]
22495    pub name: String,
22496    #[allow(rustdoc::invalid_html_tags)]
22497    #[doc = "The sticker that represents the unique gift"]
22498    #[serde(rename = "sticker")]
22499    pub sticker: BoxWrapper<Unbox<Sticker>>,
22500    #[allow(rustdoc::invalid_html_tags)]
22501    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
22502    #[serde(rename = "rarity_per_mille")]
22503    pub rarity_per_mille: i64,
22504}
22505#[allow(rustdoc::invalid_html_tags)]
22506#[doc = "Companion type to UniqueGiftSymbol that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
22507#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22508pub struct NoSkipUniqueGiftSymbol {
22509    #[allow(rustdoc::invalid_html_tags)]
22510    #[doc = "Name of the symbol"]
22511    #[serde(rename = "name")]
22512    pub name: String,
22513    #[allow(rustdoc::invalid_html_tags)]
22514    #[doc = "The sticker that represents the unique gift"]
22515    #[serde(rename = "sticker")]
22516    pub sticker: BoxWrapper<Unbox<Sticker>>,
22517    #[allow(rustdoc::invalid_html_tags)]
22518    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
22519    #[serde(rename = "rarity_per_mille")]
22520    pub rarity_per_mille: i64,
22521}
22522impl From<NoSkipUniqueGiftSymbol> for UniqueGiftSymbol {
22523    fn from(t: NoSkipUniqueGiftSymbol) -> Self {
22524        Self {
22525            name: t.name,
22526            sticker: t.sticker,
22527            rarity_per_mille: t.rarity_per_mille,
22528        }
22529    }
22530}
22531#[allow(clippy::from_over_into)]
22532impl Into<NoSkipUniqueGiftSymbol> for UniqueGiftSymbol {
22533    fn into(self) -> NoSkipUniqueGiftSymbol {
22534        NoSkipUniqueGiftSymbol {
22535            name: self.name,
22536            sticker: self.sticker,
22537            rarity_per_mille: self.rarity_per_mille,
22538        }
22539    }
22540}
22541impl NoSkipUniqueGiftSymbol {
22542    pub fn skip(self) -> UniqueGiftSymbol {
22543        self.into()
22544    }
22545}
22546impl UniqueGiftSymbol {
22547    pub fn noskip(self) -> NoSkipUniqueGiftSymbol {
22548        self.into()
22549    }
22550}
22551#[allow(rustdoc::invalid_html_tags)]
22552#[doc = "This object describes the symbol shown on the pattern of a unique gift."]
22553#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22554pub struct UniqueGiftSymbolBuilder {
22555    #[allow(rustdoc::invalid_html_tags)]
22556    #[doc = "Name of the symbol"]
22557    #[serde(rename = "name")]
22558    pub name: String,
22559    #[allow(rustdoc::invalid_html_tags)]
22560    #[doc = "The sticker that represents the unique gift"]
22561    #[serde(rename = "sticker")]
22562    pub sticker: BoxWrapper<Unbox<Sticker>>,
22563    #[allow(rustdoc::invalid_html_tags)]
22564    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
22565    #[serde(rename = "rarity_per_mille")]
22566    pub rarity_per_mille: i64,
22567}
22568impl UniqueGiftSymbolBuilder {
22569    #[allow(clippy::too_many_arguments)]
22570    pub fn new<A: Into<Sticker>>(name: String, sticker: A, rarity_per_mille: i64) -> Self {
22571        Self {
22572            name,
22573            sticker: BoxWrapper::new_unbox(sticker.into()),
22574            rarity_per_mille,
22575        }
22576    }
22577    #[allow(rustdoc::invalid_html_tags)]
22578    #[doc = "Name of the symbol"]
22579    pub fn set_name(mut self, name: String) -> Self {
22580        self.name = name;
22581        self
22582    }
22583    #[allow(rustdoc::invalid_html_tags)]
22584    #[doc = "The sticker that represents the unique gift"]
22585    pub fn set_sticker(mut self, sticker: Sticker) -> Self {
22586        self.sticker = BoxWrapper(Unbox(sticker));
22587        self
22588    }
22589    #[allow(rustdoc::invalid_html_tags)]
22590    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
22591    pub fn set_rarity_per_mille(mut self, rarity_per_mille: i64) -> Self {
22592        self.rarity_per_mille = rarity_per_mille;
22593        self
22594    }
22595    pub fn build(self) -> UniqueGiftSymbol {
22596        UniqueGiftSymbol {
22597            name: self.name,
22598            sticker: self.sticker,
22599            rarity_per_mille: self.rarity_per_mille,
22600        }
22601    }
22602}
22603#[allow(rustdoc::invalid_html_tags)]
22604#[doc = "Describes a task to add to a checklist."]
22605#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22606pub struct InputChecklistTask {
22607    #[allow(rustdoc::invalid_html_tags)]
22608    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
22609    #[serde(rename = "id")]
22610    pub id: i64,
22611    #[allow(rustdoc::invalid_html_tags)]
22612    #[doc = "Text of the task; 1-100 characters after entities parsing"]
22613    #[serde(rename = "text")]
22614    pub text: String,
22615    #[allow(rustdoc::invalid_html_tags)]
22616    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
22617    #[serde(
22618        skip_serializing_if = "Option::is_none",
22619        rename = "parse_mode",
22620        default
22621    )]
22622    pub parse_mode: Option<String>,
22623    #[allow(rustdoc::invalid_html_tags)]
22624    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
22625    #[serde(
22626        skip_serializing_if = "Option::is_none",
22627        rename = "text_entities",
22628        default
22629    )]
22630    pub text_entities: Option<Vec<MessageEntity>>,
22631}
22632#[allow(rustdoc::invalid_html_tags)]
22633#[doc = "Companion type to InputChecklistTask that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
22634#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22635pub struct NoSkipInputChecklistTask {
22636    #[allow(rustdoc::invalid_html_tags)]
22637    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
22638    #[serde(rename = "id")]
22639    pub id: i64,
22640    #[allow(rustdoc::invalid_html_tags)]
22641    #[doc = "Text of the task; 1-100 characters after entities parsing"]
22642    #[serde(rename = "text")]
22643    pub text: String,
22644    pub parse_mode: Option<String>,
22645    pub text_entities: Option<Vec<MessageEntity>>,
22646}
22647impl From<NoSkipInputChecklistTask> for InputChecklistTask {
22648    fn from(t: NoSkipInputChecklistTask) -> Self {
22649        Self {
22650            id: t.id,
22651            text: t.text,
22652            parse_mode: t.parse_mode,
22653            text_entities: t.text_entities,
22654        }
22655    }
22656}
22657#[allow(clippy::from_over_into)]
22658impl Into<NoSkipInputChecklistTask> for InputChecklistTask {
22659    fn into(self) -> NoSkipInputChecklistTask {
22660        NoSkipInputChecklistTask {
22661            id: self.id,
22662            text: self.text,
22663            parse_mode: self.parse_mode,
22664            text_entities: self.text_entities,
22665        }
22666    }
22667}
22668impl NoSkipInputChecklistTask {
22669    pub fn skip(self) -> InputChecklistTask {
22670        self.into()
22671    }
22672}
22673impl InputChecklistTask {
22674    pub fn noskip(self) -> NoSkipInputChecklistTask {
22675        self.into()
22676    }
22677}
22678#[allow(rustdoc::invalid_html_tags)]
22679#[doc = "Describes a task to add to a checklist."]
22680#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22681pub struct InputChecklistTaskBuilder {
22682    #[allow(rustdoc::invalid_html_tags)]
22683    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
22684    #[serde(rename = "id")]
22685    pub id: i64,
22686    #[allow(rustdoc::invalid_html_tags)]
22687    #[doc = "Text of the task; 1-100 characters after entities parsing"]
22688    #[serde(rename = "text")]
22689    pub text: String,
22690    #[allow(rustdoc::invalid_html_tags)]
22691    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
22692    #[serde(
22693        skip_serializing_if = "Option::is_none",
22694        rename = "parse_mode",
22695        default
22696    )]
22697    pub parse_mode: Option<String>,
22698    #[allow(rustdoc::invalid_html_tags)]
22699    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
22700    #[serde(
22701        skip_serializing_if = "Option::is_none",
22702        rename = "text_entities",
22703        default
22704    )]
22705    pub text_entities: Option<Vec<MessageEntity>>,
22706}
22707impl InputChecklistTaskBuilder {
22708    #[allow(clippy::too_many_arguments)]
22709    pub fn new(id: i64, text: String) -> Self {
22710        Self {
22711            id,
22712            text,
22713            parse_mode: None,
22714            text_entities: None,
22715        }
22716    }
22717    #[allow(rustdoc::invalid_html_tags)]
22718    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
22719    pub fn set_id(mut self, id: i64) -> Self {
22720        self.id = id;
22721        self
22722    }
22723    #[allow(rustdoc::invalid_html_tags)]
22724    #[doc = "Text of the task; 1-100 characters after entities parsing"]
22725    pub fn set_text(mut self, text: String) -> Self {
22726        self.text = text;
22727        self
22728    }
22729    #[allow(rustdoc::invalid_html_tags)]
22730    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
22731    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
22732        self.parse_mode = Some(parse_mode);
22733        self
22734    }
22735    #[allow(rustdoc::invalid_html_tags)]
22736    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
22737    pub fn set_text_entities(mut self, text_entities: Vec<MessageEntity>) -> Self {
22738        self.text_entities = Some(text_entities);
22739        self
22740    }
22741    pub fn build(self) -> InputChecklistTask {
22742        InputChecklistTask {
22743            id: self.id,
22744            text: self.text,
22745            parse_mode: self.parse_mode,
22746            text_entities: self.text_entities,
22747        }
22748    }
22749}
22750#[allow(rustdoc::invalid_html_tags)]
22751#[doc = "Describes a service message about a change in the price of paid messages within a chat."]
22752#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22753pub struct PaidMessagePriceChanged {
22754    #[allow(rustdoc::invalid_html_tags)]
22755    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
22756    #[serde(rename = "paid_message_star_count")]
22757    pub paid_message_star_count: i64,
22758}
22759#[allow(rustdoc::invalid_html_tags)]
22760#[doc = "Companion type to PaidMessagePriceChanged that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
22761#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22762pub struct NoSkipPaidMessagePriceChanged {
22763    #[allow(rustdoc::invalid_html_tags)]
22764    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
22765    #[serde(rename = "paid_message_star_count")]
22766    pub paid_message_star_count: i64,
22767}
22768impl From<NoSkipPaidMessagePriceChanged> for PaidMessagePriceChanged {
22769    fn from(t: NoSkipPaidMessagePriceChanged) -> Self {
22770        Self {
22771            paid_message_star_count: t.paid_message_star_count,
22772        }
22773    }
22774}
22775#[allow(clippy::from_over_into)]
22776impl Into<NoSkipPaidMessagePriceChanged> for PaidMessagePriceChanged {
22777    fn into(self) -> NoSkipPaidMessagePriceChanged {
22778        NoSkipPaidMessagePriceChanged {
22779            paid_message_star_count: self.paid_message_star_count,
22780        }
22781    }
22782}
22783impl NoSkipPaidMessagePriceChanged {
22784    pub fn skip(self) -> PaidMessagePriceChanged {
22785        self.into()
22786    }
22787}
22788impl PaidMessagePriceChanged {
22789    pub fn noskip(self) -> NoSkipPaidMessagePriceChanged {
22790        self.into()
22791    }
22792}
22793#[allow(rustdoc::invalid_html_tags)]
22794#[doc = "Describes a service message about a change in the price of paid messages within a chat."]
22795#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22796pub struct PaidMessagePriceChangedBuilder {
22797    #[allow(rustdoc::invalid_html_tags)]
22798    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
22799    #[serde(rename = "paid_message_star_count")]
22800    pub paid_message_star_count: i64,
22801}
22802impl PaidMessagePriceChangedBuilder {
22803    #[allow(clippy::too_many_arguments)]
22804    pub fn new(paid_message_star_count: i64) -> Self {
22805        Self {
22806            paid_message_star_count,
22807        }
22808    }
22809    #[allow(rustdoc::invalid_html_tags)]
22810    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
22811    pub fn set_paid_message_star_count(mut self, paid_message_star_count: i64) -> Self {
22812        self.paid_message_star_count = paid_message_star_count;
22813        self
22814    }
22815    pub fn build(self) -> PaidMessagePriceChanged {
22816        PaidMessagePriceChanged {
22817            paid_message_star_count: self.paid_message_star_count,
22818        }
22819    }
22820}
22821#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22822#[serde(untagged)]
22823pub enum TransactionPartner {
22824    TransactionPartnerUser(TransactionPartnerUser),
22825    TransactionPartnerChat(TransactionPartnerChat),
22826    TransactionPartnerAffiliateProgram(TransactionPartnerAffiliateProgram),
22827    TransactionPartnerFragment(TransactionPartnerFragment),
22828    TransactionPartnerTelegramAds(TransactionPartnerTelegramAds),
22829    TransactionPartnerTelegramApi(TransactionPartnerTelegramApi),
22830    TransactionPartnerOther(TransactionPartnerOther),
22831}
22832impl Default for TransactionPartner {
22833    fn default() -> Self {
22834        TransactionPartner::TransactionPartnerUser(TransactionPartnerUser::default())
22835    }
22836}
22837impl TransactionPartner {}
22838#[allow(rustdoc::invalid_html_tags)]
22839#[doc = "This object represents reaction changes on a message with anonymous reactions."]
22840#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22841pub struct MessageReactionCountUpdated {
22842    #[allow(rustdoc::invalid_html_tags)]
22843    #[doc = "The chat containing the message"]
22844    #[serde(rename = "chat")]
22845    pub chat: BoxWrapper<Unbox<Chat>>,
22846    #[allow(rustdoc::invalid_html_tags)]
22847    #[doc = "Unique message identifier inside the chat"]
22848    #[serde(rename = "message_id")]
22849    pub message_id: i64,
22850    #[allow(rustdoc::invalid_html_tags)]
22851    #[doc = "Date of the change in Unix time"]
22852    #[serde(rename = "date")]
22853    pub date: i64,
22854    #[allow(rustdoc::invalid_html_tags)]
22855    #[doc = "List of reactions that are present on the message"]
22856    #[serde(rename = "reactions")]
22857    pub reactions: Vec<ReactionCount>,
22858}
22859#[allow(rustdoc::invalid_html_tags)]
22860#[doc = "Companion type to MessageReactionCountUpdated that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
22861#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22862pub struct NoSkipMessageReactionCountUpdated {
22863    #[allow(rustdoc::invalid_html_tags)]
22864    #[doc = "The chat containing the message"]
22865    #[serde(rename = "chat")]
22866    pub chat: BoxWrapper<Unbox<Chat>>,
22867    #[allow(rustdoc::invalid_html_tags)]
22868    #[doc = "Unique message identifier inside the chat"]
22869    #[serde(rename = "message_id")]
22870    pub message_id: i64,
22871    #[allow(rustdoc::invalid_html_tags)]
22872    #[doc = "Date of the change in Unix time"]
22873    #[serde(rename = "date")]
22874    pub date: i64,
22875    #[allow(rustdoc::invalid_html_tags)]
22876    #[doc = "List of reactions that are present on the message"]
22877    #[serde(rename = "reactions")]
22878    pub reactions: Vec<ReactionCount>,
22879}
22880impl From<NoSkipMessageReactionCountUpdated> for MessageReactionCountUpdated {
22881    fn from(t: NoSkipMessageReactionCountUpdated) -> Self {
22882        Self {
22883            chat: t.chat,
22884            message_id: t.message_id,
22885            date: t.date,
22886            reactions: t.reactions,
22887        }
22888    }
22889}
22890#[allow(clippy::from_over_into)]
22891impl Into<NoSkipMessageReactionCountUpdated> for MessageReactionCountUpdated {
22892    fn into(self) -> NoSkipMessageReactionCountUpdated {
22893        NoSkipMessageReactionCountUpdated {
22894            chat: self.chat,
22895            message_id: self.message_id,
22896            date: self.date,
22897            reactions: self.reactions,
22898        }
22899    }
22900}
22901impl NoSkipMessageReactionCountUpdated {
22902    pub fn skip(self) -> MessageReactionCountUpdated {
22903        self.into()
22904    }
22905}
22906impl MessageReactionCountUpdated {
22907    pub fn noskip(self) -> NoSkipMessageReactionCountUpdated {
22908        self.into()
22909    }
22910}
22911#[allow(rustdoc::invalid_html_tags)]
22912#[doc = "This object represents reaction changes on a message with anonymous reactions."]
22913#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22914pub struct MessageReactionCountUpdatedBuilder {
22915    #[allow(rustdoc::invalid_html_tags)]
22916    #[doc = "The chat containing the message"]
22917    #[serde(rename = "chat")]
22918    pub chat: BoxWrapper<Unbox<Chat>>,
22919    #[allow(rustdoc::invalid_html_tags)]
22920    #[doc = "Unique message identifier inside the chat"]
22921    #[serde(rename = "message_id")]
22922    pub message_id: i64,
22923    #[allow(rustdoc::invalid_html_tags)]
22924    #[doc = "Date of the change in Unix time"]
22925    #[serde(rename = "date")]
22926    pub date: i64,
22927    #[allow(rustdoc::invalid_html_tags)]
22928    #[doc = "List of reactions that are present on the message"]
22929    #[serde(rename = "reactions")]
22930    pub reactions: Vec<ReactionCount>,
22931}
22932impl MessageReactionCountUpdatedBuilder {
22933    #[allow(clippy::too_many_arguments)]
22934    pub fn new<A: Into<Chat>>(
22935        chat: A,
22936        message_id: i64,
22937        date: i64,
22938        reactions: Vec<ReactionCount>,
22939    ) -> Self {
22940        Self {
22941            chat: BoxWrapper::new_unbox(chat.into()),
22942            message_id,
22943            date,
22944            reactions,
22945        }
22946    }
22947    #[allow(rustdoc::invalid_html_tags)]
22948    #[doc = "The chat containing the message"]
22949    pub fn set_chat(mut self, chat: Chat) -> Self {
22950        self.chat = BoxWrapper(Unbox(chat));
22951        self
22952    }
22953    #[allow(rustdoc::invalid_html_tags)]
22954    #[doc = "Unique message identifier inside the chat"]
22955    pub fn set_message_id(mut self, message_id: i64) -> Self {
22956        self.message_id = message_id;
22957        self
22958    }
22959    #[allow(rustdoc::invalid_html_tags)]
22960    #[doc = "Date of the change in Unix time"]
22961    pub fn set_date(mut self, date: i64) -> Self {
22962        self.date = date;
22963        self
22964    }
22965    #[allow(rustdoc::invalid_html_tags)]
22966    #[doc = "List of reactions that are present on the message"]
22967    pub fn set_reactions(mut self, reactions: Vec<ReactionCount>) -> Self {
22968        self.reactions = reactions;
22969        self
22970    }
22971    pub fn build(self) -> MessageReactionCountUpdated {
22972        MessageReactionCountUpdated {
22973            chat: self.chat,
22974            message_id: self.message_id,
22975            date: self.date,
22976            reactions: self.reactions,
22977        }
22978    }
22979}
22980#[allow(rustdoc::invalid_html_tags)]
22981#[doc = "This object represents a point on the map."]
22982#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22983pub struct Location {
22984    #[allow(rustdoc::invalid_html_tags)]
22985    #[doc = "Latitude as defined by the sender"]
22986    #[serde(rename = "latitude")]
22987    pub latitude: ::ordered_float::OrderedFloat<f64>,
22988    #[allow(rustdoc::invalid_html_tags)]
22989    #[doc = "Longitude as defined by the sender"]
22990    #[serde(rename = "longitude")]
22991    pub longitude: ::ordered_float::OrderedFloat<f64>,
22992    #[allow(rustdoc::invalid_html_tags)]
22993    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
22994    #[serde(
22995        skip_serializing_if = "Option::is_none",
22996        rename = "horizontal_accuracy",
22997        default
22998    )]
22999    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
23000    #[allow(rustdoc::invalid_html_tags)]
23001    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
23002    #[serde(
23003        skip_serializing_if = "Option::is_none",
23004        rename = "live_period",
23005        default
23006    )]
23007    pub live_period: Option<i64>,
23008    #[allow(rustdoc::invalid_html_tags)]
23009    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
23010    #[serde(skip_serializing_if = "Option::is_none", rename = "heading", default)]
23011    pub heading: Option<i64>,
23012    #[allow(rustdoc::invalid_html_tags)]
23013    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
23014    #[serde(
23015        skip_serializing_if = "Option::is_none",
23016        rename = "proximity_alert_radius",
23017        default
23018    )]
23019    pub proximity_alert_radius: Option<i64>,
23020}
23021#[allow(rustdoc::invalid_html_tags)]
23022#[doc = "Companion type to Location that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
23023#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23024pub struct NoSkipLocation {
23025    #[allow(rustdoc::invalid_html_tags)]
23026    #[doc = "Latitude as defined by the sender"]
23027    #[serde(rename = "latitude")]
23028    pub latitude: ::ordered_float::OrderedFloat<f64>,
23029    #[allow(rustdoc::invalid_html_tags)]
23030    #[doc = "Longitude as defined by the sender"]
23031    #[serde(rename = "longitude")]
23032    pub longitude: ::ordered_float::OrderedFloat<f64>,
23033    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
23034    pub live_period: Option<i64>,
23035    pub heading: Option<i64>,
23036    pub proximity_alert_radius: Option<i64>,
23037}
23038impl From<NoSkipLocation> for Location {
23039    fn from(t: NoSkipLocation) -> Self {
23040        Self {
23041            latitude: t.latitude,
23042            longitude: t.longitude,
23043            horizontal_accuracy: t.horizontal_accuracy,
23044            live_period: t.live_period,
23045            heading: t.heading,
23046            proximity_alert_radius: t.proximity_alert_radius,
23047        }
23048    }
23049}
23050#[allow(clippy::from_over_into)]
23051impl Into<NoSkipLocation> for Location {
23052    fn into(self) -> NoSkipLocation {
23053        NoSkipLocation {
23054            latitude: self.latitude,
23055            longitude: self.longitude,
23056            horizontal_accuracy: self.horizontal_accuracy,
23057            live_period: self.live_period,
23058            heading: self.heading,
23059            proximity_alert_radius: self.proximity_alert_radius,
23060        }
23061    }
23062}
23063impl NoSkipLocation {
23064    pub fn skip(self) -> Location {
23065        self.into()
23066    }
23067}
23068impl Location {
23069    pub fn noskip(self) -> NoSkipLocation {
23070        self.into()
23071    }
23072}
23073#[allow(rustdoc::invalid_html_tags)]
23074#[doc = "This object represents a point on the map."]
23075#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23076pub struct LocationBuilder {
23077    #[allow(rustdoc::invalid_html_tags)]
23078    #[doc = "Latitude as defined by the sender"]
23079    #[serde(rename = "latitude")]
23080    pub latitude: ::ordered_float::OrderedFloat<f64>,
23081    #[allow(rustdoc::invalid_html_tags)]
23082    #[doc = "Longitude as defined by the sender"]
23083    #[serde(rename = "longitude")]
23084    pub longitude: ::ordered_float::OrderedFloat<f64>,
23085    #[allow(rustdoc::invalid_html_tags)]
23086    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
23087    #[serde(
23088        skip_serializing_if = "Option::is_none",
23089        rename = "horizontal_accuracy",
23090        default
23091    )]
23092    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
23093    #[allow(rustdoc::invalid_html_tags)]
23094    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
23095    #[serde(
23096        skip_serializing_if = "Option::is_none",
23097        rename = "live_period",
23098        default
23099    )]
23100    pub live_period: Option<i64>,
23101    #[allow(rustdoc::invalid_html_tags)]
23102    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
23103    #[serde(skip_serializing_if = "Option::is_none", rename = "heading", default)]
23104    pub heading: Option<i64>,
23105    #[allow(rustdoc::invalid_html_tags)]
23106    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
23107    #[serde(
23108        skip_serializing_if = "Option::is_none",
23109        rename = "proximity_alert_radius",
23110        default
23111    )]
23112    pub proximity_alert_radius: Option<i64>,
23113}
23114impl LocationBuilder {
23115    #[allow(clippy::too_many_arguments)]
23116    pub fn new(
23117        latitude: ::ordered_float::OrderedFloat<f64>,
23118        longitude: ::ordered_float::OrderedFloat<f64>,
23119    ) -> Self {
23120        Self {
23121            latitude,
23122            longitude,
23123            horizontal_accuracy: None,
23124            live_period: None,
23125            heading: None,
23126            proximity_alert_radius: None,
23127        }
23128    }
23129    #[allow(rustdoc::invalid_html_tags)]
23130    #[doc = "Latitude as defined by the sender"]
23131    pub fn set_latitude(mut self, latitude: ::ordered_float::OrderedFloat<f64>) -> Self {
23132        self.latitude = latitude;
23133        self
23134    }
23135    #[allow(rustdoc::invalid_html_tags)]
23136    #[doc = "Longitude as defined by the sender"]
23137    pub fn set_longitude(mut self, longitude: ::ordered_float::OrderedFloat<f64>) -> Self {
23138        self.longitude = longitude;
23139        self
23140    }
23141    #[allow(rustdoc::invalid_html_tags)]
23142    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
23143    pub fn set_horizontal_accuracy(
23144        mut self,
23145        horizontal_accuracy: ::ordered_float::OrderedFloat<f64>,
23146    ) -> Self {
23147        self.horizontal_accuracy = Some(horizontal_accuracy);
23148        self
23149    }
23150    #[allow(rustdoc::invalid_html_tags)]
23151    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
23152    pub fn set_live_period(mut self, live_period: i64) -> Self {
23153        self.live_period = Some(live_period);
23154        self
23155    }
23156    #[allow(rustdoc::invalid_html_tags)]
23157    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
23158    pub fn set_heading(mut self, heading: i64) -> Self {
23159        self.heading = Some(heading);
23160        self
23161    }
23162    #[allow(rustdoc::invalid_html_tags)]
23163    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
23164    pub fn set_proximity_alert_radius(mut self, proximity_alert_radius: i64) -> Self {
23165        self.proximity_alert_radius = Some(proximity_alert_radius);
23166        self
23167    }
23168    pub fn build(self) -> Location {
23169        Location {
23170            latitude: self.latitude,
23171            longitude: self.longitude,
23172            horizontal_accuracy: self.horizontal_accuracy,
23173            live_period: self.live_period,
23174            heading: self.heading,
23175            proximity_alert_radius: self.proximity_alert_radius,
23176        }
23177    }
23178}
23179#[allow(rustdoc::invalid_html_tags)]
23180#[doc = "This object represents one row of the high scores table for a game."]
23181#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23182pub struct GameHighScore {
23183    #[allow(rustdoc::invalid_html_tags)]
23184    #[doc = "Position in high score table for the game"]
23185    #[serde(rename = "position")]
23186    pub position: i64,
23187    #[allow(rustdoc::invalid_html_tags)]
23188    #[doc = "User"]
23189    #[serde(rename = "user")]
23190    pub user: BoxWrapper<Unbox<User>>,
23191    #[allow(rustdoc::invalid_html_tags)]
23192    #[doc = "Score"]
23193    #[serde(rename = "score")]
23194    pub score: i64,
23195}
23196#[allow(rustdoc::invalid_html_tags)]
23197#[doc = "Companion type to GameHighScore that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
23198#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23199pub struct NoSkipGameHighScore {
23200    #[allow(rustdoc::invalid_html_tags)]
23201    #[doc = "Position in high score table for the game"]
23202    #[serde(rename = "position")]
23203    pub position: i64,
23204    #[allow(rustdoc::invalid_html_tags)]
23205    #[doc = "User"]
23206    #[serde(rename = "user")]
23207    pub user: BoxWrapper<Unbox<User>>,
23208    #[allow(rustdoc::invalid_html_tags)]
23209    #[doc = "Score"]
23210    #[serde(rename = "score")]
23211    pub score: i64,
23212}
23213impl From<NoSkipGameHighScore> for GameHighScore {
23214    fn from(t: NoSkipGameHighScore) -> Self {
23215        Self {
23216            position: t.position,
23217            user: t.user,
23218            score: t.score,
23219        }
23220    }
23221}
23222#[allow(clippy::from_over_into)]
23223impl Into<NoSkipGameHighScore> for GameHighScore {
23224    fn into(self) -> NoSkipGameHighScore {
23225        NoSkipGameHighScore {
23226            position: self.position,
23227            user: self.user,
23228            score: self.score,
23229        }
23230    }
23231}
23232impl NoSkipGameHighScore {
23233    pub fn skip(self) -> GameHighScore {
23234        self.into()
23235    }
23236}
23237impl GameHighScore {
23238    pub fn noskip(self) -> NoSkipGameHighScore {
23239        self.into()
23240    }
23241}
23242#[allow(rustdoc::invalid_html_tags)]
23243#[doc = "This object represents one row of the high scores table for a game."]
23244#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23245pub struct GameHighScoreBuilder {
23246    #[allow(rustdoc::invalid_html_tags)]
23247    #[doc = "Position in high score table for the game"]
23248    #[serde(rename = "position")]
23249    pub position: i64,
23250    #[allow(rustdoc::invalid_html_tags)]
23251    #[doc = "User"]
23252    #[serde(rename = "user")]
23253    pub user: BoxWrapper<Unbox<User>>,
23254    #[allow(rustdoc::invalid_html_tags)]
23255    #[doc = "Score"]
23256    #[serde(rename = "score")]
23257    pub score: i64,
23258}
23259impl GameHighScoreBuilder {
23260    #[allow(clippy::too_many_arguments)]
23261    pub fn new<A: Into<User>>(position: i64, user: A, score: i64) -> Self {
23262        Self {
23263            position,
23264            user: BoxWrapper::new_unbox(user.into()),
23265            score,
23266        }
23267    }
23268    #[allow(rustdoc::invalid_html_tags)]
23269    #[doc = "Position in high score table for the game"]
23270    pub fn set_position(mut self, position: i64) -> Self {
23271        self.position = position;
23272        self
23273    }
23274    #[allow(rustdoc::invalid_html_tags)]
23275    #[doc = "User"]
23276    pub fn set_user(mut self, user: User) -> Self {
23277        self.user = BoxWrapper(Unbox(user));
23278        self
23279    }
23280    #[allow(rustdoc::invalid_html_tags)]
23281    #[doc = "Score"]
23282    pub fn set_score(mut self, score: i64) -> Self {
23283        self.score = score;
23284        self
23285    }
23286    pub fn build(self) -> GameHighScore {
23287        GameHighScore {
23288            position: self.position,
23289            user: self.user,
23290            score: self.score,
23291        }
23292    }
23293}
23294#[allow(rustdoc::invalid_html_tags)]
23295#[doc = "This object represents a change of a reaction on a message performed by a user."]
23296#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23297pub struct MessageReactionUpdated {
23298    #[allow(rustdoc::invalid_html_tags)]
23299    #[doc = "The chat containing the message the user reacted to"]
23300    #[serde(rename = "chat")]
23301    pub chat: BoxWrapper<Unbox<Chat>>,
23302    #[allow(rustdoc::invalid_html_tags)]
23303    #[doc = "Unique identifier of the message inside the chat"]
23304    #[serde(rename = "message_id")]
23305    pub message_id: i64,
23306    #[allow(rustdoc::invalid_html_tags)]
23307    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
23308    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
23309    pub user: Option<BoxWrapper<Unbox<User>>>,
23310    #[allow(rustdoc::invalid_html_tags)]
23311    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
23312    #[serde(
23313        skip_serializing_if = "Option::is_none",
23314        rename = "actor_chat",
23315        default
23316    )]
23317    pub actor_chat: Option<BoxWrapper<Unbox<Chat>>>,
23318    #[allow(rustdoc::invalid_html_tags)]
23319    #[doc = "Date of the change in Unix time"]
23320    #[serde(rename = "date")]
23321    pub date: i64,
23322    #[allow(rustdoc::invalid_html_tags)]
23323    #[doc = "Previous list of reaction types that were set by the user"]
23324    #[serde(rename = "old_reaction")]
23325    pub old_reaction: Vec<ReactionType>,
23326    #[allow(rustdoc::invalid_html_tags)]
23327    #[doc = "New list of reaction types that have been set by the user"]
23328    #[serde(rename = "new_reaction")]
23329    pub new_reaction: Vec<ReactionType>,
23330}
23331#[allow(rustdoc::invalid_html_tags)]
23332#[doc = "Companion type to MessageReactionUpdated that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
23333#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23334pub struct NoSkipMessageReactionUpdated {
23335    #[allow(rustdoc::invalid_html_tags)]
23336    #[doc = "The chat containing the message the user reacted to"]
23337    #[serde(rename = "chat")]
23338    pub chat: BoxWrapper<Unbox<Chat>>,
23339    #[allow(rustdoc::invalid_html_tags)]
23340    #[doc = "Unique identifier of the message inside the chat"]
23341    #[serde(rename = "message_id")]
23342    pub message_id: i64,
23343    pub user: Option<BoxWrapper<Unbox<User>>>,
23344    pub actor_chat: Option<BoxWrapper<Unbox<Chat>>>,
23345    #[allow(rustdoc::invalid_html_tags)]
23346    #[doc = "Date of the change in Unix time"]
23347    #[serde(rename = "date")]
23348    pub date: i64,
23349    #[allow(rustdoc::invalid_html_tags)]
23350    #[doc = "Previous list of reaction types that were set by the user"]
23351    #[serde(rename = "old_reaction")]
23352    pub old_reaction: Vec<ReactionType>,
23353    #[allow(rustdoc::invalid_html_tags)]
23354    #[doc = "New list of reaction types that have been set by the user"]
23355    #[serde(rename = "new_reaction")]
23356    pub new_reaction: Vec<ReactionType>,
23357}
23358impl From<NoSkipMessageReactionUpdated> for MessageReactionUpdated {
23359    fn from(t: NoSkipMessageReactionUpdated) -> Self {
23360        Self {
23361            chat: t.chat,
23362            message_id: t.message_id,
23363            user: t.user,
23364            actor_chat: t.actor_chat,
23365            date: t.date,
23366            old_reaction: t.old_reaction,
23367            new_reaction: t.new_reaction,
23368        }
23369    }
23370}
23371#[allow(clippy::from_over_into)]
23372impl Into<NoSkipMessageReactionUpdated> for MessageReactionUpdated {
23373    fn into(self) -> NoSkipMessageReactionUpdated {
23374        NoSkipMessageReactionUpdated {
23375            chat: self.chat,
23376            message_id: self.message_id,
23377            user: self.user,
23378            actor_chat: self.actor_chat,
23379            date: self.date,
23380            old_reaction: self.old_reaction,
23381            new_reaction: self.new_reaction,
23382        }
23383    }
23384}
23385impl NoSkipMessageReactionUpdated {
23386    pub fn skip(self) -> MessageReactionUpdated {
23387        self.into()
23388    }
23389}
23390impl MessageReactionUpdated {
23391    pub fn noskip(self) -> NoSkipMessageReactionUpdated {
23392        self.into()
23393    }
23394}
23395#[allow(rustdoc::invalid_html_tags)]
23396#[doc = "This object represents a change of a reaction on a message performed by a user."]
23397#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23398pub struct MessageReactionUpdatedBuilder {
23399    #[allow(rustdoc::invalid_html_tags)]
23400    #[doc = "The chat containing the message the user reacted to"]
23401    #[serde(rename = "chat")]
23402    pub chat: BoxWrapper<Unbox<Chat>>,
23403    #[allow(rustdoc::invalid_html_tags)]
23404    #[doc = "Unique identifier of the message inside the chat"]
23405    #[serde(rename = "message_id")]
23406    pub message_id: i64,
23407    #[allow(rustdoc::invalid_html_tags)]
23408    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
23409    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
23410    pub user: Option<BoxWrapper<Unbox<User>>>,
23411    #[allow(rustdoc::invalid_html_tags)]
23412    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
23413    #[serde(
23414        skip_serializing_if = "Option::is_none",
23415        rename = "actor_chat",
23416        default
23417    )]
23418    pub actor_chat: Option<BoxWrapper<Unbox<Chat>>>,
23419    #[allow(rustdoc::invalid_html_tags)]
23420    #[doc = "Date of the change in Unix time"]
23421    #[serde(rename = "date")]
23422    pub date: i64,
23423    #[allow(rustdoc::invalid_html_tags)]
23424    #[doc = "Previous list of reaction types that were set by the user"]
23425    #[serde(rename = "old_reaction")]
23426    pub old_reaction: Vec<ReactionType>,
23427    #[allow(rustdoc::invalid_html_tags)]
23428    #[doc = "New list of reaction types that have been set by the user"]
23429    #[serde(rename = "new_reaction")]
23430    pub new_reaction: Vec<ReactionType>,
23431}
23432impl MessageReactionUpdatedBuilder {
23433    #[allow(clippy::too_many_arguments)]
23434    pub fn new<A: Into<Chat>>(
23435        chat: A,
23436        message_id: i64,
23437        date: i64,
23438        old_reaction: Vec<ReactionType>,
23439        new_reaction: Vec<ReactionType>,
23440    ) -> Self {
23441        Self {
23442            chat: BoxWrapper::new_unbox(chat.into()),
23443            message_id,
23444            date,
23445            old_reaction,
23446            new_reaction,
23447            user: None,
23448            actor_chat: None,
23449        }
23450    }
23451    #[allow(rustdoc::invalid_html_tags)]
23452    #[doc = "The chat containing the message the user reacted to"]
23453    pub fn set_chat(mut self, chat: Chat) -> Self {
23454        self.chat = BoxWrapper(Unbox(chat));
23455        self
23456    }
23457    #[allow(rustdoc::invalid_html_tags)]
23458    #[doc = "Unique identifier of the message inside the chat"]
23459    pub fn set_message_id(mut self, message_id: i64) -> Self {
23460        self.message_id = message_id;
23461        self
23462    }
23463    #[allow(rustdoc::invalid_html_tags)]
23464    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
23465    pub fn set_user(mut self, user: User) -> Self {
23466        self.user = Some(BoxWrapper(Unbox(user)));
23467        self
23468    }
23469    #[allow(rustdoc::invalid_html_tags)]
23470    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
23471    pub fn set_actor_chat(mut self, actor_chat: Chat) -> Self {
23472        self.actor_chat = Some(BoxWrapper(Unbox(actor_chat)));
23473        self
23474    }
23475    #[allow(rustdoc::invalid_html_tags)]
23476    #[doc = "Date of the change in Unix time"]
23477    pub fn set_date(mut self, date: i64) -> Self {
23478        self.date = date;
23479        self
23480    }
23481    #[allow(rustdoc::invalid_html_tags)]
23482    #[doc = "Previous list of reaction types that were set by the user"]
23483    pub fn set_old_reaction(mut self, old_reaction: Vec<ReactionType>) -> Self {
23484        self.old_reaction = old_reaction;
23485        self
23486    }
23487    #[allow(rustdoc::invalid_html_tags)]
23488    #[doc = "New list of reaction types that have been set by the user"]
23489    pub fn set_new_reaction(mut self, new_reaction: Vec<ReactionType>) -> Self {
23490        self.new_reaction = new_reaction;
23491        self
23492    }
23493    pub fn build(self) -> MessageReactionUpdated {
23494        MessageReactionUpdated {
23495            chat: self.chat,
23496            message_id: self.message_id,
23497            user: self.user,
23498            actor_chat: self.actor_chat,
23499            date: self.date,
23500            old_reaction: self.old_reaction,
23501            new_reaction: self.new_reaction,
23502        }
23503    }
23504}
23505#[allow(rustdoc::invalid_html_tags)]
23506#[doc = "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control."]
23507#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23508pub struct SuccessfulPayment {
23509    #[allow(rustdoc::invalid_html_tags)]
23510    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
23511    #[serde(rename = "currency")]
23512    pub currency: String,
23513    #[allow(rustdoc::invalid_html_tags)]
23514    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
23515    #[serde(rename = "total_amount")]
23516    pub total_amount: i64,
23517    #[allow(rustdoc::invalid_html_tags)]
23518    #[doc = "Bot-specified invoice payload"]
23519    #[serde(rename = "invoice_payload")]
23520    pub invoice_payload: String,
23521    #[allow(rustdoc::invalid_html_tags)]
23522    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
23523    #[serde(
23524        skip_serializing_if = "Option::is_none",
23525        rename = "subscription_expiration_date",
23526        default
23527    )]
23528    pub subscription_expiration_date: Option<i64>,
23529    #[allow(rustdoc::invalid_html_tags)]
23530    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
23531    #[serde(
23532        skip_serializing_if = "Option::is_none",
23533        rename = "is_recurring",
23534        default
23535    )]
23536    pub is_recurring: Option<bool>,
23537    #[allow(rustdoc::invalid_html_tags)]
23538    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
23539    #[serde(
23540        skip_serializing_if = "Option::is_none",
23541        rename = "is_first_recurring",
23542        default
23543    )]
23544    pub is_first_recurring: Option<bool>,
23545    #[allow(rustdoc::invalid_html_tags)]
23546    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
23547    #[serde(
23548        skip_serializing_if = "Option::is_none",
23549        rename = "shipping_option_id",
23550        default
23551    )]
23552    pub shipping_option_id: Option<String>,
23553    #[allow(rustdoc::invalid_html_tags)]
23554    #[doc = "Optional. Order information provided by the user"]
23555    #[serde(
23556        skip_serializing_if = "Option::is_none",
23557        rename = "order_info",
23558        default
23559    )]
23560    pub order_info: Option<BoxWrapper<Box<OrderInfo>>>,
23561    #[allow(rustdoc::invalid_html_tags)]
23562    #[doc = "Telegram payment identifier"]
23563    #[serde(rename = "telegram_payment_charge_id")]
23564    pub telegram_payment_charge_id: String,
23565    #[allow(rustdoc::invalid_html_tags)]
23566    #[doc = "Provider payment identifier"]
23567    #[serde(rename = "provider_payment_charge_id")]
23568    pub provider_payment_charge_id: String,
23569}
23570#[allow(rustdoc::invalid_html_tags)]
23571#[doc = "Companion type to SuccessfulPayment that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
23572#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23573pub struct NoSkipSuccessfulPayment {
23574    #[allow(rustdoc::invalid_html_tags)]
23575    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
23576    #[serde(rename = "currency")]
23577    pub currency: String,
23578    #[allow(rustdoc::invalid_html_tags)]
23579    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
23580    #[serde(rename = "total_amount")]
23581    pub total_amount: i64,
23582    #[allow(rustdoc::invalid_html_tags)]
23583    #[doc = "Bot-specified invoice payload"]
23584    #[serde(rename = "invoice_payload")]
23585    pub invoice_payload: String,
23586    pub subscription_expiration_date: Option<i64>,
23587    pub is_recurring: Option<bool>,
23588    pub is_first_recurring: Option<bool>,
23589    pub shipping_option_id: Option<String>,
23590    pub order_info: Option<BoxWrapper<Box<OrderInfo>>>,
23591    #[allow(rustdoc::invalid_html_tags)]
23592    #[doc = "Telegram payment identifier"]
23593    #[serde(rename = "telegram_payment_charge_id")]
23594    pub telegram_payment_charge_id: String,
23595    #[allow(rustdoc::invalid_html_tags)]
23596    #[doc = "Provider payment identifier"]
23597    #[serde(rename = "provider_payment_charge_id")]
23598    pub provider_payment_charge_id: String,
23599}
23600impl From<NoSkipSuccessfulPayment> for SuccessfulPayment {
23601    fn from(t: NoSkipSuccessfulPayment) -> Self {
23602        Self {
23603            currency: t.currency,
23604            total_amount: t.total_amount,
23605            invoice_payload: t.invoice_payload,
23606            subscription_expiration_date: t.subscription_expiration_date,
23607            is_recurring: t.is_recurring,
23608            is_first_recurring: t.is_first_recurring,
23609            shipping_option_id: t.shipping_option_id,
23610            order_info: t.order_info,
23611            telegram_payment_charge_id: t.telegram_payment_charge_id,
23612            provider_payment_charge_id: t.provider_payment_charge_id,
23613        }
23614    }
23615}
23616#[allow(clippy::from_over_into)]
23617impl Into<NoSkipSuccessfulPayment> for SuccessfulPayment {
23618    fn into(self) -> NoSkipSuccessfulPayment {
23619        NoSkipSuccessfulPayment {
23620            currency: self.currency,
23621            total_amount: self.total_amount,
23622            invoice_payload: self.invoice_payload,
23623            subscription_expiration_date: self.subscription_expiration_date,
23624            is_recurring: self.is_recurring,
23625            is_first_recurring: self.is_first_recurring,
23626            shipping_option_id: self.shipping_option_id,
23627            order_info: self.order_info,
23628            telegram_payment_charge_id: self.telegram_payment_charge_id,
23629            provider_payment_charge_id: self.provider_payment_charge_id,
23630        }
23631    }
23632}
23633impl NoSkipSuccessfulPayment {
23634    pub fn skip(self) -> SuccessfulPayment {
23635        self.into()
23636    }
23637}
23638impl SuccessfulPayment {
23639    pub fn noskip(self) -> NoSkipSuccessfulPayment {
23640        self.into()
23641    }
23642}
23643#[allow(rustdoc::invalid_html_tags)]
23644#[doc = "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control."]
23645#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23646pub struct SuccessfulPaymentBuilder {
23647    #[allow(rustdoc::invalid_html_tags)]
23648    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
23649    #[serde(rename = "currency")]
23650    pub currency: String,
23651    #[allow(rustdoc::invalid_html_tags)]
23652    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
23653    #[serde(rename = "total_amount")]
23654    pub total_amount: i64,
23655    #[allow(rustdoc::invalid_html_tags)]
23656    #[doc = "Bot-specified invoice payload"]
23657    #[serde(rename = "invoice_payload")]
23658    pub invoice_payload: String,
23659    #[allow(rustdoc::invalid_html_tags)]
23660    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
23661    #[serde(
23662        skip_serializing_if = "Option::is_none",
23663        rename = "subscription_expiration_date",
23664        default
23665    )]
23666    pub subscription_expiration_date: Option<i64>,
23667    #[allow(rustdoc::invalid_html_tags)]
23668    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
23669    #[serde(
23670        skip_serializing_if = "Option::is_none",
23671        rename = "is_recurring",
23672        default
23673    )]
23674    pub is_recurring: Option<bool>,
23675    #[allow(rustdoc::invalid_html_tags)]
23676    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
23677    #[serde(
23678        skip_serializing_if = "Option::is_none",
23679        rename = "is_first_recurring",
23680        default
23681    )]
23682    pub is_first_recurring: Option<bool>,
23683    #[allow(rustdoc::invalid_html_tags)]
23684    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
23685    #[serde(
23686        skip_serializing_if = "Option::is_none",
23687        rename = "shipping_option_id",
23688        default
23689    )]
23690    pub shipping_option_id: Option<String>,
23691    #[allow(rustdoc::invalid_html_tags)]
23692    #[doc = "Optional. Order information provided by the user"]
23693    #[serde(
23694        skip_serializing_if = "Option::is_none",
23695        rename = "order_info",
23696        default
23697    )]
23698    pub order_info: Option<BoxWrapper<Box<OrderInfo>>>,
23699    #[allow(rustdoc::invalid_html_tags)]
23700    #[doc = "Telegram payment identifier"]
23701    #[serde(rename = "telegram_payment_charge_id")]
23702    pub telegram_payment_charge_id: String,
23703    #[allow(rustdoc::invalid_html_tags)]
23704    #[doc = "Provider payment identifier"]
23705    #[serde(rename = "provider_payment_charge_id")]
23706    pub provider_payment_charge_id: String,
23707}
23708impl SuccessfulPaymentBuilder {
23709    #[allow(clippy::too_many_arguments)]
23710    pub fn new(
23711        currency: String,
23712        total_amount: i64,
23713        invoice_payload: String,
23714        telegram_payment_charge_id: String,
23715        provider_payment_charge_id: String,
23716    ) -> Self {
23717        Self {
23718            currency,
23719            total_amount,
23720            invoice_payload,
23721            telegram_payment_charge_id,
23722            provider_payment_charge_id,
23723            subscription_expiration_date: None,
23724            is_recurring: None,
23725            is_first_recurring: None,
23726            shipping_option_id: None,
23727            order_info: None,
23728        }
23729    }
23730    #[allow(rustdoc::invalid_html_tags)]
23731    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
23732    pub fn set_currency(mut self, currency: String) -> Self {
23733        self.currency = currency;
23734        self
23735    }
23736    #[allow(rustdoc::invalid_html_tags)]
23737    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
23738    pub fn set_total_amount(mut self, total_amount: i64) -> Self {
23739        self.total_amount = total_amount;
23740        self
23741    }
23742    #[allow(rustdoc::invalid_html_tags)]
23743    #[doc = "Bot-specified invoice payload"]
23744    pub fn set_invoice_payload(mut self, invoice_payload: String) -> Self {
23745        self.invoice_payload = invoice_payload;
23746        self
23747    }
23748    #[allow(rustdoc::invalid_html_tags)]
23749    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
23750    pub fn set_subscription_expiration_date(mut self, subscription_expiration_date: i64) -> Self {
23751        self.subscription_expiration_date = Some(subscription_expiration_date);
23752        self
23753    }
23754    #[allow(rustdoc::invalid_html_tags)]
23755    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
23756    pub fn set_is_recurring(mut self, is_recurring: bool) -> Self {
23757        self.is_recurring = Some(is_recurring);
23758        self
23759    }
23760    #[allow(rustdoc::invalid_html_tags)]
23761    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
23762    pub fn set_is_first_recurring(mut self, is_first_recurring: bool) -> Self {
23763        self.is_first_recurring = Some(is_first_recurring);
23764        self
23765    }
23766    #[allow(rustdoc::invalid_html_tags)]
23767    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
23768    pub fn set_shipping_option_id(mut self, shipping_option_id: String) -> Self {
23769        self.shipping_option_id = Some(shipping_option_id);
23770        self
23771    }
23772    #[allow(rustdoc::invalid_html_tags)]
23773    #[doc = "Optional. Order information provided by the user"]
23774    pub fn set_order_info(mut self, order_info: Box<OrderInfo>) -> Self {
23775        self.order_info = Some(BoxWrapper(order_info));
23776        self
23777    }
23778    #[allow(rustdoc::invalid_html_tags)]
23779    #[doc = "Telegram payment identifier"]
23780    pub fn set_telegram_payment_charge_id(mut self, telegram_payment_charge_id: String) -> Self {
23781        self.telegram_payment_charge_id = telegram_payment_charge_id;
23782        self
23783    }
23784    #[allow(rustdoc::invalid_html_tags)]
23785    #[doc = "Provider payment identifier"]
23786    pub fn set_provider_payment_charge_id(mut self, provider_payment_charge_id: String) -> Self {
23787        self.provider_payment_charge_id = provider_payment_charge_id;
23788        self
23789    }
23790    pub fn build(self) -> SuccessfulPayment {
23791        SuccessfulPayment {
23792            currency: self.currency,
23793            total_amount: self.total_amount,
23794            invoice_payload: self.invoice_payload,
23795            subscription_expiration_date: self.subscription_expiration_date,
23796            is_recurring: self.is_recurring,
23797            is_first_recurring: self.is_first_recurring,
23798            shipping_option_id: self.shipping_option_id,
23799            order_info: self.order_info,
23800            telegram_payment_charge_id: self.telegram_payment_charge_id,
23801            provider_payment_charge_id: self.provider_payment_charge_id,
23802        }
23803    }
23804}
23805#[allow(rustdoc::invalid_html_tags)]
23806#[doc = "Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method."]
23807#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23808pub struct InlineQueryResultDocument {
23809    #[allow(rustdoc::invalid_html_tags)]
23810    #[doc = "Type of the result, must be document"]
23811    #[serde(rename = "type")]
23812    pub tg_type: String,
23813    #[allow(rustdoc::invalid_html_tags)]
23814    #[doc = "Unique identifier for this result, 1-64 bytes"]
23815    #[serde(rename = "id")]
23816    pub id: String,
23817    #[allow(rustdoc::invalid_html_tags)]
23818    #[doc = "Title for the result"]
23819    #[serde(rename = "title")]
23820    pub title: String,
23821    #[allow(rustdoc::invalid_html_tags)]
23822    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
23823    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
23824    pub caption: Option<String>,
23825    #[allow(rustdoc::invalid_html_tags)]
23826    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
23827    #[serde(
23828        skip_serializing_if = "Option::is_none",
23829        rename = "parse_mode",
23830        default
23831    )]
23832    pub parse_mode: Option<String>,
23833    #[allow(rustdoc::invalid_html_tags)]
23834    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
23835    #[serde(
23836        skip_serializing_if = "Option::is_none",
23837        rename = "caption_entities",
23838        default
23839    )]
23840    pub caption_entities: Option<Vec<MessageEntity>>,
23841    #[allow(rustdoc::invalid_html_tags)]
23842    #[doc = "A valid URL for the file"]
23843    #[serde(rename = "document_url")]
23844    pub document_url: String,
23845    #[allow(rustdoc::invalid_html_tags)]
23846    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
23847    #[serde(rename = "mime_type")]
23848    pub mime_type: String,
23849    #[allow(rustdoc::invalid_html_tags)]
23850    #[doc = "Optional. Short description of the result"]
23851    #[serde(
23852        skip_serializing_if = "Option::is_none",
23853        rename = "description",
23854        default
23855    )]
23856    pub description: Option<String>,
23857    #[allow(rustdoc::invalid_html_tags)]
23858    #[doc = "Optional. Inline keyboard attached to the message"]
23859    #[serde(
23860        skip_serializing_if = "Option::is_none",
23861        rename = "reply_markup",
23862        default
23863    )]
23864    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
23865    #[allow(rustdoc::invalid_html_tags)]
23866    #[doc = "Optional. Content of the message to be sent instead of the file"]
23867    #[serde(
23868        skip_serializing_if = "Option::is_none",
23869        rename = "input_message_content",
23870        default
23871    )]
23872    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
23873    #[allow(rustdoc::invalid_html_tags)]
23874    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
23875    #[serde(
23876        skip_serializing_if = "Option::is_none",
23877        rename = "thumbnail_url",
23878        default
23879    )]
23880    pub thumbnail_url: Option<String>,
23881    #[allow(rustdoc::invalid_html_tags)]
23882    #[doc = "Optional. Thumbnail width"]
23883    #[serde(
23884        skip_serializing_if = "Option::is_none",
23885        rename = "thumbnail_width",
23886        default
23887    )]
23888    pub thumbnail_width: Option<i64>,
23889    #[allow(rustdoc::invalid_html_tags)]
23890    #[doc = "Optional. Thumbnail height"]
23891    #[serde(
23892        skip_serializing_if = "Option::is_none",
23893        rename = "thumbnail_height",
23894        default
23895    )]
23896    pub thumbnail_height: Option<i64>,
23897}
23898#[allow(rustdoc::invalid_html_tags)]
23899#[doc = "Companion type to InlineQueryResultDocument that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
23900#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23901pub struct NoSkipInlineQueryResultDocument {
23902    #[allow(rustdoc::invalid_html_tags)]
23903    #[doc = "Type of the result, must be document"]
23904    #[serde(rename = "type")]
23905    pub tg_type: String,
23906    #[allow(rustdoc::invalid_html_tags)]
23907    #[doc = "Unique identifier for this result, 1-64 bytes"]
23908    #[serde(rename = "id")]
23909    pub id: String,
23910    #[allow(rustdoc::invalid_html_tags)]
23911    #[doc = "Title for the result"]
23912    #[serde(rename = "title")]
23913    pub title: String,
23914    pub caption: Option<String>,
23915    pub parse_mode: Option<String>,
23916    pub caption_entities: Option<Vec<MessageEntity>>,
23917    #[allow(rustdoc::invalid_html_tags)]
23918    #[doc = "A valid URL for the file"]
23919    #[serde(rename = "document_url")]
23920    pub document_url: String,
23921    #[allow(rustdoc::invalid_html_tags)]
23922    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
23923    #[serde(rename = "mime_type")]
23924    pub mime_type: String,
23925    pub description: Option<String>,
23926    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
23927    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
23928    pub thumbnail_url: Option<String>,
23929    pub thumbnail_width: Option<i64>,
23930    pub thumbnail_height: Option<i64>,
23931}
23932impl From<NoSkipInlineQueryResultDocument> for InlineQueryResultDocument {
23933    fn from(t: NoSkipInlineQueryResultDocument) -> Self {
23934        Self {
23935            tg_type: t.tg_type,
23936            id: t.id,
23937            title: t.title,
23938            caption: t.caption,
23939            parse_mode: t.parse_mode,
23940            caption_entities: t.caption_entities,
23941            document_url: t.document_url,
23942            mime_type: t.mime_type,
23943            description: t.description,
23944            reply_markup: t.reply_markup,
23945            input_message_content: t.input_message_content,
23946            thumbnail_url: t.thumbnail_url,
23947            thumbnail_width: t.thumbnail_width,
23948            thumbnail_height: t.thumbnail_height,
23949        }
23950    }
23951}
23952#[allow(clippy::from_over_into)]
23953impl Into<NoSkipInlineQueryResultDocument> for InlineQueryResultDocument {
23954    fn into(self) -> NoSkipInlineQueryResultDocument {
23955        NoSkipInlineQueryResultDocument {
23956            tg_type: self.tg_type,
23957            id: self.id,
23958            title: self.title,
23959            caption: self.caption,
23960            parse_mode: self.parse_mode,
23961            caption_entities: self.caption_entities,
23962            document_url: self.document_url,
23963            mime_type: self.mime_type,
23964            description: self.description,
23965            reply_markup: self.reply_markup,
23966            input_message_content: self.input_message_content,
23967            thumbnail_url: self.thumbnail_url,
23968            thumbnail_width: self.thumbnail_width,
23969            thumbnail_height: self.thumbnail_height,
23970        }
23971    }
23972}
23973impl NoSkipInlineQueryResultDocument {
23974    pub fn skip(self) -> InlineQueryResultDocument {
23975        self.into()
23976    }
23977}
23978impl InlineQueryResultDocument {
23979    pub fn noskip(self) -> NoSkipInlineQueryResultDocument {
23980        self.into()
23981    }
23982}
23983#[allow(rustdoc::invalid_html_tags)]
23984#[doc = "Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method."]
23985#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
23986pub struct InlineQueryResultDocumentBuilder {
23987    #[allow(rustdoc::invalid_html_tags)]
23988    #[doc = "Type of the result, must be document"]
23989    #[serde(rename = "type")]
23990    pub tg_type: String,
23991    #[allow(rustdoc::invalid_html_tags)]
23992    #[doc = "Unique identifier for this result, 1-64 bytes"]
23993    #[serde(rename = "id")]
23994    pub id: String,
23995    #[allow(rustdoc::invalid_html_tags)]
23996    #[doc = "Title for the result"]
23997    #[serde(rename = "title")]
23998    pub title: String,
23999    #[allow(rustdoc::invalid_html_tags)]
24000    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
24001    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
24002    pub caption: Option<String>,
24003    #[allow(rustdoc::invalid_html_tags)]
24004    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
24005    #[serde(
24006        skip_serializing_if = "Option::is_none",
24007        rename = "parse_mode",
24008        default
24009    )]
24010    pub parse_mode: Option<String>,
24011    #[allow(rustdoc::invalid_html_tags)]
24012    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
24013    #[serde(
24014        skip_serializing_if = "Option::is_none",
24015        rename = "caption_entities",
24016        default
24017    )]
24018    pub caption_entities: Option<Vec<MessageEntity>>,
24019    #[allow(rustdoc::invalid_html_tags)]
24020    #[doc = "A valid URL for the file"]
24021    #[serde(rename = "document_url")]
24022    pub document_url: String,
24023    #[allow(rustdoc::invalid_html_tags)]
24024    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
24025    #[serde(rename = "mime_type")]
24026    pub mime_type: String,
24027    #[allow(rustdoc::invalid_html_tags)]
24028    #[doc = "Optional. Short description of the result"]
24029    #[serde(
24030        skip_serializing_if = "Option::is_none",
24031        rename = "description",
24032        default
24033    )]
24034    pub description: Option<String>,
24035    #[allow(rustdoc::invalid_html_tags)]
24036    #[doc = "Optional. Inline keyboard attached to the message"]
24037    #[serde(
24038        skip_serializing_if = "Option::is_none",
24039        rename = "reply_markup",
24040        default
24041    )]
24042    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
24043    #[allow(rustdoc::invalid_html_tags)]
24044    #[doc = "Optional. Content of the message to be sent instead of the file"]
24045    #[serde(
24046        skip_serializing_if = "Option::is_none",
24047        rename = "input_message_content",
24048        default
24049    )]
24050    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
24051    #[allow(rustdoc::invalid_html_tags)]
24052    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
24053    #[serde(
24054        skip_serializing_if = "Option::is_none",
24055        rename = "thumbnail_url",
24056        default
24057    )]
24058    pub thumbnail_url: Option<String>,
24059    #[allow(rustdoc::invalid_html_tags)]
24060    #[doc = "Optional. Thumbnail width"]
24061    #[serde(
24062        skip_serializing_if = "Option::is_none",
24063        rename = "thumbnail_width",
24064        default
24065    )]
24066    pub thumbnail_width: Option<i64>,
24067    #[allow(rustdoc::invalid_html_tags)]
24068    #[doc = "Optional. Thumbnail height"]
24069    #[serde(
24070        skip_serializing_if = "Option::is_none",
24071        rename = "thumbnail_height",
24072        default
24073    )]
24074    pub thumbnail_height: Option<i64>,
24075}
24076impl InlineQueryResultDocumentBuilder {
24077    #[allow(clippy::too_many_arguments)]
24078    pub fn new(id: String, title: String, document_url: String, mime_type: String) -> Self {
24079        Self {
24080            tg_type: "document".to_owned(),
24081            id,
24082            title,
24083            document_url,
24084            mime_type,
24085            caption: None,
24086            parse_mode: None,
24087            caption_entities: None,
24088            description: None,
24089            reply_markup: None,
24090            input_message_content: None,
24091            thumbnail_url: None,
24092            thumbnail_width: None,
24093            thumbnail_height: None,
24094        }
24095    }
24096    #[allow(rustdoc::invalid_html_tags)]
24097    #[doc = "Type of the result, must be document"]
24098    pub fn set_type(mut self, tg_type: String) -> Self {
24099        self.tg_type = tg_type;
24100        self
24101    }
24102    #[allow(rustdoc::invalid_html_tags)]
24103    #[doc = "Unique identifier for this result, 1-64 bytes"]
24104    pub fn set_id(mut self, id: String) -> Self {
24105        self.id = id;
24106        self
24107    }
24108    #[allow(rustdoc::invalid_html_tags)]
24109    #[doc = "Title for the result"]
24110    pub fn set_title(mut self, title: String) -> Self {
24111        self.title = title;
24112        self
24113    }
24114    #[allow(rustdoc::invalid_html_tags)]
24115    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
24116    pub fn set_caption(mut self, caption: String) -> Self {
24117        self.caption = Some(caption);
24118        self
24119    }
24120    #[allow(rustdoc::invalid_html_tags)]
24121    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
24122    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
24123        self.parse_mode = Some(parse_mode);
24124        self
24125    }
24126    #[allow(rustdoc::invalid_html_tags)]
24127    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
24128    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
24129        self.caption_entities = Some(caption_entities);
24130        self
24131    }
24132    #[allow(rustdoc::invalid_html_tags)]
24133    #[doc = "A valid URL for the file"]
24134    pub fn set_document_url(mut self, document_url: String) -> Self {
24135        self.document_url = document_url;
24136        self
24137    }
24138    #[allow(rustdoc::invalid_html_tags)]
24139    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
24140    pub fn set_mime_type(mut self, mime_type: String) -> Self {
24141        self.mime_type = mime_type;
24142        self
24143    }
24144    #[allow(rustdoc::invalid_html_tags)]
24145    #[doc = "Optional. Short description of the result"]
24146    pub fn set_description(mut self, description: String) -> Self {
24147        self.description = Some(description);
24148        self
24149    }
24150    #[allow(rustdoc::invalid_html_tags)]
24151    #[doc = "Optional. Inline keyboard attached to the message"]
24152    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
24153        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
24154        self
24155    }
24156    #[allow(rustdoc::invalid_html_tags)]
24157    #[doc = "Optional. Content of the message to be sent instead of the file"]
24158    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
24159        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
24160        self
24161    }
24162    #[allow(rustdoc::invalid_html_tags)]
24163    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
24164    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
24165        self.thumbnail_url = Some(thumbnail_url);
24166        self
24167    }
24168    #[allow(rustdoc::invalid_html_tags)]
24169    #[doc = "Optional. Thumbnail width"]
24170    pub fn set_thumbnail_width(mut self, thumbnail_width: i64) -> Self {
24171        self.thumbnail_width = Some(thumbnail_width);
24172        self
24173    }
24174    #[allow(rustdoc::invalid_html_tags)]
24175    #[doc = "Optional. Thumbnail height"]
24176    pub fn set_thumbnail_height(mut self, thumbnail_height: i64) -> Self {
24177        self.thumbnail_height = Some(thumbnail_height);
24178        self
24179    }
24180    pub fn build(self) -> InlineQueryResultDocument {
24181        InlineQueryResultDocument {
24182            tg_type: self.tg_type,
24183            id: self.id,
24184            title: self.title,
24185            caption: self.caption,
24186            parse_mode: self.parse_mode,
24187            caption_entities: self.caption_entities,
24188            document_url: self.document_url,
24189            mime_type: self.mime_type,
24190            description: self.description,
24191            reply_markup: self.reply_markup,
24192            input_message_content: self.input_message_content,
24193            thumbnail_url: self.thumbnail_url,
24194            thumbnail_width: self.thumbnail_width,
24195            thumbnail_height: self.thumbnail_height,
24196        }
24197    }
24198}
24199#[allow(rustdoc::invalid_html_tags)]
24200#[doc = "Describes a service message about the approval of a suggested post."]
24201#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24202pub struct SuggestedPostApproved {
24203    #[allow(rustdoc::invalid_html_tags)]
24204    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
24205    #[serde(
24206        skip_serializing_if = "Option::is_none",
24207        rename = "suggested_post_message",
24208        default
24209    )]
24210    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
24211    #[allow(rustdoc::invalid_html_tags)]
24212    #[doc = "Optional. Amount paid for the post"]
24213    #[serde(skip_serializing_if = "Option::is_none", rename = "price", default)]
24214    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
24215    #[allow(rustdoc::invalid_html_tags)]
24216    #[doc = "Date when the post will be published"]
24217    #[serde(rename = "send_date")]
24218    pub send_date: i64,
24219}
24220#[allow(rustdoc::invalid_html_tags)]
24221#[doc = "Companion type to SuggestedPostApproved that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
24222#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24223pub struct NoSkipSuggestedPostApproved {
24224    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
24225    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
24226    #[allow(rustdoc::invalid_html_tags)]
24227    #[doc = "Date when the post will be published"]
24228    #[serde(rename = "send_date")]
24229    pub send_date: i64,
24230}
24231impl From<NoSkipSuggestedPostApproved> for SuggestedPostApproved {
24232    fn from(t: NoSkipSuggestedPostApproved) -> Self {
24233        Self {
24234            suggested_post_message: t.suggested_post_message,
24235            price: t.price,
24236            send_date: t.send_date,
24237        }
24238    }
24239}
24240#[allow(clippy::from_over_into)]
24241impl Into<NoSkipSuggestedPostApproved> for SuggestedPostApproved {
24242    fn into(self) -> NoSkipSuggestedPostApproved {
24243        NoSkipSuggestedPostApproved {
24244            suggested_post_message: self.suggested_post_message,
24245            price: self.price,
24246            send_date: self.send_date,
24247        }
24248    }
24249}
24250impl NoSkipSuggestedPostApproved {
24251    pub fn skip(self) -> SuggestedPostApproved {
24252        self.into()
24253    }
24254}
24255impl SuggestedPostApproved {
24256    pub fn noskip(self) -> NoSkipSuggestedPostApproved {
24257        self.into()
24258    }
24259}
24260#[allow(rustdoc::invalid_html_tags)]
24261#[doc = "Describes a service message about the approval of a suggested post."]
24262#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24263pub struct SuggestedPostApprovedBuilder {
24264    #[allow(rustdoc::invalid_html_tags)]
24265    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
24266    #[serde(
24267        skip_serializing_if = "Option::is_none",
24268        rename = "suggested_post_message",
24269        default
24270    )]
24271    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
24272    #[allow(rustdoc::invalid_html_tags)]
24273    #[doc = "Optional. Amount paid for the post"]
24274    #[serde(skip_serializing_if = "Option::is_none", rename = "price", default)]
24275    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
24276    #[allow(rustdoc::invalid_html_tags)]
24277    #[doc = "Date when the post will be published"]
24278    #[serde(rename = "send_date")]
24279    pub send_date: i64,
24280}
24281impl SuggestedPostApprovedBuilder {
24282    #[allow(clippy::too_many_arguments)]
24283    pub fn new(send_date: i64) -> Self {
24284        Self {
24285            send_date,
24286            suggested_post_message: None,
24287            price: None,
24288        }
24289    }
24290    #[allow(rustdoc::invalid_html_tags)]
24291    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
24292    pub fn set_suggested_post_message(mut self, suggested_post_message: Box<Message>) -> Self {
24293        self.suggested_post_message = Some(BoxWrapper(suggested_post_message));
24294        self
24295    }
24296    #[allow(rustdoc::invalid_html_tags)]
24297    #[doc = "Optional. Amount paid for the post"]
24298    pub fn set_price(mut self, price: SuggestedPostPrice) -> Self {
24299        self.price = Some(BoxWrapper(Unbox(price)));
24300        self
24301    }
24302    #[allow(rustdoc::invalid_html_tags)]
24303    #[doc = "Date when the post will be published"]
24304    pub fn set_send_date(mut self, send_date: i64) -> Self {
24305        self.send_date = send_date;
24306        self
24307    }
24308    pub fn build(self) -> SuggestedPostApproved {
24309        SuggestedPostApproved {
24310            suggested_post_message: self.suggested_post_message,
24311            price: self.price,
24312            send_date: self.send_date,
24313        }
24314    }
24315}
24316#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24317#[serde(untagged)]
24318pub enum MenuButton {
24319    MenuButtonCommands(MenuButtonCommands),
24320    MenuButtonWebApp(MenuButtonWebApp),
24321    MenuButtonDefault(MenuButtonDefault),
24322}
24323impl Default for MenuButton {
24324    fn default() -> Self {
24325        MenuButton::MenuButtonCommands(MenuButtonCommands::default())
24326    }
24327}
24328impl MenuButton {}
24329#[allow(rustdoc::invalid_html_tags)]
24330#[doc = "This object represents a Telegram user or bot."]
24331#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24332pub struct User {
24333    #[allow(rustdoc::invalid_html_tags)]
24334    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
24335    #[serde(rename = "id")]
24336    pub id: i64,
24337    #[allow(rustdoc::invalid_html_tags)]
24338    #[doc = "True, if this user is a bot"]
24339    #[serde(rename = "is_bot")]
24340    pub is_bot: bool,
24341    #[allow(rustdoc::invalid_html_tags)]
24342    #[doc = "User's or bot's first name"]
24343    #[serde(rename = "first_name")]
24344    pub first_name: String,
24345    #[allow(rustdoc::invalid_html_tags)]
24346    #[doc = "Optional. User's or bot's last name"]
24347    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
24348    pub last_name: Option<String>,
24349    #[allow(rustdoc::invalid_html_tags)]
24350    #[doc = "Optional. User's or bot's username"]
24351    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
24352    pub username: Option<String>,
24353    #[allow(rustdoc::invalid_html_tags)]
24354    #[doc = "Optional. IETF language tag of the user's language"]
24355    #[serde(
24356        skip_serializing_if = "Option::is_none",
24357        rename = "language_code",
24358        default
24359    )]
24360    pub language_code: Option<String>,
24361    #[allow(rustdoc::invalid_html_tags)]
24362    #[doc = "Optional. True, if this user is a Telegram Premium user"]
24363    #[serde(
24364        skip_serializing_if = "Option::is_none",
24365        rename = "is_premium",
24366        default
24367    )]
24368    pub is_premium: Option<bool>,
24369    #[allow(rustdoc::invalid_html_tags)]
24370    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
24371    #[serde(
24372        skip_serializing_if = "Option::is_none",
24373        rename = "added_to_attachment_menu",
24374        default
24375    )]
24376    pub added_to_attachment_menu: Option<bool>,
24377    #[allow(rustdoc::invalid_html_tags)]
24378    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
24379    #[serde(
24380        skip_serializing_if = "Option::is_none",
24381        rename = "can_join_groups",
24382        default
24383    )]
24384    pub can_join_groups: Option<bool>,
24385    #[allow(rustdoc::invalid_html_tags)]
24386    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
24387    #[serde(
24388        skip_serializing_if = "Option::is_none",
24389        rename = "can_read_all_group_messages",
24390        default
24391    )]
24392    pub can_read_all_group_messages: Option<bool>,
24393    #[allow(rustdoc::invalid_html_tags)]
24394    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
24395    #[serde(
24396        skip_serializing_if = "Option::is_none",
24397        rename = "supports_inline_queries",
24398        default
24399    )]
24400    pub supports_inline_queries: Option<bool>,
24401    #[allow(rustdoc::invalid_html_tags)]
24402    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
24403    #[serde(
24404        skip_serializing_if = "Option::is_none",
24405        rename = "can_connect_to_business",
24406        default
24407    )]
24408    pub can_connect_to_business: Option<bool>,
24409    #[allow(rustdoc::invalid_html_tags)]
24410    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
24411    #[serde(
24412        skip_serializing_if = "Option::is_none",
24413        rename = "has_main_web_app",
24414        default
24415    )]
24416    pub has_main_web_app: Option<bool>,
24417}
24418#[allow(rustdoc::invalid_html_tags)]
24419#[doc = "Companion type to User that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
24420#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24421pub struct NoSkipUser {
24422    #[allow(rustdoc::invalid_html_tags)]
24423    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
24424    #[serde(rename = "id")]
24425    pub id: i64,
24426    #[allow(rustdoc::invalid_html_tags)]
24427    #[doc = "True, if this user is a bot"]
24428    #[serde(rename = "is_bot")]
24429    pub is_bot: bool,
24430    #[allow(rustdoc::invalid_html_tags)]
24431    #[doc = "User's or bot's first name"]
24432    #[serde(rename = "first_name")]
24433    pub first_name: String,
24434    pub last_name: Option<String>,
24435    pub username: Option<String>,
24436    pub language_code: Option<String>,
24437    pub is_premium: Option<bool>,
24438    pub added_to_attachment_menu: Option<bool>,
24439    pub can_join_groups: Option<bool>,
24440    pub can_read_all_group_messages: Option<bool>,
24441    pub supports_inline_queries: Option<bool>,
24442    pub can_connect_to_business: Option<bool>,
24443    pub has_main_web_app: Option<bool>,
24444}
24445impl From<NoSkipUser> for User {
24446    fn from(t: NoSkipUser) -> Self {
24447        Self {
24448            id: t.id,
24449            is_bot: t.is_bot,
24450            first_name: t.first_name,
24451            last_name: t.last_name,
24452            username: t.username,
24453            language_code: t.language_code,
24454            is_premium: t.is_premium,
24455            added_to_attachment_menu: t.added_to_attachment_menu,
24456            can_join_groups: t.can_join_groups,
24457            can_read_all_group_messages: t.can_read_all_group_messages,
24458            supports_inline_queries: t.supports_inline_queries,
24459            can_connect_to_business: t.can_connect_to_business,
24460            has_main_web_app: t.has_main_web_app,
24461        }
24462    }
24463}
24464#[allow(clippy::from_over_into)]
24465impl Into<NoSkipUser> for User {
24466    fn into(self) -> NoSkipUser {
24467        NoSkipUser {
24468            id: self.id,
24469            is_bot: self.is_bot,
24470            first_name: self.first_name,
24471            last_name: self.last_name,
24472            username: self.username,
24473            language_code: self.language_code,
24474            is_premium: self.is_premium,
24475            added_to_attachment_menu: self.added_to_attachment_menu,
24476            can_join_groups: self.can_join_groups,
24477            can_read_all_group_messages: self.can_read_all_group_messages,
24478            supports_inline_queries: self.supports_inline_queries,
24479            can_connect_to_business: self.can_connect_to_business,
24480            has_main_web_app: self.has_main_web_app,
24481        }
24482    }
24483}
24484impl NoSkipUser {
24485    pub fn skip(self) -> User {
24486        self.into()
24487    }
24488}
24489impl User {
24490    pub fn noskip(self) -> NoSkipUser {
24491        self.into()
24492    }
24493}
24494#[allow(rustdoc::invalid_html_tags)]
24495#[doc = "This object represents a Telegram user or bot."]
24496#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24497pub struct UserBuilder {
24498    #[allow(rustdoc::invalid_html_tags)]
24499    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
24500    #[serde(rename = "id")]
24501    pub id: i64,
24502    #[allow(rustdoc::invalid_html_tags)]
24503    #[doc = "True, if this user is a bot"]
24504    #[serde(rename = "is_bot")]
24505    pub is_bot: bool,
24506    #[allow(rustdoc::invalid_html_tags)]
24507    #[doc = "User's or bot's first name"]
24508    #[serde(rename = "first_name")]
24509    pub first_name: String,
24510    #[allow(rustdoc::invalid_html_tags)]
24511    #[doc = "Optional. User's or bot's last name"]
24512    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
24513    pub last_name: Option<String>,
24514    #[allow(rustdoc::invalid_html_tags)]
24515    #[doc = "Optional. User's or bot's username"]
24516    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
24517    pub username: Option<String>,
24518    #[allow(rustdoc::invalid_html_tags)]
24519    #[doc = "Optional. IETF language tag of the user's language"]
24520    #[serde(
24521        skip_serializing_if = "Option::is_none",
24522        rename = "language_code",
24523        default
24524    )]
24525    pub language_code: Option<String>,
24526    #[allow(rustdoc::invalid_html_tags)]
24527    #[doc = "Optional. True, if this user is a Telegram Premium user"]
24528    #[serde(
24529        skip_serializing_if = "Option::is_none",
24530        rename = "is_premium",
24531        default
24532    )]
24533    pub is_premium: Option<bool>,
24534    #[allow(rustdoc::invalid_html_tags)]
24535    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
24536    #[serde(
24537        skip_serializing_if = "Option::is_none",
24538        rename = "added_to_attachment_menu",
24539        default
24540    )]
24541    pub added_to_attachment_menu: Option<bool>,
24542    #[allow(rustdoc::invalid_html_tags)]
24543    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
24544    #[serde(
24545        skip_serializing_if = "Option::is_none",
24546        rename = "can_join_groups",
24547        default
24548    )]
24549    pub can_join_groups: Option<bool>,
24550    #[allow(rustdoc::invalid_html_tags)]
24551    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
24552    #[serde(
24553        skip_serializing_if = "Option::is_none",
24554        rename = "can_read_all_group_messages",
24555        default
24556    )]
24557    pub can_read_all_group_messages: Option<bool>,
24558    #[allow(rustdoc::invalid_html_tags)]
24559    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
24560    #[serde(
24561        skip_serializing_if = "Option::is_none",
24562        rename = "supports_inline_queries",
24563        default
24564    )]
24565    pub supports_inline_queries: Option<bool>,
24566    #[allow(rustdoc::invalid_html_tags)]
24567    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
24568    #[serde(
24569        skip_serializing_if = "Option::is_none",
24570        rename = "can_connect_to_business",
24571        default
24572    )]
24573    pub can_connect_to_business: Option<bool>,
24574    #[allow(rustdoc::invalid_html_tags)]
24575    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
24576    #[serde(
24577        skip_serializing_if = "Option::is_none",
24578        rename = "has_main_web_app",
24579        default
24580    )]
24581    pub has_main_web_app: Option<bool>,
24582}
24583impl UserBuilder {
24584    #[allow(clippy::too_many_arguments)]
24585    pub fn new(id: i64, is_bot: bool, first_name: String) -> Self {
24586        Self {
24587            id,
24588            is_bot,
24589            first_name,
24590            last_name: None,
24591            username: None,
24592            language_code: None,
24593            is_premium: None,
24594            added_to_attachment_menu: None,
24595            can_join_groups: None,
24596            can_read_all_group_messages: None,
24597            supports_inline_queries: None,
24598            can_connect_to_business: None,
24599            has_main_web_app: None,
24600        }
24601    }
24602    #[allow(rustdoc::invalid_html_tags)]
24603    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
24604    pub fn set_id(mut self, id: i64) -> Self {
24605        self.id = id;
24606        self
24607    }
24608    #[allow(rustdoc::invalid_html_tags)]
24609    #[doc = "True, if this user is a bot"]
24610    pub fn set_is_bot(mut self, is_bot: bool) -> Self {
24611        self.is_bot = is_bot;
24612        self
24613    }
24614    #[allow(rustdoc::invalid_html_tags)]
24615    #[doc = "User's or bot's first name"]
24616    pub fn set_first_name(mut self, first_name: String) -> Self {
24617        self.first_name = first_name;
24618        self
24619    }
24620    #[allow(rustdoc::invalid_html_tags)]
24621    #[doc = "Optional. User's or bot's last name"]
24622    pub fn set_last_name(mut self, last_name: String) -> Self {
24623        self.last_name = Some(last_name);
24624        self
24625    }
24626    #[allow(rustdoc::invalid_html_tags)]
24627    #[doc = "Optional. User's or bot's username"]
24628    pub fn set_username(mut self, username: String) -> Self {
24629        self.username = Some(username);
24630        self
24631    }
24632    #[allow(rustdoc::invalid_html_tags)]
24633    #[doc = "Optional. IETF language tag of the user's language"]
24634    pub fn set_language_code(mut self, language_code: String) -> Self {
24635        self.language_code = Some(language_code);
24636        self
24637    }
24638    #[allow(rustdoc::invalid_html_tags)]
24639    #[doc = "Optional. True, if this user is a Telegram Premium user"]
24640    pub fn set_is_premium(mut self, is_premium: bool) -> Self {
24641        self.is_premium = Some(is_premium);
24642        self
24643    }
24644    #[allow(rustdoc::invalid_html_tags)]
24645    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
24646    pub fn set_added_to_attachment_menu(mut self, added_to_attachment_menu: bool) -> Self {
24647        self.added_to_attachment_menu = Some(added_to_attachment_menu);
24648        self
24649    }
24650    #[allow(rustdoc::invalid_html_tags)]
24651    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
24652    pub fn set_can_join_groups(mut self, can_join_groups: bool) -> Self {
24653        self.can_join_groups = Some(can_join_groups);
24654        self
24655    }
24656    #[allow(rustdoc::invalid_html_tags)]
24657    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
24658    pub fn set_can_read_all_group_messages(mut self, can_read_all_group_messages: bool) -> Self {
24659        self.can_read_all_group_messages = Some(can_read_all_group_messages);
24660        self
24661    }
24662    #[allow(rustdoc::invalid_html_tags)]
24663    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
24664    pub fn set_supports_inline_queries(mut self, supports_inline_queries: bool) -> Self {
24665        self.supports_inline_queries = Some(supports_inline_queries);
24666        self
24667    }
24668    #[allow(rustdoc::invalid_html_tags)]
24669    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
24670    pub fn set_can_connect_to_business(mut self, can_connect_to_business: bool) -> Self {
24671        self.can_connect_to_business = Some(can_connect_to_business);
24672        self
24673    }
24674    #[allow(rustdoc::invalid_html_tags)]
24675    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
24676    pub fn set_has_main_web_app(mut self, has_main_web_app: bool) -> Self {
24677        self.has_main_web_app = Some(has_main_web_app);
24678        self
24679    }
24680    pub fn build(self) -> User {
24681        User {
24682            id: self.id,
24683            is_bot: self.is_bot,
24684            first_name: self.first_name,
24685            last_name: self.last_name,
24686            username: self.username,
24687            language_code: self.language_code,
24688            is_premium: self.is_premium,
24689            added_to_attachment_menu: self.added_to_attachment_menu,
24690            can_join_groups: self.can_join_groups,
24691            can_read_all_group_messages: self.can_read_all_group_messages,
24692            supports_inline_queries: self.supports_inline_queries,
24693            can_connect_to_business: self.can_connect_to_business,
24694            has_main_web_app: self.has_main_web_app,
24695        }
24696    }
24697}
24698#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24699#[serde(untagged)]
24700pub enum RevenueWithdrawalState {
24701    RevenueWithdrawalStatePending(RevenueWithdrawalStatePending),
24702    RevenueWithdrawalStateSucceeded(RevenueWithdrawalStateSucceeded),
24703    RevenueWithdrawalStateFailed(RevenueWithdrawalStateFailed),
24704}
24705impl Default for RevenueWithdrawalState {
24706    fn default() -> Self {
24707        RevenueWithdrawalState::RevenueWithdrawalStatePending(
24708            RevenueWithdrawalStatePending::default(),
24709        )
24710    }
24711}
24712impl RevenueWithdrawalState {}
24713#[allow(rustdoc::invalid_html_tags)]
24714#[doc = "The withdrawal is in progress."]
24715#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24716pub struct RevenueWithdrawalStatePending {
24717    #[allow(rustdoc::invalid_html_tags)]
24718    #[doc = "Type of the state, always \"pending\""]
24719    #[serde(rename = "type")]
24720    pub tg_type: String,
24721}
24722#[allow(rustdoc::invalid_html_tags)]
24723#[doc = "Companion type to RevenueWithdrawalStatePending that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
24724#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24725pub struct NoSkipRevenueWithdrawalStatePending {
24726    #[allow(rustdoc::invalid_html_tags)]
24727    #[doc = "Type of the state, always \"pending\""]
24728    #[serde(rename = "type")]
24729    pub tg_type: String,
24730}
24731impl From<NoSkipRevenueWithdrawalStatePending> for RevenueWithdrawalStatePending {
24732    fn from(t: NoSkipRevenueWithdrawalStatePending) -> Self {
24733        Self { tg_type: t.tg_type }
24734    }
24735}
24736#[allow(clippy::from_over_into)]
24737impl Into<NoSkipRevenueWithdrawalStatePending> for RevenueWithdrawalStatePending {
24738    fn into(self) -> NoSkipRevenueWithdrawalStatePending {
24739        NoSkipRevenueWithdrawalStatePending {
24740            tg_type: self.tg_type,
24741        }
24742    }
24743}
24744impl NoSkipRevenueWithdrawalStatePending {
24745    pub fn skip(self) -> RevenueWithdrawalStatePending {
24746        self.into()
24747    }
24748}
24749impl RevenueWithdrawalStatePending {
24750    pub fn noskip(self) -> NoSkipRevenueWithdrawalStatePending {
24751        self.into()
24752    }
24753}
24754#[allow(rustdoc::invalid_html_tags)]
24755#[doc = "The withdrawal is in progress."]
24756#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24757pub struct RevenueWithdrawalStatePendingBuilder {
24758    #[allow(rustdoc::invalid_html_tags)]
24759    #[doc = "Type of the state, always \"pending\""]
24760    #[serde(rename = "type")]
24761    pub tg_type: String,
24762}
24763impl RevenueWithdrawalStatePendingBuilder {
24764    #[allow(clippy::too_many_arguments)]
24765    pub fn new() -> Self {
24766        Self {
24767            tg_type: "RevenueWithdrawalStatePending".to_owned(),
24768        }
24769    }
24770    #[allow(rustdoc::invalid_html_tags)]
24771    #[doc = "Type of the state, always \"pending\""]
24772    pub fn set_type(mut self, tg_type: String) -> Self {
24773        self.tg_type = tg_type;
24774        self
24775    }
24776    pub fn build(self) -> RevenueWithdrawalStatePending {
24777        RevenueWithdrawalStatePending {
24778            tg_type: self.tg_type,
24779        }
24780    }
24781}
24782#[allow(rustdoc::invalid_html_tags)]
24783#[doc = "This object represents the bot's description."]
24784#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24785pub struct BotDescription {
24786    #[allow(rustdoc::invalid_html_tags)]
24787    #[doc = "The bot's description"]
24788    #[serde(rename = "description")]
24789    pub description: String,
24790}
24791#[allow(rustdoc::invalid_html_tags)]
24792#[doc = "Companion type to BotDescription that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
24793#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24794pub struct NoSkipBotDescription {
24795    #[allow(rustdoc::invalid_html_tags)]
24796    #[doc = "The bot's description"]
24797    #[serde(rename = "description")]
24798    pub description: String,
24799}
24800impl From<NoSkipBotDescription> for BotDescription {
24801    fn from(t: NoSkipBotDescription) -> Self {
24802        Self {
24803            description: t.description,
24804        }
24805    }
24806}
24807#[allow(clippy::from_over_into)]
24808impl Into<NoSkipBotDescription> for BotDescription {
24809    fn into(self) -> NoSkipBotDescription {
24810        NoSkipBotDescription {
24811            description: self.description,
24812        }
24813    }
24814}
24815impl NoSkipBotDescription {
24816    pub fn skip(self) -> BotDescription {
24817        self.into()
24818    }
24819}
24820impl BotDescription {
24821    pub fn noskip(self) -> NoSkipBotDescription {
24822        self.into()
24823    }
24824}
24825#[allow(rustdoc::invalid_html_tags)]
24826#[doc = "This object represents the bot's description."]
24827#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24828pub struct BotDescriptionBuilder {
24829    #[allow(rustdoc::invalid_html_tags)]
24830    #[doc = "The bot's description"]
24831    #[serde(rename = "description")]
24832    pub description: String,
24833}
24834impl BotDescriptionBuilder {
24835    #[allow(clippy::too_many_arguments)]
24836    pub fn new(description: String) -> Self {
24837        Self { description }
24838    }
24839    #[allow(rustdoc::invalid_html_tags)]
24840    #[doc = "The bot's description"]
24841    pub fn set_description(mut self, description: String) -> Self {
24842        self.description = description;
24843        self
24844    }
24845    pub fn build(self) -> BotDescription {
24846        BotDescription {
24847            description: self.description,
24848        }
24849    }
24850}
24851#[allow(rustdoc::invalid_html_tags)]
24852#[doc = "Describes the affiliate program that issued the affiliate commission received via this transaction."]
24853#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24854pub struct TransactionPartnerAffiliateProgram {
24855    #[allow(rustdoc::invalid_html_tags)]
24856    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
24857    #[serde(rename = "type")]
24858    pub tg_type: String,
24859    #[allow(rustdoc::invalid_html_tags)]
24860    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
24861    #[serde(
24862        skip_serializing_if = "Option::is_none",
24863        rename = "sponsor_user",
24864        default
24865    )]
24866    pub sponsor_user: Option<BoxWrapper<Unbox<User>>>,
24867    #[allow(rustdoc::invalid_html_tags)]
24868    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
24869    #[serde(rename = "commission_per_mille")]
24870    pub commission_per_mille: i64,
24871}
24872#[allow(rustdoc::invalid_html_tags)]
24873#[doc = "Companion type to TransactionPartnerAffiliateProgram that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
24874#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24875pub struct NoSkipTransactionPartnerAffiliateProgram {
24876    #[allow(rustdoc::invalid_html_tags)]
24877    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
24878    #[serde(rename = "type")]
24879    pub tg_type: String,
24880    pub sponsor_user: Option<BoxWrapper<Unbox<User>>>,
24881    #[allow(rustdoc::invalid_html_tags)]
24882    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
24883    #[serde(rename = "commission_per_mille")]
24884    pub commission_per_mille: i64,
24885}
24886impl From<NoSkipTransactionPartnerAffiliateProgram> for TransactionPartnerAffiliateProgram {
24887    fn from(t: NoSkipTransactionPartnerAffiliateProgram) -> Self {
24888        Self {
24889            tg_type: t.tg_type,
24890            sponsor_user: t.sponsor_user,
24891            commission_per_mille: t.commission_per_mille,
24892        }
24893    }
24894}
24895#[allow(clippy::from_over_into)]
24896impl Into<NoSkipTransactionPartnerAffiliateProgram> for TransactionPartnerAffiliateProgram {
24897    fn into(self) -> NoSkipTransactionPartnerAffiliateProgram {
24898        NoSkipTransactionPartnerAffiliateProgram {
24899            tg_type: self.tg_type,
24900            sponsor_user: self.sponsor_user,
24901            commission_per_mille: self.commission_per_mille,
24902        }
24903    }
24904}
24905impl NoSkipTransactionPartnerAffiliateProgram {
24906    pub fn skip(self) -> TransactionPartnerAffiliateProgram {
24907        self.into()
24908    }
24909}
24910impl TransactionPartnerAffiliateProgram {
24911    pub fn noskip(self) -> NoSkipTransactionPartnerAffiliateProgram {
24912        self.into()
24913    }
24914}
24915#[allow(rustdoc::invalid_html_tags)]
24916#[doc = "Describes the affiliate program that issued the affiliate commission received via this transaction."]
24917#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24918pub struct TransactionPartnerAffiliateProgramBuilder {
24919    #[allow(rustdoc::invalid_html_tags)]
24920    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
24921    #[serde(rename = "type")]
24922    pub tg_type: String,
24923    #[allow(rustdoc::invalid_html_tags)]
24924    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
24925    #[serde(
24926        skip_serializing_if = "Option::is_none",
24927        rename = "sponsor_user",
24928        default
24929    )]
24930    pub sponsor_user: Option<BoxWrapper<Unbox<User>>>,
24931    #[allow(rustdoc::invalid_html_tags)]
24932    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
24933    #[serde(rename = "commission_per_mille")]
24934    pub commission_per_mille: i64,
24935}
24936impl TransactionPartnerAffiliateProgramBuilder {
24937    #[allow(clippy::too_many_arguments)]
24938    pub fn new(commission_per_mille: i64) -> Self {
24939        Self {
24940            tg_type: "TransactionPartnerAffiliateProgram".to_owned(),
24941            commission_per_mille,
24942            sponsor_user: None,
24943        }
24944    }
24945    #[allow(rustdoc::invalid_html_tags)]
24946    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
24947    pub fn set_type(mut self, tg_type: String) -> Self {
24948        self.tg_type = tg_type;
24949        self
24950    }
24951    #[allow(rustdoc::invalid_html_tags)]
24952    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
24953    pub fn set_sponsor_user(mut self, sponsor_user: User) -> Self {
24954        self.sponsor_user = Some(BoxWrapper(Unbox(sponsor_user)));
24955        self
24956    }
24957    #[allow(rustdoc::invalid_html_tags)]
24958    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
24959    pub fn set_commission_per_mille(mut self, commission_per_mille: i64) -> Self {
24960        self.commission_per_mille = commission_per_mille;
24961        self
24962    }
24963    pub fn build(self) -> TransactionPartnerAffiliateProgram {
24964        TransactionPartnerAffiliateProgram {
24965            tg_type: self.tg_type,
24966            sponsor_user: self.sponsor_user,
24967            commission_per_mille: self.commission_per_mille,
24968        }
24969    }
24970}
24971#[allow(rustdoc::invalid_html_tags)]
24972#[doc = "Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video."]
24973#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
24974pub struct InlineQueryResultCachedVideo {
24975    #[allow(rustdoc::invalid_html_tags)]
24976    #[doc = "Type of the result, must be video"]
24977    #[serde(rename = "type")]
24978    pub tg_type: String,
24979    #[allow(rustdoc::invalid_html_tags)]
24980    #[doc = "Unique identifier for this result, 1-64 bytes"]
24981    #[serde(rename = "id")]
24982    pub id: String,
24983    #[allow(rustdoc::invalid_html_tags)]
24984    #[doc = "A valid file identifier for the video file"]
24985    #[serde(rename = "video_file_id")]
24986    pub video_file_id: String,
24987    #[allow(rustdoc::invalid_html_tags)]
24988    #[doc = "Title for the result"]
24989    #[serde(rename = "title")]
24990    pub title: String,
24991    #[allow(rustdoc::invalid_html_tags)]
24992    #[doc = "Optional. Short description of the result"]
24993    #[serde(
24994        skip_serializing_if = "Option::is_none",
24995        rename = "description",
24996        default
24997    )]
24998    pub description: Option<String>,
24999    #[allow(rustdoc::invalid_html_tags)]
25000    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
25001    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
25002    pub caption: Option<String>,
25003    #[allow(rustdoc::invalid_html_tags)]
25004    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
25005    #[serde(
25006        skip_serializing_if = "Option::is_none",
25007        rename = "parse_mode",
25008        default
25009    )]
25010    pub parse_mode: Option<String>,
25011    #[allow(rustdoc::invalid_html_tags)]
25012    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
25013    #[serde(
25014        skip_serializing_if = "Option::is_none",
25015        rename = "caption_entities",
25016        default
25017    )]
25018    pub caption_entities: Option<Vec<MessageEntity>>,
25019    #[allow(rustdoc::invalid_html_tags)]
25020    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
25021    #[serde(
25022        skip_serializing_if = "Option::is_none",
25023        rename = "show_caption_above_media",
25024        default
25025    )]
25026    pub show_caption_above_media: Option<bool>,
25027    #[allow(rustdoc::invalid_html_tags)]
25028    #[doc = "Optional. Inline keyboard attached to the message"]
25029    #[serde(
25030        skip_serializing_if = "Option::is_none",
25031        rename = "reply_markup",
25032        default
25033    )]
25034    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
25035    #[allow(rustdoc::invalid_html_tags)]
25036    #[doc = "Optional. Content of the message to be sent instead of the video"]
25037    #[serde(
25038        skip_serializing_if = "Option::is_none",
25039        rename = "input_message_content",
25040        default
25041    )]
25042    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
25043}
25044#[allow(rustdoc::invalid_html_tags)]
25045#[doc = "Companion type to InlineQueryResultCachedVideo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
25046#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25047pub struct NoSkipInlineQueryResultCachedVideo {
25048    #[allow(rustdoc::invalid_html_tags)]
25049    #[doc = "Type of the result, must be video"]
25050    #[serde(rename = "type")]
25051    pub tg_type: String,
25052    #[allow(rustdoc::invalid_html_tags)]
25053    #[doc = "Unique identifier for this result, 1-64 bytes"]
25054    #[serde(rename = "id")]
25055    pub id: String,
25056    #[allow(rustdoc::invalid_html_tags)]
25057    #[doc = "A valid file identifier for the video file"]
25058    #[serde(rename = "video_file_id")]
25059    pub video_file_id: String,
25060    #[allow(rustdoc::invalid_html_tags)]
25061    #[doc = "Title for the result"]
25062    #[serde(rename = "title")]
25063    pub title: String,
25064    pub description: Option<String>,
25065    pub caption: Option<String>,
25066    pub parse_mode: Option<String>,
25067    pub caption_entities: Option<Vec<MessageEntity>>,
25068    pub show_caption_above_media: Option<bool>,
25069    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
25070    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
25071}
25072impl From<NoSkipInlineQueryResultCachedVideo> for InlineQueryResultCachedVideo {
25073    fn from(t: NoSkipInlineQueryResultCachedVideo) -> Self {
25074        Self {
25075            tg_type: t.tg_type,
25076            id: t.id,
25077            video_file_id: t.video_file_id,
25078            title: t.title,
25079            description: t.description,
25080            caption: t.caption,
25081            parse_mode: t.parse_mode,
25082            caption_entities: t.caption_entities,
25083            show_caption_above_media: t.show_caption_above_media,
25084            reply_markup: t.reply_markup,
25085            input_message_content: t.input_message_content,
25086        }
25087    }
25088}
25089#[allow(clippy::from_over_into)]
25090impl Into<NoSkipInlineQueryResultCachedVideo> for InlineQueryResultCachedVideo {
25091    fn into(self) -> NoSkipInlineQueryResultCachedVideo {
25092        NoSkipInlineQueryResultCachedVideo {
25093            tg_type: self.tg_type,
25094            id: self.id,
25095            video_file_id: self.video_file_id,
25096            title: self.title,
25097            description: self.description,
25098            caption: self.caption,
25099            parse_mode: self.parse_mode,
25100            caption_entities: self.caption_entities,
25101            show_caption_above_media: self.show_caption_above_media,
25102            reply_markup: self.reply_markup,
25103            input_message_content: self.input_message_content,
25104        }
25105    }
25106}
25107impl NoSkipInlineQueryResultCachedVideo {
25108    pub fn skip(self) -> InlineQueryResultCachedVideo {
25109        self.into()
25110    }
25111}
25112impl InlineQueryResultCachedVideo {
25113    pub fn noskip(self) -> NoSkipInlineQueryResultCachedVideo {
25114        self.into()
25115    }
25116}
25117#[allow(rustdoc::invalid_html_tags)]
25118#[doc = "Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video."]
25119#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25120pub struct InlineQueryResultCachedVideoBuilder {
25121    #[allow(rustdoc::invalid_html_tags)]
25122    #[doc = "Type of the result, must be video"]
25123    #[serde(rename = "type")]
25124    pub tg_type: String,
25125    #[allow(rustdoc::invalid_html_tags)]
25126    #[doc = "Unique identifier for this result, 1-64 bytes"]
25127    #[serde(rename = "id")]
25128    pub id: String,
25129    #[allow(rustdoc::invalid_html_tags)]
25130    #[doc = "A valid file identifier for the video file"]
25131    #[serde(rename = "video_file_id")]
25132    pub video_file_id: String,
25133    #[allow(rustdoc::invalid_html_tags)]
25134    #[doc = "Title for the result"]
25135    #[serde(rename = "title")]
25136    pub title: String,
25137    #[allow(rustdoc::invalid_html_tags)]
25138    #[doc = "Optional. Short description of the result"]
25139    #[serde(
25140        skip_serializing_if = "Option::is_none",
25141        rename = "description",
25142        default
25143    )]
25144    pub description: Option<String>,
25145    #[allow(rustdoc::invalid_html_tags)]
25146    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
25147    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
25148    pub caption: Option<String>,
25149    #[allow(rustdoc::invalid_html_tags)]
25150    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
25151    #[serde(
25152        skip_serializing_if = "Option::is_none",
25153        rename = "parse_mode",
25154        default
25155    )]
25156    pub parse_mode: Option<String>,
25157    #[allow(rustdoc::invalid_html_tags)]
25158    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
25159    #[serde(
25160        skip_serializing_if = "Option::is_none",
25161        rename = "caption_entities",
25162        default
25163    )]
25164    pub caption_entities: Option<Vec<MessageEntity>>,
25165    #[allow(rustdoc::invalid_html_tags)]
25166    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
25167    #[serde(
25168        skip_serializing_if = "Option::is_none",
25169        rename = "show_caption_above_media",
25170        default
25171    )]
25172    pub show_caption_above_media: Option<bool>,
25173    #[allow(rustdoc::invalid_html_tags)]
25174    #[doc = "Optional. Inline keyboard attached to the message"]
25175    #[serde(
25176        skip_serializing_if = "Option::is_none",
25177        rename = "reply_markup",
25178        default
25179    )]
25180    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
25181    #[allow(rustdoc::invalid_html_tags)]
25182    #[doc = "Optional. Content of the message to be sent instead of the video"]
25183    #[serde(
25184        skip_serializing_if = "Option::is_none",
25185        rename = "input_message_content",
25186        default
25187    )]
25188    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
25189}
25190impl InlineQueryResultCachedVideoBuilder {
25191    #[allow(clippy::too_many_arguments)]
25192    pub fn new(id: String, video_file_id: String, title: String) -> Self {
25193        Self {
25194            tg_type: "video".to_owned(),
25195            id,
25196            video_file_id,
25197            title,
25198            description: None,
25199            caption: None,
25200            parse_mode: None,
25201            caption_entities: None,
25202            show_caption_above_media: None,
25203            reply_markup: None,
25204            input_message_content: None,
25205        }
25206    }
25207    #[allow(rustdoc::invalid_html_tags)]
25208    #[doc = "Type of the result, must be video"]
25209    pub fn set_type(mut self, tg_type: String) -> Self {
25210        self.tg_type = tg_type;
25211        self
25212    }
25213    #[allow(rustdoc::invalid_html_tags)]
25214    #[doc = "Unique identifier for this result, 1-64 bytes"]
25215    pub fn set_id(mut self, id: String) -> Self {
25216        self.id = id;
25217        self
25218    }
25219    #[allow(rustdoc::invalid_html_tags)]
25220    #[doc = "A valid file identifier for the video file"]
25221    pub fn set_video_file_id(mut self, video_file_id: String) -> Self {
25222        self.video_file_id = video_file_id;
25223        self
25224    }
25225    #[allow(rustdoc::invalid_html_tags)]
25226    #[doc = "Title for the result"]
25227    pub fn set_title(mut self, title: String) -> Self {
25228        self.title = title;
25229        self
25230    }
25231    #[allow(rustdoc::invalid_html_tags)]
25232    #[doc = "Optional. Short description of the result"]
25233    pub fn set_description(mut self, description: String) -> Self {
25234        self.description = Some(description);
25235        self
25236    }
25237    #[allow(rustdoc::invalid_html_tags)]
25238    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
25239    pub fn set_caption(mut self, caption: String) -> Self {
25240        self.caption = Some(caption);
25241        self
25242    }
25243    #[allow(rustdoc::invalid_html_tags)]
25244    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
25245    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
25246        self.parse_mode = Some(parse_mode);
25247        self
25248    }
25249    #[allow(rustdoc::invalid_html_tags)]
25250    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
25251    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
25252        self.caption_entities = Some(caption_entities);
25253        self
25254    }
25255    #[allow(rustdoc::invalid_html_tags)]
25256    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
25257    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
25258        self.show_caption_above_media = Some(show_caption_above_media);
25259        self
25260    }
25261    #[allow(rustdoc::invalid_html_tags)]
25262    #[doc = "Optional. Inline keyboard attached to the message"]
25263    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
25264        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
25265        self
25266    }
25267    #[allow(rustdoc::invalid_html_tags)]
25268    #[doc = "Optional. Content of the message to be sent instead of the video"]
25269    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
25270        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
25271        self
25272    }
25273    pub fn build(self) -> InlineQueryResultCachedVideo {
25274        InlineQueryResultCachedVideo {
25275            tg_type: self.tg_type,
25276            id: self.id,
25277            video_file_id: self.video_file_id,
25278            title: self.title,
25279            description: self.description,
25280            caption: self.caption,
25281            parse_mode: self.parse_mode,
25282            caption_entities: self.caption_entities,
25283            show_caption_above_media: self.show_caption_above_media,
25284            reply_markup: self.reply_markup,
25285            input_message_content: self.input_message_content,
25286        }
25287    }
25288}
25289#[allow(rustdoc::invalid_html_tags)]
25290#[doc = "Describes the connection of the bot with a business account."]
25291#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25292pub struct BusinessConnection {
25293    #[allow(rustdoc::invalid_html_tags)]
25294    #[doc = "Unique identifier of the business connection"]
25295    #[serde(rename = "id")]
25296    pub id: String,
25297    #[allow(rustdoc::invalid_html_tags)]
25298    #[doc = "Business account user that created the business connection"]
25299    #[serde(rename = "user")]
25300    pub user: BoxWrapper<Unbox<User>>,
25301    #[allow(rustdoc::invalid_html_tags)]
25302    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
25303    #[serde(rename = "user_chat_id")]
25304    pub user_chat_id: i64,
25305    #[allow(rustdoc::invalid_html_tags)]
25306    #[doc = "Date the connection was established in Unix time"]
25307    #[serde(rename = "date")]
25308    pub date: i64,
25309    #[allow(rustdoc::invalid_html_tags)]
25310    #[doc = "Optional. Rights of the business bot"]
25311    #[serde(skip_serializing_if = "Option::is_none", rename = "rights", default)]
25312    pub rights: Option<BoxWrapper<Unbox<BusinessBotRights>>>,
25313    #[allow(rustdoc::invalid_html_tags)]
25314    #[doc = "True, if the connection is active"]
25315    #[serde(rename = "is_enabled")]
25316    pub is_enabled: bool,
25317}
25318#[allow(rustdoc::invalid_html_tags)]
25319#[doc = "Companion type to BusinessConnection that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
25320#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25321pub struct NoSkipBusinessConnection {
25322    #[allow(rustdoc::invalid_html_tags)]
25323    #[doc = "Unique identifier of the business connection"]
25324    #[serde(rename = "id")]
25325    pub id: String,
25326    #[allow(rustdoc::invalid_html_tags)]
25327    #[doc = "Business account user that created the business connection"]
25328    #[serde(rename = "user")]
25329    pub user: BoxWrapper<Unbox<User>>,
25330    #[allow(rustdoc::invalid_html_tags)]
25331    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
25332    #[serde(rename = "user_chat_id")]
25333    pub user_chat_id: i64,
25334    #[allow(rustdoc::invalid_html_tags)]
25335    #[doc = "Date the connection was established in Unix time"]
25336    #[serde(rename = "date")]
25337    pub date: i64,
25338    pub rights: Option<BoxWrapper<Unbox<BusinessBotRights>>>,
25339    #[allow(rustdoc::invalid_html_tags)]
25340    #[doc = "True, if the connection is active"]
25341    #[serde(rename = "is_enabled")]
25342    pub is_enabled: bool,
25343}
25344impl From<NoSkipBusinessConnection> for BusinessConnection {
25345    fn from(t: NoSkipBusinessConnection) -> Self {
25346        Self {
25347            id: t.id,
25348            user: t.user,
25349            user_chat_id: t.user_chat_id,
25350            date: t.date,
25351            rights: t.rights,
25352            is_enabled: t.is_enabled,
25353        }
25354    }
25355}
25356#[allow(clippy::from_over_into)]
25357impl Into<NoSkipBusinessConnection> for BusinessConnection {
25358    fn into(self) -> NoSkipBusinessConnection {
25359        NoSkipBusinessConnection {
25360            id: self.id,
25361            user: self.user,
25362            user_chat_id: self.user_chat_id,
25363            date: self.date,
25364            rights: self.rights,
25365            is_enabled: self.is_enabled,
25366        }
25367    }
25368}
25369impl NoSkipBusinessConnection {
25370    pub fn skip(self) -> BusinessConnection {
25371        self.into()
25372    }
25373}
25374impl BusinessConnection {
25375    pub fn noskip(self) -> NoSkipBusinessConnection {
25376        self.into()
25377    }
25378}
25379#[allow(rustdoc::invalid_html_tags)]
25380#[doc = "Describes the connection of the bot with a business account."]
25381#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25382pub struct BusinessConnectionBuilder {
25383    #[allow(rustdoc::invalid_html_tags)]
25384    #[doc = "Unique identifier of the business connection"]
25385    #[serde(rename = "id")]
25386    pub id: String,
25387    #[allow(rustdoc::invalid_html_tags)]
25388    #[doc = "Business account user that created the business connection"]
25389    #[serde(rename = "user")]
25390    pub user: BoxWrapper<Unbox<User>>,
25391    #[allow(rustdoc::invalid_html_tags)]
25392    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
25393    #[serde(rename = "user_chat_id")]
25394    pub user_chat_id: i64,
25395    #[allow(rustdoc::invalid_html_tags)]
25396    #[doc = "Date the connection was established in Unix time"]
25397    #[serde(rename = "date")]
25398    pub date: i64,
25399    #[allow(rustdoc::invalid_html_tags)]
25400    #[doc = "Optional. Rights of the business bot"]
25401    #[serde(skip_serializing_if = "Option::is_none", rename = "rights", default)]
25402    pub rights: Option<BoxWrapper<Unbox<BusinessBotRights>>>,
25403    #[allow(rustdoc::invalid_html_tags)]
25404    #[doc = "True, if the connection is active"]
25405    #[serde(rename = "is_enabled")]
25406    pub is_enabled: bool,
25407}
25408impl BusinessConnectionBuilder {
25409    #[allow(clippy::too_many_arguments)]
25410    pub fn new<A: Into<User>>(
25411        id: String,
25412        user: A,
25413        user_chat_id: i64,
25414        date: i64,
25415        is_enabled: bool,
25416    ) -> Self {
25417        Self {
25418            id,
25419            user: BoxWrapper::new_unbox(user.into()),
25420            user_chat_id,
25421            date,
25422            is_enabled,
25423            rights: None,
25424        }
25425    }
25426    #[allow(rustdoc::invalid_html_tags)]
25427    #[doc = "Unique identifier of the business connection"]
25428    pub fn set_id(mut self, id: String) -> Self {
25429        self.id = id;
25430        self
25431    }
25432    #[allow(rustdoc::invalid_html_tags)]
25433    #[doc = "Business account user that created the business connection"]
25434    pub fn set_user(mut self, user: User) -> Self {
25435        self.user = BoxWrapper(Unbox(user));
25436        self
25437    }
25438    #[allow(rustdoc::invalid_html_tags)]
25439    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
25440    pub fn set_user_chat_id(mut self, user_chat_id: i64) -> Self {
25441        self.user_chat_id = user_chat_id;
25442        self
25443    }
25444    #[allow(rustdoc::invalid_html_tags)]
25445    #[doc = "Date the connection was established in Unix time"]
25446    pub fn set_date(mut self, date: i64) -> Self {
25447        self.date = date;
25448        self
25449    }
25450    #[allow(rustdoc::invalid_html_tags)]
25451    #[doc = "Optional. Rights of the business bot"]
25452    pub fn set_rights(mut self, rights: BusinessBotRights) -> Self {
25453        self.rights = Some(BoxWrapper(Unbox(rights)));
25454        self
25455    }
25456    #[allow(rustdoc::invalid_html_tags)]
25457    #[doc = "True, if the connection is active"]
25458    pub fn set_is_enabled(mut self, is_enabled: bool) -> Self {
25459        self.is_enabled = is_enabled;
25460        self
25461    }
25462    pub fn build(self) -> BusinessConnection {
25463        BusinessConnection {
25464            id: self.id,
25465            user: self.user,
25466            user_chat_id: self.user_chat_id,
25467            date: self.date,
25468            rights: self.rights,
25469            is_enabled: self.is_enabled,
25470        }
25471    }
25472}
25473#[allow(rustdoc::invalid_html_tags)]
25474#[doc = "This object represent a user's profile pictures."]
25475#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25476pub struct UserProfilePhotos {
25477    #[allow(rustdoc::invalid_html_tags)]
25478    #[doc = "Total number of profile pictures the target user has"]
25479    #[serde(rename = "total_count")]
25480    pub total_count: i64,
25481    #[allow(rustdoc::invalid_html_tags)]
25482    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
25483    #[serde(rename = "photos")]
25484    pub photos: Vec<Vec<PhotoSize>>,
25485}
25486#[allow(rustdoc::invalid_html_tags)]
25487#[doc = "Companion type to UserProfilePhotos that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
25488#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25489pub struct NoSkipUserProfilePhotos {
25490    #[allow(rustdoc::invalid_html_tags)]
25491    #[doc = "Total number of profile pictures the target user has"]
25492    #[serde(rename = "total_count")]
25493    pub total_count: i64,
25494    #[allow(rustdoc::invalid_html_tags)]
25495    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
25496    #[serde(rename = "photos")]
25497    pub photos: Vec<Vec<PhotoSize>>,
25498}
25499impl From<NoSkipUserProfilePhotos> for UserProfilePhotos {
25500    fn from(t: NoSkipUserProfilePhotos) -> Self {
25501        Self {
25502            total_count: t.total_count,
25503            photos: t.photos,
25504        }
25505    }
25506}
25507#[allow(clippy::from_over_into)]
25508impl Into<NoSkipUserProfilePhotos> for UserProfilePhotos {
25509    fn into(self) -> NoSkipUserProfilePhotos {
25510        NoSkipUserProfilePhotos {
25511            total_count: self.total_count,
25512            photos: self.photos,
25513        }
25514    }
25515}
25516impl NoSkipUserProfilePhotos {
25517    pub fn skip(self) -> UserProfilePhotos {
25518        self.into()
25519    }
25520}
25521impl UserProfilePhotos {
25522    pub fn noskip(self) -> NoSkipUserProfilePhotos {
25523        self.into()
25524    }
25525}
25526#[allow(rustdoc::invalid_html_tags)]
25527#[doc = "This object represent a user's profile pictures."]
25528#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25529pub struct UserProfilePhotosBuilder {
25530    #[allow(rustdoc::invalid_html_tags)]
25531    #[doc = "Total number of profile pictures the target user has"]
25532    #[serde(rename = "total_count")]
25533    pub total_count: i64,
25534    #[allow(rustdoc::invalid_html_tags)]
25535    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
25536    #[serde(rename = "photos")]
25537    pub photos: Vec<Vec<PhotoSize>>,
25538}
25539impl UserProfilePhotosBuilder {
25540    #[allow(clippy::too_many_arguments)]
25541    pub fn new(total_count: i64, photos: Vec<Vec<PhotoSize>>) -> Self {
25542        Self {
25543            total_count,
25544            photos,
25545        }
25546    }
25547    #[allow(rustdoc::invalid_html_tags)]
25548    #[doc = "Total number of profile pictures the target user has"]
25549    pub fn set_total_count(mut self, total_count: i64) -> Self {
25550        self.total_count = total_count;
25551        self
25552    }
25553    #[allow(rustdoc::invalid_html_tags)]
25554    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
25555    pub fn set_photos(mut self, photos: Vec<Vec<PhotoSize>>) -> Self {
25556        self.photos = photos;
25557        self
25558    }
25559    pub fn build(self) -> UserProfilePhotos {
25560        UserProfilePhotos {
25561            total_count: self.total_count,
25562            photos: self.photos,
25563        }
25564    }
25565}
25566#[allow(rustdoc::invalid_html_tags)]
25567#[doc = "The reaction is paid."]
25568#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25569pub struct ReactionTypePaid {
25570    #[allow(rustdoc::invalid_html_tags)]
25571    #[doc = "Type of the reaction, always \"paid\""]
25572    #[serde(rename = "type")]
25573    pub tg_type: String,
25574}
25575#[allow(rustdoc::invalid_html_tags)]
25576#[doc = "Companion type to ReactionTypePaid that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
25577#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25578pub struct NoSkipReactionTypePaid {
25579    #[allow(rustdoc::invalid_html_tags)]
25580    #[doc = "Type of the reaction, always \"paid\""]
25581    #[serde(rename = "type")]
25582    pub tg_type: String,
25583}
25584impl From<NoSkipReactionTypePaid> for ReactionTypePaid {
25585    fn from(t: NoSkipReactionTypePaid) -> Self {
25586        Self { tg_type: t.tg_type }
25587    }
25588}
25589#[allow(clippy::from_over_into)]
25590impl Into<NoSkipReactionTypePaid> for ReactionTypePaid {
25591    fn into(self) -> NoSkipReactionTypePaid {
25592        NoSkipReactionTypePaid {
25593            tg_type: self.tg_type,
25594        }
25595    }
25596}
25597impl NoSkipReactionTypePaid {
25598    pub fn skip(self) -> ReactionTypePaid {
25599        self.into()
25600    }
25601}
25602impl ReactionTypePaid {
25603    pub fn noskip(self) -> NoSkipReactionTypePaid {
25604        self.into()
25605    }
25606}
25607#[allow(rustdoc::invalid_html_tags)]
25608#[doc = "The reaction is paid."]
25609#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25610pub struct ReactionTypePaidBuilder {
25611    #[allow(rustdoc::invalid_html_tags)]
25612    #[doc = "Type of the reaction, always \"paid\""]
25613    #[serde(rename = "type")]
25614    pub tg_type: String,
25615}
25616impl ReactionTypePaidBuilder {
25617    #[allow(clippy::too_many_arguments)]
25618    pub fn new() -> Self {
25619        Self {
25620            tg_type: "ReactionTypePaid".to_owned(),
25621        }
25622    }
25623    #[allow(rustdoc::invalid_html_tags)]
25624    #[doc = "Type of the reaction, always \"paid\""]
25625    pub fn set_type(mut self, tg_type: String) -> Self {
25626        self.tg_type = tg_type;
25627        self
25628    }
25629    pub fn build(self) -> ReactionTypePaid {
25630        ReactionTypePaid {
25631            tg_type: self.tg_type,
25632        }
25633    }
25634}
25635#[allow(rustdoc::invalid_html_tags)]
25636#[doc = "Represents a chat member that was banned in the chat and can't return to the chat or view chat messages."]
25637#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25638pub struct ChatMemberBanned {
25639    #[allow(rustdoc::invalid_html_tags)]
25640    #[doc = "Information about the user"]
25641    #[serde(rename = "user")]
25642    pub user: BoxWrapper<Unbox<User>>,
25643    #[allow(rustdoc::invalid_html_tags)]
25644    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
25645    #[serde(rename = "until_date")]
25646    pub until_date: i64,
25647}
25648#[allow(rustdoc::invalid_html_tags)]
25649#[doc = "Companion type to ChatMemberBanned that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
25650#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25651pub struct NoSkipChatMemberBanned {
25652    #[allow(rustdoc::invalid_html_tags)]
25653    #[doc = "Information about the user"]
25654    #[serde(rename = "user")]
25655    pub user: BoxWrapper<Unbox<User>>,
25656    #[allow(rustdoc::invalid_html_tags)]
25657    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
25658    #[serde(rename = "until_date")]
25659    pub until_date: i64,
25660}
25661impl From<NoSkipChatMemberBanned> for ChatMemberBanned {
25662    fn from(t: NoSkipChatMemberBanned) -> Self {
25663        Self {
25664            user: t.user,
25665            until_date: t.until_date,
25666        }
25667    }
25668}
25669#[allow(clippy::from_over_into)]
25670impl Into<NoSkipChatMemberBanned> for ChatMemberBanned {
25671    fn into(self) -> NoSkipChatMemberBanned {
25672        NoSkipChatMemberBanned {
25673            user: self.user,
25674            until_date: self.until_date,
25675        }
25676    }
25677}
25678impl NoSkipChatMemberBanned {
25679    pub fn skip(self) -> ChatMemberBanned {
25680        self.into()
25681    }
25682}
25683impl ChatMemberBanned {
25684    pub fn noskip(self) -> NoSkipChatMemberBanned {
25685        self.into()
25686    }
25687}
25688#[allow(rustdoc::invalid_html_tags)]
25689#[doc = "Represents a chat member that was banned in the chat and can't return to the chat or view chat messages."]
25690#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25691pub struct ChatMemberBannedBuilder {
25692    #[allow(rustdoc::invalid_html_tags)]
25693    #[doc = "Information about the user"]
25694    #[serde(rename = "user")]
25695    pub user: BoxWrapper<Unbox<User>>,
25696    #[allow(rustdoc::invalid_html_tags)]
25697    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
25698    #[serde(rename = "until_date")]
25699    pub until_date: i64,
25700}
25701impl ChatMemberBannedBuilder {
25702    #[allow(clippy::too_many_arguments)]
25703    pub fn new<A: Into<User>>(user: A, until_date: i64) -> Self {
25704        Self {
25705            user: BoxWrapper::new_unbox(user.into()),
25706            until_date,
25707        }
25708    }
25709    #[allow(rustdoc::invalid_html_tags)]
25710    #[doc = "Information about the user"]
25711    pub fn set_user(mut self, user: User) -> Self {
25712        self.user = BoxWrapper(Unbox(user));
25713        self
25714    }
25715    #[allow(rustdoc::invalid_html_tags)]
25716    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
25717    pub fn set_until_date(mut self, until_date: i64) -> Self {
25718        self.until_date = until_date;
25719        self
25720    }
25721    pub fn build(self) -> ChatMemberBanned {
25722        ChatMemberBanned {
25723            user: self.user,
25724            until_date: self.until_date,
25725        }
25726    }
25727}
25728#[allow(rustdoc::invalid_html_tags)]
25729#[doc = "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button."]
25730#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25731pub struct UsersShared {
25732    #[allow(rustdoc::invalid_html_tags)]
25733    #[doc = "Identifier of the request"]
25734    #[serde(rename = "request_id")]
25735    pub request_id: i64,
25736    #[allow(rustdoc::invalid_html_tags)]
25737    #[doc = "Information about users shared with the bot."]
25738    #[serde(rename = "users")]
25739    pub users: Vec<SharedUser>,
25740}
25741#[allow(rustdoc::invalid_html_tags)]
25742#[doc = "Companion type to UsersShared that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
25743#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25744pub struct NoSkipUsersShared {
25745    #[allow(rustdoc::invalid_html_tags)]
25746    #[doc = "Identifier of the request"]
25747    #[serde(rename = "request_id")]
25748    pub request_id: i64,
25749    #[allow(rustdoc::invalid_html_tags)]
25750    #[doc = "Information about users shared with the bot."]
25751    #[serde(rename = "users")]
25752    pub users: Vec<SharedUser>,
25753}
25754impl From<NoSkipUsersShared> for UsersShared {
25755    fn from(t: NoSkipUsersShared) -> Self {
25756        Self {
25757            request_id: t.request_id,
25758            users: t.users,
25759        }
25760    }
25761}
25762#[allow(clippy::from_over_into)]
25763impl Into<NoSkipUsersShared> for UsersShared {
25764    fn into(self) -> NoSkipUsersShared {
25765        NoSkipUsersShared {
25766            request_id: self.request_id,
25767            users: self.users,
25768        }
25769    }
25770}
25771impl NoSkipUsersShared {
25772    pub fn skip(self) -> UsersShared {
25773        self.into()
25774    }
25775}
25776impl UsersShared {
25777    pub fn noskip(self) -> NoSkipUsersShared {
25778        self.into()
25779    }
25780}
25781#[allow(rustdoc::invalid_html_tags)]
25782#[doc = "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button."]
25783#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25784pub struct UsersSharedBuilder {
25785    #[allow(rustdoc::invalid_html_tags)]
25786    #[doc = "Identifier of the request"]
25787    #[serde(rename = "request_id")]
25788    pub request_id: i64,
25789    #[allow(rustdoc::invalid_html_tags)]
25790    #[doc = "Information about users shared with the bot."]
25791    #[serde(rename = "users")]
25792    pub users: Vec<SharedUser>,
25793}
25794impl UsersSharedBuilder {
25795    #[allow(clippy::too_many_arguments)]
25796    pub fn new(request_id: i64, users: Vec<SharedUser>) -> Self {
25797        Self { request_id, users }
25798    }
25799    #[allow(rustdoc::invalid_html_tags)]
25800    #[doc = "Identifier of the request"]
25801    pub fn set_request_id(mut self, request_id: i64) -> Self {
25802        self.request_id = request_id;
25803        self
25804    }
25805    #[allow(rustdoc::invalid_html_tags)]
25806    #[doc = "Information about users shared with the bot."]
25807    pub fn set_users(mut self, users: Vec<SharedUser>) -> Self {
25808        self.users = users;
25809        self
25810    }
25811    pub fn build(self) -> UsersShared {
25812        UsersShared {
25813            request_id: self.request_id,
25814            users: self.users,
25815        }
25816    }
25817}
25818#[allow(rustdoc::invalid_html_tags)]
25819#[doc = "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation."]
25820#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25821pub struct InlineQueryResultMpeg4Gif {
25822    #[allow(rustdoc::invalid_html_tags)]
25823    #[doc = "Type of the result, must be mpeg4_gif"]
25824    #[serde(rename = "type")]
25825    pub tg_type: String,
25826    #[allow(rustdoc::invalid_html_tags)]
25827    #[doc = "Unique identifier for this result, 1-64 bytes"]
25828    #[serde(rename = "id")]
25829    pub id: String,
25830    #[allow(rustdoc::invalid_html_tags)]
25831    #[doc = "A valid URL for the MPEG4 file"]
25832    #[serde(rename = "mpeg4_url")]
25833    pub mpeg_4_url: String,
25834    #[allow(rustdoc::invalid_html_tags)]
25835    #[doc = "Optional. Video width"]
25836    #[serde(
25837        skip_serializing_if = "Option::is_none",
25838        rename = "mpeg4_width",
25839        default
25840    )]
25841    pub mpeg_4_width: Option<i64>,
25842    #[allow(rustdoc::invalid_html_tags)]
25843    #[doc = "Optional. Video height"]
25844    #[serde(
25845        skip_serializing_if = "Option::is_none",
25846        rename = "mpeg4_height",
25847        default
25848    )]
25849    pub mpeg_4_height: Option<i64>,
25850    #[allow(rustdoc::invalid_html_tags)]
25851    #[doc = "Optional. Video duration in seconds"]
25852    #[serde(
25853        skip_serializing_if = "Option::is_none",
25854        rename = "mpeg4_duration",
25855        default
25856    )]
25857    pub mpeg_4_duration: Option<i64>,
25858    #[allow(rustdoc::invalid_html_tags)]
25859    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
25860    #[serde(rename = "thumbnail_url")]
25861    pub thumbnail_url: String,
25862    #[allow(rustdoc::invalid_html_tags)]
25863    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
25864    #[serde(
25865        skip_serializing_if = "Option::is_none",
25866        rename = "thumbnail_mime_type",
25867        default
25868    )]
25869    pub thumbnail_mime_type: Option<String>,
25870    #[allow(rustdoc::invalid_html_tags)]
25871    #[doc = "Optional. Title for the result"]
25872    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
25873    pub title: Option<String>,
25874    #[allow(rustdoc::invalid_html_tags)]
25875    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
25876    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
25877    pub caption: Option<String>,
25878    #[allow(rustdoc::invalid_html_tags)]
25879    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
25880    #[serde(
25881        skip_serializing_if = "Option::is_none",
25882        rename = "parse_mode",
25883        default
25884    )]
25885    pub parse_mode: Option<String>,
25886    #[allow(rustdoc::invalid_html_tags)]
25887    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
25888    #[serde(
25889        skip_serializing_if = "Option::is_none",
25890        rename = "caption_entities",
25891        default
25892    )]
25893    pub caption_entities: Option<Vec<MessageEntity>>,
25894    #[allow(rustdoc::invalid_html_tags)]
25895    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
25896    #[serde(
25897        skip_serializing_if = "Option::is_none",
25898        rename = "show_caption_above_media",
25899        default
25900    )]
25901    pub show_caption_above_media: Option<bool>,
25902    #[allow(rustdoc::invalid_html_tags)]
25903    #[doc = "Optional. Inline keyboard attached to the message"]
25904    #[serde(
25905        skip_serializing_if = "Option::is_none",
25906        rename = "reply_markup",
25907        default
25908    )]
25909    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
25910    #[allow(rustdoc::invalid_html_tags)]
25911    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
25912    #[serde(
25913        skip_serializing_if = "Option::is_none",
25914        rename = "input_message_content",
25915        default
25916    )]
25917    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
25918}
25919#[allow(rustdoc::invalid_html_tags)]
25920#[doc = "Companion type to InlineQueryResultMpeg4Gif that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
25921#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
25922pub struct NoSkipInlineQueryResultMpeg4Gif {
25923    #[allow(rustdoc::invalid_html_tags)]
25924    #[doc = "Type of the result, must be mpeg4_gif"]
25925    #[serde(rename = "type")]
25926    pub tg_type: String,
25927    #[allow(rustdoc::invalid_html_tags)]
25928    #[doc = "Unique identifier for this result, 1-64 bytes"]
25929    #[serde(rename = "id")]
25930    pub id: String,
25931    #[allow(rustdoc::invalid_html_tags)]
25932    #[doc = "A valid URL for the MPEG4 file"]
25933    #[serde(rename = "mpeg4_url")]
25934    pub mpeg_4_url: String,
25935    pub mpeg_4_width: Option<i64>,
25936    pub mpeg_4_height: Option<i64>,
25937    pub mpeg_4_duration: Option<i64>,
25938    #[allow(rustdoc::invalid_html_tags)]
25939    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
25940    #[serde(rename = "thumbnail_url")]
25941    pub thumbnail_url: String,
25942    pub thumbnail_mime_type: Option<String>,
25943    pub title: Option<String>,
25944    pub caption: Option<String>,
25945    pub parse_mode: Option<String>,
25946    pub caption_entities: Option<Vec<MessageEntity>>,
25947    pub show_caption_above_media: Option<bool>,
25948    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
25949    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
25950}
25951impl From<NoSkipInlineQueryResultMpeg4Gif> for InlineQueryResultMpeg4Gif {
25952    fn from(t: NoSkipInlineQueryResultMpeg4Gif) -> Self {
25953        Self {
25954            tg_type: t.tg_type,
25955            id: t.id,
25956            mpeg_4_url: t.mpeg_4_url,
25957            mpeg_4_width: t.mpeg_4_width,
25958            mpeg_4_height: t.mpeg_4_height,
25959            mpeg_4_duration: t.mpeg_4_duration,
25960            thumbnail_url: t.thumbnail_url,
25961            thumbnail_mime_type: t.thumbnail_mime_type,
25962            title: t.title,
25963            caption: t.caption,
25964            parse_mode: t.parse_mode,
25965            caption_entities: t.caption_entities,
25966            show_caption_above_media: t.show_caption_above_media,
25967            reply_markup: t.reply_markup,
25968            input_message_content: t.input_message_content,
25969        }
25970    }
25971}
25972#[allow(clippy::from_over_into)]
25973impl Into<NoSkipInlineQueryResultMpeg4Gif> for InlineQueryResultMpeg4Gif {
25974    fn into(self) -> NoSkipInlineQueryResultMpeg4Gif {
25975        NoSkipInlineQueryResultMpeg4Gif {
25976            tg_type: self.tg_type,
25977            id: self.id,
25978            mpeg_4_url: self.mpeg_4_url,
25979            mpeg_4_width: self.mpeg_4_width,
25980            mpeg_4_height: self.mpeg_4_height,
25981            mpeg_4_duration: self.mpeg_4_duration,
25982            thumbnail_url: self.thumbnail_url,
25983            thumbnail_mime_type: self.thumbnail_mime_type,
25984            title: self.title,
25985            caption: self.caption,
25986            parse_mode: self.parse_mode,
25987            caption_entities: self.caption_entities,
25988            show_caption_above_media: self.show_caption_above_media,
25989            reply_markup: self.reply_markup,
25990            input_message_content: self.input_message_content,
25991        }
25992    }
25993}
25994impl NoSkipInlineQueryResultMpeg4Gif {
25995    pub fn skip(self) -> InlineQueryResultMpeg4Gif {
25996        self.into()
25997    }
25998}
25999impl InlineQueryResultMpeg4Gif {
26000    pub fn noskip(self) -> NoSkipInlineQueryResultMpeg4Gif {
26001        self.into()
26002    }
26003}
26004#[allow(rustdoc::invalid_html_tags)]
26005#[doc = "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation."]
26006#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26007pub struct InlineQueryResultMpeg4GifBuilder {
26008    #[allow(rustdoc::invalid_html_tags)]
26009    #[doc = "Type of the result, must be mpeg4_gif"]
26010    #[serde(rename = "type")]
26011    pub tg_type: String,
26012    #[allow(rustdoc::invalid_html_tags)]
26013    #[doc = "Unique identifier for this result, 1-64 bytes"]
26014    #[serde(rename = "id")]
26015    pub id: String,
26016    #[allow(rustdoc::invalid_html_tags)]
26017    #[doc = "A valid URL for the MPEG4 file"]
26018    #[serde(rename = "mpeg4_url")]
26019    pub mpeg_4_url: String,
26020    #[allow(rustdoc::invalid_html_tags)]
26021    #[doc = "Optional. Video width"]
26022    #[serde(
26023        skip_serializing_if = "Option::is_none",
26024        rename = "mpeg4_width",
26025        default
26026    )]
26027    pub mpeg_4_width: Option<i64>,
26028    #[allow(rustdoc::invalid_html_tags)]
26029    #[doc = "Optional. Video height"]
26030    #[serde(
26031        skip_serializing_if = "Option::is_none",
26032        rename = "mpeg4_height",
26033        default
26034    )]
26035    pub mpeg_4_height: Option<i64>,
26036    #[allow(rustdoc::invalid_html_tags)]
26037    #[doc = "Optional. Video duration in seconds"]
26038    #[serde(
26039        skip_serializing_if = "Option::is_none",
26040        rename = "mpeg4_duration",
26041        default
26042    )]
26043    pub mpeg_4_duration: Option<i64>,
26044    #[allow(rustdoc::invalid_html_tags)]
26045    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
26046    #[serde(rename = "thumbnail_url")]
26047    pub thumbnail_url: String,
26048    #[allow(rustdoc::invalid_html_tags)]
26049    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
26050    #[serde(
26051        skip_serializing_if = "Option::is_none",
26052        rename = "thumbnail_mime_type",
26053        default
26054    )]
26055    pub thumbnail_mime_type: Option<String>,
26056    #[allow(rustdoc::invalid_html_tags)]
26057    #[doc = "Optional. Title for the result"]
26058    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
26059    pub title: Option<String>,
26060    #[allow(rustdoc::invalid_html_tags)]
26061    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
26062    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
26063    pub caption: Option<String>,
26064    #[allow(rustdoc::invalid_html_tags)]
26065    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
26066    #[serde(
26067        skip_serializing_if = "Option::is_none",
26068        rename = "parse_mode",
26069        default
26070    )]
26071    pub parse_mode: Option<String>,
26072    #[allow(rustdoc::invalid_html_tags)]
26073    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
26074    #[serde(
26075        skip_serializing_if = "Option::is_none",
26076        rename = "caption_entities",
26077        default
26078    )]
26079    pub caption_entities: Option<Vec<MessageEntity>>,
26080    #[allow(rustdoc::invalid_html_tags)]
26081    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
26082    #[serde(
26083        skip_serializing_if = "Option::is_none",
26084        rename = "show_caption_above_media",
26085        default
26086    )]
26087    pub show_caption_above_media: Option<bool>,
26088    #[allow(rustdoc::invalid_html_tags)]
26089    #[doc = "Optional. Inline keyboard attached to the message"]
26090    #[serde(
26091        skip_serializing_if = "Option::is_none",
26092        rename = "reply_markup",
26093        default
26094    )]
26095    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
26096    #[allow(rustdoc::invalid_html_tags)]
26097    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
26098    #[serde(
26099        skip_serializing_if = "Option::is_none",
26100        rename = "input_message_content",
26101        default
26102    )]
26103    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
26104}
26105impl InlineQueryResultMpeg4GifBuilder {
26106    #[allow(clippy::too_many_arguments)]
26107    pub fn new(id: String, mpeg_4_url: String, thumbnail_url: String) -> Self {
26108        Self {
26109            tg_type: "mpeg4_gif".to_owned(),
26110            id,
26111            mpeg_4_url,
26112            thumbnail_url,
26113            mpeg_4_width: None,
26114            mpeg_4_height: None,
26115            mpeg_4_duration: None,
26116            thumbnail_mime_type: None,
26117            title: None,
26118            caption: None,
26119            parse_mode: None,
26120            caption_entities: None,
26121            show_caption_above_media: None,
26122            reply_markup: None,
26123            input_message_content: None,
26124        }
26125    }
26126    #[allow(rustdoc::invalid_html_tags)]
26127    #[doc = "Type of the result, must be mpeg4_gif"]
26128    pub fn set_type(mut self, tg_type: String) -> Self {
26129        self.tg_type = tg_type;
26130        self
26131    }
26132    #[allow(rustdoc::invalid_html_tags)]
26133    #[doc = "Unique identifier for this result, 1-64 bytes"]
26134    pub fn set_id(mut self, id: String) -> Self {
26135        self.id = id;
26136        self
26137    }
26138    #[allow(rustdoc::invalid_html_tags)]
26139    #[doc = "A valid URL for the MPEG4 file"]
26140    pub fn set_mpeg_4_url(mut self, mpeg_4_url: String) -> Self {
26141        self.mpeg_4_url = mpeg_4_url;
26142        self
26143    }
26144    #[allow(rustdoc::invalid_html_tags)]
26145    #[doc = "Optional. Video width"]
26146    pub fn set_mpeg_4_width(mut self, mpeg_4_width: i64) -> Self {
26147        self.mpeg_4_width = Some(mpeg_4_width);
26148        self
26149    }
26150    #[allow(rustdoc::invalid_html_tags)]
26151    #[doc = "Optional. Video height"]
26152    pub fn set_mpeg_4_height(mut self, mpeg_4_height: i64) -> Self {
26153        self.mpeg_4_height = Some(mpeg_4_height);
26154        self
26155    }
26156    #[allow(rustdoc::invalid_html_tags)]
26157    #[doc = "Optional. Video duration in seconds"]
26158    pub fn set_mpeg_4_duration(mut self, mpeg_4_duration: i64) -> Self {
26159        self.mpeg_4_duration = Some(mpeg_4_duration);
26160        self
26161    }
26162    #[allow(rustdoc::invalid_html_tags)]
26163    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
26164    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
26165        self.thumbnail_url = thumbnail_url;
26166        self
26167    }
26168    #[allow(rustdoc::invalid_html_tags)]
26169    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
26170    pub fn set_thumbnail_mime_type(mut self, thumbnail_mime_type: String) -> Self {
26171        self.thumbnail_mime_type = Some(thumbnail_mime_type);
26172        self
26173    }
26174    #[allow(rustdoc::invalid_html_tags)]
26175    #[doc = "Optional. Title for the result"]
26176    pub fn set_title(mut self, title: String) -> Self {
26177        self.title = Some(title);
26178        self
26179    }
26180    #[allow(rustdoc::invalid_html_tags)]
26181    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
26182    pub fn set_caption(mut self, caption: String) -> Self {
26183        self.caption = Some(caption);
26184        self
26185    }
26186    #[allow(rustdoc::invalid_html_tags)]
26187    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
26188    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
26189        self.parse_mode = Some(parse_mode);
26190        self
26191    }
26192    #[allow(rustdoc::invalid_html_tags)]
26193    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
26194    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
26195        self.caption_entities = Some(caption_entities);
26196        self
26197    }
26198    #[allow(rustdoc::invalid_html_tags)]
26199    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
26200    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
26201        self.show_caption_above_media = Some(show_caption_above_media);
26202        self
26203    }
26204    #[allow(rustdoc::invalid_html_tags)]
26205    #[doc = "Optional. Inline keyboard attached to the message"]
26206    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
26207        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
26208        self
26209    }
26210    #[allow(rustdoc::invalid_html_tags)]
26211    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
26212    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
26213        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
26214        self
26215    }
26216    pub fn build(self) -> InlineQueryResultMpeg4Gif {
26217        InlineQueryResultMpeg4Gif {
26218            tg_type: self.tg_type,
26219            id: self.id,
26220            mpeg_4_url: self.mpeg_4_url,
26221            mpeg_4_width: self.mpeg_4_width,
26222            mpeg_4_height: self.mpeg_4_height,
26223            mpeg_4_duration: self.mpeg_4_duration,
26224            thumbnail_url: self.thumbnail_url,
26225            thumbnail_mime_type: self.thumbnail_mime_type,
26226            title: self.title,
26227            caption: self.caption,
26228            parse_mode: self.parse_mode,
26229            caption_entities: self.caption_entities,
26230            show_caption_above_media: self.show_caption_above_media,
26231            reply_markup: self.reply_markup,
26232            input_message_content: self.input_message_content,
26233        }
26234    }
26235}
26236#[allow(rustdoc::invalid_html_tags)]
26237#[doc = "Describes a task in a checklist."]
26238#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26239pub struct ChecklistTask {
26240    #[allow(rustdoc::invalid_html_tags)]
26241    #[doc = "Unique identifier of the task"]
26242    #[serde(rename = "id")]
26243    pub id: i64,
26244    #[allow(rustdoc::invalid_html_tags)]
26245    #[doc = "Text of the task"]
26246    #[serde(rename = "text")]
26247    pub text: String,
26248    #[allow(rustdoc::invalid_html_tags)]
26249    #[doc = "Optional. Special entities that appear in the task text"]
26250    #[serde(
26251        skip_serializing_if = "Option::is_none",
26252        rename = "text_entities",
26253        default
26254    )]
26255    pub text_entities: Option<Vec<MessageEntity>>,
26256    #[allow(rustdoc::invalid_html_tags)]
26257    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
26258    #[serde(
26259        skip_serializing_if = "Option::is_none",
26260        rename = "completed_by_user",
26261        default
26262    )]
26263    pub completed_by_user: Option<BoxWrapper<Unbox<User>>>,
26264    #[allow(rustdoc::invalid_html_tags)]
26265    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
26266    #[serde(
26267        skip_serializing_if = "Option::is_none",
26268        rename = "completion_date",
26269        default
26270    )]
26271    pub completion_date: Option<i64>,
26272}
26273#[allow(rustdoc::invalid_html_tags)]
26274#[doc = "Companion type to ChecklistTask that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
26275#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26276pub struct NoSkipChecklistTask {
26277    #[allow(rustdoc::invalid_html_tags)]
26278    #[doc = "Unique identifier of the task"]
26279    #[serde(rename = "id")]
26280    pub id: i64,
26281    #[allow(rustdoc::invalid_html_tags)]
26282    #[doc = "Text of the task"]
26283    #[serde(rename = "text")]
26284    pub text: String,
26285    pub text_entities: Option<Vec<MessageEntity>>,
26286    pub completed_by_user: Option<BoxWrapper<Unbox<User>>>,
26287    pub completion_date: Option<i64>,
26288}
26289impl From<NoSkipChecklistTask> for ChecklistTask {
26290    fn from(t: NoSkipChecklistTask) -> Self {
26291        Self {
26292            id: t.id,
26293            text: t.text,
26294            text_entities: t.text_entities,
26295            completed_by_user: t.completed_by_user,
26296            completion_date: t.completion_date,
26297        }
26298    }
26299}
26300#[allow(clippy::from_over_into)]
26301impl Into<NoSkipChecklistTask> for ChecklistTask {
26302    fn into(self) -> NoSkipChecklistTask {
26303        NoSkipChecklistTask {
26304            id: self.id,
26305            text: self.text,
26306            text_entities: self.text_entities,
26307            completed_by_user: self.completed_by_user,
26308            completion_date: self.completion_date,
26309        }
26310    }
26311}
26312impl NoSkipChecklistTask {
26313    pub fn skip(self) -> ChecklistTask {
26314        self.into()
26315    }
26316}
26317impl ChecklistTask {
26318    pub fn noskip(self) -> NoSkipChecklistTask {
26319        self.into()
26320    }
26321}
26322#[allow(rustdoc::invalid_html_tags)]
26323#[doc = "Describes a task in a checklist."]
26324#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26325pub struct ChecklistTaskBuilder {
26326    #[allow(rustdoc::invalid_html_tags)]
26327    #[doc = "Unique identifier of the task"]
26328    #[serde(rename = "id")]
26329    pub id: i64,
26330    #[allow(rustdoc::invalid_html_tags)]
26331    #[doc = "Text of the task"]
26332    #[serde(rename = "text")]
26333    pub text: String,
26334    #[allow(rustdoc::invalid_html_tags)]
26335    #[doc = "Optional. Special entities that appear in the task text"]
26336    #[serde(
26337        skip_serializing_if = "Option::is_none",
26338        rename = "text_entities",
26339        default
26340    )]
26341    pub text_entities: Option<Vec<MessageEntity>>,
26342    #[allow(rustdoc::invalid_html_tags)]
26343    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
26344    #[serde(
26345        skip_serializing_if = "Option::is_none",
26346        rename = "completed_by_user",
26347        default
26348    )]
26349    pub completed_by_user: Option<BoxWrapper<Unbox<User>>>,
26350    #[allow(rustdoc::invalid_html_tags)]
26351    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
26352    #[serde(
26353        skip_serializing_if = "Option::is_none",
26354        rename = "completion_date",
26355        default
26356    )]
26357    pub completion_date: Option<i64>,
26358}
26359impl ChecklistTaskBuilder {
26360    #[allow(clippy::too_many_arguments)]
26361    pub fn new(id: i64, text: String) -> Self {
26362        Self {
26363            id,
26364            text,
26365            text_entities: None,
26366            completed_by_user: None,
26367            completion_date: None,
26368        }
26369    }
26370    #[allow(rustdoc::invalid_html_tags)]
26371    #[doc = "Unique identifier of the task"]
26372    pub fn set_id(mut self, id: i64) -> Self {
26373        self.id = id;
26374        self
26375    }
26376    #[allow(rustdoc::invalid_html_tags)]
26377    #[doc = "Text of the task"]
26378    pub fn set_text(mut self, text: String) -> Self {
26379        self.text = text;
26380        self
26381    }
26382    #[allow(rustdoc::invalid_html_tags)]
26383    #[doc = "Optional. Special entities that appear in the task text"]
26384    pub fn set_text_entities(mut self, text_entities: Vec<MessageEntity>) -> Self {
26385        self.text_entities = Some(text_entities);
26386        self
26387    }
26388    #[allow(rustdoc::invalid_html_tags)]
26389    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
26390    pub fn set_completed_by_user(mut self, completed_by_user: User) -> Self {
26391        self.completed_by_user = Some(BoxWrapper(Unbox(completed_by_user)));
26392        self
26393    }
26394    #[allow(rustdoc::invalid_html_tags)]
26395    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
26396    pub fn set_completion_date(mut self, completion_date: i64) -> Self {
26397        self.completion_date = Some(completion_date);
26398        self
26399    }
26400    pub fn build(self) -> ChecklistTask {
26401        ChecklistTask {
26402            id: self.id,
26403            text: self.text,
26404            text_entities: self.text_entities,
26405            completed_by_user: self.completed_by_user,
26406            completion_date: self.completion_date,
26407        }
26408    }
26409}
26410#[allow(rustdoc::invalid_html_tags)]
26411#[doc = "Describes a checklist."]
26412#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26413pub struct Checklist {
26414    #[allow(rustdoc::invalid_html_tags)]
26415    #[doc = "Title of the checklist"]
26416    #[serde(rename = "title")]
26417    pub title: String,
26418    #[allow(rustdoc::invalid_html_tags)]
26419    #[doc = "Optional. Special entities that appear in the checklist title"]
26420    #[serde(
26421        skip_serializing_if = "Option::is_none",
26422        rename = "title_entities",
26423        default
26424    )]
26425    pub title_entities: Option<Vec<MessageEntity>>,
26426    #[allow(rustdoc::invalid_html_tags)]
26427    #[doc = "List of tasks in the checklist"]
26428    #[serde(rename = "tasks")]
26429    pub tasks: Vec<ChecklistTask>,
26430    #[allow(rustdoc::invalid_html_tags)]
26431    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
26432    #[serde(
26433        skip_serializing_if = "Option::is_none",
26434        rename = "others_can_add_tasks",
26435        default
26436    )]
26437    pub others_can_add_tasks: Option<bool>,
26438    #[allow(rustdoc::invalid_html_tags)]
26439    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
26440    #[serde(
26441        skip_serializing_if = "Option::is_none",
26442        rename = "others_can_mark_tasks_as_done",
26443        default
26444    )]
26445    pub others_can_mark_tasks_as_done: Option<bool>,
26446}
26447#[allow(rustdoc::invalid_html_tags)]
26448#[doc = "Companion type to Checklist that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
26449#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26450pub struct NoSkipChecklist {
26451    #[allow(rustdoc::invalid_html_tags)]
26452    #[doc = "Title of the checklist"]
26453    #[serde(rename = "title")]
26454    pub title: String,
26455    pub title_entities: Option<Vec<MessageEntity>>,
26456    #[allow(rustdoc::invalid_html_tags)]
26457    #[doc = "List of tasks in the checklist"]
26458    #[serde(rename = "tasks")]
26459    pub tasks: Vec<ChecklistTask>,
26460    pub others_can_add_tasks: Option<bool>,
26461    pub others_can_mark_tasks_as_done: Option<bool>,
26462}
26463impl From<NoSkipChecklist> for Checklist {
26464    fn from(t: NoSkipChecklist) -> Self {
26465        Self {
26466            title: t.title,
26467            title_entities: t.title_entities,
26468            tasks: t.tasks,
26469            others_can_add_tasks: t.others_can_add_tasks,
26470            others_can_mark_tasks_as_done: t.others_can_mark_tasks_as_done,
26471        }
26472    }
26473}
26474#[allow(clippy::from_over_into)]
26475impl Into<NoSkipChecklist> for Checklist {
26476    fn into(self) -> NoSkipChecklist {
26477        NoSkipChecklist {
26478            title: self.title,
26479            title_entities: self.title_entities,
26480            tasks: self.tasks,
26481            others_can_add_tasks: self.others_can_add_tasks,
26482            others_can_mark_tasks_as_done: self.others_can_mark_tasks_as_done,
26483        }
26484    }
26485}
26486impl NoSkipChecklist {
26487    pub fn skip(self) -> Checklist {
26488        self.into()
26489    }
26490}
26491impl Checklist {
26492    pub fn noskip(self) -> NoSkipChecklist {
26493        self.into()
26494    }
26495}
26496#[allow(rustdoc::invalid_html_tags)]
26497#[doc = "Describes a checklist."]
26498#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26499pub struct ChecklistBuilder {
26500    #[allow(rustdoc::invalid_html_tags)]
26501    #[doc = "Title of the checklist"]
26502    #[serde(rename = "title")]
26503    pub title: String,
26504    #[allow(rustdoc::invalid_html_tags)]
26505    #[doc = "Optional. Special entities that appear in the checklist title"]
26506    #[serde(
26507        skip_serializing_if = "Option::is_none",
26508        rename = "title_entities",
26509        default
26510    )]
26511    pub title_entities: Option<Vec<MessageEntity>>,
26512    #[allow(rustdoc::invalid_html_tags)]
26513    #[doc = "List of tasks in the checklist"]
26514    #[serde(rename = "tasks")]
26515    pub tasks: Vec<ChecklistTask>,
26516    #[allow(rustdoc::invalid_html_tags)]
26517    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
26518    #[serde(
26519        skip_serializing_if = "Option::is_none",
26520        rename = "others_can_add_tasks",
26521        default
26522    )]
26523    pub others_can_add_tasks: Option<bool>,
26524    #[allow(rustdoc::invalid_html_tags)]
26525    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
26526    #[serde(
26527        skip_serializing_if = "Option::is_none",
26528        rename = "others_can_mark_tasks_as_done",
26529        default
26530    )]
26531    pub others_can_mark_tasks_as_done: Option<bool>,
26532}
26533impl ChecklistBuilder {
26534    #[allow(clippy::too_many_arguments)]
26535    pub fn new(title: String, tasks: Vec<ChecklistTask>) -> Self {
26536        Self {
26537            title,
26538            tasks,
26539            title_entities: None,
26540            others_can_add_tasks: None,
26541            others_can_mark_tasks_as_done: None,
26542        }
26543    }
26544    #[allow(rustdoc::invalid_html_tags)]
26545    #[doc = "Title of the checklist"]
26546    pub fn set_title(mut self, title: String) -> Self {
26547        self.title = title;
26548        self
26549    }
26550    #[allow(rustdoc::invalid_html_tags)]
26551    #[doc = "Optional. Special entities that appear in the checklist title"]
26552    pub fn set_title_entities(mut self, title_entities: Vec<MessageEntity>) -> Self {
26553        self.title_entities = Some(title_entities);
26554        self
26555    }
26556    #[allow(rustdoc::invalid_html_tags)]
26557    #[doc = "List of tasks in the checklist"]
26558    pub fn set_tasks(mut self, tasks: Vec<ChecklistTask>) -> Self {
26559        self.tasks = tasks;
26560        self
26561    }
26562    #[allow(rustdoc::invalid_html_tags)]
26563    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
26564    pub fn set_others_can_add_tasks(mut self, others_can_add_tasks: bool) -> Self {
26565        self.others_can_add_tasks = Some(others_can_add_tasks);
26566        self
26567    }
26568    #[allow(rustdoc::invalid_html_tags)]
26569    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
26570    pub fn set_others_can_mark_tasks_as_done(
26571        mut self,
26572        others_can_mark_tasks_as_done: bool,
26573    ) -> Self {
26574        self.others_can_mark_tasks_as_done = Some(others_can_mark_tasks_as_done);
26575        self
26576    }
26577    pub fn build(self) -> Checklist {
26578        Checklist {
26579            title: self.title,
26580            title_entities: self.title_entities,
26581            tasks: self.tasks,
26582            others_can_add_tasks: self.others_can_add_tasks,
26583            others_can_mark_tasks_as_done: self.others_can_mark_tasks_as_done,
26584        }
26585    }
26586}
26587#[allow(rustdoc::invalid_html_tags)]
26588#[doc = "The background is a freeform gradient that rotates after every message in the chat."]
26589#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26590pub struct BackgroundFillFreeformGradient {
26591    #[allow(rustdoc::invalid_html_tags)]
26592    #[doc = "Type of the background fill, always \"freeform_gradient\""]
26593    #[serde(rename = "type")]
26594    pub tg_type: String,
26595    #[allow(rustdoc::invalid_html_tags)]
26596    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
26597    #[serde(rename = "colors")]
26598    pub colors: Vec<i64>,
26599}
26600#[allow(rustdoc::invalid_html_tags)]
26601#[doc = "Companion type to BackgroundFillFreeformGradient that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
26602#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26603pub struct NoSkipBackgroundFillFreeformGradient {
26604    #[allow(rustdoc::invalid_html_tags)]
26605    #[doc = "Type of the background fill, always \"freeform_gradient\""]
26606    #[serde(rename = "type")]
26607    pub tg_type: String,
26608    #[allow(rustdoc::invalid_html_tags)]
26609    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
26610    #[serde(rename = "colors")]
26611    pub colors: Vec<i64>,
26612}
26613impl From<NoSkipBackgroundFillFreeformGradient> for BackgroundFillFreeformGradient {
26614    fn from(t: NoSkipBackgroundFillFreeformGradient) -> Self {
26615        Self {
26616            tg_type: t.tg_type,
26617            colors: t.colors,
26618        }
26619    }
26620}
26621#[allow(clippy::from_over_into)]
26622impl Into<NoSkipBackgroundFillFreeformGradient> for BackgroundFillFreeformGradient {
26623    fn into(self) -> NoSkipBackgroundFillFreeformGradient {
26624        NoSkipBackgroundFillFreeformGradient {
26625            tg_type: self.tg_type,
26626            colors: self.colors,
26627        }
26628    }
26629}
26630impl NoSkipBackgroundFillFreeformGradient {
26631    pub fn skip(self) -> BackgroundFillFreeformGradient {
26632        self.into()
26633    }
26634}
26635impl BackgroundFillFreeformGradient {
26636    pub fn noskip(self) -> NoSkipBackgroundFillFreeformGradient {
26637        self.into()
26638    }
26639}
26640#[allow(rustdoc::invalid_html_tags)]
26641#[doc = "The background is a freeform gradient that rotates after every message in the chat."]
26642#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26643pub struct BackgroundFillFreeformGradientBuilder {
26644    #[allow(rustdoc::invalid_html_tags)]
26645    #[doc = "Type of the background fill, always \"freeform_gradient\""]
26646    #[serde(rename = "type")]
26647    pub tg_type: String,
26648    #[allow(rustdoc::invalid_html_tags)]
26649    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
26650    #[serde(rename = "colors")]
26651    pub colors: Vec<i64>,
26652}
26653impl BackgroundFillFreeformGradientBuilder {
26654    #[allow(clippy::too_many_arguments)]
26655    pub fn new(colors: Vec<i64>) -> Self {
26656        Self {
26657            tg_type: "BackgroundFillFreeformGradient".to_owned(),
26658            colors,
26659        }
26660    }
26661    #[allow(rustdoc::invalid_html_tags)]
26662    #[doc = "Type of the background fill, always \"freeform_gradient\""]
26663    pub fn set_type(mut self, tg_type: String) -> Self {
26664        self.tg_type = tg_type;
26665        self
26666    }
26667    #[allow(rustdoc::invalid_html_tags)]
26668    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
26669    pub fn set_colors(mut self, colors: Vec<i64>) -> Self {
26670        self.colors = colors;
26671        self
26672    }
26673    pub fn build(self) -> BackgroundFillFreeformGradient {
26674        BackgroundFillFreeformGradient {
26675            tg_type: self.tg_type,
26676            colors: self.colors,
26677        }
26678    }
26679}
26680#[allow(rustdoc::invalid_html_tags)]
26681#[doc = "Describes a unique gift received and owned by a user or a chat."]
26682#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26683pub struct OwnedGiftUnique {
26684    #[allow(rustdoc::invalid_html_tags)]
26685    #[doc = "Type of the gift, always \"unique\""]
26686    #[serde(rename = "type")]
26687    pub tg_type: String,
26688    #[allow(rustdoc::invalid_html_tags)]
26689    #[doc = "Information about the unique gift"]
26690    #[serde(rename = "gift")]
26691    pub gift: BoxWrapper<Unbox<UniqueGift>>,
26692    #[allow(rustdoc::invalid_html_tags)]
26693    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
26694    #[serde(
26695        skip_serializing_if = "Option::is_none",
26696        rename = "owned_gift_id",
26697        default
26698    )]
26699    pub owned_gift_id: Option<String>,
26700    #[allow(rustdoc::invalid_html_tags)]
26701    #[doc = "Optional. Sender of the gift if it is a known user"]
26702    #[serde(
26703        skip_serializing_if = "Option::is_none",
26704        rename = "sender_user",
26705        default
26706    )]
26707    pub sender_user: Option<BoxWrapper<Unbox<User>>>,
26708    #[allow(rustdoc::invalid_html_tags)]
26709    #[doc = "Date the gift was sent in Unix time"]
26710    #[serde(rename = "send_date")]
26711    pub send_date: i64,
26712    #[allow(rustdoc::invalid_html_tags)]
26713    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
26714    #[serde(skip_serializing_if = "Option::is_none", rename = "is_saved", default)]
26715    pub is_saved: Option<bool>,
26716    #[allow(rustdoc::invalid_html_tags)]
26717    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
26718    #[serde(
26719        skip_serializing_if = "Option::is_none",
26720        rename = "can_be_transferred",
26721        default
26722    )]
26723    pub can_be_transferred: Option<bool>,
26724    #[allow(rustdoc::invalid_html_tags)]
26725    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
26726    #[serde(
26727        skip_serializing_if = "Option::is_none",
26728        rename = "transfer_star_count",
26729        default
26730    )]
26731    pub transfer_star_count: Option<i64>,
26732    #[allow(rustdoc::invalid_html_tags)]
26733    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
26734    #[serde(
26735        skip_serializing_if = "Option::is_none",
26736        rename = "next_transfer_date",
26737        default
26738    )]
26739    pub next_transfer_date: Option<i64>,
26740}
26741#[allow(rustdoc::invalid_html_tags)]
26742#[doc = "Companion type to OwnedGiftUnique that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
26743#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26744pub struct NoSkipOwnedGiftUnique {
26745    #[allow(rustdoc::invalid_html_tags)]
26746    #[doc = "Type of the gift, always \"unique\""]
26747    #[serde(rename = "type")]
26748    pub tg_type: String,
26749    #[allow(rustdoc::invalid_html_tags)]
26750    #[doc = "Information about the unique gift"]
26751    #[serde(rename = "gift")]
26752    pub gift: BoxWrapper<Unbox<UniqueGift>>,
26753    pub owned_gift_id: Option<String>,
26754    pub sender_user: Option<BoxWrapper<Unbox<User>>>,
26755    #[allow(rustdoc::invalid_html_tags)]
26756    #[doc = "Date the gift was sent in Unix time"]
26757    #[serde(rename = "send_date")]
26758    pub send_date: i64,
26759    pub is_saved: Option<bool>,
26760    pub can_be_transferred: Option<bool>,
26761    pub transfer_star_count: Option<i64>,
26762    pub next_transfer_date: Option<i64>,
26763}
26764impl From<NoSkipOwnedGiftUnique> for OwnedGiftUnique {
26765    fn from(t: NoSkipOwnedGiftUnique) -> Self {
26766        Self {
26767            tg_type: t.tg_type,
26768            gift: t.gift,
26769            owned_gift_id: t.owned_gift_id,
26770            sender_user: t.sender_user,
26771            send_date: t.send_date,
26772            is_saved: t.is_saved,
26773            can_be_transferred: t.can_be_transferred,
26774            transfer_star_count: t.transfer_star_count,
26775            next_transfer_date: t.next_transfer_date,
26776        }
26777    }
26778}
26779#[allow(clippy::from_over_into)]
26780impl Into<NoSkipOwnedGiftUnique> for OwnedGiftUnique {
26781    fn into(self) -> NoSkipOwnedGiftUnique {
26782        NoSkipOwnedGiftUnique {
26783            tg_type: self.tg_type,
26784            gift: self.gift,
26785            owned_gift_id: self.owned_gift_id,
26786            sender_user: self.sender_user,
26787            send_date: self.send_date,
26788            is_saved: self.is_saved,
26789            can_be_transferred: self.can_be_transferred,
26790            transfer_star_count: self.transfer_star_count,
26791            next_transfer_date: self.next_transfer_date,
26792        }
26793    }
26794}
26795impl NoSkipOwnedGiftUnique {
26796    pub fn skip(self) -> OwnedGiftUnique {
26797        self.into()
26798    }
26799}
26800impl OwnedGiftUnique {
26801    pub fn noskip(self) -> NoSkipOwnedGiftUnique {
26802        self.into()
26803    }
26804}
26805#[allow(rustdoc::invalid_html_tags)]
26806#[doc = "Describes a unique gift received and owned by a user or a chat."]
26807#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26808pub struct OwnedGiftUniqueBuilder {
26809    #[allow(rustdoc::invalid_html_tags)]
26810    #[doc = "Type of the gift, always \"unique\""]
26811    #[serde(rename = "type")]
26812    pub tg_type: String,
26813    #[allow(rustdoc::invalid_html_tags)]
26814    #[doc = "Information about the unique gift"]
26815    #[serde(rename = "gift")]
26816    pub gift: BoxWrapper<Unbox<UniqueGift>>,
26817    #[allow(rustdoc::invalid_html_tags)]
26818    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
26819    #[serde(
26820        skip_serializing_if = "Option::is_none",
26821        rename = "owned_gift_id",
26822        default
26823    )]
26824    pub owned_gift_id: Option<String>,
26825    #[allow(rustdoc::invalid_html_tags)]
26826    #[doc = "Optional. Sender of the gift if it is a known user"]
26827    #[serde(
26828        skip_serializing_if = "Option::is_none",
26829        rename = "sender_user",
26830        default
26831    )]
26832    pub sender_user: Option<BoxWrapper<Unbox<User>>>,
26833    #[allow(rustdoc::invalid_html_tags)]
26834    #[doc = "Date the gift was sent in Unix time"]
26835    #[serde(rename = "send_date")]
26836    pub send_date: i64,
26837    #[allow(rustdoc::invalid_html_tags)]
26838    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
26839    #[serde(skip_serializing_if = "Option::is_none", rename = "is_saved", default)]
26840    pub is_saved: Option<bool>,
26841    #[allow(rustdoc::invalid_html_tags)]
26842    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
26843    #[serde(
26844        skip_serializing_if = "Option::is_none",
26845        rename = "can_be_transferred",
26846        default
26847    )]
26848    pub can_be_transferred: Option<bool>,
26849    #[allow(rustdoc::invalid_html_tags)]
26850    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
26851    #[serde(
26852        skip_serializing_if = "Option::is_none",
26853        rename = "transfer_star_count",
26854        default
26855    )]
26856    pub transfer_star_count: Option<i64>,
26857    #[allow(rustdoc::invalid_html_tags)]
26858    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
26859    #[serde(
26860        skip_serializing_if = "Option::is_none",
26861        rename = "next_transfer_date",
26862        default
26863    )]
26864    pub next_transfer_date: Option<i64>,
26865}
26866impl OwnedGiftUniqueBuilder {
26867    #[allow(clippy::too_many_arguments)]
26868    pub fn new<A: Into<UniqueGift>>(gift: A, send_date: i64) -> Self {
26869        Self {
26870            tg_type: "OwnedGiftUnique".to_owned(),
26871            gift: BoxWrapper::new_unbox(gift.into()),
26872            send_date,
26873            owned_gift_id: None,
26874            sender_user: None,
26875            is_saved: None,
26876            can_be_transferred: None,
26877            transfer_star_count: None,
26878            next_transfer_date: None,
26879        }
26880    }
26881    #[allow(rustdoc::invalid_html_tags)]
26882    #[doc = "Type of the gift, always \"unique\""]
26883    pub fn set_type(mut self, tg_type: String) -> Self {
26884        self.tg_type = tg_type;
26885        self
26886    }
26887    #[allow(rustdoc::invalid_html_tags)]
26888    #[doc = "Information about the unique gift"]
26889    pub fn set_gift(mut self, gift: UniqueGift) -> Self {
26890        self.gift = BoxWrapper(Unbox(gift));
26891        self
26892    }
26893    #[allow(rustdoc::invalid_html_tags)]
26894    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
26895    pub fn set_owned_gift_id(mut self, owned_gift_id: String) -> Self {
26896        self.owned_gift_id = Some(owned_gift_id);
26897        self
26898    }
26899    #[allow(rustdoc::invalid_html_tags)]
26900    #[doc = "Optional. Sender of the gift if it is a known user"]
26901    pub fn set_sender_user(mut self, sender_user: User) -> Self {
26902        self.sender_user = Some(BoxWrapper(Unbox(sender_user)));
26903        self
26904    }
26905    #[allow(rustdoc::invalid_html_tags)]
26906    #[doc = "Date the gift was sent in Unix time"]
26907    pub fn set_send_date(mut self, send_date: i64) -> Self {
26908        self.send_date = send_date;
26909        self
26910    }
26911    #[allow(rustdoc::invalid_html_tags)]
26912    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
26913    pub fn set_is_saved(mut self, is_saved: bool) -> Self {
26914        self.is_saved = Some(is_saved);
26915        self
26916    }
26917    #[allow(rustdoc::invalid_html_tags)]
26918    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
26919    pub fn set_can_be_transferred(mut self, can_be_transferred: bool) -> Self {
26920        self.can_be_transferred = Some(can_be_transferred);
26921        self
26922    }
26923    #[allow(rustdoc::invalid_html_tags)]
26924    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
26925    pub fn set_transfer_star_count(mut self, transfer_star_count: i64) -> Self {
26926        self.transfer_star_count = Some(transfer_star_count);
26927        self
26928    }
26929    #[allow(rustdoc::invalid_html_tags)]
26930    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
26931    pub fn set_next_transfer_date(mut self, next_transfer_date: i64) -> Self {
26932        self.next_transfer_date = Some(next_transfer_date);
26933        self
26934    }
26935    pub fn build(self) -> OwnedGiftUnique {
26936        OwnedGiftUnique {
26937            tg_type: self.tg_type,
26938            gift: self.gift,
26939            owned_gift_id: self.owned_gift_id,
26940            sender_user: self.sender_user,
26941            send_date: self.send_date,
26942            is_saved: self.is_saved,
26943            can_be_transferred: self.can_be_transferred,
26944            transfer_star_count: self.transfer_star_count,
26945            next_transfer_date: self.next_transfer_date,
26946        }
26947    }
26948}
26949#[allow(rustdoc::invalid_html_tags)]
26950#[doc = "The paid media isn't available before the payment."]
26951#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26952pub struct PaidMediaPreview {
26953    #[allow(rustdoc::invalid_html_tags)]
26954    #[doc = "Type of the paid media, always \"preview\""]
26955    #[serde(rename = "type")]
26956    pub tg_type: String,
26957    #[allow(rustdoc::invalid_html_tags)]
26958    #[doc = "Optional. Media width as defined by the sender"]
26959    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
26960    pub width: Option<i64>,
26961    #[allow(rustdoc::invalid_html_tags)]
26962    #[doc = "Optional. Media height as defined by the sender"]
26963    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
26964    pub height: Option<i64>,
26965    #[allow(rustdoc::invalid_html_tags)]
26966    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
26967    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
26968    pub duration: Option<i64>,
26969}
26970#[allow(rustdoc::invalid_html_tags)]
26971#[doc = "Companion type to PaidMediaPreview that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
26972#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26973pub struct NoSkipPaidMediaPreview {
26974    #[allow(rustdoc::invalid_html_tags)]
26975    #[doc = "Type of the paid media, always \"preview\""]
26976    #[serde(rename = "type")]
26977    pub tg_type: String,
26978    pub width: Option<i64>,
26979    pub height: Option<i64>,
26980    pub duration: Option<i64>,
26981}
26982impl From<NoSkipPaidMediaPreview> for PaidMediaPreview {
26983    fn from(t: NoSkipPaidMediaPreview) -> Self {
26984        Self {
26985            tg_type: t.tg_type,
26986            width: t.width,
26987            height: t.height,
26988            duration: t.duration,
26989        }
26990    }
26991}
26992#[allow(clippy::from_over_into)]
26993impl Into<NoSkipPaidMediaPreview> for PaidMediaPreview {
26994    fn into(self) -> NoSkipPaidMediaPreview {
26995        NoSkipPaidMediaPreview {
26996            tg_type: self.tg_type,
26997            width: self.width,
26998            height: self.height,
26999            duration: self.duration,
27000        }
27001    }
27002}
27003impl NoSkipPaidMediaPreview {
27004    pub fn skip(self) -> PaidMediaPreview {
27005        self.into()
27006    }
27007}
27008impl PaidMediaPreview {
27009    pub fn noskip(self) -> NoSkipPaidMediaPreview {
27010        self.into()
27011    }
27012}
27013#[allow(rustdoc::invalid_html_tags)]
27014#[doc = "The paid media isn't available before the payment."]
27015#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27016pub struct PaidMediaPreviewBuilder {
27017    #[allow(rustdoc::invalid_html_tags)]
27018    #[doc = "Type of the paid media, always \"preview\""]
27019    #[serde(rename = "type")]
27020    pub tg_type: String,
27021    #[allow(rustdoc::invalid_html_tags)]
27022    #[doc = "Optional. Media width as defined by the sender"]
27023    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
27024    pub width: Option<i64>,
27025    #[allow(rustdoc::invalid_html_tags)]
27026    #[doc = "Optional. Media height as defined by the sender"]
27027    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
27028    pub height: Option<i64>,
27029    #[allow(rustdoc::invalid_html_tags)]
27030    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
27031    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
27032    pub duration: Option<i64>,
27033}
27034impl PaidMediaPreviewBuilder {
27035    #[allow(clippy::too_many_arguments)]
27036    pub fn new() -> Self {
27037        Self {
27038            tg_type: "PaidMediaPreview".to_owned(),
27039            width: None,
27040            height: None,
27041            duration: None,
27042        }
27043    }
27044    #[allow(rustdoc::invalid_html_tags)]
27045    #[doc = "Type of the paid media, always \"preview\""]
27046    pub fn set_type(mut self, tg_type: String) -> Self {
27047        self.tg_type = tg_type;
27048        self
27049    }
27050    #[allow(rustdoc::invalid_html_tags)]
27051    #[doc = "Optional. Media width as defined by the sender"]
27052    pub fn set_width(mut self, width: i64) -> Self {
27053        self.width = Some(width);
27054        self
27055    }
27056    #[allow(rustdoc::invalid_html_tags)]
27057    #[doc = "Optional. Media height as defined by the sender"]
27058    pub fn set_height(mut self, height: i64) -> Self {
27059        self.height = Some(height);
27060        self
27061    }
27062    #[allow(rustdoc::invalid_html_tags)]
27063    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
27064    pub fn set_duration(mut self, duration: i64) -> Self {
27065        self.duration = Some(duration);
27066        self
27067    }
27068    pub fn build(self) -> PaidMediaPreview {
27069        PaidMediaPreview {
27070            tg_type: self.tg_type,
27071            width: self.width,
27072            height: self.height,
27073            duration: self.duration,
27074        }
27075    }
27076}
27077#[allow(rustdoc::invalid_html_tags)]
27078#[doc = "Represents the content of a text message to be sent as the result of an inline query."]
27079#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27080pub struct InputTextMessageContent {
27081    #[allow(rustdoc::invalid_html_tags)]
27082    #[doc = "Text of the message to be sent, 1-4096 characters"]
27083    #[serde(rename = "message_text")]
27084    pub message_text: String,
27085    #[allow(rustdoc::invalid_html_tags)]
27086    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
27087    #[serde(
27088        skip_serializing_if = "Option::is_none",
27089        rename = "parse_mode",
27090        default
27091    )]
27092    pub parse_mode: Option<String>,
27093    #[allow(rustdoc::invalid_html_tags)]
27094    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
27095    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
27096    pub entities: Option<Vec<MessageEntity>>,
27097    #[allow(rustdoc::invalid_html_tags)]
27098    #[doc = "Optional. Link preview generation options for the message"]
27099    #[serde(
27100        skip_serializing_if = "Option::is_none",
27101        rename = "link_preview_options",
27102        default
27103    )]
27104    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
27105}
27106#[allow(rustdoc::invalid_html_tags)]
27107#[doc = "Companion type to InputTextMessageContent that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
27108#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27109pub struct NoSkipInputTextMessageContent {
27110    #[allow(rustdoc::invalid_html_tags)]
27111    #[doc = "Text of the message to be sent, 1-4096 characters"]
27112    #[serde(rename = "message_text")]
27113    pub message_text: String,
27114    pub parse_mode: Option<String>,
27115    pub entities: Option<Vec<MessageEntity>>,
27116    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
27117}
27118impl From<NoSkipInputTextMessageContent> for InputTextMessageContent {
27119    fn from(t: NoSkipInputTextMessageContent) -> Self {
27120        Self {
27121            message_text: t.message_text,
27122            parse_mode: t.parse_mode,
27123            entities: t.entities,
27124            link_preview_options: t.link_preview_options,
27125        }
27126    }
27127}
27128#[allow(clippy::from_over_into)]
27129impl Into<NoSkipInputTextMessageContent> for InputTextMessageContent {
27130    fn into(self) -> NoSkipInputTextMessageContent {
27131        NoSkipInputTextMessageContent {
27132            message_text: self.message_text,
27133            parse_mode: self.parse_mode,
27134            entities: self.entities,
27135            link_preview_options: self.link_preview_options,
27136        }
27137    }
27138}
27139impl NoSkipInputTextMessageContent {
27140    pub fn skip(self) -> InputTextMessageContent {
27141        self.into()
27142    }
27143}
27144impl InputTextMessageContent {
27145    pub fn noskip(self) -> NoSkipInputTextMessageContent {
27146        self.into()
27147    }
27148}
27149#[allow(rustdoc::invalid_html_tags)]
27150#[doc = "Represents the content of a text message to be sent as the result of an inline query."]
27151#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27152pub struct InputTextMessageContentBuilder {
27153    #[allow(rustdoc::invalid_html_tags)]
27154    #[doc = "Text of the message to be sent, 1-4096 characters"]
27155    #[serde(rename = "message_text")]
27156    pub message_text: String,
27157    #[allow(rustdoc::invalid_html_tags)]
27158    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
27159    #[serde(
27160        skip_serializing_if = "Option::is_none",
27161        rename = "parse_mode",
27162        default
27163    )]
27164    pub parse_mode: Option<String>,
27165    #[allow(rustdoc::invalid_html_tags)]
27166    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
27167    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
27168    pub entities: Option<Vec<MessageEntity>>,
27169    #[allow(rustdoc::invalid_html_tags)]
27170    #[doc = "Optional. Link preview generation options for the message"]
27171    #[serde(
27172        skip_serializing_if = "Option::is_none",
27173        rename = "link_preview_options",
27174        default
27175    )]
27176    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
27177}
27178impl InputTextMessageContentBuilder {
27179    #[allow(clippy::too_many_arguments)]
27180    pub fn new(message_text: String) -> Self {
27181        Self {
27182            message_text,
27183            parse_mode: None,
27184            entities: None,
27185            link_preview_options: None,
27186        }
27187    }
27188    #[allow(rustdoc::invalid_html_tags)]
27189    #[doc = "Text of the message to be sent, 1-4096 characters"]
27190    pub fn set_message_text(mut self, message_text: String) -> Self {
27191        self.message_text = message_text;
27192        self
27193    }
27194    #[allow(rustdoc::invalid_html_tags)]
27195    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
27196    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
27197        self.parse_mode = Some(parse_mode);
27198        self
27199    }
27200    #[allow(rustdoc::invalid_html_tags)]
27201    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
27202    pub fn set_entities(mut self, entities: Vec<MessageEntity>) -> Self {
27203        self.entities = Some(entities);
27204        self
27205    }
27206    #[allow(rustdoc::invalid_html_tags)]
27207    #[doc = "Optional. Link preview generation options for the message"]
27208    pub fn set_link_preview_options(mut self, link_preview_options: LinkPreviewOptions) -> Self {
27209        self.link_preview_options = Some(BoxWrapper(Unbox(link_preview_options)));
27210        self
27211    }
27212    pub fn build(self) -> InputTextMessageContent {
27213        InputTextMessageContent {
27214            message_text: self.message_text,
27215            parse_mode: self.parse_mode,
27216            entities: self.entities,
27217            link_preview_options: self.link_preview_options,
27218        }
27219    }
27220}
27221#[allow(rustdoc::invalid_html_tags)]
27222#[doc = "Represents the scope of bot commands, covering all private chats."]
27223#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27224pub struct BotCommandScopeAllPrivateChats {
27225    #[allow(rustdoc::invalid_html_tags)]
27226    #[doc = "Scope type, must be all_private_chats"]
27227    #[serde(rename = "type")]
27228    pub tg_type: String,
27229}
27230#[allow(rustdoc::invalid_html_tags)]
27231#[doc = "Companion type to BotCommandScopeAllPrivateChats that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
27232#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27233pub struct NoSkipBotCommandScopeAllPrivateChats {
27234    #[allow(rustdoc::invalid_html_tags)]
27235    #[doc = "Scope type, must be all_private_chats"]
27236    #[serde(rename = "type")]
27237    pub tg_type: String,
27238}
27239impl From<NoSkipBotCommandScopeAllPrivateChats> for BotCommandScopeAllPrivateChats {
27240    fn from(t: NoSkipBotCommandScopeAllPrivateChats) -> Self {
27241        Self { tg_type: t.tg_type }
27242    }
27243}
27244#[allow(clippy::from_over_into)]
27245impl Into<NoSkipBotCommandScopeAllPrivateChats> for BotCommandScopeAllPrivateChats {
27246    fn into(self) -> NoSkipBotCommandScopeAllPrivateChats {
27247        NoSkipBotCommandScopeAllPrivateChats {
27248            tg_type: self.tg_type,
27249        }
27250    }
27251}
27252impl NoSkipBotCommandScopeAllPrivateChats {
27253    pub fn skip(self) -> BotCommandScopeAllPrivateChats {
27254        self.into()
27255    }
27256}
27257impl BotCommandScopeAllPrivateChats {
27258    pub fn noskip(self) -> NoSkipBotCommandScopeAllPrivateChats {
27259        self.into()
27260    }
27261}
27262#[allow(rustdoc::invalid_html_tags)]
27263#[doc = "Represents the scope of bot commands, covering all private chats."]
27264#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27265pub struct BotCommandScopeAllPrivateChatsBuilder {
27266    #[allow(rustdoc::invalid_html_tags)]
27267    #[doc = "Scope type, must be all_private_chats"]
27268    #[serde(rename = "type")]
27269    pub tg_type: String,
27270}
27271impl BotCommandScopeAllPrivateChatsBuilder {
27272    #[allow(clippy::too_many_arguments)]
27273    pub fn new() -> Self {
27274        Self {
27275            tg_type: "all_private_chats".to_owned(),
27276        }
27277    }
27278    #[allow(rustdoc::invalid_html_tags)]
27279    #[doc = "Scope type, must be all_private_chats"]
27280    pub fn set_type(mut self, tg_type: String) -> Self {
27281        self.tg_type = tg_type;
27282        self
27283    }
27284    pub fn build(self) -> BotCommandScopeAllPrivateChats {
27285        BotCommandScopeAllPrivateChats {
27286            tg_type: self.tg_type,
27287        }
27288    }
27289}
27290#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27291#[serde(untagged)]
27292pub enum InlineQueryResult {
27293    InlineQueryResultCachedAudio(InlineQueryResultCachedAudio),
27294    InlineQueryResultCachedDocument(InlineQueryResultCachedDocument),
27295    InlineQueryResultCachedGif(InlineQueryResultCachedGif),
27296    InlineQueryResultCachedMpeg4Gif(InlineQueryResultCachedMpeg4Gif),
27297    InlineQueryResultCachedPhoto(InlineQueryResultCachedPhoto),
27298    InlineQueryResultCachedSticker(InlineQueryResultCachedSticker),
27299    InlineQueryResultCachedVideo(InlineQueryResultCachedVideo),
27300    InlineQueryResultCachedVoice(InlineQueryResultCachedVoice),
27301    InlineQueryResultArticle(InlineQueryResultArticle),
27302    InlineQueryResultAudio(InlineQueryResultAudio),
27303    InlineQueryResultContact(InlineQueryResultContact),
27304    InlineQueryResultGame(InlineQueryResultGame),
27305    InlineQueryResultDocument(InlineQueryResultDocument),
27306    InlineQueryResultGif(InlineQueryResultGif),
27307    InlineQueryResultLocation(InlineQueryResultLocation),
27308    InlineQueryResultMpeg4Gif(InlineQueryResultMpeg4Gif),
27309    InlineQueryResultPhoto(InlineQueryResultPhoto),
27310    InlineQueryResultVenue(InlineQueryResultVenue),
27311    InlineQueryResultVideo(InlineQueryResultVideo),
27312    InlineQueryResultVoice(InlineQueryResultVoice),
27313}
27314impl Default for InlineQueryResult {
27315    fn default() -> Self {
27316        InlineQueryResult::InlineQueryResultCachedAudio(InlineQueryResultCachedAudio::default())
27317    }
27318}
27319impl InlineQueryResult {
27320    #[allow(rustdoc::invalid_html_tags)]
27321    #[doc = "Optional. Inline keyboard attached to the message"]
27322    #[allow(clippy::needless_lifetimes)]
27323    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
27324        match self {
27325            Self::InlineQueryResultCachedAudio(ref v) => v.get_reply_markup(),
27326            Self::InlineQueryResultCachedDocument(ref v) => v.get_reply_markup(),
27327            Self::InlineQueryResultCachedGif(ref v) => v.get_reply_markup(),
27328            Self::InlineQueryResultCachedMpeg4Gif(ref v) => v.get_reply_markup(),
27329            Self::InlineQueryResultCachedPhoto(ref v) => v.get_reply_markup(),
27330            Self::InlineQueryResultCachedSticker(ref v) => v.get_reply_markup(),
27331            Self::InlineQueryResultCachedVideo(ref v) => v.get_reply_markup(),
27332            Self::InlineQueryResultCachedVoice(ref v) => v.get_reply_markup(),
27333            Self::InlineQueryResultArticle(ref v) => v.get_reply_markup(),
27334            Self::InlineQueryResultAudio(ref v) => v.get_reply_markup(),
27335            Self::InlineQueryResultContact(ref v) => v.get_reply_markup(),
27336            Self::InlineQueryResultGame(ref v) => v.get_reply_markup(),
27337            Self::InlineQueryResultDocument(ref v) => v.get_reply_markup(),
27338            Self::InlineQueryResultGif(ref v) => v.get_reply_markup(),
27339            Self::InlineQueryResultLocation(ref v) => v.get_reply_markup(),
27340            Self::InlineQueryResultMpeg4Gif(ref v) => v.get_reply_markup(),
27341            Self::InlineQueryResultPhoto(ref v) => v.get_reply_markup(),
27342            Self::InlineQueryResultVenue(ref v) => v.get_reply_markup(),
27343            Self::InlineQueryResultVideo(ref v) => v.get_reply_markup(),
27344            Self::InlineQueryResultVoice(ref v) => v.get_reply_markup(),
27345        }
27346    }
27347}
27348#[allow(rustdoc::invalid_html_tags)]
27349#[doc = "This object represents a voice note."]
27350#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27351pub struct Voice {
27352    #[allow(rustdoc::invalid_html_tags)]
27353    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
27354    #[serde(rename = "file_id")]
27355    pub file_id: String,
27356    #[allow(rustdoc::invalid_html_tags)]
27357    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
27358    #[serde(rename = "file_unique_id")]
27359    pub file_unique_id: String,
27360    #[allow(rustdoc::invalid_html_tags)]
27361    #[doc = "Duration of the audio in seconds as defined by the sender"]
27362    #[serde(rename = "duration")]
27363    pub duration: i64,
27364    #[allow(rustdoc::invalid_html_tags)]
27365    #[doc = "Optional. MIME type of the file as defined by the sender"]
27366    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
27367    pub mime_type: Option<String>,
27368    #[allow(rustdoc::invalid_html_tags)]
27369    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
27370    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
27371    pub file_size: Option<i64>,
27372}
27373#[allow(rustdoc::invalid_html_tags)]
27374#[doc = "Companion type to Voice that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
27375#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27376pub struct NoSkipVoice {
27377    #[allow(rustdoc::invalid_html_tags)]
27378    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
27379    #[serde(rename = "file_id")]
27380    pub file_id: String,
27381    #[allow(rustdoc::invalid_html_tags)]
27382    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
27383    #[serde(rename = "file_unique_id")]
27384    pub file_unique_id: String,
27385    #[allow(rustdoc::invalid_html_tags)]
27386    #[doc = "Duration of the audio in seconds as defined by the sender"]
27387    #[serde(rename = "duration")]
27388    pub duration: i64,
27389    pub mime_type: Option<String>,
27390    pub file_size: Option<i64>,
27391}
27392impl From<NoSkipVoice> for Voice {
27393    fn from(t: NoSkipVoice) -> Self {
27394        Self {
27395            file_id: t.file_id,
27396            file_unique_id: t.file_unique_id,
27397            duration: t.duration,
27398            mime_type: t.mime_type,
27399            file_size: t.file_size,
27400        }
27401    }
27402}
27403#[allow(clippy::from_over_into)]
27404impl Into<NoSkipVoice> for Voice {
27405    fn into(self) -> NoSkipVoice {
27406        NoSkipVoice {
27407            file_id: self.file_id,
27408            file_unique_id: self.file_unique_id,
27409            duration: self.duration,
27410            mime_type: self.mime_type,
27411            file_size: self.file_size,
27412        }
27413    }
27414}
27415impl NoSkipVoice {
27416    pub fn skip(self) -> Voice {
27417        self.into()
27418    }
27419}
27420impl Voice {
27421    pub fn noskip(self) -> NoSkipVoice {
27422        self.into()
27423    }
27424}
27425#[allow(rustdoc::invalid_html_tags)]
27426#[doc = "This object represents a voice note."]
27427#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27428pub struct VoiceBuilder {
27429    #[allow(rustdoc::invalid_html_tags)]
27430    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
27431    #[serde(rename = "file_id")]
27432    pub file_id: String,
27433    #[allow(rustdoc::invalid_html_tags)]
27434    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
27435    #[serde(rename = "file_unique_id")]
27436    pub file_unique_id: String,
27437    #[allow(rustdoc::invalid_html_tags)]
27438    #[doc = "Duration of the audio in seconds as defined by the sender"]
27439    #[serde(rename = "duration")]
27440    pub duration: i64,
27441    #[allow(rustdoc::invalid_html_tags)]
27442    #[doc = "Optional. MIME type of the file as defined by the sender"]
27443    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
27444    pub mime_type: Option<String>,
27445    #[allow(rustdoc::invalid_html_tags)]
27446    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
27447    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
27448    pub file_size: Option<i64>,
27449}
27450impl VoiceBuilder {
27451    #[allow(clippy::too_many_arguments)]
27452    pub fn new(file_id: String, file_unique_id: String, duration: i64) -> Self {
27453        Self {
27454            file_id,
27455            file_unique_id,
27456            duration,
27457            mime_type: None,
27458            file_size: None,
27459        }
27460    }
27461    #[allow(rustdoc::invalid_html_tags)]
27462    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
27463    pub fn set_file_id(mut self, file_id: String) -> Self {
27464        self.file_id = file_id;
27465        self
27466    }
27467    #[allow(rustdoc::invalid_html_tags)]
27468    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
27469    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
27470        self.file_unique_id = file_unique_id;
27471        self
27472    }
27473    #[allow(rustdoc::invalid_html_tags)]
27474    #[doc = "Duration of the audio in seconds as defined by the sender"]
27475    pub fn set_duration(mut self, duration: i64) -> Self {
27476        self.duration = duration;
27477        self
27478    }
27479    #[allow(rustdoc::invalid_html_tags)]
27480    #[doc = "Optional. MIME type of the file as defined by the sender"]
27481    pub fn set_mime_type(mut self, mime_type: String) -> Self {
27482        self.mime_type = Some(mime_type);
27483        self
27484    }
27485    #[allow(rustdoc::invalid_html_tags)]
27486    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
27487    pub fn set_file_size(mut self, file_size: i64) -> Self {
27488        self.file_size = Some(file_size);
27489        self
27490    }
27491    pub fn build(self) -> Voice {
27492        Voice {
27493            file_id: self.file_id,
27494            file_unique_id: self.file_unique_id,
27495            duration: self.duration,
27496            mime_type: self.mime_type,
27497            file_size: self.file_size,
27498        }
27499    }
27500}
27501#[allow(rustdoc::invalid_html_tags)]
27502#[doc = "This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users: https://core.telegram.org/bots/features#chat-and-user-selection"]
27503#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27504pub struct KeyboardButtonRequestUsers {
27505    #[allow(rustdoc::invalid_html_tags)]
27506    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
27507    #[serde(rename = "request_id")]
27508    pub request_id: i64,
27509    #[allow(rustdoc::invalid_html_tags)]
27510    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
27511    #[serde(
27512        skip_serializing_if = "Option::is_none",
27513        rename = "user_is_bot",
27514        default
27515    )]
27516    pub user_is_bot: Option<bool>,
27517    #[allow(rustdoc::invalid_html_tags)]
27518    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
27519    #[serde(
27520        skip_serializing_if = "Option::is_none",
27521        rename = "user_is_premium",
27522        default
27523    )]
27524    pub user_is_premium: Option<bool>,
27525    #[allow(rustdoc::invalid_html_tags)]
27526    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
27527    #[serde(
27528        skip_serializing_if = "Option::is_none",
27529        rename = "max_quantity",
27530        default
27531    )]
27532    pub max_quantity: Option<i64>,
27533    #[allow(rustdoc::invalid_html_tags)]
27534    #[doc = "Optional. Pass True to request the users' first and last names"]
27535    #[serde(
27536        skip_serializing_if = "Option::is_none",
27537        rename = "request_name",
27538        default
27539    )]
27540    pub request_name: Option<bool>,
27541    #[allow(rustdoc::invalid_html_tags)]
27542    #[doc = "Optional. Pass True to request the users' usernames"]
27543    #[serde(
27544        skip_serializing_if = "Option::is_none",
27545        rename = "request_username",
27546        default
27547    )]
27548    pub request_username: Option<bool>,
27549    #[allow(rustdoc::invalid_html_tags)]
27550    #[doc = "Optional. Pass True to request the users' photos"]
27551    #[serde(
27552        skip_serializing_if = "Option::is_none",
27553        rename = "request_photo",
27554        default
27555    )]
27556    pub request_photo: Option<bool>,
27557}
27558#[allow(rustdoc::invalid_html_tags)]
27559#[doc = "Companion type to KeyboardButtonRequestUsers that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
27560#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27561pub struct NoSkipKeyboardButtonRequestUsers {
27562    #[allow(rustdoc::invalid_html_tags)]
27563    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
27564    #[serde(rename = "request_id")]
27565    pub request_id: i64,
27566    pub user_is_bot: Option<bool>,
27567    pub user_is_premium: Option<bool>,
27568    pub max_quantity: Option<i64>,
27569    pub request_name: Option<bool>,
27570    pub request_username: Option<bool>,
27571    pub request_photo: Option<bool>,
27572}
27573impl From<NoSkipKeyboardButtonRequestUsers> for KeyboardButtonRequestUsers {
27574    fn from(t: NoSkipKeyboardButtonRequestUsers) -> Self {
27575        Self {
27576            request_id: t.request_id,
27577            user_is_bot: t.user_is_bot,
27578            user_is_premium: t.user_is_premium,
27579            max_quantity: t.max_quantity,
27580            request_name: t.request_name,
27581            request_username: t.request_username,
27582            request_photo: t.request_photo,
27583        }
27584    }
27585}
27586#[allow(clippy::from_over_into)]
27587impl Into<NoSkipKeyboardButtonRequestUsers> for KeyboardButtonRequestUsers {
27588    fn into(self) -> NoSkipKeyboardButtonRequestUsers {
27589        NoSkipKeyboardButtonRequestUsers {
27590            request_id: self.request_id,
27591            user_is_bot: self.user_is_bot,
27592            user_is_premium: self.user_is_premium,
27593            max_quantity: self.max_quantity,
27594            request_name: self.request_name,
27595            request_username: self.request_username,
27596            request_photo: self.request_photo,
27597        }
27598    }
27599}
27600impl NoSkipKeyboardButtonRequestUsers {
27601    pub fn skip(self) -> KeyboardButtonRequestUsers {
27602        self.into()
27603    }
27604}
27605impl KeyboardButtonRequestUsers {
27606    pub fn noskip(self) -> NoSkipKeyboardButtonRequestUsers {
27607        self.into()
27608    }
27609}
27610#[allow(rustdoc::invalid_html_tags)]
27611#[doc = "This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users: https://core.telegram.org/bots/features#chat-and-user-selection"]
27612#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27613pub struct KeyboardButtonRequestUsersBuilder {
27614    #[allow(rustdoc::invalid_html_tags)]
27615    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
27616    #[serde(rename = "request_id")]
27617    pub request_id: i64,
27618    #[allow(rustdoc::invalid_html_tags)]
27619    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
27620    #[serde(
27621        skip_serializing_if = "Option::is_none",
27622        rename = "user_is_bot",
27623        default
27624    )]
27625    pub user_is_bot: Option<bool>,
27626    #[allow(rustdoc::invalid_html_tags)]
27627    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
27628    #[serde(
27629        skip_serializing_if = "Option::is_none",
27630        rename = "user_is_premium",
27631        default
27632    )]
27633    pub user_is_premium: Option<bool>,
27634    #[allow(rustdoc::invalid_html_tags)]
27635    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
27636    #[serde(
27637        skip_serializing_if = "Option::is_none",
27638        rename = "max_quantity",
27639        default
27640    )]
27641    pub max_quantity: Option<i64>,
27642    #[allow(rustdoc::invalid_html_tags)]
27643    #[doc = "Optional. Pass True to request the users' first and last names"]
27644    #[serde(
27645        skip_serializing_if = "Option::is_none",
27646        rename = "request_name",
27647        default
27648    )]
27649    pub request_name: Option<bool>,
27650    #[allow(rustdoc::invalid_html_tags)]
27651    #[doc = "Optional. Pass True to request the users' usernames"]
27652    #[serde(
27653        skip_serializing_if = "Option::is_none",
27654        rename = "request_username",
27655        default
27656    )]
27657    pub request_username: Option<bool>,
27658    #[allow(rustdoc::invalid_html_tags)]
27659    #[doc = "Optional. Pass True to request the users' photos"]
27660    #[serde(
27661        skip_serializing_if = "Option::is_none",
27662        rename = "request_photo",
27663        default
27664    )]
27665    pub request_photo: Option<bool>,
27666}
27667impl KeyboardButtonRequestUsersBuilder {
27668    #[allow(clippy::too_many_arguments)]
27669    pub fn new(request_id: i64) -> Self {
27670        Self {
27671            request_id,
27672            user_is_bot: None,
27673            user_is_premium: None,
27674            max_quantity: None,
27675            request_name: None,
27676            request_username: None,
27677            request_photo: None,
27678        }
27679    }
27680    #[allow(rustdoc::invalid_html_tags)]
27681    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
27682    pub fn set_request_id(mut self, request_id: i64) -> Self {
27683        self.request_id = request_id;
27684        self
27685    }
27686    #[allow(rustdoc::invalid_html_tags)]
27687    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
27688    pub fn set_user_is_bot(mut self, user_is_bot: bool) -> Self {
27689        self.user_is_bot = Some(user_is_bot);
27690        self
27691    }
27692    #[allow(rustdoc::invalid_html_tags)]
27693    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
27694    pub fn set_user_is_premium(mut self, user_is_premium: bool) -> Self {
27695        self.user_is_premium = Some(user_is_premium);
27696        self
27697    }
27698    #[allow(rustdoc::invalid_html_tags)]
27699    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
27700    pub fn set_max_quantity(mut self, max_quantity: i64) -> Self {
27701        self.max_quantity = Some(max_quantity);
27702        self
27703    }
27704    #[allow(rustdoc::invalid_html_tags)]
27705    #[doc = "Optional. Pass True to request the users' first and last names"]
27706    pub fn set_request_name(mut self, request_name: bool) -> Self {
27707        self.request_name = Some(request_name);
27708        self
27709    }
27710    #[allow(rustdoc::invalid_html_tags)]
27711    #[doc = "Optional. Pass True to request the users' usernames"]
27712    pub fn set_request_username(mut self, request_username: bool) -> Self {
27713        self.request_username = Some(request_username);
27714        self
27715    }
27716    #[allow(rustdoc::invalid_html_tags)]
27717    #[doc = "Optional. Pass True to request the users' photos"]
27718    pub fn set_request_photo(mut self, request_photo: bool) -> Self {
27719        self.request_photo = Some(request_photo);
27720        self
27721    }
27722    pub fn build(self) -> KeyboardButtonRequestUsers {
27723        KeyboardButtonRequestUsers {
27724            request_id: self.request_id,
27725            user_is_bot: self.user_is_bot,
27726            user_is_premium: self.user_is_premium,
27727            max_quantity: self.max_quantity,
27728            request_name: self.request_name,
27729            request_username: self.request_username,
27730            request_photo: self.request_photo,
27731        }
27732    }
27733}
27734#[allow(rustdoc::invalid_html_tags)]
27735#[doc = "Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location."]
27736#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27737pub struct InlineQueryResultLocation {
27738    #[allow(rustdoc::invalid_html_tags)]
27739    #[doc = "Type of the result, must be location"]
27740    #[serde(rename = "type")]
27741    pub tg_type: String,
27742    #[allow(rustdoc::invalid_html_tags)]
27743    #[doc = "Unique identifier for this result, 1-64 Bytes"]
27744    #[serde(rename = "id")]
27745    pub id: String,
27746    #[allow(rustdoc::invalid_html_tags)]
27747    #[doc = "Location latitude in degrees"]
27748    #[serde(rename = "latitude")]
27749    pub latitude: ::ordered_float::OrderedFloat<f64>,
27750    #[allow(rustdoc::invalid_html_tags)]
27751    #[doc = "Location longitude in degrees"]
27752    #[serde(rename = "longitude")]
27753    pub longitude: ::ordered_float::OrderedFloat<f64>,
27754    #[allow(rustdoc::invalid_html_tags)]
27755    #[doc = "Location title"]
27756    #[serde(rename = "title")]
27757    pub title: String,
27758    #[allow(rustdoc::invalid_html_tags)]
27759    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
27760    #[serde(
27761        skip_serializing_if = "Option::is_none",
27762        rename = "horizontal_accuracy",
27763        default
27764    )]
27765    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
27766    #[allow(rustdoc::invalid_html_tags)]
27767    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
27768    #[serde(
27769        skip_serializing_if = "Option::is_none",
27770        rename = "live_period",
27771        default
27772    )]
27773    pub live_period: Option<i64>,
27774    #[allow(rustdoc::invalid_html_tags)]
27775    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
27776    #[serde(skip_serializing_if = "Option::is_none", rename = "heading", default)]
27777    pub heading: Option<i64>,
27778    #[allow(rustdoc::invalid_html_tags)]
27779    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
27780    #[serde(
27781        skip_serializing_if = "Option::is_none",
27782        rename = "proximity_alert_radius",
27783        default
27784    )]
27785    pub proximity_alert_radius: Option<i64>,
27786    #[allow(rustdoc::invalid_html_tags)]
27787    #[doc = "Optional. Inline keyboard attached to the message"]
27788    #[serde(
27789        skip_serializing_if = "Option::is_none",
27790        rename = "reply_markup",
27791        default
27792    )]
27793    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
27794    #[allow(rustdoc::invalid_html_tags)]
27795    #[doc = "Optional. Content of the message to be sent instead of the location"]
27796    #[serde(
27797        skip_serializing_if = "Option::is_none",
27798        rename = "input_message_content",
27799        default
27800    )]
27801    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
27802    #[allow(rustdoc::invalid_html_tags)]
27803    #[doc = "Optional. Url of the thumbnail for the result"]
27804    #[serde(
27805        skip_serializing_if = "Option::is_none",
27806        rename = "thumbnail_url",
27807        default
27808    )]
27809    pub thumbnail_url: Option<String>,
27810    #[allow(rustdoc::invalid_html_tags)]
27811    #[doc = "Optional. Thumbnail width"]
27812    #[serde(
27813        skip_serializing_if = "Option::is_none",
27814        rename = "thumbnail_width",
27815        default
27816    )]
27817    pub thumbnail_width: Option<i64>,
27818    #[allow(rustdoc::invalid_html_tags)]
27819    #[doc = "Optional. Thumbnail height"]
27820    #[serde(
27821        skip_serializing_if = "Option::is_none",
27822        rename = "thumbnail_height",
27823        default
27824    )]
27825    pub thumbnail_height: Option<i64>,
27826}
27827#[allow(rustdoc::invalid_html_tags)]
27828#[doc = "Companion type to InlineQueryResultLocation that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
27829#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27830pub struct NoSkipInlineQueryResultLocation {
27831    #[allow(rustdoc::invalid_html_tags)]
27832    #[doc = "Type of the result, must be location"]
27833    #[serde(rename = "type")]
27834    pub tg_type: String,
27835    #[allow(rustdoc::invalid_html_tags)]
27836    #[doc = "Unique identifier for this result, 1-64 Bytes"]
27837    #[serde(rename = "id")]
27838    pub id: String,
27839    #[allow(rustdoc::invalid_html_tags)]
27840    #[doc = "Location latitude in degrees"]
27841    #[serde(rename = "latitude")]
27842    pub latitude: ::ordered_float::OrderedFloat<f64>,
27843    #[allow(rustdoc::invalid_html_tags)]
27844    #[doc = "Location longitude in degrees"]
27845    #[serde(rename = "longitude")]
27846    pub longitude: ::ordered_float::OrderedFloat<f64>,
27847    #[allow(rustdoc::invalid_html_tags)]
27848    #[doc = "Location title"]
27849    #[serde(rename = "title")]
27850    pub title: String,
27851    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
27852    pub live_period: Option<i64>,
27853    pub heading: Option<i64>,
27854    pub proximity_alert_radius: Option<i64>,
27855    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
27856    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
27857    pub thumbnail_url: Option<String>,
27858    pub thumbnail_width: Option<i64>,
27859    pub thumbnail_height: Option<i64>,
27860}
27861impl From<NoSkipInlineQueryResultLocation> for InlineQueryResultLocation {
27862    fn from(t: NoSkipInlineQueryResultLocation) -> Self {
27863        Self {
27864            tg_type: t.tg_type,
27865            id: t.id,
27866            latitude: t.latitude,
27867            longitude: t.longitude,
27868            title: t.title,
27869            horizontal_accuracy: t.horizontal_accuracy,
27870            live_period: t.live_period,
27871            heading: t.heading,
27872            proximity_alert_radius: t.proximity_alert_radius,
27873            reply_markup: t.reply_markup,
27874            input_message_content: t.input_message_content,
27875            thumbnail_url: t.thumbnail_url,
27876            thumbnail_width: t.thumbnail_width,
27877            thumbnail_height: t.thumbnail_height,
27878        }
27879    }
27880}
27881#[allow(clippy::from_over_into)]
27882impl Into<NoSkipInlineQueryResultLocation> for InlineQueryResultLocation {
27883    fn into(self) -> NoSkipInlineQueryResultLocation {
27884        NoSkipInlineQueryResultLocation {
27885            tg_type: self.tg_type,
27886            id: self.id,
27887            latitude: self.latitude,
27888            longitude: self.longitude,
27889            title: self.title,
27890            horizontal_accuracy: self.horizontal_accuracy,
27891            live_period: self.live_period,
27892            heading: self.heading,
27893            proximity_alert_radius: self.proximity_alert_radius,
27894            reply_markup: self.reply_markup,
27895            input_message_content: self.input_message_content,
27896            thumbnail_url: self.thumbnail_url,
27897            thumbnail_width: self.thumbnail_width,
27898            thumbnail_height: self.thumbnail_height,
27899        }
27900    }
27901}
27902impl NoSkipInlineQueryResultLocation {
27903    pub fn skip(self) -> InlineQueryResultLocation {
27904        self.into()
27905    }
27906}
27907impl InlineQueryResultLocation {
27908    pub fn noskip(self) -> NoSkipInlineQueryResultLocation {
27909        self.into()
27910    }
27911}
27912#[allow(rustdoc::invalid_html_tags)]
27913#[doc = "Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location."]
27914#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
27915pub struct InlineQueryResultLocationBuilder {
27916    #[allow(rustdoc::invalid_html_tags)]
27917    #[doc = "Type of the result, must be location"]
27918    #[serde(rename = "type")]
27919    pub tg_type: String,
27920    #[allow(rustdoc::invalid_html_tags)]
27921    #[doc = "Unique identifier for this result, 1-64 Bytes"]
27922    #[serde(rename = "id")]
27923    pub id: String,
27924    #[allow(rustdoc::invalid_html_tags)]
27925    #[doc = "Location latitude in degrees"]
27926    #[serde(rename = "latitude")]
27927    pub latitude: ::ordered_float::OrderedFloat<f64>,
27928    #[allow(rustdoc::invalid_html_tags)]
27929    #[doc = "Location longitude in degrees"]
27930    #[serde(rename = "longitude")]
27931    pub longitude: ::ordered_float::OrderedFloat<f64>,
27932    #[allow(rustdoc::invalid_html_tags)]
27933    #[doc = "Location title"]
27934    #[serde(rename = "title")]
27935    pub title: String,
27936    #[allow(rustdoc::invalid_html_tags)]
27937    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
27938    #[serde(
27939        skip_serializing_if = "Option::is_none",
27940        rename = "horizontal_accuracy",
27941        default
27942    )]
27943    pub horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
27944    #[allow(rustdoc::invalid_html_tags)]
27945    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
27946    #[serde(
27947        skip_serializing_if = "Option::is_none",
27948        rename = "live_period",
27949        default
27950    )]
27951    pub live_period: Option<i64>,
27952    #[allow(rustdoc::invalid_html_tags)]
27953    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
27954    #[serde(skip_serializing_if = "Option::is_none", rename = "heading", default)]
27955    pub heading: Option<i64>,
27956    #[allow(rustdoc::invalid_html_tags)]
27957    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
27958    #[serde(
27959        skip_serializing_if = "Option::is_none",
27960        rename = "proximity_alert_radius",
27961        default
27962    )]
27963    pub proximity_alert_radius: Option<i64>,
27964    #[allow(rustdoc::invalid_html_tags)]
27965    #[doc = "Optional. Inline keyboard attached to the message"]
27966    #[serde(
27967        skip_serializing_if = "Option::is_none",
27968        rename = "reply_markup",
27969        default
27970    )]
27971    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
27972    #[allow(rustdoc::invalid_html_tags)]
27973    #[doc = "Optional. Content of the message to be sent instead of the location"]
27974    #[serde(
27975        skip_serializing_if = "Option::is_none",
27976        rename = "input_message_content",
27977        default
27978    )]
27979    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
27980    #[allow(rustdoc::invalid_html_tags)]
27981    #[doc = "Optional. Url of the thumbnail for the result"]
27982    #[serde(
27983        skip_serializing_if = "Option::is_none",
27984        rename = "thumbnail_url",
27985        default
27986    )]
27987    pub thumbnail_url: Option<String>,
27988    #[allow(rustdoc::invalid_html_tags)]
27989    #[doc = "Optional. Thumbnail width"]
27990    #[serde(
27991        skip_serializing_if = "Option::is_none",
27992        rename = "thumbnail_width",
27993        default
27994    )]
27995    pub thumbnail_width: Option<i64>,
27996    #[allow(rustdoc::invalid_html_tags)]
27997    #[doc = "Optional. Thumbnail height"]
27998    #[serde(
27999        skip_serializing_if = "Option::is_none",
28000        rename = "thumbnail_height",
28001        default
28002    )]
28003    pub thumbnail_height: Option<i64>,
28004}
28005impl InlineQueryResultLocationBuilder {
28006    #[allow(clippy::too_many_arguments)]
28007    pub fn new(
28008        id: String,
28009        latitude: ::ordered_float::OrderedFloat<f64>,
28010        longitude: ::ordered_float::OrderedFloat<f64>,
28011        title: String,
28012    ) -> Self {
28013        Self {
28014            tg_type: "location".to_owned(),
28015            id,
28016            latitude,
28017            longitude,
28018            title,
28019            horizontal_accuracy: None,
28020            live_period: None,
28021            heading: None,
28022            proximity_alert_radius: None,
28023            reply_markup: None,
28024            input_message_content: None,
28025            thumbnail_url: None,
28026            thumbnail_width: None,
28027            thumbnail_height: None,
28028        }
28029    }
28030    #[allow(rustdoc::invalid_html_tags)]
28031    #[doc = "Type of the result, must be location"]
28032    pub fn set_type(mut self, tg_type: String) -> Self {
28033        self.tg_type = tg_type;
28034        self
28035    }
28036    #[allow(rustdoc::invalid_html_tags)]
28037    #[doc = "Unique identifier for this result, 1-64 Bytes"]
28038    pub fn set_id(mut self, id: String) -> Self {
28039        self.id = id;
28040        self
28041    }
28042    #[allow(rustdoc::invalid_html_tags)]
28043    #[doc = "Location latitude in degrees"]
28044    pub fn set_latitude(mut self, latitude: ::ordered_float::OrderedFloat<f64>) -> Self {
28045        self.latitude = latitude;
28046        self
28047    }
28048    #[allow(rustdoc::invalid_html_tags)]
28049    #[doc = "Location longitude in degrees"]
28050    pub fn set_longitude(mut self, longitude: ::ordered_float::OrderedFloat<f64>) -> Self {
28051        self.longitude = longitude;
28052        self
28053    }
28054    #[allow(rustdoc::invalid_html_tags)]
28055    #[doc = "Location title"]
28056    pub fn set_title(mut self, title: String) -> Self {
28057        self.title = title;
28058        self
28059    }
28060    #[allow(rustdoc::invalid_html_tags)]
28061    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
28062    pub fn set_horizontal_accuracy(
28063        mut self,
28064        horizontal_accuracy: ::ordered_float::OrderedFloat<f64>,
28065    ) -> Self {
28066        self.horizontal_accuracy = Some(horizontal_accuracy);
28067        self
28068    }
28069    #[allow(rustdoc::invalid_html_tags)]
28070    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
28071    pub fn set_live_period(mut self, live_period: i64) -> Self {
28072        self.live_period = Some(live_period);
28073        self
28074    }
28075    #[allow(rustdoc::invalid_html_tags)]
28076    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
28077    pub fn set_heading(mut self, heading: i64) -> Self {
28078        self.heading = Some(heading);
28079        self
28080    }
28081    #[allow(rustdoc::invalid_html_tags)]
28082    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
28083    pub fn set_proximity_alert_radius(mut self, proximity_alert_radius: i64) -> Self {
28084        self.proximity_alert_radius = Some(proximity_alert_radius);
28085        self
28086    }
28087    #[allow(rustdoc::invalid_html_tags)]
28088    #[doc = "Optional. Inline keyboard attached to the message"]
28089    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
28090        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
28091        self
28092    }
28093    #[allow(rustdoc::invalid_html_tags)]
28094    #[doc = "Optional. Content of the message to be sent instead of the location"]
28095    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
28096        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
28097        self
28098    }
28099    #[allow(rustdoc::invalid_html_tags)]
28100    #[doc = "Optional. Url of the thumbnail for the result"]
28101    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
28102        self.thumbnail_url = Some(thumbnail_url);
28103        self
28104    }
28105    #[allow(rustdoc::invalid_html_tags)]
28106    #[doc = "Optional. Thumbnail width"]
28107    pub fn set_thumbnail_width(mut self, thumbnail_width: i64) -> Self {
28108        self.thumbnail_width = Some(thumbnail_width);
28109        self
28110    }
28111    #[allow(rustdoc::invalid_html_tags)]
28112    #[doc = "Optional. Thumbnail height"]
28113    pub fn set_thumbnail_height(mut self, thumbnail_height: i64) -> Self {
28114        self.thumbnail_height = Some(thumbnail_height);
28115        self
28116    }
28117    pub fn build(self) -> InlineQueryResultLocation {
28118        InlineQueryResultLocation {
28119            tg_type: self.tg_type,
28120            id: self.id,
28121            latitude: self.latitude,
28122            longitude: self.longitude,
28123            title: self.title,
28124            horizontal_accuracy: self.horizontal_accuracy,
28125            live_period: self.live_period,
28126            heading: self.heading,
28127            proximity_alert_radius: self.proximity_alert_radius,
28128            reply_markup: self.reply_markup,
28129            input_message_content: self.input_message_content,
28130            thumbnail_url: self.thumbnail_url,
28131            thumbnail_width: self.thumbnail_width,
28132            thumbnail_height: self.thumbnail_height,
28133        }
28134    }
28135}
28136#[allow(rustdoc::invalid_html_tags)]
28137#[doc = "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed."]
28138#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28139pub struct KeyboardButtonPollType {
28140    #[allow(rustdoc::invalid_html_tags)]
28141    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
28142    #[serde(skip_serializing_if = "Option::is_none", rename = "type", default)]
28143    pub tg_type: Option<String>,
28144}
28145#[allow(rustdoc::invalid_html_tags)]
28146#[doc = "Companion type to KeyboardButtonPollType that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
28147#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28148pub struct NoSkipKeyboardButtonPollType {
28149    pub tg_type: Option<String>,
28150}
28151impl From<NoSkipKeyboardButtonPollType> for KeyboardButtonPollType {
28152    fn from(t: NoSkipKeyboardButtonPollType) -> Self {
28153        Self { tg_type: t.tg_type }
28154    }
28155}
28156#[allow(clippy::from_over_into)]
28157impl Into<NoSkipKeyboardButtonPollType> for KeyboardButtonPollType {
28158    fn into(self) -> NoSkipKeyboardButtonPollType {
28159        NoSkipKeyboardButtonPollType {
28160            tg_type: self.tg_type,
28161        }
28162    }
28163}
28164impl NoSkipKeyboardButtonPollType {
28165    pub fn skip(self) -> KeyboardButtonPollType {
28166        self.into()
28167    }
28168}
28169impl KeyboardButtonPollType {
28170    pub fn noskip(self) -> NoSkipKeyboardButtonPollType {
28171        self.into()
28172    }
28173}
28174#[allow(rustdoc::invalid_html_tags)]
28175#[doc = "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed."]
28176#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28177pub struct KeyboardButtonPollTypeBuilder {
28178    #[allow(rustdoc::invalid_html_tags)]
28179    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
28180    #[serde(skip_serializing_if = "Option::is_none", rename = "type", default)]
28181    pub tg_type: Option<String>,
28182}
28183impl KeyboardButtonPollTypeBuilder {
28184    #[allow(clippy::too_many_arguments)]
28185    pub fn new() -> Self {
28186        Self {
28187            tg_type: Some("KeyboardButtonPollType".to_owned()),
28188        }
28189    }
28190    #[allow(rustdoc::invalid_html_tags)]
28191    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
28192    pub fn set_type(mut self, tg_type: String) -> Self {
28193        self.tg_type = Some(tg_type);
28194        self
28195    }
28196    pub fn build(self) -> KeyboardButtonPollType {
28197        KeyboardButtonPollType {
28198            tg_type: self.tg_type,
28199        }
28200    }
28201}
28202#[allow(rustdoc::invalid_html_tags)]
28203#[doc = "Describes data sent from a Web App to the bot."]
28204#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28205pub struct WebAppData {
28206    #[allow(rustdoc::invalid_html_tags)]
28207    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
28208    #[serde(rename = "data")]
28209    pub data: String,
28210    #[allow(rustdoc::invalid_html_tags)]
28211    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
28212    #[serde(rename = "button_text")]
28213    pub button_text: String,
28214}
28215#[allow(rustdoc::invalid_html_tags)]
28216#[doc = "Companion type to WebAppData that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
28217#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28218pub struct NoSkipWebAppData {
28219    #[allow(rustdoc::invalid_html_tags)]
28220    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
28221    #[serde(rename = "data")]
28222    pub data: String,
28223    #[allow(rustdoc::invalid_html_tags)]
28224    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
28225    #[serde(rename = "button_text")]
28226    pub button_text: String,
28227}
28228impl From<NoSkipWebAppData> for WebAppData {
28229    fn from(t: NoSkipWebAppData) -> Self {
28230        Self {
28231            data: t.data,
28232            button_text: t.button_text,
28233        }
28234    }
28235}
28236#[allow(clippy::from_over_into)]
28237impl Into<NoSkipWebAppData> for WebAppData {
28238    fn into(self) -> NoSkipWebAppData {
28239        NoSkipWebAppData {
28240            data: self.data,
28241            button_text: self.button_text,
28242        }
28243    }
28244}
28245impl NoSkipWebAppData {
28246    pub fn skip(self) -> WebAppData {
28247        self.into()
28248    }
28249}
28250impl WebAppData {
28251    pub fn noskip(self) -> NoSkipWebAppData {
28252        self.into()
28253    }
28254}
28255#[allow(rustdoc::invalid_html_tags)]
28256#[doc = "Describes data sent from a Web App to the bot."]
28257#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28258pub struct WebAppDataBuilder {
28259    #[allow(rustdoc::invalid_html_tags)]
28260    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
28261    #[serde(rename = "data")]
28262    pub data: String,
28263    #[allow(rustdoc::invalid_html_tags)]
28264    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
28265    #[serde(rename = "button_text")]
28266    pub button_text: String,
28267}
28268impl WebAppDataBuilder {
28269    #[allow(clippy::too_many_arguments)]
28270    pub fn new(data: String, button_text: String) -> Self {
28271        Self { data, button_text }
28272    }
28273    #[allow(rustdoc::invalid_html_tags)]
28274    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
28275    pub fn set_data(mut self, data: String) -> Self {
28276        self.data = data;
28277        self
28278    }
28279    #[allow(rustdoc::invalid_html_tags)]
28280    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
28281    pub fn set_button_text(mut self, button_text: String) -> Self {
28282        self.button_text = button_text;
28283        self
28284    }
28285    pub fn build(self) -> WebAppData {
28286        WebAppData {
28287            data: self.data,
28288            button_text: self.button_text,
28289        }
28290    }
28291}
28292#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
28293pub struct ForumTopicReopened {}
28294impl ForumTopicReopened {}
28295#[allow(rustdoc::invalid_html_tags)]
28296#[doc = "Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file."]
28297#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28298pub struct InlineQueryResultCachedDocument {
28299    #[allow(rustdoc::invalid_html_tags)]
28300    #[doc = "Type of the result, must be document"]
28301    #[serde(rename = "type")]
28302    pub tg_type: String,
28303    #[allow(rustdoc::invalid_html_tags)]
28304    #[doc = "Unique identifier for this result, 1-64 bytes"]
28305    #[serde(rename = "id")]
28306    pub id: String,
28307    #[allow(rustdoc::invalid_html_tags)]
28308    #[doc = "Title for the result"]
28309    #[serde(rename = "title")]
28310    pub title: String,
28311    #[allow(rustdoc::invalid_html_tags)]
28312    #[doc = "A valid file identifier for the file"]
28313    #[serde(rename = "document_file_id")]
28314    pub document_file_id: String,
28315    #[allow(rustdoc::invalid_html_tags)]
28316    #[doc = "Optional. Short description of the result"]
28317    #[serde(
28318        skip_serializing_if = "Option::is_none",
28319        rename = "description",
28320        default
28321    )]
28322    pub description: Option<String>,
28323    #[allow(rustdoc::invalid_html_tags)]
28324    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
28325    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
28326    pub caption: Option<String>,
28327    #[allow(rustdoc::invalid_html_tags)]
28328    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
28329    #[serde(
28330        skip_serializing_if = "Option::is_none",
28331        rename = "parse_mode",
28332        default
28333    )]
28334    pub parse_mode: Option<String>,
28335    #[allow(rustdoc::invalid_html_tags)]
28336    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
28337    #[serde(
28338        skip_serializing_if = "Option::is_none",
28339        rename = "caption_entities",
28340        default
28341    )]
28342    pub caption_entities: Option<Vec<MessageEntity>>,
28343    #[allow(rustdoc::invalid_html_tags)]
28344    #[doc = "Optional. Inline keyboard attached to the message"]
28345    #[serde(
28346        skip_serializing_if = "Option::is_none",
28347        rename = "reply_markup",
28348        default
28349    )]
28350    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
28351    #[allow(rustdoc::invalid_html_tags)]
28352    #[doc = "Optional. Content of the message to be sent instead of the file"]
28353    #[serde(
28354        skip_serializing_if = "Option::is_none",
28355        rename = "input_message_content",
28356        default
28357    )]
28358    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
28359}
28360#[allow(rustdoc::invalid_html_tags)]
28361#[doc = "Companion type to InlineQueryResultCachedDocument that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
28362#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28363pub struct NoSkipInlineQueryResultCachedDocument {
28364    #[allow(rustdoc::invalid_html_tags)]
28365    #[doc = "Type of the result, must be document"]
28366    #[serde(rename = "type")]
28367    pub tg_type: String,
28368    #[allow(rustdoc::invalid_html_tags)]
28369    #[doc = "Unique identifier for this result, 1-64 bytes"]
28370    #[serde(rename = "id")]
28371    pub id: String,
28372    #[allow(rustdoc::invalid_html_tags)]
28373    #[doc = "Title for the result"]
28374    #[serde(rename = "title")]
28375    pub title: String,
28376    #[allow(rustdoc::invalid_html_tags)]
28377    #[doc = "A valid file identifier for the file"]
28378    #[serde(rename = "document_file_id")]
28379    pub document_file_id: String,
28380    pub description: Option<String>,
28381    pub caption: Option<String>,
28382    pub parse_mode: Option<String>,
28383    pub caption_entities: Option<Vec<MessageEntity>>,
28384    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
28385    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
28386}
28387impl From<NoSkipInlineQueryResultCachedDocument> for InlineQueryResultCachedDocument {
28388    fn from(t: NoSkipInlineQueryResultCachedDocument) -> Self {
28389        Self {
28390            tg_type: t.tg_type,
28391            id: t.id,
28392            title: t.title,
28393            document_file_id: t.document_file_id,
28394            description: t.description,
28395            caption: t.caption,
28396            parse_mode: t.parse_mode,
28397            caption_entities: t.caption_entities,
28398            reply_markup: t.reply_markup,
28399            input_message_content: t.input_message_content,
28400        }
28401    }
28402}
28403#[allow(clippy::from_over_into)]
28404impl Into<NoSkipInlineQueryResultCachedDocument> for InlineQueryResultCachedDocument {
28405    fn into(self) -> NoSkipInlineQueryResultCachedDocument {
28406        NoSkipInlineQueryResultCachedDocument {
28407            tg_type: self.tg_type,
28408            id: self.id,
28409            title: self.title,
28410            document_file_id: self.document_file_id,
28411            description: self.description,
28412            caption: self.caption,
28413            parse_mode: self.parse_mode,
28414            caption_entities: self.caption_entities,
28415            reply_markup: self.reply_markup,
28416            input_message_content: self.input_message_content,
28417        }
28418    }
28419}
28420impl NoSkipInlineQueryResultCachedDocument {
28421    pub fn skip(self) -> InlineQueryResultCachedDocument {
28422        self.into()
28423    }
28424}
28425impl InlineQueryResultCachedDocument {
28426    pub fn noskip(self) -> NoSkipInlineQueryResultCachedDocument {
28427        self.into()
28428    }
28429}
28430#[allow(rustdoc::invalid_html_tags)]
28431#[doc = "Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file."]
28432#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28433pub struct InlineQueryResultCachedDocumentBuilder {
28434    #[allow(rustdoc::invalid_html_tags)]
28435    #[doc = "Type of the result, must be document"]
28436    #[serde(rename = "type")]
28437    pub tg_type: String,
28438    #[allow(rustdoc::invalid_html_tags)]
28439    #[doc = "Unique identifier for this result, 1-64 bytes"]
28440    #[serde(rename = "id")]
28441    pub id: String,
28442    #[allow(rustdoc::invalid_html_tags)]
28443    #[doc = "Title for the result"]
28444    #[serde(rename = "title")]
28445    pub title: String,
28446    #[allow(rustdoc::invalid_html_tags)]
28447    #[doc = "A valid file identifier for the file"]
28448    #[serde(rename = "document_file_id")]
28449    pub document_file_id: String,
28450    #[allow(rustdoc::invalid_html_tags)]
28451    #[doc = "Optional. Short description of the result"]
28452    #[serde(
28453        skip_serializing_if = "Option::is_none",
28454        rename = "description",
28455        default
28456    )]
28457    pub description: Option<String>,
28458    #[allow(rustdoc::invalid_html_tags)]
28459    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
28460    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
28461    pub caption: Option<String>,
28462    #[allow(rustdoc::invalid_html_tags)]
28463    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
28464    #[serde(
28465        skip_serializing_if = "Option::is_none",
28466        rename = "parse_mode",
28467        default
28468    )]
28469    pub parse_mode: Option<String>,
28470    #[allow(rustdoc::invalid_html_tags)]
28471    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
28472    #[serde(
28473        skip_serializing_if = "Option::is_none",
28474        rename = "caption_entities",
28475        default
28476    )]
28477    pub caption_entities: Option<Vec<MessageEntity>>,
28478    #[allow(rustdoc::invalid_html_tags)]
28479    #[doc = "Optional. Inline keyboard attached to the message"]
28480    #[serde(
28481        skip_serializing_if = "Option::is_none",
28482        rename = "reply_markup",
28483        default
28484    )]
28485    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
28486    #[allow(rustdoc::invalid_html_tags)]
28487    #[doc = "Optional. Content of the message to be sent instead of the file"]
28488    #[serde(
28489        skip_serializing_if = "Option::is_none",
28490        rename = "input_message_content",
28491        default
28492    )]
28493    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
28494}
28495impl InlineQueryResultCachedDocumentBuilder {
28496    #[allow(clippy::too_many_arguments)]
28497    pub fn new(id: String, title: String, document_file_id: String) -> Self {
28498        Self {
28499            tg_type: "document".to_owned(),
28500            id,
28501            title,
28502            document_file_id,
28503            description: None,
28504            caption: None,
28505            parse_mode: None,
28506            caption_entities: None,
28507            reply_markup: None,
28508            input_message_content: None,
28509        }
28510    }
28511    #[allow(rustdoc::invalid_html_tags)]
28512    #[doc = "Type of the result, must be document"]
28513    pub fn set_type(mut self, tg_type: String) -> Self {
28514        self.tg_type = tg_type;
28515        self
28516    }
28517    #[allow(rustdoc::invalid_html_tags)]
28518    #[doc = "Unique identifier for this result, 1-64 bytes"]
28519    pub fn set_id(mut self, id: String) -> Self {
28520        self.id = id;
28521        self
28522    }
28523    #[allow(rustdoc::invalid_html_tags)]
28524    #[doc = "Title for the result"]
28525    pub fn set_title(mut self, title: String) -> Self {
28526        self.title = title;
28527        self
28528    }
28529    #[allow(rustdoc::invalid_html_tags)]
28530    #[doc = "A valid file identifier for the file"]
28531    pub fn set_document_file_id(mut self, document_file_id: String) -> Self {
28532        self.document_file_id = document_file_id;
28533        self
28534    }
28535    #[allow(rustdoc::invalid_html_tags)]
28536    #[doc = "Optional. Short description of the result"]
28537    pub fn set_description(mut self, description: String) -> Self {
28538        self.description = Some(description);
28539        self
28540    }
28541    #[allow(rustdoc::invalid_html_tags)]
28542    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
28543    pub fn set_caption(mut self, caption: String) -> Self {
28544        self.caption = Some(caption);
28545        self
28546    }
28547    #[allow(rustdoc::invalid_html_tags)]
28548    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
28549    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
28550        self.parse_mode = Some(parse_mode);
28551        self
28552    }
28553    #[allow(rustdoc::invalid_html_tags)]
28554    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
28555    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
28556        self.caption_entities = Some(caption_entities);
28557        self
28558    }
28559    #[allow(rustdoc::invalid_html_tags)]
28560    #[doc = "Optional. Inline keyboard attached to the message"]
28561    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
28562        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
28563        self
28564    }
28565    #[allow(rustdoc::invalid_html_tags)]
28566    #[doc = "Optional. Content of the message to be sent instead of the file"]
28567    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
28568        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
28569        self
28570    }
28571    pub fn build(self) -> InlineQueryResultCachedDocument {
28572        InlineQueryResultCachedDocument {
28573            tg_type: self.tg_type,
28574            id: self.id,
28575            title: self.title,
28576            document_file_id: self.document_file_id,
28577            description: self.description,
28578            caption: self.caption,
28579            parse_mode: self.parse_mode,
28580            caption_entities: self.caption_entities,
28581            reply_markup: self.reply_markup,
28582            input_message_content: self.input_message_content,
28583        }
28584    }
28585}
28586#[allow(rustdoc::invalid_html_tags)]
28587#[doc = "Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message."]
28588#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28589pub struct InlineQueryResultVoice {
28590    #[allow(rustdoc::invalid_html_tags)]
28591    #[doc = "Type of the result, must be voice"]
28592    #[serde(rename = "type")]
28593    pub tg_type: String,
28594    #[allow(rustdoc::invalid_html_tags)]
28595    #[doc = "Unique identifier for this result, 1-64 bytes"]
28596    #[serde(rename = "id")]
28597    pub id: String,
28598    #[allow(rustdoc::invalid_html_tags)]
28599    #[doc = "A valid URL for the voice recording"]
28600    #[serde(rename = "voice_url")]
28601    pub voice_url: String,
28602    #[allow(rustdoc::invalid_html_tags)]
28603    #[doc = "Recording title"]
28604    #[serde(rename = "title")]
28605    pub title: String,
28606    #[allow(rustdoc::invalid_html_tags)]
28607    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
28608    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
28609    pub caption: Option<String>,
28610    #[allow(rustdoc::invalid_html_tags)]
28611    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
28612    #[serde(
28613        skip_serializing_if = "Option::is_none",
28614        rename = "parse_mode",
28615        default
28616    )]
28617    pub parse_mode: Option<String>,
28618    #[allow(rustdoc::invalid_html_tags)]
28619    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
28620    #[serde(
28621        skip_serializing_if = "Option::is_none",
28622        rename = "caption_entities",
28623        default
28624    )]
28625    pub caption_entities: Option<Vec<MessageEntity>>,
28626    #[allow(rustdoc::invalid_html_tags)]
28627    #[doc = "Optional. Recording duration in seconds"]
28628    #[serde(
28629        skip_serializing_if = "Option::is_none",
28630        rename = "voice_duration",
28631        default
28632    )]
28633    pub voice_duration: Option<i64>,
28634    #[allow(rustdoc::invalid_html_tags)]
28635    #[doc = "Optional. Inline keyboard attached to the message"]
28636    #[serde(
28637        skip_serializing_if = "Option::is_none",
28638        rename = "reply_markup",
28639        default
28640    )]
28641    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
28642    #[allow(rustdoc::invalid_html_tags)]
28643    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
28644    #[serde(
28645        skip_serializing_if = "Option::is_none",
28646        rename = "input_message_content",
28647        default
28648    )]
28649    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
28650}
28651#[allow(rustdoc::invalid_html_tags)]
28652#[doc = "Companion type to InlineQueryResultVoice that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
28653#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28654pub struct NoSkipInlineQueryResultVoice {
28655    #[allow(rustdoc::invalid_html_tags)]
28656    #[doc = "Type of the result, must be voice"]
28657    #[serde(rename = "type")]
28658    pub tg_type: String,
28659    #[allow(rustdoc::invalid_html_tags)]
28660    #[doc = "Unique identifier for this result, 1-64 bytes"]
28661    #[serde(rename = "id")]
28662    pub id: String,
28663    #[allow(rustdoc::invalid_html_tags)]
28664    #[doc = "A valid URL for the voice recording"]
28665    #[serde(rename = "voice_url")]
28666    pub voice_url: String,
28667    #[allow(rustdoc::invalid_html_tags)]
28668    #[doc = "Recording title"]
28669    #[serde(rename = "title")]
28670    pub title: String,
28671    pub caption: Option<String>,
28672    pub parse_mode: Option<String>,
28673    pub caption_entities: Option<Vec<MessageEntity>>,
28674    pub voice_duration: Option<i64>,
28675    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
28676    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
28677}
28678impl From<NoSkipInlineQueryResultVoice> for InlineQueryResultVoice {
28679    fn from(t: NoSkipInlineQueryResultVoice) -> Self {
28680        Self {
28681            tg_type: t.tg_type,
28682            id: t.id,
28683            voice_url: t.voice_url,
28684            title: t.title,
28685            caption: t.caption,
28686            parse_mode: t.parse_mode,
28687            caption_entities: t.caption_entities,
28688            voice_duration: t.voice_duration,
28689            reply_markup: t.reply_markup,
28690            input_message_content: t.input_message_content,
28691        }
28692    }
28693}
28694#[allow(clippy::from_over_into)]
28695impl Into<NoSkipInlineQueryResultVoice> for InlineQueryResultVoice {
28696    fn into(self) -> NoSkipInlineQueryResultVoice {
28697        NoSkipInlineQueryResultVoice {
28698            tg_type: self.tg_type,
28699            id: self.id,
28700            voice_url: self.voice_url,
28701            title: self.title,
28702            caption: self.caption,
28703            parse_mode: self.parse_mode,
28704            caption_entities: self.caption_entities,
28705            voice_duration: self.voice_duration,
28706            reply_markup: self.reply_markup,
28707            input_message_content: self.input_message_content,
28708        }
28709    }
28710}
28711impl NoSkipInlineQueryResultVoice {
28712    pub fn skip(self) -> InlineQueryResultVoice {
28713        self.into()
28714    }
28715}
28716impl InlineQueryResultVoice {
28717    pub fn noskip(self) -> NoSkipInlineQueryResultVoice {
28718        self.into()
28719    }
28720}
28721#[allow(rustdoc::invalid_html_tags)]
28722#[doc = "Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message."]
28723#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28724pub struct InlineQueryResultVoiceBuilder {
28725    #[allow(rustdoc::invalid_html_tags)]
28726    #[doc = "Type of the result, must be voice"]
28727    #[serde(rename = "type")]
28728    pub tg_type: String,
28729    #[allow(rustdoc::invalid_html_tags)]
28730    #[doc = "Unique identifier for this result, 1-64 bytes"]
28731    #[serde(rename = "id")]
28732    pub id: String,
28733    #[allow(rustdoc::invalid_html_tags)]
28734    #[doc = "A valid URL for the voice recording"]
28735    #[serde(rename = "voice_url")]
28736    pub voice_url: String,
28737    #[allow(rustdoc::invalid_html_tags)]
28738    #[doc = "Recording title"]
28739    #[serde(rename = "title")]
28740    pub title: String,
28741    #[allow(rustdoc::invalid_html_tags)]
28742    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
28743    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
28744    pub caption: Option<String>,
28745    #[allow(rustdoc::invalid_html_tags)]
28746    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
28747    #[serde(
28748        skip_serializing_if = "Option::is_none",
28749        rename = "parse_mode",
28750        default
28751    )]
28752    pub parse_mode: Option<String>,
28753    #[allow(rustdoc::invalid_html_tags)]
28754    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
28755    #[serde(
28756        skip_serializing_if = "Option::is_none",
28757        rename = "caption_entities",
28758        default
28759    )]
28760    pub caption_entities: Option<Vec<MessageEntity>>,
28761    #[allow(rustdoc::invalid_html_tags)]
28762    #[doc = "Optional. Recording duration in seconds"]
28763    #[serde(
28764        skip_serializing_if = "Option::is_none",
28765        rename = "voice_duration",
28766        default
28767    )]
28768    pub voice_duration: Option<i64>,
28769    #[allow(rustdoc::invalid_html_tags)]
28770    #[doc = "Optional. Inline keyboard attached to the message"]
28771    #[serde(
28772        skip_serializing_if = "Option::is_none",
28773        rename = "reply_markup",
28774        default
28775    )]
28776    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
28777    #[allow(rustdoc::invalid_html_tags)]
28778    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
28779    #[serde(
28780        skip_serializing_if = "Option::is_none",
28781        rename = "input_message_content",
28782        default
28783    )]
28784    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
28785}
28786impl InlineQueryResultVoiceBuilder {
28787    #[allow(clippy::too_many_arguments)]
28788    pub fn new(id: String, voice_url: String, title: String) -> Self {
28789        Self {
28790            tg_type: "voice".to_owned(),
28791            id,
28792            voice_url,
28793            title,
28794            caption: None,
28795            parse_mode: None,
28796            caption_entities: None,
28797            voice_duration: None,
28798            reply_markup: None,
28799            input_message_content: None,
28800        }
28801    }
28802    #[allow(rustdoc::invalid_html_tags)]
28803    #[doc = "Type of the result, must be voice"]
28804    pub fn set_type(mut self, tg_type: String) -> Self {
28805        self.tg_type = tg_type;
28806        self
28807    }
28808    #[allow(rustdoc::invalid_html_tags)]
28809    #[doc = "Unique identifier for this result, 1-64 bytes"]
28810    pub fn set_id(mut self, id: String) -> Self {
28811        self.id = id;
28812        self
28813    }
28814    #[allow(rustdoc::invalid_html_tags)]
28815    #[doc = "A valid URL for the voice recording"]
28816    pub fn set_voice_url(mut self, voice_url: String) -> Self {
28817        self.voice_url = voice_url;
28818        self
28819    }
28820    #[allow(rustdoc::invalid_html_tags)]
28821    #[doc = "Recording title"]
28822    pub fn set_title(mut self, title: String) -> Self {
28823        self.title = title;
28824        self
28825    }
28826    #[allow(rustdoc::invalid_html_tags)]
28827    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
28828    pub fn set_caption(mut self, caption: String) -> Self {
28829        self.caption = Some(caption);
28830        self
28831    }
28832    #[allow(rustdoc::invalid_html_tags)]
28833    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
28834    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
28835        self.parse_mode = Some(parse_mode);
28836        self
28837    }
28838    #[allow(rustdoc::invalid_html_tags)]
28839    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
28840    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
28841        self.caption_entities = Some(caption_entities);
28842        self
28843    }
28844    #[allow(rustdoc::invalid_html_tags)]
28845    #[doc = "Optional. Recording duration in seconds"]
28846    pub fn set_voice_duration(mut self, voice_duration: i64) -> Self {
28847        self.voice_duration = Some(voice_duration);
28848        self
28849    }
28850    #[allow(rustdoc::invalid_html_tags)]
28851    #[doc = "Optional. Inline keyboard attached to the message"]
28852    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
28853        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
28854        self
28855    }
28856    #[allow(rustdoc::invalid_html_tags)]
28857    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
28858    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
28859        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
28860        self
28861    }
28862    pub fn build(self) -> InlineQueryResultVoice {
28863        InlineQueryResultVoice {
28864            tg_type: self.tg_type,
28865            id: self.id,
28866            voice_url: self.voice_url,
28867            title: self.title,
28868            caption: self.caption,
28869            parse_mode: self.parse_mode,
28870            caption_entities: self.caption_entities,
28871            voice_duration: self.voice_duration,
28872            reply_markup: self.reply_markup,
28873            input_message_content: self.input_message_content,
28874        }
28875    }
28876}
28877#[allow(rustdoc::invalid_html_tags)]
28878#[doc = "This object describes the backdrop of a unique gift."]
28879#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28880pub struct UniqueGiftBackdrop {
28881    #[allow(rustdoc::invalid_html_tags)]
28882    #[doc = "Name of the backdrop"]
28883    #[serde(rename = "name")]
28884    pub name: String,
28885    #[allow(rustdoc::invalid_html_tags)]
28886    #[doc = "Colors of the backdrop"]
28887    #[serde(rename = "colors")]
28888    pub colors: BoxWrapper<Unbox<UniqueGiftBackdropColors>>,
28889    #[allow(rustdoc::invalid_html_tags)]
28890    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
28891    #[serde(rename = "rarity_per_mille")]
28892    pub rarity_per_mille: i64,
28893}
28894#[allow(rustdoc::invalid_html_tags)]
28895#[doc = "Companion type to UniqueGiftBackdrop that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
28896#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28897pub struct NoSkipUniqueGiftBackdrop {
28898    #[allow(rustdoc::invalid_html_tags)]
28899    #[doc = "Name of the backdrop"]
28900    #[serde(rename = "name")]
28901    pub name: String,
28902    #[allow(rustdoc::invalid_html_tags)]
28903    #[doc = "Colors of the backdrop"]
28904    #[serde(rename = "colors")]
28905    pub colors: BoxWrapper<Unbox<UniqueGiftBackdropColors>>,
28906    #[allow(rustdoc::invalid_html_tags)]
28907    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
28908    #[serde(rename = "rarity_per_mille")]
28909    pub rarity_per_mille: i64,
28910}
28911impl From<NoSkipUniqueGiftBackdrop> for UniqueGiftBackdrop {
28912    fn from(t: NoSkipUniqueGiftBackdrop) -> Self {
28913        Self {
28914            name: t.name,
28915            colors: t.colors,
28916            rarity_per_mille: t.rarity_per_mille,
28917        }
28918    }
28919}
28920#[allow(clippy::from_over_into)]
28921impl Into<NoSkipUniqueGiftBackdrop> for UniqueGiftBackdrop {
28922    fn into(self) -> NoSkipUniqueGiftBackdrop {
28923        NoSkipUniqueGiftBackdrop {
28924            name: self.name,
28925            colors: self.colors,
28926            rarity_per_mille: self.rarity_per_mille,
28927        }
28928    }
28929}
28930impl NoSkipUniqueGiftBackdrop {
28931    pub fn skip(self) -> UniqueGiftBackdrop {
28932        self.into()
28933    }
28934}
28935impl UniqueGiftBackdrop {
28936    pub fn noskip(self) -> NoSkipUniqueGiftBackdrop {
28937        self.into()
28938    }
28939}
28940#[allow(rustdoc::invalid_html_tags)]
28941#[doc = "This object describes the backdrop of a unique gift."]
28942#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28943pub struct UniqueGiftBackdropBuilder {
28944    #[allow(rustdoc::invalid_html_tags)]
28945    #[doc = "Name of the backdrop"]
28946    #[serde(rename = "name")]
28947    pub name: String,
28948    #[allow(rustdoc::invalid_html_tags)]
28949    #[doc = "Colors of the backdrop"]
28950    #[serde(rename = "colors")]
28951    pub colors: BoxWrapper<Unbox<UniqueGiftBackdropColors>>,
28952    #[allow(rustdoc::invalid_html_tags)]
28953    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
28954    #[serde(rename = "rarity_per_mille")]
28955    pub rarity_per_mille: i64,
28956}
28957impl UniqueGiftBackdropBuilder {
28958    #[allow(clippy::too_many_arguments)]
28959    pub fn new<A: Into<UniqueGiftBackdropColors>>(
28960        name: String,
28961        colors: A,
28962        rarity_per_mille: i64,
28963    ) -> Self {
28964        Self {
28965            name,
28966            colors: BoxWrapper::new_unbox(colors.into()),
28967            rarity_per_mille,
28968        }
28969    }
28970    #[allow(rustdoc::invalid_html_tags)]
28971    #[doc = "Name of the backdrop"]
28972    pub fn set_name(mut self, name: String) -> Self {
28973        self.name = name;
28974        self
28975    }
28976    #[allow(rustdoc::invalid_html_tags)]
28977    #[doc = "Colors of the backdrop"]
28978    pub fn set_colors(mut self, colors: UniqueGiftBackdropColors) -> Self {
28979        self.colors = BoxWrapper(Unbox(colors));
28980        self
28981    }
28982    #[allow(rustdoc::invalid_html_tags)]
28983    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
28984    pub fn set_rarity_per_mille(mut self, rarity_per_mille: i64) -> Self {
28985        self.rarity_per_mille = rarity_per_mille;
28986        self
28987    }
28988    pub fn build(self) -> UniqueGiftBackdrop {
28989        UniqueGiftBackdrop {
28990            name: self.name,
28991            colors: self.colors,
28992            rarity_per_mille: self.rarity_per_mille,
28993        }
28994    }
28995}
28996#[allow(rustdoc::invalid_html_tags)]
28997#[doc = "Describes a story area containing weather information. Currently, a story can have up to 3 weather areas."]
28998#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
28999pub struct StoryAreaTypeWeather {
29000    #[allow(rustdoc::invalid_html_tags)]
29001    #[doc = "Type of the area, always \"weather\""]
29002    #[serde(rename = "type")]
29003    pub tg_type: String,
29004    #[allow(rustdoc::invalid_html_tags)]
29005    #[doc = "Temperature, in degree Celsius"]
29006    #[serde(rename = "temperature")]
29007    pub temperature: ::ordered_float::OrderedFloat<f64>,
29008    #[allow(rustdoc::invalid_html_tags)]
29009    #[doc = "Emoji representing the weather"]
29010    #[serde(rename = "emoji")]
29011    pub emoji: String,
29012    #[allow(rustdoc::invalid_html_tags)]
29013    #[doc = "A color of the area background in the ARGB format"]
29014    #[serde(rename = "background_color")]
29015    pub background_color: i64,
29016}
29017#[allow(rustdoc::invalid_html_tags)]
29018#[doc = "Companion type to StoryAreaTypeWeather that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29019#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29020pub struct NoSkipStoryAreaTypeWeather {
29021    #[allow(rustdoc::invalid_html_tags)]
29022    #[doc = "Type of the area, always \"weather\""]
29023    #[serde(rename = "type")]
29024    pub tg_type: String,
29025    #[allow(rustdoc::invalid_html_tags)]
29026    #[doc = "Temperature, in degree Celsius"]
29027    #[serde(rename = "temperature")]
29028    pub temperature: ::ordered_float::OrderedFloat<f64>,
29029    #[allow(rustdoc::invalid_html_tags)]
29030    #[doc = "Emoji representing the weather"]
29031    #[serde(rename = "emoji")]
29032    pub emoji: String,
29033    #[allow(rustdoc::invalid_html_tags)]
29034    #[doc = "A color of the area background in the ARGB format"]
29035    #[serde(rename = "background_color")]
29036    pub background_color: i64,
29037}
29038impl From<NoSkipStoryAreaTypeWeather> for StoryAreaTypeWeather {
29039    fn from(t: NoSkipStoryAreaTypeWeather) -> Self {
29040        Self {
29041            tg_type: t.tg_type,
29042            temperature: t.temperature,
29043            emoji: t.emoji,
29044            background_color: t.background_color,
29045        }
29046    }
29047}
29048#[allow(clippy::from_over_into)]
29049impl Into<NoSkipStoryAreaTypeWeather> for StoryAreaTypeWeather {
29050    fn into(self) -> NoSkipStoryAreaTypeWeather {
29051        NoSkipStoryAreaTypeWeather {
29052            tg_type: self.tg_type,
29053            temperature: self.temperature,
29054            emoji: self.emoji,
29055            background_color: self.background_color,
29056        }
29057    }
29058}
29059impl NoSkipStoryAreaTypeWeather {
29060    pub fn skip(self) -> StoryAreaTypeWeather {
29061        self.into()
29062    }
29063}
29064impl StoryAreaTypeWeather {
29065    pub fn noskip(self) -> NoSkipStoryAreaTypeWeather {
29066        self.into()
29067    }
29068}
29069#[allow(rustdoc::invalid_html_tags)]
29070#[doc = "Describes a story area containing weather information. Currently, a story can have up to 3 weather areas."]
29071#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29072pub struct StoryAreaTypeWeatherBuilder {
29073    #[allow(rustdoc::invalid_html_tags)]
29074    #[doc = "Type of the area, always \"weather\""]
29075    #[serde(rename = "type")]
29076    pub tg_type: String,
29077    #[allow(rustdoc::invalid_html_tags)]
29078    #[doc = "Temperature, in degree Celsius"]
29079    #[serde(rename = "temperature")]
29080    pub temperature: ::ordered_float::OrderedFloat<f64>,
29081    #[allow(rustdoc::invalid_html_tags)]
29082    #[doc = "Emoji representing the weather"]
29083    #[serde(rename = "emoji")]
29084    pub emoji: String,
29085    #[allow(rustdoc::invalid_html_tags)]
29086    #[doc = "A color of the area background in the ARGB format"]
29087    #[serde(rename = "background_color")]
29088    pub background_color: i64,
29089}
29090impl StoryAreaTypeWeatherBuilder {
29091    #[allow(clippy::too_many_arguments)]
29092    pub fn new(
29093        temperature: ::ordered_float::OrderedFloat<f64>,
29094        emoji: String,
29095        background_color: i64,
29096    ) -> Self {
29097        Self {
29098            tg_type: "StoryAreaTypeWeather".to_owned(),
29099            temperature,
29100            emoji,
29101            background_color,
29102        }
29103    }
29104    #[allow(rustdoc::invalid_html_tags)]
29105    #[doc = "Type of the area, always \"weather\""]
29106    pub fn set_type(mut self, tg_type: String) -> Self {
29107        self.tg_type = tg_type;
29108        self
29109    }
29110    #[allow(rustdoc::invalid_html_tags)]
29111    #[doc = "Temperature, in degree Celsius"]
29112    pub fn set_temperature(mut self, temperature: ::ordered_float::OrderedFloat<f64>) -> Self {
29113        self.temperature = temperature;
29114        self
29115    }
29116    #[allow(rustdoc::invalid_html_tags)]
29117    #[doc = "Emoji representing the weather"]
29118    pub fn set_emoji(mut self, emoji: String) -> Self {
29119        self.emoji = emoji;
29120        self
29121    }
29122    #[allow(rustdoc::invalid_html_tags)]
29123    #[doc = "A color of the area background in the ARGB format"]
29124    pub fn set_background_color(mut self, background_color: i64) -> Self {
29125        self.background_color = background_color;
29126        self
29127    }
29128    pub fn build(self) -> StoryAreaTypeWeather {
29129        StoryAreaTypeWeather {
29130            tg_type: self.tg_type,
29131            temperature: self.temperature,
29132            emoji: self.emoji,
29133            background_color: self.background_color,
29134        }
29135    }
29136}
29137#[allow(rustdoc::invalid_html_tags)]
29138#[doc = "This object describes the model of a unique gift."]
29139#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29140pub struct UniqueGiftModel {
29141    #[allow(rustdoc::invalid_html_tags)]
29142    #[doc = "Name of the model"]
29143    #[serde(rename = "name")]
29144    pub name: String,
29145    #[allow(rustdoc::invalid_html_tags)]
29146    #[doc = "The sticker that represents the unique gift"]
29147    #[serde(rename = "sticker")]
29148    pub sticker: BoxWrapper<Unbox<Sticker>>,
29149    #[allow(rustdoc::invalid_html_tags)]
29150    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
29151    #[serde(rename = "rarity_per_mille")]
29152    pub rarity_per_mille: i64,
29153}
29154#[allow(rustdoc::invalid_html_tags)]
29155#[doc = "Companion type to UniqueGiftModel that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29156#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29157pub struct NoSkipUniqueGiftModel {
29158    #[allow(rustdoc::invalid_html_tags)]
29159    #[doc = "Name of the model"]
29160    #[serde(rename = "name")]
29161    pub name: String,
29162    #[allow(rustdoc::invalid_html_tags)]
29163    #[doc = "The sticker that represents the unique gift"]
29164    #[serde(rename = "sticker")]
29165    pub sticker: BoxWrapper<Unbox<Sticker>>,
29166    #[allow(rustdoc::invalid_html_tags)]
29167    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
29168    #[serde(rename = "rarity_per_mille")]
29169    pub rarity_per_mille: i64,
29170}
29171impl From<NoSkipUniqueGiftModel> for UniqueGiftModel {
29172    fn from(t: NoSkipUniqueGiftModel) -> Self {
29173        Self {
29174            name: t.name,
29175            sticker: t.sticker,
29176            rarity_per_mille: t.rarity_per_mille,
29177        }
29178    }
29179}
29180#[allow(clippy::from_over_into)]
29181impl Into<NoSkipUniqueGiftModel> for UniqueGiftModel {
29182    fn into(self) -> NoSkipUniqueGiftModel {
29183        NoSkipUniqueGiftModel {
29184            name: self.name,
29185            sticker: self.sticker,
29186            rarity_per_mille: self.rarity_per_mille,
29187        }
29188    }
29189}
29190impl NoSkipUniqueGiftModel {
29191    pub fn skip(self) -> UniqueGiftModel {
29192        self.into()
29193    }
29194}
29195impl UniqueGiftModel {
29196    pub fn noskip(self) -> NoSkipUniqueGiftModel {
29197        self.into()
29198    }
29199}
29200#[allow(rustdoc::invalid_html_tags)]
29201#[doc = "This object describes the model of a unique gift."]
29202#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29203pub struct UniqueGiftModelBuilder {
29204    #[allow(rustdoc::invalid_html_tags)]
29205    #[doc = "Name of the model"]
29206    #[serde(rename = "name")]
29207    pub name: String,
29208    #[allow(rustdoc::invalid_html_tags)]
29209    #[doc = "The sticker that represents the unique gift"]
29210    #[serde(rename = "sticker")]
29211    pub sticker: BoxWrapper<Unbox<Sticker>>,
29212    #[allow(rustdoc::invalid_html_tags)]
29213    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
29214    #[serde(rename = "rarity_per_mille")]
29215    pub rarity_per_mille: i64,
29216}
29217impl UniqueGiftModelBuilder {
29218    #[allow(clippy::too_many_arguments)]
29219    pub fn new<A: Into<Sticker>>(name: String, sticker: A, rarity_per_mille: i64) -> Self {
29220        Self {
29221            name,
29222            sticker: BoxWrapper::new_unbox(sticker.into()),
29223            rarity_per_mille,
29224        }
29225    }
29226    #[allow(rustdoc::invalid_html_tags)]
29227    #[doc = "Name of the model"]
29228    pub fn set_name(mut self, name: String) -> Self {
29229        self.name = name;
29230        self
29231    }
29232    #[allow(rustdoc::invalid_html_tags)]
29233    #[doc = "The sticker that represents the unique gift"]
29234    pub fn set_sticker(mut self, sticker: Sticker) -> Self {
29235        self.sticker = BoxWrapper(Unbox(sticker));
29236        self
29237    }
29238    #[allow(rustdoc::invalid_html_tags)]
29239    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
29240    pub fn set_rarity_per_mille(mut self, rarity_per_mille: i64) -> Self {
29241        self.rarity_per_mille = rarity_per_mille;
29242        self
29243    }
29244    pub fn build(self) -> UniqueGiftModel {
29245        UniqueGiftModel {
29246            name: self.name,
29247            sticker: self.sticker,
29248            rarity_per_mille: self.rarity_per_mille,
29249        }
29250    }
29251}
29252#[allow(rustdoc::invalid_html_tags)]
29253#[doc = "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account."]
29254#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29255pub struct ForceReply {
29256    #[allow(rustdoc::invalid_html_tags)]
29257    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
29258    #[serde(rename = "force_reply")]
29259    pub force_reply: bool,
29260    #[allow(rustdoc::invalid_html_tags)]
29261    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
29262    #[serde(
29263        skip_serializing_if = "Option::is_none",
29264        rename = "input_field_placeholder",
29265        default
29266    )]
29267    pub input_field_placeholder: Option<String>,
29268    #[allow(rustdoc::invalid_html_tags)]
29269    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
29270    #[serde(skip_serializing_if = "Option::is_none", rename = "selective", default)]
29271    pub selective: Option<bool>,
29272}
29273#[allow(rustdoc::invalid_html_tags)]
29274#[doc = "Companion type to ForceReply that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29275#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29276pub struct NoSkipForceReply {
29277    #[allow(rustdoc::invalid_html_tags)]
29278    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
29279    #[serde(rename = "force_reply")]
29280    pub force_reply: bool,
29281    pub input_field_placeholder: Option<String>,
29282    pub selective: Option<bool>,
29283}
29284impl From<NoSkipForceReply> for ForceReply {
29285    fn from(t: NoSkipForceReply) -> Self {
29286        Self {
29287            force_reply: t.force_reply,
29288            input_field_placeholder: t.input_field_placeholder,
29289            selective: t.selective,
29290        }
29291    }
29292}
29293#[allow(clippy::from_over_into)]
29294impl Into<NoSkipForceReply> for ForceReply {
29295    fn into(self) -> NoSkipForceReply {
29296        NoSkipForceReply {
29297            force_reply: self.force_reply,
29298            input_field_placeholder: self.input_field_placeholder,
29299            selective: self.selective,
29300        }
29301    }
29302}
29303impl NoSkipForceReply {
29304    pub fn skip(self) -> ForceReply {
29305        self.into()
29306    }
29307}
29308impl ForceReply {
29309    pub fn noskip(self) -> NoSkipForceReply {
29310        self.into()
29311    }
29312}
29313#[allow(rustdoc::invalid_html_tags)]
29314#[doc = "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account."]
29315#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29316pub struct ForceReplyBuilder {
29317    #[allow(rustdoc::invalid_html_tags)]
29318    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
29319    #[serde(rename = "force_reply")]
29320    pub force_reply: bool,
29321    #[allow(rustdoc::invalid_html_tags)]
29322    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
29323    #[serde(
29324        skip_serializing_if = "Option::is_none",
29325        rename = "input_field_placeholder",
29326        default
29327    )]
29328    pub input_field_placeholder: Option<String>,
29329    #[allow(rustdoc::invalid_html_tags)]
29330    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
29331    #[serde(skip_serializing_if = "Option::is_none", rename = "selective", default)]
29332    pub selective: Option<bool>,
29333}
29334impl ForceReplyBuilder {
29335    #[allow(clippy::too_many_arguments)]
29336    pub fn new(force_reply: bool) -> Self {
29337        Self {
29338            force_reply,
29339            input_field_placeholder: None,
29340            selective: None,
29341        }
29342    }
29343    #[allow(rustdoc::invalid_html_tags)]
29344    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
29345    pub fn set_force_reply(mut self, force_reply: bool) -> Self {
29346        self.force_reply = force_reply;
29347        self
29348    }
29349    #[allow(rustdoc::invalid_html_tags)]
29350    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
29351    pub fn set_input_field_placeholder(mut self, input_field_placeholder: String) -> Self {
29352        self.input_field_placeholder = Some(input_field_placeholder);
29353        self
29354    }
29355    #[allow(rustdoc::invalid_html_tags)]
29356    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
29357    pub fn set_selective(mut self, selective: bool) -> Self {
29358        self.selective = Some(selective);
29359        self
29360    }
29361    pub fn build(self) -> ForceReply {
29362        ForceReply {
29363            force_reply: self.force_reply,
29364            input_field_placeholder: self.input_field_placeholder,
29365            selective: self.selective,
29366        }
29367    }
29368}
29369#[allow(rustdoc::invalid_html_tags)]
29370#[doc = "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control."]
29371#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29372pub struct StarTransaction {
29373    #[allow(rustdoc::invalid_html_tags)]
29374    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
29375    #[serde(rename = "id")]
29376    pub id: String,
29377    #[allow(rustdoc::invalid_html_tags)]
29378    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
29379    #[serde(rename = "amount")]
29380    pub amount: i64,
29381    #[allow(rustdoc::invalid_html_tags)]
29382    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
29383    #[serde(
29384        skip_serializing_if = "Option::is_none",
29385        rename = "nanostar_amount",
29386        default
29387    )]
29388    pub nanostar_amount: Option<i64>,
29389    #[allow(rustdoc::invalid_html_tags)]
29390    #[doc = "Date the transaction was created in Unix time"]
29391    #[serde(rename = "date")]
29392    pub date: i64,
29393    #[allow(rustdoc::invalid_html_tags)]
29394    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
29395    #[serde(skip_serializing_if = "Option::is_none", rename = "source", default)]
29396    pub source: Option<BoxWrapper<Unbox<TransactionPartner>>>,
29397    #[allow(rustdoc::invalid_html_tags)]
29398    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
29399    #[serde(skip_serializing_if = "Option::is_none", rename = "receiver", default)]
29400    pub receiver: Option<BoxWrapper<Unbox<TransactionPartner>>>,
29401}
29402#[allow(rustdoc::invalid_html_tags)]
29403#[doc = "Companion type to StarTransaction that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29404#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29405pub struct NoSkipStarTransaction {
29406    #[allow(rustdoc::invalid_html_tags)]
29407    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
29408    #[serde(rename = "id")]
29409    pub id: String,
29410    #[allow(rustdoc::invalid_html_tags)]
29411    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
29412    #[serde(rename = "amount")]
29413    pub amount: i64,
29414    pub nanostar_amount: Option<i64>,
29415    #[allow(rustdoc::invalid_html_tags)]
29416    #[doc = "Date the transaction was created in Unix time"]
29417    #[serde(rename = "date")]
29418    pub date: i64,
29419    pub source: Option<BoxWrapper<Unbox<TransactionPartner>>>,
29420    pub receiver: Option<BoxWrapper<Unbox<TransactionPartner>>>,
29421}
29422impl From<NoSkipStarTransaction> for StarTransaction {
29423    fn from(t: NoSkipStarTransaction) -> Self {
29424        Self {
29425            id: t.id,
29426            amount: t.amount,
29427            nanostar_amount: t.nanostar_amount,
29428            date: t.date,
29429            source: t.source,
29430            receiver: t.receiver,
29431        }
29432    }
29433}
29434#[allow(clippy::from_over_into)]
29435impl Into<NoSkipStarTransaction> for StarTransaction {
29436    fn into(self) -> NoSkipStarTransaction {
29437        NoSkipStarTransaction {
29438            id: self.id,
29439            amount: self.amount,
29440            nanostar_amount: self.nanostar_amount,
29441            date: self.date,
29442            source: self.source,
29443            receiver: self.receiver,
29444        }
29445    }
29446}
29447impl NoSkipStarTransaction {
29448    pub fn skip(self) -> StarTransaction {
29449        self.into()
29450    }
29451}
29452impl StarTransaction {
29453    pub fn noskip(self) -> NoSkipStarTransaction {
29454        self.into()
29455    }
29456}
29457#[allow(rustdoc::invalid_html_tags)]
29458#[doc = "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control."]
29459#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29460pub struct StarTransactionBuilder {
29461    #[allow(rustdoc::invalid_html_tags)]
29462    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
29463    #[serde(rename = "id")]
29464    pub id: String,
29465    #[allow(rustdoc::invalid_html_tags)]
29466    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
29467    #[serde(rename = "amount")]
29468    pub amount: i64,
29469    #[allow(rustdoc::invalid_html_tags)]
29470    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
29471    #[serde(
29472        skip_serializing_if = "Option::is_none",
29473        rename = "nanostar_amount",
29474        default
29475    )]
29476    pub nanostar_amount: Option<i64>,
29477    #[allow(rustdoc::invalid_html_tags)]
29478    #[doc = "Date the transaction was created in Unix time"]
29479    #[serde(rename = "date")]
29480    pub date: i64,
29481    #[allow(rustdoc::invalid_html_tags)]
29482    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
29483    #[serde(skip_serializing_if = "Option::is_none", rename = "source", default)]
29484    pub source: Option<BoxWrapper<Unbox<TransactionPartner>>>,
29485    #[allow(rustdoc::invalid_html_tags)]
29486    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
29487    #[serde(skip_serializing_if = "Option::is_none", rename = "receiver", default)]
29488    pub receiver: Option<BoxWrapper<Unbox<TransactionPartner>>>,
29489}
29490impl StarTransactionBuilder {
29491    #[allow(clippy::too_many_arguments)]
29492    pub fn new(id: String, amount: i64, date: i64) -> Self {
29493        Self {
29494            id,
29495            amount,
29496            date,
29497            nanostar_amount: None,
29498            source: None,
29499            receiver: None,
29500        }
29501    }
29502    #[allow(rustdoc::invalid_html_tags)]
29503    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
29504    pub fn set_id(mut self, id: String) -> Self {
29505        self.id = id;
29506        self
29507    }
29508    #[allow(rustdoc::invalid_html_tags)]
29509    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
29510    pub fn set_amount(mut self, amount: i64) -> Self {
29511        self.amount = amount;
29512        self
29513    }
29514    #[allow(rustdoc::invalid_html_tags)]
29515    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
29516    pub fn set_nanostar_amount(mut self, nanostar_amount: i64) -> Self {
29517        self.nanostar_amount = Some(nanostar_amount);
29518        self
29519    }
29520    #[allow(rustdoc::invalid_html_tags)]
29521    #[doc = "Date the transaction was created in Unix time"]
29522    pub fn set_date(mut self, date: i64) -> Self {
29523        self.date = date;
29524        self
29525    }
29526    #[allow(rustdoc::invalid_html_tags)]
29527    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
29528    pub fn set_source(mut self, source: TransactionPartner) -> Self {
29529        self.source = Some(BoxWrapper(Unbox(source)));
29530        self
29531    }
29532    #[allow(rustdoc::invalid_html_tags)]
29533    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
29534    pub fn set_receiver(mut self, receiver: TransactionPartner) -> Self {
29535        self.receiver = Some(BoxWrapper(Unbox(receiver)));
29536        self
29537    }
29538    pub fn build(self) -> StarTransaction {
29539        StarTransaction {
29540            id: self.id,
29541            amount: self.amount,
29542            nanostar_amount: self.nanostar_amount,
29543            date: self.date,
29544            source: self.source,
29545            receiver: self.receiver,
29546        }
29547    }
29548}
29549#[allow(rustdoc::invalid_html_tags)]
29550#[doc = "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes."]
29551#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29552pub struct PassportElementErrorDataField {
29553    #[allow(rustdoc::invalid_html_tags)]
29554    #[doc = "Error source, must be data"]
29555    #[serde(rename = "source")]
29556    pub source: String,
29557    #[allow(rustdoc::invalid_html_tags)]
29558    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
29559    #[serde(rename = "type")]
29560    pub tg_type: String,
29561    #[allow(rustdoc::invalid_html_tags)]
29562    #[doc = "Name of the data field which has the error"]
29563    #[serde(rename = "field_name")]
29564    pub field_name: String,
29565    #[allow(rustdoc::invalid_html_tags)]
29566    #[doc = "Base64-encoded data hash"]
29567    #[serde(rename = "data_hash")]
29568    pub data_hash: String,
29569    #[allow(rustdoc::invalid_html_tags)]
29570    #[doc = "Error message"]
29571    #[serde(rename = "message")]
29572    pub message: String,
29573}
29574#[allow(rustdoc::invalid_html_tags)]
29575#[doc = "Companion type to PassportElementErrorDataField that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29576#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29577pub struct NoSkipPassportElementErrorDataField {
29578    #[allow(rustdoc::invalid_html_tags)]
29579    #[doc = "Error source, must be data"]
29580    #[serde(rename = "source")]
29581    pub source: String,
29582    #[allow(rustdoc::invalid_html_tags)]
29583    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
29584    #[serde(rename = "type")]
29585    pub tg_type: String,
29586    #[allow(rustdoc::invalid_html_tags)]
29587    #[doc = "Name of the data field which has the error"]
29588    #[serde(rename = "field_name")]
29589    pub field_name: String,
29590    #[allow(rustdoc::invalid_html_tags)]
29591    #[doc = "Base64-encoded data hash"]
29592    #[serde(rename = "data_hash")]
29593    pub data_hash: String,
29594    #[allow(rustdoc::invalid_html_tags)]
29595    #[doc = "Error message"]
29596    #[serde(rename = "message")]
29597    pub message: String,
29598}
29599impl From<NoSkipPassportElementErrorDataField> for PassportElementErrorDataField {
29600    fn from(t: NoSkipPassportElementErrorDataField) -> Self {
29601        Self {
29602            source: t.source,
29603            tg_type: t.tg_type,
29604            field_name: t.field_name,
29605            data_hash: t.data_hash,
29606            message: t.message,
29607        }
29608    }
29609}
29610#[allow(clippy::from_over_into)]
29611impl Into<NoSkipPassportElementErrorDataField> for PassportElementErrorDataField {
29612    fn into(self) -> NoSkipPassportElementErrorDataField {
29613        NoSkipPassportElementErrorDataField {
29614            source: self.source,
29615            tg_type: self.tg_type,
29616            field_name: self.field_name,
29617            data_hash: self.data_hash,
29618            message: self.message,
29619        }
29620    }
29621}
29622impl NoSkipPassportElementErrorDataField {
29623    pub fn skip(self) -> PassportElementErrorDataField {
29624        self.into()
29625    }
29626}
29627impl PassportElementErrorDataField {
29628    pub fn noskip(self) -> NoSkipPassportElementErrorDataField {
29629        self.into()
29630    }
29631}
29632#[allow(rustdoc::invalid_html_tags)]
29633#[doc = "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes."]
29634#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29635pub struct PassportElementErrorDataFieldBuilder {
29636    #[allow(rustdoc::invalid_html_tags)]
29637    #[doc = "Error source, must be data"]
29638    #[serde(rename = "source")]
29639    pub source: String,
29640    #[allow(rustdoc::invalid_html_tags)]
29641    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
29642    #[serde(rename = "type")]
29643    pub tg_type: String,
29644    #[allow(rustdoc::invalid_html_tags)]
29645    #[doc = "Name of the data field which has the error"]
29646    #[serde(rename = "field_name")]
29647    pub field_name: String,
29648    #[allow(rustdoc::invalid_html_tags)]
29649    #[doc = "Base64-encoded data hash"]
29650    #[serde(rename = "data_hash")]
29651    pub data_hash: String,
29652    #[allow(rustdoc::invalid_html_tags)]
29653    #[doc = "Error message"]
29654    #[serde(rename = "message")]
29655    pub message: String,
29656}
29657impl PassportElementErrorDataFieldBuilder {
29658    #[allow(clippy::too_many_arguments)]
29659    pub fn new(source: String, field_name: String, data_hash: String, message: String) -> Self {
29660        Self {
29661            tg_type: "PassportElementErrorDataField".to_owned(),
29662            source,
29663            field_name,
29664            data_hash,
29665            message,
29666        }
29667    }
29668    #[allow(rustdoc::invalid_html_tags)]
29669    #[doc = "Error source, must be data"]
29670    pub fn set_source(mut self, source: String) -> Self {
29671        self.source = source;
29672        self
29673    }
29674    #[allow(rustdoc::invalid_html_tags)]
29675    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
29676    pub fn set_type(mut self, tg_type: String) -> Self {
29677        self.tg_type = tg_type;
29678        self
29679    }
29680    #[allow(rustdoc::invalid_html_tags)]
29681    #[doc = "Name of the data field which has the error"]
29682    pub fn set_field_name(mut self, field_name: String) -> Self {
29683        self.field_name = field_name;
29684        self
29685    }
29686    #[allow(rustdoc::invalid_html_tags)]
29687    #[doc = "Base64-encoded data hash"]
29688    pub fn set_data_hash(mut self, data_hash: String) -> Self {
29689        self.data_hash = data_hash;
29690        self
29691    }
29692    #[allow(rustdoc::invalid_html_tags)]
29693    #[doc = "Error message"]
29694    pub fn set_message(mut self, message: String) -> Self {
29695        self.message = message;
29696        self
29697    }
29698    pub fn build(self) -> PassportElementErrorDataField {
29699        PassportElementErrorDataField {
29700            source: self.source,
29701            tg_type: self.tg_type,
29702            field_name: self.field_name,
29703            data_hash: self.data_hash,
29704            message: self.message,
29705        }
29706    }
29707}
29708#[allow(rustdoc::invalid_html_tags)]
29709#[doc = "This object contains information about a chat boost."]
29710#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29711pub struct ChatBoost {
29712    #[allow(rustdoc::invalid_html_tags)]
29713    #[doc = "Unique identifier of the boost"]
29714    #[serde(rename = "boost_id")]
29715    pub boost_id: String,
29716    #[allow(rustdoc::invalid_html_tags)]
29717    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
29718    #[serde(rename = "add_date")]
29719    pub add_date: i64,
29720    #[allow(rustdoc::invalid_html_tags)]
29721    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
29722    #[serde(rename = "expiration_date")]
29723    pub expiration_date: i64,
29724    #[allow(rustdoc::invalid_html_tags)]
29725    #[doc = "Source of the added boost"]
29726    #[serde(rename = "source")]
29727    pub source: BoxWrapper<Unbox<ChatBoostSource>>,
29728}
29729#[allow(rustdoc::invalid_html_tags)]
29730#[doc = "Companion type to ChatBoost that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29731#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29732pub struct NoSkipChatBoost {
29733    #[allow(rustdoc::invalid_html_tags)]
29734    #[doc = "Unique identifier of the boost"]
29735    #[serde(rename = "boost_id")]
29736    pub boost_id: String,
29737    #[allow(rustdoc::invalid_html_tags)]
29738    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
29739    #[serde(rename = "add_date")]
29740    pub add_date: i64,
29741    #[allow(rustdoc::invalid_html_tags)]
29742    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
29743    #[serde(rename = "expiration_date")]
29744    pub expiration_date: i64,
29745    #[allow(rustdoc::invalid_html_tags)]
29746    #[doc = "Source of the added boost"]
29747    #[serde(rename = "source")]
29748    pub source: BoxWrapper<Unbox<ChatBoostSource>>,
29749}
29750impl From<NoSkipChatBoost> for ChatBoost {
29751    fn from(t: NoSkipChatBoost) -> Self {
29752        Self {
29753            boost_id: t.boost_id,
29754            add_date: t.add_date,
29755            expiration_date: t.expiration_date,
29756            source: t.source,
29757        }
29758    }
29759}
29760#[allow(clippy::from_over_into)]
29761impl Into<NoSkipChatBoost> for ChatBoost {
29762    fn into(self) -> NoSkipChatBoost {
29763        NoSkipChatBoost {
29764            boost_id: self.boost_id,
29765            add_date: self.add_date,
29766            expiration_date: self.expiration_date,
29767            source: self.source,
29768        }
29769    }
29770}
29771impl NoSkipChatBoost {
29772    pub fn skip(self) -> ChatBoost {
29773        self.into()
29774    }
29775}
29776impl ChatBoost {
29777    pub fn noskip(self) -> NoSkipChatBoost {
29778        self.into()
29779    }
29780}
29781#[allow(rustdoc::invalid_html_tags)]
29782#[doc = "This object contains information about a chat boost."]
29783#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29784pub struct ChatBoostBuilder {
29785    #[allow(rustdoc::invalid_html_tags)]
29786    #[doc = "Unique identifier of the boost"]
29787    #[serde(rename = "boost_id")]
29788    pub boost_id: String,
29789    #[allow(rustdoc::invalid_html_tags)]
29790    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
29791    #[serde(rename = "add_date")]
29792    pub add_date: i64,
29793    #[allow(rustdoc::invalid_html_tags)]
29794    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
29795    #[serde(rename = "expiration_date")]
29796    pub expiration_date: i64,
29797    #[allow(rustdoc::invalid_html_tags)]
29798    #[doc = "Source of the added boost"]
29799    #[serde(rename = "source")]
29800    pub source: BoxWrapper<Unbox<ChatBoostSource>>,
29801}
29802impl ChatBoostBuilder {
29803    #[allow(clippy::too_many_arguments)]
29804    pub fn new<A: Into<ChatBoostSource>>(
29805        boost_id: String,
29806        add_date: i64,
29807        expiration_date: i64,
29808        source: A,
29809    ) -> Self {
29810        Self {
29811            boost_id,
29812            add_date,
29813            expiration_date,
29814            source: BoxWrapper::new_unbox(source.into()),
29815        }
29816    }
29817    #[allow(rustdoc::invalid_html_tags)]
29818    #[doc = "Unique identifier of the boost"]
29819    pub fn set_boost_id(mut self, boost_id: String) -> Self {
29820        self.boost_id = boost_id;
29821        self
29822    }
29823    #[allow(rustdoc::invalid_html_tags)]
29824    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
29825    pub fn set_add_date(mut self, add_date: i64) -> Self {
29826        self.add_date = add_date;
29827        self
29828    }
29829    #[allow(rustdoc::invalid_html_tags)]
29830    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
29831    pub fn set_expiration_date(mut self, expiration_date: i64) -> Self {
29832        self.expiration_date = expiration_date;
29833        self
29834    }
29835    #[allow(rustdoc::invalid_html_tags)]
29836    #[doc = "Source of the added boost"]
29837    pub fn set_source(mut self, source: ChatBoostSource) -> Self {
29838        self.source = BoxWrapper(Unbox(source));
29839        self
29840    }
29841    pub fn build(self) -> ChatBoost {
29842        ChatBoost {
29843            boost_id: self.boost_id,
29844            add_date: self.add_date,
29845            expiration_date: self.expiration_date,
29846            source: self.source,
29847        }
29848    }
29849}
29850#[allow(rustdoc::invalid_html_tags)]
29851#[doc = "This object represents one shipping option."]
29852#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29853pub struct ShippingOption {
29854    #[allow(rustdoc::invalid_html_tags)]
29855    #[doc = "Shipping option identifier"]
29856    #[serde(rename = "id")]
29857    pub id: String,
29858    #[allow(rustdoc::invalid_html_tags)]
29859    #[doc = "Option title"]
29860    #[serde(rename = "title")]
29861    pub title: String,
29862    #[allow(rustdoc::invalid_html_tags)]
29863    #[doc = "List of price portions"]
29864    #[serde(rename = "prices")]
29865    pub prices: Vec<LabeledPrice>,
29866}
29867#[allow(rustdoc::invalid_html_tags)]
29868#[doc = "Companion type to ShippingOption that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29869#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29870pub struct NoSkipShippingOption {
29871    #[allow(rustdoc::invalid_html_tags)]
29872    #[doc = "Shipping option identifier"]
29873    #[serde(rename = "id")]
29874    pub id: String,
29875    #[allow(rustdoc::invalid_html_tags)]
29876    #[doc = "Option title"]
29877    #[serde(rename = "title")]
29878    pub title: String,
29879    #[allow(rustdoc::invalid_html_tags)]
29880    #[doc = "List of price portions"]
29881    #[serde(rename = "prices")]
29882    pub prices: Vec<LabeledPrice>,
29883}
29884impl From<NoSkipShippingOption> for ShippingOption {
29885    fn from(t: NoSkipShippingOption) -> Self {
29886        Self {
29887            id: t.id,
29888            title: t.title,
29889            prices: t.prices,
29890        }
29891    }
29892}
29893#[allow(clippy::from_over_into)]
29894impl Into<NoSkipShippingOption> for ShippingOption {
29895    fn into(self) -> NoSkipShippingOption {
29896        NoSkipShippingOption {
29897            id: self.id,
29898            title: self.title,
29899            prices: self.prices,
29900        }
29901    }
29902}
29903impl NoSkipShippingOption {
29904    pub fn skip(self) -> ShippingOption {
29905        self.into()
29906    }
29907}
29908impl ShippingOption {
29909    pub fn noskip(self) -> NoSkipShippingOption {
29910        self.into()
29911    }
29912}
29913#[allow(rustdoc::invalid_html_tags)]
29914#[doc = "This object represents one shipping option."]
29915#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29916pub struct ShippingOptionBuilder {
29917    #[allow(rustdoc::invalid_html_tags)]
29918    #[doc = "Shipping option identifier"]
29919    #[serde(rename = "id")]
29920    pub id: String,
29921    #[allow(rustdoc::invalid_html_tags)]
29922    #[doc = "Option title"]
29923    #[serde(rename = "title")]
29924    pub title: String,
29925    #[allow(rustdoc::invalid_html_tags)]
29926    #[doc = "List of price portions"]
29927    #[serde(rename = "prices")]
29928    pub prices: Vec<LabeledPrice>,
29929}
29930impl ShippingOptionBuilder {
29931    #[allow(clippy::too_many_arguments)]
29932    pub fn new(id: String, title: String, prices: Vec<LabeledPrice>) -> Self {
29933        Self { id, title, prices }
29934    }
29935    #[allow(rustdoc::invalid_html_tags)]
29936    #[doc = "Shipping option identifier"]
29937    pub fn set_id(mut self, id: String) -> Self {
29938        self.id = id;
29939        self
29940    }
29941    #[allow(rustdoc::invalid_html_tags)]
29942    #[doc = "Option title"]
29943    pub fn set_title(mut self, title: String) -> Self {
29944        self.title = title;
29945        self
29946    }
29947    #[allow(rustdoc::invalid_html_tags)]
29948    #[doc = "List of price portions"]
29949    pub fn set_prices(mut self, prices: Vec<LabeledPrice>) -> Self {
29950        self.prices = prices;
29951        self
29952    }
29953    pub fn build(self) -> ShippingOption {
29954        ShippingOption {
29955            id: self.id,
29956            title: self.title,
29957            prices: self.prices,
29958        }
29959    }
29960}
29961#[allow(rustdoc::invalid_html_tags)]
29962#[doc = "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes."]
29963#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29964pub struct PassportElementErrorFrontSide {
29965    #[allow(rustdoc::invalid_html_tags)]
29966    #[doc = "Error source, must be front_side"]
29967    #[serde(rename = "source")]
29968    pub source: String,
29969    #[allow(rustdoc::invalid_html_tags)]
29970    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
29971    #[serde(rename = "type")]
29972    pub tg_type: String,
29973    #[allow(rustdoc::invalid_html_tags)]
29974    #[doc = "Base64-encoded hash of the file with the front side of the document"]
29975    #[serde(rename = "file_hash")]
29976    pub file_hash: String,
29977    #[allow(rustdoc::invalid_html_tags)]
29978    #[doc = "Error message"]
29979    #[serde(rename = "message")]
29980    pub message: String,
29981}
29982#[allow(rustdoc::invalid_html_tags)]
29983#[doc = "Companion type to PassportElementErrorFrontSide that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
29984#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
29985pub struct NoSkipPassportElementErrorFrontSide {
29986    #[allow(rustdoc::invalid_html_tags)]
29987    #[doc = "Error source, must be front_side"]
29988    #[serde(rename = "source")]
29989    pub source: String,
29990    #[allow(rustdoc::invalid_html_tags)]
29991    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
29992    #[serde(rename = "type")]
29993    pub tg_type: String,
29994    #[allow(rustdoc::invalid_html_tags)]
29995    #[doc = "Base64-encoded hash of the file with the front side of the document"]
29996    #[serde(rename = "file_hash")]
29997    pub file_hash: String,
29998    #[allow(rustdoc::invalid_html_tags)]
29999    #[doc = "Error message"]
30000    #[serde(rename = "message")]
30001    pub message: String,
30002}
30003impl From<NoSkipPassportElementErrorFrontSide> for PassportElementErrorFrontSide {
30004    fn from(t: NoSkipPassportElementErrorFrontSide) -> Self {
30005        Self {
30006            source: t.source,
30007            tg_type: t.tg_type,
30008            file_hash: t.file_hash,
30009            message: t.message,
30010        }
30011    }
30012}
30013#[allow(clippy::from_over_into)]
30014impl Into<NoSkipPassportElementErrorFrontSide> for PassportElementErrorFrontSide {
30015    fn into(self) -> NoSkipPassportElementErrorFrontSide {
30016        NoSkipPassportElementErrorFrontSide {
30017            source: self.source,
30018            tg_type: self.tg_type,
30019            file_hash: self.file_hash,
30020            message: self.message,
30021        }
30022    }
30023}
30024impl NoSkipPassportElementErrorFrontSide {
30025    pub fn skip(self) -> PassportElementErrorFrontSide {
30026        self.into()
30027    }
30028}
30029impl PassportElementErrorFrontSide {
30030    pub fn noskip(self) -> NoSkipPassportElementErrorFrontSide {
30031        self.into()
30032    }
30033}
30034#[allow(rustdoc::invalid_html_tags)]
30035#[doc = "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes."]
30036#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30037pub struct PassportElementErrorFrontSideBuilder {
30038    #[allow(rustdoc::invalid_html_tags)]
30039    #[doc = "Error source, must be front_side"]
30040    #[serde(rename = "source")]
30041    pub source: String,
30042    #[allow(rustdoc::invalid_html_tags)]
30043    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
30044    #[serde(rename = "type")]
30045    pub tg_type: String,
30046    #[allow(rustdoc::invalid_html_tags)]
30047    #[doc = "Base64-encoded hash of the file with the front side of the document"]
30048    #[serde(rename = "file_hash")]
30049    pub file_hash: String,
30050    #[allow(rustdoc::invalid_html_tags)]
30051    #[doc = "Error message"]
30052    #[serde(rename = "message")]
30053    pub message: String,
30054}
30055impl PassportElementErrorFrontSideBuilder {
30056    #[allow(clippy::too_many_arguments)]
30057    pub fn new(source: String, file_hash: String, message: String) -> Self {
30058        Self {
30059            tg_type: "PassportElementErrorFrontSide".to_owned(),
30060            source,
30061            file_hash,
30062            message,
30063        }
30064    }
30065    #[allow(rustdoc::invalid_html_tags)]
30066    #[doc = "Error source, must be front_side"]
30067    pub fn set_source(mut self, source: String) -> Self {
30068        self.source = source;
30069        self
30070    }
30071    #[allow(rustdoc::invalid_html_tags)]
30072    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
30073    pub fn set_type(mut self, tg_type: String) -> Self {
30074        self.tg_type = tg_type;
30075        self
30076    }
30077    #[allow(rustdoc::invalid_html_tags)]
30078    #[doc = "Base64-encoded hash of the file with the front side of the document"]
30079    pub fn set_file_hash(mut self, file_hash: String) -> Self {
30080        self.file_hash = file_hash;
30081        self
30082    }
30083    #[allow(rustdoc::invalid_html_tags)]
30084    #[doc = "Error message"]
30085    pub fn set_message(mut self, message: String) -> Self {
30086        self.message = message;
30087        self
30088    }
30089    pub fn build(self) -> PassportElementErrorFrontSide {
30090        PassportElementErrorFrontSide {
30091            source: self.source,
30092            tg_type: self.tg_type,
30093            file_hash: self.file_hash,
30094            message: self.message,
30095        }
30096    }
30097}
30098#[allow(rustdoc::invalid_html_tags)]
30099#[doc = "Describes the opening hours of a business."]
30100#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30101pub struct BusinessOpeningHours {
30102    #[allow(rustdoc::invalid_html_tags)]
30103    #[doc = "Unique name of the time zone for which the opening hours are defined"]
30104    #[serde(rename = "time_zone_name")]
30105    pub time_zone_name: String,
30106    #[allow(rustdoc::invalid_html_tags)]
30107    #[doc = "List of time intervals describing business opening hours"]
30108    #[serde(rename = "opening_hours")]
30109    pub opening_hours: Vec<BusinessOpeningHoursInterval>,
30110}
30111#[allow(rustdoc::invalid_html_tags)]
30112#[doc = "Companion type to BusinessOpeningHours that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30113#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30114pub struct NoSkipBusinessOpeningHours {
30115    #[allow(rustdoc::invalid_html_tags)]
30116    #[doc = "Unique name of the time zone for which the opening hours are defined"]
30117    #[serde(rename = "time_zone_name")]
30118    pub time_zone_name: String,
30119    #[allow(rustdoc::invalid_html_tags)]
30120    #[doc = "List of time intervals describing business opening hours"]
30121    #[serde(rename = "opening_hours")]
30122    pub opening_hours: Vec<BusinessOpeningHoursInterval>,
30123}
30124impl From<NoSkipBusinessOpeningHours> for BusinessOpeningHours {
30125    fn from(t: NoSkipBusinessOpeningHours) -> Self {
30126        Self {
30127            time_zone_name: t.time_zone_name,
30128            opening_hours: t.opening_hours,
30129        }
30130    }
30131}
30132#[allow(clippy::from_over_into)]
30133impl Into<NoSkipBusinessOpeningHours> for BusinessOpeningHours {
30134    fn into(self) -> NoSkipBusinessOpeningHours {
30135        NoSkipBusinessOpeningHours {
30136            time_zone_name: self.time_zone_name,
30137            opening_hours: self.opening_hours,
30138        }
30139    }
30140}
30141impl NoSkipBusinessOpeningHours {
30142    pub fn skip(self) -> BusinessOpeningHours {
30143        self.into()
30144    }
30145}
30146impl BusinessOpeningHours {
30147    pub fn noskip(self) -> NoSkipBusinessOpeningHours {
30148        self.into()
30149    }
30150}
30151#[allow(rustdoc::invalid_html_tags)]
30152#[doc = "Describes the opening hours of a business."]
30153#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30154pub struct BusinessOpeningHoursBuilder {
30155    #[allow(rustdoc::invalid_html_tags)]
30156    #[doc = "Unique name of the time zone for which the opening hours are defined"]
30157    #[serde(rename = "time_zone_name")]
30158    pub time_zone_name: String,
30159    #[allow(rustdoc::invalid_html_tags)]
30160    #[doc = "List of time intervals describing business opening hours"]
30161    #[serde(rename = "opening_hours")]
30162    pub opening_hours: Vec<BusinessOpeningHoursInterval>,
30163}
30164impl BusinessOpeningHoursBuilder {
30165    #[allow(clippy::too_many_arguments)]
30166    pub fn new(time_zone_name: String, opening_hours: Vec<BusinessOpeningHoursInterval>) -> Self {
30167        Self {
30168            time_zone_name,
30169            opening_hours,
30170        }
30171    }
30172    #[allow(rustdoc::invalid_html_tags)]
30173    #[doc = "Unique name of the time zone for which the opening hours are defined"]
30174    pub fn set_time_zone_name(mut self, time_zone_name: String) -> Self {
30175        self.time_zone_name = time_zone_name;
30176        self
30177    }
30178    #[allow(rustdoc::invalid_html_tags)]
30179    #[doc = "List of time intervals describing business opening hours"]
30180    pub fn set_opening_hours(mut self, opening_hours: Vec<BusinessOpeningHoursInterval>) -> Self {
30181        self.opening_hours = opening_hours;
30182        self
30183    }
30184    pub fn build(self) -> BusinessOpeningHours {
30185        BusinessOpeningHours {
30186            time_zone_name: self.time_zone_name,
30187            opening_hours: self.opening_hours,
30188        }
30189    }
30190}
30191#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30192#[serde(untagged)]
30193pub enum ReactionType {
30194    ReactionTypeEmoji(ReactionTypeEmoji),
30195    ReactionTypeCustomEmoji(ReactionTypeCustomEmoji),
30196    ReactionTypePaid(ReactionTypePaid),
30197}
30198impl Default for ReactionType {
30199    fn default() -> Self {
30200        ReactionType::ReactionTypeEmoji(ReactionTypeEmoji::default())
30201    }
30202}
30203impl ReactionType {}
30204#[allow(rustdoc::invalid_html_tags)]
30205#[doc = "This object represents a story."]
30206#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30207pub struct Story {
30208    #[allow(rustdoc::invalid_html_tags)]
30209    #[doc = "Chat that posted the story"]
30210    #[serde(rename = "chat")]
30211    pub chat: BoxWrapper<Unbox<Chat>>,
30212    #[allow(rustdoc::invalid_html_tags)]
30213    #[doc = "Unique identifier for the story in the chat"]
30214    #[serde(rename = "id")]
30215    pub id: i64,
30216}
30217#[allow(rustdoc::invalid_html_tags)]
30218#[doc = "Companion type to Story that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30219#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30220pub struct NoSkipStory {
30221    #[allow(rustdoc::invalid_html_tags)]
30222    #[doc = "Chat that posted the story"]
30223    #[serde(rename = "chat")]
30224    pub chat: BoxWrapper<Unbox<Chat>>,
30225    #[allow(rustdoc::invalid_html_tags)]
30226    #[doc = "Unique identifier for the story in the chat"]
30227    #[serde(rename = "id")]
30228    pub id: i64,
30229}
30230impl From<NoSkipStory> for Story {
30231    fn from(t: NoSkipStory) -> Self {
30232        Self {
30233            chat: t.chat,
30234            id: t.id,
30235        }
30236    }
30237}
30238#[allow(clippy::from_over_into)]
30239impl Into<NoSkipStory> for Story {
30240    fn into(self) -> NoSkipStory {
30241        NoSkipStory {
30242            chat: self.chat,
30243            id: self.id,
30244        }
30245    }
30246}
30247impl NoSkipStory {
30248    pub fn skip(self) -> Story {
30249        self.into()
30250    }
30251}
30252impl Story {
30253    pub fn noskip(self) -> NoSkipStory {
30254        self.into()
30255    }
30256}
30257#[allow(rustdoc::invalid_html_tags)]
30258#[doc = "This object represents a story."]
30259#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30260pub struct StoryBuilder {
30261    #[allow(rustdoc::invalid_html_tags)]
30262    #[doc = "Chat that posted the story"]
30263    #[serde(rename = "chat")]
30264    pub chat: BoxWrapper<Unbox<Chat>>,
30265    #[allow(rustdoc::invalid_html_tags)]
30266    #[doc = "Unique identifier for the story in the chat"]
30267    #[serde(rename = "id")]
30268    pub id: i64,
30269}
30270impl StoryBuilder {
30271    #[allow(clippy::too_many_arguments)]
30272    pub fn new<A: Into<Chat>>(chat: A, id: i64) -> Self {
30273        Self {
30274            chat: BoxWrapper::new_unbox(chat.into()),
30275            id,
30276        }
30277    }
30278    #[allow(rustdoc::invalid_html_tags)]
30279    #[doc = "Chat that posted the story"]
30280    pub fn set_chat(mut self, chat: Chat) -> Self {
30281        self.chat = BoxWrapper(Unbox(chat));
30282        self
30283    }
30284    #[allow(rustdoc::invalid_html_tags)]
30285    #[doc = "Unique identifier for the story in the chat"]
30286    pub fn set_id(mut self, id: i64) -> Self {
30287        self.id = id;
30288        self
30289    }
30290    pub fn build(self) -> Story {
30291        Story {
30292            chat: self.chat,
30293            id: self.id,
30294        }
30295    }
30296}
30297#[allow(rustdoc::invalid_html_tags)]
30298#[doc = "Describes a Web App."]
30299#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30300pub struct WebAppInfo {
30301    #[allow(rustdoc::invalid_html_tags)]
30302    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
30303    #[serde(rename = "url")]
30304    pub url: String,
30305}
30306#[allow(rustdoc::invalid_html_tags)]
30307#[doc = "Companion type to WebAppInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30308#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30309pub struct NoSkipWebAppInfo {
30310    #[allow(rustdoc::invalid_html_tags)]
30311    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
30312    #[serde(rename = "url")]
30313    pub url: String,
30314}
30315impl From<NoSkipWebAppInfo> for WebAppInfo {
30316    fn from(t: NoSkipWebAppInfo) -> Self {
30317        Self { url: t.url }
30318    }
30319}
30320#[allow(clippy::from_over_into)]
30321impl Into<NoSkipWebAppInfo> for WebAppInfo {
30322    fn into(self) -> NoSkipWebAppInfo {
30323        NoSkipWebAppInfo { url: self.url }
30324    }
30325}
30326impl NoSkipWebAppInfo {
30327    pub fn skip(self) -> WebAppInfo {
30328        self.into()
30329    }
30330}
30331impl WebAppInfo {
30332    pub fn noskip(self) -> NoSkipWebAppInfo {
30333        self.into()
30334    }
30335}
30336#[allow(rustdoc::invalid_html_tags)]
30337#[doc = "Describes a Web App."]
30338#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30339pub struct WebAppInfoBuilder {
30340    #[allow(rustdoc::invalid_html_tags)]
30341    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
30342    #[serde(rename = "url")]
30343    pub url: String,
30344}
30345impl WebAppInfoBuilder {
30346    #[allow(clippy::too_many_arguments)]
30347    pub fn new(url: String) -> Self {
30348        Self { url }
30349    }
30350    #[allow(rustdoc::invalid_html_tags)]
30351    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
30352    pub fn set_url(mut self, url: String) -> Self {
30353        self.url = url;
30354        self
30355    }
30356    pub fn build(self) -> WebAppInfo {
30357        WebAppInfo { url: self.url }
30358    }
30359}
30360#[allow(rustdoc::invalid_html_tags)]
30361#[doc = "Represents the scope of bot commands, covering a specific member of a group or supergroup chat."]
30362#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30363pub struct BotCommandScopeChatMember {
30364    #[allow(rustdoc::invalid_html_tags)]
30365    #[doc = "Scope type, must be chat_member"]
30366    #[serde(rename = "type")]
30367    pub tg_type: String,
30368    #[allow(rustdoc::invalid_html_tags)]
30369    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
30370    #[serde(rename = "chat_id")]
30371    pub chat_id: ChatHandle,
30372    #[allow(rustdoc::invalid_html_tags)]
30373    #[doc = "Unique identifier of the target user"]
30374    #[serde(rename = "user_id")]
30375    pub user_id: i64,
30376}
30377#[allow(rustdoc::invalid_html_tags)]
30378#[doc = "Companion type to BotCommandScopeChatMember that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30379#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30380pub struct NoSkipBotCommandScopeChatMember {
30381    #[allow(rustdoc::invalid_html_tags)]
30382    #[doc = "Scope type, must be chat_member"]
30383    #[serde(rename = "type")]
30384    pub tg_type: String,
30385    #[allow(rustdoc::invalid_html_tags)]
30386    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
30387    #[serde(rename = "chat_id")]
30388    pub chat_id: ChatHandle,
30389    #[allow(rustdoc::invalid_html_tags)]
30390    #[doc = "Unique identifier of the target user"]
30391    #[serde(rename = "user_id")]
30392    pub user_id: i64,
30393}
30394impl From<NoSkipBotCommandScopeChatMember> for BotCommandScopeChatMember {
30395    fn from(t: NoSkipBotCommandScopeChatMember) -> Self {
30396        Self {
30397            tg_type: t.tg_type,
30398            chat_id: t.chat_id,
30399            user_id: t.user_id,
30400        }
30401    }
30402}
30403#[allow(clippy::from_over_into)]
30404impl Into<NoSkipBotCommandScopeChatMember> for BotCommandScopeChatMember {
30405    fn into(self) -> NoSkipBotCommandScopeChatMember {
30406        NoSkipBotCommandScopeChatMember {
30407            tg_type: self.tg_type,
30408            chat_id: self.chat_id,
30409            user_id: self.user_id,
30410        }
30411    }
30412}
30413impl NoSkipBotCommandScopeChatMember {
30414    pub fn skip(self) -> BotCommandScopeChatMember {
30415        self.into()
30416    }
30417}
30418impl BotCommandScopeChatMember {
30419    pub fn noskip(self) -> NoSkipBotCommandScopeChatMember {
30420        self.into()
30421    }
30422}
30423#[allow(rustdoc::invalid_html_tags)]
30424#[doc = "Represents the scope of bot commands, covering a specific member of a group or supergroup chat."]
30425#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30426pub struct BotCommandScopeChatMemberBuilder {
30427    #[allow(rustdoc::invalid_html_tags)]
30428    #[doc = "Scope type, must be chat_member"]
30429    #[serde(rename = "type")]
30430    pub tg_type: String,
30431    #[allow(rustdoc::invalid_html_tags)]
30432    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
30433    #[serde(rename = "chat_id")]
30434    pub chat_id: ChatHandle,
30435    #[allow(rustdoc::invalid_html_tags)]
30436    #[doc = "Unique identifier of the target user"]
30437    #[serde(rename = "user_id")]
30438    pub user_id: i64,
30439}
30440impl BotCommandScopeChatMemberBuilder {
30441    #[allow(clippy::too_many_arguments)]
30442    pub fn new(chat_id: ChatHandle, user_id: i64) -> Self {
30443        Self {
30444            tg_type: "chat_member".to_owned(),
30445            chat_id,
30446            user_id,
30447        }
30448    }
30449    #[allow(rustdoc::invalid_html_tags)]
30450    #[doc = "Scope type, must be chat_member"]
30451    pub fn set_type(mut self, tg_type: String) -> Self {
30452        self.tg_type = tg_type;
30453        self
30454    }
30455    #[allow(rustdoc::invalid_html_tags)]
30456    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
30457    pub fn set_chat_id(mut self, chat_id: ChatHandle) -> Self {
30458        self.chat_id = chat_id;
30459        self
30460    }
30461    #[allow(rustdoc::invalid_html_tags)]
30462    #[doc = "Unique identifier of the target user"]
30463    pub fn set_user_id(mut self, user_id: i64) -> Self {
30464        self.user_id = user_id;
30465        self
30466    }
30467    pub fn build(self) -> BotCommandScopeChatMember {
30468        BotCommandScopeChatMember {
30469            tg_type: self.tg_type,
30470            chat_id: self.chat_id,
30471            user_id: self.user_id,
30472        }
30473    }
30474}
30475#[allow(rustdoc::invalid_html_tags)]
30476#[doc = "This object represents a chat background."]
30477#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30478pub struct ChatBackground {
30479    #[allow(rustdoc::invalid_html_tags)]
30480    #[doc = "Type of the background"]
30481    #[serde(rename = "type")]
30482    pub tg_type: BackgroundType,
30483}
30484#[allow(rustdoc::invalid_html_tags)]
30485#[doc = "Companion type to ChatBackground that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30486#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30487pub struct NoSkipChatBackground {
30488    #[allow(rustdoc::invalid_html_tags)]
30489    #[doc = "Type of the background"]
30490    #[serde(rename = "type")]
30491    pub tg_type: BackgroundType,
30492}
30493impl From<NoSkipChatBackground> for ChatBackground {
30494    fn from(t: NoSkipChatBackground) -> Self {
30495        Self { tg_type: t.tg_type }
30496    }
30497}
30498#[allow(clippy::from_over_into)]
30499impl Into<NoSkipChatBackground> for ChatBackground {
30500    fn into(self) -> NoSkipChatBackground {
30501        NoSkipChatBackground {
30502            tg_type: self.tg_type,
30503        }
30504    }
30505}
30506impl NoSkipChatBackground {
30507    pub fn skip(self) -> ChatBackground {
30508        self.into()
30509    }
30510}
30511impl ChatBackground {
30512    pub fn noskip(self) -> NoSkipChatBackground {
30513        self.into()
30514    }
30515}
30516#[allow(rustdoc::invalid_html_tags)]
30517#[doc = "This object represents a chat background."]
30518#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30519pub struct ChatBackgroundBuilder {
30520    #[allow(rustdoc::invalid_html_tags)]
30521    #[doc = "Type of the background"]
30522    #[serde(rename = "type")]
30523    pub tg_type: BackgroundType,
30524}
30525impl ChatBackgroundBuilder {
30526    #[allow(clippy::too_many_arguments)]
30527    pub fn new(tg_type: BackgroundType) -> Self {
30528        Self { tg_type }
30529    }
30530    #[allow(rustdoc::invalid_html_tags)]
30531    #[doc = "Type of the background"]
30532    pub fn set_type(mut self, tg_type: BackgroundType) -> Self {
30533        self.tg_type = tg_type;
30534        self
30535    }
30536    pub fn build(self) -> ChatBackground {
30537        ChatBackground {
30538            tg_type: self.tg_type,
30539        }
30540    }
30541}
30542#[allow(rustdoc::invalid_html_tags)]
30543#[doc = "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB."]
30544#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30545pub struct PassportFile {
30546    #[allow(rustdoc::invalid_html_tags)]
30547    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
30548    #[serde(rename = "file_id")]
30549    pub file_id: String,
30550    #[allow(rustdoc::invalid_html_tags)]
30551    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
30552    #[serde(rename = "file_unique_id")]
30553    pub file_unique_id: String,
30554    #[allow(rustdoc::invalid_html_tags)]
30555    #[doc = "File size in bytes"]
30556    #[serde(rename = "file_size")]
30557    pub file_size: i64,
30558    #[allow(rustdoc::invalid_html_tags)]
30559    #[doc = "Unix time when the file was uploaded"]
30560    #[serde(rename = "file_date")]
30561    pub file_date: i64,
30562}
30563#[allow(rustdoc::invalid_html_tags)]
30564#[doc = "Companion type to PassportFile that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30565#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30566pub struct NoSkipPassportFile {
30567    #[allow(rustdoc::invalid_html_tags)]
30568    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
30569    #[serde(rename = "file_id")]
30570    pub file_id: String,
30571    #[allow(rustdoc::invalid_html_tags)]
30572    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
30573    #[serde(rename = "file_unique_id")]
30574    pub file_unique_id: String,
30575    #[allow(rustdoc::invalid_html_tags)]
30576    #[doc = "File size in bytes"]
30577    #[serde(rename = "file_size")]
30578    pub file_size: i64,
30579    #[allow(rustdoc::invalid_html_tags)]
30580    #[doc = "Unix time when the file was uploaded"]
30581    #[serde(rename = "file_date")]
30582    pub file_date: i64,
30583}
30584impl From<NoSkipPassportFile> for PassportFile {
30585    fn from(t: NoSkipPassportFile) -> Self {
30586        Self {
30587            file_id: t.file_id,
30588            file_unique_id: t.file_unique_id,
30589            file_size: t.file_size,
30590            file_date: t.file_date,
30591        }
30592    }
30593}
30594#[allow(clippy::from_over_into)]
30595impl Into<NoSkipPassportFile> for PassportFile {
30596    fn into(self) -> NoSkipPassportFile {
30597        NoSkipPassportFile {
30598            file_id: self.file_id,
30599            file_unique_id: self.file_unique_id,
30600            file_size: self.file_size,
30601            file_date: self.file_date,
30602        }
30603    }
30604}
30605impl NoSkipPassportFile {
30606    pub fn skip(self) -> PassportFile {
30607        self.into()
30608    }
30609}
30610impl PassportFile {
30611    pub fn noskip(self) -> NoSkipPassportFile {
30612        self.into()
30613    }
30614}
30615#[allow(rustdoc::invalid_html_tags)]
30616#[doc = "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB."]
30617#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30618pub struct PassportFileBuilder {
30619    #[allow(rustdoc::invalid_html_tags)]
30620    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
30621    #[serde(rename = "file_id")]
30622    pub file_id: String,
30623    #[allow(rustdoc::invalid_html_tags)]
30624    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
30625    #[serde(rename = "file_unique_id")]
30626    pub file_unique_id: String,
30627    #[allow(rustdoc::invalid_html_tags)]
30628    #[doc = "File size in bytes"]
30629    #[serde(rename = "file_size")]
30630    pub file_size: i64,
30631    #[allow(rustdoc::invalid_html_tags)]
30632    #[doc = "Unix time when the file was uploaded"]
30633    #[serde(rename = "file_date")]
30634    pub file_date: i64,
30635}
30636impl PassportFileBuilder {
30637    #[allow(clippy::too_many_arguments)]
30638    pub fn new(file_id: String, file_unique_id: String, file_size: i64, file_date: i64) -> Self {
30639        Self {
30640            file_id,
30641            file_unique_id,
30642            file_size,
30643            file_date,
30644        }
30645    }
30646    #[allow(rustdoc::invalid_html_tags)]
30647    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
30648    pub fn set_file_id(mut self, file_id: String) -> Self {
30649        self.file_id = file_id;
30650        self
30651    }
30652    #[allow(rustdoc::invalid_html_tags)]
30653    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
30654    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
30655        self.file_unique_id = file_unique_id;
30656        self
30657    }
30658    #[allow(rustdoc::invalid_html_tags)]
30659    #[doc = "File size in bytes"]
30660    pub fn set_file_size(mut self, file_size: i64) -> Self {
30661        self.file_size = file_size;
30662        self
30663    }
30664    #[allow(rustdoc::invalid_html_tags)]
30665    #[doc = "Unix time when the file was uploaded"]
30666    pub fn set_file_date(mut self, file_date: i64) -> Self {
30667        self.file_date = file_date;
30668        self
30669    }
30670    pub fn build(self) -> PassportFile {
30671        PassportFile {
30672            file_id: self.file_id,
30673            file_unique_id: self.file_unique_id,
30674            file_size: self.file_size,
30675            file_date: self.file_date,
30676        }
30677    }
30678}
30679#[allow(rustdoc::invalid_html_tags)]
30680#[doc = "Represents the scope of bot commands, covering all group and supergroup chat administrators."]
30681#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30682pub struct BotCommandScopeAllChatAdministrators {
30683    #[allow(rustdoc::invalid_html_tags)]
30684    #[doc = "Scope type, must be all_chat_administrators"]
30685    #[serde(rename = "type")]
30686    pub tg_type: String,
30687}
30688#[allow(rustdoc::invalid_html_tags)]
30689#[doc = "Companion type to BotCommandScopeAllChatAdministrators that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30690#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30691pub struct NoSkipBotCommandScopeAllChatAdministrators {
30692    #[allow(rustdoc::invalid_html_tags)]
30693    #[doc = "Scope type, must be all_chat_administrators"]
30694    #[serde(rename = "type")]
30695    pub tg_type: String,
30696}
30697impl From<NoSkipBotCommandScopeAllChatAdministrators> for BotCommandScopeAllChatAdministrators {
30698    fn from(t: NoSkipBotCommandScopeAllChatAdministrators) -> Self {
30699        Self { tg_type: t.tg_type }
30700    }
30701}
30702#[allow(clippy::from_over_into)]
30703impl Into<NoSkipBotCommandScopeAllChatAdministrators> for BotCommandScopeAllChatAdministrators {
30704    fn into(self) -> NoSkipBotCommandScopeAllChatAdministrators {
30705        NoSkipBotCommandScopeAllChatAdministrators {
30706            tg_type: self.tg_type,
30707        }
30708    }
30709}
30710impl NoSkipBotCommandScopeAllChatAdministrators {
30711    pub fn skip(self) -> BotCommandScopeAllChatAdministrators {
30712        self.into()
30713    }
30714}
30715impl BotCommandScopeAllChatAdministrators {
30716    pub fn noskip(self) -> NoSkipBotCommandScopeAllChatAdministrators {
30717        self.into()
30718    }
30719}
30720#[allow(rustdoc::invalid_html_tags)]
30721#[doc = "Represents the scope of bot commands, covering all group and supergroup chat administrators."]
30722#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30723pub struct BotCommandScopeAllChatAdministratorsBuilder {
30724    #[allow(rustdoc::invalid_html_tags)]
30725    #[doc = "Scope type, must be all_chat_administrators"]
30726    #[serde(rename = "type")]
30727    pub tg_type: String,
30728}
30729impl BotCommandScopeAllChatAdministratorsBuilder {
30730    #[allow(clippy::too_many_arguments)]
30731    pub fn new() -> Self {
30732        Self {
30733            tg_type: "all_chat_administrators".to_owned(),
30734        }
30735    }
30736    #[allow(rustdoc::invalid_html_tags)]
30737    #[doc = "Scope type, must be all_chat_administrators"]
30738    pub fn set_type(mut self, tg_type: String) -> Self {
30739        self.tg_type = tg_type;
30740        self
30741    }
30742    pub fn build(self) -> BotCommandScopeAllChatAdministrators {
30743        BotCommandScopeAllChatAdministrators {
30744            tg_type: self.tg_type,
30745        }
30746    }
30747}
30748#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30749#[serde(untagged)]
30750pub enum InputMedia {
30751    InputMediaAnimation(InputMediaAnimation),
30752    InputMediaDocument(InputMediaDocument),
30753    InputMediaAudio(InputMediaAudio),
30754    InputMediaPhoto(InputMediaPhoto),
30755    InputMediaVideo(InputMediaVideo),
30756}
30757impl Default for InputMedia {
30758    fn default() -> Self {
30759        InputMedia::InputMediaAnimation(InputMediaAnimation::default())
30760    }
30761}
30762impl InputMedia {}
30763#[allow(rustdoc::invalid_html_tags)]
30764#[doc = "This object contains information about a message that is being replied to, which may come from another chat or forum topic."]
30765#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30766pub struct ExternalReplyInfo {
30767    #[allow(rustdoc::invalid_html_tags)]
30768    #[doc = "Origin of the message replied to by the given message"]
30769    #[serde(rename = "origin")]
30770    pub origin: BoxWrapper<Unbox<MessageOrigin>>,
30771    #[allow(rustdoc::invalid_html_tags)]
30772    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
30773    #[serde(skip_serializing_if = "Option::is_none", rename = "chat", default)]
30774    pub chat: Option<BoxWrapper<Unbox<Chat>>>,
30775    #[allow(rustdoc::invalid_html_tags)]
30776    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
30777    #[serde(
30778        skip_serializing_if = "Option::is_none",
30779        rename = "message_id",
30780        default
30781    )]
30782    pub message_id: Option<i64>,
30783    #[allow(rustdoc::invalid_html_tags)]
30784    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
30785    #[serde(
30786        skip_serializing_if = "Option::is_none",
30787        rename = "link_preview_options",
30788        default
30789    )]
30790    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
30791    #[allow(rustdoc::invalid_html_tags)]
30792    #[doc = "Optional. Message is an animation, information about the animation"]
30793    #[serde(skip_serializing_if = "Option::is_none", rename = "animation", default)]
30794    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
30795    #[allow(rustdoc::invalid_html_tags)]
30796    #[doc = "Optional. Message is an audio file, information about the file"]
30797    #[serde(skip_serializing_if = "Option::is_none", rename = "audio", default)]
30798    pub audio: Option<BoxWrapper<Unbox<Audio>>>,
30799    #[allow(rustdoc::invalid_html_tags)]
30800    #[doc = "Optional. Message is a general file, information about the file"]
30801    #[serde(skip_serializing_if = "Option::is_none", rename = "document", default)]
30802    pub document: Option<BoxWrapper<Unbox<Document>>>,
30803    #[allow(rustdoc::invalid_html_tags)]
30804    #[doc = "Optional. Message contains paid media; information about the paid media"]
30805    #[serde(
30806        skip_serializing_if = "Option::is_none",
30807        rename = "paid_media",
30808        default
30809    )]
30810    pub paid_media: Option<BoxWrapper<Unbox<PaidMediaInfo>>>,
30811    #[allow(rustdoc::invalid_html_tags)]
30812    #[doc = "Optional. Message is a photo, available sizes of the photo"]
30813    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
30814    pub photo: Option<Vec<PhotoSize>>,
30815    #[allow(rustdoc::invalid_html_tags)]
30816    #[doc = "Optional. Message is a sticker, information about the sticker"]
30817    #[serde(skip_serializing_if = "Option::is_none", rename = "sticker", default)]
30818    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
30819    #[allow(rustdoc::invalid_html_tags)]
30820    #[doc = "Optional. Message is a forwarded story"]
30821    #[serde(skip_serializing_if = "Option::is_none", rename = "story", default)]
30822    pub story: Option<BoxWrapper<Unbox<Story>>>,
30823    #[allow(rustdoc::invalid_html_tags)]
30824    #[doc = "Optional. Message is a video, information about the video"]
30825    #[serde(skip_serializing_if = "Option::is_none", rename = "video", default)]
30826    pub video: Option<BoxWrapper<Unbox<Video>>>,
30827    #[allow(rustdoc::invalid_html_tags)]
30828    #[doc = "Optional. Message is a video note, information about the video message"]
30829    #[serde(
30830        skip_serializing_if = "Option::is_none",
30831        rename = "video_note",
30832        default
30833    )]
30834    pub video_note: Option<BoxWrapper<Unbox<VideoNote>>>,
30835    #[allow(rustdoc::invalid_html_tags)]
30836    #[doc = "Optional. Message is a voice message, information about the file"]
30837    #[serde(skip_serializing_if = "Option::is_none", rename = "voice", default)]
30838    pub voice: Option<BoxWrapper<Unbox<Voice>>>,
30839    #[allow(rustdoc::invalid_html_tags)]
30840    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
30841    #[serde(
30842        skip_serializing_if = "Option::is_none",
30843        rename = "has_media_spoiler",
30844        default
30845    )]
30846    pub has_media_spoiler: Option<bool>,
30847    #[allow(rustdoc::invalid_html_tags)]
30848    #[doc = "Optional. Message is a checklist"]
30849    #[serde(skip_serializing_if = "Option::is_none", rename = "checklist", default)]
30850    pub checklist: Option<BoxWrapper<Unbox<Checklist>>>,
30851    #[allow(rustdoc::invalid_html_tags)]
30852    #[doc = "Optional. Message is a shared contact, information about the contact"]
30853    #[serde(skip_serializing_if = "Option::is_none", rename = "contact", default)]
30854    pub contact: Option<BoxWrapper<Unbox<Contact>>>,
30855    #[allow(rustdoc::invalid_html_tags)]
30856    #[doc = "Optional. Message is a dice with random value"]
30857    #[serde(skip_serializing_if = "Option::is_none", rename = "dice", default)]
30858    pub dice: Option<BoxWrapper<Unbox<Dice>>>,
30859    #[allow(rustdoc::invalid_html_tags)]
30860    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
30861    #[serde(skip_serializing_if = "Option::is_none", rename = "game", default)]
30862    pub game: Option<BoxWrapper<Unbox<Game>>>,
30863    #[allow(rustdoc::invalid_html_tags)]
30864    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
30865    #[serde(skip_serializing_if = "Option::is_none", rename = "giveaway", default)]
30866    pub giveaway: Option<BoxWrapper<Unbox<Giveaway>>>,
30867    #[allow(rustdoc::invalid_html_tags)]
30868    #[doc = "Optional. A giveaway with public winners was completed"]
30869    #[serde(
30870        skip_serializing_if = "Option::is_none",
30871        rename = "giveaway_winners",
30872        default
30873    )]
30874    pub giveaway_winners: Option<BoxWrapper<Unbox<GiveawayWinners>>>,
30875    #[allow(rustdoc::invalid_html_tags)]
30876    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
30877    #[serde(skip_serializing_if = "Option::is_none", rename = "invoice", default)]
30878    pub invoice: Option<BoxWrapper<Unbox<Invoice>>>,
30879    #[allow(rustdoc::invalid_html_tags)]
30880    #[doc = "Optional. Message is a shared location, information about the location"]
30881    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
30882    pub location: Option<BoxWrapper<Unbox<Location>>>,
30883    #[allow(rustdoc::invalid_html_tags)]
30884    #[doc = "Optional. Message is a native poll, information about the poll"]
30885    #[serde(skip_serializing_if = "Option::is_none", rename = "poll", default)]
30886    pub poll: Option<BoxWrapper<Unbox<Poll>>>,
30887    #[allow(rustdoc::invalid_html_tags)]
30888    #[doc = "Optional. Message is a venue, information about the venue"]
30889    #[serde(skip_serializing_if = "Option::is_none", rename = "venue", default)]
30890    pub venue: Option<BoxWrapper<Unbox<Venue>>>,
30891}
30892#[allow(rustdoc::invalid_html_tags)]
30893#[doc = "Companion type to ExternalReplyInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
30894#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
30895pub struct NoSkipExternalReplyInfo {
30896    #[allow(rustdoc::invalid_html_tags)]
30897    #[doc = "Origin of the message replied to by the given message"]
30898    #[serde(rename = "origin")]
30899    pub origin: BoxWrapper<Unbox<MessageOrigin>>,
30900    pub chat: Option<BoxWrapper<Unbox<Chat>>>,
30901    pub message_id: Option<i64>,
30902    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
30903    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
30904    pub audio: Option<BoxWrapper<Unbox<Audio>>>,
30905    pub document: Option<BoxWrapper<Unbox<Document>>>,
30906    pub paid_media: Option<BoxWrapper<Unbox<PaidMediaInfo>>>,
30907    pub photo: Option<Vec<PhotoSize>>,
30908    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
30909    pub story: Option<BoxWrapper<Unbox<Story>>>,
30910    pub video: Option<BoxWrapper<Unbox<Video>>>,
30911    pub video_note: Option<BoxWrapper<Unbox<VideoNote>>>,
30912    pub voice: Option<BoxWrapper<Unbox<Voice>>>,
30913    pub has_media_spoiler: Option<bool>,
30914    pub checklist: Option<BoxWrapper<Unbox<Checklist>>>,
30915    pub contact: Option<BoxWrapper<Unbox<Contact>>>,
30916    pub dice: Option<BoxWrapper<Unbox<Dice>>>,
30917    pub game: Option<BoxWrapper<Unbox<Game>>>,
30918    pub giveaway: Option<BoxWrapper<Unbox<Giveaway>>>,
30919    pub giveaway_winners: Option<BoxWrapper<Unbox<GiveawayWinners>>>,
30920    pub invoice: Option<BoxWrapper<Unbox<Invoice>>>,
30921    pub location: Option<BoxWrapper<Unbox<Location>>>,
30922    pub poll: Option<BoxWrapper<Unbox<Poll>>>,
30923    pub venue: Option<BoxWrapper<Unbox<Venue>>>,
30924}
30925impl From<NoSkipExternalReplyInfo> for ExternalReplyInfo {
30926    fn from(t: NoSkipExternalReplyInfo) -> Self {
30927        Self {
30928            origin: t.origin,
30929            chat: t.chat,
30930            message_id: t.message_id,
30931            link_preview_options: t.link_preview_options,
30932            animation: t.animation,
30933            audio: t.audio,
30934            document: t.document,
30935            paid_media: t.paid_media,
30936            photo: t.photo,
30937            sticker: t.sticker,
30938            story: t.story,
30939            video: t.video,
30940            video_note: t.video_note,
30941            voice: t.voice,
30942            has_media_spoiler: t.has_media_spoiler,
30943            checklist: t.checklist,
30944            contact: t.contact,
30945            dice: t.dice,
30946            game: t.game,
30947            giveaway: t.giveaway,
30948            giveaway_winners: t.giveaway_winners,
30949            invoice: t.invoice,
30950            location: t.location,
30951            poll: t.poll,
30952            venue: t.venue,
30953        }
30954    }
30955}
30956#[allow(clippy::from_over_into)]
30957impl Into<NoSkipExternalReplyInfo> for ExternalReplyInfo {
30958    fn into(self) -> NoSkipExternalReplyInfo {
30959        NoSkipExternalReplyInfo {
30960            origin: self.origin,
30961            chat: self.chat,
30962            message_id: self.message_id,
30963            link_preview_options: self.link_preview_options,
30964            animation: self.animation,
30965            audio: self.audio,
30966            document: self.document,
30967            paid_media: self.paid_media,
30968            photo: self.photo,
30969            sticker: self.sticker,
30970            story: self.story,
30971            video: self.video,
30972            video_note: self.video_note,
30973            voice: self.voice,
30974            has_media_spoiler: self.has_media_spoiler,
30975            checklist: self.checklist,
30976            contact: self.contact,
30977            dice: self.dice,
30978            game: self.game,
30979            giveaway: self.giveaway,
30980            giveaway_winners: self.giveaway_winners,
30981            invoice: self.invoice,
30982            location: self.location,
30983            poll: self.poll,
30984            venue: self.venue,
30985        }
30986    }
30987}
30988impl NoSkipExternalReplyInfo {
30989    pub fn skip(self) -> ExternalReplyInfo {
30990        self.into()
30991    }
30992}
30993impl ExternalReplyInfo {
30994    pub fn noskip(self) -> NoSkipExternalReplyInfo {
30995        self.into()
30996    }
30997}
30998#[allow(rustdoc::invalid_html_tags)]
30999#[doc = "This object contains information about a message that is being replied to, which may come from another chat or forum topic."]
31000#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31001pub struct ExternalReplyInfoBuilder {
31002    #[allow(rustdoc::invalid_html_tags)]
31003    #[doc = "Origin of the message replied to by the given message"]
31004    #[serde(rename = "origin")]
31005    pub origin: BoxWrapper<Unbox<MessageOrigin>>,
31006    #[allow(rustdoc::invalid_html_tags)]
31007    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
31008    #[serde(skip_serializing_if = "Option::is_none", rename = "chat", default)]
31009    pub chat: Option<BoxWrapper<Unbox<Chat>>>,
31010    #[allow(rustdoc::invalid_html_tags)]
31011    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
31012    #[serde(
31013        skip_serializing_if = "Option::is_none",
31014        rename = "message_id",
31015        default
31016    )]
31017    pub message_id: Option<i64>,
31018    #[allow(rustdoc::invalid_html_tags)]
31019    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
31020    #[serde(
31021        skip_serializing_if = "Option::is_none",
31022        rename = "link_preview_options",
31023        default
31024    )]
31025    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
31026    #[allow(rustdoc::invalid_html_tags)]
31027    #[doc = "Optional. Message is an animation, information about the animation"]
31028    #[serde(skip_serializing_if = "Option::is_none", rename = "animation", default)]
31029    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
31030    #[allow(rustdoc::invalid_html_tags)]
31031    #[doc = "Optional. Message is an audio file, information about the file"]
31032    #[serde(skip_serializing_if = "Option::is_none", rename = "audio", default)]
31033    pub audio: Option<BoxWrapper<Unbox<Audio>>>,
31034    #[allow(rustdoc::invalid_html_tags)]
31035    #[doc = "Optional. Message is a general file, information about the file"]
31036    #[serde(skip_serializing_if = "Option::is_none", rename = "document", default)]
31037    pub document: Option<BoxWrapper<Unbox<Document>>>,
31038    #[allow(rustdoc::invalid_html_tags)]
31039    #[doc = "Optional. Message contains paid media; information about the paid media"]
31040    #[serde(
31041        skip_serializing_if = "Option::is_none",
31042        rename = "paid_media",
31043        default
31044    )]
31045    pub paid_media: Option<BoxWrapper<Unbox<PaidMediaInfo>>>,
31046    #[allow(rustdoc::invalid_html_tags)]
31047    #[doc = "Optional. Message is a photo, available sizes of the photo"]
31048    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
31049    pub photo: Option<Vec<PhotoSize>>,
31050    #[allow(rustdoc::invalid_html_tags)]
31051    #[doc = "Optional. Message is a sticker, information about the sticker"]
31052    #[serde(skip_serializing_if = "Option::is_none", rename = "sticker", default)]
31053    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
31054    #[allow(rustdoc::invalid_html_tags)]
31055    #[doc = "Optional. Message is a forwarded story"]
31056    #[serde(skip_serializing_if = "Option::is_none", rename = "story", default)]
31057    pub story: Option<BoxWrapper<Unbox<Story>>>,
31058    #[allow(rustdoc::invalid_html_tags)]
31059    #[doc = "Optional. Message is a video, information about the video"]
31060    #[serde(skip_serializing_if = "Option::is_none", rename = "video", default)]
31061    pub video: Option<BoxWrapper<Unbox<Video>>>,
31062    #[allow(rustdoc::invalid_html_tags)]
31063    #[doc = "Optional. Message is a video note, information about the video message"]
31064    #[serde(
31065        skip_serializing_if = "Option::is_none",
31066        rename = "video_note",
31067        default
31068    )]
31069    pub video_note: Option<BoxWrapper<Unbox<VideoNote>>>,
31070    #[allow(rustdoc::invalid_html_tags)]
31071    #[doc = "Optional. Message is a voice message, information about the file"]
31072    #[serde(skip_serializing_if = "Option::is_none", rename = "voice", default)]
31073    pub voice: Option<BoxWrapper<Unbox<Voice>>>,
31074    #[allow(rustdoc::invalid_html_tags)]
31075    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
31076    #[serde(
31077        skip_serializing_if = "Option::is_none",
31078        rename = "has_media_spoiler",
31079        default
31080    )]
31081    pub has_media_spoiler: Option<bool>,
31082    #[allow(rustdoc::invalid_html_tags)]
31083    #[doc = "Optional. Message is a checklist"]
31084    #[serde(skip_serializing_if = "Option::is_none", rename = "checklist", default)]
31085    pub checklist: Option<BoxWrapper<Unbox<Checklist>>>,
31086    #[allow(rustdoc::invalid_html_tags)]
31087    #[doc = "Optional. Message is a shared contact, information about the contact"]
31088    #[serde(skip_serializing_if = "Option::is_none", rename = "contact", default)]
31089    pub contact: Option<BoxWrapper<Unbox<Contact>>>,
31090    #[allow(rustdoc::invalid_html_tags)]
31091    #[doc = "Optional. Message is a dice with random value"]
31092    #[serde(skip_serializing_if = "Option::is_none", rename = "dice", default)]
31093    pub dice: Option<BoxWrapper<Unbox<Dice>>>,
31094    #[allow(rustdoc::invalid_html_tags)]
31095    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
31096    #[serde(skip_serializing_if = "Option::is_none", rename = "game", default)]
31097    pub game: Option<BoxWrapper<Unbox<Game>>>,
31098    #[allow(rustdoc::invalid_html_tags)]
31099    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
31100    #[serde(skip_serializing_if = "Option::is_none", rename = "giveaway", default)]
31101    pub giveaway: Option<BoxWrapper<Unbox<Giveaway>>>,
31102    #[allow(rustdoc::invalid_html_tags)]
31103    #[doc = "Optional. A giveaway with public winners was completed"]
31104    #[serde(
31105        skip_serializing_if = "Option::is_none",
31106        rename = "giveaway_winners",
31107        default
31108    )]
31109    pub giveaway_winners: Option<BoxWrapper<Unbox<GiveawayWinners>>>,
31110    #[allow(rustdoc::invalid_html_tags)]
31111    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
31112    #[serde(skip_serializing_if = "Option::is_none", rename = "invoice", default)]
31113    pub invoice: Option<BoxWrapper<Unbox<Invoice>>>,
31114    #[allow(rustdoc::invalid_html_tags)]
31115    #[doc = "Optional. Message is a shared location, information about the location"]
31116    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
31117    pub location: Option<BoxWrapper<Unbox<Location>>>,
31118    #[allow(rustdoc::invalid_html_tags)]
31119    #[doc = "Optional. Message is a native poll, information about the poll"]
31120    #[serde(skip_serializing_if = "Option::is_none", rename = "poll", default)]
31121    pub poll: Option<BoxWrapper<Unbox<Poll>>>,
31122    #[allow(rustdoc::invalid_html_tags)]
31123    #[doc = "Optional. Message is a venue, information about the venue"]
31124    #[serde(skip_serializing_if = "Option::is_none", rename = "venue", default)]
31125    pub venue: Option<BoxWrapper<Unbox<Venue>>>,
31126}
31127impl ExternalReplyInfoBuilder {
31128    #[allow(clippy::too_many_arguments)]
31129    pub fn new<A: Into<MessageOrigin>>(origin: A) -> Self {
31130        Self {
31131            origin: BoxWrapper::new_unbox(origin.into()),
31132            chat: None,
31133            message_id: None,
31134            link_preview_options: None,
31135            animation: None,
31136            audio: None,
31137            document: None,
31138            paid_media: None,
31139            photo: None,
31140            sticker: None,
31141            story: None,
31142            video: None,
31143            video_note: None,
31144            voice: None,
31145            has_media_spoiler: None,
31146            checklist: None,
31147            contact: None,
31148            dice: None,
31149            game: None,
31150            giveaway: None,
31151            giveaway_winners: None,
31152            invoice: None,
31153            location: None,
31154            poll: None,
31155            venue: None,
31156        }
31157    }
31158    #[allow(rustdoc::invalid_html_tags)]
31159    #[doc = "Origin of the message replied to by the given message"]
31160    pub fn set_origin(mut self, origin: MessageOrigin) -> Self {
31161        self.origin = BoxWrapper(Unbox(origin));
31162        self
31163    }
31164    #[allow(rustdoc::invalid_html_tags)]
31165    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
31166    pub fn set_chat(mut self, chat: Chat) -> Self {
31167        self.chat = Some(BoxWrapper(Unbox(chat)));
31168        self
31169    }
31170    #[allow(rustdoc::invalid_html_tags)]
31171    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
31172    pub fn set_message_id(mut self, message_id: i64) -> Self {
31173        self.message_id = Some(message_id);
31174        self
31175    }
31176    #[allow(rustdoc::invalid_html_tags)]
31177    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
31178    pub fn set_link_preview_options(mut self, link_preview_options: LinkPreviewOptions) -> Self {
31179        self.link_preview_options = Some(BoxWrapper(Unbox(link_preview_options)));
31180        self
31181    }
31182    #[allow(rustdoc::invalid_html_tags)]
31183    #[doc = "Optional. Message is an animation, information about the animation"]
31184    pub fn set_animation(mut self, animation: Animation) -> Self {
31185        self.animation = Some(BoxWrapper(Unbox(animation)));
31186        self
31187    }
31188    #[allow(rustdoc::invalid_html_tags)]
31189    #[doc = "Optional. Message is an audio file, information about the file"]
31190    pub fn set_audio(mut self, audio: Audio) -> Self {
31191        self.audio = Some(BoxWrapper(Unbox(audio)));
31192        self
31193    }
31194    #[allow(rustdoc::invalid_html_tags)]
31195    #[doc = "Optional. Message is a general file, information about the file"]
31196    pub fn set_document(mut self, document: Document) -> Self {
31197        self.document = Some(BoxWrapper(Unbox(document)));
31198        self
31199    }
31200    #[allow(rustdoc::invalid_html_tags)]
31201    #[doc = "Optional. Message contains paid media; information about the paid media"]
31202    pub fn set_paid_media(mut self, paid_media: PaidMediaInfo) -> Self {
31203        self.paid_media = Some(BoxWrapper(Unbox(paid_media)));
31204        self
31205    }
31206    #[allow(rustdoc::invalid_html_tags)]
31207    #[doc = "Optional. Message is a photo, available sizes of the photo"]
31208    pub fn set_photo(mut self, photo: Vec<PhotoSize>) -> Self {
31209        self.photo = Some(photo);
31210        self
31211    }
31212    #[allow(rustdoc::invalid_html_tags)]
31213    #[doc = "Optional. Message is a sticker, information about the sticker"]
31214    pub fn set_sticker(mut self, sticker: Sticker) -> Self {
31215        self.sticker = Some(BoxWrapper(Unbox(sticker)));
31216        self
31217    }
31218    #[allow(rustdoc::invalid_html_tags)]
31219    #[doc = "Optional. Message is a forwarded story"]
31220    pub fn set_story(mut self, story: Story) -> Self {
31221        self.story = Some(BoxWrapper(Unbox(story)));
31222        self
31223    }
31224    #[allow(rustdoc::invalid_html_tags)]
31225    #[doc = "Optional. Message is a video, information about the video"]
31226    pub fn set_video(mut self, video: Video) -> Self {
31227        self.video = Some(BoxWrapper(Unbox(video)));
31228        self
31229    }
31230    #[allow(rustdoc::invalid_html_tags)]
31231    #[doc = "Optional. Message is a video note, information about the video message"]
31232    pub fn set_video_note(mut self, video_note: VideoNote) -> Self {
31233        self.video_note = Some(BoxWrapper(Unbox(video_note)));
31234        self
31235    }
31236    #[allow(rustdoc::invalid_html_tags)]
31237    #[doc = "Optional. Message is a voice message, information about the file"]
31238    pub fn set_voice(mut self, voice: Voice) -> Self {
31239        self.voice = Some(BoxWrapper(Unbox(voice)));
31240        self
31241    }
31242    #[allow(rustdoc::invalid_html_tags)]
31243    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
31244    pub fn set_has_media_spoiler(mut self, has_media_spoiler: bool) -> Self {
31245        self.has_media_spoiler = Some(has_media_spoiler);
31246        self
31247    }
31248    #[allow(rustdoc::invalid_html_tags)]
31249    #[doc = "Optional. Message is a checklist"]
31250    pub fn set_checklist(mut self, checklist: Checklist) -> Self {
31251        self.checklist = Some(BoxWrapper(Unbox(checklist)));
31252        self
31253    }
31254    #[allow(rustdoc::invalid_html_tags)]
31255    #[doc = "Optional. Message is a shared contact, information about the contact"]
31256    pub fn set_contact(mut self, contact: Contact) -> Self {
31257        self.contact = Some(BoxWrapper(Unbox(contact)));
31258        self
31259    }
31260    #[allow(rustdoc::invalid_html_tags)]
31261    #[doc = "Optional. Message is a dice with random value"]
31262    pub fn set_dice(mut self, dice: Dice) -> Self {
31263        self.dice = Some(BoxWrapper(Unbox(dice)));
31264        self
31265    }
31266    #[allow(rustdoc::invalid_html_tags)]
31267    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
31268    pub fn set_game(mut self, game: Game) -> Self {
31269        self.game = Some(BoxWrapper(Unbox(game)));
31270        self
31271    }
31272    #[allow(rustdoc::invalid_html_tags)]
31273    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
31274    pub fn set_giveaway(mut self, giveaway: Giveaway) -> Self {
31275        self.giveaway = Some(BoxWrapper(Unbox(giveaway)));
31276        self
31277    }
31278    #[allow(rustdoc::invalid_html_tags)]
31279    #[doc = "Optional. A giveaway with public winners was completed"]
31280    pub fn set_giveaway_winners(mut self, giveaway_winners: GiveawayWinners) -> Self {
31281        self.giveaway_winners = Some(BoxWrapper(Unbox(giveaway_winners)));
31282        self
31283    }
31284    #[allow(rustdoc::invalid_html_tags)]
31285    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
31286    pub fn set_invoice(mut self, invoice: Invoice) -> Self {
31287        self.invoice = Some(BoxWrapper(Unbox(invoice)));
31288        self
31289    }
31290    #[allow(rustdoc::invalid_html_tags)]
31291    #[doc = "Optional. Message is a shared location, information about the location"]
31292    pub fn set_location(mut self, location: Location) -> Self {
31293        self.location = Some(BoxWrapper(Unbox(location)));
31294        self
31295    }
31296    #[allow(rustdoc::invalid_html_tags)]
31297    #[doc = "Optional. Message is a native poll, information about the poll"]
31298    pub fn set_poll(mut self, poll: Poll) -> Self {
31299        self.poll = Some(BoxWrapper(Unbox(poll)));
31300        self
31301    }
31302    #[allow(rustdoc::invalid_html_tags)]
31303    #[doc = "Optional. Message is a venue, information about the venue"]
31304    pub fn set_venue(mut self, venue: Venue) -> Self {
31305        self.venue = Some(BoxWrapper(Unbox(venue)));
31306        self
31307    }
31308    pub fn build(self) -> ExternalReplyInfo {
31309        ExternalReplyInfo {
31310            origin: self.origin,
31311            chat: self.chat,
31312            message_id: self.message_id,
31313            link_preview_options: self.link_preview_options,
31314            animation: self.animation,
31315            audio: self.audio,
31316            document: self.document,
31317            paid_media: self.paid_media,
31318            photo: self.photo,
31319            sticker: self.sticker,
31320            story: self.story,
31321            video: self.video,
31322            video_note: self.video_note,
31323            voice: self.voice,
31324            has_media_spoiler: self.has_media_spoiler,
31325            checklist: self.checklist,
31326            contact: self.contact,
31327            dice: self.dice,
31328            game: self.game,
31329            giveaway: self.giveaway,
31330            giveaway_winners: self.giveaway_winners,
31331            invoice: self.invoice,
31332            location: self.location,
31333            poll: self.poll,
31334            venue: self.venue,
31335        }
31336    }
31337}
31338#[allow(rustdoc::invalid_html_tags)]
31339#[doc = "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation."]
31340#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31341pub struct InlineQueryResultCachedGif {
31342    #[allow(rustdoc::invalid_html_tags)]
31343    #[doc = "Type of the result, must be gif"]
31344    #[serde(rename = "type")]
31345    pub tg_type: String,
31346    #[allow(rustdoc::invalid_html_tags)]
31347    #[doc = "Unique identifier for this result, 1-64 bytes"]
31348    #[serde(rename = "id")]
31349    pub id: String,
31350    #[allow(rustdoc::invalid_html_tags)]
31351    #[doc = "A valid file identifier for the GIF file"]
31352    #[serde(rename = "gif_file_id")]
31353    pub gif_file_id: String,
31354    #[allow(rustdoc::invalid_html_tags)]
31355    #[doc = "Optional. Title for the result"]
31356    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
31357    pub title: Option<String>,
31358    #[allow(rustdoc::invalid_html_tags)]
31359    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
31360    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
31361    pub caption: Option<String>,
31362    #[allow(rustdoc::invalid_html_tags)]
31363    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
31364    #[serde(
31365        skip_serializing_if = "Option::is_none",
31366        rename = "parse_mode",
31367        default
31368    )]
31369    pub parse_mode: Option<String>,
31370    #[allow(rustdoc::invalid_html_tags)]
31371    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
31372    #[serde(
31373        skip_serializing_if = "Option::is_none",
31374        rename = "caption_entities",
31375        default
31376    )]
31377    pub caption_entities: Option<Vec<MessageEntity>>,
31378    #[allow(rustdoc::invalid_html_tags)]
31379    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
31380    #[serde(
31381        skip_serializing_if = "Option::is_none",
31382        rename = "show_caption_above_media",
31383        default
31384    )]
31385    pub show_caption_above_media: Option<bool>,
31386    #[allow(rustdoc::invalid_html_tags)]
31387    #[doc = "Optional. Inline keyboard attached to the message"]
31388    #[serde(
31389        skip_serializing_if = "Option::is_none",
31390        rename = "reply_markup",
31391        default
31392    )]
31393    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
31394    #[allow(rustdoc::invalid_html_tags)]
31395    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
31396    #[serde(
31397        skip_serializing_if = "Option::is_none",
31398        rename = "input_message_content",
31399        default
31400    )]
31401    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
31402}
31403#[allow(rustdoc::invalid_html_tags)]
31404#[doc = "Companion type to InlineQueryResultCachedGif that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
31405#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31406pub struct NoSkipInlineQueryResultCachedGif {
31407    #[allow(rustdoc::invalid_html_tags)]
31408    #[doc = "Type of the result, must be gif"]
31409    #[serde(rename = "type")]
31410    pub tg_type: String,
31411    #[allow(rustdoc::invalid_html_tags)]
31412    #[doc = "Unique identifier for this result, 1-64 bytes"]
31413    #[serde(rename = "id")]
31414    pub id: String,
31415    #[allow(rustdoc::invalid_html_tags)]
31416    #[doc = "A valid file identifier for the GIF file"]
31417    #[serde(rename = "gif_file_id")]
31418    pub gif_file_id: String,
31419    pub title: Option<String>,
31420    pub caption: Option<String>,
31421    pub parse_mode: Option<String>,
31422    pub caption_entities: Option<Vec<MessageEntity>>,
31423    pub show_caption_above_media: Option<bool>,
31424    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
31425    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
31426}
31427impl From<NoSkipInlineQueryResultCachedGif> for InlineQueryResultCachedGif {
31428    fn from(t: NoSkipInlineQueryResultCachedGif) -> Self {
31429        Self {
31430            tg_type: t.tg_type,
31431            id: t.id,
31432            gif_file_id: t.gif_file_id,
31433            title: t.title,
31434            caption: t.caption,
31435            parse_mode: t.parse_mode,
31436            caption_entities: t.caption_entities,
31437            show_caption_above_media: t.show_caption_above_media,
31438            reply_markup: t.reply_markup,
31439            input_message_content: t.input_message_content,
31440        }
31441    }
31442}
31443#[allow(clippy::from_over_into)]
31444impl Into<NoSkipInlineQueryResultCachedGif> for InlineQueryResultCachedGif {
31445    fn into(self) -> NoSkipInlineQueryResultCachedGif {
31446        NoSkipInlineQueryResultCachedGif {
31447            tg_type: self.tg_type,
31448            id: self.id,
31449            gif_file_id: self.gif_file_id,
31450            title: self.title,
31451            caption: self.caption,
31452            parse_mode: self.parse_mode,
31453            caption_entities: self.caption_entities,
31454            show_caption_above_media: self.show_caption_above_media,
31455            reply_markup: self.reply_markup,
31456            input_message_content: self.input_message_content,
31457        }
31458    }
31459}
31460impl NoSkipInlineQueryResultCachedGif {
31461    pub fn skip(self) -> InlineQueryResultCachedGif {
31462        self.into()
31463    }
31464}
31465impl InlineQueryResultCachedGif {
31466    pub fn noskip(self) -> NoSkipInlineQueryResultCachedGif {
31467        self.into()
31468    }
31469}
31470#[allow(rustdoc::invalid_html_tags)]
31471#[doc = "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation."]
31472#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31473pub struct InlineQueryResultCachedGifBuilder {
31474    #[allow(rustdoc::invalid_html_tags)]
31475    #[doc = "Type of the result, must be gif"]
31476    #[serde(rename = "type")]
31477    pub tg_type: String,
31478    #[allow(rustdoc::invalid_html_tags)]
31479    #[doc = "Unique identifier for this result, 1-64 bytes"]
31480    #[serde(rename = "id")]
31481    pub id: String,
31482    #[allow(rustdoc::invalid_html_tags)]
31483    #[doc = "A valid file identifier for the GIF file"]
31484    #[serde(rename = "gif_file_id")]
31485    pub gif_file_id: String,
31486    #[allow(rustdoc::invalid_html_tags)]
31487    #[doc = "Optional. Title for the result"]
31488    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
31489    pub title: Option<String>,
31490    #[allow(rustdoc::invalid_html_tags)]
31491    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
31492    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
31493    pub caption: Option<String>,
31494    #[allow(rustdoc::invalid_html_tags)]
31495    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
31496    #[serde(
31497        skip_serializing_if = "Option::is_none",
31498        rename = "parse_mode",
31499        default
31500    )]
31501    pub parse_mode: Option<String>,
31502    #[allow(rustdoc::invalid_html_tags)]
31503    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
31504    #[serde(
31505        skip_serializing_if = "Option::is_none",
31506        rename = "caption_entities",
31507        default
31508    )]
31509    pub caption_entities: Option<Vec<MessageEntity>>,
31510    #[allow(rustdoc::invalid_html_tags)]
31511    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
31512    #[serde(
31513        skip_serializing_if = "Option::is_none",
31514        rename = "show_caption_above_media",
31515        default
31516    )]
31517    pub show_caption_above_media: Option<bool>,
31518    #[allow(rustdoc::invalid_html_tags)]
31519    #[doc = "Optional. Inline keyboard attached to the message"]
31520    #[serde(
31521        skip_serializing_if = "Option::is_none",
31522        rename = "reply_markup",
31523        default
31524    )]
31525    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
31526    #[allow(rustdoc::invalid_html_tags)]
31527    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
31528    #[serde(
31529        skip_serializing_if = "Option::is_none",
31530        rename = "input_message_content",
31531        default
31532    )]
31533    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
31534}
31535impl InlineQueryResultCachedGifBuilder {
31536    #[allow(clippy::too_many_arguments)]
31537    pub fn new(id: String, gif_file_id: String) -> Self {
31538        Self {
31539            tg_type: "gif".to_owned(),
31540            id,
31541            gif_file_id,
31542            title: None,
31543            caption: None,
31544            parse_mode: None,
31545            caption_entities: None,
31546            show_caption_above_media: None,
31547            reply_markup: None,
31548            input_message_content: None,
31549        }
31550    }
31551    #[allow(rustdoc::invalid_html_tags)]
31552    #[doc = "Type of the result, must be gif"]
31553    pub fn set_type(mut self, tg_type: String) -> Self {
31554        self.tg_type = tg_type;
31555        self
31556    }
31557    #[allow(rustdoc::invalid_html_tags)]
31558    #[doc = "Unique identifier for this result, 1-64 bytes"]
31559    pub fn set_id(mut self, id: String) -> Self {
31560        self.id = id;
31561        self
31562    }
31563    #[allow(rustdoc::invalid_html_tags)]
31564    #[doc = "A valid file identifier for the GIF file"]
31565    pub fn set_gif_file_id(mut self, gif_file_id: String) -> Self {
31566        self.gif_file_id = gif_file_id;
31567        self
31568    }
31569    #[allow(rustdoc::invalid_html_tags)]
31570    #[doc = "Optional. Title for the result"]
31571    pub fn set_title(mut self, title: String) -> Self {
31572        self.title = Some(title);
31573        self
31574    }
31575    #[allow(rustdoc::invalid_html_tags)]
31576    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
31577    pub fn set_caption(mut self, caption: String) -> Self {
31578        self.caption = Some(caption);
31579        self
31580    }
31581    #[allow(rustdoc::invalid_html_tags)]
31582    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
31583    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
31584        self.parse_mode = Some(parse_mode);
31585        self
31586    }
31587    #[allow(rustdoc::invalid_html_tags)]
31588    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
31589    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
31590        self.caption_entities = Some(caption_entities);
31591        self
31592    }
31593    #[allow(rustdoc::invalid_html_tags)]
31594    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
31595    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
31596        self.show_caption_above_media = Some(show_caption_above_media);
31597        self
31598    }
31599    #[allow(rustdoc::invalid_html_tags)]
31600    #[doc = "Optional. Inline keyboard attached to the message"]
31601    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
31602        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
31603        self
31604    }
31605    #[allow(rustdoc::invalid_html_tags)]
31606    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
31607    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
31608        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
31609        self
31610    }
31611    pub fn build(self) -> InlineQueryResultCachedGif {
31612        InlineQueryResultCachedGif {
31613            tg_type: self.tg_type,
31614            id: self.id,
31615            gif_file_id: self.gif_file_id,
31616            title: self.title,
31617            caption: self.caption,
31618            parse_mode: self.parse_mode,
31619            caption_entities: self.caption_entities,
31620            show_caption_above_media: self.show_caption_above_media,
31621            reply_markup: self.reply_markup,
31622            input_message_content: self.input_message_content,
31623        }
31624    }
31625}
31626#[allow(rustdoc::invalid_html_tags)]
31627#[doc = "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess."]
31628#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31629pub struct WriteAccessAllowed {
31630    #[allow(rustdoc::invalid_html_tags)]
31631    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
31632    #[serde(
31633        skip_serializing_if = "Option::is_none",
31634        rename = "from_request",
31635        default
31636    )]
31637    pub from_request: Option<bool>,
31638    #[allow(rustdoc::invalid_html_tags)]
31639    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
31640    #[serde(
31641        skip_serializing_if = "Option::is_none",
31642        rename = "web_app_name",
31643        default
31644    )]
31645    pub web_app_name: Option<String>,
31646    #[allow(rustdoc::invalid_html_tags)]
31647    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
31648    #[serde(
31649        skip_serializing_if = "Option::is_none",
31650        rename = "from_attachment_menu",
31651        default
31652    )]
31653    pub from_attachment_menu: Option<bool>,
31654}
31655#[allow(rustdoc::invalid_html_tags)]
31656#[doc = "Companion type to WriteAccessAllowed that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
31657#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31658pub struct NoSkipWriteAccessAllowed {
31659    pub from_request: Option<bool>,
31660    pub web_app_name: Option<String>,
31661    pub from_attachment_menu: Option<bool>,
31662}
31663impl From<NoSkipWriteAccessAllowed> for WriteAccessAllowed {
31664    fn from(t: NoSkipWriteAccessAllowed) -> Self {
31665        Self {
31666            from_request: t.from_request,
31667            web_app_name: t.web_app_name,
31668            from_attachment_menu: t.from_attachment_menu,
31669        }
31670    }
31671}
31672#[allow(clippy::from_over_into)]
31673impl Into<NoSkipWriteAccessAllowed> for WriteAccessAllowed {
31674    fn into(self) -> NoSkipWriteAccessAllowed {
31675        NoSkipWriteAccessAllowed {
31676            from_request: self.from_request,
31677            web_app_name: self.web_app_name,
31678            from_attachment_menu: self.from_attachment_menu,
31679        }
31680    }
31681}
31682impl NoSkipWriteAccessAllowed {
31683    pub fn skip(self) -> WriteAccessAllowed {
31684        self.into()
31685    }
31686}
31687impl WriteAccessAllowed {
31688    pub fn noskip(self) -> NoSkipWriteAccessAllowed {
31689        self.into()
31690    }
31691}
31692#[allow(rustdoc::invalid_html_tags)]
31693#[doc = "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess."]
31694#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31695pub struct WriteAccessAllowedBuilder {
31696    #[allow(rustdoc::invalid_html_tags)]
31697    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
31698    #[serde(
31699        skip_serializing_if = "Option::is_none",
31700        rename = "from_request",
31701        default
31702    )]
31703    pub from_request: Option<bool>,
31704    #[allow(rustdoc::invalid_html_tags)]
31705    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
31706    #[serde(
31707        skip_serializing_if = "Option::is_none",
31708        rename = "web_app_name",
31709        default
31710    )]
31711    pub web_app_name: Option<String>,
31712    #[allow(rustdoc::invalid_html_tags)]
31713    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
31714    #[serde(
31715        skip_serializing_if = "Option::is_none",
31716        rename = "from_attachment_menu",
31717        default
31718    )]
31719    pub from_attachment_menu: Option<bool>,
31720}
31721impl WriteAccessAllowedBuilder {
31722    #[allow(clippy::too_many_arguments)]
31723    pub fn new() -> Self {
31724        Self {
31725            from_request: None,
31726            web_app_name: None,
31727            from_attachment_menu: None,
31728        }
31729    }
31730    #[allow(rustdoc::invalid_html_tags)]
31731    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
31732    pub fn set_from_request(mut self, from_request: bool) -> Self {
31733        self.from_request = Some(from_request);
31734        self
31735    }
31736    #[allow(rustdoc::invalid_html_tags)]
31737    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
31738    pub fn set_web_app_name(mut self, web_app_name: String) -> Self {
31739        self.web_app_name = Some(web_app_name);
31740        self
31741    }
31742    #[allow(rustdoc::invalid_html_tags)]
31743    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
31744    pub fn set_from_attachment_menu(mut self, from_attachment_menu: bool) -> Self {
31745        self.from_attachment_menu = Some(from_attachment_menu);
31746        self
31747    }
31748    pub fn build(self) -> WriteAccessAllowed {
31749        WriteAccessAllowed {
31750            from_request: self.from_request,
31751            web_app_name: self.web_app_name,
31752            from_attachment_menu: self.from_attachment_menu,
31753        }
31754    }
31755}
31756#[allow(rustdoc::invalid_html_tags)]
31757#[doc = "Describes a transaction with payment for paid broadcasting."]
31758#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31759pub struct TransactionPartnerTelegramApi {
31760    #[allow(rustdoc::invalid_html_tags)]
31761    #[doc = "Type of the transaction partner, always \"telegram_api\""]
31762    #[serde(rename = "type")]
31763    pub tg_type: String,
31764    #[allow(rustdoc::invalid_html_tags)]
31765    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
31766    #[serde(rename = "request_count")]
31767    pub request_count: i64,
31768}
31769#[allow(rustdoc::invalid_html_tags)]
31770#[doc = "Companion type to TransactionPartnerTelegramApi that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
31771#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31772pub struct NoSkipTransactionPartnerTelegramApi {
31773    #[allow(rustdoc::invalid_html_tags)]
31774    #[doc = "Type of the transaction partner, always \"telegram_api\""]
31775    #[serde(rename = "type")]
31776    pub tg_type: String,
31777    #[allow(rustdoc::invalid_html_tags)]
31778    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
31779    #[serde(rename = "request_count")]
31780    pub request_count: i64,
31781}
31782impl From<NoSkipTransactionPartnerTelegramApi> for TransactionPartnerTelegramApi {
31783    fn from(t: NoSkipTransactionPartnerTelegramApi) -> Self {
31784        Self {
31785            tg_type: t.tg_type,
31786            request_count: t.request_count,
31787        }
31788    }
31789}
31790#[allow(clippy::from_over_into)]
31791impl Into<NoSkipTransactionPartnerTelegramApi> for TransactionPartnerTelegramApi {
31792    fn into(self) -> NoSkipTransactionPartnerTelegramApi {
31793        NoSkipTransactionPartnerTelegramApi {
31794            tg_type: self.tg_type,
31795            request_count: self.request_count,
31796        }
31797    }
31798}
31799impl NoSkipTransactionPartnerTelegramApi {
31800    pub fn skip(self) -> TransactionPartnerTelegramApi {
31801        self.into()
31802    }
31803}
31804impl TransactionPartnerTelegramApi {
31805    pub fn noskip(self) -> NoSkipTransactionPartnerTelegramApi {
31806        self.into()
31807    }
31808}
31809#[allow(rustdoc::invalid_html_tags)]
31810#[doc = "Describes a transaction with payment for paid broadcasting."]
31811#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31812pub struct TransactionPartnerTelegramApiBuilder {
31813    #[allow(rustdoc::invalid_html_tags)]
31814    #[doc = "Type of the transaction partner, always \"telegram_api\""]
31815    #[serde(rename = "type")]
31816    pub tg_type: String,
31817    #[allow(rustdoc::invalid_html_tags)]
31818    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
31819    #[serde(rename = "request_count")]
31820    pub request_count: i64,
31821}
31822impl TransactionPartnerTelegramApiBuilder {
31823    #[allow(clippy::too_many_arguments)]
31824    pub fn new(request_count: i64) -> Self {
31825        Self {
31826            tg_type: "TransactionPartnerTelegramApi".to_owned(),
31827            request_count,
31828        }
31829    }
31830    #[allow(rustdoc::invalid_html_tags)]
31831    #[doc = "Type of the transaction partner, always \"telegram_api\""]
31832    pub fn set_type(mut self, tg_type: String) -> Self {
31833        self.tg_type = tg_type;
31834        self
31835    }
31836    #[allow(rustdoc::invalid_html_tags)]
31837    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
31838    pub fn set_request_count(mut self, request_count: i64) -> Self {
31839        self.request_count = request_count;
31840        self
31841    }
31842    pub fn build(self) -> TransactionPartnerTelegramApi {
31843        TransactionPartnerTelegramApi {
31844            tg_type: self.tg_type,
31845            request_count: self.request_count,
31846        }
31847    }
31848}
31849#[allow(rustdoc::invalid_html_tags)]
31850#[doc = "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user."]
31851#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31852pub struct ProximityAlertTriggered {
31853    #[allow(rustdoc::invalid_html_tags)]
31854    #[doc = "User that triggered the alert"]
31855    #[serde(rename = "traveler")]
31856    pub traveler: BoxWrapper<Unbox<User>>,
31857    #[allow(rustdoc::invalid_html_tags)]
31858    #[doc = "User that set the alert"]
31859    #[serde(rename = "watcher")]
31860    pub watcher: BoxWrapper<Unbox<User>>,
31861    #[allow(rustdoc::invalid_html_tags)]
31862    #[doc = "The distance between the users"]
31863    #[serde(rename = "distance")]
31864    pub distance: i64,
31865}
31866#[allow(rustdoc::invalid_html_tags)]
31867#[doc = "Companion type to ProximityAlertTriggered that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
31868#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31869pub struct NoSkipProximityAlertTriggered {
31870    #[allow(rustdoc::invalid_html_tags)]
31871    #[doc = "User that triggered the alert"]
31872    #[serde(rename = "traveler")]
31873    pub traveler: BoxWrapper<Unbox<User>>,
31874    #[allow(rustdoc::invalid_html_tags)]
31875    #[doc = "User that set the alert"]
31876    #[serde(rename = "watcher")]
31877    pub watcher: BoxWrapper<Unbox<User>>,
31878    #[allow(rustdoc::invalid_html_tags)]
31879    #[doc = "The distance between the users"]
31880    #[serde(rename = "distance")]
31881    pub distance: i64,
31882}
31883impl From<NoSkipProximityAlertTriggered> for ProximityAlertTriggered {
31884    fn from(t: NoSkipProximityAlertTriggered) -> Self {
31885        Self {
31886            traveler: t.traveler,
31887            watcher: t.watcher,
31888            distance: t.distance,
31889        }
31890    }
31891}
31892#[allow(clippy::from_over_into)]
31893impl Into<NoSkipProximityAlertTriggered> for ProximityAlertTriggered {
31894    fn into(self) -> NoSkipProximityAlertTriggered {
31895        NoSkipProximityAlertTriggered {
31896            traveler: self.traveler,
31897            watcher: self.watcher,
31898            distance: self.distance,
31899        }
31900    }
31901}
31902impl NoSkipProximityAlertTriggered {
31903    pub fn skip(self) -> ProximityAlertTriggered {
31904        self.into()
31905    }
31906}
31907impl ProximityAlertTriggered {
31908    pub fn noskip(self) -> NoSkipProximityAlertTriggered {
31909        self.into()
31910    }
31911}
31912#[allow(rustdoc::invalid_html_tags)]
31913#[doc = "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user."]
31914#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31915pub struct ProximityAlertTriggeredBuilder {
31916    #[allow(rustdoc::invalid_html_tags)]
31917    #[doc = "User that triggered the alert"]
31918    #[serde(rename = "traveler")]
31919    pub traveler: BoxWrapper<Unbox<User>>,
31920    #[allow(rustdoc::invalid_html_tags)]
31921    #[doc = "User that set the alert"]
31922    #[serde(rename = "watcher")]
31923    pub watcher: BoxWrapper<Unbox<User>>,
31924    #[allow(rustdoc::invalid_html_tags)]
31925    #[doc = "The distance between the users"]
31926    #[serde(rename = "distance")]
31927    pub distance: i64,
31928}
31929impl ProximityAlertTriggeredBuilder {
31930    #[allow(clippy::too_many_arguments)]
31931    pub fn new<A: Into<User>, B: Into<User>>(traveler: A, watcher: B, distance: i64) -> Self {
31932        Self {
31933            traveler: BoxWrapper::new_unbox(traveler.into()),
31934            watcher: BoxWrapper::new_unbox(watcher.into()),
31935            distance,
31936        }
31937    }
31938    #[allow(rustdoc::invalid_html_tags)]
31939    #[doc = "User that triggered the alert"]
31940    pub fn set_traveler(mut self, traveler: User) -> Self {
31941        self.traveler = BoxWrapper(Unbox(traveler));
31942        self
31943    }
31944    #[allow(rustdoc::invalid_html_tags)]
31945    #[doc = "User that set the alert"]
31946    pub fn set_watcher(mut self, watcher: User) -> Self {
31947        self.watcher = BoxWrapper(Unbox(watcher));
31948        self
31949    }
31950    #[allow(rustdoc::invalid_html_tags)]
31951    #[doc = "The distance between the users"]
31952    pub fn set_distance(mut self, distance: i64) -> Self {
31953        self.distance = distance;
31954        self
31955    }
31956    pub fn build(self) -> ProximityAlertTriggered {
31957        ProximityAlertTriggered {
31958            traveler: self.traveler,
31959            watcher: self.watcher,
31960            distance: self.distance,
31961        }
31962    }
31963}
31964#[allow(rustdoc::invalid_html_tags)]
31965#[doc = "Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio."]
31966#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
31967pub struct InlineQueryResultAudio {
31968    #[allow(rustdoc::invalid_html_tags)]
31969    #[doc = "Type of the result, must be audio"]
31970    #[serde(rename = "type")]
31971    pub tg_type: String,
31972    #[allow(rustdoc::invalid_html_tags)]
31973    #[doc = "Unique identifier for this result, 1-64 bytes"]
31974    #[serde(rename = "id")]
31975    pub id: String,
31976    #[allow(rustdoc::invalid_html_tags)]
31977    #[doc = "A valid URL for the audio file"]
31978    #[serde(rename = "audio_url")]
31979    pub audio_url: String,
31980    #[allow(rustdoc::invalid_html_tags)]
31981    #[doc = "Title"]
31982    #[serde(rename = "title")]
31983    pub title: String,
31984    #[allow(rustdoc::invalid_html_tags)]
31985    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
31986    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
31987    pub caption: Option<String>,
31988    #[allow(rustdoc::invalid_html_tags)]
31989    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
31990    #[serde(
31991        skip_serializing_if = "Option::is_none",
31992        rename = "parse_mode",
31993        default
31994    )]
31995    pub parse_mode: Option<String>,
31996    #[allow(rustdoc::invalid_html_tags)]
31997    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
31998    #[serde(
31999        skip_serializing_if = "Option::is_none",
32000        rename = "caption_entities",
32001        default
32002    )]
32003    pub caption_entities: Option<Vec<MessageEntity>>,
32004    #[allow(rustdoc::invalid_html_tags)]
32005    #[doc = "Optional. Performer"]
32006    #[serde(skip_serializing_if = "Option::is_none", rename = "performer", default)]
32007    pub performer: Option<String>,
32008    #[allow(rustdoc::invalid_html_tags)]
32009    #[doc = "Optional. Audio duration in seconds"]
32010    #[serde(
32011        skip_serializing_if = "Option::is_none",
32012        rename = "audio_duration",
32013        default
32014    )]
32015    pub audio_duration: Option<i64>,
32016    #[allow(rustdoc::invalid_html_tags)]
32017    #[doc = "Optional. Inline keyboard attached to the message"]
32018    #[serde(
32019        skip_serializing_if = "Option::is_none",
32020        rename = "reply_markup",
32021        default
32022    )]
32023    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
32024    #[allow(rustdoc::invalid_html_tags)]
32025    #[doc = "Optional. Content of the message to be sent instead of the audio"]
32026    #[serde(
32027        skip_serializing_if = "Option::is_none",
32028        rename = "input_message_content",
32029        default
32030    )]
32031    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
32032}
32033#[allow(rustdoc::invalid_html_tags)]
32034#[doc = "Companion type to InlineQueryResultAudio that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
32035#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
32036pub struct NoSkipInlineQueryResultAudio {
32037    #[allow(rustdoc::invalid_html_tags)]
32038    #[doc = "Type of the result, must be audio"]
32039    #[serde(rename = "type")]
32040    pub tg_type: String,
32041    #[allow(rustdoc::invalid_html_tags)]
32042    #[doc = "Unique identifier for this result, 1-64 bytes"]
32043    #[serde(rename = "id")]
32044    pub id: String,
32045    #[allow(rustdoc::invalid_html_tags)]
32046    #[doc = "A valid URL for the audio file"]
32047    #[serde(rename = "audio_url")]
32048    pub audio_url: String,
32049    #[allow(rustdoc::invalid_html_tags)]
32050    #[doc = "Title"]
32051    #[serde(rename = "title")]
32052    pub title: String,
32053    pub caption: Option<String>,
32054    pub parse_mode: Option<String>,
32055    pub caption_entities: Option<Vec<MessageEntity>>,
32056    pub performer: Option<String>,
32057    pub audio_duration: Option<i64>,
32058    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
32059    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
32060}
32061impl From<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio {
32062    fn from(t: NoSkipInlineQueryResultAudio) -> Self {
32063        Self {
32064            tg_type: t.tg_type,
32065            id: t.id,
32066            audio_url: t.audio_url,
32067            title: t.title,
32068            caption: t.caption,
32069            parse_mode: t.parse_mode,
32070            caption_entities: t.caption_entities,
32071            performer: t.performer,
32072            audio_duration: t.audio_duration,
32073            reply_markup: t.reply_markup,
32074            input_message_content: t.input_message_content,
32075        }
32076    }
32077}
32078#[allow(clippy::from_over_into)]
32079impl Into<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio {
32080    fn into(self) -> NoSkipInlineQueryResultAudio {
32081        NoSkipInlineQueryResultAudio {
32082            tg_type: self.tg_type,
32083            id: self.id,
32084            audio_url: self.audio_url,
32085            title: self.title,
32086            caption: self.caption,
32087            parse_mode: self.parse_mode,
32088            caption_entities: self.caption_entities,
32089            performer: self.performer,
32090            audio_duration: self.audio_duration,
32091            reply_markup: self.reply_markup,
32092            input_message_content: self.input_message_content,
32093        }
32094    }
32095}
32096impl NoSkipInlineQueryResultAudio {
32097    pub fn skip(self) -> InlineQueryResultAudio {
32098        self.into()
32099    }
32100}
32101impl InlineQueryResultAudio {
32102    pub fn noskip(self) -> NoSkipInlineQueryResultAudio {
32103        self.into()
32104    }
32105}
32106#[allow(rustdoc::invalid_html_tags)]
32107#[doc = "Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio."]
32108#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
32109pub struct InlineQueryResultAudioBuilder {
32110    #[allow(rustdoc::invalid_html_tags)]
32111    #[doc = "Type of the result, must be audio"]
32112    #[serde(rename = "type")]
32113    pub tg_type: String,
32114    #[allow(rustdoc::invalid_html_tags)]
32115    #[doc = "Unique identifier for this result, 1-64 bytes"]
32116    #[serde(rename = "id")]
32117    pub id: String,
32118    #[allow(rustdoc::invalid_html_tags)]
32119    #[doc = "A valid URL for the audio file"]
32120    #[serde(rename = "audio_url")]
32121    pub audio_url: String,
32122    #[allow(rustdoc::invalid_html_tags)]
32123    #[doc = "Title"]
32124    #[serde(rename = "title")]
32125    pub title: String,
32126    #[allow(rustdoc::invalid_html_tags)]
32127    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
32128    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
32129    pub caption: Option<String>,
32130    #[allow(rustdoc::invalid_html_tags)]
32131    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
32132    #[serde(
32133        skip_serializing_if = "Option::is_none",
32134        rename = "parse_mode",
32135        default
32136    )]
32137    pub parse_mode: Option<String>,
32138    #[allow(rustdoc::invalid_html_tags)]
32139    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
32140    #[serde(
32141        skip_serializing_if = "Option::is_none",
32142        rename = "caption_entities",
32143        default
32144    )]
32145    pub caption_entities: Option<Vec<MessageEntity>>,
32146    #[allow(rustdoc::invalid_html_tags)]
32147    #[doc = "Optional. Performer"]
32148    #[serde(skip_serializing_if = "Option::is_none", rename = "performer", default)]
32149    pub performer: Option<String>,
32150    #[allow(rustdoc::invalid_html_tags)]
32151    #[doc = "Optional. Audio duration in seconds"]
32152    #[serde(
32153        skip_serializing_if = "Option::is_none",
32154        rename = "audio_duration",
32155        default
32156    )]
32157    pub audio_duration: Option<i64>,
32158    #[allow(rustdoc::invalid_html_tags)]
32159    #[doc = "Optional. Inline keyboard attached to the message"]
32160    #[serde(
32161        skip_serializing_if = "Option::is_none",
32162        rename = "reply_markup",
32163        default
32164    )]
32165    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
32166    #[allow(rustdoc::invalid_html_tags)]
32167    #[doc = "Optional. Content of the message to be sent instead of the audio"]
32168    #[serde(
32169        skip_serializing_if = "Option::is_none",
32170        rename = "input_message_content",
32171        default
32172    )]
32173    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
32174}
32175impl InlineQueryResultAudioBuilder {
32176    #[allow(clippy::too_many_arguments)]
32177    pub fn new(id: String, audio_url: String, title: String) -> Self {
32178        Self {
32179            tg_type: "audio".to_owned(),
32180            id,
32181            audio_url,
32182            title,
32183            caption: None,
32184            parse_mode: None,
32185            caption_entities: None,
32186            performer: None,
32187            audio_duration: None,
32188            reply_markup: None,
32189            input_message_content: None,
32190        }
32191    }
32192    #[allow(rustdoc::invalid_html_tags)]
32193    #[doc = "Type of the result, must be audio"]
32194    pub fn set_type(mut self, tg_type: String) -> Self {
32195        self.tg_type = tg_type;
32196        self
32197    }
32198    #[allow(rustdoc::invalid_html_tags)]
32199    #[doc = "Unique identifier for this result, 1-64 bytes"]
32200    pub fn set_id(mut self, id: String) -> Self {
32201        self.id = id;
32202        self
32203    }
32204    #[allow(rustdoc::invalid_html_tags)]
32205    #[doc = "A valid URL for the audio file"]
32206    pub fn set_audio_url(mut self, audio_url: String) -> Self {
32207        self.audio_url = audio_url;
32208        self
32209    }
32210    #[allow(rustdoc::invalid_html_tags)]
32211    #[doc = "Title"]
32212    pub fn set_title(mut self, title: String) -> Self {
32213        self.title = title;
32214        self
32215    }
32216    #[allow(rustdoc::invalid_html_tags)]
32217    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
32218    pub fn set_caption(mut self, caption: String) -> Self {
32219        self.caption = Some(caption);
32220        self
32221    }
32222    #[allow(rustdoc::invalid_html_tags)]
32223    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
32224    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
32225        self.parse_mode = Some(parse_mode);
32226        self
32227    }
32228    #[allow(rustdoc::invalid_html_tags)]
32229    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
32230    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
32231        self.caption_entities = Some(caption_entities);
32232        self
32233    }
32234    #[allow(rustdoc::invalid_html_tags)]
32235    #[doc = "Optional. Performer"]
32236    pub fn set_performer(mut self, performer: String) -> Self {
32237        self.performer = Some(performer);
32238        self
32239    }
32240    #[allow(rustdoc::invalid_html_tags)]
32241    #[doc = "Optional. Audio duration in seconds"]
32242    pub fn set_audio_duration(mut self, audio_duration: i64) -> Self {
32243        self.audio_duration = Some(audio_duration);
32244        self
32245    }
32246    #[allow(rustdoc::invalid_html_tags)]
32247    #[doc = "Optional. Inline keyboard attached to the message"]
32248    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
32249        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
32250        self
32251    }
32252    #[allow(rustdoc::invalid_html_tags)]
32253    #[doc = "Optional. Content of the message to be sent instead of the audio"]
32254    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
32255        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
32256        self
32257    }
32258    pub fn build(self) -> InlineQueryResultAudio {
32259        InlineQueryResultAudio {
32260            tg_type: self.tg_type,
32261            id: self.id,
32262            audio_url: self.audio_url,
32263            title: self.title,
32264            caption: self.caption,
32265            parse_mode: self.parse_mode,
32266            caption_entities: self.caption_entities,
32267            performer: self.performer,
32268            audio_duration: self.audio_duration,
32269            reply_markup: self.reply_markup,
32270            input_message_content: self.input_message_content,
32271        }
32272    }
32273}
32274#[allow(rustdoc::invalid_html_tags)]
32275#[doc = "This object represents a message."]
32276#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
32277pub struct Message {
32278    #[allow(rustdoc::invalid_html_tags)]
32279    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
32280    #[serde(rename = "message_id")]
32281    pub message_id: i64,
32282    #[allow(rustdoc::invalid_html_tags)]
32283    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
32284    #[serde(
32285        skip_serializing_if = "Option::is_none",
32286        rename = "message_thread_id",
32287        default
32288    )]
32289    pub message_thread_id: Option<i64>,
32290    #[allow(rustdoc::invalid_html_tags)]
32291    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
32292    #[serde(
32293        skip_serializing_if = "Option::is_none",
32294        rename = "direct_messages_topic",
32295        default
32296    )]
32297    pub direct_messages_topic: Option<BoxWrapper<Unbox<DirectMessagesTopic>>>,
32298    #[allow(rustdoc::invalid_html_tags)]
32299    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
32300    #[serde(skip_serializing_if = "Option::is_none", rename = "from", default)]
32301    pub from: Option<BoxWrapper<Unbox<User>>>,
32302    #[allow(rustdoc::invalid_html_tags)]
32303    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
32304    #[serde(
32305        skip_serializing_if = "Option::is_none",
32306        rename = "sender_chat",
32307        default
32308    )]
32309    pub sender_chat: Option<BoxWrapper<Unbox<Chat>>>,
32310    #[allow(rustdoc::invalid_html_tags)]
32311    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
32312    #[serde(
32313        skip_serializing_if = "Option::is_none",
32314        rename = "sender_boost_count",
32315        default
32316    )]
32317    pub sender_boost_count: Option<i64>,
32318    #[allow(rustdoc::invalid_html_tags)]
32319    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
32320    #[serde(
32321        skip_serializing_if = "Option::is_none",
32322        rename = "sender_business_bot",
32323        default
32324    )]
32325    pub sender_business_bot: Option<BoxWrapper<Unbox<User>>>,
32326    #[allow(rustdoc::invalid_html_tags)]
32327    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
32328    #[serde(rename = "date")]
32329    pub date: i64,
32330    #[allow(rustdoc::invalid_html_tags)]
32331    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
32332    #[serde(
32333        skip_serializing_if = "Option::is_none",
32334        rename = "business_connection_id",
32335        default
32336    )]
32337    pub business_connection_id: Option<String>,
32338    #[allow(rustdoc::invalid_html_tags)]
32339    #[doc = "Chat the message belongs to"]
32340    #[serde(rename = "chat")]
32341    pub chat: BoxWrapper<Unbox<Chat>>,
32342    #[allow(rustdoc::invalid_html_tags)]
32343    #[doc = "Optional. Information about the original message for forwarded messages"]
32344    #[serde(
32345        skip_serializing_if = "Option::is_none",
32346        rename = "forward_origin",
32347        default
32348    )]
32349    pub forward_origin: Option<BoxWrapper<Unbox<MessageOrigin>>>,
32350    #[allow(rustdoc::invalid_html_tags)]
32351    #[doc = "Optional. True, if the message is sent to a forum topic"]
32352    #[serde(
32353        skip_serializing_if = "Option::is_none",
32354        rename = "is_topic_message",
32355        default
32356    )]
32357    pub is_topic_message: Option<bool>,
32358    #[allow(rustdoc::invalid_html_tags)]
32359    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
32360    #[serde(
32361        skip_serializing_if = "Option::is_none",
32362        rename = "is_automatic_forward",
32363        default
32364    )]
32365    pub is_automatic_forward: Option<bool>,
32366    #[allow(rustdoc::invalid_html_tags)]
32367    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
32368    #[serde(
32369        skip_serializing_if = "Option::is_none",
32370        rename = "reply_to_message",
32371        default
32372    )]
32373    pub reply_to_message: Option<BoxWrapper<Box<Message>>>,
32374    #[allow(rustdoc::invalid_html_tags)]
32375    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
32376    #[serde(
32377        skip_serializing_if = "Option::is_none",
32378        rename = "external_reply",
32379        default
32380    )]
32381    pub external_reply: Option<BoxWrapper<Unbox<ExternalReplyInfo>>>,
32382    #[allow(rustdoc::invalid_html_tags)]
32383    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
32384    #[serde(skip_serializing_if = "Option::is_none", rename = "quote", default)]
32385    pub quote: Option<BoxWrapper<Unbox<TextQuote>>>,
32386    #[allow(rustdoc::invalid_html_tags)]
32387    #[doc = "Optional. For replies to a story, the original story"]
32388    #[serde(
32389        skip_serializing_if = "Option::is_none",
32390        rename = "reply_to_story",
32391        default
32392    )]
32393    pub reply_to_story: Option<BoxWrapper<Unbox<Story>>>,
32394    #[allow(rustdoc::invalid_html_tags)]
32395    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
32396    #[serde(
32397        skip_serializing_if = "Option::is_none",
32398        rename = "reply_to_checklist_task_id",
32399        default
32400    )]
32401    pub reply_to_checklist_task_id: Option<i64>,
32402    #[allow(rustdoc::invalid_html_tags)]
32403    #[doc = "Optional. Bot through which the message was sent"]
32404    #[serde(skip_serializing_if = "Option::is_none", rename = "via_bot", default)]
32405    pub via_bot: Option<BoxWrapper<Unbox<User>>>,
32406    #[allow(rustdoc::invalid_html_tags)]
32407    #[doc = "Optional. Date the message was last edited in Unix time"]
32408    #[serde(skip_serializing_if = "Option::is_none", rename = "edit_date", default)]
32409    pub edit_date: Option<i64>,
32410    #[allow(rustdoc::invalid_html_tags)]
32411    #[doc = "Optional. True, if the message can't be forwarded"]
32412    #[serde(
32413        skip_serializing_if = "Option::is_none",
32414        rename = "has_protected_content",
32415        default
32416    )]
32417    pub has_protected_content: Option<bool>,
32418    #[allow(rustdoc::invalid_html_tags)]
32419    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
32420    #[serde(
32421        skip_serializing_if = "Option::is_none",
32422        rename = "is_from_offline",
32423        default
32424    )]
32425    pub is_from_offline: Option<bool>,
32426    #[allow(rustdoc::invalid_html_tags)]
32427    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
32428    #[serde(
32429        skip_serializing_if = "Option::is_none",
32430        rename = "is_paid_post",
32431        default
32432    )]
32433    pub is_paid_post: Option<bool>,
32434    #[allow(rustdoc::invalid_html_tags)]
32435    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
32436    #[serde(
32437        skip_serializing_if = "Option::is_none",
32438        rename = "media_group_id",
32439        default
32440    )]
32441    pub media_group_id: Option<String>,
32442    #[allow(rustdoc::invalid_html_tags)]
32443    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
32444    #[serde(
32445        skip_serializing_if = "Option::is_none",
32446        rename = "author_signature",
32447        default
32448    )]
32449    pub author_signature: Option<String>,
32450    #[allow(rustdoc::invalid_html_tags)]
32451    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
32452    #[serde(
32453        skip_serializing_if = "Option::is_none",
32454        rename = "paid_star_count",
32455        default
32456    )]
32457    pub paid_star_count: Option<i64>,
32458    #[allow(rustdoc::invalid_html_tags)]
32459    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
32460    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
32461    pub text: Option<String>,
32462    #[allow(rustdoc::invalid_html_tags)]
32463    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
32464    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
32465    pub entities: Option<Vec<MessageEntity>>,
32466    #[allow(rustdoc::invalid_html_tags)]
32467    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
32468    #[serde(
32469        skip_serializing_if = "Option::is_none",
32470        rename = "link_preview_options",
32471        default
32472    )]
32473    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
32474    #[allow(rustdoc::invalid_html_tags)]
32475    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
32476    #[serde(
32477        skip_serializing_if = "Option::is_none",
32478        rename = "suggested_post_info",
32479        default
32480    )]
32481    pub suggested_post_info: Option<BoxWrapper<Unbox<SuggestedPostInfo>>>,
32482    #[allow(rustdoc::invalid_html_tags)]
32483    #[doc = "Optional. Unique identifier of the message effect added to the message"]
32484    #[serde(skip_serializing_if = "Option::is_none", rename = "effect_id", default)]
32485    pub effect_id: Option<String>,
32486    #[allow(rustdoc::invalid_html_tags)]
32487    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
32488    #[serde(skip_serializing_if = "Option::is_none", rename = "animation", default)]
32489    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
32490    #[allow(rustdoc::invalid_html_tags)]
32491    #[doc = "Optional. Message is an audio file, information about the file"]
32492    #[serde(skip_serializing_if = "Option::is_none", rename = "audio", default)]
32493    pub audio: Option<BoxWrapper<Unbox<Audio>>>,
32494    #[allow(rustdoc::invalid_html_tags)]
32495    #[doc = "Optional. Message is a general file, information about the file"]
32496    #[serde(skip_serializing_if = "Option::is_none", rename = "document", default)]
32497    pub document: Option<BoxWrapper<Unbox<Document>>>,
32498    #[allow(rustdoc::invalid_html_tags)]
32499    #[doc = "Optional. Message contains paid media; information about the paid media"]
32500    #[serde(
32501        skip_serializing_if = "Option::is_none",
32502        rename = "paid_media",
32503        default
32504    )]
32505    pub paid_media: Option<BoxWrapper<Unbox<PaidMediaInfo>>>,
32506    #[allow(rustdoc::invalid_html_tags)]
32507    #[doc = "Optional. Message is a photo, available sizes of the photo"]
32508    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
32509    pub photo: Option<Vec<PhotoSize>>,
32510    #[allow(rustdoc::invalid_html_tags)]
32511    #[doc = "Optional. Message is a sticker, information about the sticker"]
32512    #[serde(skip_serializing_if = "Option::is_none", rename = "sticker", default)]
32513    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
32514    #[allow(rustdoc::invalid_html_tags)]
32515    #[doc = "Optional. Message is a forwarded story"]
32516    #[serde(skip_serializing_if = "Option::is_none", rename = "story", default)]
32517    pub story: Option<BoxWrapper<Unbox<Story>>>,
32518    #[allow(rustdoc::invalid_html_tags)]
32519    #[doc = "Optional. Message is a video, information about the video"]
32520    #[serde(skip_serializing_if = "Option::is_none", rename = "video", default)]
32521    pub video: Option<BoxWrapper<Unbox<Video>>>,
32522    #[allow(rustdoc::invalid_html_tags)]
32523    #[doc = "Optional. Message is a video note, information about the video message"]
32524    #[serde(
32525        skip_serializing_if = "Option::is_none",
32526        rename = "video_note",
32527        default
32528    )]
32529    pub video_note: Option<BoxWrapper<Unbox<VideoNote>>>,
32530    #[allow(rustdoc::invalid_html_tags)]
32531    #[doc = "Optional. Message is a voice message, information about the file"]
32532    #[serde(skip_serializing_if = "Option::is_none", rename = "voice", default)]
32533    pub voice: Option<BoxWrapper<Unbox<Voice>>>,
32534    #[allow(rustdoc::invalid_html_tags)]
32535    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
32536    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
32537    pub caption: Option<String>,
32538    #[allow(rustdoc::invalid_html_tags)]
32539    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
32540    #[serde(
32541        skip_serializing_if = "Option::is_none",
32542        rename = "caption_entities",
32543        default
32544    )]
32545    pub caption_entities: Option<Vec<MessageEntity>>,
32546    #[allow(rustdoc::invalid_html_tags)]
32547    #[doc = "Optional. True, if the caption must be shown above the message media"]
32548    #[serde(
32549        skip_serializing_if = "Option::is_none",
32550        rename = "show_caption_above_media",
32551        default
32552    )]
32553    pub show_caption_above_media: Option<bool>,
32554    #[allow(rustdoc::invalid_html_tags)]
32555    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
32556    #[serde(
32557        skip_serializing_if = "Option::is_none",
32558        rename = "has_media_spoiler",
32559        default
32560    )]
32561    pub has_media_spoiler: Option<bool>,
32562    #[allow(rustdoc::invalid_html_tags)]
32563    #[doc = "Optional. Message is a checklist"]
32564    #[serde(skip_serializing_if = "Option::is_none", rename = "checklist", default)]
32565    pub checklist: Option<BoxWrapper<Unbox<Checklist>>>,
32566    #[allow(rustdoc::invalid_html_tags)]
32567    #[doc = "Optional. Message is a shared contact, information about the contact"]
32568    #[serde(skip_serializing_if = "Option::is_none", rename = "contact", default)]
32569    pub contact: Option<BoxWrapper<Unbox<Contact>>>,
32570    #[allow(rustdoc::invalid_html_tags)]
32571    #[doc = "Optional. Message is a dice with random value"]
32572    #[serde(skip_serializing_if = "Option::is_none", rename = "dice", default)]
32573    pub dice: Option<BoxWrapper<Unbox<Dice>>>,
32574    #[allow(rustdoc::invalid_html_tags)]
32575    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
32576    #[serde(skip_serializing_if = "Option::is_none", rename = "game", default)]
32577    pub game: Option<BoxWrapper<Unbox<Game>>>,
32578    #[allow(rustdoc::invalid_html_tags)]
32579    #[doc = "Optional. Message is a native poll, information about the poll"]
32580    #[serde(skip_serializing_if = "Option::is_none", rename = "poll", default)]
32581    pub poll: Option<BoxWrapper<Unbox<Poll>>>,
32582    #[allow(rustdoc::invalid_html_tags)]
32583    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
32584    #[serde(skip_serializing_if = "Option::is_none", rename = "venue", default)]
32585    pub venue: Option<BoxWrapper<Unbox<Venue>>>,
32586    #[allow(rustdoc::invalid_html_tags)]
32587    #[doc = "Optional. Message is a shared location, information about the location"]
32588    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
32589    pub location: Option<BoxWrapper<Unbox<Location>>>,
32590    #[allow(rustdoc::invalid_html_tags)]
32591    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
32592    #[serde(
32593        skip_serializing_if = "Option::is_none",
32594        rename = "new_chat_members",
32595        default
32596    )]
32597    pub new_chat_members: Option<Vec<User>>,
32598    #[allow(rustdoc::invalid_html_tags)]
32599    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
32600    #[serde(
32601        skip_serializing_if = "Option::is_none",
32602        rename = "left_chat_member",
32603        default
32604    )]
32605    pub left_chat_member: Option<BoxWrapper<Unbox<User>>>,
32606    #[allow(rustdoc::invalid_html_tags)]
32607    #[doc = "Optional. A chat title was changed to this value"]
32608    #[serde(
32609        skip_serializing_if = "Option::is_none",
32610        rename = "new_chat_title",
32611        default
32612    )]
32613    pub new_chat_title: Option<String>,
32614    #[allow(rustdoc::invalid_html_tags)]
32615    #[doc = "Optional. A chat photo was change to this value"]
32616    #[serde(
32617        skip_serializing_if = "Option::is_none",
32618        rename = "new_chat_photo",
32619        default
32620    )]
32621    pub new_chat_photo: Option<Vec<PhotoSize>>,
32622    #[allow(rustdoc::invalid_html_tags)]
32623    #[doc = "Optional. Service message: the chat photo was deleted"]
32624    #[serde(
32625        skip_serializing_if = "Option::is_none",
32626        rename = "delete_chat_photo",
32627        default
32628    )]
32629    pub delete_chat_photo: Option<bool>,
32630    #[allow(rustdoc::invalid_html_tags)]
32631    #[doc = "Optional. Service message: the group has been created"]
32632    #[serde(
32633        skip_serializing_if = "Option::is_none",
32634        rename = "group_chat_created",
32635        default
32636    )]
32637    pub group_chat_created: Option<bool>,
32638    #[allow(rustdoc::invalid_html_tags)]
32639    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
32640    #[serde(
32641        skip_serializing_if = "Option::is_none",
32642        rename = "supergroup_chat_created",
32643        default
32644    )]
32645    pub supergroup_chat_created: Option<bool>,
32646    #[allow(rustdoc::invalid_html_tags)]
32647    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
32648    #[serde(
32649        skip_serializing_if = "Option::is_none",
32650        rename = "channel_chat_created",
32651        default
32652    )]
32653    pub channel_chat_created: Option<bool>,
32654    #[allow(rustdoc::invalid_html_tags)]
32655    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
32656    #[serde(
32657        skip_serializing_if = "Option::is_none",
32658        rename = "message_auto_delete_timer_changed",
32659        default
32660    )]
32661    pub message_auto_delete_timer_changed: Option<BoxWrapper<Unbox<MessageAutoDeleteTimerChanged>>>,
32662    #[allow(rustdoc::invalid_html_tags)]
32663    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
32664    #[serde(
32665        skip_serializing_if = "Option::is_none",
32666        rename = "migrate_to_chat_id",
32667        default
32668    )]
32669    pub migrate_to_chat_id: Option<i64>,
32670    #[allow(rustdoc::invalid_html_tags)]
32671    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
32672    #[serde(
32673        skip_serializing_if = "Option::is_none",
32674        rename = "migrate_from_chat_id",
32675        default
32676    )]
32677    pub migrate_from_chat_id: Option<i64>,
32678    #[allow(rustdoc::invalid_html_tags)]
32679    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
32680    #[serde(
32681        skip_serializing_if = "Option::is_none",
32682        rename = "pinned_message",
32683        default
32684    )]
32685    pub pinned_message: Option<BoxWrapper<Box<MaybeInaccessibleMessage>>>,
32686    #[allow(rustdoc::invalid_html_tags)]
32687    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
32688    #[serde(skip_serializing_if = "Option::is_none", rename = "invoice", default)]
32689    pub invoice: Option<BoxWrapper<Unbox<Invoice>>>,
32690    #[allow(rustdoc::invalid_html_tags)]
32691    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
32692    #[serde(
32693        skip_serializing_if = "Option::is_none",
32694        rename = "successful_payment",
32695        default
32696    )]
32697    pub successful_payment: Option<BoxWrapper<Unbox<SuccessfulPayment>>>,
32698    #[allow(rustdoc::invalid_html_tags)]
32699    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
32700    #[serde(
32701        skip_serializing_if = "Option::is_none",
32702        rename = "refunded_payment",
32703        default
32704    )]
32705    pub refunded_payment: Option<BoxWrapper<Unbox<RefundedPayment>>>,
32706    #[allow(rustdoc::invalid_html_tags)]
32707    #[doc = "Optional. Service message: users were shared with the bot"]
32708    #[serde(
32709        skip_serializing_if = "Option::is_none",
32710        rename = "users_shared",
32711        default
32712    )]
32713    pub users_shared: Option<BoxWrapper<Unbox<UsersShared>>>,
32714    #[allow(rustdoc::invalid_html_tags)]
32715    #[doc = "Optional. Service message: a chat was shared with the bot"]
32716    #[serde(
32717        skip_serializing_if = "Option::is_none",
32718        rename = "chat_shared",
32719        default
32720    )]
32721    pub chat_shared: Option<BoxWrapper<Unbox<ChatShared>>>,
32722    #[allow(rustdoc::invalid_html_tags)]
32723    #[doc = "Optional. Service message: a regular gift was sent or received"]
32724    #[serde(skip_serializing_if = "Option::is_none", rename = "gift", default)]
32725    pub gift: Option<BoxWrapper<Unbox<GiftInfo>>>,
32726    #[allow(rustdoc::invalid_html_tags)]
32727    #[doc = "Optional. Service message: a unique gift was sent or received"]
32728    #[serde(
32729        skip_serializing_if = "Option::is_none",
32730        rename = "unique_gift",
32731        default
32732    )]
32733    pub unique_gift: Option<BoxWrapper<Unbox<UniqueGiftInfo>>>,
32734    #[allow(rustdoc::invalid_html_tags)]
32735    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
32736    #[serde(
32737        skip_serializing_if = "Option::is_none",
32738        rename = "connected_website",
32739        default
32740    )]
32741    pub connected_website: Option<String>,
32742    #[allow(rustdoc::invalid_html_tags)]
32743    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
32744    #[serde(
32745        skip_serializing_if = "Option::is_none",
32746        rename = "write_access_allowed",
32747        default
32748    )]
32749    pub write_access_allowed: Option<BoxWrapper<Unbox<WriteAccessAllowed>>>,
32750    #[allow(rustdoc::invalid_html_tags)]
32751    #[doc = "Optional. Telegram Passport data"]
32752    #[serde(
32753        skip_serializing_if = "Option::is_none",
32754        rename = "passport_data",
32755        default
32756    )]
32757    pub passport_data: Option<BoxWrapper<Unbox<PassportData>>>,
32758    #[allow(rustdoc::invalid_html_tags)]
32759    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
32760    #[serde(
32761        skip_serializing_if = "Option::is_none",
32762        rename = "proximity_alert_triggered",
32763        default
32764    )]
32765    pub proximity_alert_triggered: Option<BoxWrapper<Unbox<ProximityAlertTriggered>>>,
32766    #[allow(rustdoc::invalid_html_tags)]
32767    #[doc = "Optional. Service message: user boosted the chat"]
32768    #[serde(
32769        skip_serializing_if = "Option::is_none",
32770        rename = "boost_added",
32771        default
32772    )]
32773    pub boost_added: Option<BoxWrapper<Unbox<ChatBoostAdded>>>,
32774    #[allow(rustdoc::invalid_html_tags)]
32775    #[doc = "Optional. Service message: chat background set"]
32776    #[serde(
32777        skip_serializing_if = "Option::is_none",
32778        rename = "chat_background_set",
32779        default
32780    )]
32781    pub chat_background_set: Option<BoxWrapper<Unbox<ChatBackground>>>,
32782    #[allow(rustdoc::invalid_html_tags)]
32783    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
32784    #[serde(
32785        skip_serializing_if = "Option::is_none",
32786        rename = "checklist_tasks_done",
32787        default
32788    )]
32789    pub checklist_tasks_done: Option<BoxWrapper<Box<ChecklistTasksDone>>>,
32790    #[allow(rustdoc::invalid_html_tags)]
32791    #[doc = "Optional. Service message: tasks were added to a checklist"]
32792    #[serde(
32793        skip_serializing_if = "Option::is_none",
32794        rename = "checklist_tasks_added",
32795        default
32796    )]
32797    pub checklist_tasks_added: Option<BoxWrapper<Box<ChecklistTasksAdded>>>,
32798    #[allow(rustdoc::invalid_html_tags)]
32799    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
32800    #[serde(
32801        skip_serializing_if = "Option::is_none",
32802        rename = "direct_message_price_changed",
32803        default
32804    )]
32805    pub direct_message_price_changed: Option<BoxWrapper<Unbox<DirectMessagePriceChanged>>>,
32806    #[allow(rustdoc::invalid_html_tags)]
32807    #[doc = "Optional. Service message: forum topic created"]
32808    #[serde(
32809        skip_serializing_if = "Option::is_none",
32810        rename = "forum_topic_created",
32811        default
32812    )]
32813    pub forum_topic_created: Option<BoxWrapper<Unbox<ForumTopicCreated>>>,
32814    #[allow(rustdoc::invalid_html_tags)]
32815    #[doc = "Optional. Service message: forum topic edited"]
32816    #[serde(
32817        skip_serializing_if = "Option::is_none",
32818        rename = "forum_topic_edited",
32819        default
32820    )]
32821    pub forum_topic_edited: Option<BoxWrapper<Unbox<ForumTopicEdited>>>,
32822    #[allow(rustdoc::invalid_html_tags)]
32823    #[doc = "Optional. Service message: forum topic closed"]
32824    #[serde(
32825        skip_serializing_if = "Option::is_none",
32826        rename = "forum_topic_closed",
32827        default
32828    )]
32829    pub forum_topic_closed: Option<BoxWrapper<Unbox<ForumTopicClosed>>>,
32830    #[allow(rustdoc::invalid_html_tags)]
32831    #[doc = "Optional. Service message: forum topic reopened"]
32832    #[serde(
32833        skip_serializing_if = "Option::is_none",
32834        rename = "forum_topic_reopened",
32835        default
32836    )]
32837    pub forum_topic_reopened: Option<BoxWrapper<Unbox<ForumTopicReopened>>>,
32838    #[allow(rustdoc::invalid_html_tags)]
32839    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
32840    #[serde(
32841        skip_serializing_if = "Option::is_none",
32842        rename = "general_forum_topic_hidden",
32843        default
32844    )]
32845    pub general_forum_topic_hidden: Option<BoxWrapper<Unbox<GeneralForumTopicHidden>>>,
32846    #[allow(rustdoc::invalid_html_tags)]
32847    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
32848    #[serde(
32849        skip_serializing_if = "Option::is_none",
32850        rename = "general_forum_topic_unhidden",
32851        default
32852    )]
32853    pub general_forum_topic_unhidden: Option<BoxWrapper<Unbox<GeneralForumTopicUnhidden>>>,
32854    #[allow(rustdoc::invalid_html_tags)]
32855    #[doc = "Optional. Service message: a scheduled giveaway was created"]
32856    #[serde(
32857        skip_serializing_if = "Option::is_none",
32858        rename = "giveaway_created",
32859        default
32860    )]
32861    pub giveaway_created: Option<BoxWrapper<Unbox<GiveawayCreated>>>,
32862    #[allow(rustdoc::invalid_html_tags)]
32863    #[doc = "Optional. The message is a scheduled giveaway message"]
32864    #[serde(skip_serializing_if = "Option::is_none", rename = "giveaway", default)]
32865    pub giveaway: Option<BoxWrapper<Unbox<Giveaway>>>,
32866    #[allow(rustdoc::invalid_html_tags)]
32867    #[doc = "Optional. A giveaway with public winners was completed"]
32868    #[serde(
32869        skip_serializing_if = "Option::is_none",
32870        rename = "giveaway_winners",
32871        default
32872    )]
32873    pub giveaway_winners: Option<BoxWrapper<Unbox<GiveawayWinners>>>,
32874    #[allow(rustdoc::invalid_html_tags)]
32875    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
32876    #[serde(
32877        skip_serializing_if = "Option::is_none",
32878        rename = "giveaway_completed",
32879        default
32880    )]
32881    pub giveaway_completed: Option<BoxWrapper<Box<GiveawayCompleted>>>,
32882    #[allow(rustdoc::invalid_html_tags)]
32883    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
32884    #[serde(
32885        skip_serializing_if = "Option::is_none",
32886        rename = "paid_message_price_changed",
32887        default
32888    )]
32889    pub paid_message_price_changed: Option<BoxWrapper<Unbox<PaidMessagePriceChanged>>>,
32890    #[allow(rustdoc::invalid_html_tags)]
32891    #[doc = "Optional. Service message: a suggested post was approved"]
32892    #[serde(
32893        skip_serializing_if = "Option::is_none",
32894        rename = "suggested_post_approved",
32895        default
32896    )]
32897    pub suggested_post_approved: Option<BoxWrapper<Unbox<SuggestedPostApproved>>>,
32898    #[allow(rustdoc::invalid_html_tags)]
32899    #[doc = "Optional. Service message: approval of a suggested post has failed"]
32900    #[serde(
32901        skip_serializing_if = "Option::is_none",
32902        rename = "suggested_post_approval_failed",
32903        default
32904    )]
32905    pub suggested_post_approval_failed: Option<BoxWrapper<Unbox<SuggestedPostApprovalFailed>>>,
32906    #[allow(rustdoc::invalid_html_tags)]
32907    #[doc = "Optional. Service message: a suggested post was declined"]
32908    #[serde(
32909        skip_serializing_if = "Option::is_none",
32910        rename = "suggested_post_declined",
32911        default
32912    )]
32913    pub suggested_post_declined: Option<BoxWrapper<Unbox<SuggestedPostDeclined>>>,
32914    #[allow(rustdoc::invalid_html_tags)]
32915    #[doc = "Optional. Service message: payment for a suggested post was received"]
32916    #[serde(
32917        skip_serializing_if = "Option::is_none",
32918        rename = "suggested_post_paid",
32919        default
32920    )]
32921    pub suggested_post_paid: Option<BoxWrapper<Unbox<SuggestedPostPaid>>>,
32922    #[allow(rustdoc::invalid_html_tags)]
32923    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
32924    #[serde(
32925        skip_serializing_if = "Option::is_none",
32926        rename = "suggested_post_refunded",
32927        default
32928    )]
32929    pub suggested_post_refunded: Option<BoxWrapper<Unbox<SuggestedPostRefunded>>>,
32930    #[allow(rustdoc::invalid_html_tags)]
32931    #[doc = "Optional. Service message: video chat scheduled"]
32932    #[serde(
32933        skip_serializing_if = "Option::is_none",
32934        rename = "video_chat_scheduled",
32935        default
32936    )]
32937    pub video_chat_scheduled: Option<BoxWrapper<Unbox<VideoChatScheduled>>>,
32938    #[allow(rustdoc::invalid_html_tags)]
32939    #[doc = "Optional. Service message: video chat started"]
32940    #[serde(
32941        skip_serializing_if = "Option::is_none",
32942        rename = "video_chat_started",
32943        default
32944    )]
32945    pub video_chat_started: Option<BoxWrapper<Unbox<VideoChatStarted>>>,
32946    #[allow(rustdoc::invalid_html_tags)]
32947    #[doc = "Optional. Service message: video chat ended"]
32948    #[serde(
32949        skip_serializing_if = "Option::is_none",
32950        rename = "video_chat_ended",
32951        default
32952    )]
32953    pub video_chat_ended: Option<BoxWrapper<Unbox<VideoChatEnded>>>,
32954    #[allow(rustdoc::invalid_html_tags)]
32955    #[doc = "Optional. Service message: new participants invited to a video chat"]
32956    #[serde(
32957        skip_serializing_if = "Option::is_none",
32958        rename = "video_chat_participants_invited",
32959        default
32960    )]
32961    pub video_chat_participants_invited: Option<BoxWrapper<Unbox<VideoChatParticipantsInvited>>>,
32962    #[allow(rustdoc::invalid_html_tags)]
32963    #[doc = "Optional. Service message: data sent by a Web App"]
32964    #[serde(
32965        skip_serializing_if = "Option::is_none",
32966        rename = "web_app_data",
32967        default
32968    )]
32969    pub web_app_data: Option<BoxWrapper<Unbox<WebAppData>>>,
32970    #[allow(rustdoc::invalid_html_tags)]
32971    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
32972    #[serde(
32973        skip_serializing_if = "Option::is_none",
32974        rename = "reply_markup",
32975        default
32976    )]
32977    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
32978}
32979#[allow(rustdoc::invalid_html_tags)]
32980#[doc = "Companion type to Message that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
32981#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
32982pub struct NoSkipMessage {
32983    #[allow(rustdoc::invalid_html_tags)]
32984    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
32985    #[serde(rename = "message_id")]
32986    pub message_id: i64,
32987    pub message_thread_id: Option<i64>,
32988    pub direct_messages_topic: Option<BoxWrapper<Unbox<DirectMessagesTopic>>>,
32989    pub from: Option<BoxWrapper<Unbox<User>>>,
32990    pub sender_chat: Option<BoxWrapper<Unbox<Chat>>>,
32991    pub sender_boost_count: Option<i64>,
32992    pub sender_business_bot: Option<BoxWrapper<Unbox<User>>>,
32993    #[allow(rustdoc::invalid_html_tags)]
32994    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
32995    #[serde(rename = "date")]
32996    pub date: i64,
32997    pub business_connection_id: Option<String>,
32998    #[allow(rustdoc::invalid_html_tags)]
32999    #[doc = "Chat the message belongs to"]
33000    #[serde(rename = "chat")]
33001    pub chat: BoxWrapper<Unbox<Chat>>,
33002    pub forward_origin: Option<BoxWrapper<Unbox<MessageOrigin>>>,
33003    pub is_topic_message: Option<bool>,
33004    pub is_automatic_forward: Option<bool>,
33005    pub reply_to_message: Option<BoxWrapper<Box<Message>>>,
33006    pub external_reply: Option<BoxWrapper<Unbox<ExternalReplyInfo>>>,
33007    pub quote: Option<BoxWrapper<Unbox<TextQuote>>>,
33008    pub reply_to_story: Option<BoxWrapper<Unbox<Story>>>,
33009    pub reply_to_checklist_task_id: Option<i64>,
33010    pub via_bot: Option<BoxWrapper<Unbox<User>>>,
33011    pub edit_date: Option<i64>,
33012    pub has_protected_content: Option<bool>,
33013    pub is_from_offline: Option<bool>,
33014    pub is_paid_post: Option<bool>,
33015    pub media_group_id: Option<String>,
33016    pub author_signature: Option<String>,
33017    pub paid_star_count: Option<i64>,
33018    pub text: Option<String>,
33019    pub entities: Option<Vec<MessageEntity>>,
33020    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
33021    pub suggested_post_info: Option<BoxWrapper<Unbox<SuggestedPostInfo>>>,
33022    pub effect_id: Option<String>,
33023    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
33024    pub audio: Option<BoxWrapper<Unbox<Audio>>>,
33025    pub document: Option<BoxWrapper<Unbox<Document>>>,
33026    pub paid_media: Option<BoxWrapper<Unbox<PaidMediaInfo>>>,
33027    pub photo: Option<Vec<PhotoSize>>,
33028    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
33029    pub story: Option<BoxWrapper<Unbox<Story>>>,
33030    pub video: Option<BoxWrapper<Unbox<Video>>>,
33031    pub video_note: Option<BoxWrapper<Unbox<VideoNote>>>,
33032    pub voice: Option<BoxWrapper<Unbox<Voice>>>,
33033    pub caption: Option<String>,
33034    pub caption_entities: Option<Vec<MessageEntity>>,
33035    pub show_caption_above_media: Option<bool>,
33036    pub has_media_spoiler: Option<bool>,
33037    pub checklist: Option<BoxWrapper<Unbox<Checklist>>>,
33038    pub contact: Option<BoxWrapper<Unbox<Contact>>>,
33039    pub dice: Option<BoxWrapper<Unbox<Dice>>>,
33040    pub game: Option<BoxWrapper<Unbox<Game>>>,
33041    pub poll: Option<BoxWrapper<Unbox<Poll>>>,
33042    pub venue: Option<BoxWrapper<Unbox<Venue>>>,
33043    pub location: Option<BoxWrapper<Unbox<Location>>>,
33044    pub new_chat_members: Option<Vec<User>>,
33045    pub left_chat_member: Option<BoxWrapper<Unbox<User>>>,
33046    pub new_chat_title: Option<String>,
33047    pub new_chat_photo: Option<Vec<PhotoSize>>,
33048    pub delete_chat_photo: Option<bool>,
33049    pub group_chat_created: Option<bool>,
33050    pub supergroup_chat_created: Option<bool>,
33051    pub channel_chat_created: Option<bool>,
33052    pub message_auto_delete_timer_changed: Option<BoxWrapper<Unbox<MessageAutoDeleteTimerChanged>>>,
33053    pub migrate_to_chat_id: Option<i64>,
33054    pub migrate_from_chat_id: Option<i64>,
33055    pub pinned_message: Option<BoxWrapper<Box<MaybeInaccessibleMessage>>>,
33056    pub invoice: Option<BoxWrapper<Unbox<Invoice>>>,
33057    pub successful_payment: Option<BoxWrapper<Unbox<SuccessfulPayment>>>,
33058    pub refunded_payment: Option<BoxWrapper<Unbox<RefundedPayment>>>,
33059    pub users_shared: Option<BoxWrapper<Unbox<UsersShared>>>,
33060    pub chat_shared: Option<BoxWrapper<Unbox<ChatShared>>>,
33061    pub gift: Option<BoxWrapper<Unbox<GiftInfo>>>,
33062    pub unique_gift: Option<BoxWrapper<Unbox<UniqueGiftInfo>>>,
33063    pub connected_website: Option<String>,
33064    pub write_access_allowed: Option<BoxWrapper<Unbox<WriteAccessAllowed>>>,
33065    pub passport_data: Option<BoxWrapper<Unbox<PassportData>>>,
33066    pub proximity_alert_triggered: Option<BoxWrapper<Unbox<ProximityAlertTriggered>>>,
33067    pub boost_added: Option<BoxWrapper<Unbox<ChatBoostAdded>>>,
33068    pub chat_background_set: Option<BoxWrapper<Unbox<ChatBackground>>>,
33069    pub checklist_tasks_done: Option<BoxWrapper<Box<ChecklistTasksDone>>>,
33070    pub checklist_tasks_added: Option<BoxWrapper<Box<ChecklistTasksAdded>>>,
33071    pub direct_message_price_changed: Option<BoxWrapper<Unbox<DirectMessagePriceChanged>>>,
33072    pub forum_topic_created: Option<BoxWrapper<Unbox<ForumTopicCreated>>>,
33073    pub forum_topic_edited: Option<BoxWrapper<Unbox<ForumTopicEdited>>>,
33074    pub forum_topic_closed: Option<BoxWrapper<Unbox<ForumTopicClosed>>>,
33075    pub forum_topic_reopened: Option<BoxWrapper<Unbox<ForumTopicReopened>>>,
33076    pub general_forum_topic_hidden: Option<BoxWrapper<Unbox<GeneralForumTopicHidden>>>,
33077    pub general_forum_topic_unhidden: Option<BoxWrapper<Unbox<GeneralForumTopicUnhidden>>>,
33078    pub giveaway_created: Option<BoxWrapper<Unbox<GiveawayCreated>>>,
33079    pub giveaway: Option<BoxWrapper<Unbox<Giveaway>>>,
33080    pub giveaway_winners: Option<BoxWrapper<Unbox<GiveawayWinners>>>,
33081    pub giveaway_completed: Option<BoxWrapper<Box<GiveawayCompleted>>>,
33082    pub paid_message_price_changed: Option<BoxWrapper<Unbox<PaidMessagePriceChanged>>>,
33083    pub suggested_post_approved: Option<BoxWrapper<Unbox<SuggestedPostApproved>>>,
33084    pub suggested_post_approval_failed: Option<BoxWrapper<Unbox<SuggestedPostApprovalFailed>>>,
33085    pub suggested_post_declined: Option<BoxWrapper<Unbox<SuggestedPostDeclined>>>,
33086    pub suggested_post_paid: Option<BoxWrapper<Unbox<SuggestedPostPaid>>>,
33087    pub suggested_post_refunded: Option<BoxWrapper<Unbox<SuggestedPostRefunded>>>,
33088    pub video_chat_scheduled: Option<BoxWrapper<Unbox<VideoChatScheduled>>>,
33089    pub video_chat_started: Option<BoxWrapper<Unbox<VideoChatStarted>>>,
33090    pub video_chat_ended: Option<BoxWrapper<Unbox<VideoChatEnded>>>,
33091    pub video_chat_participants_invited: Option<BoxWrapper<Unbox<VideoChatParticipantsInvited>>>,
33092    pub web_app_data: Option<BoxWrapper<Unbox<WebAppData>>>,
33093    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
33094}
33095impl From<NoSkipMessage> for Message {
33096    fn from(t: NoSkipMessage) -> Self {
33097        Self {
33098            message_id: t.message_id,
33099            message_thread_id: t.message_thread_id,
33100            direct_messages_topic: t.direct_messages_topic,
33101            from: t.from,
33102            sender_chat: t.sender_chat,
33103            sender_boost_count: t.sender_boost_count,
33104            sender_business_bot: t.sender_business_bot,
33105            date: t.date,
33106            business_connection_id: t.business_connection_id,
33107            chat: t.chat,
33108            forward_origin: t.forward_origin,
33109            is_topic_message: t.is_topic_message,
33110            is_automatic_forward: t.is_automatic_forward,
33111            reply_to_message: t.reply_to_message,
33112            external_reply: t.external_reply,
33113            quote: t.quote,
33114            reply_to_story: t.reply_to_story,
33115            reply_to_checklist_task_id: t.reply_to_checklist_task_id,
33116            via_bot: t.via_bot,
33117            edit_date: t.edit_date,
33118            has_protected_content: t.has_protected_content,
33119            is_from_offline: t.is_from_offline,
33120            is_paid_post: t.is_paid_post,
33121            media_group_id: t.media_group_id,
33122            author_signature: t.author_signature,
33123            paid_star_count: t.paid_star_count,
33124            text: t.text,
33125            entities: t.entities,
33126            link_preview_options: t.link_preview_options,
33127            suggested_post_info: t.suggested_post_info,
33128            effect_id: t.effect_id,
33129            animation: t.animation,
33130            audio: t.audio,
33131            document: t.document,
33132            paid_media: t.paid_media,
33133            photo: t.photo,
33134            sticker: t.sticker,
33135            story: t.story,
33136            video: t.video,
33137            video_note: t.video_note,
33138            voice: t.voice,
33139            caption: t.caption,
33140            caption_entities: t.caption_entities,
33141            show_caption_above_media: t.show_caption_above_media,
33142            has_media_spoiler: t.has_media_spoiler,
33143            checklist: t.checklist,
33144            contact: t.contact,
33145            dice: t.dice,
33146            game: t.game,
33147            poll: t.poll,
33148            venue: t.venue,
33149            location: t.location,
33150            new_chat_members: t.new_chat_members,
33151            left_chat_member: t.left_chat_member,
33152            new_chat_title: t.new_chat_title,
33153            new_chat_photo: t.new_chat_photo,
33154            delete_chat_photo: t.delete_chat_photo,
33155            group_chat_created: t.group_chat_created,
33156            supergroup_chat_created: t.supergroup_chat_created,
33157            channel_chat_created: t.channel_chat_created,
33158            message_auto_delete_timer_changed: t.message_auto_delete_timer_changed,
33159            migrate_to_chat_id: t.migrate_to_chat_id,
33160            migrate_from_chat_id: t.migrate_from_chat_id,
33161            pinned_message: t.pinned_message,
33162            invoice: t.invoice,
33163            successful_payment: t.successful_payment,
33164            refunded_payment: t.refunded_payment,
33165            users_shared: t.users_shared,
33166            chat_shared: t.chat_shared,
33167            gift: t.gift,
33168            unique_gift: t.unique_gift,
33169            connected_website: t.connected_website,
33170            write_access_allowed: t.write_access_allowed,
33171            passport_data: t.passport_data,
33172            proximity_alert_triggered: t.proximity_alert_triggered,
33173            boost_added: t.boost_added,
33174            chat_background_set: t.chat_background_set,
33175            checklist_tasks_done: t.checklist_tasks_done,
33176            checklist_tasks_added: t.checklist_tasks_added,
33177            direct_message_price_changed: t.direct_message_price_changed,
33178            forum_topic_created: t.forum_topic_created,
33179            forum_topic_edited: t.forum_topic_edited,
33180            forum_topic_closed: t.forum_topic_closed,
33181            forum_topic_reopened: t.forum_topic_reopened,
33182            general_forum_topic_hidden: t.general_forum_topic_hidden,
33183            general_forum_topic_unhidden: t.general_forum_topic_unhidden,
33184            giveaway_created: t.giveaway_created,
33185            giveaway: t.giveaway,
33186            giveaway_winners: t.giveaway_winners,
33187            giveaway_completed: t.giveaway_completed,
33188            paid_message_price_changed: t.paid_message_price_changed,
33189            suggested_post_approved: t.suggested_post_approved,
33190            suggested_post_approval_failed: t.suggested_post_approval_failed,
33191            suggested_post_declined: t.suggested_post_declined,
33192            suggested_post_paid: t.suggested_post_paid,
33193            suggested_post_refunded: t.suggested_post_refunded,
33194            video_chat_scheduled: t.video_chat_scheduled,
33195            video_chat_started: t.video_chat_started,
33196            video_chat_ended: t.video_chat_ended,
33197            video_chat_participants_invited: t.video_chat_participants_invited,
33198            web_app_data: t.web_app_data,
33199            reply_markup: t.reply_markup,
33200        }
33201    }
33202}
33203#[allow(clippy::from_over_into)]
33204impl Into<NoSkipMessage> for Message {
33205    fn into(self) -> NoSkipMessage {
33206        NoSkipMessage {
33207            message_id: self.message_id,
33208            message_thread_id: self.message_thread_id,
33209            direct_messages_topic: self.direct_messages_topic,
33210            from: self.from,
33211            sender_chat: self.sender_chat,
33212            sender_boost_count: self.sender_boost_count,
33213            sender_business_bot: self.sender_business_bot,
33214            date: self.date,
33215            business_connection_id: self.business_connection_id,
33216            chat: self.chat,
33217            forward_origin: self.forward_origin,
33218            is_topic_message: self.is_topic_message,
33219            is_automatic_forward: self.is_automatic_forward,
33220            reply_to_message: self.reply_to_message,
33221            external_reply: self.external_reply,
33222            quote: self.quote,
33223            reply_to_story: self.reply_to_story,
33224            reply_to_checklist_task_id: self.reply_to_checklist_task_id,
33225            via_bot: self.via_bot,
33226            edit_date: self.edit_date,
33227            has_protected_content: self.has_protected_content,
33228            is_from_offline: self.is_from_offline,
33229            is_paid_post: self.is_paid_post,
33230            media_group_id: self.media_group_id,
33231            author_signature: self.author_signature,
33232            paid_star_count: self.paid_star_count,
33233            text: self.text,
33234            entities: self.entities,
33235            link_preview_options: self.link_preview_options,
33236            suggested_post_info: self.suggested_post_info,
33237            effect_id: self.effect_id,
33238            animation: self.animation,
33239            audio: self.audio,
33240            document: self.document,
33241            paid_media: self.paid_media,
33242            photo: self.photo,
33243            sticker: self.sticker,
33244            story: self.story,
33245            video: self.video,
33246            video_note: self.video_note,
33247            voice: self.voice,
33248            caption: self.caption,
33249            caption_entities: self.caption_entities,
33250            show_caption_above_media: self.show_caption_above_media,
33251            has_media_spoiler: self.has_media_spoiler,
33252            checklist: self.checklist,
33253            contact: self.contact,
33254            dice: self.dice,
33255            game: self.game,
33256            poll: self.poll,
33257            venue: self.venue,
33258            location: self.location,
33259            new_chat_members: self.new_chat_members,
33260            left_chat_member: self.left_chat_member,
33261            new_chat_title: self.new_chat_title,
33262            new_chat_photo: self.new_chat_photo,
33263            delete_chat_photo: self.delete_chat_photo,
33264            group_chat_created: self.group_chat_created,
33265            supergroup_chat_created: self.supergroup_chat_created,
33266            channel_chat_created: self.channel_chat_created,
33267            message_auto_delete_timer_changed: self.message_auto_delete_timer_changed,
33268            migrate_to_chat_id: self.migrate_to_chat_id,
33269            migrate_from_chat_id: self.migrate_from_chat_id,
33270            pinned_message: self.pinned_message,
33271            invoice: self.invoice,
33272            successful_payment: self.successful_payment,
33273            refunded_payment: self.refunded_payment,
33274            users_shared: self.users_shared,
33275            chat_shared: self.chat_shared,
33276            gift: self.gift,
33277            unique_gift: self.unique_gift,
33278            connected_website: self.connected_website,
33279            write_access_allowed: self.write_access_allowed,
33280            passport_data: self.passport_data,
33281            proximity_alert_triggered: self.proximity_alert_triggered,
33282            boost_added: self.boost_added,
33283            chat_background_set: self.chat_background_set,
33284            checklist_tasks_done: self.checklist_tasks_done,
33285            checklist_tasks_added: self.checklist_tasks_added,
33286            direct_message_price_changed: self.direct_message_price_changed,
33287            forum_topic_created: self.forum_topic_created,
33288            forum_topic_edited: self.forum_topic_edited,
33289            forum_topic_closed: self.forum_topic_closed,
33290            forum_topic_reopened: self.forum_topic_reopened,
33291            general_forum_topic_hidden: self.general_forum_topic_hidden,
33292            general_forum_topic_unhidden: self.general_forum_topic_unhidden,
33293            giveaway_created: self.giveaway_created,
33294            giveaway: self.giveaway,
33295            giveaway_winners: self.giveaway_winners,
33296            giveaway_completed: self.giveaway_completed,
33297            paid_message_price_changed: self.paid_message_price_changed,
33298            suggested_post_approved: self.suggested_post_approved,
33299            suggested_post_approval_failed: self.suggested_post_approval_failed,
33300            suggested_post_declined: self.suggested_post_declined,
33301            suggested_post_paid: self.suggested_post_paid,
33302            suggested_post_refunded: self.suggested_post_refunded,
33303            video_chat_scheduled: self.video_chat_scheduled,
33304            video_chat_started: self.video_chat_started,
33305            video_chat_ended: self.video_chat_ended,
33306            video_chat_participants_invited: self.video_chat_participants_invited,
33307            web_app_data: self.web_app_data,
33308            reply_markup: self.reply_markup,
33309        }
33310    }
33311}
33312impl NoSkipMessage {
33313    pub fn skip(self) -> Message {
33314        self.into()
33315    }
33316}
33317impl Message {
33318    pub fn noskip(self) -> NoSkipMessage {
33319        self.into()
33320    }
33321}
33322#[allow(rustdoc::invalid_html_tags)]
33323#[doc = "This object represents a message."]
33324#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
33325pub struct MessageBuilder {
33326    #[allow(rustdoc::invalid_html_tags)]
33327    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
33328    #[serde(rename = "message_id")]
33329    pub message_id: i64,
33330    #[allow(rustdoc::invalid_html_tags)]
33331    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
33332    #[serde(
33333        skip_serializing_if = "Option::is_none",
33334        rename = "message_thread_id",
33335        default
33336    )]
33337    pub message_thread_id: Option<i64>,
33338    #[allow(rustdoc::invalid_html_tags)]
33339    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
33340    #[serde(
33341        skip_serializing_if = "Option::is_none",
33342        rename = "direct_messages_topic",
33343        default
33344    )]
33345    pub direct_messages_topic: Option<BoxWrapper<Unbox<DirectMessagesTopic>>>,
33346    #[allow(rustdoc::invalid_html_tags)]
33347    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
33348    #[serde(skip_serializing_if = "Option::is_none", rename = "from", default)]
33349    pub from: Option<BoxWrapper<Unbox<User>>>,
33350    #[allow(rustdoc::invalid_html_tags)]
33351    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
33352    #[serde(
33353        skip_serializing_if = "Option::is_none",
33354        rename = "sender_chat",
33355        default
33356    )]
33357    pub sender_chat: Option<BoxWrapper<Unbox<Chat>>>,
33358    #[allow(rustdoc::invalid_html_tags)]
33359    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
33360    #[serde(
33361        skip_serializing_if = "Option::is_none",
33362        rename = "sender_boost_count",
33363        default
33364    )]
33365    pub sender_boost_count: Option<i64>,
33366    #[allow(rustdoc::invalid_html_tags)]
33367    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
33368    #[serde(
33369        skip_serializing_if = "Option::is_none",
33370        rename = "sender_business_bot",
33371        default
33372    )]
33373    pub sender_business_bot: Option<BoxWrapper<Unbox<User>>>,
33374    #[allow(rustdoc::invalid_html_tags)]
33375    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
33376    #[serde(rename = "date")]
33377    pub date: i64,
33378    #[allow(rustdoc::invalid_html_tags)]
33379    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
33380    #[serde(
33381        skip_serializing_if = "Option::is_none",
33382        rename = "business_connection_id",
33383        default
33384    )]
33385    pub business_connection_id: Option<String>,
33386    #[allow(rustdoc::invalid_html_tags)]
33387    #[doc = "Chat the message belongs to"]
33388    #[serde(rename = "chat")]
33389    pub chat: BoxWrapper<Unbox<Chat>>,
33390    #[allow(rustdoc::invalid_html_tags)]
33391    #[doc = "Optional. Information about the original message for forwarded messages"]
33392    #[serde(
33393        skip_serializing_if = "Option::is_none",
33394        rename = "forward_origin",
33395        default
33396    )]
33397    pub forward_origin: Option<BoxWrapper<Unbox<MessageOrigin>>>,
33398    #[allow(rustdoc::invalid_html_tags)]
33399    #[doc = "Optional. True, if the message is sent to a forum topic"]
33400    #[serde(
33401        skip_serializing_if = "Option::is_none",
33402        rename = "is_topic_message",
33403        default
33404    )]
33405    pub is_topic_message: Option<bool>,
33406    #[allow(rustdoc::invalid_html_tags)]
33407    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
33408    #[serde(
33409        skip_serializing_if = "Option::is_none",
33410        rename = "is_automatic_forward",
33411        default
33412    )]
33413    pub is_automatic_forward: Option<bool>,
33414    #[allow(rustdoc::invalid_html_tags)]
33415    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
33416    #[serde(
33417        skip_serializing_if = "Option::is_none",
33418        rename = "reply_to_message",
33419        default
33420    )]
33421    pub reply_to_message: Option<BoxWrapper<Box<Message>>>,
33422    #[allow(rustdoc::invalid_html_tags)]
33423    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
33424    #[serde(
33425        skip_serializing_if = "Option::is_none",
33426        rename = "external_reply",
33427        default
33428    )]
33429    pub external_reply: Option<BoxWrapper<Unbox<ExternalReplyInfo>>>,
33430    #[allow(rustdoc::invalid_html_tags)]
33431    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
33432    #[serde(skip_serializing_if = "Option::is_none", rename = "quote", default)]
33433    pub quote: Option<BoxWrapper<Unbox<TextQuote>>>,
33434    #[allow(rustdoc::invalid_html_tags)]
33435    #[doc = "Optional. For replies to a story, the original story"]
33436    #[serde(
33437        skip_serializing_if = "Option::is_none",
33438        rename = "reply_to_story",
33439        default
33440    )]
33441    pub reply_to_story: Option<BoxWrapper<Unbox<Story>>>,
33442    #[allow(rustdoc::invalid_html_tags)]
33443    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
33444    #[serde(
33445        skip_serializing_if = "Option::is_none",
33446        rename = "reply_to_checklist_task_id",
33447        default
33448    )]
33449    pub reply_to_checklist_task_id: Option<i64>,
33450    #[allow(rustdoc::invalid_html_tags)]
33451    #[doc = "Optional. Bot through which the message was sent"]
33452    #[serde(skip_serializing_if = "Option::is_none", rename = "via_bot", default)]
33453    pub via_bot: Option<BoxWrapper<Unbox<User>>>,
33454    #[allow(rustdoc::invalid_html_tags)]
33455    #[doc = "Optional. Date the message was last edited in Unix time"]
33456    #[serde(skip_serializing_if = "Option::is_none", rename = "edit_date", default)]
33457    pub edit_date: Option<i64>,
33458    #[allow(rustdoc::invalid_html_tags)]
33459    #[doc = "Optional. True, if the message can't be forwarded"]
33460    #[serde(
33461        skip_serializing_if = "Option::is_none",
33462        rename = "has_protected_content",
33463        default
33464    )]
33465    pub has_protected_content: Option<bool>,
33466    #[allow(rustdoc::invalid_html_tags)]
33467    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
33468    #[serde(
33469        skip_serializing_if = "Option::is_none",
33470        rename = "is_from_offline",
33471        default
33472    )]
33473    pub is_from_offline: Option<bool>,
33474    #[allow(rustdoc::invalid_html_tags)]
33475    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
33476    #[serde(
33477        skip_serializing_if = "Option::is_none",
33478        rename = "is_paid_post",
33479        default
33480    )]
33481    pub is_paid_post: Option<bool>,
33482    #[allow(rustdoc::invalid_html_tags)]
33483    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
33484    #[serde(
33485        skip_serializing_if = "Option::is_none",
33486        rename = "media_group_id",
33487        default
33488    )]
33489    pub media_group_id: Option<String>,
33490    #[allow(rustdoc::invalid_html_tags)]
33491    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
33492    #[serde(
33493        skip_serializing_if = "Option::is_none",
33494        rename = "author_signature",
33495        default
33496    )]
33497    pub author_signature: Option<String>,
33498    #[allow(rustdoc::invalid_html_tags)]
33499    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
33500    #[serde(
33501        skip_serializing_if = "Option::is_none",
33502        rename = "paid_star_count",
33503        default
33504    )]
33505    pub paid_star_count: Option<i64>,
33506    #[allow(rustdoc::invalid_html_tags)]
33507    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
33508    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
33509    pub text: Option<String>,
33510    #[allow(rustdoc::invalid_html_tags)]
33511    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
33512    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
33513    pub entities: Option<Vec<MessageEntity>>,
33514    #[allow(rustdoc::invalid_html_tags)]
33515    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
33516    #[serde(
33517        skip_serializing_if = "Option::is_none",
33518        rename = "link_preview_options",
33519        default
33520    )]
33521    pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
33522    #[allow(rustdoc::invalid_html_tags)]
33523    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
33524    #[serde(
33525        skip_serializing_if = "Option::is_none",
33526        rename = "suggested_post_info",
33527        default
33528    )]
33529    pub suggested_post_info: Option<BoxWrapper<Unbox<SuggestedPostInfo>>>,
33530    #[allow(rustdoc::invalid_html_tags)]
33531    #[doc = "Optional. Unique identifier of the message effect added to the message"]
33532    #[serde(skip_serializing_if = "Option::is_none", rename = "effect_id", default)]
33533    pub effect_id: Option<String>,
33534    #[allow(rustdoc::invalid_html_tags)]
33535    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
33536    #[serde(skip_serializing_if = "Option::is_none", rename = "animation", default)]
33537    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
33538    #[allow(rustdoc::invalid_html_tags)]
33539    #[doc = "Optional. Message is an audio file, information about the file"]
33540    #[serde(skip_serializing_if = "Option::is_none", rename = "audio", default)]
33541    pub audio: Option<BoxWrapper<Unbox<Audio>>>,
33542    #[allow(rustdoc::invalid_html_tags)]
33543    #[doc = "Optional. Message is a general file, information about the file"]
33544    #[serde(skip_serializing_if = "Option::is_none", rename = "document", default)]
33545    pub document: Option<BoxWrapper<Unbox<Document>>>,
33546    #[allow(rustdoc::invalid_html_tags)]
33547    #[doc = "Optional. Message contains paid media; information about the paid media"]
33548    #[serde(
33549        skip_serializing_if = "Option::is_none",
33550        rename = "paid_media",
33551        default
33552    )]
33553    pub paid_media: Option<BoxWrapper<Unbox<PaidMediaInfo>>>,
33554    #[allow(rustdoc::invalid_html_tags)]
33555    #[doc = "Optional. Message is a photo, available sizes of the photo"]
33556    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
33557    pub photo: Option<Vec<PhotoSize>>,
33558    #[allow(rustdoc::invalid_html_tags)]
33559    #[doc = "Optional. Message is a sticker, information about the sticker"]
33560    #[serde(skip_serializing_if = "Option::is_none", rename = "sticker", default)]
33561    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
33562    #[allow(rustdoc::invalid_html_tags)]
33563    #[doc = "Optional. Message is a forwarded story"]
33564    #[serde(skip_serializing_if = "Option::is_none", rename = "story", default)]
33565    pub story: Option<BoxWrapper<Unbox<Story>>>,
33566    #[allow(rustdoc::invalid_html_tags)]
33567    #[doc = "Optional. Message is a video, information about the video"]
33568    #[serde(skip_serializing_if = "Option::is_none", rename = "video", default)]
33569    pub video: Option<BoxWrapper<Unbox<Video>>>,
33570    #[allow(rustdoc::invalid_html_tags)]
33571    #[doc = "Optional. Message is a video note, information about the video message"]
33572    #[serde(
33573        skip_serializing_if = "Option::is_none",
33574        rename = "video_note",
33575        default
33576    )]
33577    pub video_note: Option<BoxWrapper<Unbox<VideoNote>>>,
33578    #[allow(rustdoc::invalid_html_tags)]
33579    #[doc = "Optional. Message is a voice message, information about the file"]
33580    #[serde(skip_serializing_if = "Option::is_none", rename = "voice", default)]
33581    pub voice: Option<BoxWrapper<Unbox<Voice>>>,
33582    #[allow(rustdoc::invalid_html_tags)]
33583    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
33584    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
33585    pub caption: Option<String>,
33586    #[allow(rustdoc::invalid_html_tags)]
33587    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
33588    #[serde(
33589        skip_serializing_if = "Option::is_none",
33590        rename = "caption_entities",
33591        default
33592    )]
33593    pub caption_entities: Option<Vec<MessageEntity>>,
33594    #[allow(rustdoc::invalid_html_tags)]
33595    #[doc = "Optional. True, if the caption must be shown above the message media"]
33596    #[serde(
33597        skip_serializing_if = "Option::is_none",
33598        rename = "show_caption_above_media",
33599        default
33600    )]
33601    pub show_caption_above_media: Option<bool>,
33602    #[allow(rustdoc::invalid_html_tags)]
33603    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
33604    #[serde(
33605        skip_serializing_if = "Option::is_none",
33606        rename = "has_media_spoiler",
33607        default
33608    )]
33609    pub has_media_spoiler: Option<bool>,
33610    #[allow(rustdoc::invalid_html_tags)]
33611    #[doc = "Optional. Message is a checklist"]
33612    #[serde(skip_serializing_if = "Option::is_none", rename = "checklist", default)]
33613    pub checklist: Option<BoxWrapper<Unbox<Checklist>>>,
33614    #[allow(rustdoc::invalid_html_tags)]
33615    #[doc = "Optional. Message is a shared contact, information about the contact"]
33616    #[serde(skip_serializing_if = "Option::is_none", rename = "contact", default)]
33617    pub contact: Option<BoxWrapper<Unbox<Contact>>>,
33618    #[allow(rustdoc::invalid_html_tags)]
33619    #[doc = "Optional. Message is a dice with random value"]
33620    #[serde(skip_serializing_if = "Option::is_none", rename = "dice", default)]
33621    pub dice: Option<BoxWrapper<Unbox<Dice>>>,
33622    #[allow(rustdoc::invalid_html_tags)]
33623    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
33624    #[serde(skip_serializing_if = "Option::is_none", rename = "game", default)]
33625    pub game: Option<BoxWrapper<Unbox<Game>>>,
33626    #[allow(rustdoc::invalid_html_tags)]
33627    #[doc = "Optional. Message is a native poll, information about the poll"]
33628    #[serde(skip_serializing_if = "Option::is_none", rename = "poll", default)]
33629    pub poll: Option<BoxWrapper<Unbox<Poll>>>,
33630    #[allow(rustdoc::invalid_html_tags)]
33631    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
33632    #[serde(skip_serializing_if = "Option::is_none", rename = "venue", default)]
33633    pub venue: Option<BoxWrapper<Unbox<Venue>>>,
33634    #[allow(rustdoc::invalid_html_tags)]
33635    #[doc = "Optional. Message is a shared location, information about the location"]
33636    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
33637    pub location: Option<BoxWrapper<Unbox<Location>>>,
33638    #[allow(rustdoc::invalid_html_tags)]
33639    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
33640    #[serde(
33641        skip_serializing_if = "Option::is_none",
33642        rename = "new_chat_members",
33643        default
33644    )]
33645    pub new_chat_members: Option<Vec<User>>,
33646    #[allow(rustdoc::invalid_html_tags)]
33647    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
33648    #[serde(
33649        skip_serializing_if = "Option::is_none",
33650        rename = "left_chat_member",
33651        default
33652    )]
33653    pub left_chat_member: Option<BoxWrapper<Unbox<User>>>,
33654    #[allow(rustdoc::invalid_html_tags)]
33655    #[doc = "Optional. A chat title was changed to this value"]
33656    #[serde(
33657        skip_serializing_if = "Option::is_none",
33658        rename = "new_chat_title",
33659        default
33660    )]
33661    pub new_chat_title: Option<String>,
33662    #[allow(rustdoc::invalid_html_tags)]
33663    #[doc = "Optional. A chat photo was change to this value"]
33664    #[serde(
33665        skip_serializing_if = "Option::is_none",
33666        rename = "new_chat_photo",
33667        default
33668    )]
33669    pub new_chat_photo: Option<Vec<PhotoSize>>,
33670    #[allow(rustdoc::invalid_html_tags)]
33671    #[doc = "Optional. Service message: the chat photo was deleted"]
33672    #[serde(
33673        skip_serializing_if = "Option::is_none",
33674        rename = "delete_chat_photo",
33675        default
33676    )]
33677    pub delete_chat_photo: Option<bool>,
33678    #[allow(rustdoc::invalid_html_tags)]
33679    #[doc = "Optional. Service message: the group has been created"]
33680    #[serde(
33681        skip_serializing_if = "Option::is_none",
33682        rename = "group_chat_created",
33683        default
33684    )]
33685    pub group_chat_created: Option<bool>,
33686    #[allow(rustdoc::invalid_html_tags)]
33687    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
33688    #[serde(
33689        skip_serializing_if = "Option::is_none",
33690        rename = "supergroup_chat_created",
33691        default
33692    )]
33693    pub supergroup_chat_created: Option<bool>,
33694    #[allow(rustdoc::invalid_html_tags)]
33695    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
33696    #[serde(
33697        skip_serializing_if = "Option::is_none",
33698        rename = "channel_chat_created",
33699        default
33700    )]
33701    pub channel_chat_created: Option<bool>,
33702    #[allow(rustdoc::invalid_html_tags)]
33703    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
33704    #[serde(
33705        skip_serializing_if = "Option::is_none",
33706        rename = "message_auto_delete_timer_changed",
33707        default
33708    )]
33709    pub message_auto_delete_timer_changed: Option<BoxWrapper<Unbox<MessageAutoDeleteTimerChanged>>>,
33710    #[allow(rustdoc::invalid_html_tags)]
33711    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
33712    #[serde(
33713        skip_serializing_if = "Option::is_none",
33714        rename = "migrate_to_chat_id",
33715        default
33716    )]
33717    pub migrate_to_chat_id: Option<i64>,
33718    #[allow(rustdoc::invalid_html_tags)]
33719    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
33720    #[serde(
33721        skip_serializing_if = "Option::is_none",
33722        rename = "migrate_from_chat_id",
33723        default
33724    )]
33725    pub migrate_from_chat_id: Option<i64>,
33726    #[allow(rustdoc::invalid_html_tags)]
33727    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
33728    #[serde(
33729        skip_serializing_if = "Option::is_none",
33730        rename = "pinned_message",
33731        default
33732    )]
33733    pub pinned_message: Option<BoxWrapper<Box<MaybeInaccessibleMessage>>>,
33734    #[allow(rustdoc::invalid_html_tags)]
33735    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
33736    #[serde(skip_serializing_if = "Option::is_none", rename = "invoice", default)]
33737    pub invoice: Option<BoxWrapper<Unbox<Invoice>>>,
33738    #[allow(rustdoc::invalid_html_tags)]
33739    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
33740    #[serde(
33741        skip_serializing_if = "Option::is_none",
33742        rename = "successful_payment",
33743        default
33744    )]
33745    pub successful_payment: Option<BoxWrapper<Unbox<SuccessfulPayment>>>,
33746    #[allow(rustdoc::invalid_html_tags)]
33747    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
33748    #[serde(
33749        skip_serializing_if = "Option::is_none",
33750        rename = "refunded_payment",
33751        default
33752    )]
33753    pub refunded_payment: Option<BoxWrapper<Unbox<RefundedPayment>>>,
33754    #[allow(rustdoc::invalid_html_tags)]
33755    #[doc = "Optional. Service message: users were shared with the bot"]
33756    #[serde(
33757        skip_serializing_if = "Option::is_none",
33758        rename = "users_shared",
33759        default
33760    )]
33761    pub users_shared: Option<BoxWrapper<Unbox<UsersShared>>>,
33762    #[allow(rustdoc::invalid_html_tags)]
33763    #[doc = "Optional. Service message: a chat was shared with the bot"]
33764    #[serde(
33765        skip_serializing_if = "Option::is_none",
33766        rename = "chat_shared",
33767        default
33768    )]
33769    pub chat_shared: Option<BoxWrapper<Unbox<ChatShared>>>,
33770    #[allow(rustdoc::invalid_html_tags)]
33771    #[doc = "Optional. Service message: a regular gift was sent or received"]
33772    #[serde(skip_serializing_if = "Option::is_none", rename = "gift", default)]
33773    pub gift: Option<BoxWrapper<Unbox<GiftInfo>>>,
33774    #[allow(rustdoc::invalid_html_tags)]
33775    #[doc = "Optional. Service message: a unique gift was sent or received"]
33776    #[serde(
33777        skip_serializing_if = "Option::is_none",
33778        rename = "unique_gift",
33779        default
33780    )]
33781    pub unique_gift: Option<BoxWrapper<Unbox<UniqueGiftInfo>>>,
33782    #[allow(rustdoc::invalid_html_tags)]
33783    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
33784    #[serde(
33785        skip_serializing_if = "Option::is_none",
33786        rename = "connected_website",
33787        default
33788    )]
33789    pub connected_website: Option<String>,
33790    #[allow(rustdoc::invalid_html_tags)]
33791    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
33792    #[serde(
33793        skip_serializing_if = "Option::is_none",
33794        rename = "write_access_allowed",
33795        default
33796    )]
33797    pub write_access_allowed: Option<BoxWrapper<Unbox<WriteAccessAllowed>>>,
33798    #[allow(rustdoc::invalid_html_tags)]
33799    #[doc = "Optional. Telegram Passport data"]
33800    #[serde(
33801        skip_serializing_if = "Option::is_none",
33802        rename = "passport_data",
33803        default
33804    )]
33805    pub passport_data: Option<BoxWrapper<Unbox<PassportData>>>,
33806    #[allow(rustdoc::invalid_html_tags)]
33807    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
33808    #[serde(
33809        skip_serializing_if = "Option::is_none",
33810        rename = "proximity_alert_triggered",
33811        default
33812    )]
33813    pub proximity_alert_triggered: Option<BoxWrapper<Unbox<ProximityAlertTriggered>>>,
33814    #[allow(rustdoc::invalid_html_tags)]
33815    #[doc = "Optional. Service message: user boosted the chat"]
33816    #[serde(
33817        skip_serializing_if = "Option::is_none",
33818        rename = "boost_added",
33819        default
33820    )]
33821    pub boost_added: Option<BoxWrapper<Unbox<ChatBoostAdded>>>,
33822    #[allow(rustdoc::invalid_html_tags)]
33823    #[doc = "Optional. Service message: chat background set"]
33824    #[serde(
33825        skip_serializing_if = "Option::is_none",
33826        rename = "chat_background_set",
33827        default
33828    )]
33829    pub chat_background_set: Option<BoxWrapper<Unbox<ChatBackground>>>,
33830    #[allow(rustdoc::invalid_html_tags)]
33831    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
33832    #[serde(
33833        skip_serializing_if = "Option::is_none",
33834        rename = "checklist_tasks_done",
33835        default
33836    )]
33837    pub checklist_tasks_done: Option<BoxWrapper<Box<ChecklistTasksDone>>>,
33838    #[allow(rustdoc::invalid_html_tags)]
33839    #[doc = "Optional. Service message: tasks were added to a checklist"]
33840    #[serde(
33841        skip_serializing_if = "Option::is_none",
33842        rename = "checklist_tasks_added",
33843        default
33844    )]
33845    pub checklist_tasks_added: Option<BoxWrapper<Box<ChecklistTasksAdded>>>,
33846    #[allow(rustdoc::invalid_html_tags)]
33847    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
33848    #[serde(
33849        skip_serializing_if = "Option::is_none",
33850        rename = "direct_message_price_changed",
33851        default
33852    )]
33853    pub direct_message_price_changed: Option<BoxWrapper<Unbox<DirectMessagePriceChanged>>>,
33854    #[allow(rustdoc::invalid_html_tags)]
33855    #[doc = "Optional. Service message: forum topic created"]
33856    #[serde(
33857        skip_serializing_if = "Option::is_none",
33858        rename = "forum_topic_created",
33859        default
33860    )]
33861    pub forum_topic_created: Option<BoxWrapper<Unbox<ForumTopicCreated>>>,
33862    #[allow(rustdoc::invalid_html_tags)]
33863    #[doc = "Optional. Service message: forum topic edited"]
33864    #[serde(
33865        skip_serializing_if = "Option::is_none",
33866        rename = "forum_topic_edited",
33867        default
33868    )]
33869    pub forum_topic_edited: Option<BoxWrapper<Unbox<ForumTopicEdited>>>,
33870    #[allow(rustdoc::invalid_html_tags)]
33871    #[doc = "Optional. Service message: forum topic closed"]
33872    #[serde(
33873        skip_serializing_if = "Option::is_none",
33874        rename = "forum_topic_closed",
33875        default
33876    )]
33877    pub forum_topic_closed: Option<BoxWrapper<Unbox<ForumTopicClosed>>>,
33878    #[allow(rustdoc::invalid_html_tags)]
33879    #[doc = "Optional. Service message: forum topic reopened"]
33880    #[serde(
33881        skip_serializing_if = "Option::is_none",
33882        rename = "forum_topic_reopened",
33883        default
33884    )]
33885    pub forum_topic_reopened: Option<BoxWrapper<Unbox<ForumTopicReopened>>>,
33886    #[allow(rustdoc::invalid_html_tags)]
33887    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
33888    #[serde(
33889        skip_serializing_if = "Option::is_none",
33890        rename = "general_forum_topic_hidden",
33891        default
33892    )]
33893    pub general_forum_topic_hidden: Option<BoxWrapper<Unbox<GeneralForumTopicHidden>>>,
33894    #[allow(rustdoc::invalid_html_tags)]
33895    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
33896    #[serde(
33897        skip_serializing_if = "Option::is_none",
33898        rename = "general_forum_topic_unhidden",
33899        default
33900    )]
33901    pub general_forum_topic_unhidden: Option<BoxWrapper<Unbox<GeneralForumTopicUnhidden>>>,
33902    #[allow(rustdoc::invalid_html_tags)]
33903    #[doc = "Optional. Service message: a scheduled giveaway was created"]
33904    #[serde(
33905        skip_serializing_if = "Option::is_none",
33906        rename = "giveaway_created",
33907        default
33908    )]
33909    pub giveaway_created: Option<BoxWrapper<Unbox<GiveawayCreated>>>,
33910    #[allow(rustdoc::invalid_html_tags)]
33911    #[doc = "Optional. The message is a scheduled giveaway message"]
33912    #[serde(skip_serializing_if = "Option::is_none", rename = "giveaway", default)]
33913    pub giveaway: Option<BoxWrapper<Unbox<Giveaway>>>,
33914    #[allow(rustdoc::invalid_html_tags)]
33915    #[doc = "Optional. A giveaway with public winners was completed"]
33916    #[serde(
33917        skip_serializing_if = "Option::is_none",
33918        rename = "giveaway_winners",
33919        default
33920    )]
33921    pub giveaway_winners: Option<BoxWrapper<Unbox<GiveawayWinners>>>,
33922    #[allow(rustdoc::invalid_html_tags)]
33923    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
33924    #[serde(
33925        skip_serializing_if = "Option::is_none",
33926        rename = "giveaway_completed",
33927        default
33928    )]
33929    pub giveaway_completed: Option<BoxWrapper<Box<GiveawayCompleted>>>,
33930    #[allow(rustdoc::invalid_html_tags)]
33931    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
33932    #[serde(
33933        skip_serializing_if = "Option::is_none",
33934        rename = "paid_message_price_changed",
33935        default
33936    )]
33937    pub paid_message_price_changed: Option<BoxWrapper<Unbox<PaidMessagePriceChanged>>>,
33938    #[allow(rustdoc::invalid_html_tags)]
33939    #[doc = "Optional. Service message: a suggested post was approved"]
33940    #[serde(
33941        skip_serializing_if = "Option::is_none",
33942        rename = "suggested_post_approved",
33943        default
33944    )]
33945    pub suggested_post_approved: Option<BoxWrapper<Unbox<SuggestedPostApproved>>>,
33946    #[allow(rustdoc::invalid_html_tags)]
33947    #[doc = "Optional. Service message: approval of a suggested post has failed"]
33948    #[serde(
33949        skip_serializing_if = "Option::is_none",
33950        rename = "suggested_post_approval_failed",
33951        default
33952    )]
33953    pub suggested_post_approval_failed: Option<BoxWrapper<Unbox<SuggestedPostApprovalFailed>>>,
33954    #[allow(rustdoc::invalid_html_tags)]
33955    #[doc = "Optional. Service message: a suggested post was declined"]
33956    #[serde(
33957        skip_serializing_if = "Option::is_none",
33958        rename = "suggested_post_declined",
33959        default
33960    )]
33961    pub suggested_post_declined: Option<BoxWrapper<Unbox<SuggestedPostDeclined>>>,
33962    #[allow(rustdoc::invalid_html_tags)]
33963    #[doc = "Optional. Service message: payment for a suggested post was received"]
33964    #[serde(
33965        skip_serializing_if = "Option::is_none",
33966        rename = "suggested_post_paid",
33967        default
33968    )]
33969    pub suggested_post_paid: Option<BoxWrapper<Unbox<SuggestedPostPaid>>>,
33970    #[allow(rustdoc::invalid_html_tags)]
33971    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
33972    #[serde(
33973        skip_serializing_if = "Option::is_none",
33974        rename = "suggested_post_refunded",
33975        default
33976    )]
33977    pub suggested_post_refunded: Option<BoxWrapper<Unbox<SuggestedPostRefunded>>>,
33978    #[allow(rustdoc::invalid_html_tags)]
33979    #[doc = "Optional. Service message: video chat scheduled"]
33980    #[serde(
33981        skip_serializing_if = "Option::is_none",
33982        rename = "video_chat_scheduled",
33983        default
33984    )]
33985    pub video_chat_scheduled: Option<BoxWrapper<Unbox<VideoChatScheduled>>>,
33986    #[allow(rustdoc::invalid_html_tags)]
33987    #[doc = "Optional. Service message: video chat started"]
33988    #[serde(
33989        skip_serializing_if = "Option::is_none",
33990        rename = "video_chat_started",
33991        default
33992    )]
33993    pub video_chat_started: Option<BoxWrapper<Unbox<VideoChatStarted>>>,
33994    #[allow(rustdoc::invalid_html_tags)]
33995    #[doc = "Optional. Service message: video chat ended"]
33996    #[serde(
33997        skip_serializing_if = "Option::is_none",
33998        rename = "video_chat_ended",
33999        default
34000    )]
34001    pub video_chat_ended: Option<BoxWrapper<Unbox<VideoChatEnded>>>,
34002    #[allow(rustdoc::invalid_html_tags)]
34003    #[doc = "Optional. Service message: new participants invited to a video chat"]
34004    #[serde(
34005        skip_serializing_if = "Option::is_none",
34006        rename = "video_chat_participants_invited",
34007        default
34008    )]
34009    pub video_chat_participants_invited: Option<BoxWrapper<Unbox<VideoChatParticipantsInvited>>>,
34010    #[allow(rustdoc::invalid_html_tags)]
34011    #[doc = "Optional. Service message: data sent by a Web App"]
34012    #[serde(
34013        skip_serializing_if = "Option::is_none",
34014        rename = "web_app_data",
34015        default
34016    )]
34017    pub web_app_data: Option<BoxWrapper<Unbox<WebAppData>>>,
34018    #[allow(rustdoc::invalid_html_tags)]
34019    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
34020    #[serde(
34021        skip_serializing_if = "Option::is_none",
34022        rename = "reply_markup",
34023        default
34024    )]
34025    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
34026}
34027impl MessageBuilder {
34028    #[allow(clippy::too_many_arguments)]
34029    pub fn new<A: Into<Chat>>(message_id: i64, date: i64, chat: A) -> Self {
34030        Self {
34031            message_id,
34032            date,
34033            chat: BoxWrapper::new_unbox(chat.into()),
34034            message_thread_id: None,
34035            direct_messages_topic: None,
34036            from: None,
34037            sender_chat: None,
34038            sender_boost_count: None,
34039            sender_business_bot: None,
34040            business_connection_id: None,
34041            forward_origin: None,
34042            is_topic_message: None,
34043            is_automatic_forward: None,
34044            reply_to_message: None,
34045            external_reply: None,
34046            quote: None,
34047            reply_to_story: None,
34048            reply_to_checklist_task_id: None,
34049            via_bot: None,
34050            edit_date: None,
34051            has_protected_content: None,
34052            is_from_offline: None,
34053            is_paid_post: None,
34054            media_group_id: None,
34055            author_signature: None,
34056            paid_star_count: None,
34057            text: None,
34058            entities: None,
34059            link_preview_options: None,
34060            suggested_post_info: None,
34061            effect_id: None,
34062            animation: None,
34063            audio: None,
34064            document: None,
34065            paid_media: None,
34066            photo: None,
34067            sticker: None,
34068            story: None,
34069            video: None,
34070            video_note: None,
34071            voice: None,
34072            caption: None,
34073            caption_entities: None,
34074            show_caption_above_media: None,
34075            has_media_spoiler: None,
34076            checklist: None,
34077            contact: None,
34078            dice: None,
34079            game: None,
34080            poll: None,
34081            venue: None,
34082            location: None,
34083            new_chat_members: None,
34084            left_chat_member: None,
34085            new_chat_title: None,
34086            new_chat_photo: None,
34087            delete_chat_photo: None,
34088            group_chat_created: None,
34089            supergroup_chat_created: None,
34090            channel_chat_created: None,
34091            message_auto_delete_timer_changed: None,
34092            migrate_to_chat_id: None,
34093            migrate_from_chat_id: None,
34094            pinned_message: None,
34095            invoice: None,
34096            successful_payment: None,
34097            refunded_payment: None,
34098            users_shared: None,
34099            chat_shared: None,
34100            gift: None,
34101            unique_gift: None,
34102            connected_website: None,
34103            write_access_allowed: None,
34104            passport_data: None,
34105            proximity_alert_triggered: None,
34106            boost_added: None,
34107            chat_background_set: None,
34108            checklist_tasks_done: None,
34109            checklist_tasks_added: None,
34110            direct_message_price_changed: None,
34111            forum_topic_created: None,
34112            forum_topic_edited: None,
34113            forum_topic_closed: None,
34114            forum_topic_reopened: None,
34115            general_forum_topic_hidden: None,
34116            general_forum_topic_unhidden: None,
34117            giveaway_created: None,
34118            giveaway: None,
34119            giveaway_winners: None,
34120            giveaway_completed: None,
34121            paid_message_price_changed: None,
34122            suggested_post_approved: None,
34123            suggested_post_approval_failed: None,
34124            suggested_post_declined: None,
34125            suggested_post_paid: None,
34126            suggested_post_refunded: None,
34127            video_chat_scheduled: None,
34128            video_chat_started: None,
34129            video_chat_ended: None,
34130            video_chat_participants_invited: None,
34131            web_app_data: None,
34132            reply_markup: None,
34133        }
34134    }
34135    #[allow(rustdoc::invalid_html_tags)]
34136    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
34137    pub fn set_message_id(mut self, message_id: i64) -> Self {
34138        self.message_id = message_id;
34139        self
34140    }
34141    #[allow(rustdoc::invalid_html_tags)]
34142    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
34143    pub fn set_message_thread_id(mut self, message_thread_id: i64) -> Self {
34144        self.message_thread_id = Some(message_thread_id);
34145        self
34146    }
34147    #[allow(rustdoc::invalid_html_tags)]
34148    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
34149    pub fn set_direct_messages_topic(mut self, direct_messages_topic: DirectMessagesTopic) -> Self {
34150        self.direct_messages_topic = Some(BoxWrapper(Unbox(direct_messages_topic)));
34151        self
34152    }
34153    #[allow(rustdoc::invalid_html_tags)]
34154    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
34155    pub fn set_from(mut self, from: User) -> Self {
34156        self.from = Some(BoxWrapper(Unbox(from)));
34157        self
34158    }
34159    #[allow(rustdoc::invalid_html_tags)]
34160    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
34161    pub fn set_sender_chat(mut self, sender_chat: Chat) -> Self {
34162        self.sender_chat = Some(BoxWrapper(Unbox(sender_chat)));
34163        self
34164    }
34165    #[allow(rustdoc::invalid_html_tags)]
34166    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
34167    pub fn set_sender_boost_count(mut self, sender_boost_count: i64) -> Self {
34168        self.sender_boost_count = Some(sender_boost_count);
34169        self
34170    }
34171    #[allow(rustdoc::invalid_html_tags)]
34172    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
34173    pub fn set_sender_business_bot(mut self, sender_business_bot: User) -> Self {
34174        self.sender_business_bot = Some(BoxWrapper(Unbox(sender_business_bot)));
34175        self
34176    }
34177    #[allow(rustdoc::invalid_html_tags)]
34178    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
34179    pub fn set_date(mut self, date: i64) -> Self {
34180        self.date = date;
34181        self
34182    }
34183    #[allow(rustdoc::invalid_html_tags)]
34184    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
34185    pub fn set_business_connection_id(mut self, business_connection_id: String) -> Self {
34186        self.business_connection_id = Some(business_connection_id);
34187        self
34188    }
34189    #[allow(rustdoc::invalid_html_tags)]
34190    #[doc = "Chat the message belongs to"]
34191    pub fn set_chat(mut self, chat: Chat) -> Self {
34192        self.chat = BoxWrapper(Unbox(chat));
34193        self
34194    }
34195    #[allow(rustdoc::invalid_html_tags)]
34196    #[doc = "Optional. Information about the original message for forwarded messages"]
34197    pub fn set_forward_origin(mut self, forward_origin: MessageOrigin) -> Self {
34198        self.forward_origin = Some(BoxWrapper(Unbox(forward_origin)));
34199        self
34200    }
34201    #[allow(rustdoc::invalid_html_tags)]
34202    #[doc = "Optional. True, if the message is sent to a forum topic"]
34203    pub fn set_is_topic_message(mut self, is_topic_message: bool) -> Self {
34204        self.is_topic_message = Some(is_topic_message);
34205        self
34206    }
34207    #[allow(rustdoc::invalid_html_tags)]
34208    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
34209    pub fn set_is_automatic_forward(mut self, is_automatic_forward: bool) -> Self {
34210        self.is_automatic_forward = Some(is_automatic_forward);
34211        self
34212    }
34213    #[allow(rustdoc::invalid_html_tags)]
34214    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
34215    pub fn set_reply_to_message(mut self, reply_to_message: Box<Message>) -> Self {
34216        self.reply_to_message = Some(BoxWrapper(reply_to_message));
34217        self
34218    }
34219    #[allow(rustdoc::invalid_html_tags)]
34220    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
34221    pub fn set_external_reply(mut self, external_reply: ExternalReplyInfo) -> Self {
34222        self.external_reply = Some(BoxWrapper(Unbox(external_reply)));
34223        self
34224    }
34225    #[allow(rustdoc::invalid_html_tags)]
34226    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
34227    pub fn set_quote(mut self, quote: TextQuote) -> Self {
34228        self.quote = Some(BoxWrapper(Unbox(quote)));
34229        self
34230    }
34231    #[allow(rustdoc::invalid_html_tags)]
34232    #[doc = "Optional. For replies to a story, the original story"]
34233    pub fn set_reply_to_story(mut self, reply_to_story: Story) -> Self {
34234        self.reply_to_story = Some(BoxWrapper(Unbox(reply_to_story)));
34235        self
34236    }
34237    #[allow(rustdoc::invalid_html_tags)]
34238    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
34239    pub fn set_reply_to_checklist_task_id(mut self, reply_to_checklist_task_id: i64) -> Self {
34240        self.reply_to_checklist_task_id = Some(reply_to_checklist_task_id);
34241        self
34242    }
34243    #[allow(rustdoc::invalid_html_tags)]
34244    #[doc = "Optional. Bot through which the message was sent"]
34245    pub fn set_via_bot(mut self, via_bot: User) -> Self {
34246        self.via_bot = Some(BoxWrapper(Unbox(via_bot)));
34247        self
34248    }
34249    #[allow(rustdoc::invalid_html_tags)]
34250    #[doc = "Optional. Date the message was last edited in Unix time"]
34251    pub fn set_edit_date(mut self, edit_date: i64) -> Self {
34252        self.edit_date = Some(edit_date);
34253        self
34254    }
34255    #[allow(rustdoc::invalid_html_tags)]
34256    #[doc = "Optional. True, if the message can't be forwarded"]
34257    pub fn set_has_protected_content(mut self, has_protected_content: bool) -> Self {
34258        self.has_protected_content = Some(has_protected_content);
34259        self
34260    }
34261    #[allow(rustdoc::invalid_html_tags)]
34262    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
34263    pub fn set_is_from_offline(mut self, is_from_offline: bool) -> Self {
34264        self.is_from_offline = Some(is_from_offline);
34265        self
34266    }
34267    #[allow(rustdoc::invalid_html_tags)]
34268    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
34269    pub fn set_is_paid_post(mut self, is_paid_post: bool) -> Self {
34270        self.is_paid_post = Some(is_paid_post);
34271        self
34272    }
34273    #[allow(rustdoc::invalid_html_tags)]
34274    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
34275    pub fn set_media_group_id(mut self, media_group_id: String) -> Self {
34276        self.media_group_id = Some(media_group_id);
34277        self
34278    }
34279    #[allow(rustdoc::invalid_html_tags)]
34280    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
34281    pub fn set_author_signature(mut self, author_signature: String) -> Self {
34282        self.author_signature = Some(author_signature);
34283        self
34284    }
34285    #[allow(rustdoc::invalid_html_tags)]
34286    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
34287    pub fn set_paid_star_count(mut self, paid_star_count: i64) -> Self {
34288        self.paid_star_count = Some(paid_star_count);
34289        self
34290    }
34291    #[allow(rustdoc::invalid_html_tags)]
34292    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
34293    pub fn set_text(mut self, text: String) -> Self {
34294        self.text = Some(text);
34295        self
34296    }
34297    #[allow(rustdoc::invalid_html_tags)]
34298    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
34299    pub fn set_entities(mut self, entities: Vec<MessageEntity>) -> Self {
34300        self.entities = Some(entities);
34301        self
34302    }
34303    #[allow(rustdoc::invalid_html_tags)]
34304    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
34305    pub fn set_link_preview_options(mut self, link_preview_options: LinkPreviewOptions) -> Self {
34306        self.link_preview_options = Some(BoxWrapper(Unbox(link_preview_options)));
34307        self
34308    }
34309    #[allow(rustdoc::invalid_html_tags)]
34310    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
34311    pub fn set_suggested_post_info(mut self, suggested_post_info: SuggestedPostInfo) -> Self {
34312        self.suggested_post_info = Some(BoxWrapper(Unbox(suggested_post_info)));
34313        self
34314    }
34315    #[allow(rustdoc::invalid_html_tags)]
34316    #[doc = "Optional. Unique identifier of the message effect added to the message"]
34317    pub fn set_effect_id(mut self, effect_id: String) -> Self {
34318        self.effect_id = Some(effect_id);
34319        self
34320    }
34321    #[allow(rustdoc::invalid_html_tags)]
34322    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
34323    pub fn set_animation(mut self, animation: Animation) -> Self {
34324        self.animation = Some(BoxWrapper(Unbox(animation)));
34325        self
34326    }
34327    #[allow(rustdoc::invalid_html_tags)]
34328    #[doc = "Optional. Message is an audio file, information about the file"]
34329    pub fn set_audio(mut self, audio: Audio) -> Self {
34330        self.audio = Some(BoxWrapper(Unbox(audio)));
34331        self
34332    }
34333    #[allow(rustdoc::invalid_html_tags)]
34334    #[doc = "Optional. Message is a general file, information about the file"]
34335    pub fn set_document(mut self, document: Document) -> Self {
34336        self.document = Some(BoxWrapper(Unbox(document)));
34337        self
34338    }
34339    #[allow(rustdoc::invalid_html_tags)]
34340    #[doc = "Optional. Message contains paid media; information about the paid media"]
34341    pub fn set_paid_media(mut self, paid_media: PaidMediaInfo) -> Self {
34342        self.paid_media = Some(BoxWrapper(Unbox(paid_media)));
34343        self
34344    }
34345    #[allow(rustdoc::invalid_html_tags)]
34346    #[doc = "Optional. Message is a photo, available sizes of the photo"]
34347    pub fn set_photo(mut self, photo: Vec<PhotoSize>) -> Self {
34348        self.photo = Some(photo);
34349        self
34350    }
34351    #[allow(rustdoc::invalid_html_tags)]
34352    #[doc = "Optional. Message is a sticker, information about the sticker"]
34353    pub fn set_sticker(mut self, sticker: Sticker) -> Self {
34354        self.sticker = Some(BoxWrapper(Unbox(sticker)));
34355        self
34356    }
34357    #[allow(rustdoc::invalid_html_tags)]
34358    #[doc = "Optional. Message is a forwarded story"]
34359    pub fn set_story(mut self, story: Story) -> Self {
34360        self.story = Some(BoxWrapper(Unbox(story)));
34361        self
34362    }
34363    #[allow(rustdoc::invalid_html_tags)]
34364    #[doc = "Optional. Message is a video, information about the video"]
34365    pub fn set_video(mut self, video: Video) -> Self {
34366        self.video = Some(BoxWrapper(Unbox(video)));
34367        self
34368    }
34369    #[allow(rustdoc::invalid_html_tags)]
34370    #[doc = "Optional. Message is a video note, information about the video message"]
34371    pub fn set_video_note(mut self, video_note: VideoNote) -> Self {
34372        self.video_note = Some(BoxWrapper(Unbox(video_note)));
34373        self
34374    }
34375    #[allow(rustdoc::invalid_html_tags)]
34376    #[doc = "Optional. Message is a voice message, information about the file"]
34377    pub fn set_voice(mut self, voice: Voice) -> Self {
34378        self.voice = Some(BoxWrapper(Unbox(voice)));
34379        self
34380    }
34381    #[allow(rustdoc::invalid_html_tags)]
34382    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
34383    pub fn set_caption(mut self, caption: String) -> Self {
34384        self.caption = Some(caption);
34385        self
34386    }
34387    #[allow(rustdoc::invalid_html_tags)]
34388    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
34389    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
34390        self.caption_entities = Some(caption_entities);
34391        self
34392    }
34393    #[allow(rustdoc::invalid_html_tags)]
34394    #[doc = "Optional. True, if the caption must be shown above the message media"]
34395    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
34396        self.show_caption_above_media = Some(show_caption_above_media);
34397        self
34398    }
34399    #[allow(rustdoc::invalid_html_tags)]
34400    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
34401    pub fn set_has_media_spoiler(mut self, has_media_spoiler: bool) -> Self {
34402        self.has_media_spoiler = Some(has_media_spoiler);
34403        self
34404    }
34405    #[allow(rustdoc::invalid_html_tags)]
34406    #[doc = "Optional. Message is a checklist"]
34407    pub fn set_checklist(mut self, checklist: Checklist) -> Self {
34408        self.checklist = Some(BoxWrapper(Unbox(checklist)));
34409        self
34410    }
34411    #[allow(rustdoc::invalid_html_tags)]
34412    #[doc = "Optional. Message is a shared contact, information about the contact"]
34413    pub fn set_contact(mut self, contact: Contact) -> Self {
34414        self.contact = Some(BoxWrapper(Unbox(contact)));
34415        self
34416    }
34417    #[allow(rustdoc::invalid_html_tags)]
34418    #[doc = "Optional. Message is a dice with random value"]
34419    pub fn set_dice(mut self, dice: Dice) -> Self {
34420        self.dice = Some(BoxWrapper(Unbox(dice)));
34421        self
34422    }
34423    #[allow(rustdoc::invalid_html_tags)]
34424    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
34425    pub fn set_game(mut self, game: Game) -> Self {
34426        self.game = Some(BoxWrapper(Unbox(game)));
34427        self
34428    }
34429    #[allow(rustdoc::invalid_html_tags)]
34430    #[doc = "Optional. Message is a native poll, information about the poll"]
34431    pub fn set_poll(mut self, poll: Poll) -> Self {
34432        self.poll = Some(BoxWrapper(Unbox(poll)));
34433        self
34434    }
34435    #[allow(rustdoc::invalid_html_tags)]
34436    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
34437    pub fn set_venue(mut self, venue: Venue) -> Self {
34438        self.venue = Some(BoxWrapper(Unbox(venue)));
34439        self
34440    }
34441    #[allow(rustdoc::invalid_html_tags)]
34442    #[doc = "Optional. Message is a shared location, information about the location"]
34443    pub fn set_location(mut self, location: Location) -> Self {
34444        self.location = Some(BoxWrapper(Unbox(location)));
34445        self
34446    }
34447    #[allow(rustdoc::invalid_html_tags)]
34448    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
34449    pub fn set_new_chat_members(mut self, new_chat_members: Vec<User>) -> Self {
34450        self.new_chat_members = Some(new_chat_members);
34451        self
34452    }
34453    #[allow(rustdoc::invalid_html_tags)]
34454    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
34455    pub fn set_left_chat_member(mut self, left_chat_member: User) -> Self {
34456        self.left_chat_member = Some(BoxWrapper(Unbox(left_chat_member)));
34457        self
34458    }
34459    #[allow(rustdoc::invalid_html_tags)]
34460    #[doc = "Optional. A chat title was changed to this value"]
34461    pub fn set_new_chat_title(mut self, new_chat_title: String) -> Self {
34462        self.new_chat_title = Some(new_chat_title);
34463        self
34464    }
34465    #[allow(rustdoc::invalid_html_tags)]
34466    #[doc = "Optional. A chat photo was change to this value"]
34467    pub fn set_new_chat_photo(mut self, new_chat_photo: Vec<PhotoSize>) -> Self {
34468        self.new_chat_photo = Some(new_chat_photo);
34469        self
34470    }
34471    #[allow(rustdoc::invalid_html_tags)]
34472    #[doc = "Optional. Service message: the chat photo was deleted"]
34473    pub fn set_delete_chat_photo(mut self, delete_chat_photo: bool) -> Self {
34474        self.delete_chat_photo = Some(delete_chat_photo);
34475        self
34476    }
34477    #[allow(rustdoc::invalid_html_tags)]
34478    #[doc = "Optional. Service message: the group has been created"]
34479    pub fn set_group_chat_created(mut self, group_chat_created: bool) -> Self {
34480        self.group_chat_created = Some(group_chat_created);
34481        self
34482    }
34483    #[allow(rustdoc::invalid_html_tags)]
34484    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
34485    pub fn set_supergroup_chat_created(mut self, supergroup_chat_created: bool) -> Self {
34486        self.supergroup_chat_created = Some(supergroup_chat_created);
34487        self
34488    }
34489    #[allow(rustdoc::invalid_html_tags)]
34490    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
34491    pub fn set_channel_chat_created(mut self, channel_chat_created: bool) -> Self {
34492        self.channel_chat_created = Some(channel_chat_created);
34493        self
34494    }
34495    #[allow(rustdoc::invalid_html_tags)]
34496    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
34497    pub fn set_message_auto_delete_timer_changed(
34498        mut self,
34499        message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged,
34500    ) -> Self {
34501        self.message_auto_delete_timer_changed =
34502            Some(BoxWrapper(Unbox(message_auto_delete_timer_changed)));
34503        self
34504    }
34505    #[allow(rustdoc::invalid_html_tags)]
34506    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
34507    pub fn set_migrate_to_chat_id(mut self, migrate_to_chat_id: i64) -> Self {
34508        self.migrate_to_chat_id = Some(migrate_to_chat_id);
34509        self
34510    }
34511    #[allow(rustdoc::invalid_html_tags)]
34512    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
34513    pub fn set_migrate_from_chat_id(mut self, migrate_from_chat_id: i64) -> Self {
34514        self.migrate_from_chat_id = Some(migrate_from_chat_id);
34515        self
34516    }
34517    #[allow(rustdoc::invalid_html_tags)]
34518    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
34519    pub fn set_pinned_message(mut self, pinned_message: Box<MaybeInaccessibleMessage>) -> Self {
34520        self.pinned_message = Some(BoxWrapper(pinned_message));
34521        self
34522    }
34523    #[allow(rustdoc::invalid_html_tags)]
34524    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
34525    pub fn set_invoice(mut self, invoice: Invoice) -> Self {
34526        self.invoice = Some(BoxWrapper(Unbox(invoice)));
34527        self
34528    }
34529    #[allow(rustdoc::invalid_html_tags)]
34530    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
34531    pub fn set_successful_payment(mut self, successful_payment: SuccessfulPayment) -> Self {
34532        self.successful_payment = Some(BoxWrapper(Unbox(successful_payment)));
34533        self
34534    }
34535    #[allow(rustdoc::invalid_html_tags)]
34536    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
34537    pub fn set_refunded_payment(mut self, refunded_payment: RefundedPayment) -> Self {
34538        self.refunded_payment = Some(BoxWrapper(Unbox(refunded_payment)));
34539        self
34540    }
34541    #[allow(rustdoc::invalid_html_tags)]
34542    #[doc = "Optional. Service message: users were shared with the bot"]
34543    pub fn set_users_shared(mut self, users_shared: UsersShared) -> Self {
34544        self.users_shared = Some(BoxWrapper(Unbox(users_shared)));
34545        self
34546    }
34547    #[allow(rustdoc::invalid_html_tags)]
34548    #[doc = "Optional. Service message: a chat was shared with the bot"]
34549    pub fn set_chat_shared(mut self, chat_shared: ChatShared) -> Self {
34550        self.chat_shared = Some(BoxWrapper(Unbox(chat_shared)));
34551        self
34552    }
34553    #[allow(rustdoc::invalid_html_tags)]
34554    #[doc = "Optional. Service message: a regular gift was sent or received"]
34555    pub fn set_gift(mut self, gift: GiftInfo) -> Self {
34556        self.gift = Some(BoxWrapper(Unbox(gift)));
34557        self
34558    }
34559    #[allow(rustdoc::invalid_html_tags)]
34560    #[doc = "Optional. Service message: a unique gift was sent or received"]
34561    pub fn set_unique_gift(mut self, unique_gift: UniqueGiftInfo) -> Self {
34562        self.unique_gift = Some(BoxWrapper(Unbox(unique_gift)));
34563        self
34564    }
34565    #[allow(rustdoc::invalid_html_tags)]
34566    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
34567    pub fn set_connected_website(mut self, connected_website: String) -> Self {
34568        self.connected_website = Some(connected_website);
34569        self
34570    }
34571    #[allow(rustdoc::invalid_html_tags)]
34572    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
34573    pub fn set_write_access_allowed(mut self, write_access_allowed: WriteAccessAllowed) -> Self {
34574        self.write_access_allowed = Some(BoxWrapper(Unbox(write_access_allowed)));
34575        self
34576    }
34577    #[allow(rustdoc::invalid_html_tags)]
34578    #[doc = "Optional. Telegram Passport data"]
34579    pub fn set_passport_data(mut self, passport_data: PassportData) -> Self {
34580        self.passport_data = Some(BoxWrapper(Unbox(passport_data)));
34581        self
34582    }
34583    #[allow(rustdoc::invalid_html_tags)]
34584    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
34585    pub fn set_proximity_alert_triggered(
34586        mut self,
34587        proximity_alert_triggered: ProximityAlertTriggered,
34588    ) -> Self {
34589        self.proximity_alert_triggered = Some(BoxWrapper(Unbox(proximity_alert_triggered)));
34590        self
34591    }
34592    #[allow(rustdoc::invalid_html_tags)]
34593    #[doc = "Optional. Service message: user boosted the chat"]
34594    pub fn set_boost_added(mut self, boost_added: ChatBoostAdded) -> Self {
34595        self.boost_added = Some(BoxWrapper(Unbox(boost_added)));
34596        self
34597    }
34598    #[allow(rustdoc::invalid_html_tags)]
34599    #[doc = "Optional. Service message: chat background set"]
34600    pub fn set_chat_background_set(mut self, chat_background_set: ChatBackground) -> Self {
34601        self.chat_background_set = Some(BoxWrapper(Unbox(chat_background_set)));
34602        self
34603    }
34604    #[allow(rustdoc::invalid_html_tags)]
34605    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
34606    pub fn set_checklist_tasks_done(
34607        mut self,
34608        checklist_tasks_done: Box<ChecklistTasksDone>,
34609    ) -> Self {
34610        self.checklist_tasks_done = Some(BoxWrapper(checklist_tasks_done));
34611        self
34612    }
34613    #[allow(rustdoc::invalid_html_tags)]
34614    #[doc = "Optional. Service message: tasks were added to a checklist"]
34615    pub fn set_checklist_tasks_added(
34616        mut self,
34617        checklist_tasks_added: Box<ChecklistTasksAdded>,
34618    ) -> Self {
34619        self.checklist_tasks_added = Some(BoxWrapper(checklist_tasks_added));
34620        self
34621    }
34622    #[allow(rustdoc::invalid_html_tags)]
34623    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
34624    pub fn set_direct_message_price_changed(
34625        mut self,
34626        direct_message_price_changed: DirectMessagePriceChanged,
34627    ) -> Self {
34628        self.direct_message_price_changed = Some(BoxWrapper(Unbox(direct_message_price_changed)));
34629        self
34630    }
34631    #[allow(rustdoc::invalid_html_tags)]
34632    #[doc = "Optional. Service message: forum topic created"]
34633    pub fn set_forum_topic_created(mut self, forum_topic_created: ForumTopicCreated) -> Self {
34634        self.forum_topic_created = Some(BoxWrapper(Unbox(forum_topic_created)));
34635        self
34636    }
34637    #[allow(rustdoc::invalid_html_tags)]
34638    #[doc = "Optional. Service message: forum topic edited"]
34639    pub fn set_forum_topic_edited(mut self, forum_topic_edited: ForumTopicEdited) -> Self {
34640        self.forum_topic_edited = Some(BoxWrapper(Unbox(forum_topic_edited)));
34641        self
34642    }
34643    #[allow(rustdoc::invalid_html_tags)]
34644    #[doc = "Optional. Service message: forum topic closed"]
34645    pub fn set_forum_topic_closed(mut self, forum_topic_closed: ForumTopicClosed) -> Self {
34646        self.forum_topic_closed = Some(BoxWrapper(Unbox(forum_topic_closed)));
34647        self
34648    }
34649    #[allow(rustdoc::invalid_html_tags)]
34650    #[doc = "Optional. Service message: forum topic reopened"]
34651    pub fn set_forum_topic_reopened(mut self, forum_topic_reopened: ForumTopicReopened) -> Self {
34652        self.forum_topic_reopened = Some(BoxWrapper(Unbox(forum_topic_reopened)));
34653        self
34654    }
34655    #[allow(rustdoc::invalid_html_tags)]
34656    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
34657    pub fn set_general_forum_topic_hidden(
34658        mut self,
34659        general_forum_topic_hidden: GeneralForumTopicHidden,
34660    ) -> Self {
34661        self.general_forum_topic_hidden = Some(BoxWrapper(Unbox(general_forum_topic_hidden)));
34662        self
34663    }
34664    #[allow(rustdoc::invalid_html_tags)]
34665    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
34666    pub fn set_general_forum_topic_unhidden(
34667        mut self,
34668        general_forum_topic_unhidden: GeneralForumTopicUnhidden,
34669    ) -> Self {
34670        self.general_forum_topic_unhidden = Some(BoxWrapper(Unbox(general_forum_topic_unhidden)));
34671        self
34672    }
34673    #[allow(rustdoc::invalid_html_tags)]
34674    #[doc = "Optional. Service message: a scheduled giveaway was created"]
34675    pub fn set_giveaway_created(mut self, giveaway_created: GiveawayCreated) -> Self {
34676        self.giveaway_created = Some(BoxWrapper(Unbox(giveaway_created)));
34677        self
34678    }
34679    #[allow(rustdoc::invalid_html_tags)]
34680    #[doc = "Optional. The message is a scheduled giveaway message"]
34681    pub fn set_giveaway(mut self, giveaway: Giveaway) -> Self {
34682        self.giveaway = Some(BoxWrapper(Unbox(giveaway)));
34683        self
34684    }
34685    #[allow(rustdoc::invalid_html_tags)]
34686    #[doc = "Optional. A giveaway with public winners was completed"]
34687    pub fn set_giveaway_winners(mut self, giveaway_winners: GiveawayWinners) -> Self {
34688        self.giveaway_winners = Some(BoxWrapper(Unbox(giveaway_winners)));
34689        self
34690    }
34691    #[allow(rustdoc::invalid_html_tags)]
34692    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
34693    pub fn set_giveaway_completed(mut self, giveaway_completed: Box<GiveawayCompleted>) -> Self {
34694        self.giveaway_completed = Some(BoxWrapper(giveaway_completed));
34695        self
34696    }
34697    #[allow(rustdoc::invalid_html_tags)]
34698    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
34699    pub fn set_paid_message_price_changed(
34700        mut self,
34701        paid_message_price_changed: PaidMessagePriceChanged,
34702    ) -> Self {
34703        self.paid_message_price_changed = Some(BoxWrapper(Unbox(paid_message_price_changed)));
34704        self
34705    }
34706    #[allow(rustdoc::invalid_html_tags)]
34707    #[doc = "Optional. Service message: a suggested post was approved"]
34708    pub fn set_suggested_post_approved(
34709        mut self,
34710        suggested_post_approved: SuggestedPostApproved,
34711    ) -> Self {
34712        self.suggested_post_approved = Some(BoxWrapper(Unbox(suggested_post_approved)));
34713        self
34714    }
34715    #[allow(rustdoc::invalid_html_tags)]
34716    #[doc = "Optional. Service message: approval of a suggested post has failed"]
34717    pub fn set_suggested_post_approval_failed(
34718        mut self,
34719        suggested_post_approval_failed: SuggestedPostApprovalFailed,
34720    ) -> Self {
34721        self.suggested_post_approval_failed =
34722            Some(BoxWrapper(Unbox(suggested_post_approval_failed)));
34723        self
34724    }
34725    #[allow(rustdoc::invalid_html_tags)]
34726    #[doc = "Optional. Service message: a suggested post was declined"]
34727    pub fn set_suggested_post_declined(
34728        mut self,
34729        suggested_post_declined: SuggestedPostDeclined,
34730    ) -> Self {
34731        self.suggested_post_declined = Some(BoxWrapper(Unbox(suggested_post_declined)));
34732        self
34733    }
34734    #[allow(rustdoc::invalid_html_tags)]
34735    #[doc = "Optional. Service message: payment for a suggested post was received"]
34736    pub fn set_suggested_post_paid(mut self, suggested_post_paid: SuggestedPostPaid) -> Self {
34737        self.suggested_post_paid = Some(BoxWrapper(Unbox(suggested_post_paid)));
34738        self
34739    }
34740    #[allow(rustdoc::invalid_html_tags)]
34741    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
34742    pub fn set_suggested_post_refunded(
34743        mut self,
34744        suggested_post_refunded: SuggestedPostRefunded,
34745    ) -> Self {
34746        self.suggested_post_refunded = Some(BoxWrapper(Unbox(suggested_post_refunded)));
34747        self
34748    }
34749    #[allow(rustdoc::invalid_html_tags)]
34750    #[doc = "Optional. Service message: video chat scheduled"]
34751    pub fn set_video_chat_scheduled(mut self, video_chat_scheduled: VideoChatScheduled) -> Self {
34752        self.video_chat_scheduled = Some(BoxWrapper(Unbox(video_chat_scheduled)));
34753        self
34754    }
34755    #[allow(rustdoc::invalid_html_tags)]
34756    #[doc = "Optional. Service message: video chat started"]
34757    pub fn set_video_chat_started(mut self, video_chat_started: VideoChatStarted) -> Self {
34758        self.video_chat_started = Some(BoxWrapper(Unbox(video_chat_started)));
34759        self
34760    }
34761    #[allow(rustdoc::invalid_html_tags)]
34762    #[doc = "Optional. Service message: video chat ended"]
34763    pub fn set_video_chat_ended(mut self, video_chat_ended: VideoChatEnded) -> Self {
34764        self.video_chat_ended = Some(BoxWrapper(Unbox(video_chat_ended)));
34765        self
34766    }
34767    #[allow(rustdoc::invalid_html_tags)]
34768    #[doc = "Optional. Service message: new participants invited to a video chat"]
34769    pub fn set_video_chat_participants_invited(
34770        mut self,
34771        video_chat_participants_invited: VideoChatParticipantsInvited,
34772    ) -> Self {
34773        self.video_chat_participants_invited =
34774            Some(BoxWrapper(Unbox(video_chat_participants_invited)));
34775        self
34776    }
34777    #[allow(rustdoc::invalid_html_tags)]
34778    #[doc = "Optional. Service message: data sent by a Web App"]
34779    pub fn set_web_app_data(mut self, web_app_data: WebAppData) -> Self {
34780        self.web_app_data = Some(BoxWrapper(Unbox(web_app_data)));
34781        self
34782    }
34783    #[allow(rustdoc::invalid_html_tags)]
34784    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
34785    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
34786        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
34787        self
34788    }
34789    pub fn build(self) -> Message {
34790        Message {
34791            message_id: self.message_id,
34792            message_thread_id: self.message_thread_id,
34793            direct_messages_topic: self.direct_messages_topic,
34794            from: self.from,
34795            sender_chat: self.sender_chat,
34796            sender_boost_count: self.sender_boost_count,
34797            sender_business_bot: self.sender_business_bot,
34798            date: self.date,
34799            business_connection_id: self.business_connection_id,
34800            chat: self.chat,
34801            forward_origin: self.forward_origin,
34802            is_topic_message: self.is_topic_message,
34803            is_automatic_forward: self.is_automatic_forward,
34804            reply_to_message: self.reply_to_message,
34805            external_reply: self.external_reply,
34806            quote: self.quote,
34807            reply_to_story: self.reply_to_story,
34808            reply_to_checklist_task_id: self.reply_to_checklist_task_id,
34809            via_bot: self.via_bot,
34810            edit_date: self.edit_date,
34811            has_protected_content: self.has_protected_content,
34812            is_from_offline: self.is_from_offline,
34813            is_paid_post: self.is_paid_post,
34814            media_group_id: self.media_group_id,
34815            author_signature: self.author_signature,
34816            paid_star_count: self.paid_star_count,
34817            text: self.text,
34818            entities: self.entities,
34819            link_preview_options: self.link_preview_options,
34820            suggested_post_info: self.suggested_post_info,
34821            effect_id: self.effect_id,
34822            animation: self.animation,
34823            audio: self.audio,
34824            document: self.document,
34825            paid_media: self.paid_media,
34826            photo: self.photo,
34827            sticker: self.sticker,
34828            story: self.story,
34829            video: self.video,
34830            video_note: self.video_note,
34831            voice: self.voice,
34832            caption: self.caption,
34833            caption_entities: self.caption_entities,
34834            show_caption_above_media: self.show_caption_above_media,
34835            has_media_spoiler: self.has_media_spoiler,
34836            checklist: self.checklist,
34837            contact: self.contact,
34838            dice: self.dice,
34839            game: self.game,
34840            poll: self.poll,
34841            venue: self.venue,
34842            location: self.location,
34843            new_chat_members: self.new_chat_members,
34844            left_chat_member: self.left_chat_member,
34845            new_chat_title: self.new_chat_title,
34846            new_chat_photo: self.new_chat_photo,
34847            delete_chat_photo: self.delete_chat_photo,
34848            group_chat_created: self.group_chat_created,
34849            supergroup_chat_created: self.supergroup_chat_created,
34850            channel_chat_created: self.channel_chat_created,
34851            message_auto_delete_timer_changed: self.message_auto_delete_timer_changed,
34852            migrate_to_chat_id: self.migrate_to_chat_id,
34853            migrate_from_chat_id: self.migrate_from_chat_id,
34854            pinned_message: self.pinned_message,
34855            invoice: self.invoice,
34856            successful_payment: self.successful_payment,
34857            refunded_payment: self.refunded_payment,
34858            users_shared: self.users_shared,
34859            chat_shared: self.chat_shared,
34860            gift: self.gift,
34861            unique_gift: self.unique_gift,
34862            connected_website: self.connected_website,
34863            write_access_allowed: self.write_access_allowed,
34864            passport_data: self.passport_data,
34865            proximity_alert_triggered: self.proximity_alert_triggered,
34866            boost_added: self.boost_added,
34867            chat_background_set: self.chat_background_set,
34868            checklist_tasks_done: self.checklist_tasks_done,
34869            checklist_tasks_added: self.checklist_tasks_added,
34870            direct_message_price_changed: self.direct_message_price_changed,
34871            forum_topic_created: self.forum_topic_created,
34872            forum_topic_edited: self.forum_topic_edited,
34873            forum_topic_closed: self.forum_topic_closed,
34874            forum_topic_reopened: self.forum_topic_reopened,
34875            general_forum_topic_hidden: self.general_forum_topic_hidden,
34876            general_forum_topic_unhidden: self.general_forum_topic_unhidden,
34877            giveaway_created: self.giveaway_created,
34878            giveaway: self.giveaway,
34879            giveaway_winners: self.giveaway_winners,
34880            giveaway_completed: self.giveaway_completed,
34881            paid_message_price_changed: self.paid_message_price_changed,
34882            suggested_post_approved: self.suggested_post_approved,
34883            suggested_post_approval_failed: self.suggested_post_approval_failed,
34884            suggested_post_declined: self.suggested_post_declined,
34885            suggested_post_paid: self.suggested_post_paid,
34886            suggested_post_refunded: self.suggested_post_refunded,
34887            video_chat_scheduled: self.video_chat_scheduled,
34888            video_chat_started: self.video_chat_started,
34889            video_chat_ended: self.video_chat_ended,
34890            video_chat_participants_invited: self.video_chat_participants_invited,
34891            web_app_data: self.web_app_data,
34892            reply_markup: self.reply_markup,
34893        }
34894    }
34895}
34896#[allow(rustdoc::invalid_html_tags)]
34897#[doc = "This object represents a chat photo."]
34898#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
34899pub struct ChatPhoto {
34900    #[allow(rustdoc::invalid_html_tags)]
34901    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
34902    #[serde(rename = "small_file_id")]
34903    pub small_file_id: String,
34904    #[allow(rustdoc::invalid_html_tags)]
34905    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
34906    #[serde(rename = "small_file_unique_id")]
34907    pub small_file_unique_id: String,
34908    #[allow(rustdoc::invalid_html_tags)]
34909    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
34910    #[serde(rename = "big_file_id")]
34911    pub big_file_id: String,
34912    #[allow(rustdoc::invalid_html_tags)]
34913    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
34914    #[serde(rename = "big_file_unique_id")]
34915    pub big_file_unique_id: String,
34916}
34917#[allow(rustdoc::invalid_html_tags)]
34918#[doc = "Companion type to ChatPhoto that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
34919#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
34920pub struct NoSkipChatPhoto {
34921    #[allow(rustdoc::invalid_html_tags)]
34922    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
34923    #[serde(rename = "small_file_id")]
34924    pub small_file_id: String,
34925    #[allow(rustdoc::invalid_html_tags)]
34926    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
34927    #[serde(rename = "small_file_unique_id")]
34928    pub small_file_unique_id: String,
34929    #[allow(rustdoc::invalid_html_tags)]
34930    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
34931    #[serde(rename = "big_file_id")]
34932    pub big_file_id: String,
34933    #[allow(rustdoc::invalid_html_tags)]
34934    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
34935    #[serde(rename = "big_file_unique_id")]
34936    pub big_file_unique_id: String,
34937}
34938impl From<NoSkipChatPhoto> for ChatPhoto {
34939    fn from(t: NoSkipChatPhoto) -> Self {
34940        Self {
34941            small_file_id: t.small_file_id,
34942            small_file_unique_id: t.small_file_unique_id,
34943            big_file_id: t.big_file_id,
34944            big_file_unique_id: t.big_file_unique_id,
34945        }
34946    }
34947}
34948#[allow(clippy::from_over_into)]
34949impl Into<NoSkipChatPhoto> for ChatPhoto {
34950    fn into(self) -> NoSkipChatPhoto {
34951        NoSkipChatPhoto {
34952            small_file_id: self.small_file_id,
34953            small_file_unique_id: self.small_file_unique_id,
34954            big_file_id: self.big_file_id,
34955            big_file_unique_id: self.big_file_unique_id,
34956        }
34957    }
34958}
34959impl NoSkipChatPhoto {
34960    pub fn skip(self) -> ChatPhoto {
34961        self.into()
34962    }
34963}
34964impl ChatPhoto {
34965    pub fn noskip(self) -> NoSkipChatPhoto {
34966        self.into()
34967    }
34968}
34969#[allow(rustdoc::invalid_html_tags)]
34970#[doc = "This object represents a chat photo."]
34971#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
34972pub struct ChatPhotoBuilder {
34973    #[allow(rustdoc::invalid_html_tags)]
34974    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
34975    #[serde(rename = "small_file_id")]
34976    pub small_file_id: String,
34977    #[allow(rustdoc::invalid_html_tags)]
34978    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
34979    #[serde(rename = "small_file_unique_id")]
34980    pub small_file_unique_id: String,
34981    #[allow(rustdoc::invalid_html_tags)]
34982    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
34983    #[serde(rename = "big_file_id")]
34984    pub big_file_id: String,
34985    #[allow(rustdoc::invalid_html_tags)]
34986    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
34987    #[serde(rename = "big_file_unique_id")]
34988    pub big_file_unique_id: String,
34989}
34990impl ChatPhotoBuilder {
34991    #[allow(clippy::too_many_arguments)]
34992    pub fn new(
34993        small_file_id: String,
34994        small_file_unique_id: String,
34995        big_file_id: String,
34996        big_file_unique_id: String,
34997    ) -> Self {
34998        Self {
34999            small_file_id,
35000            small_file_unique_id,
35001            big_file_id,
35002            big_file_unique_id,
35003        }
35004    }
35005    #[allow(rustdoc::invalid_html_tags)]
35006    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
35007    pub fn set_small_file_id(mut self, small_file_id: String) -> Self {
35008        self.small_file_id = small_file_id;
35009        self
35010    }
35011    #[allow(rustdoc::invalid_html_tags)]
35012    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
35013    pub fn set_small_file_unique_id(mut self, small_file_unique_id: String) -> Self {
35014        self.small_file_unique_id = small_file_unique_id;
35015        self
35016    }
35017    #[allow(rustdoc::invalid_html_tags)]
35018    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
35019    pub fn set_big_file_id(mut self, big_file_id: String) -> Self {
35020        self.big_file_id = big_file_id;
35021        self
35022    }
35023    #[allow(rustdoc::invalid_html_tags)]
35024    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
35025    pub fn set_big_file_unique_id(mut self, big_file_unique_id: String) -> Self {
35026        self.big_file_unique_id = big_file_unique_id;
35027        self
35028    }
35029    pub fn build(self) -> ChatPhoto {
35030        ChatPhoto {
35031            small_file_id: self.small_file_id,
35032            small_file_unique_id: self.small_file_unique_id,
35033            big_file_id: self.big_file_id,
35034            big_file_unique_id: self.big_file_unique_id,
35035        }
35036    }
35037}
35038#[allow(rustdoc::invalid_html_tags)]
35039#[doc = "Represents a Game."]
35040#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35041pub struct InlineQueryResultGame {
35042    #[allow(rustdoc::invalid_html_tags)]
35043    #[doc = "Type of the result, must be game"]
35044    #[serde(rename = "type")]
35045    pub tg_type: String,
35046    #[allow(rustdoc::invalid_html_tags)]
35047    #[doc = "Unique identifier for this result, 1-64 bytes"]
35048    #[serde(rename = "id")]
35049    pub id: String,
35050    #[allow(rustdoc::invalid_html_tags)]
35051    #[doc = "Short name of the game"]
35052    #[serde(rename = "game_short_name")]
35053    pub game_short_name: String,
35054    #[allow(rustdoc::invalid_html_tags)]
35055    #[doc = "Optional. Inline keyboard attached to the message"]
35056    #[serde(
35057        skip_serializing_if = "Option::is_none",
35058        rename = "reply_markup",
35059        default
35060    )]
35061    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
35062}
35063#[allow(rustdoc::invalid_html_tags)]
35064#[doc = "Companion type to InlineQueryResultGame that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
35065#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35066pub struct NoSkipInlineQueryResultGame {
35067    #[allow(rustdoc::invalid_html_tags)]
35068    #[doc = "Type of the result, must be game"]
35069    #[serde(rename = "type")]
35070    pub tg_type: String,
35071    #[allow(rustdoc::invalid_html_tags)]
35072    #[doc = "Unique identifier for this result, 1-64 bytes"]
35073    #[serde(rename = "id")]
35074    pub id: String,
35075    #[allow(rustdoc::invalid_html_tags)]
35076    #[doc = "Short name of the game"]
35077    #[serde(rename = "game_short_name")]
35078    pub game_short_name: String,
35079    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
35080}
35081impl From<NoSkipInlineQueryResultGame> for InlineQueryResultGame {
35082    fn from(t: NoSkipInlineQueryResultGame) -> Self {
35083        Self {
35084            tg_type: t.tg_type,
35085            id: t.id,
35086            game_short_name: t.game_short_name,
35087            reply_markup: t.reply_markup,
35088        }
35089    }
35090}
35091#[allow(clippy::from_over_into)]
35092impl Into<NoSkipInlineQueryResultGame> for InlineQueryResultGame {
35093    fn into(self) -> NoSkipInlineQueryResultGame {
35094        NoSkipInlineQueryResultGame {
35095            tg_type: self.tg_type,
35096            id: self.id,
35097            game_short_name: self.game_short_name,
35098            reply_markup: self.reply_markup,
35099        }
35100    }
35101}
35102impl NoSkipInlineQueryResultGame {
35103    pub fn skip(self) -> InlineQueryResultGame {
35104        self.into()
35105    }
35106}
35107impl InlineQueryResultGame {
35108    pub fn noskip(self) -> NoSkipInlineQueryResultGame {
35109        self.into()
35110    }
35111}
35112#[allow(rustdoc::invalid_html_tags)]
35113#[doc = "Represents a Game."]
35114#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35115pub struct InlineQueryResultGameBuilder {
35116    #[allow(rustdoc::invalid_html_tags)]
35117    #[doc = "Type of the result, must be game"]
35118    #[serde(rename = "type")]
35119    pub tg_type: String,
35120    #[allow(rustdoc::invalid_html_tags)]
35121    #[doc = "Unique identifier for this result, 1-64 bytes"]
35122    #[serde(rename = "id")]
35123    pub id: String,
35124    #[allow(rustdoc::invalid_html_tags)]
35125    #[doc = "Short name of the game"]
35126    #[serde(rename = "game_short_name")]
35127    pub game_short_name: String,
35128    #[allow(rustdoc::invalid_html_tags)]
35129    #[doc = "Optional. Inline keyboard attached to the message"]
35130    #[serde(
35131        skip_serializing_if = "Option::is_none",
35132        rename = "reply_markup",
35133        default
35134    )]
35135    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
35136}
35137impl InlineQueryResultGameBuilder {
35138    #[allow(clippy::too_many_arguments)]
35139    pub fn new(id: String, game_short_name: String) -> Self {
35140        Self {
35141            tg_type: "game".to_owned(),
35142            id,
35143            game_short_name,
35144            reply_markup: None,
35145        }
35146    }
35147    #[allow(rustdoc::invalid_html_tags)]
35148    #[doc = "Type of the result, must be game"]
35149    pub fn set_type(mut self, tg_type: String) -> Self {
35150        self.tg_type = tg_type;
35151        self
35152    }
35153    #[allow(rustdoc::invalid_html_tags)]
35154    #[doc = "Unique identifier for this result, 1-64 bytes"]
35155    pub fn set_id(mut self, id: String) -> Self {
35156        self.id = id;
35157        self
35158    }
35159    #[allow(rustdoc::invalid_html_tags)]
35160    #[doc = "Short name of the game"]
35161    pub fn set_game_short_name(mut self, game_short_name: String) -> Self {
35162        self.game_short_name = game_short_name;
35163        self
35164    }
35165    #[allow(rustdoc::invalid_html_tags)]
35166    #[doc = "Optional. Inline keyboard attached to the message"]
35167    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
35168        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
35169        self
35170    }
35171    pub fn build(self) -> InlineQueryResultGame {
35172        InlineQueryResultGame {
35173            tg_type: self.tg_type,
35174            id: self.id,
35175            game_short_name: self.game_short_name,
35176            reply_markup: self.reply_markup,
35177        }
35178    }
35179}
35180#[allow(rustdoc::invalid_html_tags)]
35181#[doc = "The withdrawal failed and the transaction was refunded."]
35182#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35183pub struct RevenueWithdrawalStateFailed {
35184    #[allow(rustdoc::invalid_html_tags)]
35185    #[doc = "Type of the state, always \"failed\""]
35186    #[serde(rename = "type")]
35187    pub tg_type: String,
35188}
35189#[allow(rustdoc::invalid_html_tags)]
35190#[doc = "Companion type to RevenueWithdrawalStateFailed that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
35191#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35192pub struct NoSkipRevenueWithdrawalStateFailed {
35193    #[allow(rustdoc::invalid_html_tags)]
35194    #[doc = "Type of the state, always \"failed\""]
35195    #[serde(rename = "type")]
35196    pub tg_type: String,
35197}
35198impl From<NoSkipRevenueWithdrawalStateFailed> for RevenueWithdrawalStateFailed {
35199    fn from(t: NoSkipRevenueWithdrawalStateFailed) -> Self {
35200        Self { tg_type: t.tg_type }
35201    }
35202}
35203#[allow(clippy::from_over_into)]
35204impl Into<NoSkipRevenueWithdrawalStateFailed> for RevenueWithdrawalStateFailed {
35205    fn into(self) -> NoSkipRevenueWithdrawalStateFailed {
35206        NoSkipRevenueWithdrawalStateFailed {
35207            tg_type: self.tg_type,
35208        }
35209    }
35210}
35211impl NoSkipRevenueWithdrawalStateFailed {
35212    pub fn skip(self) -> RevenueWithdrawalStateFailed {
35213        self.into()
35214    }
35215}
35216impl RevenueWithdrawalStateFailed {
35217    pub fn noskip(self) -> NoSkipRevenueWithdrawalStateFailed {
35218        self.into()
35219    }
35220}
35221#[allow(rustdoc::invalid_html_tags)]
35222#[doc = "The withdrawal failed and the transaction was refunded."]
35223#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35224pub struct RevenueWithdrawalStateFailedBuilder {
35225    #[allow(rustdoc::invalid_html_tags)]
35226    #[doc = "Type of the state, always \"failed\""]
35227    #[serde(rename = "type")]
35228    pub tg_type: String,
35229}
35230impl RevenueWithdrawalStateFailedBuilder {
35231    #[allow(clippy::too_many_arguments)]
35232    pub fn new() -> Self {
35233        Self {
35234            tg_type: "RevenueWithdrawalStateFailed".to_owned(),
35235        }
35236    }
35237    #[allow(rustdoc::invalid_html_tags)]
35238    #[doc = "Type of the state, always \"failed\""]
35239    pub fn set_type(mut self, tg_type: String) -> Self {
35240        self.tg_type = tg_type;
35241        self
35242    }
35243    pub fn build(self) -> RevenueWithdrawalStateFailed {
35244        RevenueWithdrawalStateFailed {
35245            tg_type: self.tg_type,
35246        }
35247    }
35248}
35249#[allow(rustdoc::invalid_html_tags)]
35250#[doc = "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc."]
35251#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35252pub struct MessageEntity {
35253    #[allow(rustdoc::invalid_html_tags)]
35254    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
35255    #[serde(rename = "type")]
35256    pub tg_type: String,
35257    #[allow(rustdoc::invalid_html_tags)]
35258    #[doc = "Offset in UTF-16 code units to the start of the entity"]
35259    #[serde(rename = "offset")]
35260    pub offset: i64,
35261    #[allow(rustdoc::invalid_html_tags)]
35262    #[doc = "Length of the entity in UTF-16 code units"]
35263    #[serde(rename = "length")]
35264    pub length: i64,
35265    #[allow(rustdoc::invalid_html_tags)]
35266    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
35267    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
35268    pub url: Option<String>,
35269    #[allow(rustdoc::invalid_html_tags)]
35270    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
35271    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
35272    pub user: Option<BoxWrapper<Unbox<User>>>,
35273    #[allow(rustdoc::invalid_html_tags)]
35274    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
35275    #[serde(skip_serializing_if = "Option::is_none", rename = "language", default)]
35276    pub language: Option<String>,
35277    #[allow(rustdoc::invalid_html_tags)]
35278    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
35279    #[serde(
35280        skip_serializing_if = "Option::is_none",
35281        rename = "custom_emoji_id",
35282        default
35283    )]
35284    pub custom_emoji_id: Option<String>,
35285}
35286#[allow(rustdoc::invalid_html_tags)]
35287#[doc = "Companion type to MessageEntity that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
35288#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35289pub struct NoSkipMessageEntity {
35290    #[allow(rustdoc::invalid_html_tags)]
35291    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
35292    #[serde(rename = "type")]
35293    pub tg_type: String,
35294    #[allow(rustdoc::invalid_html_tags)]
35295    #[doc = "Offset in UTF-16 code units to the start of the entity"]
35296    #[serde(rename = "offset")]
35297    pub offset: i64,
35298    #[allow(rustdoc::invalid_html_tags)]
35299    #[doc = "Length of the entity in UTF-16 code units"]
35300    #[serde(rename = "length")]
35301    pub length: i64,
35302    pub url: Option<String>,
35303    pub user: Option<BoxWrapper<Unbox<User>>>,
35304    pub language: Option<String>,
35305    pub custom_emoji_id: Option<String>,
35306}
35307impl From<NoSkipMessageEntity> for MessageEntity {
35308    fn from(t: NoSkipMessageEntity) -> Self {
35309        Self {
35310            tg_type: t.tg_type,
35311            offset: t.offset,
35312            length: t.length,
35313            url: t.url,
35314            user: t.user,
35315            language: t.language,
35316            custom_emoji_id: t.custom_emoji_id,
35317        }
35318    }
35319}
35320#[allow(clippy::from_over_into)]
35321impl Into<NoSkipMessageEntity> for MessageEntity {
35322    fn into(self) -> NoSkipMessageEntity {
35323        NoSkipMessageEntity {
35324            tg_type: self.tg_type,
35325            offset: self.offset,
35326            length: self.length,
35327            url: self.url,
35328            user: self.user,
35329            language: self.language,
35330            custom_emoji_id: self.custom_emoji_id,
35331        }
35332    }
35333}
35334impl NoSkipMessageEntity {
35335    pub fn skip(self) -> MessageEntity {
35336        self.into()
35337    }
35338}
35339impl MessageEntity {
35340    pub fn noskip(self) -> NoSkipMessageEntity {
35341        self.into()
35342    }
35343}
35344#[allow(rustdoc::invalid_html_tags)]
35345#[doc = "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc."]
35346#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35347pub struct MessageEntityBuilder {
35348    #[allow(rustdoc::invalid_html_tags)]
35349    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
35350    #[serde(rename = "type")]
35351    pub tg_type: String,
35352    #[allow(rustdoc::invalid_html_tags)]
35353    #[doc = "Offset in UTF-16 code units to the start of the entity"]
35354    #[serde(rename = "offset")]
35355    pub offset: i64,
35356    #[allow(rustdoc::invalid_html_tags)]
35357    #[doc = "Length of the entity in UTF-16 code units"]
35358    #[serde(rename = "length")]
35359    pub length: i64,
35360    #[allow(rustdoc::invalid_html_tags)]
35361    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
35362    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
35363    pub url: Option<String>,
35364    #[allow(rustdoc::invalid_html_tags)]
35365    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
35366    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
35367    pub user: Option<BoxWrapper<Unbox<User>>>,
35368    #[allow(rustdoc::invalid_html_tags)]
35369    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
35370    #[serde(skip_serializing_if = "Option::is_none", rename = "language", default)]
35371    pub language: Option<String>,
35372    #[allow(rustdoc::invalid_html_tags)]
35373    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
35374    #[serde(
35375        skip_serializing_if = "Option::is_none",
35376        rename = "custom_emoji_id",
35377        default
35378    )]
35379    pub custom_emoji_id: Option<String>,
35380}
35381impl MessageEntityBuilder {
35382    #[allow(clippy::too_many_arguments)]
35383    pub fn new(offset: i64, length: i64) -> Self {
35384        Self {
35385            tg_type: "MessageEntity".to_owned(),
35386            offset,
35387            length,
35388            url: None,
35389            user: None,
35390            language: None,
35391            custom_emoji_id: None,
35392        }
35393    }
35394    #[allow(rustdoc::invalid_html_tags)]
35395    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
35396    pub fn set_type(mut self, tg_type: String) -> Self {
35397        self.tg_type = tg_type;
35398        self
35399    }
35400    #[allow(rustdoc::invalid_html_tags)]
35401    #[doc = "Offset in UTF-16 code units to the start of the entity"]
35402    pub fn set_offset(mut self, offset: i64) -> Self {
35403        self.offset = offset;
35404        self
35405    }
35406    #[allow(rustdoc::invalid_html_tags)]
35407    #[doc = "Length of the entity in UTF-16 code units"]
35408    pub fn set_length(mut self, length: i64) -> Self {
35409        self.length = length;
35410        self
35411    }
35412    #[allow(rustdoc::invalid_html_tags)]
35413    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
35414    pub fn set_url(mut self, url: String) -> Self {
35415        self.url = Some(url);
35416        self
35417    }
35418    #[allow(rustdoc::invalid_html_tags)]
35419    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
35420    pub fn set_user(mut self, user: User) -> Self {
35421        self.user = Some(BoxWrapper(Unbox(user)));
35422        self
35423    }
35424    #[allow(rustdoc::invalid_html_tags)]
35425    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
35426    pub fn set_language(mut self, language: String) -> Self {
35427        self.language = Some(language);
35428        self
35429    }
35430    #[allow(rustdoc::invalid_html_tags)]
35431    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
35432    pub fn set_custom_emoji_id(mut self, custom_emoji_id: String) -> Self {
35433        self.custom_emoji_id = Some(custom_emoji_id);
35434        self
35435    }
35436    pub fn build(self) -> MessageEntity {
35437        MessageEntity {
35438            tg_type: self.tg_type,
35439            offset: self.offset,
35440            length: self.length,
35441            url: self.url,
35442            user: self.user,
35443            language: self.language,
35444            custom_emoji_id: self.custom_emoji_id,
35445        }
35446    }
35447}
35448#[allow(rustdoc::invalid_html_tags)]
35449#[doc = "This object describes the colors of the backdrop of a unique gift."]
35450#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35451pub struct UniqueGiftBackdropColors {
35452    #[allow(rustdoc::invalid_html_tags)]
35453    #[doc = "The color in the center of the backdrop in RGB format"]
35454    #[serde(rename = "center_color")]
35455    pub center_color: i64,
35456    #[allow(rustdoc::invalid_html_tags)]
35457    #[doc = "The color on the edges of the backdrop in RGB format"]
35458    #[serde(rename = "edge_color")]
35459    pub edge_color: i64,
35460    #[allow(rustdoc::invalid_html_tags)]
35461    #[doc = "The color to be applied to the symbol in RGB format"]
35462    #[serde(rename = "symbol_color")]
35463    pub symbol_color: i64,
35464    #[allow(rustdoc::invalid_html_tags)]
35465    #[doc = "The color for the text on the backdrop in RGB format"]
35466    #[serde(rename = "text_color")]
35467    pub text_color: i64,
35468}
35469#[allow(rustdoc::invalid_html_tags)]
35470#[doc = "Companion type to UniqueGiftBackdropColors that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
35471#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35472pub struct NoSkipUniqueGiftBackdropColors {
35473    #[allow(rustdoc::invalid_html_tags)]
35474    #[doc = "The color in the center of the backdrop in RGB format"]
35475    #[serde(rename = "center_color")]
35476    pub center_color: i64,
35477    #[allow(rustdoc::invalid_html_tags)]
35478    #[doc = "The color on the edges of the backdrop in RGB format"]
35479    #[serde(rename = "edge_color")]
35480    pub edge_color: i64,
35481    #[allow(rustdoc::invalid_html_tags)]
35482    #[doc = "The color to be applied to the symbol in RGB format"]
35483    #[serde(rename = "symbol_color")]
35484    pub symbol_color: i64,
35485    #[allow(rustdoc::invalid_html_tags)]
35486    #[doc = "The color for the text on the backdrop in RGB format"]
35487    #[serde(rename = "text_color")]
35488    pub text_color: i64,
35489}
35490impl From<NoSkipUniqueGiftBackdropColors> for UniqueGiftBackdropColors {
35491    fn from(t: NoSkipUniqueGiftBackdropColors) -> Self {
35492        Self {
35493            center_color: t.center_color,
35494            edge_color: t.edge_color,
35495            symbol_color: t.symbol_color,
35496            text_color: t.text_color,
35497        }
35498    }
35499}
35500#[allow(clippy::from_over_into)]
35501impl Into<NoSkipUniqueGiftBackdropColors> for UniqueGiftBackdropColors {
35502    fn into(self) -> NoSkipUniqueGiftBackdropColors {
35503        NoSkipUniqueGiftBackdropColors {
35504            center_color: self.center_color,
35505            edge_color: self.edge_color,
35506            symbol_color: self.symbol_color,
35507            text_color: self.text_color,
35508        }
35509    }
35510}
35511impl NoSkipUniqueGiftBackdropColors {
35512    pub fn skip(self) -> UniqueGiftBackdropColors {
35513        self.into()
35514    }
35515}
35516impl UniqueGiftBackdropColors {
35517    pub fn noskip(self) -> NoSkipUniqueGiftBackdropColors {
35518        self.into()
35519    }
35520}
35521#[allow(rustdoc::invalid_html_tags)]
35522#[doc = "This object describes the colors of the backdrop of a unique gift."]
35523#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35524pub struct UniqueGiftBackdropColorsBuilder {
35525    #[allow(rustdoc::invalid_html_tags)]
35526    #[doc = "The color in the center of the backdrop in RGB format"]
35527    #[serde(rename = "center_color")]
35528    pub center_color: i64,
35529    #[allow(rustdoc::invalid_html_tags)]
35530    #[doc = "The color on the edges of the backdrop in RGB format"]
35531    #[serde(rename = "edge_color")]
35532    pub edge_color: i64,
35533    #[allow(rustdoc::invalid_html_tags)]
35534    #[doc = "The color to be applied to the symbol in RGB format"]
35535    #[serde(rename = "symbol_color")]
35536    pub symbol_color: i64,
35537    #[allow(rustdoc::invalid_html_tags)]
35538    #[doc = "The color for the text on the backdrop in RGB format"]
35539    #[serde(rename = "text_color")]
35540    pub text_color: i64,
35541}
35542impl UniqueGiftBackdropColorsBuilder {
35543    #[allow(clippy::too_many_arguments)]
35544    pub fn new(center_color: i64, edge_color: i64, symbol_color: i64, text_color: i64) -> Self {
35545        Self {
35546            center_color,
35547            edge_color,
35548            symbol_color,
35549            text_color,
35550        }
35551    }
35552    #[allow(rustdoc::invalid_html_tags)]
35553    #[doc = "The color in the center of the backdrop in RGB format"]
35554    pub fn set_center_color(mut self, center_color: i64) -> Self {
35555        self.center_color = center_color;
35556        self
35557    }
35558    #[allow(rustdoc::invalid_html_tags)]
35559    #[doc = "The color on the edges of the backdrop in RGB format"]
35560    pub fn set_edge_color(mut self, edge_color: i64) -> Self {
35561        self.edge_color = edge_color;
35562        self
35563    }
35564    #[allow(rustdoc::invalid_html_tags)]
35565    #[doc = "The color to be applied to the symbol in RGB format"]
35566    pub fn set_symbol_color(mut self, symbol_color: i64) -> Self {
35567        self.symbol_color = symbol_color;
35568        self
35569    }
35570    #[allow(rustdoc::invalid_html_tags)]
35571    #[doc = "The color for the text on the backdrop in RGB format"]
35572    pub fn set_text_color(mut self, text_color: i64) -> Self {
35573        self.text_color = text_color;
35574        self
35575    }
35576    pub fn build(self) -> UniqueGiftBackdropColors {
35577        UniqueGiftBackdropColors {
35578            center_color: self.center_color,
35579            edge_color: self.edge_color,
35580            symbol_color: self.symbol_color,
35581            text_color: self.text_color,
35582        }
35583    }
35584}
35585#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35586#[serde(untagged)]
35587pub enum InputStoryContent {
35588    InputStoryContentPhoto(InputStoryContentPhoto),
35589    InputStoryContentVideo(InputStoryContentVideo),
35590}
35591impl Default for InputStoryContent {
35592    fn default() -> Self {
35593        InputStoryContent::InputStoryContentPhoto(InputStoryContentPhoto::default())
35594    }
35595}
35596impl InputStoryContent {}
35597#[allow(rustdoc::invalid_html_tags)]
35598#[doc = "Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval."]
35599#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35600pub struct SuggestedPostApprovalFailed {
35601    #[allow(rustdoc::invalid_html_tags)]
35602    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
35603    #[serde(
35604        skip_serializing_if = "Option::is_none",
35605        rename = "suggested_post_message",
35606        default
35607    )]
35608    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
35609    #[allow(rustdoc::invalid_html_tags)]
35610    #[doc = "Expected price of the post"]
35611    #[serde(rename = "price")]
35612    pub price: BoxWrapper<Unbox<SuggestedPostPrice>>,
35613}
35614#[allow(rustdoc::invalid_html_tags)]
35615#[doc = "Companion type to SuggestedPostApprovalFailed that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
35616#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35617pub struct NoSkipSuggestedPostApprovalFailed {
35618    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
35619    #[allow(rustdoc::invalid_html_tags)]
35620    #[doc = "Expected price of the post"]
35621    #[serde(rename = "price")]
35622    pub price: BoxWrapper<Unbox<SuggestedPostPrice>>,
35623}
35624impl From<NoSkipSuggestedPostApprovalFailed> for SuggestedPostApprovalFailed {
35625    fn from(t: NoSkipSuggestedPostApprovalFailed) -> Self {
35626        Self {
35627            suggested_post_message: t.suggested_post_message,
35628            price: t.price,
35629        }
35630    }
35631}
35632#[allow(clippy::from_over_into)]
35633impl Into<NoSkipSuggestedPostApprovalFailed> for SuggestedPostApprovalFailed {
35634    fn into(self) -> NoSkipSuggestedPostApprovalFailed {
35635        NoSkipSuggestedPostApprovalFailed {
35636            suggested_post_message: self.suggested_post_message,
35637            price: self.price,
35638        }
35639    }
35640}
35641impl NoSkipSuggestedPostApprovalFailed {
35642    pub fn skip(self) -> SuggestedPostApprovalFailed {
35643        self.into()
35644    }
35645}
35646impl SuggestedPostApprovalFailed {
35647    pub fn noskip(self) -> NoSkipSuggestedPostApprovalFailed {
35648        self.into()
35649    }
35650}
35651#[allow(rustdoc::invalid_html_tags)]
35652#[doc = "Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval."]
35653#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35654pub struct SuggestedPostApprovalFailedBuilder {
35655    #[allow(rustdoc::invalid_html_tags)]
35656    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
35657    #[serde(
35658        skip_serializing_if = "Option::is_none",
35659        rename = "suggested_post_message",
35660        default
35661    )]
35662    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
35663    #[allow(rustdoc::invalid_html_tags)]
35664    #[doc = "Expected price of the post"]
35665    #[serde(rename = "price")]
35666    pub price: BoxWrapper<Unbox<SuggestedPostPrice>>,
35667}
35668impl SuggestedPostApprovalFailedBuilder {
35669    #[allow(clippy::too_many_arguments)]
35670    pub fn new<A: Into<SuggestedPostPrice>>(price: A) -> Self {
35671        Self {
35672            price: BoxWrapper::new_unbox(price.into()),
35673            suggested_post_message: None,
35674        }
35675    }
35676    #[allow(rustdoc::invalid_html_tags)]
35677    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
35678    pub fn set_suggested_post_message(mut self, suggested_post_message: Box<Message>) -> Self {
35679        self.suggested_post_message = Some(BoxWrapper(suggested_post_message));
35680        self
35681    }
35682    #[allow(rustdoc::invalid_html_tags)]
35683    #[doc = "Expected price of the post"]
35684    pub fn set_price(mut self, price: SuggestedPostPrice) -> Self {
35685        self.price = BoxWrapper(Unbox(price));
35686        self
35687    }
35688    pub fn build(self) -> SuggestedPostApprovalFailed {
35689        SuggestedPostApprovalFailed {
35690            suggested_post_message: self.suggested_post_message,
35691            price: self.price,
35692        }
35693    }
35694}
35695#[allow(rustdoc::invalid_html_tags)]
35696#[doc = "This object represents a general file (as opposed to photos, voice messages and audio files)."]
35697#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35698pub struct Document {
35699    #[allow(rustdoc::invalid_html_tags)]
35700    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
35701    #[serde(rename = "file_id")]
35702    pub file_id: String,
35703    #[allow(rustdoc::invalid_html_tags)]
35704    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
35705    #[serde(rename = "file_unique_id")]
35706    pub file_unique_id: String,
35707    #[allow(rustdoc::invalid_html_tags)]
35708    #[doc = "Optional. Document thumbnail as defined by the sender"]
35709    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
35710    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
35711    #[allow(rustdoc::invalid_html_tags)]
35712    #[doc = "Optional. Original filename as defined by the sender"]
35713    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
35714    pub file_name: Option<String>,
35715    #[allow(rustdoc::invalid_html_tags)]
35716    #[doc = "Optional. MIME type of the file as defined by the sender"]
35717    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
35718    pub mime_type: Option<String>,
35719    #[allow(rustdoc::invalid_html_tags)]
35720    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
35721    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
35722    pub file_size: Option<i64>,
35723}
35724#[allow(rustdoc::invalid_html_tags)]
35725#[doc = "Companion type to Document that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
35726#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35727pub struct NoSkipDocument {
35728    #[allow(rustdoc::invalid_html_tags)]
35729    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
35730    #[serde(rename = "file_id")]
35731    pub file_id: String,
35732    #[allow(rustdoc::invalid_html_tags)]
35733    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
35734    #[serde(rename = "file_unique_id")]
35735    pub file_unique_id: String,
35736    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
35737    pub file_name: Option<String>,
35738    pub mime_type: Option<String>,
35739    pub file_size: Option<i64>,
35740}
35741impl From<NoSkipDocument> for Document {
35742    fn from(t: NoSkipDocument) -> Self {
35743        Self {
35744            file_id: t.file_id,
35745            file_unique_id: t.file_unique_id,
35746            thumbnail: t.thumbnail,
35747            file_name: t.file_name,
35748            mime_type: t.mime_type,
35749            file_size: t.file_size,
35750        }
35751    }
35752}
35753#[allow(clippy::from_over_into)]
35754impl Into<NoSkipDocument> for Document {
35755    fn into(self) -> NoSkipDocument {
35756        NoSkipDocument {
35757            file_id: self.file_id,
35758            file_unique_id: self.file_unique_id,
35759            thumbnail: self.thumbnail,
35760            file_name: self.file_name,
35761            mime_type: self.mime_type,
35762            file_size: self.file_size,
35763        }
35764    }
35765}
35766impl NoSkipDocument {
35767    pub fn skip(self) -> Document {
35768        self.into()
35769    }
35770}
35771impl Document {
35772    pub fn noskip(self) -> NoSkipDocument {
35773        self.into()
35774    }
35775}
35776#[allow(rustdoc::invalid_html_tags)]
35777#[doc = "This object represents a general file (as opposed to photos, voice messages and audio files)."]
35778#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35779pub struct DocumentBuilder {
35780    #[allow(rustdoc::invalid_html_tags)]
35781    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
35782    #[serde(rename = "file_id")]
35783    pub file_id: String,
35784    #[allow(rustdoc::invalid_html_tags)]
35785    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
35786    #[serde(rename = "file_unique_id")]
35787    pub file_unique_id: String,
35788    #[allow(rustdoc::invalid_html_tags)]
35789    #[doc = "Optional. Document thumbnail as defined by the sender"]
35790    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
35791    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
35792    #[allow(rustdoc::invalid_html_tags)]
35793    #[doc = "Optional. Original filename as defined by the sender"]
35794    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
35795    pub file_name: Option<String>,
35796    #[allow(rustdoc::invalid_html_tags)]
35797    #[doc = "Optional. MIME type of the file as defined by the sender"]
35798    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
35799    pub mime_type: Option<String>,
35800    #[allow(rustdoc::invalid_html_tags)]
35801    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
35802    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
35803    pub file_size: Option<i64>,
35804}
35805impl DocumentBuilder {
35806    #[allow(clippy::too_many_arguments)]
35807    pub fn new(file_id: String, file_unique_id: String) -> Self {
35808        Self {
35809            file_id,
35810            file_unique_id,
35811            thumbnail: None,
35812            file_name: None,
35813            mime_type: None,
35814            file_size: None,
35815        }
35816    }
35817    #[allow(rustdoc::invalid_html_tags)]
35818    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
35819    pub fn set_file_id(mut self, file_id: String) -> Self {
35820        self.file_id = file_id;
35821        self
35822    }
35823    #[allow(rustdoc::invalid_html_tags)]
35824    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
35825    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
35826        self.file_unique_id = file_unique_id;
35827        self
35828    }
35829    #[allow(rustdoc::invalid_html_tags)]
35830    #[doc = "Optional. Document thumbnail as defined by the sender"]
35831    pub fn set_thumbnail(mut self, thumbnail: PhotoSize) -> Self {
35832        self.thumbnail = Some(BoxWrapper(Unbox(thumbnail)));
35833        self
35834    }
35835    #[allow(rustdoc::invalid_html_tags)]
35836    #[doc = "Optional. Original filename as defined by the sender"]
35837    pub fn set_file_name(mut self, file_name: String) -> Self {
35838        self.file_name = Some(file_name);
35839        self
35840    }
35841    #[allow(rustdoc::invalid_html_tags)]
35842    #[doc = "Optional. MIME type of the file as defined by the sender"]
35843    pub fn set_mime_type(mut self, mime_type: String) -> Self {
35844        self.mime_type = Some(mime_type);
35845        self
35846    }
35847    #[allow(rustdoc::invalid_html_tags)]
35848    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
35849    pub fn set_file_size(mut self, file_size: i64) -> Self {
35850        self.file_size = Some(file_size);
35851        self
35852    }
35853    pub fn build(self) -> Document {
35854        Document {
35855            file_id: self.file_id,
35856            file_unique_id: self.file_unique_id,
35857            thumbnail: self.thumbnail,
35858            file_name: self.file_name,
35859            mime_type: self.mime_type,
35860            file_size: self.file_size,
35861        }
35862    }
35863}
35864#[allow(rustdoc::invalid_html_tags)]
35865#[doc = "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button."]
35866#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35867pub struct SharedUser {
35868    #[allow(rustdoc::invalid_html_tags)]
35869    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
35870    #[serde(rename = "user_id")]
35871    pub user_id: i64,
35872    #[allow(rustdoc::invalid_html_tags)]
35873    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
35874    #[serde(
35875        skip_serializing_if = "Option::is_none",
35876        rename = "first_name",
35877        default
35878    )]
35879    pub first_name: Option<String>,
35880    #[allow(rustdoc::invalid_html_tags)]
35881    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
35882    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
35883    pub last_name: Option<String>,
35884    #[allow(rustdoc::invalid_html_tags)]
35885    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
35886    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
35887    pub username: Option<String>,
35888    #[allow(rustdoc::invalid_html_tags)]
35889    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
35890    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
35891    pub photo: Option<Vec<PhotoSize>>,
35892}
35893#[allow(rustdoc::invalid_html_tags)]
35894#[doc = "Companion type to SharedUser that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
35895#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35896pub struct NoSkipSharedUser {
35897    #[allow(rustdoc::invalid_html_tags)]
35898    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
35899    #[serde(rename = "user_id")]
35900    pub user_id: i64,
35901    pub first_name: Option<String>,
35902    pub last_name: Option<String>,
35903    pub username: Option<String>,
35904    pub photo: Option<Vec<PhotoSize>>,
35905}
35906impl From<NoSkipSharedUser> for SharedUser {
35907    fn from(t: NoSkipSharedUser) -> Self {
35908        Self {
35909            user_id: t.user_id,
35910            first_name: t.first_name,
35911            last_name: t.last_name,
35912            username: t.username,
35913            photo: t.photo,
35914        }
35915    }
35916}
35917#[allow(clippy::from_over_into)]
35918impl Into<NoSkipSharedUser> for SharedUser {
35919    fn into(self) -> NoSkipSharedUser {
35920        NoSkipSharedUser {
35921            user_id: self.user_id,
35922            first_name: self.first_name,
35923            last_name: self.last_name,
35924            username: self.username,
35925            photo: self.photo,
35926        }
35927    }
35928}
35929impl NoSkipSharedUser {
35930    pub fn skip(self) -> SharedUser {
35931        self.into()
35932    }
35933}
35934impl SharedUser {
35935    pub fn noskip(self) -> NoSkipSharedUser {
35936        self.into()
35937    }
35938}
35939#[allow(rustdoc::invalid_html_tags)]
35940#[doc = "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button."]
35941#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
35942pub struct SharedUserBuilder {
35943    #[allow(rustdoc::invalid_html_tags)]
35944    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
35945    #[serde(rename = "user_id")]
35946    pub user_id: i64,
35947    #[allow(rustdoc::invalid_html_tags)]
35948    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
35949    #[serde(
35950        skip_serializing_if = "Option::is_none",
35951        rename = "first_name",
35952        default
35953    )]
35954    pub first_name: Option<String>,
35955    #[allow(rustdoc::invalid_html_tags)]
35956    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
35957    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
35958    pub last_name: Option<String>,
35959    #[allow(rustdoc::invalid_html_tags)]
35960    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
35961    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
35962    pub username: Option<String>,
35963    #[allow(rustdoc::invalid_html_tags)]
35964    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
35965    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
35966    pub photo: Option<Vec<PhotoSize>>,
35967}
35968impl SharedUserBuilder {
35969    #[allow(clippy::too_many_arguments)]
35970    pub fn new(user_id: i64) -> Self {
35971        Self {
35972            user_id,
35973            first_name: None,
35974            last_name: None,
35975            username: None,
35976            photo: None,
35977        }
35978    }
35979    #[allow(rustdoc::invalid_html_tags)]
35980    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
35981    pub fn set_user_id(mut self, user_id: i64) -> Self {
35982        self.user_id = user_id;
35983        self
35984    }
35985    #[allow(rustdoc::invalid_html_tags)]
35986    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
35987    pub fn set_first_name(mut self, first_name: String) -> Self {
35988        self.first_name = Some(first_name);
35989        self
35990    }
35991    #[allow(rustdoc::invalid_html_tags)]
35992    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
35993    pub fn set_last_name(mut self, last_name: String) -> Self {
35994        self.last_name = Some(last_name);
35995        self
35996    }
35997    #[allow(rustdoc::invalid_html_tags)]
35998    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
35999    pub fn set_username(mut self, username: String) -> Self {
36000        self.username = Some(username);
36001        self
36002    }
36003    #[allow(rustdoc::invalid_html_tags)]
36004    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
36005    pub fn set_photo(mut self, photo: Vec<PhotoSize>) -> Self {
36006        self.photo = Some(photo);
36007        self
36008    }
36009    pub fn build(self) -> SharedUser {
36010        SharedUser {
36011            user_id: self.user_id,
36012            first_name: self.first_name,
36013            last_name: self.last_name,
36014            username: self.username,
36015            photo: self.photo,
36016        }
36017    }
36018}
36019#[allow(rustdoc::invalid_html_tags)]
36020#[doc = "Describes a service message about a unique gift that was sent or received."]
36021#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36022pub struct UniqueGiftInfo {
36023    #[allow(rustdoc::invalid_html_tags)]
36024    #[doc = "Information about the gift"]
36025    #[serde(rename = "gift")]
36026    pub gift: BoxWrapper<Box<UniqueGift>>,
36027    #[allow(rustdoc::invalid_html_tags)]
36028    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
36029    #[serde(rename = "origin")]
36030    pub origin: String,
36031    #[allow(rustdoc::invalid_html_tags)]
36032    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
36033    #[serde(
36034        skip_serializing_if = "Option::is_none",
36035        rename = "last_resale_star_count",
36036        default
36037    )]
36038    pub last_resale_star_count: Option<i64>,
36039    #[allow(rustdoc::invalid_html_tags)]
36040    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
36041    #[serde(
36042        skip_serializing_if = "Option::is_none",
36043        rename = "owned_gift_id",
36044        default
36045    )]
36046    pub owned_gift_id: Option<String>,
36047    #[allow(rustdoc::invalid_html_tags)]
36048    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
36049    #[serde(
36050        skip_serializing_if = "Option::is_none",
36051        rename = "transfer_star_count",
36052        default
36053    )]
36054    pub transfer_star_count: Option<i64>,
36055    #[allow(rustdoc::invalid_html_tags)]
36056    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
36057    #[serde(
36058        skip_serializing_if = "Option::is_none",
36059        rename = "next_transfer_date",
36060        default
36061    )]
36062    pub next_transfer_date: Option<i64>,
36063}
36064#[allow(rustdoc::invalid_html_tags)]
36065#[doc = "Companion type to UniqueGiftInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
36066#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36067pub struct NoSkipUniqueGiftInfo {
36068    #[allow(rustdoc::invalid_html_tags)]
36069    #[doc = "Information about the gift"]
36070    #[serde(rename = "gift")]
36071    pub gift: BoxWrapper<Box<UniqueGift>>,
36072    #[allow(rustdoc::invalid_html_tags)]
36073    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
36074    #[serde(rename = "origin")]
36075    pub origin: String,
36076    pub last_resale_star_count: Option<i64>,
36077    pub owned_gift_id: Option<String>,
36078    pub transfer_star_count: Option<i64>,
36079    pub next_transfer_date: Option<i64>,
36080}
36081impl From<NoSkipUniqueGiftInfo> for UniqueGiftInfo {
36082    fn from(t: NoSkipUniqueGiftInfo) -> Self {
36083        Self {
36084            gift: t.gift,
36085            origin: t.origin,
36086            last_resale_star_count: t.last_resale_star_count,
36087            owned_gift_id: t.owned_gift_id,
36088            transfer_star_count: t.transfer_star_count,
36089            next_transfer_date: t.next_transfer_date,
36090        }
36091    }
36092}
36093#[allow(clippy::from_over_into)]
36094impl Into<NoSkipUniqueGiftInfo> for UniqueGiftInfo {
36095    fn into(self) -> NoSkipUniqueGiftInfo {
36096        NoSkipUniqueGiftInfo {
36097            gift: self.gift,
36098            origin: self.origin,
36099            last_resale_star_count: self.last_resale_star_count,
36100            owned_gift_id: self.owned_gift_id,
36101            transfer_star_count: self.transfer_star_count,
36102            next_transfer_date: self.next_transfer_date,
36103        }
36104    }
36105}
36106impl NoSkipUniqueGiftInfo {
36107    pub fn skip(self) -> UniqueGiftInfo {
36108        self.into()
36109    }
36110}
36111impl UniqueGiftInfo {
36112    pub fn noskip(self) -> NoSkipUniqueGiftInfo {
36113        self.into()
36114    }
36115}
36116#[allow(rustdoc::invalid_html_tags)]
36117#[doc = "Describes a service message about a unique gift that was sent or received."]
36118#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36119pub struct UniqueGiftInfoBuilder {
36120    #[allow(rustdoc::invalid_html_tags)]
36121    #[doc = "Information about the gift"]
36122    #[serde(rename = "gift")]
36123    pub gift: BoxWrapper<Box<UniqueGift>>,
36124    #[allow(rustdoc::invalid_html_tags)]
36125    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
36126    #[serde(rename = "origin")]
36127    pub origin: String,
36128    #[allow(rustdoc::invalid_html_tags)]
36129    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
36130    #[serde(
36131        skip_serializing_if = "Option::is_none",
36132        rename = "last_resale_star_count",
36133        default
36134    )]
36135    pub last_resale_star_count: Option<i64>,
36136    #[allow(rustdoc::invalid_html_tags)]
36137    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
36138    #[serde(
36139        skip_serializing_if = "Option::is_none",
36140        rename = "owned_gift_id",
36141        default
36142    )]
36143    pub owned_gift_id: Option<String>,
36144    #[allow(rustdoc::invalid_html_tags)]
36145    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
36146    #[serde(
36147        skip_serializing_if = "Option::is_none",
36148        rename = "transfer_star_count",
36149        default
36150    )]
36151    pub transfer_star_count: Option<i64>,
36152    #[allow(rustdoc::invalid_html_tags)]
36153    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
36154    #[serde(
36155        skip_serializing_if = "Option::is_none",
36156        rename = "next_transfer_date",
36157        default
36158    )]
36159    pub next_transfer_date: Option<i64>,
36160}
36161impl UniqueGiftInfoBuilder {
36162    #[allow(clippy::too_many_arguments)]
36163    pub fn new<A: Into<Box<UniqueGift>>>(gift: A, origin: String) -> Self {
36164        Self {
36165            gift: BoxWrapper(gift.into()),
36166            origin,
36167            last_resale_star_count: None,
36168            owned_gift_id: None,
36169            transfer_star_count: None,
36170            next_transfer_date: None,
36171        }
36172    }
36173    #[allow(rustdoc::invalid_html_tags)]
36174    #[doc = "Information about the gift"]
36175    pub fn set_gift(mut self, gift: Box<UniqueGift>) -> Self {
36176        self.gift = BoxWrapper(gift);
36177        self
36178    }
36179    #[allow(rustdoc::invalid_html_tags)]
36180    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
36181    pub fn set_origin(mut self, origin: String) -> Self {
36182        self.origin = origin;
36183        self
36184    }
36185    #[allow(rustdoc::invalid_html_tags)]
36186    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
36187    pub fn set_last_resale_star_count(mut self, last_resale_star_count: i64) -> Self {
36188        self.last_resale_star_count = Some(last_resale_star_count);
36189        self
36190    }
36191    #[allow(rustdoc::invalid_html_tags)]
36192    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
36193    pub fn set_owned_gift_id(mut self, owned_gift_id: String) -> Self {
36194        self.owned_gift_id = Some(owned_gift_id);
36195        self
36196    }
36197    #[allow(rustdoc::invalid_html_tags)]
36198    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
36199    pub fn set_transfer_star_count(mut self, transfer_star_count: i64) -> Self {
36200        self.transfer_star_count = Some(transfer_star_count);
36201        self
36202    }
36203    #[allow(rustdoc::invalid_html_tags)]
36204    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
36205    pub fn set_next_transfer_date(mut self, next_transfer_date: i64) -> Self {
36206        self.next_transfer_date = Some(next_transfer_date);
36207        self
36208    }
36209    pub fn build(self) -> UniqueGiftInfo {
36210        UniqueGiftInfo {
36211            gift: self.gift,
36212            origin: self.origin,
36213            last_resale_star_count: self.last_resale_star_count,
36214            owned_gift_id: self.owned_gift_id,
36215            transfer_star_count: self.transfer_star_count,
36216            next_transfer_date: self.next_transfer_date,
36217        }
36218    }
36219}
36220#[allow(rustdoc::invalid_html_tags)]
36221#[doc = "This object contains information about an incoming shipping query."]
36222#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36223pub struct ShippingQuery {
36224    #[allow(rustdoc::invalid_html_tags)]
36225    #[doc = "Unique query identifier"]
36226    #[serde(rename = "id")]
36227    pub id: String,
36228    #[allow(rustdoc::invalid_html_tags)]
36229    #[doc = "User who sent the query"]
36230    #[serde(rename = "from")]
36231    pub from: BoxWrapper<Unbox<User>>,
36232    #[allow(rustdoc::invalid_html_tags)]
36233    #[doc = "Bot-specified invoice payload"]
36234    #[serde(rename = "invoice_payload")]
36235    pub invoice_payload: String,
36236    #[allow(rustdoc::invalid_html_tags)]
36237    #[doc = "User specified shipping address"]
36238    #[serde(rename = "shipping_address")]
36239    pub shipping_address: BoxWrapper<Unbox<ShippingAddress>>,
36240}
36241#[allow(rustdoc::invalid_html_tags)]
36242#[doc = "Companion type to ShippingQuery that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
36243#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36244pub struct NoSkipShippingQuery {
36245    #[allow(rustdoc::invalid_html_tags)]
36246    #[doc = "Unique query identifier"]
36247    #[serde(rename = "id")]
36248    pub id: String,
36249    #[allow(rustdoc::invalid_html_tags)]
36250    #[doc = "User who sent the query"]
36251    #[serde(rename = "from")]
36252    pub from: BoxWrapper<Unbox<User>>,
36253    #[allow(rustdoc::invalid_html_tags)]
36254    #[doc = "Bot-specified invoice payload"]
36255    #[serde(rename = "invoice_payload")]
36256    pub invoice_payload: String,
36257    #[allow(rustdoc::invalid_html_tags)]
36258    #[doc = "User specified shipping address"]
36259    #[serde(rename = "shipping_address")]
36260    pub shipping_address: BoxWrapper<Unbox<ShippingAddress>>,
36261}
36262impl From<NoSkipShippingQuery> for ShippingQuery {
36263    fn from(t: NoSkipShippingQuery) -> Self {
36264        Self {
36265            id: t.id,
36266            from: t.from,
36267            invoice_payload: t.invoice_payload,
36268            shipping_address: t.shipping_address,
36269        }
36270    }
36271}
36272#[allow(clippy::from_over_into)]
36273impl Into<NoSkipShippingQuery> for ShippingQuery {
36274    fn into(self) -> NoSkipShippingQuery {
36275        NoSkipShippingQuery {
36276            id: self.id,
36277            from: self.from,
36278            invoice_payload: self.invoice_payload,
36279            shipping_address: self.shipping_address,
36280        }
36281    }
36282}
36283impl NoSkipShippingQuery {
36284    pub fn skip(self) -> ShippingQuery {
36285        self.into()
36286    }
36287}
36288impl ShippingQuery {
36289    pub fn noskip(self) -> NoSkipShippingQuery {
36290        self.into()
36291    }
36292}
36293#[allow(rustdoc::invalid_html_tags)]
36294#[doc = "This object contains information about an incoming shipping query."]
36295#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36296pub struct ShippingQueryBuilder {
36297    #[allow(rustdoc::invalid_html_tags)]
36298    #[doc = "Unique query identifier"]
36299    #[serde(rename = "id")]
36300    pub id: String,
36301    #[allow(rustdoc::invalid_html_tags)]
36302    #[doc = "User who sent the query"]
36303    #[serde(rename = "from")]
36304    pub from: BoxWrapper<Unbox<User>>,
36305    #[allow(rustdoc::invalid_html_tags)]
36306    #[doc = "Bot-specified invoice payload"]
36307    #[serde(rename = "invoice_payload")]
36308    pub invoice_payload: String,
36309    #[allow(rustdoc::invalid_html_tags)]
36310    #[doc = "User specified shipping address"]
36311    #[serde(rename = "shipping_address")]
36312    pub shipping_address: BoxWrapper<Unbox<ShippingAddress>>,
36313}
36314impl ShippingQueryBuilder {
36315    #[allow(clippy::too_many_arguments)]
36316    pub fn new<A: Into<User>, B: Into<ShippingAddress>>(
36317        id: String,
36318        from: A,
36319        invoice_payload: String,
36320        shipping_address: B,
36321    ) -> Self {
36322        Self {
36323            id,
36324            from: BoxWrapper::new_unbox(from.into()),
36325            invoice_payload,
36326            shipping_address: BoxWrapper::new_unbox(shipping_address.into()),
36327        }
36328    }
36329    #[allow(rustdoc::invalid_html_tags)]
36330    #[doc = "Unique query identifier"]
36331    pub fn set_id(mut self, id: String) -> Self {
36332        self.id = id;
36333        self
36334    }
36335    #[allow(rustdoc::invalid_html_tags)]
36336    #[doc = "User who sent the query"]
36337    pub fn set_from(mut self, from: User) -> Self {
36338        self.from = BoxWrapper(Unbox(from));
36339        self
36340    }
36341    #[allow(rustdoc::invalid_html_tags)]
36342    #[doc = "Bot-specified invoice payload"]
36343    pub fn set_invoice_payload(mut self, invoice_payload: String) -> Self {
36344        self.invoice_payload = invoice_payload;
36345        self
36346    }
36347    #[allow(rustdoc::invalid_html_tags)]
36348    #[doc = "User specified shipping address"]
36349    pub fn set_shipping_address(mut self, shipping_address: ShippingAddress) -> Self {
36350        self.shipping_address = BoxWrapper(Unbox(shipping_address));
36351        self
36352    }
36353    pub fn build(self) -> ShippingQuery {
36354        ShippingQuery {
36355            id: self.id,
36356            from: self.from,
36357            invoice_payload: self.invoice_payload,
36358            shipping_address: self.shipping_address,
36359        }
36360    }
36361}
36362#[allow(rustdoc::invalid_html_tags)]
36363#[doc = "Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video."]
36364#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36365pub struct InlineQueryResultVideo {
36366    #[allow(rustdoc::invalid_html_tags)]
36367    #[doc = "Type of the result, must be video"]
36368    #[serde(rename = "type")]
36369    pub tg_type: String,
36370    #[allow(rustdoc::invalid_html_tags)]
36371    #[doc = "Unique identifier for this result, 1-64 bytes"]
36372    #[serde(rename = "id")]
36373    pub id: String,
36374    #[allow(rustdoc::invalid_html_tags)]
36375    #[doc = "A valid URL for the embedded video player or video file"]
36376    #[serde(rename = "video_url")]
36377    pub video_url: String,
36378    #[allow(rustdoc::invalid_html_tags)]
36379    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
36380    #[serde(rename = "mime_type")]
36381    pub mime_type: String,
36382    #[allow(rustdoc::invalid_html_tags)]
36383    #[doc = "URL of the thumbnail (JPEG only) for the video"]
36384    #[serde(rename = "thumbnail_url")]
36385    pub thumbnail_url: String,
36386    #[allow(rustdoc::invalid_html_tags)]
36387    #[doc = "Title for the result"]
36388    #[serde(rename = "title")]
36389    pub title: String,
36390    #[allow(rustdoc::invalid_html_tags)]
36391    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
36392    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
36393    pub caption: Option<String>,
36394    #[allow(rustdoc::invalid_html_tags)]
36395    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
36396    #[serde(
36397        skip_serializing_if = "Option::is_none",
36398        rename = "parse_mode",
36399        default
36400    )]
36401    pub parse_mode: Option<String>,
36402    #[allow(rustdoc::invalid_html_tags)]
36403    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
36404    #[serde(
36405        skip_serializing_if = "Option::is_none",
36406        rename = "caption_entities",
36407        default
36408    )]
36409    pub caption_entities: Option<Vec<MessageEntity>>,
36410    #[allow(rustdoc::invalid_html_tags)]
36411    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
36412    #[serde(
36413        skip_serializing_if = "Option::is_none",
36414        rename = "show_caption_above_media",
36415        default
36416    )]
36417    pub show_caption_above_media: Option<bool>,
36418    #[allow(rustdoc::invalid_html_tags)]
36419    #[doc = "Optional. Video width"]
36420    #[serde(
36421        skip_serializing_if = "Option::is_none",
36422        rename = "video_width",
36423        default
36424    )]
36425    pub video_width: Option<i64>,
36426    #[allow(rustdoc::invalid_html_tags)]
36427    #[doc = "Optional. Video height"]
36428    #[serde(
36429        skip_serializing_if = "Option::is_none",
36430        rename = "video_height",
36431        default
36432    )]
36433    pub video_height: Option<i64>,
36434    #[allow(rustdoc::invalid_html_tags)]
36435    #[doc = "Optional. Video duration in seconds"]
36436    #[serde(
36437        skip_serializing_if = "Option::is_none",
36438        rename = "video_duration",
36439        default
36440    )]
36441    pub video_duration: Option<i64>,
36442    #[allow(rustdoc::invalid_html_tags)]
36443    #[doc = "Optional. Short description of the result"]
36444    #[serde(
36445        skip_serializing_if = "Option::is_none",
36446        rename = "description",
36447        default
36448    )]
36449    pub description: Option<String>,
36450    #[allow(rustdoc::invalid_html_tags)]
36451    #[doc = "Optional. Inline keyboard attached to the message"]
36452    #[serde(
36453        skip_serializing_if = "Option::is_none",
36454        rename = "reply_markup",
36455        default
36456    )]
36457    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
36458    #[allow(rustdoc::invalid_html_tags)]
36459    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
36460    #[serde(
36461        skip_serializing_if = "Option::is_none",
36462        rename = "input_message_content",
36463        default
36464    )]
36465    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
36466}
36467#[allow(rustdoc::invalid_html_tags)]
36468#[doc = "Companion type to InlineQueryResultVideo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
36469#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36470pub struct NoSkipInlineQueryResultVideo {
36471    #[allow(rustdoc::invalid_html_tags)]
36472    #[doc = "Type of the result, must be video"]
36473    #[serde(rename = "type")]
36474    pub tg_type: String,
36475    #[allow(rustdoc::invalid_html_tags)]
36476    #[doc = "Unique identifier for this result, 1-64 bytes"]
36477    #[serde(rename = "id")]
36478    pub id: String,
36479    #[allow(rustdoc::invalid_html_tags)]
36480    #[doc = "A valid URL for the embedded video player or video file"]
36481    #[serde(rename = "video_url")]
36482    pub video_url: String,
36483    #[allow(rustdoc::invalid_html_tags)]
36484    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
36485    #[serde(rename = "mime_type")]
36486    pub mime_type: String,
36487    #[allow(rustdoc::invalid_html_tags)]
36488    #[doc = "URL of the thumbnail (JPEG only) for the video"]
36489    #[serde(rename = "thumbnail_url")]
36490    pub thumbnail_url: String,
36491    #[allow(rustdoc::invalid_html_tags)]
36492    #[doc = "Title for the result"]
36493    #[serde(rename = "title")]
36494    pub title: String,
36495    pub caption: Option<String>,
36496    pub parse_mode: Option<String>,
36497    pub caption_entities: Option<Vec<MessageEntity>>,
36498    pub show_caption_above_media: Option<bool>,
36499    pub video_width: Option<i64>,
36500    pub video_height: Option<i64>,
36501    pub video_duration: Option<i64>,
36502    pub description: Option<String>,
36503    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
36504    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
36505}
36506impl From<NoSkipInlineQueryResultVideo> for InlineQueryResultVideo {
36507    fn from(t: NoSkipInlineQueryResultVideo) -> Self {
36508        Self {
36509            tg_type: t.tg_type,
36510            id: t.id,
36511            video_url: t.video_url,
36512            mime_type: t.mime_type,
36513            thumbnail_url: t.thumbnail_url,
36514            title: t.title,
36515            caption: t.caption,
36516            parse_mode: t.parse_mode,
36517            caption_entities: t.caption_entities,
36518            show_caption_above_media: t.show_caption_above_media,
36519            video_width: t.video_width,
36520            video_height: t.video_height,
36521            video_duration: t.video_duration,
36522            description: t.description,
36523            reply_markup: t.reply_markup,
36524            input_message_content: t.input_message_content,
36525        }
36526    }
36527}
36528#[allow(clippy::from_over_into)]
36529impl Into<NoSkipInlineQueryResultVideo> for InlineQueryResultVideo {
36530    fn into(self) -> NoSkipInlineQueryResultVideo {
36531        NoSkipInlineQueryResultVideo {
36532            tg_type: self.tg_type,
36533            id: self.id,
36534            video_url: self.video_url,
36535            mime_type: self.mime_type,
36536            thumbnail_url: self.thumbnail_url,
36537            title: self.title,
36538            caption: self.caption,
36539            parse_mode: self.parse_mode,
36540            caption_entities: self.caption_entities,
36541            show_caption_above_media: self.show_caption_above_media,
36542            video_width: self.video_width,
36543            video_height: self.video_height,
36544            video_duration: self.video_duration,
36545            description: self.description,
36546            reply_markup: self.reply_markup,
36547            input_message_content: self.input_message_content,
36548        }
36549    }
36550}
36551impl NoSkipInlineQueryResultVideo {
36552    pub fn skip(self) -> InlineQueryResultVideo {
36553        self.into()
36554    }
36555}
36556impl InlineQueryResultVideo {
36557    pub fn noskip(self) -> NoSkipInlineQueryResultVideo {
36558        self.into()
36559    }
36560}
36561#[allow(rustdoc::invalid_html_tags)]
36562#[doc = "Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video."]
36563#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36564pub struct InlineQueryResultVideoBuilder {
36565    #[allow(rustdoc::invalid_html_tags)]
36566    #[doc = "Type of the result, must be video"]
36567    #[serde(rename = "type")]
36568    pub tg_type: String,
36569    #[allow(rustdoc::invalid_html_tags)]
36570    #[doc = "Unique identifier for this result, 1-64 bytes"]
36571    #[serde(rename = "id")]
36572    pub id: String,
36573    #[allow(rustdoc::invalid_html_tags)]
36574    #[doc = "A valid URL for the embedded video player or video file"]
36575    #[serde(rename = "video_url")]
36576    pub video_url: String,
36577    #[allow(rustdoc::invalid_html_tags)]
36578    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
36579    #[serde(rename = "mime_type")]
36580    pub mime_type: String,
36581    #[allow(rustdoc::invalid_html_tags)]
36582    #[doc = "URL of the thumbnail (JPEG only) for the video"]
36583    #[serde(rename = "thumbnail_url")]
36584    pub thumbnail_url: String,
36585    #[allow(rustdoc::invalid_html_tags)]
36586    #[doc = "Title for the result"]
36587    #[serde(rename = "title")]
36588    pub title: String,
36589    #[allow(rustdoc::invalid_html_tags)]
36590    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
36591    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
36592    pub caption: Option<String>,
36593    #[allow(rustdoc::invalid_html_tags)]
36594    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
36595    #[serde(
36596        skip_serializing_if = "Option::is_none",
36597        rename = "parse_mode",
36598        default
36599    )]
36600    pub parse_mode: Option<String>,
36601    #[allow(rustdoc::invalid_html_tags)]
36602    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
36603    #[serde(
36604        skip_serializing_if = "Option::is_none",
36605        rename = "caption_entities",
36606        default
36607    )]
36608    pub caption_entities: Option<Vec<MessageEntity>>,
36609    #[allow(rustdoc::invalid_html_tags)]
36610    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
36611    #[serde(
36612        skip_serializing_if = "Option::is_none",
36613        rename = "show_caption_above_media",
36614        default
36615    )]
36616    pub show_caption_above_media: Option<bool>,
36617    #[allow(rustdoc::invalid_html_tags)]
36618    #[doc = "Optional. Video width"]
36619    #[serde(
36620        skip_serializing_if = "Option::is_none",
36621        rename = "video_width",
36622        default
36623    )]
36624    pub video_width: Option<i64>,
36625    #[allow(rustdoc::invalid_html_tags)]
36626    #[doc = "Optional. Video height"]
36627    #[serde(
36628        skip_serializing_if = "Option::is_none",
36629        rename = "video_height",
36630        default
36631    )]
36632    pub video_height: Option<i64>,
36633    #[allow(rustdoc::invalid_html_tags)]
36634    #[doc = "Optional. Video duration in seconds"]
36635    #[serde(
36636        skip_serializing_if = "Option::is_none",
36637        rename = "video_duration",
36638        default
36639    )]
36640    pub video_duration: Option<i64>,
36641    #[allow(rustdoc::invalid_html_tags)]
36642    #[doc = "Optional. Short description of the result"]
36643    #[serde(
36644        skip_serializing_if = "Option::is_none",
36645        rename = "description",
36646        default
36647    )]
36648    pub description: Option<String>,
36649    #[allow(rustdoc::invalid_html_tags)]
36650    #[doc = "Optional. Inline keyboard attached to the message"]
36651    #[serde(
36652        skip_serializing_if = "Option::is_none",
36653        rename = "reply_markup",
36654        default
36655    )]
36656    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
36657    #[allow(rustdoc::invalid_html_tags)]
36658    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
36659    #[serde(
36660        skip_serializing_if = "Option::is_none",
36661        rename = "input_message_content",
36662        default
36663    )]
36664    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
36665}
36666impl InlineQueryResultVideoBuilder {
36667    #[allow(clippy::too_many_arguments)]
36668    pub fn new(
36669        id: String,
36670        video_url: String,
36671        mime_type: String,
36672        thumbnail_url: String,
36673        title: String,
36674    ) -> Self {
36675        Self {
36676            tg_type: "video".to_owned(),
36677            id,
36678            video_url,
36679            mime_type,
36680            thumbnail_url,
36681            title,
36682            caption: None,
36683            parse_mode: None,
36684            caption_entities: None,
36685            show_caption_above_media: None,
36686            video_width: None,
36687            video_height: None,
36688            video_duration: None,
36689            description: None,
36690            reply_markup: None,
36691            input_message_content: None,
36692        }
36693    }
36694    #[allow(rustdoc::invalid_html_tags)]
36695    #[doc = "Type of the result, must be video"]
36696    pub fn set_type(mut self, tg_type: String) -> Self {
36697        self.tg_type = tg_type;
36698        self
36699    }
36700    #[allow(rustdoc::invalid_html_tags)]
36701    #[doc = "Unique identifier for this result, 1-64 bytes"]
36702    pub fn set_id(mut self, id: String) -> Self {
36703        self.id = id;
36704        self
36705    }
36706    #[allow(rustdoc::invalid_html_tags)]
36707    #[doc = "A valid URL for the embedded video player or video file"]
36708    pub fn set_video_url(mut self, video_url: String) -> Self {
36709        self.video_url = video_url;
36710        self
36711    }
36712    #[allow(rustdoc::invalid_html_tags)]
36713    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
36714    pub fn set_mime_type(mut self, mime_type: String) -> Self {
36715        self.mime_type = mime_type;
36716        self
36717    }
36718    #[allow(rustdoc::invalid_html_tags)]
36719    #[doc = "URL of the thumbnail (JPEG only) for the video"]
36720    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
36721        self.thumbnail_url = thumbnail_url;
36722        self
36723    }
36724    #[allow(rustdoc::invalid_html_tags)]
36725    #[doc = "Title for the result"]
36726    pub fn set_title(mut self, title: String) -> Self {
36727        self.title = title;
36728        self
36729    }
36730    #[allow(rustdoc::invalid_html_tags)]
36731    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
36732    pub fn set_caption(mut self, caption: String) -> Self {
36733        self.caption = Some(caption);
36734        self
36735    }
36736    #[allow(rustdoc::invalid_html_tags)]
36737    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
36738    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
36739        self.parse_mode = Some(parse_mode);
36740        self
36741    }
36742    #[allow(rustdoc::invalid_html_tags)]
36743    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
36744    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
36745        self.caption_entities = Some(caption_entities);
36746        self
36747    }
36748    #[allow(rustdoc::invalid_html_tags)]
36749    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
36750    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
36751        self.show_caption_above_media = Some(show_caption_above_media);
36752        self
36753    }
36754    #[allow(rustdoc::invalid_html_tags)]
36755    #[doc = "Optional. Video width"]
36756    pub fn set_video_width(mut self, video_width: i64) -> Self {
36757        self.video_width = Some(video_width);
36758        self
36759    }
36760    #[allow(rustdoc::invalid_html_tags)]
36761    #[doc = "Optional. Video height"]
36762    pub fn set_video_height(mut self, video_height: i64) -> Self {
36763        self.video_height = Some(video_height);
36764        self
36765    }
36766    #[allow(rustdoc::invalid_html_tags)]
36767    #[doc = "Optional. Video duration in seconds"]
36768    pub fn set_video_duration(mut self, video_duration: i64) -> Self {
36769        self.video_duration = Some(video_duration);
36770        self
36771    }
36772    #[allow(rustdoc::invalid_html_tags)]
36773    #[doc = "Optional. Short description of the result"]
36774    pub fn set_description(mut self, description: String) -> Self {
36775        self.description = Some(description);
36776        self
36777    }
36778    #[allow(rustdoc::invalid_html_tags)]
36779    #[doc = "Optional. Inline keyboard attached to the message"]
36780    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
36781        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
36782        self
36783    }
36784    #[allow(rustdoc::invalid_html_tags)]
36785    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
36786    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
36787        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
36788        self
36789    }
36790    pub fn build(self) -> InlineQueryResultVideo {
36791        InlineQueryResultVideo {
36792            tg_type: self.tg_type,
36793            id: self.id,
36794            video_url: self.video_url,
36795            mime_type: self.mime_type,
36796            thumbnail_url: self.thumbnail_url,
36797            title: self.title,
36798            caption: self.caption,
36799            parse_mode: self.parse_mode,
36800            caption_entities: self.caption_entities,
36801            show_caption_above_media: self.show_caption_above_media,
36802            video_width: self.video_width,
36803            video_height: self.video_height,
36804            video_duration: self.video_duration,
36805            description: self.description,
36806            reply_markup: self.reply_markup,
36807            input_message_content: self.input_message_content,
36808        }
36809    }
36810}
36811#[allow(rustdoc::invalid_html_tags)]
36812#[doc = "Describes a service message about a change in the price of direct messages sent to a channel chat."]
36813#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36814pub struct DirectMessagePriceChanged {
36815    #[allow(rustdoc::invalid_html_tags)]
36816    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
36817    #[serde(rename = "are_direct_messages_enabled")]
36818    pub are_direct_messages_enabled: bool,
36819    #[allow(rustdoc::invalid_html_tags)]
36820    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
36821    #[serde(
36822        skip_serializing_if = "Option::is_none",
36823        rename = "direct_message_star_count",
36824        default
36825    )]
36826    pub direct_message_star_count: Option<i64>,
36827}
36828#[allow(rustdoc::invalid_html_tags)]
36829#[doc = "Companion type to DirectMessagePriceChanged that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
36830#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36831pub struct NoSkipDirectMessagePriceChanged {
36832    #[allow(rustdoc::invalid_html_tags)]
36833    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
36834    #[serde(rename = "are_direct_messages_enabled")]
36835    pub are_direct_messages_enabled: bool,
36836    pub direct_message_star_count: Option<i64>,
36837}
36838impl From<NoSkipDirectMessagePriceChanged> for DirectMessagePriceChanged {
36839    fn from(t: NoSkipDirectMessagePriceChanged) -> Self {
36840        Self {
36841            are_direct_messages_enabled: t.are_direct_messages_enabled,
36842            direct_message_star_count: t.direct_message_star_count,
36843        }
36844    }
36845}
36846#[allow(clippy::from_over_into)]
36847impl Into<NoSkipDirectMessagePriceChanged> for DirectMessagePriceChanged {
36848    fn into(self) -> NoSkipDirectMessagePriceChanged {
36849        NoSkipDirectMessagePriceChanged {
36850            are_direct_messages_enabled: self.are_direct_messages_enabled,
36851            direct_message_star_count: self.direct_message_star_count,
36852        }
36853    }
36854}
36855impl NoSkipDirectMessagePriceChanged {
36856    pub fn skip(self) -> DirectMessagePriceChanged {
36857        self.into()
36858    }
36859}
36860impl DirectMessagePriceChanged {
36861    pub fn noskip(self) -> NoSkipDirectMessagePriceChanged {
36862        self.into()
36863    }
36864}
36865#[allow(rustdoc::invalid_html_tags)]
36866#[doc = "Describes a service message about a change in the price of direct messages sent to a channel chat."]
36867#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36868pub struct DirectMessagePriceChangedBuilder {
36869    #[allow(rustdoc::invalid_html_tags)]
36870    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
36871    #[serde(rename = "are_direct_messages_enabled")]
36872    pub are_direct_messages_enabled: bool,
36873    #[allow(rustdoc::invalid_html_tags)]
36874    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
36875    #[serde(
36876        skip_serializing_if = "Option::is_none",
36877        rename = "direct_message_star_count",
36878        default
36879    )]
36880    pub direct_message_star_count: Option<i64>,
36881}
36882impl DirectMessagePriceChangedBuilder {
36883    #[allow(clippy::too_many_arguments)]
36884    pub fn new(are_direct_messages_enabled: bool) -> Self {
36885        Self {
36886            are_direct_messages_enabled,
36887            direct_message_star_count: None,
36888        }
36889    }
36890    #[allow(rustdoc::invalid_html_tags)]
36891    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
36892    pub fn set_are_direct_messages_enabled(mut self, are_direct_messages_enabled: bool) -> Self {
36893        self.are_direct_messages_enabled = are_direct_messages_enabled;
36894        self
36895    }
36896    #[allow(rustdoc::invalid_html_tags)]
36897    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
36898    pub fn set_direct_message_star_count(mut self, direct_message_star_count: i64) -> Self {
36899        self.direct_message_star_count = Some(direct_message_star_count);
36900        self
36901    }
36902    pub fn build(self) -> DirectMessagePriceChanged {
36903        DirectMessagePriceChanged {
36904            are_direct_messages_enabled: self.are_direct_messages_enabled,
36905            direct_message_star_count: self.direct_message_star_count,
36906        }
36907    }
36908}
36909#[allow(rustdoc::invalid_html_tags)]
36910#[doc = "Represents a reaction added to a message along with the number of times it was added."]
36911#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36912pub struct ReactionCount {
36913    #[allow(rustdoc::invalid_html_tags)]
36914    #[doc = "Type of the reaction"]
36915    #[serde(rename = "type")]
36916    pub tg_type: ReactionType,
36917    #[allow(rustdoc::invalid_html_tags)]
36918    #[doc = "Number of times the reaction was added"]
36919    #[serde(rename = "total_count")]
36920    pub total_count: i64,
36921}
36922#[allow(rustdoc::invalid_html_tags)]
36923#[doc = "Companion type to ReactionCount that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
36924#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36925pub struct NoSkipReactionCount {
36926    #[allow(rustdoc::invalid_html_tags)]
36927    #[doc = "Type of the reaction"]
36928    #[serde(rename = "type")]
36929    pub tg_type: ReactionType,
36930    #[allow(rustdoc::invalid_html_tags)]
36931    #[doc = "Number of times the reaction was added"]
36932    #[serde(rename = "total_count")]
36933    pub total_count: i64,
36934}
36935impl From<NoSkipReactionCount> for ReactionCount {
36936    fn from(t: NoSkipReactionCount) -> Self {
36937        Self {
36938            tg_type: t.tg_type,
36939            total_count: t.total_count,
36940        }
36941    }
36942}
36943#[allow(clippy::from_over_into)]
36944impl Into<NoSkipReactionCount> for ReactionCount {
36945    fn into(self) -> NoSkipReactionCount {
36946        NoSkipReactionCount {
36947            tg_type: self.tg_type,
36948            total_count: self.total_count,
36949        }
36950    }
36951}
36952impl NoSkipReactionCount {
36953    pub fn skip(self) -> ReactionCount {
36954        self.into()
36955    }
36956}
36957impl ReactionCount {
36958    pub fn noskip(self) -> NoSkipReactionCount {
36959        self.into()
36960    }
36961}
36962#[allow(rustdoc::invalid_html_tags)]
36963#[doc = "Represents a reaction added to a message along with the number of times it was added."]
36964#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
36965pub struct ReactionCountBuilder {
36966    #[allow(rustdoc::invalid_html_tags)]
36967    #[doc = "Type of the reaction"]
36968    #[serde(rename = "type")]
36969    pub tg_type: ReactionType,
36970    #[allow(rustdoc::invalid_html_tags)]
36971    #[doc = "Number of times the reaction was added"]
36972    #[serde(rename = "total_count")]
36973    pub total_count: i64,
36974}
36975impl ReactionCountBuilder {
36976    #[allow(clippy::too_many_arguments)]
36977    pub fn new(total_count: i64, tg_type: ReactionType) -> Self {
36978        Self {
36979            tg_type,
36980            total_count,
36981        }
36982    }
36983    #[allow(rustdoc::invalid_html_tags)]
36984    #[doc = "Type of the reaction"]
36985    pub fn set_type(mut self, tg_type: ReactionType) -> Self {
36986        self.tg_type = tg_type;
36987        self
36988    }
36989    #[allow(rustdoc::invalid_html_tags)]
36990    #[doc = "Number of times the reaction was added"]
36991    pub fn set_total_count(mut self, total_count: i64) -> Self {
36992        self.total_count = total_count;
36993        self
36994    }
36995    pub fn build(self) -> ReactionCount {
36996        ReactionCount {
36997            tg_type: self.tg_type,
36998            total_count: self.total_count,
36999        }
37000    }
37001}
37002#[allow(rustdoc::invalid_html_tags)]
37003#[doc = "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button."]
37004#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37005pub struct ChatShared {
37006    #[allow(rustdoc::invalid_html_tags)]
37007    #[doc = "Identifier of the request"]
37008    #[serde(rename = "request_id")]
37009    pub request_id: i64,
37010    #[allow(rustdoc::invalid_html_tags)]
37011    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
37012    #[serde(rename = "chat_id")]
37013    pub chat_id: i64,
37014    #[allow(rustdoc::invalid_html_tags)]
37015    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
37016    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
37017    pub title: Option<String>,
37018    #[allow(rustdoc::invalid_html_tags)]
37019    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
37020    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
37021    pub username: Option<String>,
37022    #[allow(rustdoc::invalid_html_tags)]
37023    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
37024    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
37025    pub photo: Option<Vec<PhotoSize>>,
37026}
37027#[allow(rustdoc::invalid_html_tags)]
37028#[doc = "Companion type to ChatShared that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
37029#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37030pub struct NoSkipChatShared {
37031    #[allow(rustdoc::invalid_html_tags)]
37032    #[doc = "Identifier of the request"]
37033    #[serde(rename = "request_id")]
37034    pub request_id: i64,
37035    #[allow(rustdoc::invalid_html_tags)]
37036    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
37037    #[serde(rename = "chat_id")]
37038    pub chat_id: i64,
37039    pub title: Option<String>,
37040    pub username: Option<String>,
37041    pub photo: Option<Vec<PhotoSize>>,
37042}
37043impl From<NoSkipChatShared> for ChatShared {
37044    fn from(t: NoSkipChatShared) -> Self {
37045        Self {
37046            request_id: t.request_id,
37047            chat_id: t.chat_id,
37048            title: t.title,
37049            username: t.username,
37050            photo: t.photo,
37051        }
37052    }
37053}
37054#[allow(clippy::from_over_into)]
37055impl Into<NoSkipChatShared> for ChatShared {
37056    fn into(self) -> NoSkipChatShared {
37057        NoSkipChatShared {
37058            request_id: self.request_id,
37059            chat_id: self.chat_id,
37060            title: self.title,
37061            username: self.username,
37062            photo: self.photo,
37063        }
37064    }
37065}
37066impl NoSkipChatShared {
37067    pub fn skip(self) -> ChatShared {
37068        self.into()
37069    }
37070}
37071impl ChatShared {
37072    pub fn noskip(self) -> NoSkipChatShared {
37073        self.into()
37074    }
37075}
37076#[allow(rustdoc::invalid_html_tags)]
37077#[doc = "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button."]
37078#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37079pub struct ChatSharedBuilder {
37080    #[allow(rustdoc::invalid_html_tags)]
37081    #[doc = "Identifier of the request"]
37082    #[serde(rename = "request_id")]
37083    pub request_id: i64,
37084    #[allow(rustdoc::invalid_html_tags)]
37085    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
37086    #[serde(rename = "chat_id")]
37087    pub chat_id: i64,
37088    #[allow(rustdoc::invalid_html_tags)]
37089    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
37090    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
37091    pub title: Option<String>,
37092    #[allow(rustdoc::invalid_html_tags)]
37093    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
37094    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
37095    pub username: Option<String>,
37096    #[allow(rustdoc::invalid_html_tags)]
37097    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
37098    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
37099    pub photo: Option<Vec<PhotoSize>>,
37100}
37101impl ChatSharedBuilder {
37102    #[allow(clippy::too_many_arguments)]
37103    pub fn new(request_id: i64, chat_id: i64) -> Self {
37104        Self {
37105            request_id,
37106            chat_id,
37107            title: None,
37108            username: None,
37109            photo: None,
37110        }
37111    }
37112    #[allow(rustdoc::invalid_html_tags)]
37113    #[doc = "Identifier of the request"]
37114    pub fn set_request_id(mut self, request_id: i64) -> Self {
37115        self.request_id = request_id;
37116        self
37117    }
37118    #[allow(rustdoc::invalid_html_tags)]
37119    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
37120    pub fn set_chat_id(mut self, chat_id: i64) -> Self {
37121        self.chat_id = chat_id;
37122        self
37123    }
37124    #[allow(rustdoc::invalid_html_tags)]
37125    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
37126    pub fn set_title(mut self, title: String) -> Self {
37127        self.title = Some(title);
37128        self
37129    }
37130    #[allow(rustdoc::invalid_html_tags)]
37131    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
37132    pub fn set_username(mut self, username: String) -> Self {
37133        self.username = Some(username);
37134        self
37135    }
37136    #[allow(rustdoc::invalid_html_tags)]
37137    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
37138    pub fn set_photo(mut self, photo: Vec<PhotoSize>) -> Self {
37139        self.photo = Some(photo);
37140        self
37141    }
37142    pub fn build(self) -> ChatShared {
37143        ChatShared {
37144            request_id: self.request_id,
37145            chat_id: self.chat_id,
37146            title: self.title,
37147            username: self.username,
37148            photo: self.photo,
37149        }
37150    }
37151}
37152#[allow(rustdoc::invalid_html_tags)]
37153#[doc = "The message was originally sent to a channel chat."]
37154#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37155pub struct MessageOriginChannel {
37156    #[allow(rustdoc::invalid_html_tags)]
37157    #[doc = "Type of the message origin, always \"channel\""]
37158    #[serde(rename = "type")]
37159    pub tg_type: String,
37160    #[allow(rustdoc::invalid_html_tags)]
37161    #[doc = "Date the message was sent originally in Unix time"]
37162    #[serde(rename = "date")]
37163    pub date: i64,
37164    #[allow(rustdoc::invalid_html_tags)]
37165    #[doc = "Channel chat to which the message was originally sent"]
37166    #[serde(rename = "chat")]
37167    pub chat: BoxWrapper<Unbox<Chat>>,
37168    #[allow(rustdoc::invalid_html_tags)]
37169    #[doc = "Unique message identifier inside the chat"]
37170    #[serde(rename = "message_id")]
37171    pub message_id: i64,
37172    #[allow(rustdoc::invalid_html_tags)]
37173    #[doc = "Optional. Signature of the original post author"]
37174    #[serde(
37175        skip_serializing_if = "Option::is_none",
37176        rename = "author_signature",
37177        default
37178    )]
37179    pub author_signature: Option<String>,
37180}
37181#[allow(rustdoc::invalid_html_tags)]
37182#[doc = "Companion type to MessageOriginChannel that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
37183#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37184pub struct NoSkipMessageOriginChannel {
37185    #[allow(rustdoc::invalid_html_tags)]
37186    #[doc = "Type of the message origin, always \"channel\""]
37187    #[serde(rename = "type")]
37188    pub tg_type: String,
37189    #[allow(rustdoc::invalid_html_tags)]
37190    #[doc = "Date the message was sent originally in Unix time"]
37191    #[serde(rename = "date")]
37192    pub date: i64,
37193    #[allow(rustdoc::invalid_html_tags)]
37194    #[doc = "Channel chat to which the message was originally sent"]
37195    #[serde(rename = "chat")]
37196    pub chat: BoxWrapper<Unbox<Chat>>,
37197    #[allow(rustdoc::invalid_html_tags)]
37198    #[doc = "Unique message identifier inside the chat"]
37199    #[serde(rename = "message_id")]
37200    pub message_id: i64,
37201    pub author_signature: Option<String>,
37202}
37203impl From<NoSkipMessageOriginChannel> for MessageOriginChannel {
37204    fn from(t: NoSkipMessageOriginChannel) -> Self {
37205        Self {
37206            tg_type: t.tg_type,
37207            date: t.date,
37208            chat: t.chat,
37209            message_id: t.message_id,
37210            author_signature: t.author_signature,
37211        }
37212    }
37213}
37214#[allow(clippy::from_over_into)]
37215impl Into<NoSkipMessageOriginChannel> for MessageOriginChannel {
37216    fn into(self) -> NoSkipMessageOriginChannel {
37217        NoSkipMessageOriginChannel {
37218            tg_type: self.tg_type,
37219            date: self.date,
37220            chat: self.chat,
37221            message_id: self.message_id,
37222            author_signature: self.author_signature,
37223        }
37224    }
37225}
37226impl NoSkipMessageOriginChannel {
37227    pub fn skip(self) -> MessageOriginChannel {
37228        self.into()
37229    }
37230}
37231impl MessageOriginChannel {
37232    pub fn noskip(self) -> NoSkipMessageOriginChannel {
37233        self.into()
37234    }
37235}
37236#[allow(rustdoc::invalid_html_tags)]
37237#[doc = "The message was originally sent to a channel chat."]
37238#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37239pub struct MessageOriginChannelBuilder {
37240    #[allow(rustdoc::invalid_html_tags)]
37241    #[doc = "Type of the message origin, always \"channel\""]
37242    #[serde(rename = "type")]
37243    pub tg_type: String,
37244    #[allow(rustdoc::invalid_html_tags)]
37245    #[doc = "Date the message was sent originally in Unix time"]
37246    #[serde(rename = "date")]
37247    pub date: i64,
37248    #[allow(rustdoc::invalid_html_tags)]
37249    #[doc = "Channel chat to which the message was originally sent"]
37250    #[serde(rename = "chat")]
37251    pub chat: BoxWrapper<Unbox<Chat>>,
37252    #[allow(rustdoc::invalid_html_tags)]
37253    #[doc = "Unique message identifier inside the chat"]
37254    #[serde(rename = "message_id")]
37255    pub message_id: i64,
37256    #[allow(rustdoc::invalid_html_tags)]
37257    #[doc = "Optional. Signature of the original post author"]
37258    #[serde(
37259        skip_serializing_if = "Option::is_none",
37260        rename = "author_signature",
37261        default
37262    )]
37263    pub author_signature: Option<String>,
37264}
37265impl MessageOriginChannelBuilder {
37266    #[allow(clippy::too_many_arguments)]
37267    pub fn new<A: Into<Chat>>(date: i64, chat: A, message_id: i64) -> Self {
37268        Self {
37269            tg_type: "MessageOriginChannel".to_owned(),
37270            date,
37271            chat: BoxWrapper::new_unbox(chat.into()),
37272            message_id,
37273            author_signature: None,
37274        }
37275    }
37276    #[allow(rustdoc::invalid_html_tags)]
37277    #[doc = "Type of the message origin, always \"channel\""]
37278    pub fn set_type(mut self, tg_type: String) -> Self {
37279        self.tg_type = tg_type;
37280        self
37281    }
37282    #[allow(rustdoc::invalid_html_tags)]
37283    #[doc = "Date the message was sent originally in Unix time"]
37284    pub fn set_date(mut self, date: i64) -> Self {
37285        self.date = date;
37286        self
37287    }
37288    #[allow(rustdoc::invalid_html_tags)]
37289    #[doc = "Channel chat to which the message was originally sent"]
37290    pub fn set_chat(mut self, chat: Chat) -> Self {
37291        self.chat = BoxWrapper(Unbox(chat));
37292        self
37293    }
37294    #[allow(rustdoc::invalid_html_tags)]
37295    #[doc = "Unique message identifier inside the chat"]
37296    pub fn set_message_id(mut self, message_id: i64) -> Self {
37297        self.message_id = message_id;
37298        self
37299    }
37300    #[allow(rustdoc::invalid_html_tags)]
37301    #[doc = "Optional. Signature of the original post author"]
37302    pub fn set_author_signature(mut self, author_signature: String) -> Self {
37303        self.author_signature = Some(author_signature);
37304        self
37305    }
37306    pub fn build(self) -> MessageOriginChannel {
37307        MessageOriginChannel {
37308            tg_type: self.tg_type,
37309            date: self.date,
37310            chat: self.chat,
37311            message_id: self.message_id,
37312            author_signature: self.author_signature,
37313        }
37314    }
37315}
37316#[allow(rustdoc::invalid_html_tags)]
37317#[doc = "This object represents a boost removed from a chat."]
37318#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37319pub struct ChatBoostRemoved {
37320    #[allow(rustdoc::invalid_html_tags)]
37321    #[doc = "Chat which was boosted"]
37322    #[serde(rename = "chat")]
37323    pub chat: BoxWrapper<Unbox<Chat>>,
37324    #[allow(rustdoc::invalid_html_tags)]
37325    #[doc = "Unique identifier of the boost"]
37326    #[serde(rename = "boost_id")]
37327    pub boost_id: String,
37328    #[allow(rustdoc::invalid_html_tags)]
37329    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
37330    #[serde(rename = "remove_date")]
37331    pub remove_date: i64,
37332    #[allow(rustdoc::invalid_html_tags)]
37333    #[doc = "Source of the removed boost"]
37334    #[serde(rename = "source")]
37335    pub source: BoxWrapper<Unbox<ChatBoostSource>>,
37336}
37337#[allow(rustdoc::invalid_html_tags)]
37338#[doc = "Companion type to ChatBoostRemoved that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
37339#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37340pub struct NoSkipChatBoostRemoved {
37341    #[allow(rustdoc::invalid_html_tags)]
37342    #[doc = "Chat which was boosted"]
37343    #[serde(rename = "chat")]
37344    pub chat: BoxWrapper<Unbox<Chat>>,
37345    #[allow(rustdoc::invalid_html_tags)]
37346    #[doc = "Unique identifier of the boost"]
37347    #[serde(rename = "boost_id")]
37348    pub boost_id: String,
37349    #[allow(rustdoc::invalid_html_tags)]
37350    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
37351    #[serde(rename = "remove_date")]
37352    pub remove_date: i64,
37353    #[allow(rustdoc::invalid_html_tags)]
37354    #[doc = "Source of the removed boost"]
37355    #[serde(rename = "source")]
37356    pub source: BoxWrapper<Unbox<ChatBoostSource>>,
37357}
37358impl From<NoSkipChatBoostRemoved> for ChatBoostRemoved {
37359    fn from(t: NoSkipChatBoostRemoved) -> Self {
37360        Self {
37361            chat: t.chat,
37362            boost_id: t.boost_id,
37363            remove_date: t.remove_date,
37364            source: t.source,
37365        }
37366    }
37367}
37368#[allow(clippy::from_over_into)]
37369impl Into<NoSkipChatBoostRemoved> for ChatBoostRemoved {
37370    fn into(self) -> NoSkipChatBoostRemoved {
37371        NoSkipChatBoostRemoved {
37372            chat: self.chat,
37373            boost_id: self.boost_id,
37374            remove_date: self.remove_date,
37375            source: self.source,
37376        }
37377    }
37378}
37379impl NoSkipChatBoostRemoved {
37380    pub fn skip(self) -> ChatBoostRemoved {
37381        self.into()
37382    }
37383}
37384impl ChatBoostRemoved {
37385    pub fn noskip(self) -> NoSkipChatBoostRemoved {
37386        self.into()
37387    }
37388}
37389#[allow(rustdoc::invalid_html_tags)]
37390#[doc = "This object represents a boost removed from a chat."]
37391#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37392pub struct ChatBoostRemovedBuilder {
37393    #[allow(rustdoc::invalid_html_tags)]
37394    #[doc = "Chat which was boosted"]
37395    #[serde(rename = "chat")]
37396    pub chat: BoxWrapper<Unbox<Chat>>,
37397    #[allow(rustdoc::invalid_html_tags)]
37398    #[doc = "Unique identifier of the boost"]
37399    #[serde(rename = "boost_id")]
37400    pub boost_id: String,
37401    #[allow(rustdoc::invalid_html_tags)]
37402    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
37403    #[serde(rename = "remove_date")]
37404    pub remove_date: i64,
37405    #[allow(rustdoc::invalid_html_tags)]
37406    #[doc = "Source of the removed boost"]
37407    #[serde(rename = "source")]
37408    pub source: BoxWrapper<Unbox<ChatBoostSource>>,
37409}
37410impl ChatBoostRemovedBuilder {
37411    #[allow(clippy::too_many_arguments)]
37412    pub fn new<A: Into<Chat>, B: Into<ChatBoostSource>>(
37413        chat: A,
37414        boost_id: String,
37415        remove_date: i64,
37416        source: B,
37417    ) -> Self {
37418        Self {
37419            chat: BoxWrapper::new_unbox(chat.into()),
37420            boost_id,
37421            remove_date,
37422            source: BoxWrapper::new_unbox(source.into()),
37423        }
37424    }
37425    #[allow(rustdoc::invalid_html_tags)]
37426    #[doc = "Chat which was boosted"]
37427    pub fn set_chat(mut self, chat: Chat) -> Self {
37428        self.chat = BoxWrapper(Unbox(chat));
37429        self
37430    }
37431    #[allow(rustdoc::invalid_html_tags)]
37432    #[doc = "Unique identifier of the boost"]
37433    pub fn set_boost_id(mut self, boost_id: String) -> Self {
37434        self.boost_id = boost_id;
37435        self
37436    }
37437    #[allow(rustdoc::invalid_html_tags)]
37438    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
37439    pub fn set_remove_date(mut self, remove_date: i64) -> Self {
37440        self.remove_date = remove_date;
37441        self
37442    }
37443    #[allow(rustdoc::invalid_html_tags)]
37444    #[doc = "Source of the removed boost"]
37445    pub fn set_source(mut self, source: ChatBoostSource) -> Self {
37446        self.source = BoxWrapper(Unbox(source));
37447        self
37448    }
37449    pub fn build(self) -> ChatBoostRemoved {
37450        ChatBoostRemoved {
37451            chat: self.chat,
37452            boost_id: self.boost_id,
37453            remove_date: self.remove_date,
37454            source: self.source,
37455        }
37456    }
37457}
37458#[allow(rustdoc::invalid_html_tags)]
37459#[doc = "The background is automatically filled based on the selected colors."]
37460#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37461pub struct BackgroundTypeFill {
37462    #[allow(rustdoc::invalid_html_tags)]
37463    #[doc = "Type of the background, always \"fill\""]
37464    #[serde(rename = "type")]
37465    pub tg_type: String,
37466    #[allow(rustdoc::invalid_html_tags)]
37467    #[doc = "The background fill"]
37468    #[serde(rename = "fill")]
37469    pub fill: BoxWrapper<Unbox<BackgroundFill>>,
37470    #[allow(rustdoc::invalid_html_tags)]
37471    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
37472    #[serde(rename = "dark_theme_dimming")]
37473    pub dark_theme_dimming: i64,
37474}
37475#[allow(rustdoc::invalid_html_tags)]
37476#[doc = "Companion type to BackgroundTypeFill that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
37477#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37478pub struct NoSkipBackgroundTypeFill {
37479    #[allow(rustdoc::invalid_html_tags)]
37480    #[doc = "Type of the background, always \"fill\""]
37481    #[serde(rename = "type")]
37482    pub tg_type: String,
37483    #[allow(rustdoc::invalid_html_tags)]
37484    #[doc = "The background fill"]
37485    #[serde(rename = "fill")]
37486    pub fill: BoxWrapper<Unbox<BackgroundFill>>,
37487    #[allow(rustdoc::invalid_html_tags)]
37488    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
37489    #[serde(rename = "dark_theme_dimming")]
37490    pub dark_theme_dimming: i64,
37491}
37492impl From<NoSkipBackgroundTypeFill> for BackgroundTypeFill {
37493    fn from(t: NoSkipBackgroundTypeFill) -> Self {
37494        Self {
37495            tg_type: t.tg_type,
37496            fill: t.fill,
37497            dark_theme_dimming: t.dark_theme_dimming,
37498        }
37499    }
37500}
37501#[allow(clippy::from_over_into)]
37502impl Into<NoSkipBackgroundTypeFill> for BackgroundTypeFill {
37503    fn into(self) -> NoSkipBackgroundTypeFill {
37504        NoSkipBackgroundTypeFill {
37505            tg_type: self.tg_type,
37506            fill: self.fill,
37507            dark_theme_dimming: self.dark_theme_dimming,
37508        }
37509    }
37510}
37511impl NoSkipBackgroundTypeFill {
37512    pub fn skip(self) -> BackgroundTypeFill {
37513        self.into()
37514    }
37515}
37516impl BackgroundTypeFill {
37517    pub fn noskip(self) -> NoSkipBackgroundTypeFill {
37518        self.into()
37519    }
37520}
37521#[allow(rustdoc::invalid_html_tags)]
37522#[doc = "The background is automatically filled based on the selected colors."]
37523#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37524pub struct BackgroundTypeFillBuilder {
37525    #[allow(rustdoc::invalid_html_tags)]
37526    #[doc = "Type of the background, always \"fill\""]
37527    #[serde(rename = "type")]
37528    pub tg_type: String,
37529    #[allow(rustdoc::invalid_html_tags)]
37530    #[doc = "The background fill"]
37531    #[serde(rename = "fill")]
37532    pub fill: BoxWrapper<Unbox<BackgroundFill>>,
37533    #[allow(rustdoc::invalid_html_tags)]
37534    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
37535    #[serde(rename = "dark_theme_dimming")]
37536    pub dark_theme_dimming: i64,
37537}
37538impl BackgroundTypeFillBuilder {
37539    #[allow(clippy::too_many_arguments)]
37540    pub fn new<A: Into<BackgroundFill>>(fill: A, dark_theme_dimming: i64) -> Self {
37541        Self {
37542            tg_type: "BackgroundTypeFill".to_owned(),
37543            fill: BoxWrapper::new_unbox(fill.into()),
37544            dark_theme_dimming,
37545        }
37546    }
37547    #[allow(rustdoc::invalid_html_tags)]
37548    #[doc = "Type of the background, always \"fill\""]
37549    pub fn set_type(mut self, tg_type: String) -> Self {
37550        self.tg_type = tg_type;
37551        self
37552    }
37553    #[allow(rustdoc::invalid_html_tags)]
37554    #[doc = "The background fill"]
37555    pub fn set_fill(mut self, fill: BackgroundFill) -> Self {
37556        self.fill = BoxWrapper(Unbox(fill));
37557        self
37558    }
37559    #[allow(rustdoc::invalid_html_tags)]
37560    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
37561    pub fn set_dark_theme_dimming(mut self, dark_theme_dimming: i64) -> Self {
37562        self.dark_theme_dimming = dark_theme_dimming;
37563        self
37564    }
37565    pub fn build(self) -> BackgroundTypeFill {
37566        BackgroundTypeFill {
37567            tg_type: self.tg_type,
37568            fill: self.fill,
37569            dark_theme_dimming: self.dark_theme_dimming,
37570        }
37571    }
37572}
37573#[allow(rustdoc::invalid_html_tags)]
37574#[doc = "This object represents a unique message identifier."]
37575#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37576pub struct MessageId {
37577    #[allow(rustdoc::invalid_html_tags)]
37578    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
37579    #[serde(rename = "message_id")]
37580    pub message_id: i64,
37581}
37582#[allow(rustdoc::invalid_html_tags)]
37583#[doc = "Companion type to MessageId that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
37584#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37585pub struct NoSkipMessageId {
37586    #[allow(rustdoc::invalid_html_tags)]
37587    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
37588    #[serde(rename = "message_id")]
37589    pub message_id: i64,
37590}
37591impl From<NoSkipMessageId> for MessageId {
37592    fn from(t: NoSkipMessageId) -> Self {
37593        Self {
37594            message_id: t.message_id,
37595        }
37596    }
37597}
37598#[allow(clippy::from_over_into)]
37599impl Into<NoSkipMessageId> for MessageId {
37600    fn into(self) -> NoSkipMessageId {
37601        NoSkipMessageId {
37602            message_id: self.message_id,
37603        }
37604    }
37605}
37606impl NoSkipMessageId {
37607    pub fn skip(self) -> MessageId {
37608        self.into()
37609    }
37610}
37611impl MessageId {
37612    pub fn noskip(self) -> NoSkipMessageId {
37613        self.into()
37614    }
37615}
37616#[allow(rustdoc::invalid_html_tags)]
37617#[doc = "This object represents a unique message identifier."]
37618#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37619pub struct MessageIdBuilder {
37620    #[allow(rustdoc::invalid_html_tags)]
37621    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
37622    #[serde(rename = "message_id")]
37623    pub message_id: i64,
37624}
37625impl MessageIdBuilder {
37626    #[allow(clippy::too_many_arguments)]
37627    pub fn new(message_id: i64) -> Self {
37628        Self { message_id }
37629    }
37630    #[allow(rustdoc::invalid_html_tags)]
37631    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
37632    pub fn set_message_id(mut self, message_id: i64) -> Self {
37633        self.message_id = message_id;
37634        self
37635    }
37636    pub fn build(self) -> MessageId {
37637        MessageId {
37638            message_id: self.message_id,
37639        }
37640    }
37641}
37642#[allow(rustdoc::invalid_html_tags)]
37643#[doc = "This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats: https://core.telegram.org/bots/features#chat-and-user-selection."]
37644#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37645pub struct KeyboardButtonRequestChat {
37646    #[allow(rustdoc::invalid_html_tags)]
37647    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
37648    #[serde(rename = "request_id")]
37649    pub request_id: i64,
37650    #[allow(rustdoc::invalid_html_tags)]
37651    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
37652    #[serde(rename = "chat_is_channel")]
37653    pub chat_is_channel: bool,
37654    #[allow(rustdoc::invalid_html_tags)]
37655    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
37656    #[serde(
37657        skip_serializing_if = "Option::is_none",
37658        rename = "chat_is_forum",
37659        default
37660    )]
37661    pub chat_is_forum: Option<bool>,
37662    #[allow(rustdoc::invalid_html_tags)]
37663    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
37664    #[serde(
37665        skip_serializing_if = "Option::is_none",
37666        rename = "chat_has_username",
37667        default
37668    )]
37669    pub chat_has_username: Option<bool>,
37670    #[allow(rustdoc::invalid_html_tags)]
37671    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
37672    #[serde(
37673        skip_serializing_if = "Option::is_none",
37674        rename = "chat_is_created",
37675        default
37676    )]
37677    pub chat_is_created: Option<bool>,
37678    #[allow(rustdoc::invalid_html_tags)]
37679    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
37680    #[serde(
37681        skip_serializing_if = "Option::is_none",
37682        rename = "user_administrator_rights",
37683        default
37684    )]
37685    pub user_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
37686    #[allow(rustdoc::invalid_html_tags)]
37687    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
37688    #[serde(
37689        skip_serializing_if = "Option::is_none",
37690        rename = "bot_administrator_rights",
37691        default
37692    )]
37693    pub bot_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
37694    #[allow(rustdoc::invalid_html_tags)]
37695    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
37696    #[serde(
37697        skip_serializing_if = "Option::is_none",
37698        rename = "bot_is_member",
37699        default
37700    )]
37701    pub bot_is_member: Option<bool>,
37702    #[allow(rustdoc::invalid_html_tags)]
37703    #[doc = "Optional. Pass True to request the chat's title"]
37704    #[serde(
37705        skip_serializing_if = "Option::is_none",
37706        rename = "request_title",
37707        default
37708    )]
37709    pub request_title: Option<bool>,
37710    #[allow(rustdoc::invalid_html_tags)]
37711    #[doc = "Optional. Pass True to request the chat's username"]
37712    #[serde(
37713        skip_serializing_if = "Option::is_none",
37714        rename = "request_username",
37715        default
37716    )]
37717    pub request_username: Option<bool>,
37718    #[allow(rustdoc::invalid_html_tags)]
37719    #[doc = "Optional. Pass True to request the chat's photo"]
37720    #[serde(
37721        skip_serializing_if = "Option::is_none",
37722        rename = "request_photo",
37723        default
37724    )]
37725    pub request_photo: Option<bool>,
37726}
37727#[allow(rustdoc::invalid_html_tags)]
37728#[doc = "Companion type to KeyboardButtonRequestChat that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
37729#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37730pub struct NoSkipKeyboardButtonRequestChat {
37731    #[allow(rustdoc::invalid_html_tags)]
37732    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
37733    #[serde(rename = "request_id")]
37734    pub request_id: i64,
37735    #[allow(rustdoc::invalid_html_tags)]
37736    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
37737    #[serde(rename = "chat_is_channel")]
37738    pub chat_is_channel: bool,
37739    pub chat_is_forum: Option<bool>,
37740    pub chat_has_username: Option<bool>,
37741    pub chat_is_created: Option<bool>,
37742    pub user_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
37743    pub bot_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
37744    pub bot_is_member: Option<bool>,
37745    pub request_title: Option<bool>,
37746    pub request_username: Option<bool>,
37747    pub request_photo: Option<bool>,
37748}
37749impl From<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat {
37750    fn from(t: NoSkipKeyboardButtonRequestChat) -> Self {
37751        Self {
37752            request_id: t.request_id,
37753            chat_is_channel: t.chat_is_channel,
37754            chat_is_forum: t.chat_is_forum,
37755            chat_has_username: t.chat_has_username,
37756            chat_is_created: t.chat_is_created,
37757            user_administrator_rights: t.user_administrator_rights,
37758            bot_administrator_rights: t.bot_administrator_rights,
37759            bot_is_member: t.bot_is_member,
37760            request_title: t.request_title,
37761            request_username: t.request_username,
37762            request_photo: t.request_photo,
37763        }
37764    }
37765}
37766#[allow(clippy::from_over_into)]
37767impl Into<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat {
37768    fn into(self) -> NoSkipKeyboardButtonRequestChat {
37769        NoSkipKeyboardButtonRequestChat {
37770            request_id: self.request_id,
37771            chat_is_channel: self.chat_is_channel,
37772            chat_is_forum: self.chat_is_forum,
37773            chat_has_username: self.chat_has_username,
37774            chat_is_created: self.chat_is_created,
37775            user_administrator_rights: self.user_administrator_rights,
37776            bot_administrator_rights: self.bot_administrator_rights,
37777            bot_is_member: self.bot_is_member,
37778            request_title: self.request_title,
37779            request_username: self.request_username,
37780            request_photo: self.request_photo,
37781        }
37782    }
37783}
37784impl NoSkipKeyboardButtonRequestChat {
37785    pub fn skip(self) -> KeyboardButtonRequestChat {
37786        self.into()
37787    }
37788}
37789impl KeyboardButtonRequestChat {
37790    pub fn noskip(self) -> NoSkipKeyboardButtonRequestChat {
37791        self.into()
37792    }
37793}
37794#[allow(rustdoc::invalid_html_tags)]
37795#[doc = "This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats: https://core.telegram.org/bots/features#chat-and-user-selection."]
37796#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37797pub struct KeyboardButtonRequestChatBuilder {
37798    #[allow(rustdoc::invalid_html_tags)]
37799    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
37800    #[serde(rename = "request_id")]
37801    pub request_id: i64,
37802    #[allow(rustdoc::invalid_html_tags)]
37803    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
37804    #[serde(rename = "chat_is_channel")]
37805    pub chat_is_channel: bool,
37806    #[allow(rustdoc::invalid_html_tags)]
37807    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
37808    #[serde(
37809        skip_serializing_if = "Option::is_none",
37810        rename = "chat_is_forum",
37811        default
37812    )]
37813    pub chat_is_forum: Option<bool>,
37814    #[allow(rustdoc::invalid_html_tags)]
37815    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
37816    #[serde(
37817        skip_serializing_if = "Option::is_none",
37818        rename = "chat_has_username",
37819        default
37820    )]
37821    pub chat_has_username: Option<bool>,
37822    #[allow(rustdoc::invalid_html_tags)]
37823    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
37824    #[serde(
37825        skip_serializing_if = "Option::is_none",
37826        rename = "chat_is_created",
37827        default
37828    )]
37829    pub chat_is_created: Option<bool>,
37830    #[allow(rustdoc::invalid_html_tags)]
37831    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
37832    #[serde(
37833        skip_serializing_if = "Option::is_none",
37834        rename = "user_administrator_rights",
37835        default
37836    )]
37837    pub user_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
37838    #[allow(rustdoc::invalid_html_tags)]
37839    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
37840    #[serde(
37841        skip_serializing_if = "Option::is_none",
37842        rename = "bot_administrator_rights",
37843        default
37844    )]
37845    pub bot_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
37846    #[allow(rustdoc::invalid_html_tags)]
37847    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
37848    #[serde(
37849        skip_serializing_if = "Option::is_none",
37850        rename = "bot_is_member",
37851        default
37852    )]
37853    pub bot_is_member: Option<bool>,
37854    #[allow(rustdoc::invalid_html_tags)]
37855    #[doc = "Optional. Pass True to request the chat's title"]
37856    #[serde(
37857        skip_serializing_if = "Option::is_none",
37858        rename = "request_title",
37859        default
37860    )]
37861    pub request_title: Option<bool>,
37862    #[allow(rustdoc::invalid_html_tags)]
37863    #[doc = "Optional. Pass True to request the chat's username"]
37864    #[serde(
37865        skip_serializing_if = "Option::is_none",
37866        rename = "request_username",
37867        default
37868    )]
37869    pub request_username: Option<bool>,
37870    #[allow(rustdoc::invalid_html_tags)]
37871    #[doc = "Optional. Pass True to request the chat's photo"]
37872    #[serde(
37873        skip_serializing_if = "Option::is_none",
37874        rename = "request_photo",
37875        default
37876    )]
37877    pub request_photo: Option<bool>,
37878}
37879impl KeyboardButtonRequestChatBuilder {
37880    #[allow(clippy::too_many_arguments)]
37881    pub fn new(request_id: i64, chat_is_channel: bool) -> Self {
37882        Self {
37883            request_id,
37884            chat_is_channel,
37885            chat_is_forum: None,
37886            chat_has_username: None,
37887            chat_is_created: None,
37888            user_administrator_rights: None,
37889            bot_administrator_rights: None,
37890            bot_is_member: None,
37891            request_title: None,
37892            request_username: None,
37893            request_photo: None,
37894        }
37895    }
37896    #[allow(rustdoc::invalid_html_tags)]
37897    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
37898    pub fn set_request_id(mut self, request_id: i64) -> Self {
37899        self.request_id = request_id;
37900        self
37901    }
37902    #[allow(rustdoc::invalid_html_tags)]
37903    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
37904    pub fn set_chat_is_channel(mut self, chat_is_channel: bool) -> Self {
37905        self.chat_is_channel = chat_is_channel;
37906        self
37907    }
37908    #[allow(rustdoc::invalid_html_tags)]
37909    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
37910    pub fn set_chat_is_forum(mut self, chat_is_forum: bool) -> Self {
37911        self.chat_is_forum = Some(chat_is_forum);
37912        self
37913    }
37914    #[allow(rustdoc::invalid_html_tags)]
37915    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
37916    pub fn set_chat_has_username(mut self, chat_has_username: bool) -> Self {
37917        self.chat_has_username = Some(chat_has_username);
37918        self
37919    }
37920    #[allow(rustdoc::invalid_html_tags)]
37921    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
37922    pub fn set_chat_is_created(mut self, chat_is_created: bool) -> Self {
37923        self.chat_is_created = Some(chat_is_created);
37924        self
37925    }
37926    #[allow(rustdoc::invalid_html_tags)]
37927    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
37928    pub fn set_user_administrator_rights(
37929        mut self,
37930        user_administrator_rights: ChatAdministratorRights,
37931    ) -> Self {
37932        self.user_administrator_rights = Some(BoxWrapper(Unbox(user_administrator_rights)));
37933        self
37934    }
37935    #[allow(rustdoc::invalid_html_tags)]
37936    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
37937    pub fn set_bot_administrator_rights(
37938        mut self,
37939        bot_administrator_rights: ChatAdministratorRights,
37940    ) -> Self {
37941        self.bot_administrator_rights = Some(BoxWrapper(Unbox(bot_administrator_rights)));
37942        self
37943    }
37944    #[allow(rustdoc::invalid_html_tags)]
37945    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
37946    pub fn set_bot_is_member(mut self, bot_is_member: bool) -> Self {
37947        self.bot_is_member = Some(bot_is_member);
37948        self
37949    }
37950    #[allow(rustdoc::invalid_html_tags)]
37951    #[doc = "Optional. Pass True to request the chat's title"]
37952    pub fn set_request_title(mut self, request_title: bool) -> Self {
37953        self.request_title = Some(request_title);
37954        self
37955    }
37956    #[allow(rustdoc::invalid_html_tags)]
37957    #[doc = "Optional. Pass True to request the chat's username"]
37958    pub fn set_request_username(mut self, request_username: bool) -> Self {
37959        self.request_username = Some(request_username);
37960        self
37961    }
37962    #[allow(rustdoc::invalid_html_tags)]
37963    #[doc = "Optional. Pass True to request the chat's photo"]
37964    pub fn set_request_photo(mut self, request_photo: bool) -> Self {
37965        self.request_photo = Some(request_photo);
37966        self
37967    }
37968    pub fn build(self) -> KeyboardButtonRequestChat {
37969        KeyboardButtonRequestChat {
37970            request_id: self.request_id,
37971            chat_is_channel: self.chat_is_channel,
37972            chat_is_forum: self.chat_is_forum,
37973            chat_has_username: self.chat_has_username,
37974            chat_is_created: self.chat_is_created,
37975            user_administrator_rights: self.user_administrator_rights,
37976            bot_administrator_rights: self.bot_administrator_rights,
37977            bot_is_member: self.bot_is_member,
37978            request_title: self.request_title,
37979            request_username: self.request_username,
37980            request_photo: self.request_photo,
37981        }
37982    }
37983}
37984#[allow(rustdoc::invalid_html_tags)]
37985#[doc = "The reaction is based on an emoji."]
37986#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37987pub struct ReactionTypeEmoji {
37988    #[allow(rustdoc::invalid_html_tags)]
37989    #[doc = "Type of the reaction, always \"emoji\""]
37990    #[serde(rename = "type")]
37991    pub tg_type: String,
37992    #[allow(rustdoc::invalid_html_tags)]
37993    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
37994    #[serde(rename = "emoji")]
37995    pub emoji: String,
37996}
37997#[allow(rustdoc::invalid_html_tags)]
37998#[doc = "Companion type to ReactionTypeEmoji that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
37999#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38000pub struct NoSkipReactionTypeEmoji {
38001    #[allow(rustdoc::invalid_html_tags)]
38002    #[doc = "Type of the reaction, always \"emoji\""]
38003    #[serde(rename = "type")]
38004    pub tg_type: String,
38005    #[allow(rustdoc::invalid_html_tags)]
38006    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
38007    #[serde(rename = "emoji")]
38008    pub emoji: String,
38009}
38010impl From<NoSkipReactionTypeEmoji> for ReactionTypeEmoji {
38011    fn from(t: NoSkipReactionTypeEmoji) -> Self {
38012        Self {
38013            tg_type: t.tg_type,
38014            emoji: t.emoji,
38015        }
38016    }
38017}
38018#[allow(clippy::from_over_into)]
38019impl Into<NoSkipReactionTypeEmoji> for ReactionTypeEmoji {
38020    fn into(self) -> NoSkipReactionTypeEmoji {
38021        NoSkipReactionTypeEmoji {
38022            tg_type: self.tg_type,
38023            emoji: self.emoji,
38024        }
38025    }
38026}
38027impl NoSkipReactionTypeEmoji {
38028    pub fn skip(self) -> ReactionTypeEmoji {
38029        self.into()
38030    }
38031}
38032impl ReactionTypeEmoji {
38033    pub fn noskip(self) -> NoSkipReactionTypeEmoji {
38034        self.into()
38035    }
38036}
38037#[allow(rustdoc::invalid_html_tags)]
38038#[doc = "The reaction is based on an emoji."]
38039#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38040pub struct ReactionTypeEmojiBuilder {
38041    #[allow(rustdoc::invalid_html_tags)]
38042    #[doc = "Type of the reaction, always \"emoji\""]
38043    #[serde(rename = "type")]
38044    pub tg_type: String,
38045    #[allow(rustdoc::invalid_html_tags)]
38046    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
38047    #[serde(rename = "emoji")]
38048    pub emoji: String,
38049}
38050impl ReactionTypeEmojiBuilder {
38051    #[allow(clippy::too_many_arguments)]
38052    pub fn new(emoji: String) -> Self {
38053        Self {
38054            tg_type: "ReactionTypeEmoji".to_owned(),
38055            emoji,
38056        }
38057    }
38058    #[allow(rustdoc::invalid_html_tags)]
38059    #[doc = "Type of the reaction, always \"emoji\""]
38060    pub fn set_type(mut self, tg_type: String) -> Self {
38061        self.tg_type = tg_type;
38062        self
38063    }
38064    #[allow(rustdoc::invalid_html_tags)]
38065    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
38066    pub fn set_emoji(mut self, emoji: String) -> Self {
38067        self.emoji = emoji;
38068        self
38069    }
38070    pub fn build(self) -> ReactionTypeEmoji {
38071        ReactionTypeEmoji {
38072            tg_type: self.tg_type,
38073            emoji: self.emoji,
38074        }
38075    }
38076}
38077#[derive(Serialize, Deserialize, Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)]
38078#[cfg_attr(feature = "rhai", derive(rhai::CustomType))]
38079pub struct FileBytes {
38080    pub(crate) name: String,
38081    #[serde(skip, default)]
38082    pub(crate) bytes: Option<Vec<u8>>,
38083}
38084pub enum FileData {
38085    Bytes(Vec<u8>),
38086    String(String),
38087    Part(Part),
38088}
38089#[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
38090#[serde(untagged)]
38091pub enum InputFile {
38092    Bytes(FileBytes),
38093    String(String),
38094}
38095impl Default for InputFile {
38096    fn default() -> Self {
38097        InputFile::Bytes(FileBytes {
38098            name: "default".to_owned(),
38099            bytes: None,
38100        })
38101    }
38102}
38103#[doc = r" Generic wrapper around a type on the stack, without a Box\<T\>"]
38104#[derive(Serialize, Deserialize, Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Default)]
38105pub struct Unbox<T>(T);
38106#[doc = r" Abstraction over Box\<T\> and Unbox\<T\>, essentially a smart pointer to data either on stack or heap"]
38107#[derive(Serialize, Deserialize, Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Default)]
38108pub struct BoxWrapper<T>(T);
38109impl<'de, T> BoxWrapper<Box<T>>
38110where
38111    T: Serialize
38112        + Deserialize<'de>
38113        + Clone
38114        + Ord
38115        + PartialOrd
38116        + Eq
38117        + PartialEq
38118        + std::hash::Hash
38119        + std::fmt::Debug,
38120{
38121    #[doc = r" Return a reference to the value contained within this type"]
38122    pub fn inner_ref(&self) -> &'_ T {
38123        &self.0
38124    }
38125    #[doc = r" Consume this type and return the contained value"]
38126    pub fn consume(self) -> T {
38127        *self.0
38128    }
38129    #[doc = r" Constructs a new BoxWrapper from a value"]
38130    pub fn new_box(value: T) -> Self {
38131        Self(Box::new(value))
38132    }
38133}
38134impl<'de, T> BoxWrapper<Unbox<T>>
38135where
38136    T: Serialize
38137        + Deserialize<'de>
38138        + Clone
38139        + Ord
38140        + PartialOrd
38141        + Eq
38142        + PartialEq
38143        + std::hash::Hash
38144        + std::fmt::Debug,
38145{
38146    #[doc = r" Return a reference to the value contained within this type"]
38147    pub fn inner_ref(&self) -> &'_ T {
38148        &self.0 .0
38149    }
38150    #[doc = r" Consume this type and return the contained value"]
38151    pub fn consume(self) -> T {
38152        self.0 .0
38153    }
38154    #[doc = r" Constructs a new BoxWrapper from a value"]
38155    pub fn new_unbox(value: T) -> Self {
38156        Self(Unbox(value))
38157    }
38158}
38159impl<'de, T> std::ops::Deref for BoxWrapper<Box<T>>
38160where
38161    T: Serialize
38162        + Deserialize<'de>
38163        + Clone
38164        + Ord
38165        + PartialOrd
38166        + Eq
38167        + PartialEq
38168        + std::hash::Hash
38169        + std::fmt::Debug,
38170{
38171    type Target = T;
38172    fn deref(&self) -> &Self::Target {
38173        &self.0
38174    }
38175}
38176impl<'de, T> std::ops::Deref for BoxWrapper<Unbox<T>>
38177where
38178    T: Serialize
38179        + Deserialize<'de>
38180        + Clone
38181        + Ord
38182        + PartialOrd
38183        + Eq
38184        + PartialEq
38185        + std::hash::Hash
38186        + std::fmt::Debug,
38187{
38188    type Target = T;
38189    fn deref(&self) -> &Self::Target {
38190        &self.0 .0
38191    }
38192}
38193impl<'de, T> std::convert::AsRef<T> for BoxWrapper<Box<T>>
38194where
38195    T: Serialize
38196        + Deserialize<'de>
38197        + Clone
38198        + Ord
38199        + PartialOrd
38200        + Eq
38201        + PartialEq
38202        + std::hash::Hash
38203        + std::fmt::Debug,
38204{
38205    fn as_ref(&self) -> &T {
38206        self.0.as_ref()
38207    }
38208}
38209impl<'de, T> std::convert::AsRef<T> for BoxWrapper<Unbox<T>>
38210where
38211    T: Serialize
38212        + Deserialize<'de>
38213        + Clone
38214        + Ord
38215        + PartialOrd
38216        + Eq
38217        + PartialEq
38218        + std::hash::Hash
38219        + std::fmt::Debug,
38220{
38221    fn as_ref(&self) -> &T {
38222        &self.0 .0
38223    }
38224}
38225impl<'de, T> From<T> for BoxWrapper<Unbox<T>>
38226where
38227    T: Serialize
38228        + Deserialize<'de>
38229        + Clone
38230        + Ord
38231        + PartialOrd
38232        + Eq
38233        + PartialEq
38234        + std::hash::Hash
38235        + std::fmt::Debug,
38236{
38237    fn from(value: T) -> Self {
38238        Self::new_unbox(value)
38239    }
38240}
38241impl<'de, T> From<T> for BoxWrapper<Box<T>>
38242where
38243    T: Serialize
38244        + Deserialize<'de>
38245        + Clone
38246        + Ord
38247        + PartialOrd
38248        + Eq
38249        + PartialEq
38250        + std::hash::Hash
38251        + std::fmt::Debug,
38252{
38253    fn from(value: T) -> Self {
38254        Self::new_box(value)
38255    }
38256}
38257impl FileData {
38258    pub fn convert_form(self, data: Form, name: String) -> Result<(Form, String)> {
38259        match self {
38260            Self::Bytes(bytes) => {
38261                let attach = format!("attach://{}", name);
38262                let form = data.part(name, Part::bytes(bytes).file_name(""));
38263                Ok((form, attach))
38264            }
38265            Self::Part(part) => {
38266                let attach = format!("attach://{}", name);
38267                let form = data.part(name, part);
38268                Ok((form, attach))
38269            }
38270            Self::String(name) => Ok((data, name)),
38271        }
38272    }
38273}
38274#[allow(rustdoc::invalid_html_tags)]
38275#[doc = "Describes an inline message sent by a Web App on behalf of a user."]
38276#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38277pub struct SentWebAppMessage {
38278    #[allow(rustdoc::invalid_html_tags)]
38279    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
38280    #[serde(
38281        skip_serializing_if = "Option::is_none",
38282        rename = "inline_message_id",
38283        default
38284    )]
38285    pub inline_message_id: Option<String>,
38286}
38287#[allow(rustdoc::invalid_html_tags)]
38288#[doc = "Companion type to SentWebAppMessage that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
38289#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38290pub struct NoSkipSentWebAppMessage {
38291    pub inline_message_id: Option<String>,
38292}
38293impl From<NoSkipSentWebAppMessage> for SentWebAppMessage {
38294    fn from(t: NoSkipSentWebAppMessage) -> Self {
38295        Self {
38296            inline_message_id: t.inline_message_id,
38297        }
38298    }
38299}
38300#[allow(clippy::from_over_into)]
38301impl Into<NoSkipSentWebAppMessage> for SentWebAppMessage {
38302    fn into(self) -> NoSkipSentWebAppMessage {
38303        NoSkipSentWebAppMessage {
38304            inline_message_id: self.inline_message_id,
38305        }
38306    }
38307}
38308impl NoSkipSentWebAppMessage {
38309    pub fn skip(self) -> SentWebAppMessage {
38310        self.into()
38311    }
38312}
38313impl SentWebAppMessage {
38314    pub fn noskip(self) -> NoSkipSentWebAppMessage {
38315        self.into()
38316    }
38317}
38318#[allow(rustdoc::invalid_html_tags)]
38319#[doc = "Describes an inline message sent by a Web App on behalf of a user."]
38320#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38321pub struct SentWebAppMessageBuilder {
38322    #[allow(rustdoc::invalid_html_tags)]
38323    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
38324    #[serde(
38325        skip_serializing_if = "Option::is_none",
38326        rename = "inline_message_id",
38327        default
38328    )]
38329    pub inline_message_id: Option<String>,
38330}
38331impl SentWebAppMessageBuilder {
38332    #[allow(clippy::too_many_arguments)]
38333    pub fn new() -> Self {
38334        Self {
38335            inline_message_id: None,
38336        }
38337    }
38338    #[allow(rustdoc::invalid_html_tags)]
38339    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
38340    pub fn set_inline_message_id(mut self, inline_message_id: String) -> Self {
38341        self.inline_message_id = Some(inline_message_id);
38342        self
38343    }
38344    pub fn build(self) -> SentWebAppMessage {
38345        SentWebAppMessage {
38346            inline_message_id: self.inline_message_id,
38347        }
38348    }
38349}
38350#[allow(rustdoc::invalid_html_tags)]
38351#[doc = "This object represents a message about a scheduled giveaway."]
38352#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38353pub struct Giveaway {
38354    #[allow(rustdoc::invalid_html_tags)]
38355    #[doc = "The list of chats which the user must join to participate in the giveaway"]
38356    #[serde(rename = "chats")]
38357    pub chats: Vec<Chat>,
38358    #[allow(rustdoc::invalid_html_tags)]
38359    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
38360    #[serde(rename = "winners_selection_date")]
38361    pub winners_selection_date: i64,
38362    #[allow(rustdoc::invalid_html_tags)]
38363    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
38364    #[serde(rename = "winner_count")]
38365    pub winner_count: i64,
38366    #[allow(rustdoc::invalid_html_tags)]
38367    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
38368    #[serde(
38369        skip_serializing_if = "Option::is_none",
38370        rename = "only_new_members",
38371        default
38372    )]
38373    pub only_new_members: Option<bool>,
38374    #[allow(rustdoc::invalid_html_tags)]
38375    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
38376    #[serde(
38377        skip_serializing_if = "Option::is_none",
38378        rename = "has_public_winners",
38379        default
38380    )]
38381    pub has_public_winners: Option<bool>,
38382    #[allow(rustdoc::invalid_html_tags)]
38383    #[doc = "Optional. Description of additional giveaway prize"]
38384    #[serde(
38385        skip_serializing_if = "Option::is_none",
38386        rename = "prize_description",
38387        default
38388    )]
38389    pub prize_description: Option<String>,
38390    #[allow(rustdoc::invalid_html_tags)]
38391    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
38392    #[serde(
38393        skip_serializing_if = "Option::is_none",
38394        rename = "country_codes",
38395        default
38396    )]
38397    pub country_codes: Option<Vec<String>>,
38398    #[allow(rustdoc::invalid_html_tags)]
38399    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
38400    #[serde(
38401        skip_serializing_if = "Option::is_none",
38402        rename = "prize_star_count",
38403        default
38404    )]
38405    pub prize_star_count: Option<i64>,
38406    #[allow(rustdoc::invalid_html_tags)]
38407    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
38408    #[serde(
38409        skip_serializing_if = "Option::is_none",
38410        rename = "premium_subscription_month_count",
38411        default
38412    )]
38413    pub premium_subscription_month_count: Option<i64>,
38414}
38415#[allow(rustdoc::invalid_html_tags)]
38416#[doc = "Companion type to Giveaway that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
38417#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38418pub struct NoSkipGiveaway {
38419    #[allow(rustdoc::invalid_html_tags)]
38420    #[doc = "The list of chats which the user must join to participate in the giveaway"]
38421    #[serde(rename = "chats")]
38422    pub chats: Vec<Chat>,
38423    #[allow(rustdoc::invalid_html_tags)]
38424    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
38425    #[serde(rename = "winners_selection_date")]
38426    pub winners_selection_date: i64,
38427    #[allow(rustdoc::invalid_html_tags)]
38428    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
38429    #[serde(rename = "winner_count")]
38430    pub winner_count: i64,
38431    pub only_new_members: Option<bool>,
38432    pub has_public_winners: Option<bool>,
38433    pub prize_description: Option<String>,
38434    pub country_codes: Option<Vec<String>>,
38435    pub prize_star_count: Option<i64>,
38436    pub premium_subscription_month_count: Option<i64>,
38437}
38438impl From<NoSkipGiveaway> for Giveaway {
38439    fn from(t: NoSkipGiveaway) -> Self {
38440        Self {
38441            chats: t.chats,
38442            winners_selection_date: t.winners_selection_date,
38443            winner_count: t.winner_count,
38444            only_new_members: t.only_new_members,
38445            has_public_winners: t.has_public_winners,
38446            prize_description: t.prize_description,
38447            country_codes: t.country_codes,
38448            prize_star_count: t.prize_star_count,
38449            premium_subscription_month_count: t.premium_subscription_month_count,
38450        }
38451    }
38452}
38453#[allow(clippy::from_over_into)]
38454impl Into<NoSkipGiveaway> for Giveaway {
38455    fn into(self) -> NoSkipGiveaway {
38456        NoSkipGiveaway {
38457            chats: self.chats,
38458            winners_selection_date: self.winners_selection_date,
38459            winner_count: self.winner_count,
38460            only_new_members: self.only_new_members,
38461            has_public_winners: self.has_public_winners,
38462            prize_description: self.prize_description,
38463            country_codes: self.country_codes,
38464            prize_star_count: self.prize_star_count,
38465            premium_subscription_month_count: self.premium_subscription_month_count,
38466        }
38467    }
38468}
38469impl NoSkipGiveaway {
38470    pub fn skip(self) -> Giveaway {
38471        self.into()
38472    }
38473}
38474impl Giveaway {
38475    pub fn noskip(self) -> NoSkipGiveaway {
38476        self.into()
38477    }
38478}
38479#[allow(rustdoc::invalid_html_tags)]
38480#[doc = "This object represents a message about a scheduled giveaway."]
38481#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38482pub struct GiveawayBuilder {
38483    #[allow(rustdoc::invalid_html_tags)]
38484    #[doc = "The list of chats which the user must join to participate in the giveaway"]
38485    #[serde(rename = "chats")]
38486    pub chats: Vec<Chat>,
38487    #[allow(rustdoc::invalid_html_tags)]
38488    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
38489    #[serde(rename = "winners_selection_date")]
38490    pub winners_selection_date: i64,
38491    #[allow(rustdoc::invalid_html_tags)]
38492    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
38493    #[serde(rename = "winner_count")]
38494    pub winner_count: i64,
38495    #[allow(rustdoc::invalid_html_tags)]
38496    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
38497    #[serde(
38498        skip_serializing_if = "Option::is_none",
38499        rename = "only_new_members",
38500        default
38501    )]
38502    pub only_new_members: Option<bool>,
38503    #[allow(rustdoc::invalid_html_tags)]
38504    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
38505    #[serde(
38506        skip_serializing_if = "Option::is_none",
38507        rename = "has_public_winners",
38508        default
38509    )]
38510    pub has_public_winners: Option<bool>,
38511    #[allow(rustdoc::invalid_html_tags)]
38512    #[doc = "Optional. Description of additional giveaway prize"]
38513    #[serde(
38514        skip_serializing_if = "Option::is_none",
38515        rename = "prize_description",
38516        default
38517    )]
38518    pub prize_description: Option<String>,
38519    #[allow(rustdoc::invalid_html_tags)]
38520    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
38521    #[serde(
38522        skip_serializing_if = "Option::is_none",
38523        rename = "country_codes",
38524        default
38525    )]
38526    pub country_codes: Option<Vec<String>>,
38527    #[allow(rustdoc::invalid_html_tags)]
38528    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
38529    #[serde(
38530        skip_serializing_if = "Option::is_none",
38531        rename = "prize_star_count",
38532        default
38533    )]
38534    pub prize_star_count: Option<i64>,
38535    #[allow(rustdoc::invalid_html_tags)]
38536    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
38537    #[serde(
38538        skip_serializing_if = "Option::is_none",
38539        rename = "premium_subscription_month_count",
38540        default
38541    )]
38542    pub premium_subscription_month_count: Option<i64>,
38543}
38544impl GiveawayBuilder {
38545    #[allow(clippy::too_many_arguments)]
38546    pub fn new(chats: Vec<Chat>, winners_selection_date: i64, winner_count: i64) -> Self {
38547        Self {
38548            chats,
38549            winners_selection_date,
38550            winner_count,
38551            only_new_members: None,
38552            has_public_winners: None,
38553            prize_description: None,
38554            country_codes: None,
38555            prize_star_count: None,
38556            premium_subscription_month_count: None,
38557        }
38558    }
38559    #[allow(rustdoc::invalid_html_tags)]
38560    #[doc = "The list of chats which the user must join to participate in the giveaway"]
38561    pub fn set_chats(mut self, chats: Vec<Chat>) -> Self {
38562        self.chats = chats;
38563        self
38564    }
38565    #[allow(rustdoc::invalid_html_tags)]
38566    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
38567    pub fn set_winners_selection_date(mut self, winners_selection_date: i64) -> Self {
38568        self.winners_selection_date = winners_selection_date;
38569        self
38570    }
38571    #[allow(rustdoc::invalid_html_tags)]
38572    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
38573    pub fn set_winner_count(mut self, winner_count: i64) -> Self {
38574        self.winner_count = winner_count;
38575        self
38576    }
38577    #[allow(rustdoc::invalid_html_tags)]
38578    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
38579    pub fn set_only_new_members(mut self, only_new_members: bool) -> Self {
38580        self.only_new_members = Some(only_new_members);
38581        self
38582    }
38583    #[allow(rustdoc::invalid_html_tags)]
38584    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
38585    pub fn set_has_public_winners(mut self, has_public_winners: bool) -> Self {
38586        self.has_public_winners = Some(has_public_winners);
38587        self
38588    }
38589    #[allow(rustdoc::invalid_html_tags)]
38590    #[doc = "Optional. Description of additional giveaway prize"]
38591    pub fn set_prize_description(mut self, prize_description: String) -> Self {
38592        self.prize_description = Some(prize_description);
38593        self
38594    }
38595    #[allow(rustdoc::invalid_html_tags)]
38596    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
38597    pub fn set_country_codes(mut self, country_codes: Vec<String>) -> Self {
38598        self.country_codes = Some(country_codes);
38599        self
38600    }
38601    #[allow(rustdoc::invalid_html_tags)]
38602    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
38603    pub fn set_prize_star_count(mut self, prize_star_count: i64) -> Self {
38604        self.prize_star_count = Some(prize_star_count);
38605        self
38606    }
38607    #[allow(rustdoc::invalid_html_tags)]
38608    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
38609    pub fn set_premium_subscription_month_count(
38610        mut self,
38611        premium_subscription_month_count: i64,
38612    ) -> Self {
38613        self.premium_subscription_month_count = Some(premium_subscription_month_count);
38614        self
38615    }
38616    pub fn build(self) -> Giveaway {
38617        Giveaway {
38618            chats: self.chats,
38619            winners_selection_date: self.winners_selection_date,
38620            winner_count: self.winner_count,
38621            only_new_members: self.only_new_members,
38622            has_public_winners: self.has_public_winners,
38623            prize_description: self.prize_description,
38624            country_codes: self.country_codes,
38625            prize_star_count: self.prize_star_count,
38626            premium_subscription_month_count: self.premium_subscription_month_count,
38627        }
38628    }
38629}
38630#[allow(rustdoc::invalid_html_tags)]
38631#[doc = "Describes a topic of a direct messages chat."]
38632#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38633pub struct DirectMessagesTopic {
38634    #[allow(rustdoc::invalid_html_tags)]
38635    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
38636    #[serde(rename = "topic_id")]
38637    pub topic_id: i64,
38638    #[allow(rustdoc::invalid_html_tags)]
38639    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
38640    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
38641    pub user: Option<BoxWrapper<Unbox<User>>>,
38642}
38643#[allow(rustdoc::invalid_html_tags)]
38644#[doc = "Companion type to DirectMessagesTopic that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
38645#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38646pub struct NoSkipDirectMessagesTopic {
38647    #[allow(rustdoc::invalid_html_tags)]
38648    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
38649    #[serde(rename = "topic_id")]
38650    pub topic_id: i64,
38651    pub user: Option<BoxWrapper<Unbox<User>>>,
38652}
38653impl From<NoSkipDirectMessagesTopic> for DirectMessagesTopic {
38654    fn from(t: NoSkipDirectMessagesTopic) -> Self {
38655        Self {
38656            topic_id: t.topic_id,
38657            user: t.user,
38658        }
38659    }
38660}
38661#[allow(clippy::from_over_into)]
38662impl Into<NoSkipDirectMessagesTopic> for DirectMessagesTopic {
38663    fn into(self) -> NoSkipDirectMessagesTopic {
38664        NoSkipDirectMessagesTopic {
38665            topic_id: self.topic_id,
38666            user: self.user,
38667        }
38668    }
38669}
38670impl NoSkipDirectMessagesTopic {
38671    pub fn skip(self) -> DirectMessagesTopic {
38672        self.into()
38673    }
38674}
38675impl DirectMessagesTopic {
38676    pub fn noskip(self) -> NoSkipDirectMessagesTopic {
38677        self.into()
38678    }
38679}
38680#[allow(rustdoc::invalid_html_tags)]
38681#[doc = "Describes a topic of a direct messages chat."]
38682#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38683pub struct DirectMessagesTopicBuilder {
38684    #[allow(rustdoc::invalid_html_tags)]
38685    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
38686    #[serde(rename = "topic_id")]
38687    pub topic_id: i64,
38688    #[allow(rustdoc::invalid_html_tags)]
38689    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
38690    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
38691    pub user: Option<BoxWrapper<Unbox<User>>>,
38692}
38693impl DirectMessagesTopicBuilder {
38694    #[allow(clippy::too_many_arguments)]
38695    pub fn new(topic_id: i64) -> Self {
38696        Self {
38697            topic_id,
38698            user: None,
38699        }
38700    }
38701    #[allow(rustdoc::invalid_html_tags)]
38702    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
38703    pub fn set_topic_id(mut self, topic_id: i64) -> Self {
38704        self.topic_id = topic_id;
38705        self
38706    }
38707    #[allow(rustdoc::invalid_html_tags)]
38708    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
38709    pub fn set_user(mut self, user: User) -> Self {
38710        self.user = Some(BoxWrapper(Unbox(user)));
38711        self
38712    }
38713    pub fn build(self) -> DirectMessagesTopic {
38714        DirectMessagesTopic {
38715            topic_id: self.topic_id,
38716            user: self.user,
38717        }
38718    }
38719}
38720#[allow(rustdoc::invalid_html_tags)]
38721#[doc = "The withdrawal succeeded."]
38722#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38723pub struct RevenueWithdrawalStateSucceeded {
38724    #[allow(rustdoc::invalid_html_tags)]
38725    #[doc = "Type of the state, always \"succeeded\""]
38726    #[serde(rename = "type")]
38727    pub tg_type: String,
38728    #[allow(rustdoc::invalid_html_tags)]
38729    #[doc = "Date the withdrawal was completed in Unix time"]
38730    #[serde(rename = "date")]
38731    pub date: i64,
38732    #[allow(rustdoc::invalid_html_tags)]
38733    #[doc = "An HTTPS URL that can be used to see transaction details"]
38734    #[serde(rename = "url")]
38735    pub url: String,
38736}
38737#[allow(rustdoc::invalid_html_tags)]
38738#[doc = "Companion type to RevenueWithdrawalStateSucceeded that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
38739#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38740pub struct NoSkipRevenueWithdrawalStateSucceeded {
38741    #[allow(rustdoc::invalid_html_tags)]
38742    #[doc = "Type of the state, always \"succeeded\""]
38743    #[serde(rename = "type")]
38744    pub tg_type: String,
38745    #[allow(rustdoc::invalid_html_tags)]
38746    #[doc = "Date the withdrawal was completed in Unix time"]
38747    #[serde(rename = "date")]
38748    pub date: i64,
38749    #[allow(rustdoc::invalid_html_tags)]
38750    #[doc = "An HTTPS URL that can be used to see transaction details"]
38751    #[serde(rename = "url")]
38752    pub url: String,
38753}
38754impl From<NoSkipRevenueWithdrawalStateSucceeded> for RevenueWithdrawalStateSucceeded {
38755    fn from(t: NoSkipRevenueWithdrawalStateSucceeded) -> Self {
38756        Self {
38757            tg_type: t.tg_type,
38758            date: t.date,
38759            url: t.url,
38760        }
38761    }
38762}
38763#[allow(clippy::from_over_into)]
38764impl Into<NoSkipRevenueWithdrawalStateSucceeded> for RevenueWithdrawalStateSucceeded {
38765    fn into(self) -> NoSkipRevenueWithdrawalStateSucceeded {
38766        NoSkipRevenueWithdrawalStateSucceeded {
38767            tg_type: self.tg_type,
38768            date: self.date,
38769            url: self.url,
38770        }
38771    }
38772}
38773impl NoSkipRevenueWithdrawalStateSucceeded {
38774    pub fn skip(self) -> RevenueWithdrawalStateSucceeded {
38775        self.into()
38776    }
38777}
38778impl RevenueWithdrawalStateSucceeded {
38779    pub fn noskip(self) -> NoSkipRevenueWithdrawalStateSucceeded {
38780        self.into()
38781    }
38782}
38783#[allow(rustdoc::invalid_html_tags)]
38784#[doc = "The withdrawal succeeded."]
38785#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38786pub struct RevenueWithdrawalStateSucceededBuilder {
38787    #[allow(rustdoc::invalid_html_tags)]
38788    #[doc = "Type of the state, always \"succeeded\""]
38789    #[serde(rename = "type")]
38790    pub tg_type: String,
38791    #[allow(rustdoc::invalid_html_tags)]
38792    #[doc = "Date the withdrawal was completed in Unix time"]
38793    #[serde(rename = "date")]
38794    pub date: i64,
38795    #[allow(rustdoc::invalid_html_tags)]
38796    #[doc = "An HTTPS URL that can be used to see transaction details"]
38797    #[serde(rename = "url")]
38798    pub url: String,
38799}
38800impl RevenueWithdrawalStateSucceededBuilder {
38801    #[allow(clippy::too_many_arguments)]
38802    pub fn new(date: i64, url: String) -> Self {
38803        Self {
38804            tg_type: "RevenueWithdrawalStateSucceeded".to_owned(),
38805            date,
38806            url,
38807        }
38808    }
38809    #[allow(rustdoc::invalid_html_tags)]
38810    #[doc = "Type of the state, always \"succeeded\""]
38811    pub fn set_type(mut self, tg_type: String) -> Self {
38812        self.tg_type = tg_type;
38813        self
38814    }
38815    #[allow(rustdoc::invalid_html_tags)]
38816    #[doc = "Date the withdrawal was completed in Unix time"]
38817    pub fn set_date(mut self, date: i64) -> Self {
38818        self.date = date;
38819        self
38820    }
38821    #[allow(rustdoc::invalid_html_tags)]
38822    #[doc = "An HTTPS URL that can be used to see transaction details"]
38823    pub fn set_url(mut self, url: String) -> Self {
38824        self.url = url;
38825        self
38826    }
38827    pub fn build(self) -> RevenueWithdrawalStateSucceeded {
38828        RevenueWithdrawalStateSucceeded {
38829            tg_type: self.tg_type,
38830            date: self.date,
38831            url: self.url,
38832        }
38833    }
38834}
38835#[allow(rustdoc::invalid_html_tags)]
38836#[doc = "This object represents a service message about a video chat ended in the chat."]
38837#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38838pub struct VideoChatEnded {
38839    #[allow(rustdoc::invalid_html_tags)]
38840    #[doc = "Video chat duration in seconds"]
38841    #[serde(rename = "duration")]
38842    pub duration: i64,
38843}
38844#[allow(rustdoc::invalid_html_tags)]
38845#[doc = "Companion type to VideoChatEnded that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
38846#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38847pub struct NoSkipVideoChatEnded {
38848    #[allow(rustdoc::invalid_html_tags)]
38849    #[doc = "Video chat duration in seconds"]
38850    #[serde(rename = "duration")]
38851    pub duration: i64,
38852}
38853impl From<NoSkipVideoChatEnded> for VideoChatEnded {
38854    fn from(t: NoSkipVideoChatEnded) -> Self {
38855        Self {
38856            duration: t.duration,
38857        }
38858    }
38859}
38860#[allow(clippy::from_over_into)]
38861impl Into<NoSkipVideoChatEnded> for VideoChatEnded {
38862    fn into(self) -> NoSkipVideoChatEnded {
38863        NoSkipVideoChatEnded {
38864            duration: self.duration,
38865        }
38866    }
38867}
38868impl NoSkipVideoChatEnded {
38869    pub fn skip(self) -> VideoChatEnded {
38870        self.into()
38871    }
38872}
38873impl VideoChatEnded {
38874    pub fn noskip(self) -> NoSkipVideoChatEnded {
38875        self.into()
38876    }
38877}
38878#[allow(rustdoc::invalid_html_tags)]
38879#[doc = "This object represents a service message about a video chat ended in the chat."]
38880#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38881pub struct VideoChatEndedBuilder {
38882    #[allow(rustdoc::invalid_html_tags)]
38883    #[doc = "Video chat duration in seconds"]
38884    #[serde(rename = "duration")]
38885    pub duration: i64,
38886}
38887impl VideoChatEndedBuilder {
38888    #[allow(clippy::too_many_arguments)]
38889    pub fn new(duration: i64) -> Self {
38890        Self { duration }
38891    }
38892    #[allow(rustdoc::invalid_html_tags)]
38893    #[doc = "Video chat duration in seconds"]
38894    pub fn set_duration(mut self, duration: i64) -> Self {
38895        self.duration = duration;
38896        self
38897    }
38898    pub fn build(self) -> VideoChatEnded {
38899        VideoChatEnded {
38900            duration: self.duration,
38901        }
38902    }
38903}
38904#[allow(rustdoc::invalid_html_tags)]
38905#[doc = "Represents a chat member that owns the chat and has all administrator privileges."]
38906#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38907pub struct ChatMemberOwner {
38908    #[allow(rustdoc::invalid_html_tags)]
38909    #[doc = "Information about the user"]
38910    #[serde(rename = "user")]
38911    pub user: BoxWrapper<Unbox<User>>,
38912    #[allow(rustdoc::invalid_html_tags)]
38913    #[doc = "True, if the user's presence in the chat is hidden"]
38914    #[serde(rename = "is_anonymous")]
38915    pub is_anonymous: bool,
38916    #[allow(rustdoc::invalid_html_tags)]
38917    #[doc = "Optional. Custom title for this user"]
38918    #[serde(
38919        skip_serializing_if = "Option::is_none",
38920        rename = "custom_title",
38921        default
38922    )]
38923    pub custom_title: Option<String>,
38924}
38925#[allow(rustdoc::invalid_html_tags)]
38926#[doc = "Companion type to ChatMemberOwner that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
38927#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38928pub struct NoSkipChatMemberOwner {
38929    #[allow(rustdoc::invalid_html_tags)]
38930    #[doc = "Information about the user"]
38931    #[serde(rename = "user")]
38932    pub user: BoxWrapper<Unbox<User>>,
38933    #[allow(rustdoc::invalid_html_tags)]
38934    #[doc = "True, if the user's presence in the chat is hidden"]
38935    #[serde(rename = "is_anonymous")]
38936    pub is_anonymous: bool,
38937    pub custom_title: Option<String>,
38938}
38939impl From<NoSkipChatMemberOwner> for ChatMemberOwner {
38940    fn from(t: NoSkipChatMemberOwner) -> Self {
38941        Self {
38942            user: t.user,
38943            is_anonymous: t.is_anonymous,
38944            custom_title: t.custom_title,
38945        }
38946    }
38947}
38948#[allow(clippy::from_over_into)]
38949impl Into<NoSkipChatMemberOwner> for ChatMemberOwner {
38950    fn into(self) -> NoSkipChatMemberOwner {
38951        NoSkipChatMemberOwner {
38952            user: self.user,
38953            is_anonymous: self.is_anonymous,
38954            custom_title: self.custom_title,
38955        }
38956    }
38957}
38958impl NoSkipChatMemberOwner {
38959    pub fn skip(self) -> ChatMemberOwner {
38960        self.into()
38961    }
38962}
38963impl ChatMemberOwner {
38964    pub fn noskip(self) -> NoSkipChatMemberOwner {
38965        self.into()
38966    }
38967}
38968#[allow(rustdoc::invalid_html_tags)]
38969#[doc = "Represents a chat member that owns the chat and has all administrator privileges."]
38970#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
38971pub struct ChatMemberOwnerBuilder {
38972    #[allow(rustdoc::invalid_html_tags)]
38973    #[doc = "Information about the user"]
38974    #[serde(rename = "user")]
38975    pub user: BoxWrapper<Unbox<User>>,
38976    #[allow(rustdoc::invalid_html_tags)]
38977    #[doc = "True, if the user's presence in the chat is hidden"]
38978    #[serde(rename = "is_anonymous")]
38979    pub is_anonymous: bool,
38980    #[allow(rustdoc::invalid_html_tags)]
38981    #[doc = "Optional. Custom title for this user"]
38982    #[serde(
38983        skip_serializing_if = "Option::is_none",
38984        rename = "custom_title",
38985        default
38986    )]
38987    pub custom_title: Option<String>,
38988}
38989impl ChatMemberOwnerBuilder {
38990    #[allow(clippy::too_many_arguments)]
38991    pub fn new<A: Into<User>>(user: A, is_anonymous: bool) -> Self {
38992        Self {
38993            user: BoxWrapper::new_unbox(user.into()),
38994            is_anonymous,
38995            custom_title: None,
38996        }
38997    }
38998    #[allow(rustdoc::invalid_html_tags)]
38999    #[doc = "Information about the user"]
39000    pub fn set_user(mut self, user: User) -> Self {
39001        self.user = BoxWrapper(Unbox(user));
39002        self
39003    }
39004    #[allow(rustdoc::invalid_html_tags)]
39005    #[doc = "True, if the user's presence in the chat is hidden"]
39006    pub fn set_is_anonymous(mut self, is_anonymous: bool) -> Self {
39007        self.is_anonymous = is_anonymous;
39008        self
39009    }
39010    #[allow(rustdoc::invalid_html_tags)]
39011    #[doc = "Optional. Custom title for this user"]
39012    pub fn set_custom_title(mut self, custom_title: String) -> Self {
39013        self.custom_title = Some(custom_title);
39014        self
39015    }
39016    pub fn build(self) -> ChatMemberOwner {
39017        ChatMemberOwner {
39018            user: self.user,
39019            is_anonymous: self.is_anonymous,
39020            custom_title: self.custom_title,
39021        }
39022    }
39023}
39024#[allow(rustdoc::invalid_html_tags)]
39025#[doc = "This object contains information about an incoming pre-checkout query."]
39026#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39027pub struct PreCheckoutQuery {
39028    #[allow(rustdoc::invalid_html_tags)]
39029    #[doc = "Unique query identifier"]
39030    #[serde(rename = "id")]
39031    pub id: String,
39032    #[allow(rustdoc::invalid_html_tags)]
39033    #[doc = "User who sent the query"]
39034    #[serde(rename = "from")]
39035    pub from: BoxWrapper<Unbox<User>>,
39036    #[allow(rustdoc::invalid_html_tags)]
39037    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
39038    #[serde(rename = "currency")]
39039    pub currency: String,
39040    #[allow(rustdoc::invalid_html_tags)]
39041    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
39042    #[serde(rename = "total_amount")]
39043    pub total_amount: i64,
39044    #[allow(rustdoc::invalid_html_tags)]
39045    #[doc = "Bot-specified invoice payload"]
39046    #[serde(rename = "invoice_payload")]
39047    pub invoice_payload: String,
39048    #[allow(rustdoc::invalid_html_tags)]
39049    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
39050    #[serde(
39051        skip_serializing_if = "Option::is_none",
39052        rename = "shipping_option_id",
39053        default
39054    )]
39055    pub shipping_option_id: Option<String>,
39056    #[allow(rustdoc::invalid_html_tags)]
39057    #[doc = "Optional. Order information provided by the user"]
39058    #[serde(
39059        skip_serializing_if = "Option::is_none",
39060        rename = "order_info",
39061        default
39062    )]
39063    pub order_info: Option<BoxWrapper<Unbox<OrderInfo>>>,
39064}
39065#[allow(rustdoc::invalid_html_tags)]
39066#[doc = "Companion type to PreCheckoutQuery that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
39067#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39068pub struct NoSkipPreCheckoutQuery {
39069    #[allow(rustdoc::invalid_html_tags)]
39070    #[doc = "Unique query identifier"]
39071    #[serde(rename = "id")]
39072    pub id: String,
39073    #[allow(rustdoc::invalid_html_tags)]
39074    #[doc = "User who sent the query"]
39075    #[serde(rename = "from")]
39076    pub from: BoxWrapper<Unbox<User>>,
39077    #[allow(rustdoc::invalid_html_tags)]
39078    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
39079    #[serde(rename = "currency")]
39080    pub currency: String,
39081    #[allow(rustdoc::invalid_html_tags)]
39082    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
39083    #[serde(rename = "total_amount")]
39084    pub total_amount: i64,
39085    #[allow(rustdoc::invalid_html_tags)]
39086    #[doc = "Bot-specified invoice payload"]
39087    #[serde(rename = "invoice_payload")]
39088    pub invoice_payload: String,
39089    pub shipping_option_id: Option<String>,
39090    pub order_info: Option<BoxWrapper<Unbox<OrderInfo>>>,
39091}
39092impl From<NoSkipPreCheckoutQuery> for PreCheckoutQuery {
39093    fn from(t: NoSkipPreCheckoutQuery) -> Self {
39094        Self {
39095            id: t.id,
39096            from: t.from,
39097            currency: t.currency,
39098            total_amount: t.total_amount,
39099            invoice_payload: t.invoice_payload,
39100            shipping_option_id: t.shipping_option_id,
39101            order_info: t.order_info,
39102        }
39103    }
39104}
39105#[allow(clippy::from_over_into)]
39106impl Into<NoSkipPreCheckoutQuery> for PreCheckoutQuery {
39107    fn into(self) -> NoSkipPreCheckoutQuery {
39108        NoSkipPreCheckoutQuery {
39109            id: self.id,
39110            from: self.from,
39111            currency: self.currency,
39112            total_amount: self.total_amount,
39113            invoice_payload: self.invoice_payload,
39114            shipping_option_id: self.shipping_option_id,
39115            order_info: self.order_info,
39116        }
39117    }
39118}
39119impl NoSkipPreCheckoutQuery {
39120    pub fn skip(self) -> PreCheckoutQuery {
39121        self.into()
39122    }
39123}
39124impl PreCheckoutQuery {
39125    pub fn noskip(self) -> NoSkipPreCheckoutQuery {
39126        self.into()
39127    }
39128}
39129#[allow(rustdoc::invalid_html_tags)]
39130#[doc = "This object contains information about an incoming pre-checkout query."]
39131#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39132pub struct PreCheckoutQueryBuilder {
39133    #[allow(rustdoc::invalid_html_tags)]
39134    #[doc = "Unique query identifier"]
39135    #[serde(rename = "id")]
39136    pub id: String,
39137    #[allow(rustdoc::invalid_html_tags)]
39138    #[doc = "User who sent the query"]
39139    #[serde(rename = "from")]
39140    pub from: BoxWrapper<Unbox<User>>,
39141    #[allow(rustdoc::invalid_html_tags)]
39142    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
39143    #[serde(rename = "currency")]
39144    pub currency: String,
39145    #[allow(rustdoc::invalid_html_tags)]
39146    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
39147    #[serde(rename = "total_amount")]
39148    pub total_amount: i64,
39149    #[allow(rustdoc::invalid_html_tags)]
39150    #[doc = "Bot-specified invoice payload"]
39151    #[serde(rename = "invoice_payload")]
39152    pub invoice_payload: String,
39153    #[allow(rustdoc::invalid_html_tags)]
39154    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
39155    #[serde(
39156        skip_serializing_if = "Option::is_none",
39157        rename = "shipping_option_id",
39158        default
39159    )]
39160    pub shipping_option_id: Option<String>,
39161    #[allow(rustdoc::invalid_html_tags)]
39162    #[doc = "Optional. Order information provided by the user"]
39163    #[serde(
39164        skip_serializing_if = "Option::is_none",
39165        rename = "order_info",
39166        default
39167    )]
39168    pub order_info: Option<BoxWrapper<Unbox<OrderInfo>>>,
39169}
39170impl PreCheckoutQueryBuilder {
39171    #[allow(clippy::too_many_arguments)]
39172    pub fn new<A: Into<User>>(
39173        id: String,
39174        from: A,
39175        currency: String,
39176        total_amount: i64,
39177        invoice_payload: String,
39178    ) -> Self {
39179        Self {
39180            id,
39181            from: BoxWrapper::new_unbox(from.into()),
39182            currency,
39183            total_amount,
39184            invoice_payload,
39185            shipping_option_id: None,
39186            order_info: None,
39187        }
39188    }
39189    #[allow(rustdoc::invalid_html_tags)]
39190    #[doc = "Unique query identifier"]
39191    pub fn set_id(mut self, id: String) -> Self {
39192        self.id = id;
39193        self
39194    }
39195    #[allow(rustdoc::invalid_html_tags)]
39196    #[doc = "User who sent the query"]
39197    pub fn set_from(mut self, from: User) -> Self {
39198        self.from = BoxWrapper(Unbox(from));
39199        self
39200    }
39201    #[allow(rustdoc::invalid_html_tags)]
39202    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
39203    pub fn set_currency(mut self, currency: String) -> Self {
39204        self.currency = currency;
39205        self
39206    }
39207    #[allow(rustdoc::invalid_html_tags)]
39208    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
39209    pub fn set_total_amount(mut self, total_amount: i64) -> Self {
39210        self.total_amount = total_amount;
39211        self
39212    }
39213    #[allow(rustdoc::invalid_html_tags)]
39214    #[doc = "Bot-specified invoice payload"]
39215    pub fn set_invoice_payload(mut self, invoice_payload: String) -> Self {
39216        self.invoice_payload = invoice_payload;
39217        self
39218    }
39219    #[allow(rustdoc::invalid_html_tags)]
39220    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
39221    pub fn set_shipping_option_id(mut self, shipping_option_id: String) -> Self {
39222        self.shipping_option_id = Some(shipping_option_id);
39223        self
39224    }
39225    #[allow(rustdoc::invalid_html_tags)]
39226    #[doc = "Optional. Order information provided by the user"]
39227    pub fn set_order_info(mut self, order_info: OrderInfo) -> Self {
39228        self.order_info = Some(BoxWrapper(Unbox(order_info)));
39229        self
39230    }
39231    pub fn build(self) -> PreCheckoutQuery {
39232        PreCheckoutQuery {
39233            id: self.id,
39234            from: self.from,
39235            currency: self.currency,
39236            total_amount: self.total_amount,
39237            invoice_payload: self.invoice_payload,
39238            shipping_option_id: self.shipping_option_id,
39239            order_info: self.order_info,
39240        }
39241    }
39242}
39243#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39244#[serde(untagged)]
39245pub enum BackgroundType {
39246    BackgroundTypeFill(BackgroundTypeFill),
39247    BackgroundTypeWallpaper(BackgroundTypeWallpaper),
39248    BackgroundTypePattern(BackgroundTypePattern),
39249    BackgroundTypeChatTheme(BackgroundTypeChatTheme),
39250}
39251impl Default for BackgroundType {
39252    fn default() -> Self {
39253        BackgroundType::BackgroundTypeFill(BackgroundTypeFill::default())
39254    }
39255}
39256impl BackgroundType {}
39257#[allow(rustdoc::invalid_html_tags)]
39258#[doc = "Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue."]
39259#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39260pub struct InlineQueryResultVenue {
39261    #[allow(rustdoc::invalid_html_tags)]
39262    #[doc = "Type of the result, must be venue"]
39263    #[serde(rename = "type")]
39264    pub tg_type: String,
39265    #[allow(rustdoc::invalid_html_tags)]
39266    #[doc = "Unique identifier for this result, 1-64 Bytes"]
39267    #[serde(rename = "id")]
39268    pub id: String,
39269    #[allow(rustdoc::invalid_html_tags)]
39270    #[doc = "Latitude of the venue location in degrees"]
39271    #[serde(rename = "latitude")]
39272    pub latitude: ::ordered_float::OrderedFloat<f64>,
39273    #[allow(rustdoc::invalid_html_tags)]
39274    #[doc = "Longitude of the venue location in degrees"]
39275    #[serde(rename = "longitude")]
39276    pub longitude: ::ordered_float::OrderedFloat<f64>,
39277    #[allow(rustdoc::invalid_html_tags)]
39278    #[doc = "Title of the venue"]
39279    #[serde(rename = "title")]
39280    pub title: String,
39281    #[allow(rustdoc::invalid_html_tags)]
39282    #[doc = "Address of the venue"]
39283    #[serde(rename = "address")]
39284    pub address: String,
39285    #[allow(rustdoc::invalid_html_tags)]
39286    #[doc = "Optional. Foursquare identifier of the venue if known"]
39287    #[serde(
39288        skip_serializing_if = "Option::is_none",
39289        rename = "foursquare_id",
39290        default
39291    )]
39292    pub foursquare_id: Option<String>,
39293    #[allow(rustdoc::invalid_html_tags)]
39294    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
39295    #[serde(
39296        skip_serializing_if = "Option::is_none",
39297        rename = "foursquare_type",
39298        default
39299    )]
39300    pub foursquare_type: Option<String>,
39301    #[allow(rustdoc::invalid_html_tags)]
39302    #[doc = "Optional. Google Places identifier of the venue"]
39303    #[serde(
39304        skip_serializing_if = "Option::is_none",
39305        rename = "google_place_id",
39306        default
39307    )]
39308    pub google_place_id: Option<String>,
39309    #[allow(rustdoc::invalid_html_tags)]
39310    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
39311    #[serde(
39312        skip_serializing_if = "Option::is_none",
39313        rename = "google_place_type",
39314        default
39315    )]
39316    pub google_place_type: Option<String>,
39317    #[allow(rustdoc::invalid_html_tags)]
39318    #[doc = "Optional. Inline keyboard attached to the message"]
39319    #[serde(
39320        skip_serializing_if = "Option::is_none",
39321        rename = "reply_markup",
39322        default
39323    )]
39324    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
39325    #[allow(rustdoc::invalid_html_tags)]
39326    #[doc = "Optional. Content of the message to be sent instead of the venue"]
39327    #[serde(
39328        skip_serializing_if = "Option::is_none",
39329        rename = "input_message_content",
39330        default
39331    )]
39332    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
39333    #[allow(rustdoc::invalid_html_tags)]
39334    #[doc = "Optional. Url of the thumbnail for the result"]
39335    #[serde(
39336        skip_serializing_if = "Option::is_none",
39337        rename = "thumbnail_url",
39338        default
39339    )]
39340    pub thumbnail_url: Option<String>,
39341    #[allow(rustdoc::invalid_html_tags)]
39342    #[doc = "Optional. Thumbnail width"]
39343    #[serde(
39344        skip_serializing_if = "Option::is_none",
39345        rename = "thumbnail_width",
39346        default
39347    )]
39348    pub thumbnail_width: Option<i64>,
39349    #[allow(rustdoc::invalid_html_tags)]
39350    #[doc = "Optional. Thumbnail height"]
39351    #[serde(
39352        skip_serializing_if = "Option::is_none",
39353        rename = "thumbnail_height",
39354        default
39355    )]
39356    pub thumbnail_height: Option<i64>,
39357}
39358#[allow(rustdoc::invalid_html_tags)]
39359#[doc = "Companion type to InlineQueryResultVenue that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
39360#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39361pub struct NoSkipInlineQueryResultVenue {
39362    #[allow(rustdoc::invalid_html_tags)]
39363    #[doc = "Type of the result, must be venue"]
39364    #[serde(rename = "type")]
39365    pub tg_type: String,
39366    #[allow(rustdoc::invalid_html_tags)]
39367    #[doc = "Unique identifier for this result, 1-64 Bytes"]
39368    #[serde(rename = "id")]
39369    pub id: String,
39370    #[allow(rustdoc::invalid_html_tags)]
39371    #[doc = "Latitude of the venue location in degrees"]
39372    #[serde(rename = "latitude")]
39373    pub latitude: ::ordered_float::OrderedFloat<f64>,
39374    #[allow(rustdoc::invalid_html_tags)]
39375    #[doc = "Longitude of the venue location in degrees"]
39376    #[serde(rename = "longitude")]
39377    pub longitude: ::ordered_float::OrderedFloat<f64>,
39378    #[allow(rustdoc::invalid_html_tags)]
39379    #[doc = "Title of the venue"]
39380    #[serde(rename = "title")]
39381    pub title: String,
39382    #[allow(rustdoc::invalid_html_tags)]
39383    #[doc = "Address of the venue"]
39384    #[serde(rename = "address")]
39385    pub address: String,
39386    pub foursquare_id: Option<String>,
39387    pub foursquare_type: Option<String>,
39388    pub google_place_id: Option<String>,
39389    pub google_place_type: Option<String>,
39390    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
39391    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
39392    pub thumbnail_url: Option<String>,
39393    pub thumbnail_width: Option<i64>,
39394    pub thumbnail_height: Option<i64>,
39395}
39396impl From<NoSkipInlineQueryResultVenue> for InlineQueryResultVenue {
39397    fn from(t: NoSkipInlineQueryResultVenue) -> Self {
39398        Self {
39399            tg_type: t.tg_type,
39400            id: t.id,
39401            latitude: t.latitude,
39402            longitude: t.longitude,
39403            title: t.title,
39404            address: t.address,
39405            foursquare_id: t.foursquare_id,
39406            foursquare_type: t.foursquare_type,
39407            google_place_id: t.google_place_id,
39408            google_place_type: t.google_place_type,
39409            reply_markup: t.reply_markup,
39410            input_message_content: t.input_message_content,
39411            thumbnail_url: t.thumbnail_url,
39412            thumbnail_width: t.thumbnail_width,
39413            thumbnail_height: t.thumbnail_height,
39414        }
39415    }
39416}
39417#[allow(clippy::from_over_into)]
39418impl Into<NoSkipInlineQueryResultVenue> for InlineQueryResultVenue {
39419    fn into(self) -> NoSkipInlineQueryResultVenue {
39420        NoSkipInlineQueryResultVenue {
39421            tg_type: self.tg_type,
39422            id: self.id,
39423            latitude: self.latitude,
39424            longitude: self.longitude,
39425            title: self.title,
39426            address: self.address,
39427            foursquare_id: self.foursquare_id,
39428            foursquare_type: self.foursquare_type,
39429            google_place_id: self.google_place_id,
39430            google_place_type: self.google_place_type,
39431            reply_markup: self.reply_markup,
39432            input_message_content: self.input_message_content,
39433            thumbnail_url: self.thumbnail_url,
39434            thumbnail_width: self.thumbnail_width,
39435            thumbnail_height: self.thumbnail_height,
39436        }
39437    }
39438}
39439impl NoSkipInlineQueryResultVenue {
39440    pub fn skip(self) -> InlineQueryResultVenue {
39441        self.into()
39442    }
39443}
39444impl InlineQueryResultVenue {
39445    pub fn noskip(self) -> NoSkipInlineQueryResultVenue {
39446        self.into()
39447    }
39448}
39449#[allow(rustdoc::invalid_html_tags)]
39450#[doc = "Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue."]
39451#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39452pub struct InlineQueryResultVenueBuilder {
39453    #[allow(rustdoc::invalid_html_tags)]
39454    #[doc = "Type of the result, must be venue"]
39455    #[serde(rename = "type")]
39456    pub tg_type: String,
39457    #[allow(rustdoc::invalid_html_tags)]
39458    #[doc = "Unique identifier for this result, 1-64 Bytes"]
39459    #[serde(rename = "id")]
39460    pub id: String,
39461    #[allow(rustdoc::invalid_html_tags)]
39462    #[doc = "Latitude of the venue location in degrees"]
39463    #[serde(rename = "latitude")]
39464    pub latitude: ::ordered_float::OrderedFloat<f64>,
39465    #[allow(rustdoc::invalid_html_tags)]
39466    #[doc = "Longitude of the venue location in degrees"]
39467    #[serde(rename = "longitude")]
39468    pub longitude: ::ordered_float::OrderedFloat<f64>,
39469    #[allow(rustdoc::invalid_html_tags)]
39470    #[doc = "Title of the venue"]
39471    #[serde(rename = "title")]
39472    pub title: String,
39473    #[allow(rustdoc::invalid_html_tags)]
39474    #[doc = "Address of the venue"]
39475    #[serde(rename = "address")]
39476    pub address: String,
39477    #[allow(rustdoc::invalid_html_tags)]
39478    #[doc = "Optional. Foursquare identifier of the venue if known"]
39479    #[serde(
39480        skip_serializing_if = "Option::is_none",
39481        rename = "foursquare_id",
39482        default
39483    )]
39484    pub foursquare_id: Option<String>,
39485    #[allow(rustdoc::invalid_html_tags)]
39486    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
39487    #[serde(
39488        skip_serializing_if = "Option::is_none",
39489        rename = "foursquare_type",
39490        default
39491    )]
39492    pub foursquare_type: Option<String>,
39493    #[allow(rustdoc::invalid_html_tags)]
39494    #[doc = "Optional. Google Places identifier of the venue"]
39495    #[serde(
39496        skip_serializing_if = "Option::is_none",
39497        rename = "google_place_id",
39498        default
39499    )]
39500    pub google_place_id: Option<String>,
39501    #[allow(rustdoc::invalid_html_tags)]
39502    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
39503    #[serde(
39504        skip_serializing_if = "Option::is_none",
39505        rename = "google_place_type",
39506        default
39507    )]
39508    pub google_place_type: Option<String>,
39509    #[allow(rustdoc::invalid_html_tags)]
39510    #[doc = "Optional. Inline keyboard attached to the message"]
39511    #[serde(
39512        skip_serializing_if = "Option::is_none",
39513        rename = "reply_markup",
39514        default
39515    )]
39516    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
39517    #[allow(rustdoc::invalid_html_tags)]
39518    #[doc = "Optional. Content of the message to be sent instead of the venue"]
39519    #[serde(
39520        skip_serializing_if = "Option::is_none",
39521        rename = "input_message_content",
39522        default
39523    )]
39524    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
39525    #[allow(rustdoc::invalid_html_tags)]
39526    #[doc = "Optional. Url of the thumbnail for the result"]
39527    #[serde(
39528        skip_serializing_if = "Option::is_none",
39529        rename = "thumbnail_url",
39530        default
39531    )]
39532    pub thumbnail_url: Option<String>,
39533    #[allow(rustdoc::invalid_html_tags)]
39534    #[doc = "Optional. Thumbnail width"]
39535    #[serde(
39536        skip_serializing_if = "Option::is_none",
39537        rename = "thumbnail_width",
39538        default
39539    )]
39540    pub thumbnail_width: Option<i64>,
39541    #[allow(rustdoc::invalid_html_tags)]
39542    #[doc = "Optional. Thumbnail height"]
39543    #[serde(
39544        skip_serializing_if = "Option::is_none",
39545        rename = "thumbnail_height",
39546        default
39547    )]
39548    pub thumbnail_height: Option<i64>,
39549}
39550impl InlineQueryResultVenueBuilder {
39551    #[allow(clippy::too_many_arguments)]
39552    pub fn new(
39553        id: String,
39554        latitude: ::ordered_float::OrderedFloat<f64>,
39555        longitude: ::ordered_float::OrderedFloat<f64>,
39556        title: String,
39557        address: String,
39558    ) -> Self {
39559        Self {
39560            tg_type: "venue".to_owned(),
39561            id,
39562            latitude,
39563            longitude,
39564            title,
39565            address,
39566            foursquare_id: None,
39567            foursquare_type: None,
39568            google_place_id: None,
39569            google_place_type: None,
39570            reply_markup: None,
39571            input_message_content: None,
39572            thumbnail_url: None,
39573            thumbnail_width: None,
39574            thumbnail_height: None,
39575        }
39576    }
39577    #[allow(rustdoc::invalid_html_tags)]
39578    #[doc = "Type of the result, must be venue"]
39579    pub fn set_type(mut self, tg_type: String) -> Self {
39580        self.tg_type = tg_type;
39581        self
39582    }
39583    #[allow(rustdoc::invalid_html_tags)]
39584    #[doc = "Unique identifier for this result, 1-64 Bytes"]
39585    pub fn set_id(mut self, id: String) -> Self {
39586        self.id = id;
39587        self
39588    }
39589    #[allow(rustdoc::invalid_html_tags)]
39590    #[doc = "Latitude of the venue location in degrees"]
39591    pub fn set_latitude(mut self, latitude: ::ordered_float::OrderedFloat<f64>) -> Self {
39592        self.latitude = latitude;
39593        self
39594    }
39595    #[allow(rustdoc::invalid_html_tags)]
39596    #[doc = "Longitude of the venue location in degrees"]
39597    pub fn set_longitude(mut self, longitude: ::ordered_float::OrderedFloat<f64>) -> Self {
39598        self.longitude = longitude;
39599        self
39600    }
39601    #[allow(rustdoc::invalid_html_tags)]
39602    #[doc = "Title of the venue"]
39603    pub fn set_title(mut self, title: String) -> Self {
39604        self.title = title;
39605        self
39606    }
39607    #[allow(rustdoc::invalid_html_tags)]
39608    #[doc = "Address of the venue"]
39609    pub fn set_address(mut self, address: String) -> Self {
39610        self.address = address;
39611        self
39612    }
39613    #[allow(rustdoc::invalid_html_tags)]
39614    #[doc = "Optional. Foursquare identifier of the venue if known"]
39615    pub fn set_foursquare_id(mut self, foursquare_id: String) -> Self {
39616        self.foursquare_id = Some(foursquare_id);
39617        self
39618    }
39619    #[allow(rustdoc::invalid_html_tags)]
39620    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
39621    pub fn set_foursquare_type(mut self, foursquare_type: String) -> Self {
39622        self.foursquare_type = Some(foursquare_type);
39623        self
39624    }
39625    #[allow(rustdoc::invalid_html_tags)]
39626    #[doc = "Optional. Google Places identifier of the venue"]
39627    pub fn set_google_place_id(mut self, google_place_id: String) -> Self {
39628        self.google_place_id = Some(google_place_id);
39629        self
39630    }
39631    #[allow(rustdoc::invalid_html_tags)]
39632    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
39633    pub fn set_google_place_type(mut self, google_place_type: String) -> Self {
39634        self.google_place_type = Some(google_place_type);
39635        self
39636    }
39637    #[allow(rustdoc::invalid_html_tags)]
39638    #[doc = "Optional. Inline keyboard attached to the message"]
39639    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
39640        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
39641        self
39642    }
39643    #[allow(rustdoc::invalid_html_tags)]
39644    #[doc = "Optional. Content of the message to be sent instead of the venue"]
39645    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
39646        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
39647        self
39648    }
39649    #[allow(rustdoc::invalid_html_tags)]
39650    #[doc = "Optional. Url of the thumbnail for the result"]
39651    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
39652        self.thumbnail_url = Some(thumbnail_url);
39653        self
39654    }
39655    #[allow(rustdoc::invalid_html_tags)]
39656    #[doc = "Optional. Thumbnail width"]
39657    pub fn set_thumbnail_width(mut self, thumbnail_width: i64) -> Self {
39658        self.thumbnail_width = Some(thumbnail_width);
39659        self
39660    }
39661    #[allow(rustdoc::invalid_html_tags)]
39662    #[doc = "Optional. Thumbnail height"]
39663    pub fn set_thumbnail_height(mut self, thumbnail_height: i64) -> Self {
39664        self.thumbnail_height = Some(thumbnail_height);
39665        self
39666    }
39667    pub fn build(self) -> InlineQueryResultVenue {
39668        InlineQueryResultVenue {
39669            tg_type: self.tg_type,
39670            id: self.id,
39671            latitude: self.latitude,
39672            longitude: self.longitude,
39673            title: self.title,
39674            address: self.address,
39675            foursquare_id: self.foursquare_id,
39676            foursquare_type: self.foursquare_type,
39677            google_place_id: self.google_place_id,
39678            google_place_type: self.google_place_type,
39679            reply_markup: self.reply_markup,
39680            input_message_content: self.input_message_content,
39681            thumbnail_url: self.thumbnail_url,
39682            thumbnail_width: self.thumbnail_width,
39683            thumbnail_height: self.thumbnail_height,
39684        }
39685    }
39686}
39687#[allow(rustdoc::invalid_html_tags)]
39688#[doc = "Describes the paid media added to a message."]
39689#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39690pub struct PaidMediaInfo {
39691    #[allow(rustdoc::invalid_html_tags)]
39692    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
39693    #[serde(rename = "star_count")]
39694    pub star_count: i64,
39695    #[allow(rustdoc::invalid_html_tags)]
39696    #[doc = "Information about the paid media"]
39697    #[serde(rename = "paid_media")]
39698    pub paid_media: Vec<PaidMedia>,
39699}
39700#[allow(rustdoc::invalid_html_tags)]
39701#[doc = "Companion type to PaidMediaInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
39702#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39703pub struct NoSkipPaidMediaInfo {
39704    #[allow(rustdoc::invalid_html_tags)]
39705    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
39706    #[serde(rename = "star_count")]
39707    pub star_count: i64,
39708    #[allow(rustdoc::invalid_html_tags)]
39709    #[doc = "Information about the paid media"]
39710    #[serde(rename = "paid_media")]
39711    pub paid_media: Vec<PaidMedia>,
39712}
39713impl From<NoSkipPaidMediaInfo> for PaidMediaInfo {
39714    fn from(t: NoSkipPaidMediaInfo) -> Self {
39715        Self {
39716            star_count: t.star_count,
39717            paid_media: t.paid_media,
39718        }
39719    }
39720}
39721#[allow(clippy::from_over_into)]
39722impl Into<NoSkipPaidMediaInfo> for PaidMediaInfo {
39723    fn into(self) -> NoSkipPaidMediaInfo {
39724        NoSkipPaidMediaInfo {
39725            star_count: self.star_count,
39726            paid_media: self.paid_media,
39727        }
39728    }
39729}
39730impl NoSkipPaidMediaInfo {
39731    pub fn skip(self) -> PaidMediaInfo {
39732        self.into()
39733    }
39734}
39735impl PaidMediaInfo {
39736    pub fn noskip(self) -> NoSkipPaidMediaInfo {
39737        self.into()
39738    }
39739}
39740#[allow(rustdoc::invalid_html_tags)]
39741#[doc = "Describes the paid media added to a message."]
39742#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39743pub struct PaidMediaInfoBuilder {
39744    #[allow(rustdoc::invalid_html_tags)]
39745    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
39746    #[serde(rename = "star_count")]
39747    pub star_count: i64,
39748    #[allow(rustdoc::invalid_html_tags)]
39749    #[doc = "Information about the paid media"]
39750    #[serde(rename = "paid_media")]
39751    pub paid_media: Vec<PaidMedia>,
39752}
39753impl PaidMediaInfoBuilder {
39754    #[allow(clippy::too_many_arguments)]
39755    pub fn new(star_count: i64, paid_media: Vec<PaidMedia>) -> Self {
39756        Self {
39757            star_count,
39758            paid_media,
39759        }
39760    }
39761    #[allow(rustdoc::invalid_html_tags)]
39762    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
39763    pub fn set_star_count(mut self, star_count: i64) -> Self {
39764        self.star_count = star_count;
39765        self
39766    }
39767    #[allow(rustdoc::invalid_html_tags)]
39768    #[doc = "Information about the paid media"]
39769    pub fn set_paid_media(mut self, paid_media: Vec<PaidMedia>) -> Self {
39770        self.paid_media = paid_media;
39771        self
39772    }
39773    pub fn build(self) -> PaidMediaInfo {
39774        PaidMediaInfo {
39775            star_count: self.star_count,
39776            paid_media: self.paid_media,
39777        }
39778    }
39779}
39780#[allow(rustdoc::invalid_html_tags)]
39781#[doc = "Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo."]
39782#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39783pub struct InlineQueryResultCachedPhoto {
39784    #[allow(rustdoc::invalid_html_tags)]
39785    #[doc = "Type of the result, must be photo"]
39786    #[serde(rename = "type")]
39787    pub tg_type: String,
39788    #[allow(rustdoc::invalid_html_tags)]
39789    #[doc = "Unique identifier for this result, 1-64 bytes"]
39790    #[serde(rename = "id")]
39791    pub id: String,
39792    #[allow(rustdoc::invalid_html_tags)]
39793    #[doc = "A valid file identifier of the photo"]
39794    #[serde(rename = "photo_file_id")]
39795    pub photo_file_id: String,
39796    #[allow(rustdoc::invalid_html_tags)]
39797    #[doc = "Optional. Title for the result"]
39798    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
39799    pub title: Option<String>,
39800    #[allow(rustdoc::invalid_html_tags)]
39801    #[doc = "Optional. Short description of the result"]
39802    #[serde(
39803        skip_serializing_if = "Option::is_none",
39804        rename = "description",
39805        default
39806    )]
39807    pub description: Option<String>,
39808    #[allow(rustdoc::invalid_html_tags)]
39809    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
39810    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
39811    pub caption: Option<String>,
39812    #[allow(rustdoc::invalid_html_tags)]
39813    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
39814    #[serde(
39815        skip_serializing_if = "Option::is_none",
39816        rename = "parse_mode",
39817        default
39818    )]
39819    pub parse_mode: Option<String>,
39820    #[allow(rustdoc::invalid_html_tags)]
39821    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
39822    #[serde(
39823        skip_serializing_if = "Option::is_none",
39824        rename = "caption_entities",
39825        default
39826    )]
39827    pub caption_entities: Option<Vec<MessageEntity>>,
39828    #[allow(rustdoc::invalid_html_tags)]
39829    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
39830    #[serde(
39831        skip_serializing_if = "Option::is_none",
39832        rename = "show_caption_above_media",
39833        default
39834    )]
39835    pub show_caption_above_media: Option<bool>,
39836    #[allow(rustdoc::invalid_html_tags)]
39837    #[doc = "Optional. Inline keyboard attached to the message"]
39838    #[serde(
39839        skip_serializing_if = "Option::is_none",
39840        rename = "reply_markup",
39841        default
39842    )]
39843    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
39844    #[allow(rustdoc::invalid_html_tags)]
39845    #[doc = "Optional. Content of the message to be sent instead of the photo"]
39846    #[serde(
39847        skip_serializing_if = "Option::is_none",
39848        rename = "input_message_content",
39849        default
39850    )]
39851    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
39852}
39853#[allow(rustdoc::invalid_html_tags)]
39854#[doc = "Companion type to InlineQueryResultCachedPhoto that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
39855#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39856pub struct NoSkipInlineQueryResultCachedPhoto {
39857    #[allow(rustdoc::invalid_html_tags)]
39858    #[doc = "Type of the result, must be photo"]
39859    #[serde(rename = "type")]
39860    pub tg_type: String,
39861    #[allow(rustdoc::invalid_html_tags)]
39862    #[doc = "Unique identifier for this result, 1-64 bytes"]
39863    #[serde(rename = "id")]
39864    pub id: String,
39865    #[allow(rustdoc::invalid_html_tags)]
39866    #[doc = "A valid file identifier of the photo"]
39867    #[serde(rename = "photo_file_id")]
39868    pub photo_file_id: String,
39869    pub title: Option<String>,
39870    pub description: Option<String>,
39871    pub caption: Option<String>,
39872    pub parse_mode: Option<String>,
39873    pub caption_entities: Option<Vec<MessageEntity>>,
39874    pub show_caption_above_media: Option<bool>,
39875    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
39876    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
39877}
39878impl From<NoSkipInlineQueryResultCachedPhoto> for InlineQueryResultCachedPhoto {
39879    fn from(t: NoSkipInlineQueryResultCachedPhoto) -> Self {
39880        Self {
39881            tg_type: t.tg_type,
39882            id: t.id,
39883            photo_file_id: t.photo_file_id,
39884            title: t.title,
39885            description: t.description,
39886            caption: t.caption,
39887            parse_mode: t.parse_mode,
39888            caption_entities: t.caption_entities,
39889            show_caption_above_media: t.show_caption_above_media,
39890            reply_markup: t.reply_markup,
39891            input_message_content: t.input_message_content,
39892        }
39893    }
39894}
39895#[allow(clippy::from_over_into)]
39896impl Into<NoSkipInlineQueryResultCachedPhoto> for InlineQueryResultCachedPhoto {
39897    fn into(self) -> NoSkipInlineQueryResultCachedPhoto {
39898        NoSkipInlineQueryResultCachedPhoto {
39899            tg_type: self.tg_type,
39900            id: self.id,
39901            photo_file_id: self.photo_file_id,
39902            title: self.title,
39903            description: self.description,
39904            caption: self.caption,
39905            parse_mode: self.parse_mode,
39906            caption_entities: self.caption_entities,
39907            show_caption_above_media: self.show_caption_above_media,
39908            reply_markup: self.reply_markup,
39909            input_message_content: self.input_message_content,
39910        }
39911    }
39912}
39913impl NoSkipInlineQueryResultCachedPhoto {
39914    pub fn skip(self) -> InlineQueryResultCachedPhoto {
39915        self.into()
39916    }
39917}
39918impl InlineQueryResultCachedPhoto {
39919    pub fn noskip(self) -> NoSkipInlineQueryResultCachedPhoto {
39920        self.into()
39921    }
39922}
39923#[allow(rustdoc::invalid_html_tags)]
39924#[doc = "Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo."]
39925#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
39926pub struct InlineQueryResultCachedPhotoBuilder {
39927    #[allow(rustdoc::invalid_html_tags)]
39928    #[doc = "Type of the result, must be photo"]
39929    #[serde(rename = "type")]
39930    pub tg_type: String,
39931    #[allow(rustdoc::invalid_html_tags)]
39932    #[doc = "Unique identifier for this result, 1-64 bytes"]
39933    #[serde(rename = "id")]
39934    pub id: String,
39935    #[allow(rustdoc::invalid_html_tags)]
39936    #[doc = "A valid file identifier of the photo"]
39937    #[serde(rename = "photo_file_id")]
39938    pub photo_file_id: String,
39939    #[allow(rustdoc::invalid_html_tags)]
39940    #[doc = "Optional. Title for the result"]
39941    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
39942    pub title: Option<String>,
39943    #[allow(rustdoc::invalid_html_tags)]
39944    #[doc = "Optional. Short description of the result"]
39945    #[serde(
39946        skip_serializing_if = "Option::is_none",
39947        rename = "description",
39948        default
39949    )]
39950    pub description: Option<String>,
39951    #[allow(rustdoc::invalid_html_tags)]
39952    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
39953    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
39954    pub caption: Option<String>,
39955    #[allow(rustdoc::invalid_html_tags)]
39956    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
39957    #[serde(
39958        skip_serializing_if = "Option::is_none",
39959        rename = "parse_mode",
39960        default
39961    )]
39962    pub parse_mode: Option<String>,
39963    #[allow(rustdoc::invalid_html_tags)]
39964    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
39965    #[serde(
39966        skip_serializing_if = "Option::is_none",
39967        rename = "caption_entities",
39968        default
39969    )]
39970    pub caption_entities: Option<Vec<MessageEntity>>,
39971    #[allow(rustdoc::invalid_html_tags)]
39972    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
39973    #[serde(
39974        skip_serializing_if = "Option::is_none",
39975        rename = "show_caption_above_media",
39976        default
39977    )]
39978    pub show_caption_above_media: Option<bool>,
39979    #[allow(rustdoc::invalid_html_tags)]
39980    #[doc = "Optional. Inline keyboard attached to the message"]
39981    #[serde(
39982        skip_serializing_if = "Option::is_none",
39983        rename = "reply_markup",
39984        default
39985    )]
39986    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
39987    #[allow(rustdoc::invalid_html_tags)]
39988    #[doc = "Optional. Content of the message to be sent instead of the photo"]
39989    #[serde(
39990        skip_serializing_if = "Option::is_none",
39991        rename = "input_message_content",
39992        default
39993    )]
39994    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
39995}
39996impl InlineQueryResultCachedPhotoBuilder {
39997    #[allow(clippy::too_many_arguments)]
39998    pub fn new(id: String, photo_file_id: String) -> Self {
39999        Self {
40000            tg_type: "photo".to_owned(),
40001            id,
40002            photo_file_id,
40003            title: None,
40004            description: None,
40005            caption: None,
40006            parse_mode: None,
40007            caption_entities: None,
40008            show_caption_above_media: None,
40009            reply_markup: None,
40010            input_message_content: None,
40011        }
40012    }
40013    #[allow(rustdoc::invalid_html_tags)]
40014    #[doc = "Type of the result, must be photo"]
40015    pub fn set_type(mut self, tg_type: String) -> Self {
40016        self.tg_type = tg_type;
40017        self
40018    }
40019    #[allow(rustdoc::invalid_html_tags)]
40020    #[doc = "Unique identifier for this result, 1-64 bytes"]
40021    pub fn set_id(mut self, id: String) -> Self {
40022        self.id = id;
40023        self
40024    }
40025    #[allow(rustdoc::invalid_html_tags)]
40026    #[doc = "A valid file identifier of the photo"]
40027    pub fn set_photo_file_id(mut self, photo_file_id: String) -> Self {
40028        self.photo_file_id = photo_file_id;
40029        self
40030    }
40031    #[allow(rustdoc::invalid_html_tags)]
40032    #[doc = "Optional. Title for the result"]
40033    pub fn set_title(mut self, title: String) -> Self {
40034        self.title = Some(title);
40035        self
40036    }
40037    #[allow(rustdoc::invalid_html_tags)]
40038    #[doc = "Optional. Short description of the result"]
40039    pub fn set_description(mut self, description: String) -> Self {
40040        self.description = Some(description);
40041        self
40042    }
40043    #[allow(rustdoc::invalid_html_tags)]
40044    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
40045    pub fn set_caption(mut self, caption: String) -> Self {
40046        self.caption = Some(caption);
40047        self
40048    }
40049    #[allow(rustdoc::invalid_html_tags)]
40050    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
40051    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
40052        self.parse_mode = Some(parse_mode);
40053        self
40054    }
40055    #[allow(rustdoc::invalid_html_tags)]
40056    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
40057    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
40058        self.caption_entities = Some(caption_entities);
40059        self
40060    }
40061    #[allow(rustdoc::invalid_html_tags)]
40062    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
40063    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
40064        self.show_caption_above_media = Some(show_caption_above_media);
40065        self
40066    }
40067    #[allow(rustdoc::invalid_html_tags)]
40068    #[doc = "Optional. Inline keyboard attached to the message"]
40069    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
40070        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
40071        self
40072    }
40073    #[allow(rustdoc::invalid_html_tags)]
40074    #[doc = "Optional. Content of the message to be sent instead of the photo"]
40075    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
40076        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
40077        self
40078    }
40079    pub fn build(self) -> InlineQueryResultCachedPhoto {
40080        InlineQueryResultCachedPhoto {
40081            tg_type: self.tg_type,
40082            id: self.id,
40083            photo_file_id: self.photo_file_id,
40084            title: self.title,
40085            description: self.description,
40086            caption: self.caption,
40087            parse_mode: self.parse_mode,
40088            caption_entities: self.caption_entities,
40089            show_caption_above_media: self.show_caption_above_media,
40090            reply_markup: self.reply_markup,
40091            input_message_content: self.input_message_content,
40092        }
40093    }
40094}
40095#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
40096pub struct GeneralForumTopicUnhidden {}
40097impl GeneralForumTopicUnhidden {}
40098#[allow(rustdoc::invalid_html_tags)]
40099#[doc = "This object represents a message about the completion of a giveaway with public winners."]
40100#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40101pub struct GiveawayWinners {
40102    #[allow(rustdoc::invalid_html_tags)]
40103    #[doc = "The chat that created the giveaway"]
40104    #[serde(rename = "chat")]
40105    pub chat: BoxWrapper<Unbox<Chat>>,
40106    #[allow(rustdoc::invalid_html_tags)]
40107    #[doc = "Identifier of the message with the giveaway in the chat"]
40108    #[serde(rename = "giveaway_message_id")]
40109    pub giveaway_message_id: i64,
40110    #[allow(rustdoc::invalid_html_tags)]
40111    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
40112    #[serde(rename = "winners_selection_date")]
40113    pub winners_selection_date: i64,
40114    #[allow(rustdoc::invalid_html_tags)]
40115    #[doc = "Total number of winners in the giveaway"]
40116    #[serde(rename = "winner_count")]
40117    pub winner_count: i64,
40118    #[allow(rustdoc::invalid_html_tags)]
40119    #[doc = "List of up to 100 winners of the giveaway"]
40120    #[serde(rename = "winners")]
40121    pub winners: Vec<User>,
40122    #[allow(rustdoc::invalid_html_tags)]
40123    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
40124    #[serde(
40125        skip_serializing_if = "Option::is_none",
40126        rename = "additional_chat_count",
40127        default
40128    )]
40129    pub additional_chat_count: Option<i64>,
40130    #[allow(rustdoc::invalid_html_tags)]
40131    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
40132    #[serde(
40133        skip_serializing_if = "Option::is_none",
40134        rename = "prize_star_count",
40135        default
40136    )]
40137    pub prize_star_count: Option<i64>,
40138    #[allow(rustdoc::invalid_html_tags)]
40139    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
40140    #[serde(
40141        skip_serializing_if = "Option::is_none",
40142        rename = "premium_subscription_month_count",
40143        default
40144    )]
40145    pub premium_subscription_month_count: Option<i64>,
40146    #[allow(rustdoc::invalid_html_tags)]
40147    #[doc = "Optional. Number of undistributed prizes"]
40148    #[serde(
40149        skip_serializing_if = "Option::is_none",
40150        rename = "unclaimed_prize_count",
40151        default
40152    )]
40153    pub unclaimed_prize_count: Option<i64>,
40154    #[allow(rustdoc::invalid_html_tags)]
40155    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
40156    #[serde(
40157        skip_serializing_if = "Option::is_none",
40158        rename = "only_new_members",
40159        default
40160    )]
40161    pub only_new_members: Option<bool>,
40162    #[allow(rustdoc::invalid_html_tags)]
40163    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
40164    #[serde(
40165        skip_serializing_if = "Option::is_none",
40166        rename = "was_refunded",
40167        default
40168    )]
40169    pub was_refunded: Option<bool>,
40170    #[allow(rustdoc::invalid_html_tags)]
40171    #[doc = "Optional. Description of additional giveaway prize"]
40172    #[serde(
40173        skip_serializing_if = "Option::is_none",
40174        rename = "prize_description",
40175        default
40176    )]
40177    pub prize_description: Option<String>,
40178}
40179#[allow(rustdoc::invalid_html_tags)]
40180#[doc = "Companion type to GiveawayWinners that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
40181#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40182pub struct NoSkipGiveawayWinners {
40183    #[allow(rustdoc::invalid_html_tags)]
40184    #[doc = "The chat that created the giveaway"]
40185    #[serde(rename = "chat")]
40186    pub chat: BoxWrapper<Unbox<Chat>>,
40187    #[allow(rustdoc::invalid_html_tags)]
40188    #[doc = "Identifier of the message with the giveaway in the chat"]
40189    #[serde(rename = "giveaway_message_id")]
40190    pub giveaway_message_id: i64,
40191    #[allow(rustdoc::invalid_html_tags)]
40192    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
40193    #[serde(rename = "winners_selection_date")]
40194    pub winners_selection_date: i64,
40195    #[allow(rustdoc::invalid_html_tags)]
40196    #[doc = "Total number of winners in the giveaway"]
40197    #[serde(rename = "winner_count")]
40198    pub winner_count: i64,
40199    #[allow(rustdoc::invalid_html_tags)]
40200    #[doc = "List of up to 100 winners of the giveaway"]
40201    #[serde(rename = "winners")]
40202    pub winners: Vec<User>,
40203    pub additional_chat_count: Option<i64>,
40204    pub prize_star_count: Option<i64>,
40205    pub premium_subscription_month_count: Option<i64>,
40206    pub unclaimed_prize_count: Option<i64>,
40207    pub only_new_members: Option<bool>,
40208    pub was_refunded: Option<bool>,
40209    pub prize_description: Option<String>,
40210}
40211impl From<NoSkipGiveawayWinners> for GiveawayWinners {
40212    fn from(t: NoSkipGiveawayWinners) -> Self {
40213        Self {
40214            chat: t.chat,
40215            giveaway_message_id: t.giveaway_message_id,
40216            winners_selection_date: t.winners_selection_date,
40217            winner_count: t.winner_count,
40218            winners: t.winners,
40219            additional_chat_count: t.additional_chat_count,
40220            prize_star_count: t.prize_star_count,
40221            premium_subscription_month_count: t.premium_subscription_month_count,
40222            unclaimed_prize_count: t.unclaimed_prize_count,
40223            only_new_members: t.only_new_members,
40224            was_refunded: t.was_refunded,
40225            prize_description: t.prize_description,
40226        }
40227    }
40228}
40229#[allow(clippy::from_over_into)]
40230impl Into<NoSkipGiveawayWinners> for GiveawayWinners {
40231    fn into(self) -> NoSkipGiveawayWinners {
40232        NoSkipGiveawayWinners {
40233            chat: self.chat,
40234            giveaway_message_id: self.giveaway_message_id,
40235            winners_selection_date: self.winners_selection_date,
40236            winner_count: self.winner_count,
40237            winners: self.winners,
40238            additional_chat_count: self.additional_chat_count,
40239            prize_star_count: self.prize_star_count,
40240            premium_subscription_month_count: self.premium_subscription_month_count,
40241            unclaimed_prize_count: self.unclaimed_prize_count,
40242            only_new_members: self.only_new_members,
40243            was_refunded: self.was_refunded,
40244            prize_description: self.prize_description,
40245        }
40246    }
40247}
40248impl NoSkipGiveawayWinners {
40249    pub fn skip(self) -> GiveawayWinners {
40250        self.into()
40251    }
40252}
40253impl GiveawayWinners {
40254    pub fn noskip(self) -> NoSkipGiveawayWinners {
40255        self.into()
40256    }
40257}
40258#[allow(rustdoc::invalid_html_tags)]
40259#[doc = "This object represents a message about the completion of a giveaway with public winners."]
40260#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40261pub struct GiveawayWinnersBuilder {
40262    #[allow(rustdoc::invalid_html_tags)]
40263    #[doc = "The chat that created the giveaway"]
40264    #[serde(rename = "chat")]
40265    pub chat: BoxWrapper<Unbox<Chat>>,
40266    #[allow(rustdoc::invalid_html_tags)]
40267    #[doc = "Identifier of the message with the giveaway in the chat"]
40268    #[serde(rename = "giveaway_message_id")]
40269    pub giveaway_message_id: i64,
40270    #[allow(rustdoc::invalid_html_tags)]
40271    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
40272    #[serde(rename = "winners_selection_date")]
40273    pub winners_selection_date: i64,
40274    #[allow(rustdoc::invalid_html_tags)]
40275    #[doc = "Total number of winners in the giveaway"]
40276    #[serde(rename = "winner_count")]
40277    pub winner_count: i64,
40278    #[allow(rustdoc::invalid_html_tags)]
40279    #[doc = "List of up to 100 winners of the giveaway"]
40280    #[serde(rename = "winners")]
40281    pub winners: Vec<User>,
40282    #[allow(rustdoc::invalid_html_tags)]
40283    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
40284    #[serde(
40285        skip_serializing_if = "Option::is_none",
40286        rename = "additional_chat_count",
40287        default
40288    )]
40289    pub additional_chat_count: Option<i64>,
40290    #[allow(rustdoc::invalid_html_tags)]
40291    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
40292    #[serde(
40293        skip_serializing_if = "Option::is_none",
40294        rename = "prize_star_count",
40295        default
40296    )]
40297    pub prize_star_count: Option<i64>,
40298    #[allow(rustdoc::invalid_html_tags)]
40299    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
40300    #[serde(
40301        skip_serializing_if = "Option::is_none",
40302        rename = "premium_subscription_month_count",
40303        default
40304    )]
40305    pub premium_subscription_month_count: Option<i64>,
40306    #[allow(rustdoc::invalid_html_tags)]
40307    #[doc = "Optional. Number of undistributed prizes"]
40308    #[serde(
40309        skip_serializing_if = "Option::is_none",
40310        rename = "unclaimed_prize_count",
40311        default
40312    )]
40313    pub unclaimed_prize_count: Option<i64>,
40314    #[allow(rustdoc::invalid_html_tags)]
40315    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
40316    #[serde(
40317        skip_serializing_if = "Option::is_none",
40318        rename = "only_new_members",
40319        default
40320    )]
40321    pub only_new_members: Option<bool>,
40322    #[allow(rustdoc::invalid_html_tags)]
40323    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
40324    #[serde(
40325        skip_serializing_if = "Option::is_none",
40326        rename = "was_refunded",
40327        default
40328    )]
40329    pub was_refunded: Option<bool>,
40330    #[allow(rustdoc::invalid_html_tags)]
40331    #[doc = "Optional. Description of additional giveaway prize"]
40332    #[serde(
40333        skip_serializing_if = "Option::is_none",
40334        rename = "prize_description",
40335        default
40336    )]
40337    pub prize_description: Option<String>,
40338}
40339impl GiveawayWinnersBuilder {
40340    #[allow(clippy::too_many_arguments)]
40341    pub fn new<A: Into<Chat>>(
40342        chat: A,
40343        giveaway_message_id: i64,
40344        winners_selection_date: i64,
40345        winner_count: i64,
40346        winners: Vec<User>,
40347    ) -> Self {
40348        Self {
40349            chat: BoxWrapper::new_unbox(chat.into()),
40350            giveaway_message_id,
40351            winners_selection_date,
40352            winner_count,
40353            winners,
40354            additional_chat_count: None,
40355            prize_star_count: None,
40356            premium_subscription_month_count: None,
40357            unclaimed_prize_count: None,
40358            only_new_members: None,
40359            was_refunded: None,
40360            prize_description: None,
40361        }
40362    }
40363    #[allow(rustdoc::invalid_html_tags)]
40364    #[doc = "The chat that created the giveaway"]
40365    pub fn set_chat(mut self, chat: Chat) -> Self {
40366        self.chat = BoxWrapper(Unbox(chat));
40367        self
40368    }
40369    #[allow(rustdoc::invalid_html_tags)]
40370    #[doc = "Identifier of the message with the giveaway in the chat"]
40371    pub fn set_giveaway_message_id(mut self, giveaway_message_id: i64) -> Self {
40372        self.giveaway_message_id = giveaway_message_id;
40373        self
40374    }
40375    #[allow(rustdoc::invalid_html_tags)]
40376    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
40377    pub fn set_winners_selection_date(mut self, winners_selection_date: i64) -> Self {
40378        self.winners_selection_date = winners_selection_date;
40379        self
40380    }
40381    #[allow(rustdoc::invalid_html_tags)]
40382    #[doc = "Total number of winners in the giveaway"]
40383    pub fn set_winner_count(mut self, winner_count: i64) -> Self {
40384        self.winner_count = winner_count;
40385        self
40386    }
40387    #[allow(rustdoc::invalid_html_tags)]
40388    #[doc = "List of up to 100 winners of the giveaway"]
40389    pub fn set_winners(mut self, winners: Vec<User>) -> Self {
40390        self.winners = winners;
40391        self
40392    }
40393    #[allow(rustdoc::invalid_html_tags)]
40394    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
40395    pub fn set_additional_chat_count(mut self, additional_chat_count: i64) -> Self {
40396        self.additional_chat_count = Some(additional_chat_count);
40397        self
40398    }
40399    #[allow(rustdoc::invalid_html_tags)]
40400    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
40401    pub fn set_prize_star_count(mut self, prize_star_count: i64) -> Self {
40402        self.prize_star_count = Some(prize_star_count);
40403        self
40404    }
40405    #[allow(rustdoc::invalid_html_tags)]
40406    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
40407    pub fn set_premium_subscription_month_count(
40408        mut self,
40409        premium_subscription_month_count: i64,
40410    ) -> Self {
40411        self.premium_subscription_month_count = Some(premium_subscription_month_count);
40412        self
40413    }
40414    #[allow(rustdoc::invalid_html_tags)]
40415    #[doc = "Optional. Number of undistributed prizes"]
40416    pub fn set_unclaimed_prize_count(mut self, unclaimed_prize_count: i64) -> Self {
40417        self.unclaimed_prize_count = Some(unclaimed_prize_count);
40418        self
40419    }
40420    #[allow(rustdoc::invalid_html_tags)]
40421    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
40422    pub fn set_only_new_members(mut self, only_new_members: bool) -> Self {
40423        self.only_new_members = Some(only_new_members);
40424        self
40425    }
40426    #[allow(rustdoc::invalid_html_tags)]
40427    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
40428    pub fn set_was_refunded(mut self, was_refunded: bool) -> Self {
40429        self.was_refunded = Some(was_refunded);
40430        self
40431    }
40432    #[allow(rustdoc::invalid_html_tags)]
40433    #[doc = "Optional. Description of additional giveaway prize"]
40434    pub fn set_prize_description(mut self, prize_description: String) -> Self {
40435        self.prize_description = Some(prize_description);
40436        self
40437    }
40438    pub fn build(self) -> GiveawayWinners {
40439        GiveawayWinners {
40440            chat: self.chat,
40441            giveaway_message_id: self.giveaway_message_id,
40442            winners_selection_date: self.winners_selection_date,
40443            winner_count: self.winner_count,
40444            winners: self.winners,
40445            additional_chat_count: self.additional_chat_count,
40446            prize_star_count: self.prize_star_count,
40447            premium_subscription_month_count: self.premium_subscription_month_count,
40448            unclaimed_prize_count: self.unclaimed_prize_count,
40449            only_new_members: self.only_new_members,
40450            was_refunded: self.was_refunded,
40451            prize_description: self.prize_description,
40452        }
40453    }
40454}
40455#[allow(rustdoc::invalid_html_tags)]
40456#[doc = "The message was originally sent by an unknown user."]
40457#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40458pub struct MessageOriginHiddenUser {
40459    #[allow(rustdoc::invalid_html_tags)]
40460    #[doc = "Type of the message origin, always \"hidden_user\""]
40461    #[serde(rename = "type")]
40462    pub tg_type: String,
40463    #[allow(rustdoc::invalid_html_tags)]
40464    #[doc = "Date the message was sent originally in Unix time"]
40465    #[serde(rename = "date")]
40466    pub date: i64,
40467    #[allow(rustdoc::invalid_html_tags)]
40468    #[doc = "Name of the user that sent the message originally"]
40469    #[serde(rename = "sender_user_name")]
40470    pub sender_user_name: String,
40471}
40472#[allow(rustdoc::invalid_html_tags)]
40473#[doc = "Companion type to MessageOriginHiddenUser that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
40474#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40475pub struct NoSkipMessageOriginHiddenUser {
40476    #[allow(rustdoc::invalid_html_tags)]
40477    #[doc = "Type of the message origin, always \"hidden_user\""]
40478    #[serde(rename = "type")]
40479    pub tg_type: String,
40480    #[allow(rustdoc::invalid_html_tags)]
40481    #[doc = "Date the message was sent originally in Unix time"]
40482    #[serde(rename = "date")]
40483    pub date: i64,
40484    #[allow(rustdoc::invalid_html_tags)]
40485    #[doc = "Name of the user that sent the message originally"]
40486    #[serde(rename = "sender_user_name")]
40487    pub sender_user_name: String,
40488}
40489impl From<NoSkipMessageOriginHiddenUser> for MessageOriginHiddenUser {
40490    fn from(t: NoSkipMessageOriginHiddenUser) -> Self {
40491        Self {
40492            tg_type: t.tg_type,
40493            date: t.date,
40494            sender_user_name: t.sender_user_name,
40495        }
40496    }
40497}
40498#[allow(clippy::from_over_into)]
40499impl Into<NoSkipMessageOriginHiddenUser> for MessageOriginHiddenUser {
40500    fn into(self) -> NoSkipMessageOriginHiddenUser {
40501        NoSkipMessageOriginHiddenUser {
40502            tg_type: self.tg_type,
40503            date: self.date,
40504            sender_user_name: self.sender_user_name,
40505        }
40506    }
40507}
40508impl NoSkipMessageOriginHiddenUser {
40509    pub fn skip(self) -> MessageOriginHiddenUser {
40510        self.into()
40511    }
40512}
40513impl MessageOriginHiddenUser {
40514    pub fn noskip(self) -> NoSkipMessageOriginHiddenUser {
40515        self.into()
40516    }
40517}
40518#[allow(rustdoc::invalid_html_tags)]
40519#[doc = "The message was originally sent by an unknown user."]
40520#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40521pub struct MessageOriginHiddenUserBuilder {
40522    #[allow(rustdoc::invalid_html_tags)]
40523    #[doc = "Type of the message origin, always \"hidden_user\""]
40524    #[serde(rename = "type")]
40525    pub tg_type: String,
40526    #[allow(rustdoc::invalid_html_tags)]
40527    #[doc = "Date the message was sent originally in Unix time"]
40528    #[serde(rename = "date")]
40529    pub date: i64,
40530    #[allow(rustdoc::invalid_html_tags)]
40531    #[doc = "Name of the user that sent the message originally"]
40532    #[serde(rename = "sender_user_name")]
40533    pub sender_user_name: String,
40534}
40535impl MessageOriginHiddenUserBuilder {
40536    #[allow(clippy::too_many_arguments)]
40537    pub fn new(date: i64, sender_user_name: String) -> Self {
40538        Self {
40539            tg_type: "MessageOriginHiddenUser".to_owned(),
40540            date,
40541            sender_user_name,
40542        }
40543    }
40544    #[allow(rustdoc::invalid_html_tags)]
40545    #[doc = "Type of the message origin, always \"hidden_user\""]
40546    pub fn set_type(mut self, tg_type: String) -> Self {
40547        self.tg_type = tg_type;
40548        self
40549    }
40550    #[allow(rustdoc::invalid_html_tags)]
40551    #[doc = "Date the message was sent originally in Unix time"]
40552    pub fn set_date(mut self, date: i64) -> Self {
40553        self.date = date;
40554        self
40555    }
40556    #[allow(rustdoc::invalid_html_tags)]
40557    #[doc = "Name of the user that sent the message originally"]
40558    pub fn set_sender_user_name(mut self, sender_user_name: String) -> Self {
40559        self.sender_user_name = sender_user_name;
40560        self
40561    }
40562    pub fn build(self) -> MessageOriginHiddenUser {
40563        MessageOriginHiddenUser {
40564            tg_type: self.tg_type,
40565            date: self.date,
40566            sender_user_name: self.sender_user_name,
40567        }
40568    }
40569}
40570#[allow(rustdoc::invalid_html_tags)]
40571#[doc = "Describes a story area pointing to a location. Currently, a story can have up to 10 location areas."]
40572#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40573pub struct StoryAreaTypeLocation {
40574    #[allow(rustdoc::invalid_html_tags)]
40575    #[doc = "Type of the area, always \"location\""]
40576    #[serde(rename = "type")]
40577    pub tg_type: String,
40578    #[allow(rustdoc::invalid_html_tags)]
40579    #[doc = "Location latitude in degrees"]
40580    #[serde(rename = "latitude")]
40581    pub latitude: ::ordered_float::OrderedFloat<f64>,
40582    #[allow(rustdoc::invalid_html_tags)]
40583    #[doc = "Location longitude in degrees"]
40584    #[serde(rename = "longitude")]
40585    pub longitude: ::ordered_float::OrderedFloat<f64>,
40586    #[allow(rustdoc::invalid_html_tags)]
40587    #[doc = "Optional. Address of the location"]
40588    #[serde(skip_serializing_if = "Option::is_none", rename = "address", default)]
40589    pub address: Option<BoxWrapper<Unbox<LocationAddress>>>,
40590}
40591#[allow(rustdoc::invalid_html_tags)]
40592#[doc = "Companion type to StoryAreaTypeLocation that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
40593#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40594pub struct NoSkipStoryAreaTypeLocation {
40595    #[allow(rustdoc::invalid_html_tags)]
40596    #[doc = "Type of the area, always \"location\""]
40597    #[serde(rename = "type")]
40598    pub tg_type: String,
40599    #[allow(rustdoc::invalid_html_tags)]
40600    #[doc = "Location latitude in degrees"]
40601    #[serde(rename = "latitude")]
40602    pub latitude: ::ordered_float::OrderedFloat<f64>,
40603    #[allow(rustdoc::invalid_html_tags)]
40604    #[doc = "Location longitude in degrees"]
40605    #[serde(rename = "longitude")]
40606    pub longitude: ::ordered_float::OrderedFloat<f64>,
40607    pub address: Option<BoxWrapper<Unbox<LocationAddress>>>,
40608}
40609impl From<NoSkipStoryAreaTypeLocation> for StoryAreaTypeLocation {
40610    fn from(t: NoSkipStoryAreaTypeLocation) -> Self {
40611        Self {
40612            tg_type: t.tg_type,
40613            latitude: t.latitude,
40614            longitude: t.longitude,
40615            address: t.address,
40616        }
40617    }
40618}
40619#[allow(clippy::from_over_into)]
40620impl Into<NoSkipStoryAreaTypeLocation> for StoryAreaTypeLocation {
40621    fn into(self) -> NoSkipStoryAreaTypeLocation {
40622        NoSkipStoryAreaTypeLocation {
40623            tg_type: self.tg_type,
40624            latitude: self.latitude,
40625            longitude: self.longitude,
40626            address: self.address,
40627        }
40628    }
40629}
40630impl NoSkipStoryAreaTypeLocation {
40631    pub fn skip(self) -> StoryAreaTypeLocation {
40632        self.into()
40633    }
40634}
40635impl StoryAreaTypeLocation {
40636    pub fn noskip(self) -> NoSkipStoryAreaTypeLocation {
40637        self.into()
40638    }
40639}
40640#[allow(rustdoc::invalid_html_tags)]
40641#[doc = "Describes a story area pointing to a location. Currently, a story can have up to 10 location areas."]
40642#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40643pub struct StoryAreaTypeLocationBuilder {
40644    #[allow(rustdoc::invalid_html_tags)]
40645    #[doc = "Type of the area, always \"location\""]
40646    #[serde(rename = "type")]
40647    pub tg_type: String,
40648    #[allow(rustdoc::invalid_html_tags)]
40649    #[doc = "Location latitude in degrees"]
40650    #[serde(rename = "latitude")]
40651    pub latitude: ::ordered_float::OrderedFloat<f64>,
40652    #[allow(rustdoc::invalid_html_tags)]
40653    #[doc = "Location longitude in degrees"]
40654    #[serde(rename = "longitude")]
40655    pub longitude: ::ordered_float::OrderedFloat<f64>,
40656    #[allow(rustdoc::invalid_html_tags)]
40657    #[doc = "Optional. Address of the location"]
40658    #[serde(skip_serializing_if = "Option::is_none", rename = "address", default)]
40659    pub address: Option<BoxWrapper<Unbox<LocationAddress>>>,
40660}
40661impl StoryAreaTypeLocationBuilder {
40662    #[allow(clippy::too_many_arguments)]
40663    pub fn new(
40664        latitude: ::ordered_float::OrderedFloat<f64>,
40665        longitude: ::ordered_float::OrderedFloat<f64>,
40666    ) -> Self {
40667        Self {
40668            tg_type: "StoryAreaTypeLocation".to_owned(),
40669            latitude,
40670            longitude,
40671            address: None,
40672        }
40673    }
40674    #[allow(rustdoc::invalid_html_tags)]
40675    #[doc = "Type of the area, always \"location\""]
40676    pub fn set_type(mut self, tg_type: String) -> Self {
40677        self.tg_type = tg_type;
40678        self
40679    }
40680    #[allow(rustdoc::invalid_html_tags)]
40681    #[doc = "Location latitude in degrees"]
40682    pub fn set_latitude(mut self, latitude: ::ordered_float::OrderedFloat<f64>) -> Self {
40683        self.latitude = latitude;
40684        self
40685    }
40686    #[allow(rustdoc::invalid_html_tags)]
40687    #[doc = "Location longitude in degrees"]
40688    pub fn set_longitude(mut self, longitude: ::ordered_float::OrderedFloat<f64>) -> Self {
40689        self.longitude = longitude;
40690        self
40691    }
40692    #[allow(rustdoc::invalid_html_tags)]
40693    #[doc = "Optional. Address of the location"]
40694    pub fn set_address(mut self, address: LocationAddress) -> Self {
40695        self.address = Some(BoxWrapper(Unbox(address)));
40696        self
40697    }
40698    pub fn build(self) -> StoryAreaTypeLocation {
40699        StoryAreaTypeLocation {
40700            tg_type: self.tg_type,
40701            latitude: self.latitude,
40702            longitude: self.longitude,
40703            address: self.address,
40704        }
40705    }
40706}
40707#[allow(rustdoc::invalid_html_tags)]
40708#[doc = "Contains parameters of a post that is being suggested by the bot."]
40709#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40710pub struct SuggestedPostParameters {
40711    #[allow(rustdoc::invalid_html_tags)]
40712    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
40713    #[serde(skip_serializing_if = "Option::is_none", rename = "price", default)]
40714    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
40715    #[allow(rustdoc::invalid_html_tags)]
40716    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
40717    #[serde(skip_serializing_if = "Option::is_none", rename = "send_date", default)]
40718    pub send_date: Option<i64>,
40719}
40720#[allow(rustdoc::invalid_html_tags)]
40721#[doc = "Companion type to SuggestedPostParameters that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
40722#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40723pub struct NoSkipSuggestedPostParameters {
40724    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
40725    pub send_date: Option<i64>,
40726}
40727impl From<NoSkipSuggestedPostParameters> for SuggestedPostParameters {
40728    fn from(t: NoSkipSuggestedPostParameters) -> Self {
40729        Self {
40730            price: t.price,
40731            send_date: t.send_date,
40732        }
40733    }
40734}
40735#[allow(clippy::from_over_into)]
40736impl Into<NoSkipSuggestedPostParameters> for SuggestedPostParameters {
40737    fn into(self) -> NoSkipSuggestedPostParameters {
40738        NoSkipSuggestedPostParameters {
40739            price: self.price,
40740            send_date: self.send_date,
40741        }
40742    }
40743}
40744impl NoSkipSuggestedPostParameters {
40745    pub fn skip(self) -> SuggestedPostParameters {
40746        self.into()
40747    }
40748}
40749impl SuggestedPostParameters {
40750    pub fn noskip(self) -> NoSkipSuggestedPostParameters {
40751        self.into()
40752    }
40753}
40754#[allow(rustdoc::invalid_html_tags)]
40755#[doc = "Contains parameters of a post that is being suggested by the bot."]
40756#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40757pub struct SuggestedPostParametersBuilder {
40758    #[allow(rustdoc::invalid_html_tags)]
40759    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
40760    #[serde(skip_serializing_if = "Option::is_none", rename = "price", default)]
40761    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
40762    #[allow(rustdoc::invalid_html_tags)]
40763    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
40764    #[serde(skip_serializing_if = "Option::is_none", rename = "send_date", default)]
40765    pub send_date: Option<i64>,
40766}
40767impl SuggestedPostParametersBuilder {
40768    #[allow(clippy::too_many_arguments)]
40769    pub fn new() -> Self {
40770        Self {
40771            price: None,
40772            send_date: None,
40773        }
40774    }
40775    #[allow(rustdoc::invalid_html_tags)]
40776    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
40777    pub fn set_price(mut self, price: SuggestedPostPrice) -> Self {
40778        self.price = Some(BoxWrapper(Unbox(price)));
40779        self
40780    }
40781    #[allow(rustdoc::invalid_html_tags)]
40782    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
40783    pub fn set_send_date(mut self, send_date: i64) -> Self {
40784        self.send_date = Some(send_date);
40785        self
40786    }
40787    pub fn build(self) -> SuggestedPostParameters {
40788        SuggestedPostParameters {
40789            price: self.price,
40790            send_date: self.send_date,
40791        }
40792    }
40793}
40794#[allow(rustdoc::invalid_html_tags)]
40795#[doc = "This object represents a sticker set."]
40796#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40797pub struct StickerSet {
40798    #[allow(rustdoc::invalid_html_tags)]
40799    #[doc = "Sticker set name"]
40800    #[serde(rename = "name")]
40801    pub name: String,
40802    #[allow(rustdoc::invalid_html_tags)]
40803    #[doc = "Sticker set title"]
40804    #[serde(rename = "title")]
40805    pub title: String,
40806    #[allow(rustdoc::invalid_html_tags)]
40807    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
40808    #[serde(rename = "sticker_type")]
40809    pub sticker_type: String,
40810    #[allow(rustdoc::invalid_html_tags)]
40811    #[doc = "List of all set stickers"]
40812    #[serde(rename = "stickers")]
40813    pub stickers: Vec<Sticker>,
40814    #[allow(rustdoc::invalid_html_tags)]
40815    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
40816    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
40817    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
40818}
40819#[allow(rustdoc::invalid_html_tags)]
40820#[doc = "Companion type to StickerSet that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
40821#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40822pub struct NoSkipStickerSet {
40823    #[allow(rustdoc::invalid_html_tags)]
40824    #[doc = "Sticker set name"]
40825    #[serde(rename = "name")]
40826    pub name: String,
40827    #[allow(rustdoc::invalid_html_tags)]
40828    #[doc = "Sticker set title"]
40829    #[serde(rename = "title")]
40830    pub title: String,
40831    #[allow(rustdoc::invalid_html_tags)]
40832    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
40833    #[serde(rename = "sticker_type")]
40834    pub sticker_type: String,
40835    #[allow(rustdoc::invalid_html_tags)]
40836    #[doc = "List of all set stickers"]
40837    #[serde(rename = "stickers")]
40838    pub stickers: Vec<Sticker>,
40839    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
40840}
40841impl From<NoSkipStickerSet> for StickerSet {
40842    fn from(t: NoSkipStickerSet) -> Self {
40843        Self {
40844            name: t.name,
40845            title: t.title,
40846            sticker_type: t.sticker_type,
40847            stickers: t.stickers,
40848            thumbnail: t.thumbnail,
40849        }
40850    }
40851}
40852#[allow(clippy::from_over_into)]
40853impl Into<NoSkipStickerSet> for StickerSet {
40854    fn into(self) -> NoSkipStickerSet {
40855        NoSkipStickerSet {
40856            name: self.name,
40857            title: self.title,
40858            sticker_type: self.sticker_type,
40859            stickers: self.stickers,
40860            thumbnail: self.thumbnail,
40861        }
40862    }
40863}
40864impl NoSkipStickerSet {
40865    pub fn skip(self) -> StickerSet {
40866        self.into()
40867    }
40868}
40869impl StickerSet {
40870    pub fn noskip(self) -> NoSkipStickerSet {
40871        self.into()
40872    }
40873}
40874#[allow(rustdoc::invalid_html_tags)]
40875#[doc = "This object represents a sticker set."]
40876#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40877pub struct StickerSetBuilder {
40878    #[allow(rustdoc::invalid_html_tags)]
40879    #[doc = "Sticker set name"]
40880    #[serde(rename = "name")]
40881    pub name: String,
40882    #[allow(rustdoc::invalid_html_tags)]
40883    #[doc = "Sticker set title"]
40884    #[serde(rename = "title")]
40885    pub title: String,
40886    #[allow(rustdoc::invalid_html_tags)]
40887    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
40888    #[serde(rename = "sticker_type")]
40889    pub sticker_type: String,
40890    #[allow(rustdoc::invalid_html_tags)]
40891    #[doc = "List of all set stickers"]
40892    #[serde(rename = "stickers")]
40893    pub stickers: Vec<Sticker>,
40894    #[allow(rustdoc::invalid_html_tags)]
40895    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
40896    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
40897    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
40898}
40899impl StickerSetBuilder {
40900    #[allow(clippy::too_many_arguments)]
40901    pub fn new(name: String, title: String, sticker_type: String, stickers: Vec<Sticker>) -> Self {
40902        Self {
40903            name,
40904            title,
40905            sticker_type,
40906            stickers,
40907            thumbnail: None,
40908        }
40909    }
40910    #[allow(rustdoc::invalid_html_tags)]
40911    #[doc = "Sticker set name"]
40912    pub fn set_name(mut self, name: String) -> Self {
40913        self.name = name;
40914        self
40915    }
40916    #[allow(rustdoc::invalid_html_tags)]
40917    #[doc = "Sticker set title"]
40918    pub fn set_title(mut self, title: String) -> Self {
40919        self.title = title;
40920        self
40921    }
40922    #[allow(rustdoc::invalid_html_tags)]
40923    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
40924    pub fn set_sticker_type(mut self, sticker_type: String) -> Self {
40925        self.sticker_type = sticker_type;
40926        self
40927    }
40928    #[allow(rustdoc::invalid_html_tags)]
40929    #[doc = "List of all set stickers"]
40930    pub fn set_stickers(mut self, stickers: Vec<Sticker>) -> Self {
40931        self.stickers = stickers;
40932        self
40933    }
40934    #[allow(rustdoc::invalid_html_tags)]
40935    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
40936    pub fn set_thumbnail(mut self, thumbnail: PhotoSize) -> Self {
40937        self.thumbnail = Some(BoxWrapper(Unbox(thumbnail)));
40938        self
40939    }
40940    pub fn build(self) -> StickerSet {
40941        StickerSet {
40942            name: self.name,
40943            title: self.title,
40944            sticker_type: self.sticker_type,
40945            stickers: self.stickers,
40946            thumbnail: self.thumbnail,
40947        }
40948    }
40949}
40950#[allow(rustdoc::invalid_html_tags)]
40951#[doc = "This object contains information about a poll."]
40952#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
40953pub struct Poll {
40954    #[allow(rustdoc::invalid_html_tags)]
40955    #[doc = "Unique poll identifier"]
40956    #[serde(rename = "id")]
40957    pub id: String,
40958    #[allow(rustdoc::invalid_html_tags)]
40959    #[doc = "Poll question, 1-300 characters"]
40960    #[serde(rename = "question")]
40961    pub question: String,
40962    #[allow(rustdoc::invalid_html_tags)]
40963    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
40964    #[serde(
40965        skip_serializing_if = "Option::is_none",
40966        rename = "question_entities",
40967        default
40968    )]
40969    pub question_entities: Option<Vec<MessageEntity>>,
40970    #[allow(rustdoc::invalid_html_tags)]
40971    #[doc = "List of poll options"]
40972    #[serde(rename = "options")]
40973    pub options: Vec<PollOption>,
40974    #[allow(rustdoc::invalid_html_tags)]
40975    #[doc = "Total number of users that voted in the poll"]
40976    #[serde(rename = "total_voter_count")]
40977    pub total_voter_count: i64,
40978    #[allow(rustdoc::invalid_html_tags)]
40979    #[doc = "True, if the poll is closed"]
40980    #[serde(rename = "is_closed")]
40981    pub is_closed: bool,
40982    #[allow(rustdoc::invalid_html_tags)]
40983    #[doc = "True, if the poll is anonymous"]
40984    #[serde(rename = "is_anonymous")]
40985    pub is_anonymous: bool,
40986    #[allow(rustdoc::invalid_html_tags)]
40987    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
40988    #[serde(rename = "type")]
40989    pub tg_type: String,
40990    #[allow(rustdoc::invalid_html_tags)]
40991    #[doc = "True, if the poll allows multiple answers"]
40992    #[serde(rename = "allows_multiple_answers")]
40993    pub allows_multiple_answers: bool,
40994    #[allow(rustdoc::invalid_html_tags)]
40995    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
40996    #[serde(
40997        skip_serializing_if = "Option::is_none",
40998        rename = "correct_option_id",
40999        default
41000    )]
41001    pub correct_option_id: Option<i64>,
41002    #[allow(rustdoc::invalid_html_tags)]
41003    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
41004    #[serde(
41005        skip_serializing_if = "Option::is_none",
41006        rename = "explanation",
41007        default
41008    )]
41009    pub explanation: Option<String>,
41010    #[allow(rustdoc::invalid_html_tags)]
41011    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
41012    #[serde(
41013        skip_serializing_if = "Option::is_none",
41014        rename = "explanation_entities",
41015        default
41016    )]
41017    pub explanation_entities: Option<Vec<MessageEntity>>,
41018    #[allow(rustdoc::invalid_html_tags)]
41019    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
41020    #[serde(
41021        skip_serializing_if = "Option::is_none",
41022        rename = "open_period",
41023        default
41024    )]
41025    pub open_period: Option<i64>,
41026    #[allow(rustdoc::invalid_html_tags)]
41027    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
41028    #[serde(
41029        skip_serializing_if = "Option::is_none",
41030        rename = "close_date",
41031        default
41032    )]
41033    pub close_date: Option<i64>,
41034}
41035#[allow(rustdoc::invalid_html_tags)]
41036#[doc = "Companion type to Poll that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
41037#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41038pub struct NoSkipPoll {
41039    #[allow(rustdoc::invalid_html_tags)]
41040    #[doc = "Unique poll identifier"]
41041    #[serde(rename = "id")]
41042    pub id: String,
41043    #[allow(rustdoc::invalid_html_tags)]
41044    #[doc = "Poll question, 1-300 characters"]
41045    #[serde(rename = "question")]
41046    pub question: String,
41047    pub question_entities: Option<Vec<MessageEntity>>,
41048    #[allow(rustdoc::invalid_html_tags)]
41049    #[doc = "List of poll options"]
41050    #[serde(rename = "options")]
41051    pub options: Vec<PollOption>,
41052    #[allow(rustdoc::invalid_html_tags)]
41053    #[doc = "Total number of users that voted in the poll"]
41054    #[serde(rename = "total_voter_count")]
41055    pub total_voter_count: i64,
41056    #[allow(rustdoc::invalid_html_tags)]
41057    #[doc = "True, if the poll is closed"]
41058    #[serde(rename = "is_closed")]
41059    pub is_closed: bool,
41060    #[allow(rustdoc::invalid_html_tags)]
41061    #[doc = "True, if the poll is anonymous"]
41062    #[serde(rename = "is_anonymous")]
41063    pub is_anonymous: bool,
41064    #[allow(rustdoc::invalid_html_tags)]
41065    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
41066    #[serde(rename = "type")]
41067    pub tg_type: String,
41068    #[allow(rustdoc::invalid_html_tags)]
41069    #[doc = "True, if the poll allows multiple answers"]
41070    #[serde(rename = "allows_multiple_answers")]
41071    pub allows_multiple_answers: bool,
41072    pub correct_option_id: Option<i64>,
41073    pub explanation: Option<String>,
41074    pub explanation_entities: Option<Vec<MessageEntity>>,
41075    pub open_period: Option<i64>,
41076    pub close_date: Option<i64>,
41077}
41078impl From<NoSkipPoll> for Poll {
41079    fn from(t: NoSkipPoll) -> Self {
41080        Self {
41081            id: t.id,
41082            question: t.question,
41083            question_entities: t.question_entities,
41084            options: t.options,
41085            total_voter_count: t.total_voter_count,
41086            is_closed: t.is_closed,
41087            is_anonymous: t.is_anonymous,
41088            tg_type: t.tg_type,
41089            allows_multiple_answers: t.allows_multiple_answers,
41090            correct_option_id: t.correct_option_id,
41091            explanation: t.explanation,
41092            explanation_entities: t.explanation_entities,
41093            open_period: t.open_period,
41094            close_date: t.close_date,
41095        }
41096    }
41097}
41098#[allow(clippy::from_over_into)]
41099impl Into<NoSkipPoll> for Poll {
41100    fn into(self) -> NoSkipPoll {
41101        NoSkipPoll {
41102            id: self.id,
41103            question: self.question,
41104            question_entities: self.question_entities,
41105            options: self.options,
41106            total_voter_count: self.total_voter_count,
41107            is_closed: self.is_closed,
41108            is_anonymous: self.is_anonymous,
41109            tg_type: self.tg_type,
41110            allows_multiple_answers: self.allows_multiple_answers,
41111            correct_option_id: self.correct_option_id,
41112            explanation: self.explanation,
41113            explanation_entities: self.explanation_entities,
41114            open_period: self.open_period,
41115            close_date: self.close_date,
41116        }
41117    }
41118}
41119impl NoSkipPoll {
41120    pub fn skip(self) -> Poll {
41121        self.into()
41122    }
41123}
41124impl Poll {
41125    pub fn noskip(self) -> NoSkipPoll {
41126        self.into()
41127    }
41128}
41129#[allow(rustdoc::invalid_html_tags)]
41130#[doc = "This object contains information about a poll."]
41131#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41132pub struct PollBuilder {
41133    #[allow(rustdoc::invalid_html_tags)]
41134    #[doc = "Unique poll identifier"]
41135    #[serde(rename = "id")]
41136    pub id: String,
41137    #[allow(rustdoc::invalid_html_tags)]
41138    #[doc = "Poll question, 1-300 characters"]
41139    #[serde(rename = "question")]
41140    pub question: String,
41141    #[allow(rustdoc::invalid_html_tags)]
41142    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
41143    #[serde(
41144        skip_serializing_if = "Option::is_none",
41145        rename = "question_entities",
41146        default
41147    )]
41148    pub question_entities: Option<Vec<MessageEntity>>,
41149    #[allow(rustdoc::invalid_html_tags)]
41150    #[doc = "List of poll options"]
41151    #[serde(rename = "options")]
41152    pub options: Vec<PollOption>,
41153    #[allow(rustdoc::invalid_html_tags)]
41154    #[doc = "Total number of users that voted in the poll"]
41155    #[serde(rename = "total_voter_count")]
41156    pub total_voter_count: i64,
41157    #[allow(rustdoc::invalid_html_tags)]
41158    #[doc = "True, if the poll is closed"]
41159    #[serde(rename = "is_closed")]
41160    pub is_closed: bool,
41161    #[allow(rustdoc::invalid_html_tags)]
41162    #[doc = "True, if the poll is anonymous"]
41163    #[serde(rename = "is_anonymous")]
41164    pub is_anonymous: bool,
41165    #[allow(rustdoc::invalid_html_tags)]
41166    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
41167    #[serde(rename = "type")]
41168    pub tg_type: String,
41169    #[allow(rustdoc::invalid_html_tags)]
41170    #[doc = "True, if the poll allows multiple answers"]
41171    #[serde(rename = "allows_multiple_answers")]
41172    pub allows_multiple_answers: bool,
41173    #[allow(rustdoc::invalid_html_tags)]
41174    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
41175    #[serde(
41176        skip_serializing_if = "Option::is_none",
41177        rename = "correct_option_id",
41178        default
41179    )]
41180    pub correct_option_id: Option<i64>,
41181    #[allow(rustdoc::invalid_html_tags)]
41182    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
41183    #[serde(
41184        skip_serializing_if = "Option::is_none",
41185        rename = "explanation",
41186        default
41187    )]
41188    pub explanation: Option<String>,
41189    #[allow(rustdoc::invalid_html_tags)]
41190    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
41191    #[serde(
41192        skip_serializing_if = "Option::is_none",
41193        rename = "explanation_entities",
41194        default
41195    )]
41196    pub explanation_entities: Option<Vec<MessageEntity>>,
41197    #[allow(rustdoc::invalid_html_tags)]
41198    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
41199    #[serde(
41200        skip_serializing_if = "Option::is_none",
41201        rename = "open_period",
41202        default
41203    )]
41204    pub open_period: Option<i64>,
41205    #[allow(rustdoc::invalid_html_tags)]
41206    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
41207    #[serde(
41208        skip_serializing_if = "Option::is_none",
41209        rename = "close_date",
41210        default
41211    )]
41212    pub close_date: Option<i64>,
41213}
41214impl PollBuilder {
41215    #[allow(clippy::too_many_arguments)]
41216    pub fn new(
41217        id: String,
41218        question: String,
41219        options: Vec<PollOption>,
41220        total_voter_count: i64,
41221        is_closed: bool,
41222        is_anonymous: bool,
41223        allows_multiple_answers: bool,
41224    ) -> Self {
41225        Self {
41226            tg_type: "Poll".to_owned(),
41227            id,
41228            question,
41229            options,
41230            total_voter_count,
41231            is_closed,
41232            is_anonymous,
41233            allows_multiple_answers,
41234            question_entities: None,
41235            correct_option_id: None,
41236            explanation: None,
41237            explanation_entities: None,
41238            open_period: None,
41239            close_date: None,
41240        }
41241    }
41242    #[allow(rustdoc::invalid_html_tags)]
41243    #[doc = "Unique poll identifier"]
41244    pub fn set_id(mut self, id: String) -> Self {
41245        self.id = id;
41246        self
41247    }
41248    #[allow(rustdoc::invalid_html_tags)]
41249    #[doc = "Poll question, 1-300 characters"]
41250    pub fn set_question(mut self, question: String) -> Self {
41251        self.question = question;
41252        self
41253    }
41254    #[allow(rustdoc::invalid_html_tags)]
41255    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
41256    pub fn set_question_entities(mut self, question_entities: Vec<MessageEntity>) -> Self {
41257        self.question_entities = Some(question_entities);
41258        self
41259    }
41260    #[allow(rustdoc::invalid_html_tags)]
41261    #[doc = "List of poll options"]
41262    pub fn set_options(mut self, options: Vec<PollOption>) -> Self {
41263        self.options = options;
41264        self
41265    }
41266    #[allow(rustdoc::invalid_html_tags)]
41267    #[doc = "Total number of users that voted in the poll"]
41268    pub fn set_total_voter_count(mut self, total_voter_count: i64) -> Self {
41269        self.total_voter_count = total_voter_count;
41270        self
41271    }
41272    #[allow(rustdoc::invalid_html_tags)]
41273    #[doc = "True, if the poll is closed"]
41274    pub fn set_is_closed(mut self, is_closed: bool) -> Self {
41275        self.is_closed = is_closed;
41276        self
41277    }
41278    #[allow(rustdoc::invalid_html_tags)]
41279    #[doc = "True, if the poll is anonymous"]
41280    pub fn set_is_anonymous(mut self, is_anonymous: bool) -> Self {
41281        self.is_anonymous = is_anonymous;
41282        self
41283    }
41284    #[allow(rustdoc::invalid_html_tags)]
41285    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
41286    pub fn set_type(mut self, tg_type: String) -> Self {
41287        self.tg_type = tg_type;
41288        self
41289    }
41290    #[allow(rustdoc::invalid_html_tags)]
41291    #[doc = "True, if the poll allows multiple answers"]
41292    pub fn set_allows_multiple_answers(mut self, allows_multiple_answers: bool) -> Self {
41293        self.allows_multiple_answers = allows_multiple_answers;
41294        self
41295    }
41296    #[allow(rustdoc::invalid_html_tags)]
41297    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
41298    pub fn set_correct_option_id(mut self, correct_option_id: i64) -> Self {
41299        self.correct_option_id = Some(correct_option_id);
41300        self
41301    }
41302    #[allow(rustdoc::invalid_html_tags)]
41303    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
41304    pub fn set_explanation(mut self, explanation: String) -> Self {
41305        self.explanation = Some(explanation);
41306        self
41307    }
41308    #[allow(rustdoc::invalid_html_tags)]
41309    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
41310    pub fn set_explanation_entities(mut self, explanation_entities: Vec<MessageEntity>) -> Self {
41311        self.explanation_entities = Some(explanation_entities);
41312        self
41313    }
41314    #[allow(rustdoc::invalid_html_tags)]
41315    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
41316    pub fn set_open_period(mut self, open_period: i64) -> Self {
41317        self.open_period = Some(open_period);
41318        self
41319    }
41320    #[allow(rustdoc::invalid_html_tags)]
41321    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
41322    pub fn set_close_date(mut self, close_date: i64) -> Self {
41323        self.close_date = Some(close_date);
41324        self
41325    }
41326    pub fn build(self) -> Poll {
41327        Poll {
41328            id: self.id,
41329            question: self.question,
41330            question_entities: self.question_entities,
41331            options: self.options,
41332            total_voter_count: self.total_voter_count,
41333            is_closed: self.is_closed,
41334            is_anonymous: self.is_anonymous,
41335            tg_type: self.tg_type,
41336            allows_multiple_answers: self.allows_multiple_answers,
41337            correct_option_id: self.correct_option_id,
41338            explanation: self.explanation,
41339            explanation_entities: self.explanation_entities,
41340            open_period: self.open_period,
41341            close_date: self.close_date,
41342        }
41343    }
41344}
41345#[allow(rustdoc::invalid_html_tags)]
41346#[doc = "This object represents a video file."]
41347#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41348pub struct Video {
41349    #[allow(rustdoc::invalid_html_tags)]
41350    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
41351    #[serde(rename = "file_id")]
41352    pub file_id: String,
41353    #[allow(rustdoc::invalid_html_tags)]
41354    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
41355    #[serde(rename = "file_unique_id")]
41356    pub file_unique_id: String,
41357    #[allow(rustdoc::invalid_html_tags)]
41358    #[doc = "Video width as defined by the sender"]
41359    #[serde(rename = "width")]
41360    pub width: i64,
41361    #[allow(rustdoc::invalid_html_tags)]
41362    #[doc = "Video height as defined by the sender"]
41363    #[serde(rename = "height")]
41364    pub height: i64,
41365    #[allow(rustdoc::invalid_html_tags)]
41366    #[doc = "Duration of the video in seconds as defined by the sender"]
41367    #[serde(rename = "duration")]
41368    pub duration: i64,
41369    #[allow(rustdoc::invalid_html_tags)]
41370    #[doc = "Optional. Video thumbnail"]
41371    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
41372    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
41373    #[allow(rustdoc::invalid_html_tags)]
41374    #[doc = "Optional. Available sizes of the cover of the video in the message"]
41375    #[serde(skip_serializing_if = "Option::is_none", rename = "cover", default)]
41376    pub cover: Option<Vec<PhotoSize>>,
41377    #[allow(rustdoc::invalid_html_tags)]
41378    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
41379    #[serde(
41380        skip_serializing_if = "Option::is_none",
41381        rename = "start_timestamp",
41382        default
41383    )]
41384    pub start_timestamp: Option<i64>,
41385    #[allow(rustdoc::invalid_html_tags)]
41386    #[doc = "Optional. Original filename as defined by the sender"]
41387    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
41388    pub file_name: Option<String>,
41389    #[allow(rustdoc::invalid_html_tags)]
41390    #[doc = "Optional. MIME type of the file as defined by the sender"]
41391    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
41392    pub mime_type: Option<String>,
41393    #[allow(rustdoc::invalid_html_tags)]
41394    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
41395    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
41396    pub file_size: Option<i64>,
41397}
41398#[allow(rustdoc::invalid_html_tags)]
41399#[doc = "Companion type to Video that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
41400#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41401pub struct NoSkipVideo {
41402    #[allow(rustdoc::invalid_html_tags)]
41403    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
41404    #[serde(rename = "file_id")]
41405    pub file_id: String,
41406    #[allow(rustdoc::invalid_html_tags)]
41407    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
41408    #[serde(rename = "file_unique_id")]
41409    pub file_unique_id: String,
41410    #[allow(rustdoc::invalid_html_tags)]
41411    #[doc = "Video width as defined by the sender"]
41412    #[serde(rename = "width")]
41413    pub width: i64,
41414    #[allow(rustdoc::invalid_html_tags)]
41415    #[doc = "Video height as defined by the sender"]
41416    #[serde(rename = "height")]
41417    pub height: i64,
41418    #[allow(rustdoc::invalid_html_tags)]
41419    #[doc = "Duration of the video in seconds as defined by the sender"]
41420    #[serde(rename = "duration")]
41421    pub duration: i64,
41422    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
41423    pub cover: Option<Vec<PhotoSize>>,
41424    pub start_timestamp: Option<i64>,
41425    pub file_name: Option<String>,
41426    pub mime_type: Option<String>,
41427    pub file_size: Option<i64>,
41428}
41429impl From<NoSkipVideo> for Video {
41430    fn from(t: NoSkipVideo) -> Self {
41431        Self {
41432            file_id: t.file_id,
41433            file_unique_id: t.file_unique_id,
41434            width: t.width,
41435            height: t.height,
41436            duration: t.duration,
41437            thumbnail: t.thumbnail,
41438            cover: t.cover,
41439            start_timestamp: t.start_timestamp,
41440            file_name: t.file_name,
41441            mime_type: t.mime_type,
41442            file_size: t.file_size,
41443        }
41444    }
41445}
41446#[allow(clippy::from_over_into)]
41447impl Into<NoSkipVideo> for Video {
41448    fn into(self) -> NoSkipVideo {
41449        NoSkipVideo {
41450            file_id: self.file_id,
41451            file_unique_id: self.file_unique_id,
41452            width: self.width,
41453            height: self.height,
41454            duration: self.duration,
41455            thumbnail: self.thumbnail,
41456            cover: self.cover,
41457            start_timestamp: self.start_timestamp,
41458            file_name: self.file_name,
41459            mime_type: self.mime_type,
41460            file_size: self.file_size,
41461        }
41462    }
41463}
41464impl NoSkipVideo {
41465    pub fn skip(self) -> Video {
41466        self.into()
41467    }
41468}
41469impl Video {
41470    pub fn noskip(self) -> NoSkipVideo {
41471        self.into()
41472    }
41473}
41474#[allow(rustdoc::invalid_html_tags)]
41475#[doc = "This object represents a video file."]
41476#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41477pub struct VideoBuilder {
41478    #[allow(rustdoc::invalid_html_tags)]
41479    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
41480    #[serde(rename = "file_id")]
41481    pub file_id: String,
41482    #[allow(rustdoc::invalid_html_tags)]
41483    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
41484    #[serde(rename = "file_unique_id")]
41485    pub file_unique_id: String,
41486    #[allow(rustdoc::invalid_html_tags)]
41487    #[doc = "Video width as defined by the sender"]
41488    #[serde(rename = "width")]
41489    pub width: i64,
41490    #[allow(rustdoc::invalid_html_tags)]
41491    #[doc = "Video height as defined by the sender"]
41492    #[serde(rename = "height")]
41493    pub height: i64,
41494    #[allow(rustdoc::invalid_html_tags)]
41495    #[doc = "Duration of the video in seconds as defined by the sender"]
41496    #[serde(rename = "duration")]
41497    pub duration: i64,
41498    #[allow(rustdoc::invalid_html_tags)]
41499    #[doc = "Optional. Video thumbnail"]
41500    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
41501    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
41502    #[allow(rustdoc::invalid_html_tags)]
41503    #[doc = "Optional. Available sizes of the cover of the video in the message"]
41504    #[serde(skip_serializing_if = "Option::is_none", rename = "cover", default)]
41505    pub cover: Option<Vec<PhotoSize>>,
41506    #[allow(rustdoc::invalid_html_tags)]
41507    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
41508    #[serde(
41509        skip_serializing_if = "Option::is_none",
41510        rename = "start_timestamp",
41511        default
41512    )]
41513    pub start_timestamp: Option<i64>,
41514    #[allow(rustdoc::invalid_html_tags)]
41515    #[doc = "Optional. Original filename as defined by the sender"]
41516    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
41517    pub file_name: Option<String>,
41518    #[allow(rustdoc::invalid_html_tags)]
41519    #[doc = "Optional. MIME type of the file as defined by the sender"]
41520    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
41521    pub mime_type: Option<String>,
41522    #[allow(rustdoc::invalid_html_tags)]
41523    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
41524    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
41525    pub file_size: Option<i64>,
41526}
41527impl VideoBuilder {
41528    #[allow(clippy::too_many_arguments)]
41529    pub fn new(
41530        file_id: String,
41531        file_unique_id: String,
41532        width: i64,
41533        height: i64,
41534        duration: i64,
41535    ) -> Self {
41536        Self {
41537            file_id,
41538            file_unique_id,
41539            width,
41540            height,
41541            duration,
41542            thumbnail: None,
41543            cover: None,
41544            start_timestamp: None,
41545            file_name: None,
41546            mime_type: None,
41547            file_size: None,
41548        }
41549    }
41550    #[allow(rustdoc::invalid_html_tags)]
41551    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
41552    pub fn set_file_id(mut self, file_id: String) -> Self {
41553        self.file_id = file_id;
41554        self
41555    }
41556    #[allow(rustdoc::invalid_html_tags)]
41557    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
41558    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
41559        self.file_unique_id = file_unique_id;
41560        self
41561    }
41562    #[allow(rustdoc::invalid_html_tags)]
41563    #[doc = "Video width as defined by the sender"]
41564    pub fn set_width(mut self, width: i64) -> Self {
41565        self.width = width;
41566        self
41567    }
41568    #[allow(rustdoc::invalid_html_tags)]
41569    #[doc = "Video height as defined by the sender"]
41570    pub fn set_height(mut self, height: i64) -> Self {
41571        self.height = height;
41572        self
41573    }
41574    #[allow(rustdoc::invalid_html_tags)]
41575    #[doc = "Duration of the video in seconds as defined by the sender"]
41576    pub fn set_duration(mut self, duration: i64) -> Self {
41577        self.duration = duration;
41578        self
41579    }
41580    #[allow(rustdoc::invalid_html_tags)]
41581    #[doc = "Optional. Video thumbnail"]
41582    pub fn set_thumbnail(mut self, thumbnail: PhotoSize) -> Self {
41583        self.thumbnail = Some(BoxWrapper(Unbox(thumbnail)));
41584        self
41585    }
41586    #[allow(rustdoc::invalid_html_tags)]
41587    #[doc = "Optional. Available sizes of the cover of the video in the message"]
41588    pub fn set_cover(mut self, cover: Vec<PhotoSize>) -> Self {
41589        self.cover = Some(cover);
41590        self
41591    }
41592    #[allow(rustdoc::invalid_html_tags)]
41593    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
41594    pub fn set_start_timestamp(mut self, start_timestamp: i64) -> Self {
41595        self.start_timestamp = Some(start_timestamp);
41596        self
41597    }
41598    #[allow(rustdoc::invalid_html_tags)]
41599    #[doc = "Optional. Original filename as defined by the sender"]
41600    pub fn set_file_name(mut self, file_name: String) -> Self {
41601        self.file_name = Some(file_name);
41602        self
41603    }
41604    #[allow(rustdoc::invalid_html_tags)]
41605    #[doc = "Optional. MIME type of the file as defined by the sender"]
41606    pub fn set_mime_type(mut self, mime_type: String) -> Self {
41607        self.mime_type = Some(mime_type);
41608        self
41609    }
41610    #[allow(rustdoc::invalid_html_tags)]
41611    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
41612    pub fn set_file_size(mut self, file_size: i64) -> Self {
41613        self.file_size = Some(file_size);
41614        self
41615    }
41616    pub fn build(self) -> Video {
41617        Video {
41618            file_id: self.file_id,
41619            file_unique_id: self.file_unique_id,
41620            width: self.width,
41621            height: self.height,
41622            duration: self.duration,
41623            thumbnail: self.thumbnail,
41624            cover: self.cover,
41625            start_timestamp: self.start_timestamp,
41626            file_name: self.file_name,
41627            mime_type: self.mime_type,
41628            file_size: self.file_size,
41629        }
41630    }
41631}
41632#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
41633pub struct GeneralForumTopicHidden {}
41634impl GeneralForumTopicHidden {}
41635#[allow(rustdoc::invalid_html_tags)]
41636#[doc = "Represents the rights of an administrator in a chat."]
41637#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41638pub struct ChatAdministratorRights {
41639    #[allow(rustdoc::invalid_html_tags)]
41640    #[doc = "True, if the user's presence in the chat is hidden"]
41641    #[serde(rename = "is_anonymous")]
41642    pub is_anonymous: bool,
41643    #[allow(rustdoc::invalid_html_tags)]
41644    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
41645    #[serde(rename = "can_manage_chat")]
41646    pub can_manage_chat: bool,
41647    #[allow(rustdoc::invalid_html_tags)]
41648    #[doc = "True, if the administrator can delete messages of other users"]
41649    #[serde(rename = "can_delete_messages")]
41650    pub can_delete_messages: bool,
41651    #[allow(rustdoc::invalid_html_tags)]
41652    #[doc = "True, if the administrator can manage video chats"]
41653    #[serde(rename = "can_manage_video_chats")]
41654    pub can_manage_video_chats: bool,
41655    #[allow(rustdoc::invalid_html_tags)]
41656    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
41657    #[serde(rename = "can_restrict_members")]
41658    pub can_restrict_members: bool,
41659    #[allow(rustdoc::invalid_html_tags)]
41660    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
41661    #[serde(rename = "can_promote_members")]
41662    pub can_promote_members: bool,
41663    #[allow(rustdoc::invalid_html_tags)]
41664    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
41665    #[serde(rename = "can_change_info")]
41666    pub can_change_info: bool,
41667    #[allow(rustdoc::invalid_html_tags)]
41668    #[doc = "True, if the user is allowed to invite new users to the chat"]
41669    #[serde(rename = "can_invite_users")]
41670    pub can_invite_users: bool,
41671    #[allow(rustdoc::invalid_html_tags)]
41672    #[doc = "True, if the administrator can post stories to the chat"]
41673    #[serde(rename = "can_post_stories")]
41674    pub can_post_stories: bool,
41675    #[allow(rustdoc::invalid_html_tags)]
41676    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
41677    #[serde(rename = "can_edit_stories")]
41678    pub can_edit_stories: bool,
41679    #[allow(rustdoc::invalid_html_tags)]
41680    #[doc = "True, if the administrator can delete stories posted by other users"]
41681    #[serde(rename = "can_delete_stories")]
41682    pub can_delete_stories: bool,
41683    #[allow(rustdoc::invalid_html_tags)]
41684    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
41685    #[serde(
41686        skip_serializing_if = "Option::is_none",
41687        rename = "can_post_messages",
41688        default
41689    )]
41690    pub can_post_messages: Option<bool>,
41691    #[allow(rustdoc::invalid_html_tags)]
41692    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
41693    #[serde(
41694        skip_serializing_if = "Option::is_none",
41695        rename = "can_edit_messages",
41696        default
41697    )]
41698    pub can_edit_messages: Option<bool>,
41699    #[allow(rustdoc::invalid_html_tags)]
41700    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
41701    #[serde(
41702        skip_serializing_if = "Option::is_none",
41703        rename = "can_pin_messages",
41704        default
41705    )]
41706    pub can_pin_messages: Option<bool>,
41707    #[allow(rustdoc::invalid_html_tags)]
41708    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
41709    #[serde(
41710        skip_serializing_if = "Option::is_none",
41711        rename = "can_manage_topics",
41712        default
41713    )]
41714    pub can_manage_topics: Option<bool>,
41715    #[allow(rustdoc::invalid_html_tags)]
41716    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
41717    #[serde(
41718        skip_serializing_if = "Option::is_none",
41719        rename = "can_manage_direct_messages",
41720        default
41721    )]
41722    pub can_manage_direct_messages: Option<bool>,
41723}
41724#[allow(rustdoc::invalid_html_tags)]
41725#[doc = "Companion type to ChatAdministratorRights that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
41726#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41727pub struct NoSkipChatAdministratorRights {
41728    #[allow(rustdoc::invalid_html_tags)]
41729    #[doc = "True, if the user's presence in the chat is hidden"]
41730    #[serde(rename = "is_anonymous")]
41731    pub is_anonymous: bool,
41732    #[allow(rustdoc::invalid_html_tags)]
41733    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
41734    #[serde(rename = "can_manage_chat")]
41735    pub can_manage_chat: bool,
41736    #[allow(rustdoc::invalid_html_tags)]
41737    #[doc = "True, if the administrator can delete messages of other users"]
41738    #[serde(rename = "can_delete_messages")]
41739    pub can_delete_messages: bool,
41740    #[allow(rustdoc::invalid_html_tags)]
41741    #[doc = "True, if the administrator can manage video chats"]
41742    #[serde(rename = "can_manage_video_chats")]
41743    pub can_manage_video_chats: bool,
41744    #[allow(rustdoc::invalid_html_tags)]
41745    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
41746    #[serde(rename = "can_restrict_members")]
41747    pub can_restrict_members: bool,
41748    #[allow(rustdoc::invalid_html_tags)]
41749    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
41750    #[serde(rename = "can_promote_members")]
41751    pub can_promote_members: bool,
41752    #[allow(rustdoc::invalid_html_tags)]
41753    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
41754    #[serde(rename = "can_change_info")]
41755    pub can_change_info: bool,
41756    #[allow(rustdoc::invalid_html_tags)]
41757    #[doc = "True, if the user is allowed to invite new users to the chat"]
41758    #[serde(rename = "can_invite_users")]
41759    pub can_invite_users: bool,
41760    #[allow(rustdoc::invalid_html_tags)]
41761    #[doc = "True, if the administrator can post stories to the chat"]
41762    #[serde(rename = "can_post_stories")]
41763    pub can_post_stories: bool,
41764    #[allow(rustdoc::invalid_html_tags)]
41765    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
41766    #[serde(rename = "can_edit_stories")]
41767    pub can_edit_stories: bool,
41768    #[allow(rustdoc::invalid_html_tags)]
41769    #[doc = "True, if the administrator can delete stories posted by other users"]
41770    #[serde(rename = "can_delete_stories")]
41771    pub can_delete_stories: bool,
41772    pub can_post_messages: Option<bool>,
41773    pub can_edit_messages: Option<bool>,
41774    pub can_pin_messages: Option<bool>,
41775    pub can_manage_topics: Option<bool>,
41776    pub can_manage_direct_messages: Option<bool>,
41777}
41778impl From<NoSkipChatAdministratorRights> for ChatAdministratorRights {
41779    fn from(t: NoSkipChatAdministratorRights) -> Self {
41780        Self {
41781            is_anonymous: t.is_anonymous,
41782            can_manage_chat: t.can_manage_chat,
41783            can_delete_messages: t.can_delete_messages,
41784            can_manage_video_chats: t.can_manage_video_chats,
41785            can_restrict_members: t.can_restrict_members,
41786            can_promote_members: t.can_promote_members,
41787            can_change_info: t.can_change_info,
41788            can_invite_users: t.can_invite_users,
41789            can_post_stories: t.can_post_stories,
41790            can_edit_stories: t.can_edit_stories,
41791            can_delete_stories: t.can_delete_stories,
41792            can_post_messages: t.can_post_messages,
41793            can_edit_messages: t.can_edit_messages,
41794            can_pin_messages: t.can_pin_messages,
41795            can_manage_topics: t.can_manage_topics,
41796            can_manage_direct_messages: t.can_manage_direct_messages,
41797        }
41798    }
41799}
41800#[allow(clippy::from_over_into)]
41801impl Into<NoSkipChatAdministratorRights> for ChatAdministratorRights {
41802    fn into(self) -> NoSkipChatAdministratorRights {
41803        NoSkipChatAdministratorRights {
41804            is_anonymous: self.is_anonymous,
41805            can_manage_chat: self.can_manage_chat,
41806            can_delete_messages: self.can_delete_messages,
41807            can_manage_video_chats: self.can_manage_video_chats,
41808            can_restrict_members: self.can_restrict_members,
41809            can_promote_members: self.can_promote_members,
41810            can_change_info: self.can_change_info,
41811            can_invite_users: self.can_invite_users,
41812            can_post_stories: self.can_post_stories,
41813            can_edit_stories: self.can_edit_stories,
41814            can_delete_stories: self.can_delete_stories,
41815            can_post_messages: self.can_post_messages,
41816            can_edit_messages: self.can_edit_messages,
41817            can_pin_messages: self.can_pin_messages,
41818            can_manage_topics: self.can_manage_topics,
41819            can_manage_direct_messages: self.can_manage_direct_messages,
41820        }
41821    }
41822}
41823impl NoSkipChatAdministratorRights {
41824    pub fn skip(self) -> ChatAdministratorRights {
41825        self.into()
41826    }
41827}
41828impl ChatAdministratorRights {
41829    pub fn noskip(self) -> NoSkipChatAdministratorRights {
41830        self.into()
41831    }
41832}
41833#[allow(rustdoc::invalid_html_tags)]
41834#[doc = "Represents the rights of an administrator in a chat."]
41835#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
41836pub struct ChatAdministratorRightsBuilder {
41837    #[allow(rustdoc::invalid_html_tags)]
41838    #[doc = "True, if the user's presence in the chat is hidden"]
41839    #[serde(rename = "is_anonymous")]
41840    pub is_anonymous: bool,
41841    #[allow(rustdoc::invalid_html_tags)]
41842    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
41843    #[serde(rename = "can_manage_chat")]
41844    pub can_manage_chat: bool,
41845    #[allow(rustdoc::invalid_html_tags)]
41846    #[doc = "True, if the administrator can delete messages of other users"]
41847    #[serde(rename = "can_delete_messages")]
41848    pub can_delete_messages: bool,
41849    #[allow(rustdoc::invalid_html_tags)]
41850    #[doc = "True, if the administrator can manage video chats"]
41851    #[serde(rename = "can_manage_video_chats")]
41852    pub can_manage_video_chats: bool,
41853    #[allow(rustdoc::invalid_html_tags)]
41854    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
41855    #[serde(rename = "can_restrict_members")]
41856    pub can_restrict_members: bool,
41857    #[allow(rustdoc::invalid_html_tags)]
41858    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
41859    #[serde(rename = "can_promote_members")]
41860    pub can_promote_members: bool,
41861    #[allow(rustdoc::invalid_html_tags)]
41862    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
41863    #[serde(rename = "can_change_info")]
41864    pub can_change_info: bool,
41865    #[allow(rustdoc::invalid_html_tags)]
41866    #[doc = "True, if the user is allowed to invite new users to the chat"]
41867    #[serde(rename = "can_invite_users")]
41868    pub can_invite_users: bool,
41869    #[allow(rustdoc::invalid_html_tags)]
41870    #[doc = "True, if the administrator can post stories to the chat"]
41871    #[serde(rename = "can_post_stories")]
41872    pub can_post_stories: bool,
41873    #[allow(rustdoc::invalid_html_tags)]
41874    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
41875    #[serde(rename = "can_edit_stories")]
41876    pub can_edit_stories: bool,
41877    #[allow(rustdoc::invalid_html_tags)]
41878    #[doc = "True, if the administrator can delete stories posted by other users"]
41879    #[serde(rename = "can_delete_stories")]
41880    pub can_delete_stories: bool,
41881    #[allow(rustdoc::invalid_html_tags)]
41882    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
41883    #[serde(
41884        skip_serializing_if = "Option::is_none",
41885        rename = "can_post_messages",
41886        default
41887    )]
41888    pub can_post_messages: Option<bool>,
41889    #[allow(rustdoc::invalid_html_tags)]
41890    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
41891    #[serde(
41892        skip_serializing_if = "Option::is_none",
41893        rename = "can_edit_messages",
41894        default
41895    )]
41896    pub can_edit_messages: Option<bool>,
41897    #[allow(rustdoc::invalid_html_tags)]
41898    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
41899    #[serde(
41900        skip_serializing_if = "Option::is_none",
41901        rename = "can_pin_messages",
41902        default
41903    )]
41904    pub can_pin_messages: Option<bool>,
41905    #[allow(rustdoc::invalid_html_tags)]
41906    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
41907    #[serde(
41908        skip_serializing_if = "Option::is_none",
41909        rename = "can_manage_topics",
41910        default
41911    )]
41912    pub can_manage_topics: Option<bool>,
41913    #[allow(rustdoc::invalid_html_tags)]
41914    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
41915    #[serde(
41916        skip_serializing_if = "Option::is_none",
41917        rename = "can_manage_direct_messages",
41918        default
41919    )]
41920    pub can_manage_direct_messages: Option<bool>,
41921}
41922impl ChatAdministratorRightsBuilder {
41923    #[allow(clippy::too_many_arguments)]
41924    pub fn new(
41925        is_anonymous: bool,
41926        can_manage_chat: bool,
41927        can_delete_messages: bool,
41928        can_manage_video_chats: bool,
41929        can_restrict_members: bool,
41930        can_promote_members: bool,
41931        can_change_info: bool,
41932        can_invite_users: bool,
41933        can_post_stories: bool,
41934        can_edit_stories: bool,
41935        can_delete_stories: bool,
41936    ) -> Self {
41937        Self {
41938            is_anonymous,
41939            can_manage_chat,
41940            can_delete_messages,
41941            can_manage_video_chats,
41942            can_restrict_members,
41943            can_promote_members,
41944            can_change_info,
41945            can_invite_users,
41946            can_post_stories,
41947            can_edit_stories,
41948            can_delete_stories,
41949            can_post_messages: None,
41950            can_edit_messages: None,
41951            can_pin_messages: None,
41952            can_manage_topics: None,
41953            can_manage_direct_messages: None,
41954        }
41955    }
41956    #[allow(rustdoc::invalid_html_tags)]
41957    #[doc = "True, if the user's presence in the chat is hidden"]
41958    pub fn set_is_anonymous(mut self, is_anonymous: bool) -> Self {
41959        self.is_anonymous = is_anonymous;
41960        self
41961    }
41962    #[allow(rustdoc::invalid_html_tags)]
41963    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
41964    pub fn set_can_manage_chat(mut self, can_manage_chat: bool) -> Self {
41965        self.can_manage_chat = can_manage_chat;
41966        self
41967    }
41968    #[allow(rustdoc::invalid_html_tags)]
41969    #[doc = "True, if the administrator can delete messages of other users"]
41970    pub fn set_can_delete_messages(mut self, can_delete_messages: bool) -> Self {
41971        self.can_delete_messages = can_delete_messages;
41972        self
41973    }
41974    #[allow(rustdoc::invalid_html_tags)]
41975    #[doc = "True, if the administrator can manage video chats"]
41976    pub fn set_can_manage_video_chats(mut self, can_manage_video_chats: bool) -> Self {
41977        self.can_manage_video_chats = can_manage_video_chats;
41978        self
41979    }
41980    #[allow(rustdoc::invalid_html_tags)]
41981    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
41982    pub fn set_can_restrict_members(mut self, can_restrict_members: bool) -> Self {
41983        self.can_restrict_members = can_restrict_members;
41984        self
41985    }
41986    #[allow(rustdoc::invalid_html_tags)]
41987    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
41988    pub fn set_can_promote_members(mut self, can_promote_members: bool) -> Self {
41989        self.can_promote_members = can_promote_members;
41990        self
41991    }
41992    #[allow(rustdoc::invalid_html_tags)]
41993    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
41994    pub fn set_can_change_info(mut self, can_change_info: bool) -> Self {
41995        self.can_change_info = can_change_info;
41996        self
41997    }
41998    #[allow(rustdoc::invalid_html_tags)]
41999    #[doc = "True, if the user is allowed to invite new users to the chat"]
42000    pub fn set_can_invite_users(mut self, can_invite_users: bool) -> Self {
42001        self.can_invite_users = can_invite_users;
42002        self
42003    }
42004    #[allow(rustdoc::invalid_html_tags)]
42005    #[doc = "True, if the administrator can post stories to the chat"]
42006    pub fn set_can_post_stories(mut self, can_post_stories: bool) -> Self {
42007        self.can_post_stories = can_post_stories;
42008        self
42009    }
42010    #[allow(rustdoc::invalid_html_tags)]
42011    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
42012    pub fn set_can_edit_stories(mut self, can_edit_stories: bool) -> Self {
42013        self.can_edit_stories = can_edit_stories;
42014        self
42015    }
42016    #[allow(rustdoc::invalid_html_tags)]
42017    #[doc = "True, if the administrator can delete stories posted by other users"]
42018    pub fn set_can_delete_stories(mut self, can_delete_stories: bool) -> Self {
42019        self.can_delete_stories = can_delete_stories;
42020        self
42021    }
42022    #[allow(rustdoc::invalid_html_tags)]
42023    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
42024    pub fn set_can_post_messages(mut self, can_post_messages: bool) -> Self {
42025        self.can_post_messages = Some(can_post_messages);
42026        self
42027    }
42028    #[allow(rustdoc::invalid_html_tags)]
42029    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
42030    pub fn set_can_edit_messages(mut self, can_edit_messages: bool) -> Self {
42031        self.can_edit_messages = Some(can_edit_messages);
42032        self
42033    }
42034    #[allow(rustdoc::invalid_html_tags)]
42035    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
42036    pub fn set_can_pin_messages(mut self, can_pin_messages: bool) -> Self {
42037        self.can_pin_messages = Some(can_pin_messages);
42038        self
42039    }
42040    #[allow(rustdoc::invalid_html_tags)]
42041    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
42042    pub fn set_can_manage_topics(mut self, can_manage_topics: bool) -> Self {
42043        self.can_manage_topics = Some(can_manage_topics);
42044        self
42045    }
42046    #[allow(rustdoc::invalid_html_tags)]
42047    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
42048    pub fn set_can_manage_direct_messages(mut self, can_manage_direct_messages: bool) -> Self {
42049        self.can_manage_direct_messages = Some(can_manage_direct_messages);
42050        self
42051    }
42052    pub fn build(self) -> ChatAdministratorRights {
42053        ChatAdministratorRights {
42054            is_anonymous: self.is_anonymous,
42055            can_manage_chat: self.can_manage_chat,
42056            can_delete_messages: self.can_delete_messages,
42057            can_manage_video_chats: self.can_manage_video_chats,
42058            can_restrict_members: self.can_restrict_members,
42059            can_promote_members: self.can_promote_members,
42060            can_change_info: self.can_change_info,
42061            can_invite_users: self.can_invite_users,
42062            can_post_stories: self.can_post_stories,
42063            can_edit_stories: self.can_edit_stories,
42064            can_delete_stories: self.can_delete_stories,
42065            can_post_messages: self.can_post_messages,
42066            can_edit_messages: self.can_edit_messages,
42067            can_pin_messages: self.can_pin_messages,
42068            can_manage_topics: self.can_manage_topics,
42069            can_manage_direct_messages: self.can_manage_direct_messages,
42070        }
42071    }
42072}
42073#[allow(rustdoc::invalid_html_tags)]
42074#[doc = "Describes why a request was unsuccessful."]
42075#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42076pub struct ResponseParameters {
42077    #[allow(rustdoc::invalid_html_tags)]
42078    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
42079    #[serde(
42080        skip_serializing_if = "Option::is_none",
42081        rename = "migrate_to_chat_id",
42082        default
42083    )]
42084    pub migrate_to_chat_id: Option<i64>,
42085    #[allow(rustdoc::invalid_html_tags)]
42086    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
42087    #[serde(
42088        skip_serializing_if = "Option::is_none",
42089        rename = "retry_after",
42090        default
42091    )]
42092    pub retry_after: Option<i64>,
42093}
42094#[allow(rustdoc::invalid_html_tags)]
42095#[doc = "Companion type to ResponseParameters that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
42096#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42097pub struct NoSkipResponseParameters {
42098    pub migrate_to_chat_id: Option<i64>,
42099    pub retry_after: Option<i64>,
42100}
42101impl From<NoSkipResponseParameters> for ResponseParameters {
42102    fn from(t: NoSkipResponseParameters) -> Self {
42103        Self {
42104            migrate_to_chat_id: t.migrate_to_chat_id,
42105            retry_after: t.retry_after,
42106        }
42107    }
42108}
42109#[allow(clippy::from_over_into)]
42110impl Into<NoSkipResponseParameters> for ResponseParameters {
42111    fn into(self) -> NoSkipResponseParameters {
42112        NoSkipResponseParameters {
42113            migrate_to_chat_id: self.migrate_to_chat_id,
42114            retry_after: self.retry_after,
42115        }
42116    }
42117}
42118impl NoSkipResponseParameters {
42119    pub fn skip(self) -> ResponseParameters {
42120        self.into()
42121    }
42122}
42123impl ResponseParameters {
42124    pub fn noskip(self) -> NoSkipResponseParameters {
42125        self.into()
42126    }
42127}
42128#[allow(rustdoc::invalid_html_tags)]
42129#[doc = "Describes why a request was unsuccessful."]
42130#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42131pub struct ResponseParametersBuilder {
42132    #[allow(rustdoc::invalid_html_tags)]
42133    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
42134    #[serde(
42135        skip_serializing_if = "Option::is_none",
42136        rename = "migrate_to_chat_id",
42137        default
42138    )]
42139    pub migrate_to_chat_id: Option<i64>,
42140    #[allow(rustdoc::invalid_html_tags)]
42141    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
42142    #[serde(
42143        skip_serializing_if = "Option::is_none",
42144        rename = "retry_after",
42145        default
42146    )]
42147    pub retry_after: Option<i64>,
42148}
42149impl ResponseParametersBuilder {
42150    #[allow(clippy::too_many_arguments)]
42151    pub fn new() -> Self {
42152        Self {
42153            migrate_to_chat_id: None,
42154            retry_after: None,
42155        }
42156    }
42157    #[allow(rustdoc::invalid_html_tags)]
42158    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
42159    pub fn set_migrate_to_chat_id(mut self, migrate_to_chat_id: i64) -> Self {
42160        self.migrate_to_chat_id = Some(migrate_to_chat_id);
42161        self
42162    }
42163    #[allow(rustdoc::invalid_html_tags)]
42164    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
42165    pub fn set_retry_after(mut self, retry_after: i64) -> Self {
42166        self.retry_after = Some(retry_after);
42167        self
42168    }
42169    pub fn build(self) -> ResponseParameters {
42170        ResponseParameters {
42171            migrate_to_chat_id: self.migrate_to_chat_id,
42172            retry_after: self.retry_after,
42173        }
42174    }
42175}
42176#[allow(rustdoc::invalid_html_tags)]
42177#[doc = "This object represents a video message (available in Telegram apps as of v.4.0)."]
42178#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42179pub struct VideoNote {
42180    #[allow(rustdoc::invalid_html_tags)]
42181    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
42182    #[serde(rename = "file_id")]
42183    pub file_id: String,
42184    #[allow(rustdoc::invalid_html_tags)]
42185    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
42186    #[serde(rename = "file_unique_id")]
42187    pub file_unique_id: String,
42188    #[allow(rustdoc::invalid_html_tags)]
42189    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
42190    #[serde(rename = "length")]
42191    pub length: i64,
42192    #[allow(rustdoc::invalid_html_tags)]
42193    #[doc = "Duration of the video in seconds as defined by the sender"]
42194    #[serde(rename = "duration")]
42195    pub duration: i64,
42196    #[allow(rustdoc::invalid_html_tags)]
42197    #[doc = "Optional. Video thumbnail"]
42198    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
42199    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
42200    #[allow(rustdoc::invalid_html_tags)]
42201    #[doc = "Optional. File size in bytes"]
42202    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
42203    pub file_size: Option<i64>,
42204}
42205#[allow(rustdoc::invalid_html_tags)]
42206#[doc = "Companion type to VideoNote that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
42207#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42208pub struct NoSkipVideoNote {
42209    #[allow(rustdoc::invalid_html_tags)]
42210    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
42211    #[serde(rename = "file_id")]
42212    pub file_id: String,
42213    #[allow(rustdoc::invalid_html_tags)]
42214    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
42215    #[serde(rename = "file_unique_id")]
42216    pub file_unique_id: String,
42217    #[allow(rustdoc::invalid_html_tags)]
42218    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
42219    #[serde(rename = "length")]
42220    pub length: i64,
42221    #[allow(rustdoc::invalid_html_tags)]
42222    #[doc = "Duration of the video in seconds as defined by the sender"]
42223    #[serde(rename = "duration")]
42224    pub duration: i64,
42225    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
42226    pub file_size: Option<i64>,
42227}
42228impl From<NoSkipVideoNote> for VideoNote {
42229    fn from(t: NoSkipVideoNote) -> Self {
42230        Self {
42231            file_id: t.file_id,
42232            file_unique_id: t.file_unique_id,
42233            length: t.length,
42234            duration: t.duration,
42235            thumbnail: t.thumbnail,
42236            file_size: t.file_size,
42237        }
42238    }
42239}
42240#[allow(clippy::from_over_into)]
42241impl Into<NoSkipVideoNote> for VideoNote {
42242    fn into(self) -> NoSkipVideoNote {
42243        NoSkipVideoNote {
42244            file_id: self.file_id,
42245            file_unique_id: self.file_unique_id,
42246            length: self.length,
42247            duration: self.duration,
42248            thumbnail: self.thumbnail,
42249            file_size: self.file_size,
42250        }
42251    }
42252}
42253impl NoSkipVideoNote {
42254    pub fn skip(self) -> VideoNote {
42255        self.into()
42256    }
42257}
42258impl VideoNote {
42259    pub fn noskip(self) -> NoSkipVideoNote {
42260        self.into()
42261    }
42262}
42263#[allow(rustdoc::invalid_html_tags)]
42264#[doc = "This object represents a video message (available in Telegram apps as of v.4.0)."]
42265#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42266pub struct VideoNoteBuilder {
42267    #[allow(rustdoc::invalid_html_tags)]
42268    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
42269    #[serde(rename = "file_id")]
42270    pub file_id: String,
42271    #[allow(rustdoc::invalid_html_tags)]
42272    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
42273    #[serde(rename = "file_unique_id")]
42274    pub file_unique_id: String,
42275    #[allow(rustdoc::invalid_html_tags)]
42276    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
42277    #[serde(rename = "length")]
42278    pub length: i64,
42279    #[allow(rustdoc::invalid_html_tags)]
42280    #[doc = "Duration of the video in seconds as defined by the sender"]
42281    #[serde(rename = "duration")]
42282    pub duration: i64,
42283    #[allow(rustdoc::invalid_html_tags)]
42284    #[doc = "Optional. Video thumbnail"]
42285    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
42286    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
42287    #[allow(rustdoc::invalid_html_tags)]
42288    #[doc = "Optional. File size in bytes"]
42289    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
42290    pub file_size: Option<i64>,
42291}
42292impl VideoNoteBuilder {
42293    #[allow(clippy::too_many_arguments)]
42294    pub fn new(file_id: String, file_unique_id: String, length: i64, duration: i64) -> Self {
42295        Self {
42296            file_id,
42297            file_unique_id,
42298            length,
42299            duration,
42300            thumbnail: None,
42301            file_size: None,
42302        }
42303    }
42304    #[allow(rustdoc::invalid_html_tags)]
42305    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
42306    pub fn set_file_id(mut self, file_id: String) -> Self {
42307        self.file_id = file_id;
42308        self
42309    }
42310    #[allow(rustdoc::invalid_html_tags)]
42311    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
42312    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
42313        self.file_unique_id = file_unique_id;
42314        self
42315    }
42316    #[allow(rustdoc::invalid_html_tags)]
42317    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
42318    pub fn set_length(mut self, length: i64) -> Self {
42319        self.length = length;
42320        self
42321    }
42322    #[allow(rustdoc::invalid_html_tags)]
42323    #[doc = "Duration of the video in seconds as defined by the sender"]
42324    pub fn set_duration(mut self, duration: i64) -> Self {
42325        self.duration = duration;
42326        self
42327    }
42328    #[allow(rustdoc::invalid_html_tags)]
42329    #[doc = "Optional. Video thumbnail"]
42330    pub fn set_thumbnail(mut self, thumbnail: PhotoSize) -> Self {
42331        self.thumbnail = Some(BoxWrapper(Unbox(thumbnail)));
42332        self
42333    }
42334    #[allow(rustdoc::invalid_html_tags)]
42335    #[doc = "Optional. File size in bytes"]
42336    pub fn set_file_size(mut self, file_size: i64) -> Self {
42337        self.file_size = Some(file_size);
42338        self
42339    }
42340    pub fn build(self) -> VideoNote {
42341        VideoNote {
42342            file_id: self.file_id,
42343            file_unique_id: self.file_unique_id,
42344            length: self.length,
42345            duration: self.duration,
42346            thumbnail: self.thumbnail,
42347            file_size: self.file_size,
42348        }
42349    }
42350}
42351#[allow(rustdoc::invalid_html_tags)]
42352#[doc = "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account."]
42353#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42354pub struct ReplyKeyboardRemove {
42355    #[allow(rustdoc::invalid_html_tags)]
42356    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
42357    #[serde(rename = "remove_keyboard")]
42358    pub remove_keyboard: bool,
42359    #[allow(rustdoc::invalid_html_tags)]
42360    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
42361    #[serde(skip_serializing_if = "Option::is_none", rename = "selective", default)]
42362    pub selective: Option<bool>,
42363}
42364#[allow(rustdoc::invalid_html_tags)]
42365#[doc = "Companion type to ReplyKeyboardRemove that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
42366#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42367pub struct NoSkipReplyKeyboardRemove {
42368    #[allow(rustdoc::invalid_html_tags)]
42369    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
42370    #[serde(rename = "remove_keyboard")]
42371    pub remove_keyboard: bool,
42372    pub selective: Option<bool>,
42373}
42374impl From<NoSkipReplyKeyboardRemove> for ReplyKeyboardRemove {
42375    fn from(t: NoSkipReplyKeyboardRemove) -> Self {
42376        Self {
42377            remove_keyboard: t.remove_keyboard,
42378            selective: t.selective,
42379        }
42380    }
42381}
42382#[allow(clippy::from_over_into)]
42383impl Into<NoSkipReplyKeyboardRemove> for ReplyKeyboardRemove {
42384    fn into(self) -> NoSkipReplyKeyboardRemove {
42385        NoSkipReplyKeyboardRemove {
42386            remove_keyboard: self.remove_keyboard,
42387            selective: self.selective,
42388        }
42389    }
42390}
42391impl NoSkipReplyKeyboardRemove {
42392    pub fn skip(self) -> ReplyKeyboardRemove {
42393        self.into()
42394    }
42395}
42396impl ReplyKeyboardRemove {
42397    pub fn noskip(self) -> NoSkipReplyKeyboardRemove {
42398        self.into()
42399    }
42400}
42401#[allow(rustdoc::invalid_html_tags)]
42402#[doc = "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account."]
42403#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42404pub struct ReplyKeyboardRemoveBuilder {
42405    #[allow(rustdoc::invalid_html_tags)]
42406    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
42407    #[serde(rename = "remove_keyboard")]
42408    pub remove_keyboard: bool,
42409    #[allow(rustdoc::invalid_html_tags)]
42410    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
42411    #[serde(skip_serializing_if = "Option::is_none", rename = "selective", default)]
42412    pub selective: Option<bool>,
42413}
42414impl ReplyKeyboardRemoveBuilder {
42415    #[allow(clippy::too_many_arguments)]
42416    pub fn new(remove_keyboard: bool) -> Self {
42417        Self {
42418            remove_keyboard,
42419            selective: None,
42420        }
42421    }
42422    #[allow(rustdoc::invalid_html_tags)]
42423    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
42424    pub fn set_remove_keyboard(mut self, remove_keyboard: bool) -> Self {
42425        self.remove_keyboard = remove_keyboard;
42426        self
42427    }
42428    #[allow(rustdoc::invalid_html_tags)]
42429    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
42430    pub fn set_selective(mut self, selective: bool) -> Self {
42431        self.selective = Some(selective);
42432        self
42433    }
42434    pub fn build(self) -> ReplyKeyboardRemove {
42435        ReplyKeyboardRemove {
42436            remove_keyboard: self.remove_keyboard,
42437            selective: self.selective,
42438        }
42439    }
42440}
42441#[allow(rustdoc::invalid_html_tags)]
42442#[doc = "This object represents a portion of the price for goods or services."]
42443#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42444pub struct LabeledPrice {
42445    #[allow(rustdoc::invalid_html_tags)]
42446    #[doc = "Portion label"]
42447    #[serde(rename = "label")]
42448    pub label: String,
42449    #[allow(rustdoc::invalid_html_tags)]
42450    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
42451    #[serde(rename = "amount")]
42452    pub amount: i64,
42453}
42454#[allow(rustdoc::invalid_html_tags)]
42455#[doc = "Companion type to LabeledPrice that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
42456#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42457pub struct NoSkipLabeledPrice {
42458    #[allow(rustdoc::invalid_html_tags)]
42459    #[doc = "Portion label"]
42460    #[serde(rename = "label")]
42461    pub label: String,
42462    #[allow(rustdoc::invalid_html_tags)]
42463    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
42464    #[serde(rename = "amount")]
42465    pub amount: i64,
42466}
42467impl From<NoSkipLabeledPrice> for LabeledPrice {
42468    fn from(t: NoSkipLabeledPrice) -> Self {
42469        Self {
42470            label: t.label,
42471            amount: t.amount,
42472        }
42473    }
42474}
42475#[allow(clippy::from_over_into)]
42476impl Into<NoSkipLabeledPrice> for LabeledPrice {
42477    fn into(self) -> NoSkipLabeledPrice {
42478        NoSkipLabeledPrice {
42479            label: self.label,
42480            amount: self.amount,
42481        }
42482    }
42483}
42484impl NoSkipLabeledPrice {
42485    pub fn skip(self) -> LabeledPrice {
42486        self.into()
42487    }
42488}
42489impl LabeledPrice {
42490    pub fn noskip(self) -> NoSkipLabeledPrice {
42491        self.into()
42492    }
42493}
42494#[allow(rustdoc::invalid_html_tags)]
42495#[doc = "This object represents a portion of the price for goods or services."]
42496#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42497pub struct LabeledPriceBuilder {
42498    #[allow(rustdoc::invalid_html_tags)]
42499    #[doc = "Portion label"]
42500    #[serde(rename = "label")]
42501    pub label: String,
42502    #[allow(rustdoc::invalid_html_tags)]
42503    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
42504    #[serde(rename = "amount")]
42505    pub amount: i64,
42506}
42507impl LabeledPriceBuilder {
42508    #[allow(clippy::too_many_arguments)]
42509    pub fn new(label: String, amount: i64) -> Self {
42510        Self { label, amount }
42511    }
42512    #[allow(rustdoc::invalid_html_tags)]
42513    #[doc = "Portion label"]
42514    pub fn set_label(mut self, label: String) -> Self {
42515        self.label = label;
42516        self
42517    }
42518    #[allow(rustdoc::invalid_html_tags)]
42519    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
42520    pub fn set_amount(mut self, amount: i64) -> Self {
42521        self.amount = amount;
42522        self
42523    }
42524    pub fn build(self) -> LabeledPrice {
42525        LabeledPrice {
42526            label: self.label,
42527            amount: self.amount,
42528        }
42529    }
42530}
42531#[allow(rustdoc::invalid_html_tags)]
42532#[doc = "This object contains information about one answer option in a poll to be sent."]
42533#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42534pub struct InputPollOption {
42535    #[allow(rustdoc::invalid_html_tags)]
42536    #[doc = "Option text, 1-100 characters"]
42537    #[serde(rename = "text")]
42538    pub text: String,
42539    #[allow(rustdoc::invalid_html_tags)]
42540    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
42541    #[serde(
42542        skip_serializing_if = "Option::is_none",
42543        rename = "text_parse_mode",
42544        default
42545    )]
42546    pub text_parse_mode: Option<String>,
42547    #[allow(rustdoc::invalid_html_tags)]
42548    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
42549    #[serde(
42550        skip_serializing_if = "Option::is_none",
42551        rename = "text_entities",
42552        default
42553    )]
42554    pub text_entities: Option<Vec<MessageEntity>>,
42555}
42556#[allow(rustdoc::invalid_html_tags)]
42557#[doc = "Companion type to InputPollOption that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
42558#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42559pub struct NoSkipInputPollOption {
42560    #[allow(rustdoc::invalid_html_tags)]
42561    #[doc = "Option text, 1-100 characters"]
42562    #[serde(rename = "text")]
42563    pub text: String,
42564    pub text_parse_mode: Option<String>,
42565    pub text_entities: Option<Vec<MessageEntity>>,
42566}
42567impl From<NoSkipInputPollOption> for InputPollOption {
42568    fn from(t: NoSkipInputPollOption) -> Self {
42569        Self {
42570            text: t.text,
42571            text_parse_mode: t.text_parse_mode,
42572            text_entities: t.text_entities,
42573        }
42574    }
42575}
42576#[allow(clippy::from_over_into)]
42577impl Into<NoSkipInputPollOption> for InputPollOption {
42578    fn into(self) -> NoSkipInputPollOption {
42579        NoSkipInputPollOption {
42580            text: self.text,
42581            text_parse_mode: self.text_parse_mode,
42582            text_entities: self.text_entities,
42583        }
42584    }
42585}
42586impl NoSkipInputPollOption {
42587    pub fn skip(self) -> InputPollOption {
42588        self.into()
42589    }
42590}
42591impl InputPollOption {
42592    pub fn noskip(self) -> NoSkipInputPollOption {
42593        self.into()
42594    }
42595}
42596#[allow(rustdoc::invalid_html_tags)]
42597#[doc = "This object contains information about one answer option in a poll to be sent."]
42598#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42599pub struct InputPollOptionBuilder {
42600    #[allow(rustdoc::invalid_html_tags)]
42601    #[doc = "Option text, 1-100 characters"]
42602    #[serde(rename = "text")]
42603    pub text: String,
42604    #[allow(rustdoc::invalid_html_tags)]
42605    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
42606    #[serde(
42607        skip_serializing_if = "Option::is_none",
42608        rename = "text_parse_mode",
42609        default
42610    )]
42611    pub text_parse_mode: Option<String>,
42612    #[allow(rustdoc::invalid_html_tags)]
42613    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
42614    #[serde(
42615        skip_serializing_if = "Option::is_none",
42616        rename = "text_entities",
42617        default
42618    )]
42619    pub text_entities: Option<Vec<MessageEntity>>,
42620}
42621impl InputPollOptionBuilder {
42622    #[allow(clippy::too_many_arguments)]
42623    pub fn new(text: String) -> Self {
42624        Self {
42625            text,
42626            text_parse_mode: None,
42627            text_entities: None,
42628        }
42629    }
42630    #[allow(rustdoc::invalid_html_tags)]
42631    #[doc = "Option text, 1-100 characters"]
42632    pub fn set_text(mut self, text: String) -> Self {
42633        self.text = text;
42634        self
42635    }
42636    #[allow(rustdoc::invalid_html_tags)]
42637    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
42638    pub fn set_text_parse_mode(mut self, text_parse_mode: String) -> Self {
42639        self.text_parse_mode = Some(text_parse_mode);
42640        self
42641    }
42642    #[allow(rustdoc::invalid_html_tags)]
42643    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
42644    pub fn set_text_entities(mut self, text_entities: Vec<MessageEntity>) -> Self {
42645        self.text_entities = Some(text_entities);
42646        self
42647    }
42648    pub fn build(self) -> InputPollOption {
42649        InputPollOption {
42650            text: self.text,
42651            text_parse_mode: self.text_parse_mode,
42652            text_entities: self.text_entities,
42653        }
42654    }
42655}
42656#[allow(rustdoc::invalid_html_tags)]
42657#[doc = "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user."]
42658#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42659pub struct ChatBoostSourcePremium {
42660    #[allow(rustdoc::invalid_html_tags)]
42661    #[doc = "Source of the boost, always \"premium\""]
42662    #[serde(rename = "source")]
42663    pub source: String,
42664    #[allow(rustdoc::invalid_html_tags)]
42665    #[doc = "User that boosted the chat"]
42666    #[serde(rename = "user")]
42667    pub user: BoxWrapper<Unbox<User>>,
42668}
42669#[allow(rustdoc::invalid_html_tags)]
42670#[doc = "Companion type to ChatBoostSourcePremium that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
42671#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42672pub struct NoSkipChatBoostSourcePremium {
42673    #[allow(rustdoc::invalid_html_tags)]
42674    #[doc = "Source of the boost, always \"premium\""]
42675    #[serde(rename = "source")]
42676    pub source: String,
42677    #[allow(rustdoc::invalid_html_tags)]
42678    #[doc = "User that boosted the chat"]
42679    #[serde(rename = "user")]
42680    pub user: BoxWrapper<Unbox<User>>,
42681}
42682impl From<NoSkipChatBoostSourcePremium> for ChatBoostSourcePremium {
42683    fn from(t: NoSkipChatBoostSourcePremium) -> Self {
42684        Self {
42685            source: t.source,
42686            user: t.user,
42687        }
42688    }
42689}
42690#[allow(clippy::from_over_into)]
42691impl Into<NoSkipChatBoostSourcePremium> for ChatBoostSourcePremium {
42692    fn into(self) -> NoSkipChatBoostSourcePremium {
42693        NoSkipChatBoostSourcePremium {
42694            source: self.source,
42695            user: self.user,
42696        }
42697    }
42698}
42699impl NoSkipChatBoostSourcePremium {
42700    pub fn skip(self) -> ChatBoostSourcePremium {
42701        self.into()
42702    }
42703}
42704impl ChatBoostSourcePremium {
42705    pub fn noskip(self) -> NoSkipChatBoostSourcePremium {
42706        self.into()
42707    }
42708}
42709#[allow(rustdoc::invalid_html_tags)]
42710#[doc = "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user."]
42711#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42712pub struct ChatBoostSourcePremiumBuilder {
42713    #[allow(rustdoc::invalid_html_tags)]
42714    #[doc = "Source of the boost, always \"premium\""]
42715    #[serde(rename = "source")]
42716    pub source: String,
42717    #[allow(rustdoc::invalid_html_tags)]
42718    #[doc = "User that boosted the chat"]
42719    #[serde(rename = "user")]
42720    pub user: BoxWrapper<Unbox<User>>,
42721}
42722impl ChatBoostSourcePremiumBuilder {
42723    #[allow(clippy::too_many_arguments)]
42724    pub fn new<A: Into<User>>(source: String, user: A) -> Self {
42725        Self {
42726            source,
42727            user: BoxWrapper::new_unbox(user.into()),
42728        }
42729    }
42730    #[allow(rustdoc::invalid_html_tags)]
42731    #[doc = "Source of the boost, always \"premium\""]
42732    pub fn set_source(mut self, source: String) -> Self {
42733        self.source = source;
42734        self
42735    }
42736    #[allow(rustdoc::invalid_html_tags)]
42737    #[doc = "User that boosted the chat"]
42738    pub fn set_user(mut self, user: User) -> Self {
42739        self.user = BoxWrapper(Unbox(user));
42740        self
42741    }
42742    pub fn build(self) -> ChatBoostSourcePremium {
42743        ChatBoostSourcePremium {
42744            source: self.source,
42745            user: self.user,
42746        }
42747    }
42748}
42749#[allow(rustdoc::invalid_html_tags)]
42750#[doc = "Represents a video to be sent."]
42751#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42752pub struct InputMediaVideo {
42753    #[allow(rustdoc::invalid_html_tags)]
42754    #[doc = "Type of the result, must be video"]
42755    #[serde(rename = "type")]
42756    pub tg_type: String,
42757    #[allow(rustdoc::invalid_html_tags)]
42758    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
42759    #[serde(rename = "media")]
42760    pub media: Option<InputFile>,
42761    #[allow(rustdoc::invalid_html_tags)]
42762    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
42763    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
42764    pub thumbnail: Option<String>,
42765    #[allow(rustdoc::invalid_html_tags)]
42766    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
42767    #[serde(skip_serializing_if = "Option::is_none", rename = "cover", default)]
42768    pub cover: Option<String>,
42769    #[allow(rustdoc::invalid_html_tags)]
42770    #[doc = "Optional. Start timestamp for the video in the message"]
42771    #[serde(
42772        skip_serializing_if = "Option::is_none",
42773        rename = "start_timestamp",
42774        default
42775    )]
42776    pub start_timestamp: Option<i64>,
42777    #[allow(rustdoc::invalid_html_tags)]
42778    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
42779    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
42780    pub caption: Option<String>,
42781    #[allow(rustdoc::invalid_html_tags)]
42782    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
42783    #[serde(
42784        skip_serializing_if = "Option::is_none",
42785        rename = "parse_mode",
42786        default
42787    )]
42788    pub parse_mode: Option<String>,
42789    #[allow(rustdoc::invalid_html_tags)]
42790    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
42791    #[serde(
42792        skip_serializing_if = "Option::is_none",
42793        rename = "caption_entities",
42794        default
42795    )]
42796    pub caption_entities: Option<Vec<MessageEntity>>,
42797    #[allow(rustdoc::invalid_html_tags)]
42798    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
42799    #[serde(
42800        skip_serializing_if = "Option::is_none",
42801        rename = "show_caption_above_media",
42802        default
42803    )]
42804    pub show_caption_above_media: Option<bool>,
42805    #[allow(rustdoc::invalid_html_tags)]
42806    #[doc = "Optional. Video width"]
42807    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
42808    pub width: Option<i64>,
42809    #[allow(rustdoc::invalid_html_tags)]
42810    #[doc = "Optional. Video height"]
42811    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
42812    pub height: Option<i64>,
42813    #[allow(rustdoc::invalid_html_tags)]
42814    #[doc = "Optional. Video duration in seconds"]
42815    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
42816    pub duration: Option<i64>,
42817    #[allow(rustdoc::invalid_html_tags)]
42818    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
42819    #[serde(
42820        skip_serializing_if = "Option::is_none",
42821        rename = "supports_streaming",
42822        default
42823    )]
42824    pub supports_streaming: Option<bool>,
42825    #[allow(rustdoc::invalid_html_tags)]
42826    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
42827    #[serde(
42828        skip_serializing_if = "Option::is_none",
42829        rename = "has_spoiler",
42830        default
42831    )]
42832    pub has_spoiler: Option<bool>,
42833}
42834#[allow(rustdoc::invalid_html_tags)]
42835#[doc = "Companion type to InputMediaVideo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
42836#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42837pub struct NoSkipInputMediaVideo {
42838    #[allow(rustdoc::invalid_html_tags)]
42839    #[doc = "Type of the result, must be video"]
42840    #[serde(rename = "type")]
42841    pub tg_type: String,
42842    #[allow(rustdoc::invalid_html_tags)]
42843    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
42844    #[serde(rename = "media")]
42845    pub media: Option<InputFile>,
42846    pub thumbnail: Option<String>,
42847    pub cover: Option<String>,
42848    pub start_timestamp: Option<i64>,
42849    pub caption: Option<String>,
42850    pub parse_mode: Option<String>,
42851    pub caption_entities: Option<Vec<MessageEntity>>,
42852    pub show_caption_above_media: Option<bool>,
42853    pub width: Option<i64>,
42854    pub height: Option<i64>,
42855    pub duration: Option<i64>,
42856    pub supports_streaming: Option<bool>,
42857    pub has_spoiler: Option<bool>,
42858}
42859impl From<NoSkipInputMediaVideo> for InputMediaVideo {
42860    fn from(t: NoSkipInputMediaVideo) -> Self {
42861        Self {
42862            tg_type: t.tg_type,
42863            media: t.media,
42864            thumbnail: t.thumbnail,
42865            cover: t.cover,
42866            start_timestamp: t.start_timestamp,
42867            caption: t.caption,
42868            parse_mode: t.parse_mode,
42869            caption_entities: t.caption_entities,
42870            show_caption_above_media: t.show_caption_above_media,
42871            width: t.width,
42872            height: t.height,
42873            duration: t.duration,
42874            supports_streaming: t.supports_streaming,
42875            has_spoiler: t.has_spoiler,
42876        }
42877    }
42878}
42879#[allow(clippy::from_over_into)]
42880impl Into<NoSkipInputMediaVideo> for InputMediaVideo {
42881    fn into(self) -> NoSkipInputMediaVideo {
42882        NoSkipInputMediaVideo {
42883            tg_type: self.tg_type,
42884            media: self.media,
42885            thumbnail: self.thumbnail,
42886            cover: self.cover,
42887            start_timestamp: self.start_timestamp,
42888            caption: self.caption,
42889            parse_mode: self.parse_mode,
42890            caption_entities: self.caption_entities,
42891            show_caption_above_media: self.show_caption_above_media,
42892            width: self.width,
42893            height: self.height,
42894            duration: self.duration,
42895            supports_streaming: self.supports_streaming,
42896            has_spoiler: self.has_spoiler,
42897        }
42898    }
42899}
42900impl NoSkipInputMediaVideo {
42901    pub fn skip(self) -> InputMediaVideo {
42902        self.into()
42903    }
42904}
42905impl InputMediaVideo {
42906    pub fn noskip(self) -> NoSkipInputMediaVideo {
42907        self.into()
42908    }
42909}
42910#[allow(rustdoc::invalid_html_tags)]
42911#[doc = "Represents a video to be sent."]
42912#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42913pub struct InputMediaVideoBuilder {
42914    #[allow(rustdoc::invalid_html_tags)]
42915    #[doc = "Type of the result, must be video"]
42916    #[serde(rename = "type")]
42917    pub tg_type: String,
42918    #[allow(rustdoc::invalid_html_tags)]
42919    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
42920    #[serde(rename = "media")]
42921    pub media: Option<InputFile>,
42922    #[allow(rustdoc::invalid_html_tags)]
42923    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
42924    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
42925    pub thumbnail: Option<String>,
42926    #[allow(rustdoc::invalid_html_tags)]
42927    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
42928    #[serde(skip_serializing_if = "Option::is_none", rename = "cover", default)]
42929    pub cover: Option<String>,
42930    #[allow(rustdoc::invalid_html_tags)]
42931    #[doc = "Optional. Start timestamp for the video in the message"]
42932    #[serde(
42933        skip_serializing_if = "Option::is_none",
42934        rename = "start_timestamp",
42935        default
42936    )]
42937    pub start_timestamp: Option<i64>,
42938    #[allow(rustdoc::invalid_html_tags)]
42939    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
42940    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
42941    pub caption: Option<String>,
42942    #[allow(rustdoc::invalid_html_tags)]
42943    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
42944    #[serde(
42945        skip_serializing_if = "Option::is_none",
42946        rename = "parse_mode",
42947        default
42948    )]
42949    pub parse_mode: Option<String>,
42950    #[allow(rustdoc::invalid_html_tags)]
42951    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
42952    #[serde(
42953        skip_serializing_if = "Option::is_none",
42954        rename = "caption_entities",
42955        default
42956    )]
42957    pub caption_entities: Option<Vec<MessageEntity>>,
42958    #[allow(rustdoc::invalid_html_tags)]
42959    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
42960    #[serde(
42961        skip_serializing_if = "Option::is_none",
42962        rename = "show_caption_above_media",
42963        default
42964    )]
42965    pub show_caption_above_media: Option<bool>,
42966    #[allow(rustdoc::invalid_html_tags)]
42967    #[doc = "Optional. Video width"]
42968    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
42969    pub width: Option<i64>,
42970    #[allow(rustdoc::invalid_html_tags)]
42971    #[doc = "Optional. Video height"]
42972    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
42973    pub height: Option<i64>,
42974    #[allow(rustdoc::invalid_html_tags)]
42975    #[doc = "Optional. Video duration in seconds"]
42976    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
42977    pub duration: Option<i64>,
42978    #[allow(rustdoc::invalid_html_tags)]
42979    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
42980    #[serde(
42981        skip_serializing_if = "Option::is_none",
42982        rename = "supports_streaming",
42983        default
42984    )]
42985    pub supports_streaming: Option<bool>,
42986    #[allow(rustdoc::invalid_html_tags)]
42987    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
42988    #[serde(
42989        skip_serializing_if = "Option::is_none",
42990        rename = "has_spoiler",
42991        default
42992    )]
42993    pub has_spoiler: Option<bool>,
42994}
42995impl InputMediaVideoBuilder {
42996    #[allow(clippy::too_many_arguments)]
42997    pub fn new(media: Option<InputFile>) -> Self {
42998        Self {
42999            tg_type: "video".to_owned(),
43000            media,
43001            thumbnail: None,
43002            cover: None,
43003            start_timestamp: None,
43004            caption: None,
43005            parse_mode: None,
43006            caption_entities: None,
43007            show_caption_above_media: None,
43008            width: None,
43009            height: None,
43010            duration: None,
43011            supports_streaming: None,
43012            has_spoiler: None,
43013        }
43014    }
43015    #[allow(rustdoc::invalid_html_tags)]
43016    #[doc = "Type of the result, must be video"]
43017    pub fn set_type(mut self, tg_type: String) -> Self {
43018        self.tg_type = tg_type;
43019        self
43020    }
43021    #[allow(rustdoc::invalid_html_tags)]
43022    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43023    pub fn set_media(mut self, media: Option<InputFile>) -> Self {
43024        self.media = media;
43025        self
43026    }
43027    #[allow(rustdoc::invalid_html_tags)]
43028    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43029    pub fn set_thumbnail(mut self, thumbnail: String) -> Self {
43030        self.thumbnail = Some(thumbnail);
43031        self
43032    }
43033    #[allow(rustdoc::invalid_html_tags)]
43034    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43035    pub fn set_cover(mut self, cover: String) -> Self {
43036        self.cover = Some(cover);
43037        self
43038    }
43039    #[allow(rustdoc::invalid_html_tags)]
43040    #[doc = "Optional. Start timestamp for the video in the message"]
43041    pub fn set_start_timestamp(mut self, start_timestamp: i64) -> Self {
43042        self.start_timestamp = Some(start_timestamp);
43043        self
43044    }
43045    #[allow(rustdoc::invalid_html_tags)]
43046    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
43047    pub fn set_caption(mut self, caption: String) -> Self {
43048        self.caption = Some(caption);
43049        self
43050    }
43051    #[allow(rustdoc::invalid_html_tags)]
43052    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
43053    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
43054        self.parse_mode = Some(parse_mode);
43055        self
43056    }
43057    #[allow(rustdoc::invalid_html_tags)]
43058    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
43059    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
43060        self.caption_entities = Some(caption_entities);
43061        self
43062    }
43063    #[allow(rustdoc::invalid_html_tags)]
43064    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
43065    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
43066        self.show_caption_above_media = Some(show_caption_above_media);
43067        self
43068    }
43069    #[allow(rustdoc::invalid_html_tags)]
43070    #[doc = "Optional. Video width"]
43071    pub fn set_width(mut self, width: i64) -> Self {
43072        self.width = Some(width);
43073        self
43074    }
43075    #[allow(rustdoc::invalid_html_tags)]
43076    #[doc = "Optional. Video height"]
43077    pub fn set_height(mut self, height: i64) -> Self {
43078        self.height = Some(height);
43079        self
43080    }
43081    #[allow(rustdoc::invalid_html_tags)]
43082    #[doc = "Optional. Video duration in seconds"]
43083    pub fn set_duration(mut self, duration: i64) -> Self {
43084        self.duration = Some(duration);
43085        self
43086    }
43087    #[allow(rustdoc::invalid_html_tags)]
43088    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
43089    pub fn set_supports_streaming(mut self, supports_streaming: bool) -> Self {
43090        self.supports_streaming = Some(supports_streaming);
43091        self
43092    }
43093    #[allow(rustdoc::invalid_html_tags)]
43094    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
43095    pub fn set_has_spoiler(mut self, has_spoiler: bool) -> Self {
43096        self.has_spoiler = Some(has_spoiler);
43097        self
43098    }
43099    pub fn build(self) -> InputMediaVideo {
43100        InputMediaVideo {
43101            tg_type: self.tg_type,
43102            media: self.media,
43103            thumbnail: self.thumbnail,
43104            cover: self.cover,
43105            start_timestamp: self.start_timestamp,
43106            caption: self.caption,
43107            parse_mode: self.parse_mode,
43108            caption_entities: self.caption_entities,
43109            show_caption_above_media: self.show_caption_above_media,
43110            width: self.width,
43111            height: self.height,
43112            duration: self.duration,
43113            supports_streaming: self.supports_streaming,
43114            has_spoiler: self.has_spoiler,
43115        }
43116    }
43117}
43118#[allow(rustdoc::invalid_html_tags)]
43119#[doc = "Represents an audio file to be treated as music to be sent."]
43120#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43121pub struct InputMediaAudio {
43122    #[allow(rustdoc::invalid_html_tags)]
43123    #[doc = "Type of the result, must be audio"]
43124    #[serde(rename = "type")]
43125    pub tg_type: String,
43126    #[allow(rustdoc::invalid_html_tags)]
43127    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43128    #[serde(rename = "media")]
43129    pub media: Option<InputFile>,
43130    #[allow(rustdoc::invalid_html_tags)]
43131    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43132    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
43133    pub thumbnail: Option<String>,
43134    #[allow(rustdoc::invalid_html_tags)]
43135    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
43136    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
43137    pub caption: Option<String>,
43138    #[allow(rustdoc::invalid_html_tags)]
43139    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
43140    #[serde(
43141        skip_serializing_if = "Option::is_none",
43142        rename = "parse_mode",
43143        default
43144    )]
43145    pub parse_mode: Option<String>,
43146    #[allow(rustdoc::invalid_html_tags)]
43147    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
43148    #[serde(
43149        skip_serializing_if = "Option::is_none",
43150        rename = "caption_entities",
43151        default
43152    )]
43153    pub caption_entities: Option<Vec<MessageEntity>>,
43154    #[allow(rustdoc::invalid_html_tags)]
43155    #[doc = "Optional. Duration of the audio in seconds"]
43156    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
43157    pub duration: Option<i64>,
43158    #[allow(rustdoc::invalid_html_tags)]
43159    #[doc = "Optional. Performer of the audio"]
43160    #[serde(skip_serializing_if = "Option::is_none", rename = "performer", default)]
43161    pub performer: Option<String>,
43162    #[allow(rustdoc::invalid_html_tags)]
43163    #[doc = "Optional. Title of the audio"]
43164    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
43165    pub title: Option<String>,
43166}
43167#[allow(rustdoc::invalid_html_tags)]
43168#[doc = "Companion type to InputMediaAudio that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
43169#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43170pub struct NoSkipInputMediaAudio {
43171    #[allow(rustdoc::invalid_html_tags)]
43172    #[doc = "Type of the result, must be audio"]
43173    #[serde(rename = "type")]
43174    pub tg_type: String,
43175    #[allow(rustdoc::invalid_html_tags)]
43176    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43177    #[serde(rename = "media")]
43178    pub media: Option<InputFile>,
43179    pub thumbnail: Option<String>,
43180    pub caption: Option<String>,
43181    pub parse_mode: Option<String>,
43182    pub caption_entities: Option<Vec<MessageEntity>>,
43183    pub duration: Option<i64>,
43184    pub performer: Option<String>,
43185    pub title: Option<String>,
43186}
43187impl From<NoSkipInputMediaAudio> for InputMediaAudio {
43188    fn from(t: NoSkipInputMediaAudio) -> Self {
43189        Self {
43190            tg_type: t.tg_type,
43191            media: t.media,
43192            thumbnail: t.thumbnail,
43193            caption: t.caption,
43194            parse_mode: t.parse_mode,
43195            caption_entities: t.caption_entities,
43196            duration: t.duration,
43197            performer: t.performer,
43198            title: t.title,
43199        }
43200    }
43201}
43202#[allow(clippy::from_over_into)]
43203impl Into<NoSkipInputMediaAudio> for InputMediaAudio {
43204    fn into(self) -> NoSkipInputMediaAudio {
43205        NoSkipInputMediaAudio {
43206            tg_type: self.tg_type,
43207            media: self.media,
43208            thumbnail: self.thumbnail,
43209            caption: self.caption,
43210            parse_mode: self.parse_mode,
43211            caption_entities: self.caption_entities,
43212            duration: self.duration,
43213            performer: self.performer,
43214            title: self.title,
43215        }
43216    }
43217}
43218impl NoSkipInputMediaAudio {
43219    pub fn skip(self) -> InputMediaAudio {
43220        self.into()
43221    }
43222}
43223impl InputMediaAudio {
43224    pub fn noskip(self) -> NoSkipInputMediaAudio {
43225        self.into()
43226    }
43227}
43228#[allow(rustdoc::invalid_html_tags)]
43229#[doc = "Represents an audio file to be treated as music to be sent."]
43230#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43231pub struct InputMediaAudioBuilder {
43232    #[allow(rustdoc::invalid_html_tags)]
43233    #[doc = "Type of the result, must be audio"]
43234    #[serde(rename = "type")]
43235    pub tg_type: String,
43236    #[allow(rustdoc::invalid_html_tags)]
43237    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43238    #[serde(rename = "media")]
43239    pub media: Option<InputFile>,
43240    #[allow(rustdoc::invalid_html_tags)]
43241    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43242    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
43243    pub thumbnail: Option<String>,
43244    #[allow(rustdoc::invalid_html_tags)]
43245    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
43246    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
43247    pub caption: Option<String>,
43248    #[allow(rustdoc::invalid_html_tags)]
43249    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
43250    #[serde(
43251        skip_serializing_if = "Option::is_none",
43252        rename = "parse_mode",
43253        default
43254    )]
43255    pub parse_mode: Option<String>,
43256    #[allow(rustdoc::invalid_html_tags)]
43257    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
43258    #[serde(
43259        skip_serializing_if = "Option::is_none",
43260        rename = "caption_entities",
43261        default
43262    )]
43263    pub caption_entities: Option<Vec<MessageEntity>>,
43264    #[allow(rustdoc::invalid_html_tags)]
43265    #[doc = "Optional. Duration of the audio in seconds"]
43266    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
43267    pub duration: Option<i64>,
43268    #[allow(rustdoc::invalid_html_tags)]
43269    #[doc = "Optional. Performer of the audio"]
43270    #[serde(skip_serializing_if = "Option::is_none", rename = "performer", default)]
43271    pub performer: Option<String>,
43272    #[allow(rustdoc::invalid_html_tags)]
43273    #[doc = "Optional. Title of the audio"]
43274    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
43275    pub title: Option<String>,
43276}
43277impl InputMediaAudioBuilder {
43278    #[allow(clippy::too_many_arguments)]
43279    pub fn new(media: Option<InputFile>) -> Self {
43280        Self {
43281            tg_type: "audio".to_owned(),
43282            media,
43283            thumbnail: None,
43284            caption: None,
43285            parse_mode: None,
43286            caption_entities: None,
43287            duration: None,
43288            performer: None,
43289            title: None,
43290        }
43291    }
43292    #[allow(rustdoc::invalid_html_tags)]
43293    #[doc = "Type of the result, must be audio"]
43294    pub fn set_type(mut self, tg_type: String) -> Self {
43295        self.tg_type = tg_type;
43296        self
43297    }
43298    #[allow(rustdoc::invalid_html_tags)]
43299    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43300    pub fn set_media(mut self, media: Option<InputFile>) -> Self {
43301        self.media = media;
43302        self
43303    }
43304    #[allow(rustdoc::invalid_html_tags)]
43305    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
43306    pub fn set_thumbnail(mut self, thumbnail: String) -> Self {
43307        self.thumbnail = Some(thumbnail);
43308        self
43309    }
43310    #[allow(rustdoc::invalid_html_tags)]
43311    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
43312    pub fn set_caption(mut self, caption: String) -> Self {
43313        self.caption = Some(caption);
43314        self
43315    }
43316    #[allow(rustdoc::invalid_html_tags)]
43317    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
43318    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
43319        self.parse_mode = Some(parse_mode);
43320        self
43321    }
43322    #[allow(rustdoc::invalid_html_tags)]
43323    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
43324    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
43325        self.caption_entities = Some(caption_entities);
43326        self
43327    }
43328    #[allow(rustdoc::invalid_html_tags)]
43329    #[doc = "Optional. Duration of the audio in seconds"]
43330    pub fn set_duration(mut self, duration: i64) -> Self {
43331        self.duration = Some(duration);
43332        self
43333    }
43334    #[allow(rustdoc::invalid_html_tags)]
43335    #[doc = "Optional. Performer of the audio"]
43336    pub fn set_performer(mut self, performer: String) -> Self {
43337        self.performer = Some(performer);
43338        self
43339    }
43340    #[allow(rustdoc::invalid_html_tags)]
43341    #[doc = "Optional. Title of the audio"]
43342    pub fn set_title(mut self, title: String) -> Self {
43343        self.title = Some(title);
43344        self
43345    }
43346    pub fn build(self) -> InputMediaAudio {
43347        InputMediaAudio {
43348            tg_type: self.tg_type,
43349            media: self.media,
43350            thumbnail: self.thumbnail,
43351            caption: self.caption,
43352            parse_mode: self.parse_mode,
43353            caption_entities: self.caption_entities,
43354            duration: self.duration,
43355            performer: self.performer,
43356            title: self.title,
43357        }
43358    }
43359}
43360#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43361#[serde(untagged)]
43362pub enum ChatBoostSource {
43363    ChatBoostSourcePremium(ChatBoostSourcePremium),
43364    ChatBoostSourceGiftCode(ChatBoostSourceGiftCode),
43365    ChatBoostSourceGiveaway(ChatBoostSourceGiveaway),
43366}
43367impl Default for ChatBoostSource {
43368    fn default() -> Self {
43369        ChatBoostSource::ChatBoostSourcePremium(ChatBoostSourcePremium::default())
43370    }
43371}
43372impl ChatBoostSource {}
43373#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43374#[serde(untagged)]
43375pub enum BotCommandScope {
43376    BotCommandScopeDefault(BotCommandScopeDefault),
43377    BotCommandScopeAllPrivateChats(BotCommandScopeAllPrivateChats),
43378    BotCommandScopeAllGroupChats(BotCommandScopeAllGroupChats),
43379    BotCommandScopeAllChatAdministrators(BotCommandScopeAllChatAdministrators),
43380    BotCommandScopeChat(BotCommandScopeChat),
43381    BotCommandScopeChatAdministrators(BotCommandScopeChatAdministrators),
43382    BotCommandScopeChatMember(BotCommandScopeChatMember),
43383}
43384impl Default for BotCommandScope {
43385    fn default() -> Self {
43386        BotCommandScope::BotCommandScopeDefault(BotCommandScopeDefault::default())
43387    }
43388}
43389impl BotCommandScope {}
43390#[allow(rustdoc::invalid_html_tags)]
43391#[doc = "Contains the list of gifts received and owned by a user or a chat."]
43392#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43393pub struct OwnedGifts {
43394    #[allow(rustdoc::invalid_html_tags)]
43395    #[doc = "The total number of gifts owned by the user or the chat"]
43396    #[serde(rename = "total_count")]
43397    pub total_count: i64,
43398    #[allow(rustdoc::invalid_html_tags)]
43399    #[doc = "The list of gifts"]
43400    #[serde(rename = "gifts")]
43401    pub gifts: Vec<OwnedGift>,
43402    #[allow(rustdoc::invalid_html_tags)]
43403    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
43404    #[serde(
43405        skip_serializing_if = "Option::is_none",
43406        rename = "next_offset",
43407        default
43408    )]
43409    pub next_offset: Option<String>,
43410}
43411#[allow(rustdoc::invalid_html_tags)]
43412#[doc = "Companion type to OwnedGifts that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
43413#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43414pub struct NoSkipOwnedGifts {
43415    #[allow(rustdoc::invalid_html_tags)]
43416    #[doc = "The total number of gifts owned by the user or the chat"]
43417    #[serde(rename = "total_count")]
43418    pub total_count: i64,
43419    #[allow(rustdoc::invalid_html_tags)]
43420    #[doc = "The list of gifts"]
43421    #[serde(rename = "gifts")]
43422    pub gifts: Vec<OwnedGift>,
43423    pub next_offset: Option<String>,
43424}
43425impl From<NoSkipOwnedGifts> for OwnedGifts {
43426    fn from(t: NoSkipOwnedGifts) -> Self {
43427        Self {
43428            total_count: t.total_count,
43429            gifts: t.gifts,
43430            next_offset: t.next_offset,
43431        }
43432    }
43433}
43434#[allow(clippy::from_over_into)]
43435impl Into<NoSkipOwnedGifts> for OwnedGifts {
43436    fn into(self) -> NoSkipOwnedGifts {
43437        NoSkipOwnedGifts {
43438            total_count: self.total_count,
43439            gifts: self.gifts,
43440            next_offset: self.next_offset,
43441        }
43442    }
43443}
43444impl NoSkipOwnedGifts {
43445    pub fn skip(self) -> OwnedGifts {
43446        self.into()
43447    }
43448}
43449impl OwnedGifts {
43450    pub fn noskip(self) -> NoSkipOwnedGifts {
43451        self.into()
43452    }
43453}
43454#[allow(rustdoc::invalid_html_tags)]
43455#[doc = "Contains the list of gifts received and owned by a user or a chat."]
43456#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43457pub struct OwnedGiftsBuilder {
43458    #[allow(rustdoc::invalid_html_tags)]
43459    #[doc = "The total number of gifts owned by the user or the chat"]
43460    #[serde(rename = "total_count")]
43461    pub total_count: i64,
43462    #[allow(rustdoc::invalid_html_tags)]
43463    #[doc = "The list of gifts"]
43464    #[serde(rename = "gifts")]
43465    pub gifts: Vec<OwnedGift>,
43466    #[allow(rustdoc::invalid_html_tags)]
43467    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
43468    #[serde(
43469        skip_serializing_if = "Option::is_none",
43470        rename = "next_offset",
43471        default
43472    )]
43473    pub next_offset: Option<String>,
43474}
43475impl OwnedGiftsBuilder {
43476    #[allow(clippy::too_many_arguments)]
43477    pub fn new(total_count: i64, gifts: Vec<OwnedGift>) -> Self {
43478        Self {
43479            total_count,
43480            gifts,
43481            next_offset: None,
43482        }
43483    }
43484    #[allow(rustdoc::invalid_html_tags)]
43485    #[doc = "The total number of gifts owned by the user or the chat"]
43486    pub fn set_total_count(mut self, total_count: i64) -> Self {
43487        self.total_count = total_count;
43488        self
43489    }
43490    #[allow(rustdoc::invalid_html_tags)]
43491    #[doc = "The list of gifts"]
43492    pub fn set_gifts(mut self, gifts: Vec<OwnedGift>) -> Self {
43493        self.gifts = gifts;
43494        self
43495    }
43496    #[allow(rustdoc::invalid_html_tags)]
43497    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
43498    pub fn set_next_offset(mut self, next_offset: String) -> Self {
43499        self.next_offset = Some(next_offset);
43500        self
43501    }
43502    pub fn build(self) -> OwnedGifts {
43503        OwnedGifts {
43504            total_count: self.total_count,
43505            gifts: self.gifts,
43506            next_offset: self.next_offset,
43507        }
43508    }
43509}
43510#[allow(rustdoc::invalid_html_tags)]
43511#[doc = "Describes documents or other Telegram Passport elements shared with the bot by the user."]
43512#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43513pub struct EncryptedPassportElement {
43514    #[allow(rustdoc::invalid_html_tags)]
43515    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
43516    #[serde(rename = "type")]
43517    pub tg_type: String,
43518    #[allow(rustdoc::invalid_html_tags)]
43519    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
43520    #[serde(skip_serializing_if = "Option::is_none", rename = "data", default)]
43521    pub data: Option<String>,
43522    #[allow(rustdoc::invalid_html_tags)]
43523    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
43524    #[serde(
43525        skip_serializing_if = "Option::is_none",
43526        rename = "phone_number",
43527        default
43528    )]
43529    pub phone_number: Option<String>,
43530    #[allow(rustdoc::invalid_html_tags)]
43531    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
43532    #[serde(skip_serializing_if = "Option::is_none", rename = "email", default)]
43533    pub email: Option<String>,
43534    #[allow(rustdoc::invalid_html_tags)]
43535    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
43536    #[serde(skip_serializing_if = "Option::is_none", rename = "files", default)]
43537    pub files: Option<Vec<PassportFile>>,
43538    #[allow(rustdoc::invalid_html_tags)]
43539    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43540    #[serde(
43541        skip_serializing_if = "Option::is_none",
43542        rename = "front_side",
43543        default
43544    )]
43545    pub front_side: Option<BoxWrapper<Unbox<PassportFile>>>,
43546    #[allow(rustdoc::invalid_html_tags)]
43547    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43548    #[serde(
43549        skip_serializing_if = "Option::is_none",
43550        rename = "reverse_side",
43551        default
43552    )]
43553    pub reverse_side: Option<BoxWrapper<Unbox<PassportFile>>>,
43554    #[allow(rustdoc::invalid_html_tags)]
43555    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43556    #[serde(skip_serializing_if = "Option::is_none", rename = "selfie", default)]
43557    pub selfie: Option<BoxWrapper<Unbox<PassportFile>>>,
43558    #[allow(rustdoc::invalid_html_tags)]
43559    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
43560    #[serde(
43561        skip_serializing_if = "Option::is_none",
43562        rename = "translation",
43563        default
43564    )]
43565    pub translation: Option<Vec<PassportFile>>,
43566    #[allow(rustdoc::invalid_html_tags)]
43567    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
43568    #[serde(rename = "hash")]
43569    pub hash: String,
43570}
43571#[allow(rustdoc::invalid_html_tags)]
43572#[doc = "Companion type to EncryptedPassportElement that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
43573#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43574pub struct NoSkipEncryptedPassportElement {
43575    #[allow(rustdoc::invalid_html_tags)]
43576    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
43577    #[serde(rename = "type")]
43578    pub tg_type: String,
43579    pub data: Option<String>,
43580    pub phone_number: Option<String>,
43581    pub email: Option<String>,
43582    pub files: Option<Vec<PassportFile>>,
43583    pub front_side: Option<BoxWrapper<Unbox<PassportFile>>>,
43584    pub reverse_side: Option<BoxWrapper<Unbox<PassportFile>>>,
43585    pub selfie: Option<BoxWrapper<Unbox<PassportFile>>>,
43586    pub translation: Option<Vec<PassportFile>>,
43587    #[allow(rustdoc::invalid_html_tags)]
43588    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
43589    #[serde(rename = "hash")]
43590    pub hash: String,
43591}
43592impl From<NoSkipEncryptedPassportElement> for EncryptedPassportElement {
43593    fn from(t: NoSkipEncryptedPassportElement) -> Self {
43594        Self {
43595            tg_type: t.tg_type,
43596            data: t.data,
43597            phone_number: t.phone_number,
43598            email: t.email,
43599            files: t.files,
43600            front_side: t.front_side,
43601            reverse_side: t.reverse_side,
43602            selfie: t.selfie,
43603            translation: t.translation,
43604            hash: t.hash,
43605        }
43606    }
43607}
43608#[allow(clippy::from_over_into)]
43609impl Into<NoSkipEncryptedPassportElement> for EncryptedPassportElement {
43610    fn into(self) -> NoSkipEncryptedPassportElement {
43611        NoSkipEncryptedPassportElement {
43612            tg_type: self.tg_type,
43613            data: self.data,
43614            phone_number: self.phone_number,
43615            email: self.email,
43616            files: self.files,
43617            front_side: self.front_side,
43618            reverse_side: self.reverse_side,
43619            selfie: self.selfie,
43620            translation: self.translation,
43621            hash: self.hash,
43622        }
43623    }
43624}
43625impl NoSkipEncryptedPassportElement {
43626    pub fn skip(self) -> EncryptedPassportElement {
43627        self.into()
43628    }
43629}
43630impl EncryptedPassportElement {
43631    pub fn noskip(self) -> NoSkipEncryptedPassportElement {
43632        self.into()
43633    }
43634}
43635#[allow(rustdoc::invalid_html_tags)]
43636#[doc = "Describes documents or other Telegram Passport elements shared with the bot by the user."]
43637#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43638pub struct EncryptedPassportElementBuilder {
43639    #[allow(rustdoc::invalid_html_tags)]
43640    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
43641    #[serde(rename = "type")]
43642    pub tg_type: String,
43643    #[allow(rustdoc::invalid_html_tags)]
43644    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
43645    #[serde(skip_serializing_if = "Option::is_none", rename = "data", default)]
43646    pub data: Option<String>,
43647    #[allow(rustdoc::invalid_html_tags)]
43648    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
43649    #[serde(
43650        skip_serializing_if = "Option::is_none",
43651        rename = "phone_number",
43652        default
43653    )]
43654    pub phone_number: Option<String>,
43655    #[allow(rustdoc::invalid_html_tags)]
43656    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
43657    #[serde(skip_serializing_if = "Option::is_none", rename = "email", default)]
43658    pub email: Option<String>,
43659    #[allow(rustdoc::invalid_html_tags)]
43660    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
43661    #[serde(skip_serializing_if = "Option::is_none", rename = "files", default)]
43662    pub files: Option<Vec<PassportFile>>,
43663    #[allow(rustdoc::invalid_html_tags)]
43664    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43665    #[serde(
43666        skip_serializing_if = "Option::is_none",
43667        rename = "front_side",
43668        default
43669    )]
43670    pub front_side: Option<BoxWrapper<Unbox<PassportFile>>>,
43671    #[allow(rustdoc::invalid_html_tags)]
43672    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43673    #[serde(
43674        skip_serializing_if = "Option::is_none",
43675        rename = "reverse_side",
43676        default
43677    )]
43678    pub reverse_side: Option<BoxWrapper<Unbox<PassportFile>>>,
43679    #[allow(rustdoc::invalid_html_tags)]
43680    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43681    #[serde(skip_serializing_if = "Option::is_none", rename = "selfie", default)]
43682    pub selfie: Option<BoxWrapper<Unbox<PassportFile>>>,
43683    #[allow(rustdoc::invalid_html_tags)]
43684    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
43685    #[serde(
43686        skip_serializing_if = "Option::is_none",
43687        rename = "translation",
43688        default
43689    )]
43690    pub translation: Option<Vec<PassportFile>>,
43691    #[allow(rustdoc::invalid_html_tags)]
43692    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
43693    #[serde(rename = "hash")]
43694    pub hash: String,
43695}
43696impl EncryptedPassportElementBuilder {
43697    #[allow(clippy::too_many_arguments)]
43698    pub fn new(hash: String) -> Self {
43699        Self {
43700            tg_type: "EncryptedPassportElement".to_owned(),
43701            hash,
43702            data: None,
43703            phone_number: None,
43704            email: None,
43705            files: None,
43706            front_side: None,
43707            reverse_side: None,
43708            selfie: None,
43709            translation: None,
43710        }
43711    }
43712    #[allow(rustdoc::invalid_html_tags)]
43713    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
43714    pub fn set_type(mut self, tg_type: String) -> Self {
43715        self.tg_type = tg_type;
43716        self
43717    }
43718    #[allow(rustdoc::invalid_html_tags)]
43719    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
43720    pub fn set_data(mut self, data: String) -> Self {
43721        self.data = Some(data);
43722        self
43723    }
43724    #[allow(rustdoc::invalid_html_tags)]
43725    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
43726    pub fn set_phone_number(mut self, phone_number: String) -> Self {
43727        self.phone_number = Some(phone_number);
43728        self
43729    }
43730    #[allow(rustdoc::invalid_html_tags)]
43731    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
43732    pub fn set_email(mut self, email: String) -> Self {
43733        self.email = Some(email);
43734        self
43735    }
43736    #[allow(rustdoc::invalid_html_tags)]
43737    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
43738    pub fn set_files(mut self, files: Vec<PassportFile>) -> Self {
43739        self.files = Some(files);
43740        self
43741    }
43742    #[allow(rustdoc::invalid_html_tags)]
43743    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43744    pub fn set_front_side(mut self, front_side: PassportFile) -> Self {
43745        self.front_side = Some(BoxWrapper(Unbox(front_side)));
43746        self
43747    }
43748    #[allow(rustdoc::invalid_html_tags)]
43749    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43750    pub fn set_reverse_side(mut self, reverse_side: PassportFile) -> Self {
43751        self.reverse_side = Some(BoxWrapper(Unbox(reverse_side)));
43752        self
43753    }
43754    #[allow(rustdoc::invalid_html_tags)]
43755    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
43756    pub fn set_selfie(mut self, selfie: PassportFile) -> Self {
43757        self.selfie = Some(BoxWrapper(Unbox(selfie)));
43758        self
43759    }
43760    #[allow(rustdoc::invalid_html_tags)]
43761    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
43762    pub fn set_translation(mut self, translation: Vec<PassportFile>) -> Self {
43763        self.translation = Some(translation);
43764        self
43765    }
43766    #[allow(rustdoc::invalid_html_tags)]
43767    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
43768    pub fn set_hash(mut self, hash: String) -> Self {
43769        self.hash = hash;
43770        self
43771    }
43772    pub fn build(self) -> EncryptedPassportElement {
43773        EncryptedPassportElement {
43774            tg_type: self.tg_type,
43775            data: self.data,
43776            phone_number: self.phone_number,
43777            email: self.email,
43778            files: self.files,
43779            front_side: self.front_side,
43780            reverse_side: self.reverse_side,
43781            selfie: self.selfie,
43782            translation: self.translation,
43783            hash: self.hash,
43784        }
43785    }
43786}
43787#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43788#[serde(untagged)]
43789pub enum PaidMedia {
43790    PaidMediaPreview(PaidMediaPreview),
43791    PaidMediaPhoto(PaidMediaPhoto),
43792    PaidMediaVideo(PaidMediaVideo),
43793}
43794impl Default for PaidMedia {
43795    fn default() -> Self {
43796        PaidMedia::PaidMediaPreview(PaidMediaPreview::default())
43797    }
43798}
43799impl PaidMedia {}
43800#[allow(rustdoc::invalid_html_tags)]
43801#[doc = "This object contains basic information about an invoice."]
43802#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43803pub struct Invoice {
43804    #[allow(rustdoc::invalid_html_tags)]
43805    #[doc = "Product name"]
43806    #[serde(rename = "title")]
43807    pub title: String,
43808    #[allow(rustdoc::invalid_html_tags)]
43809    #[doc = "Product description"]
43810    #[serde(rename = "description")]
43811    pub description: String,
43812    #[allow(rustdoc::invalid_html_tags)]
43813    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
43814    #[serde(rename = "start_parameter")]
43815    pub start_parameter: String,
43816    #[allow(rustdoc::invalid_html_tags)]
43817    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
43818    #[serde(rename = "currency")]
43819    pub currency: String,
43820    #[allow(rustdoc::invalid_html_tags)]
43821    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
43822    #[serde(rename = "total_amount")]
43823    pub total_amount: i64,
43824}
43825#[allow(rustdoc::invalid_html_tags)]
43826#[doc = "Companion type to Invoice that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
43827#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43828pub struct NoSkipInvoice {
43829    #[allow(rustdoc::invalid_html_tags)]
43830    #[doc = "Product name"]
43831    #[serde(rename = "title")]
43832    pub title: String,
43833    #[allow(rustdoc::invalid_html_tags)]
43834    #[doc = "Product description"]
43835    #[serde(rename = "description")]
43836    pub description: String,
43837    #[allow(rustdoc::invalid_html_tags)]
43838    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
43839    #[serde(rename = "start_parameter")]
43840    pub start_parameter: String,
43841    #[allow(rustdoc::invalid_html_tags)]
43842    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
43843    #[serde(rename = "currency")]
43844    pub currency: String,
43845    #[allow(rustdoc::invalid_html_tags)]
43846    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
43847    #[serde(rename = "total_amount")]
43848    pub total_amount: i64,
43849}
43850impl From<NoSkipInvoice> for Invoice {
43851    fn from(t: NoSkipInvoice) -> Self {
43852        Self {
43853            title: t.title,
43854            description: t.description,
43855            start_parameter: t.start_parameter,
43856            currency: t.currency,
43857            total_amount: t.total_amount,
43858        }
43859    }
43860}
43861#[allow(clippy::from_over_into)]
43862impl Into<NoSkipInvoice> for Invoice {
43863    fn into(self) -> NoSkipInvoice {
43864        NoSkipInvoice {
43865            title: self.title,
43866            description: self.description,
43867            start_parameter: self.start_parameter,
43868            currency: self.currency,
43869            total_amount: self.total_amount,
43870        }
43871    }
43872}
43873impl NoSkipInvoice {
43874    pub fn skip(self) -> Invoice {
43875        self.into()
43876    }
43877}
43878impl Invoice {
43879    pub fn noskip(self) -> NoSkipInvoice {
43880        self.into()
43881    }
43882}
43883#[allow(rustdoc::invalid_html_tags)]
43884#[doc = "This object contains basic information about an invoice."]
43885#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43886pub struct InvoiceBuilder {
43887    #[allow(rustdoc::invalid_html_tags)]
43888    #[doc = "Product name"]
43889    #[serde(rename = "title")]
43890    pub title: String,
43891    #[allow(rustdoc::invalid_html_tags)]
43892    #[doc = "Product description"]
43893    #[serde(rename = "description")]
43894    pub description: String,
43895    #[allow(rustdoc::invalid_html_tags)]
43896    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
43897    #[serde(rename = "start_parameter")]
43898    pub start_parameter: String,
43899    #[allow(rustdoc::invalid_html_tags)]
43900    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
43901    #[serde(rename = "currency")]
43902    pub currency: String,
43903    #[allow(rustdoc::invalid_html_tags)]
43904    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
43905    #[serde(rename = "total_amount")]
43906    pub total_amount: i64,
43907}
43908impl InvoiceBuilder {
43909    #[allow(clippy::too_many_arguments)]
43910    pub fn new(
43911        title: String,
43912        description: String,
43913        start_parameter: String,
43914        currency: String,
43915        total_amount: i64,
43916    ) -> Self {
43917        Self {
43918            title,
43919            description,
43920            start_parameter,
43921            currency,
43922            total_amount,
43923        }
43924    }
43925    #[allow(rustdoc::invalid_html_tags)]
43926    #[doc = "Product name"]
43927    pub fn set_title(mut self, title: String) -> Self {
43928        self.title = title;
43929        self
43930    }
43931    #[allow(rustdoc::invalid_html_tags)]
43932    #[doc = "Product description"]
43933    pub fn set_description(mut self, description: String) -> Self {
43934        self.description = description;
43935        self
43936    }
43937    #[allow(rustdoc::invalid_html_tags)]
43938    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
43939    pub fn set_start_parameter(mut self, start_parameter: String) -> Self {
43940        self.start_parameter = start_parameter;
43941        self
43942    }
43943    #[allow(rustdoc::invalid_html_tags)]
43944    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
43945    pub fn set_currency(mut self, currency: String) -> Self {
43946        self.currency = currency;
43947        self
43948    }
43949    #[allow(rustdoc::invalid_html_tags)]
43950    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
43951    pub fn set_total_amount(mut self, total_amount: i64) -> Self {
43952        self.total_amount = total_amount;
43953        self
43954    }
43955    pub fn build(self) -> Invoice {
43956        Invoice {
43957            title: self.title,
43958            description: self.description,
43959            start_parameter: self.start_parameter,
43960            currency: self.currency,
43961            total_amount: self.total_amount,
43962        }
43963    }
43964}
43965#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43966#[serde(untagged)]
43967pub enum OwnedGift {
43968    OwnedGiftRegular(OwnedGiftRegular),
43969    OwnedGiftUnique(OwnedGiftUnique),
43970}
43971impl Default for OwnedGift {
43972    fn default() -> Self {
43973        OwnedGift::OwnedGiftRegular(OwnedGiftRegular::default())
43974    }
43975}
43976impl OwnedGift {
43977    #[allow(rustdoc::invalid_html_tags)]
43978    #[doc = "Optional. Sender of the gift if it is a known user"]
43979    #[allow(clippy::needless_lifetimes)]
43980    pub fn get_sender_user<'a>(&'a self) -> Option<&'a User> {
43981        match self {
43982            Self::OwnedGiftRegular(ref v) => v.get_sender_user(),
43983            Self::OwnedGiftUnique(ref v) => v.get_sender_user(),
43984        }
43985    }
43986    #[allow(rustdoc::invalid_html_tags)]
43987    #[doc = "Date the gift was sent in Unix time"]
43988    #[allow(clippy::needless_lifetimes)]
43989    pub fn get_send_date<'a>(&'a self) -> i64 {
43990        match self {
43991            Self::OwnedGiftRegular(ref v) => v.get_send_date(),
43992            Self::OwnedGiftUnique(ref v) => v.get_send_date(),
43993        }
43994    }
43995    #[allow(rustdoc::invalid_html_tags)]
43996    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
43997    #[allow(clippy::needless_lifetimes)]
43998    pub fn get_is_saved<'a>(&'a self) -> Option<bool> {
43999        match self {
44000            Self::OwnedGiftRegular(ref v) => v.get_is_saved(),
44001            Self::OwnedGiftUnique(ref v) => v.get_is_saved(),
44002        }
44003    }
44004}
44005#[allow(rustdoc::invalid_html_tags)]
44006#[doc = "This object represents the bot's short description."]
44007#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
44008pub struct BotShortDescription {
44009    #[allow(rustdoc::invalid_html_tags)]
44010    #[doc = "The bot's short description"]
44011    #[serde(rename = "short_description")]
44012    pub short_description: String,
44013}
44014#[allow(rustdoc::invalid_html_tags)]
44015#[doc = "Companion type to BotShortDescription that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
44016#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
44017pub struct NoSkipBotShortDescription {
44018    #[allow(rustdoc::invalid_html_tags)]
44019    #[doc = "The bot's short description"]
44020    #[serde(rename = "short_description")]
44021    pub short_description: String,
44022}
44023impl From<NoSkipBotShortDescription> for BotShortDescription {
44024    fn from(t: NoSkipBotShortDescription) -> Self {
44025        Self {
44026            short_description: t.short_description,
44027        }
44028    }
44029}
44030#[allow(clippy::from_over_into)]
44031impl Into<NoSkipBotShortDescription> for BotShortDescription {
44032    fn into(self) -> NoSkipBotShortDescription {
44033        NoSkipBotShortDescription {
44034            short_description: self.short_description,
44035        }
44036    }
44037}
44038impl NoSkipBotShortDescription {
44039    pub fn skip(self) -> BotShortDescription {
44040        self.into()
44041    }
44042}
44043impl BotShortDescription {
44044    pub fn noskip(self) -> NoSkipBotShortDescription {
44045        self.into()
44046    }
44047}
44048#[allow(rustdoc::invalid_html_tags)]
44049#[doc = "This object represents the bot's short description."]
44050#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
44051pub struct BotShortDescriptionBuilder {
44052    #[allow(rustdoc::invalid_html_tags)]
44053    #[doc = "The bot's short description"]
44054    #[serde(rename = "short_description")]
44055    pub short_description: String,
44056}
44057impl BotShortDescriptionBuilder {
44058    #[allow(clippy::too_many_arguments)]
44059    pub fn new(short_description: String) -> Self {
44060        Self { short_description }
44061    }
44062    #[allow(rustdoc::invalid_html_tags)]
44063    #[doc = "The bot's short description"]
44064    pub fn set_short_description(mut self, short_description: String) -> Self {
44065        self.short_description = short_description;
44066        self
44067    }
44068    pub fn build(self) -> BotShortDescription {
44069        BotShortDescription {
44070            short_description: self.short_description,
44071        }
44072    }
44073}
44074#[allow(rustdoc::invalid_html_tags)]
44075#[doc = "This object contains full information about a chat."]
44076#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
44077pub struct ChatFullInfo {
44078    #[allow(rustdoc::invalid_html_tags)]
44079    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
44080    #[serde(rename = "id")]
44081    pub id: i64,
44082    #[allow(rustdoc::invalid_html_tags)]
44083    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
44084    #[serde(rename = "type")]
44085    pub tg_type: String,
44086    #[allow(rustdoc::invalid_html_tags)]
44087    #[doc = "Optional. Title, for supergroups, channels and group chats"]
44088    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
44089    pub title: Option<String>,
44090    #[allow(rustdoc::invalid_html_tags)]
44091    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
44092    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
44093    pub username: Option<String>,
44094    #[allow(rustdoc::invalid_html_tags)]
44095    #[doc = "Optional. First name of the other party in a private chat"]
44096    #[serde(
44097        skip_serializing_if = "Option::is_none",
44098        rename = "first_name",
44099        default
44100    )]
44101    pub first_name: Option<String>,
44102    #[allow(rustdoc::invalid_html_tags)]
44103    #[doc = "Optional. Last name of the other party in a private chat"]
44104    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
44105    pub last_name: Option<String>,
44106    #[allow(rustdoc::invalid_html_tags)]
44107    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
44108    #[serde(skip_serializing_if = "Option::is_none", rename = "is_forum", default)]
44109    pub is_forum: Option<bool>,
44110    #[allow(rustdoc::invalid_html_tags)]
44111    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
44112    #[serde(
44113        skip_serializing_if = "Option::is_none",
44114        rename = "is_direct_messages",
44115        default
44116    )]
44117    pub is_direct_messages: Option<bool>,
44118    #[allow(rustdoc::invalid_html_tags)]
44119    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
44120    #[serde(rename = "accent_color_id")]
44121    pub accent_color_id: i64,
44122    #[allow(rustdoc::invalid_html_tags)]
44123    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
44124    #[serde(rename = "max_reaction_count")]
44125    pub max_reaction_count: i64,
44126    #[allow(rustdoc::invalid_html_tags)]
44127    #[doc = "Optional. Chat photo"]
44128    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
44129    pub photo: Option<BoxWrapper<Unbox<ChatPhoto>>>,
44130    #[allow(rustdoc::invalid_html_tags)]
44131    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
44132    #[serde(
44133        skip_serializing_if = "Option::is_none",
44134        rename = "active_usernames",
44135        default
44136    )]
44137    pub active_usernames: Option<Vec<String>>,
44138    #[allow(rustdoc::invalid_html_tags)]
44139    #[doc = "Optional. For private chats, the date of birth of the user"]
44140    #[serde(skip_serializing_if = "Option::is_none", rename = "birthdate", default)]
44141    pub birthdate: Option<BoxWrapper<Unbox<Birthdate>>>,
44142    #[allow(rustdoc::invalid_html_tags)]
44143    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
44144    #[serde(
44145        skip_serializing_if = "Option::is_none",
44146        rename = "business_intro",
44147        default
44148    )]
44149    pub business_intro: Option<BoxWrapper<Unbox<BusinessIntro>>>,
44150    #[allow(rustdoc::invalid_html_tags)]
44151    #[doc = "Optional. For private chats with business accounts, the location of the business"]
44152    #[serde(
44153        skip_serializing_if = "Option::is_none",
44154        rename = "business_location",
44155        default
44156    )]
44157    pub business_location: Option<BoxWrapper<Unbox<BusinessLocation>>>,
44158    #[allow(rustdoc::invalid_html_tags)]
44159    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
44160    #[serde(
44161        skip_serializing_if = "Option::is_none",
44162        rename = "business_opening_hours",
44163        default
44164    )]
44165    pub business_opening_hours: Option<BoxWrapper<Unbox<BusinessOpeningHours>>>,
44166    #[allow(rustdoc::invalid_html_tags)]
44167    #[doc = "Optional. For private chats, the personal channel of the user"]
44168    #[serde(
44169        skip_serializing_if = "Option::is_none",
44170        rename = "personal_chat",
44171        default
44172    )]
44173    pub personal_chat: Option<BoxWrapper<Unbox<Chat>>>,
44174    #[allow(rustdoc::invalid_html_tags)]
44175    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
44176    #[serde(
44177        skip_serializing_if = "Option::is_none",
44178        rename = "parent_chat",
44179        default
44180    )]
44181    pub parent_chat: Option<BoxWrapper<Unbox<Chat>>>,
44182    #[allow(rustdoc::invalid_html_tags)]
44183    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
44184    #[serde(
44185        skip_serializing_if = "Option::is_none",
44186        rename = "available_reactions",
44187        default
44188    )]
44189    pub available_reactions: Option<Vec<ReactionType>>,
44190    #[allow(rustdoc::invalid_html_tags)]
44191    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
44192    #[serde(
44193        skip_serializing_if = "Option::is_none",
44194        rename = "background_custom_emoji_id",
44195        default
44196    )]
44197    pub background_custom_emoji_id: Option<String>,
44198    #[allow(rustdoc::invalid_html_tags)]
44199    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
44200    #[serde(
44201        skip_serializing_if = "Option::is_none",
44202        rename = "profile_accent_color_id",
44203        default
44204    )]
44205    pub profile_accent_color_id: Option<i64>,
44206    #[allow(rustdoc::invalid_html_tags)]
44207    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
44208    #[serde(
44209        skip_serializing_if = "Option::is_none",
44210        rename = "profile_background_custom_emoji_id",
44211        default
44212    )]
44213    pub profile_background_custom_emoji_id: Option<String>,
44214    #[allow(rustdoc::invalid_html_tags)]
44215    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
44216    #[serde(
44217        skip_serializing_if = "Option::is_none",
44218        rename = "emoji_status_custom_emoji_id",
44219        default
44220    )]
44221    pub emoji_status_custom_emoji_id: Option<String>,
44222    #[allow(rustdoc::invalid_html_tags)]
44223    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
44224    #[serde(
44225        skip_serializing_if = "Option::is_none",
44226        rename = "emoji_status_expiration_date",
44227        default
44228    )]
44229    pub emoji_status_expiration_date: Option<i64>,
44230    #[allow(rustdoc::invalid_html_tags)]
44231    #[doc = "Optional. Bio of the other party in a private chat"]
44232    #[serde(skip_serializing_if = "Option::is_none", rename = "bio", default)]
44233    pub bio: Option<String>,
44234    #[allow(rustdoc::invalid_html_tags)]
44235    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
44236    #[serde(
44237        skip_serializing_if = "Option::is_none",
44238        rename = "has_private_forwards",
44239        default
44240    )]
44241    pub has_private_forwards: Option<bool>,
44242    #[allow(rustdoc::invalid_html_tags)]
44243    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
44244    #[serde(
44245        skip_serializing_if = "Option::is_none",
44246        rename = "has_restricted_voice_and_video_messages",
44247        default
44248    )]
44249    pub has_restricted_voice_and_video_messages: Option<bool>,
44250    #[allow(rustdoc::invalid_html_tags)]
44251    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
44252    #[serde(
44253        skip_serializing_if = "Option::is_none",
44254        rename = "join_to_send_messages",
44255        default
44256    )]
44257    pub join_to_send_messages: Option<bool>,
44258    #[allow(rustdoc::invalid_html_tags)]
44259    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
44260    #[serde(
44261        skip_serializing_if = "Option::is_none",
44262        rename = "join_by_request",
44263        default
44264    )]
44265    pub join_by_request: Option<bool>,
44266    #[allow(rustdoc::invalid_html_tags)]
44267    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
44268    #[serde(
44269        skip_serializing_if = "Option::is_none",
44270        rename = "description",
44271        default
44272    )]
44273    pub description: Option<String>,
44274    #[allow(rustdoc::invalid_html_tags)]
44275    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
44276    #[serde(
44277        skip_serializing_if = "Option::is_none",
44278        rename = "invite_link",
44279        default
44280    )]
44281    pub invite_link: Option<String>,
44282    #[allow(rustdoc::invalid_html_tags)]
44283    #[doc = "Optional. The most recent pinned message (by sending date)"]
44284    #[serde(
44285        skip_serializing_if = "Option::is_none",
44286        rename = "pinned_message",
44287        default
44288    )]
44289    pub pinned_message: Option<BoxWrapper<Unbox<Message>>>,
44290    #[allow(rustdoc::invalid_html_tags)]
44291    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
44292    #[serde(
44293        skip_serializing_if = "Option::is_none",
44294        rename = "permissions",
44295        default
44296    )]
44297    pub permissions: Option<BoxWrapper<Unbox<ChatPermissions>>>,
44298    #[allow(rustdoc::invalid_html_tags)]
44299    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
44300    #[serde(rename = "accepted_gift_types")]
44301    pub accepted_gift_types: BoxWrapper<Unbox<AcceptedGiftTypes>>,
44302    #[allow(rustdoc::invalid_html_tags)]
44303    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
44304    #[serde(
44305        skip_serializing_if = "Option::is_none",
44306        rename = "can_send_paid_media",
44307        default
44308    )]
44309    pub can_send_paid_media: Option<bool>,
44310    #[allow(rustdoc::invalid_html_tags)]
44311    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
44312    #[serde(
44313        skip_serializing_if = "Option::is_none",
44314        rename = "slow_mode_delay",
44315        default
44316    )]
44317    pub slow_mode_delay: Option<i64>,
44318    #[allow(rustdoc::invalid_html_tags)]
44319    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
44320    #[serde(
44321        skip_serializing_if = "Option::is_none",
44322        rename = "unrestrict_boost_count",
44323        default
44324    )]
44325    pub unrestrict_boost_count: Option<i64>,
44326    #[allow(rustdoc::invalid_html_tags)]
44327    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
44328    #[serde(
44329        skip_serializing_if = "Option::is_none",
44330        rename = "message_auto_delete_time",
44331        default
44332    )]
44333    pub message_auto_delete_time: Option<i64>,
44334    #[allow(rustdoc::invalid_html_tags)]
44335    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
44336    #[serde(
44337        skip_serializing_if = "Option::is_none",
44338        rename = "has_aggressive_anti_spam_enabled",
44339        default
44340    )]
44341    pub has_aggressive_anti_spam_enabled: Option<bool>,
44342    #[allow(rustdoc::invalid_html_tags)]
44343    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
44344    #[serde(
44345        skip_serializing_if = "Option::is_none",
44346        rename = "has_hidden_members",
44347        default
44348    )]
44349    pub has_hidden_members: Option<bool>,
44350    #[allow(rustdoc::invalid_html_tags)]
44351    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
44352    #[serde(
44353        skip_serializing_if = "Option::is_none",
44354        rename = "has_protected_content",
44355        default
44356    )]
44357    pub has_protected_content: Option<bool>,
44358    #[allow(rustdoc::invalid_html_tags)]
44359    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
44360    #[serde(
44361        skip_serializing_if = "Option::is_none",
44362        rename = "has_visible_history",
44363        default
44364    )]
44365    pub has_visible_history: Option<bool>,
44366    #[allow(rustdoc::invalid_html_tags)]
44367    #[doc = "Optional. For supergroups, name of the group sticker set"]
44368    #[serde(
44369        skip_serializing_if = "Option::is_none",
44370        rename = "sticker_set_name",
44371        default
44372    )]
44373    pub sticker_set_name: Option<String>,
44374    #[allow(rustdoc::invalid_html_tags)]
44375    #[doc = "Optional. True, if the bot can change the group sticker set"]
44376    #[serde(
44377        skip_serializing_if = "Option::is_none",
44378        rename = "can_set_sticker_set",
44379        default
44380    )]
44381    pub can_set_sticker_set: Option<bool>,
44382    #[allow(rustdoc::invalid_html_tags)]
44383    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
44384    #[serde(
44385        skip_serializing_if = "Option::is_none",
44386        rename = "custom_emoji_sticker_set_name",
44387        default
44388    )]
44389    pub custom_emoji_sticker_set_name: Option<String>,
44390    #[allow(rustdoc::invalid_html_tags)]
44391    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
44392    #[serde(
44393        skip_serializing_if = "Option::is_none",
44394        rename = "linked_chat_id",
44395        default
44396    )]
44397    pub linked_chat_id: Option<i64>,
44398    #[allow(rustdoc::invalid_html_tags)]
44399    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
44400    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
44401    pub location: Option<BoxWrapper<Unbox<ChatLocation>>>,
44402}
44403#[allow(rustdoc::invalid_html_tags)]
44404#[doc = "Companion type to ChatFullInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
44405#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
44406pub struct NoSkipChatFullInfo {
44407    #[allow(rustdoc::invalid_html_tags)]
44408    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
44409    #[serde(rename = "id")]
44410    pub id: i64,
44411    #[allow(rustdoc::invalid_html_tags)]
44412    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
44413    #[serde(rename = "type")]
44414    pub tg_type: String,
44415    pub title: Option<String>,
44416    pub username: Option<String>,
44417    pub first_name: Option<String>,
44418    pub last_name: Option<String>,
44419    pub is_forum: Option<bool>,
44420    pub is_direct_messages: Option<bool>,
44421    #[allow(rustdoc::invalid_html_tags)]
44422    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
44423    #[serde(rename = "accent_color_id")]
44424    pub accent_color_id: i64,
44425    #[allow(rustdoc::invalid_html_tags)]
44426    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
44427    #[serde(rename = "max_reaction_count")]
44428    pub max_reaction_count: i64,
44429    pub photo: Option<BoxWrapper<Unbox<ChatPhoto>>>,
44430    pub active_usernames: Option<Vec<String>>,
44431    pub birthdate: Option<BoxWrapper<Unbox<Birthdate>>>,
44432    pub business_intro: Option<BoxWrapper<Unbox<BusinessIntro>>>,
44433    pub business_location: Option<BoxWrapper<Unbox<BusinessLocation>>>,
44434    pub business_opening_hours: Option<BoxWrapper<Unbox<BusinessOpeningHours>>>,
44435    pub personal_chat: Option<BoxWrapper<Unbox<Chat>>>,
44436    pub parent_chat: Option<BoxWrapper<Unbox<Chat>>>,
44437    pub available_reactions: Option<Vec<ReactionType>>,
44438    pub background_custom_emoji_id: Option<String>,
44439    pub profile_accent_color_id: Option<i64>,
44440    pub profile_background_custom_emoji_id: Option<String>,
44441    pub emoji_status_custom_emoji_id: Option<String>,
44442    pub emoji_status_expiration_date: Option<i64>,
44443    pub bio: Option<String>,
44444    pub has_private_forwards: Option<bool>,
44445    pub has_restricted_voice_and_video_messages: Option<bool>,
44446    pub join_to_send_messages: Option<bool>,
44447    pub join_by_request: Option<bool>,
44448    pub description: Option<String>,
44449    pub invite_link: Option<String>,
44450    pub pinned_message: Option<BoxWrapper<Unbox<Message>>>,
44451    pub permissions: Option<BoxWrapper<Unbox<ChatPermissions>>>,
44452    #[allow(rustdoc::invalid_html_tags)]
44453    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
44454    #[serde(rename = "accepted_gift_types")]
44455    pub accepted_gift_types: BoxWrapper<Unbox<AcceptedGiftTypes>>,
44456    pub can_send_paid_media: Option<bool>,
44457    pub slow_mode_delay: Option<i64>,
44458    pub unrestrict_boost_count: Option<i64>,
44459    pub message_auto_delete_time: Option<i64>,
44460    pub has_aggressive_anti_spam_enabled: Option<bool>,
44461    pub has_hidden_members: Option<bool>,
44462    pub has_protected_content: Option<bool>,
44463    pub has_visible_history: Option<bool>,
44464    pub sticker_set_name: Option<String>,
44465    pub can_set_sticker_set: Option<bool>,
44466    pub custom_emoji_sticker_set_name: Option<String>,
44467    pub linked_chat_id: Option<i64>,
44468    pub location: Option<BoxWrapper<Unbox<ChatLocation>>>,
44469}
44470impl From<NoSkipChatFullInfo> for ChatFullInfo {
44471    fn from(t: NoSkipChatFullInfo) -> Self {
44472        Self {
44473            id: t.id,
44474            tg_type: t.tg_type,
44475            title: t.title,
44476            username: t.username,
44477            first_name: t.first_name,
44478            last_name: t.last_name,
44479            is_forum: t.is_forum,
44480            is_direct_messages: t.is_direct_messages,
44481            accent_color_id: t.accent_color_id,
44482            max_reaction_count: t.max_reaction_count,
44483            photo: t.photo,
44484            active_usernames: t.active_usernames,
44485            birthdate: t.birthdate,
44486            business_intro: t.business_intro,
44487            business_location: t.business_location,
44488            business_opening_hours: t.business_opening_hours,
44489            personal_chat: t.personal_chat,
44490            parent_chat: t.parent_chat,
44491            available_reactions: t.available_reactions,
44492            background_custom_emoji_id: t.background_custom_emoji_id,
44493            profile_accent_color_id: t.profile_accent_color_id,
44494            profile_background_custom_emoji_id: t.profile_background_custom_emoji_id,
44495            emoji_status_custom_emoji_id: t.emoji_status_custom_emoji_id,
44496            emoji_status_expiration_date: t.emoji_status_expiration_date,
44497            bio: t.bio,
44498            has_private_forwards: t.has_private_forwards,
44499            has_restricted_voice_and_video_messages: t.has_restricted_voice_and_video_messages,
44500            join_to_send_messages: t.join_to_send_messages,
44501            join_by_request: t.join_by_request,
44502            description: t.description,
44503            invite_link: t.invite_link,
44504            pinned_message: t.pinned_message,
44505            permissions: t.permissions,
44506            accepted_gift_types: t.accepted_gift_types,
44507            can_send_paid_media: t.can_send_paid_media,
44508            slow_mode_delay: t.slow_mode_delay,
44509            unrestrict_boost_count: t.unrestrict_boost_count,
44510            message_auto_delete_time: t.message_auto_delete_time,
44511            has_aggressive_anti_spam_enabled: t.has_aggressive_anti_spam_enabled,
44512            has_hidden_members: t.has_hidden_members,
44513            has_protected_content: t.has_protected_content,
44514            has_visible_history: t.has_visible_history,
44515            sticker_set_name: t.sticker_set_name,
44516            can_set_sticker_set: t.can_set_sticker_set,
44517            custom_emoji_sticker_set_name: t.custom_emoji_sticker_set_name,
44518            linked_chat_id: t.linked_chat_id,
44519            location: t.location,
44520        }
44521    }
44522}
44523#[allow(clippy::from_over_into)]
44524impl Into<NoSkipChatFullInfo> for ChatFullInfo {
44525    fn into(self) -> NoSkipChatFullInfo {
44526        NoSkipChatFullInfo {
44527            id: self.id,
44528            tg_type: self.tg_type,
44529            title: self.title,
44530            username: self.username,
44531            first_name: self.first_name,
44532            last_name: self.last_name,
44533            is_forum: self.is_forum,
44534            is_direct_messages: self.is_direct_messages,
44535            accent_color_id: self.accent_color_id,
44536            max_reaction_count: self.max_reaction_count,
44537            photo: self.photo,
44538            active_usernames: self.active_usernames,
44539            birthdate: self.birthdate,
44540            business_intro: self.business_intro,
44541            business_location: self.business_location,
44542            business_opening_hours: self.business_opening_hours,
44543            personal_chat: self.personal_chat,
44544            parent_chat: self.parent_chat,
44545            available_reactions: self.available_reactions,
44546            background_custom_emoji_id: self.background_custom_emoji_id,
44547            profile_accent_color_id: self.profile_accent_color_id,
44548            profile_background_custom_emoji_id: self.profile_background_custom_emoji_id,
44549            emoji_status_custom_emoji_id: self.emoji_status_custom_emoji_id,
44550            emoji_status_expiration_date: self.emoji_status_expiration_date,
44551            bio: self.bio,
44552            has_private_forwards: self.has_private_forwards,
44553            has_restricted_voice_and_video_messages: self.has_restricted_voice_and_video_messages,
44554            join_to_send_messages: self.join_to_send_messages,
44555            join_by_request: self.join_by_request,
44556            description: self.description,
44557            invite_link: self.invite_link,
44558            pinned_message: self.pinned_message,
44559            permissions: self.permissions,
44560            accepted_gift_types: self.accepted_gift_types,
44561            can_send_paid_media: self.can_send_paid_media,
44562            slow_mode_delay: self.slow_mode_delay,
44563            unrestrict_boost_count: self.unrestrict_boost_count,
44564            message_auto_delete_time: self.message_auto_delete_time,
44565            has_aggressive_anti_spam_enabled: self.has_aggressive_anti_spam_enabled,
44566            has_hidden_members: self.has_hidden_members,
44567            has_protected_content: self.has_protected_content,
44568            has_visible_history: self.has_visible_history,
44569            sticker_set_name: self.sticker_set_name,
44570            can_set_sticker_set: self.can_set_sticker_set,
44571            custom_emoji_sticker_set_name: self.custom_emoji_sticker_set_name,
44572            linked_chat_id: self.linked_chat_id,
44573            location: self.location,
44574        }
44575    }
44576}
44577impl NoSkipChatFullInfo {
44578    pub fn skip(self) -> ChatFullInfo {
44579        self.into()
44580    }
44581}
44582impl ChatFullInfo {
44583    pub fn noskip(self) -> NoSkipChatFullInfo {
44584        self.into()
44585    }
44586}
44587#[allow(rustdoc::invalid_html_tags)]
44588#[doc = "This object contains full information about a chat."]
44589#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
44590pub struct ChatFullInfoBuilder {
44591    #[allow(rustdoc::invalid_html_tags)]
44592    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
44593    #[serde(rename = "id")]
44594    pub id: i64,
44595    #[allow(rustdoc::invalid_html_tags)]
44596    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
44597    #[serde(rename = "type")]
44598    pub tg_type: String,
44599    #[allow(rustdoc::invalid_html_tags)]
44600    #[doc = "Optional. Title, for supergroups, channels and group chats"]
44601    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
44602    pub title: Option<String>,
44603    #[allow(rustdoc::invalid_html_tags)]
44604    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
44605    #[serde(skip_serializing_if = "Option::is_none", rename = "username", default)]
44606    pub username: Option<String>,
44607    #[allow(rustdoc::invalid_html_tags)]
44608    #[doc = "Optional. First name of the other party in a private chat"]
44609    #[serde(
44610        skip_serializing_if = "Option::is_none",
44611        rename = "first_name",
44612        default
44613    )]
44614    pub first_name: Option<String>,
44615    #[allow(rustdoc::invalid_html_tags)]
44616    #[doc = "Optional. Last name of the other party in a private chat"]
44617    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
44618    pub last_name: Option<String>,
44619    #[allow(rustdoc::invalid_html_tags)]
44620    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
44621    #[serde(skip_serializing_if = "Option::is_none", rename = "is_forum", default)]
44622    pub is_forum: Option<bool>,
44623    #[allow(rustdoc::invalid_html_tags)]
44624    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
44625    #[serde(
44626        skip_serializing_if = "Option::is_none",
44627        rename = "is_direct_messages",
44628        default
44629    )]
44630    pub is_direct_messages: Option<bool>,
44631    #[allow(rustdoc::invalid_html_tags)]
44632    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
44633    #[serde(rename = "accent_color_id")]
44634    pub accent_color_id: i64,
44635    #[allow(rustdoc::invalid_html_tags)]
44636    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
44637    #[serde(rename = "max_reaction_count")]
44638    pub max_reaction_count: i64,
44639    #[allow(rustdoc::invalid_html_tags)]
44640    #[doc = "Optional. Chat photo"]
44641    #[serde(skip_serializing_if = "Option::is_none", rename = "photo", default)]
44642    pub photo: Option<BoxWrapper<Unbox<ChatPhoto>>>,
44643    #[allow(rustdoc::invalid_html_tags)]
44644    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
44645    #[serde(
44646        skip_serializing_if = "Option::is_none",
44647        rename = "active_usernames",
44648        default
44649    )]
44650    pub active_usernames: Option<Vec<String>>,
44651    #[allow(rustdoc::invalid_html_tags)]
44652    #[doc = "Optional. For private chats, the date of birth of the user"]
44653    #[serde(skip_serializing_if = "Option::is_none", rename = "birthdate", default)]
44654    pub birthdate: Option<BoxWrapper<Unbox<Birthdate>>>,
44655    #[allow(rustdoc::invalid_html_tags)]
44656    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
44657    #[serde(
44658        skip_serializing_if = "Option::is_none",
44659        rename = "business_intro",
44660        default
44661    )]
44662    pub business_intro: Option<BoxWrapper<Unbox<BusinessIntro>>>,
44663    #[allow(rustdoc::invalid_html_tags)]
44664    #[doc = "Optional. For private chats with business accounts, the location of the business"]
44665    #[serde(
44666        skip_serializing_if = "Option::is_none",
44667        rename = "business_location",
44668        default
44669    )]
44670    pub business_location: Option<BoxWrapper<Unbox<BusinessLocation>>>,
44671    #[allow(rustdoc::invalid_html_tags)]
44672    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
44673    #[serde(
44674        skip_serializing_if = "Option::is_none",
44675        rename = "business_opening_hours",
44676        default
44677    )]
44678    pub business_opening_hours: Option<BoxWrapper<Unbox<BusinessOpeningHours>>>,
44679    #[allow(rustdoc::invalid_html_tags)]
44680    #[doc = "Optional. For private chats, the personal channel of the user"]
44681    #[serde(
44682        skip_serializing_if = "Option::is_none",
44683        rename = "personal_chat",
44684        default
44685    )]
44686    pub personal_chat: Option<BoxWrapper<Unbox<Chat>>>,
44687    #[allow(rustdoc::invalid_html_tags)]
44688    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
44689    #[serde(
44690        skip_serializing_if = "Option::is_none",
44691        rename = "parent_chat",
44692        default
44693    )]
44694    pub parent_chat: Option<BoxWrapper<Unbox<Chat>>>,
44695    #[allow(rustdoc::invalid_html_tags)]
44696    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
44697    #[serde(
44698        skip_serializing_if = "Option::is_none",
44699        rename = "available_reactions",
44700        default
44701    )]
44702    pub available_reactions: Option<Vec<ReactionType>>,
44703    #[allow(rustdoc::invalid_html_tags)]
44704    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
44705    #[serde(
44706        skip_serializing_if = "Option::is_none",
44707        rename = "background_custom_emoji_id",
44708        default
44709    )]
44710    pub background_custom_emoji_id: Option<String>,
44711    #[allow(rustdoc::invalid_html_tags)]
44712    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
44713    #[serde(
44714        skip_serializing_if = "Option::is_none",
44715        rename = "profile_accent_color_id",
44716        default
44717    )]
44718    pub profile_accent_color_id: Option<i64>,
44719    #[allow(rustdoc::invalid_html_tags)]
44720    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
44721    #[serde(
44722        skip_serializing_if = "Option::is_none",
44723        rename = "profile_background_custom_emoji_id",
44724        default
44725    )]
44726    pub profile_background_custom_emoji_id: Option<String>,
44727    #[allow(rustdoc::invalid_html_tags)]
44728    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
44729    #[serde(
44730        skip_serializing_if = "Option::is_none",
44731        rename = "emoji_status_custom_emoji_id",
44732        default
44733    )]
44734    pub emoji_status_custom_emoji_id: Option<String>,
44735    #[allow(rustdoc::invalid_html_tags)]
44736    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
44737    #[serde(
44738        skip_serializing_if = "Option::is_none",
44739        rename = "emoji_status_expiration_date",
44740        default
44741    )]
44742    pub emoji_status_expiration_date: Option<i64>,
44743    #[allow(rustdoc::invalid_html_tags)]
44744    #[doc = "Optional. Bio of the other party in a private chat"]
44745    #[serde(skip_serializing_if = "Option::is_none", rename = "bio", default)]
44746    pub bio: Option<String>,
44747    #[allow(rustdoc::invalid_html_tags)]
44748    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
44749    #[serde(
44750        skip_serializing_if = "Option::is_none",
44751        rename = "has_private_forwards",
44752        default
44753    )]
44754    pub has_private_forwards: Option<bool>,
44755    #[allow(rustdoc::invalid_html_tags)]
44756    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
44757    #[serde(
44758        skip_serializing_if = "Option::is_none",
44759        rename = "has_restricted_voice_and_video_messages",
44760        default
44761    )]
44762    pub has_restricted_voice_and_video_messages: Option<bool>,
44763    #[allow(rustdoc::invalid_html_tags)]
44764    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
44765    #[serde(
44766        skip_serializing_if = "Option::is_none",
44767        rename = "join_to_send_messages",
44768        default
44769    )]
44770    pub join_to_send_messages: Option<bool>,
44771    #[allow(rustdoc::invalid_html_tags)]
44772    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
44773    #[serde(
44774        skip_serializing_if = "Option::is_none",
44775        rename = "join_by_request",
44776        default
44777    )]
44778    pub join_by_request: Option<bool>,
44779    #[allow(rustdoc::invalid_html_tags)]
44780    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
44781    #[serde(
44782        skip_serializing_if = "Option::is_none",
44783        rename = "description",
44784        default
44785    )]
44786    pub description: Option<String>,
44787    #[allow(rustdoc::invalid_html_tags)]
44788    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
44789    #[serde(
44790        skip_serializing_if = "Option::is_none",
44791        rename = "invite_link",
44792        default
44793    )]
44794    pub invite_link: Option<String>,
44795    #[allow(rustdoc::invalid_html_tags)]
44796    #[doc = "Optional. The most recent pinned message (by sending date)"]
44797    #[serde(
44798        skip_serializing_if = "Option::is_none",
44799        rename = "pinned_message",
44800        default
44801    )]
44802    pub pinned_message: Option<BoxWrapper<Unbox<Message>>>,
44803    #[allow(rustdoc::invalid_html_tags)]
44804    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
44805    #[serde(
44806        skip_serializing_if = "Option::is_none",
44807        rename = "permissions",
44808        default
44809    )]
44810    pub permissions: Option<BoxWrapper<Unbox<ChatPermissions>>>,
44811    #[allow(rustdoc::invalid_html_tags)]
44812    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
44813    #[serde(rename = "accepted_gift_types")]
44814    pub accepted_gift_types: BoxWrapper<Unbox<AcceptedGiftTypes>>,
44815    #[allow(rustdoc::invalid_html_tags)]
44816    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
44817    #[serde(
44818        skip_serializing_if = "Option::is_none",
44819        rename = "can_send_paid_media",
44820        default
44821    )]
44822    pub can_send_paid_media: Option<bool>,
44823    #[allow(rustdoc::invalid_html_tags)]
44824    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
44825    #[serde(
44826        skip_serializing_if = "Option::is_none",
44827        rename = "slow_mode_delay",
44828        default
44829    )]
44830    pub slow_mode_delay: Option<i64>,
44831    #[allow(rustdoc::invalid_html_tags)]
44832    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
44833    #[serde(
44834        skip_serializing_if = "Option::is_none",
44835        rename = "unrestrict_boost_count",
44836        default
44837    )]
44838    pub unrestrict_boost_count: Option<i64>,
44839    #[allow(rustdoc::invalid_html_tags)]
44840    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
44841    #[serde(
44842        skip_serializing_if = "Option::is_none",
44843        rename = "message_auto_delete_time",
44844        default
44845    )]
44846    pub message_auto_delete_time: Option<i64>,
44847    #[allow(rustdoc::invalid_html_tags)]
44848    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
44849    #[serde(
44850        skip_serializing_if = "Option::is_none",
44851        rename = "has_aggressive_anti_spam_enabled",
44852        default
44853    )]
44854    pub has_aggressive_anti_spam_enabled: Option<bool>,
44855    #[allow(rustdoc::invalid_html_tags)]
44856    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
44857    #[serde(
44858        skip_serializing_if = "Option::is_none",
44859        rename = "has_hidden_members",
44860        default
44861    )]
44862    pub has_hidden_members: Option<bool>,
44863    #[allow(rustdoc::invalid_html_tags)]
44864    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
44865    #[serde(
44866        skip_serializing_if = "Option::is_none",
44867        rename = "has_protected_content",
44868        default
44869    )]
44870    pub has_protected_content: Option<bool>,
44871    #[allow(rustdoc::invalid_html_tags)]
44872    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
44873    #[serde(
44874        skip_serializing_if = "Option::is_none",
44875        rename = "has_visible_history",
44876        default
44877    )]
44878    pub has_visible_history: Option<bool>,
44879    #[allow(rustdoc::invalid_html_tags)]
44880    #[doc = "Optional. For supergroups, name of the group sticker set"]
44881    #[serde(
44882        skip_serializing_if = "Option::is_none",
44883        rename = "sticker_set_name",
44884        default
44885    )]
44886    pub sticker_set_name: Option<String>,
44887    #[allow(rustdoc::invalid_html_tags)]
44888    #[doc = "Optional. True, if the bot can change the group sticker set"]
44889    #[serde(
44890        skip_serializing_if = "Option::is_none",
44891        rename = "can_set_sticker_set",
44892        default
44893    )]
44894    pub can_set_sticker_set: Option<bool>,
44895    #[allow(rustdoc::invalid_html_tags)]
44896    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
44897    #[serde(
44898        skip_serializing_if = "Option::is_none",
44899        rename = "custom_emoji_sticker_set_name",
44900        default
44901    )]
44902    pub custom_emoji_sticker_set_name: Option<String>,
44903    #[allow(rustdoc::invalid_html_tags)]
44904    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
44905    #[serde(
44906        skip_serializing_if = "Option::is_none",
44907        rename = "linked_chat_id",
44908        default
44909    )]
44910    pub linked_chat_id: Option<i64>,
44911    #[allow(rustdoc::invalid_html_tags)]
44912    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
44913    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
44914    pub location: Option<BoxWrapper<Unbox<ChatLocation>>>,
44915}
44916impl ChatFullInfoBuilder {
44917    #[allow(clippy::too_many_arguments)]
44918    pub fn new<A: Into<AcceptedGiftTypes>>(
44919        id: i64,
44920        accent_color_id: i64,
44921        max_reaction_count: i64,
44922        accepted_gift_types: A,
44923    ) -> Self {
44924        Self {
44925            tg_type: "ChatFullInfo".to_owned(),
44926            id,
44927            accent_color_id,
44928            max_reaction_count,
44929            accepted_gift_types: BoxWrapper::new_unbox(accepted_gift_types.into()),
44930            title: None,
44931            username: None,
44932            first_name: None,
44933            last_name: None,
44934            is_forum: None,
44935            is_direct_messages: None,
44936            photo: None,
44937            active_usernames: None,
44938            birthdate: None,
44939            business_intro: None,
44940            business_location: None,
44941            business_opening_hours: None,
44942            personal_chat: None,
44943            parent_chat: None,
44944            available_reactions: None,
44945            background_custom_emoji_id: None,
44946            profile_accent_color_id: None,
44947            profile_background_custom_emoji_id: None,
44948            emoji_status_custom_emoji_id: None,
44949            emoji_status_expiration_date: None,
44950            bio: None,
44951            has_private_forwards: None,
44952            has_restricted_voice_and_video_messages: None,
44953            join_to_send_messages: None,
44954            join_by_request: None,
44955            description: None,
44956            invite_link: None,
44957            pinned_message: None,
44958            permissions: None,
44959            can_send_paid_media: None,
44960            slow_mode_delay: None,
44961            unrestrict_boost_count: None,
44962            message_auto_delete_time: None,
44963            has_aggressive_anti_spam_enabled: None,
44964            has_hidden_members: None,
44965            has_protected_content: None,
44966            has_visible_history: None,
44967            sticker_set_name: None,
44968            can_set_sticker_set: None,
44969            custom_emoji_sticker_set_name: None,
44970            linked_chat_id: None,
44971            location: None,
44972        }
44973    }
44974    #[allow(rustdoc::invalid_html_tags)]
44975    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
44976    pub fn set_id(mut self, id: i64) -> Self {
44977        self.id = id;
44978        self
44979    }
44980    #[allow(rustdoc::invalid_html_tags)]
44981    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
44982    pub fn set_type(mut self, tg_type: String) -> Self {
44983        self.tg_type = tg_type;
44984        self
44985    }
44986    #[allow(rustdoc::invalid_html_tags)]
44987    #[doc = "Optional. Title, for supergroups, channels and group chats"]
44988    pub fn set_title(mut self, title: String) -> Self {
44989        self.title = Some(title);
44990        self
44991    }
44992    #[allow(rustdoc::invalid_html_tags)]
44993    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
44994    pub fn set_username(mut self, username: String) -> Self {
44995        self.username = Some(username);
44996        self
44997    }
44998    #[allow(rustdoc::invalid_html_tags)]
44999    #[doc = "Optional. First name of the other party in a private chat"]
45000    pub fn set_first_name(mut self, first_name: String) -> Self {
45001        self.first_name = Some(first_name);
45002        self
45003    }
45004    #[allow(rustdoc::invalid_html_tags)]
45005    #[doc = "Optional. Last name of the other party in a private chat"]
45006    pub fn set_last_name(mut self, last_name: String) -> Self {
45007        self.last_name = Some(last_name);
45008        self
45009    }
45010    #[allow(rustdoc::invalid_html_tags)]
45011    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
45012    pub fn set_is_forum(mut self, is_forum: bool) -> Self {
45013        self.is_forum = Some(is_forum);
45014        self
45015    }
45016    #[allow(rustdoc::invalid_html_tags)]
45017    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
45018    pub fn set_is_direct_messages(mut self, is_direct_messages: bool) -> Self {
45019        self.is_direct_messages = Some(is_direct_messages);
45020        self
45021    }
45022    #[allow(rustdoc::invalid_html_tags)]
45023    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
45024    pub fn set_accent_color_id(mut self, accent_color_id: i64) -> Self {
45025        self.accent_color_id = accent_color_id;
45026        self
45027    }
45028    #[allow(rustdoc::invalid_html_tags)]
45029    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
45030    pub fn set_max_reaction_count(mut self, max_reaction_count: i64) -> Self {
45031        self.max_reaction_count = max_reaction_count;
45032        self
45033    }
45034    #[allow(rustdoc::invalid_html_tags)]
45035    #[doc = "Optional. Chat photo"]
45036    pub fn set_photo(mut self, photo: ChatPhoto) -> Self {
45037        self.photo = Some(BoxWrapper(Unbox(photo)));
45038        self
45039    }
45040    #[allow(rustdoc::invalid_html_tags)]
45041    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
45042    pub fn set_active_usernames(mut self, active_usernames: Vec<String>) -> Self {
45043        self.active_usernames = Some(active_usernames);
45044        self
45045    }
45046    #[allow(rustdoc::invalid_html_tags)]
45047    #[doc = "Optional. For private chats, the date of birth of the user"]
45048    pub fn set_birthdate(mut self, birthdate: Birthdate) -> Self {
45049        self.birthdate = Some(BoxWrapper(Unbox(birthdate)));
45050        self
45051    }
45052    #[allow(rustdoc::invalid_html_tags)]
45053    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
45054    pub fn set_business_intro(mut self, business_intro: BusinessIntro) -> Self {
45055        self.business_intro = Some(BoxWrapper(Unbox(business_intro)));
45056        self
45057    }
45058    #[allow(rustdoc::invalid_html_tags)]
45059    #[doc = "Optional. For private chats with business accounts, the location of the business"]
45060    pub fn set_business_location(mut self, business_location: BusinessLocation) -> Self {
45061        self.business_location = Some(BoxWrapper(Unbox(business_location)));
45062        self
45063    }
45064    #[allow(rustdoc::invalid_html_tags)]
45065    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
45066    pub fn set_business_opening_hours(
45067        mut self,
45068        business_opening_hours: BusinessOpeningHours,
45069    ) -> Self {
45070        self.business_opening_hours = Some(BoxWrapper(Unbox(business_opening_hours)));
45071        self
45072    }
45073    #[allow(rustdoc::invalid_html_tags)]
45074    #[doc = "Optional. For private chats, the personal channel of the user"]
45075    pub fn set_personal_chat(mut self, personal_chat: Chat) -> Self {
45076        self.personal_chat = Some(BoxWrapper(Unbox(personal_chat)));
45077        self
45078    }
45079    #[allow(rustdoc::invalid_html_tags)]
45080    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
45081    pub fn set_parent_chat(mut self, parent_chat: Chat) -> Self {
45082        self.parent_chat = Some(BoxWrapper(Unbox(parent_chat)));
45083        self
45084    }
45085    #[allow(rustdoc::invalid_html_tags)]
45086    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
45087    pub fn set_available_reactions(mut self, available_reactions: Vec<ReactionType>) -> Self {
45088        self.available_reactions = Some(available_reactions);
45089        self
45090    }
45091    #[allow(rustdoc::invalid_html_tags)]
45092    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
45093    pub fn set_background_custom_emoji_id(mut self, background_custom_emoji_id: String) -> Self {
45094        self.background_custom_emoji_id = Some(background_custom_emoji_id);
45095        self
45096    }
45097    #[allow(rustdoc::invalid_html_tags)]
45098    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
45099    pub fn set_profile_accent_color_id(mut self, profile_accent_color_id: i64) -> Self {
45100        self.profile_accent_color_id = Some(profile_accent_color_id);
45101        self
45102    }
45103    #[allow(rustdoc::invalid_html_tags)]
45104    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
45105    pub fn set_profile_background_custom_emoji_id(
45106        mut self,
45107        profile_background_custom_emoji_id: String,
45108    ) -> Self {
45109        self.profile_background_custom_emoji_id = Some(profile_background_custom_emoji_id);
45110        self
45111    }
45112    #[allow(rustdoc::invalid_html_tags)]
45113    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
45114    pub fn set_emoji_status_custom_emoji_id(
45115        mut self,
45116        emoji_status_custom_emoji_id: String,
45117    ) -> Self {
45118        self.emoji_status_custom_emoji_id = Some(emoji_status_custom_emoji_id);
45119        self
45120    }
45121    #[allow(rustdoc::invalid_html_tags)]
45122    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
45123    pub fn set_emoji_status_expiration_date(mut self, emoji_status_expiration_date: i64) -> Self {
45124        self.emoji_status_expiration_date = Some(emoji_status_expiration_date);
45125        self
45126    }
45127    #[allow(rustdoc::invalid_html_tags)]
45128    #[doc = "Optional. Bio of the other party in a private chat"]
45129    pub fn set_bio(mut self, bio: String) -> Self {
45130        self.bio = Some(bio);
45131        self
45132    }
45133    #[allow(rustdoc::invalid_html_tags)]
45134    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
45135    pub fn set_has_private_forwards(mut self, has_private_forwards: bool) -> Self {
45136        self.has_private_forwards = Some(has_private_forwards);
45137        self
45138    }
45139    #[allow(rustdoc::invalid_html_tags)]
45140    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
45141    pub fn set_has_restricted_voice_and_video_messages(
45142        mut self,
45143        has_restricted_voice_and_video_messages: bool,
45144    ) -> Self {
45145        self.has_restricted_voice_and_video_messages =
45146            Some(has_restricted_voice_and_video_messages);
45147        self
45148    }
45149    #[allow(rustdoc::invalid_html_tags)]
45150    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
45151    pub fn set_join_to_send_messages(mut self, join_to_send_messages: bool) -> Self {
45152        self.join_to_send_messages = Some(join_to_send_messages);
45153        self
45154    }
45155    #[allow(rustdoc::invalid_html_tags)]
45156    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
45157    pub fn set_join_by_request(mut self, join_by_request: bool) -> Self {
45158        self.join_by_request = Some(join_by_request);
45159        self
45160    }
45161    #[allow(rustdoc::invalid_html_tags)]
45162    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
45163    pub fn set_description(mut self, description: String) -> Self {
45164        self.description = Some(description);
45165        self
45166    }
45167    #[allow(rustdoc::invalid_html_tags)]
45168    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
45169    pub fn set_invite_link(mut self, invite_link: String) -> Self {
45170        self.invite_link = Some(invite_link);
45171        self
45172    }
45173    #[allow(rustdoc::invalid_html_tags)]
45174    #[doc = "Optional. The most recent pinned message (by sending date)"]
45175    pub fn set_pinned_message(mut self, pinned_message: Message) -> Self {
45176        self.pinned_message = Some(BoxWrapper(Unbox(pinned_message)));
45177        self
45178    }
45179    #[allow(rustdoc::invalid_html_tags)]
45180    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
45181    pub fn set_permissions(mut self, permissions: ChatPermissions) -> Self {
45182        self.permissions = Some(BoxWrapper(Unbox(permissions)));
45183        self
45184    }
45185    #[allow(rustdoc::invalid_html_tags)]
45186    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
45187    pub fn set_accepted_gift_types(mut self, accepted_gift_types: AcceptedGiftTypes) -> Self {
45188        self.accepted_gift_types = BoxWrapper(Unbox(accepted_gift_types));
45189        self
45190    }
45191    #[allow(rustdoc::invalid_html_tags)]
45192    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
45193    pub fn set_can_send_paid_media(mut self, can_send_paid_media: bool) -> Self {
45194        self.can_send_paid_media = Some(can_send_paid_media);
45195        self
45196    }
45197    #[allow(rustdoc::invalid_html_tags)]
45198    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
45199    pub fn set_slow_mode_delay(mut self, slow_mode_delay: i64) -> Self {
45200        self.slow_mode_delay = Some(slow_mode_delay);
45201        self
45202    }
45203    #[allow(rustdoc::invalid_html_tags)]
45204    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
45205    pub fn set_unrestrict_boost_count(mut self, unrestrict_boost_count: i64) -> Self {
45206        self.unrestrict_boost_count = Some(unrestrict_boost_count);
45207        self
45208    }
45209    #[allow(rustdoc::invalid_html_tags)]
45210    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
45211    pub fn set_message_auto_delete_time(mut self, message_auto_delete_time: i64) -> Self {
45212        self.message_auto_delete_time = Some(message_auto_delete_time);
45213        self
45214    }
45215    #[allow(rustdoc::invalid_html_tags)]
45216    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
45217    pub fn set_has_aggressive_anti_spam_enabled(
45218        mut self,
45219        has_aggressive_anti_spam_enabled: bool,
45220    ) -> Self {
45221        self.has_aggressive_anti_spam_enabled = Some(has_aggressive_anti_spam_enabled);
45222        self
45223    }
45224    #[allow(rustdoc::invalid_html_tags)]
45225    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
45226    pub fn set_has_hidden_members(mut self, has_hidden_members: bool) -> Self {
45227        self.has_hidden_members = Some(has_hidden_members);
45228        self
45229    }
45230    #[allow(rustdoc::invalid_html_tags)]
45231    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
45232    pub fn set_has_protected_content(mut self, has_protected_content: bool) -> Self {
45233        self.has_protected_content = Some(has_protected_content);
45234        self
45235    }
45236    #[allow(rustdoc::invalid_html_tags)]
45237    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
45238    pub fn set_has_visible_history(mut self, has_visible_history: bool) -> Self {
45239        self.has_visible_history = Some(has_visible_history);
45240        self
45241    }
45242    #[allow(rustdoc::invalid_html_tags)]
45243    #[doc = "Optional. For supergroups, name of the group sticker set"]
45244    pub fn set_sticker_set_name(mut self, sticker_set_name: String) -> Self {
45245        self.sticker_set_name = Some(sticker_set_name);
45246        self
45247    }
45248    #[allow(rustdoc::invalid_html_tags)]
45249    #[doc = "Optional. True, if the bot can change the group sticker set"]
45250    pub fn set_can_set_sticker_set(mut self, can_set_sticker_set: bool) -> Self {
45251        self.can_set_sticker_set = Some(can_set_sticker_set);
45252        self
45253    }
45254    #[allow(rustdoc::invalid_html_tags)]
45255    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
45256    pub fn set_custom_emoji_sticker_set_name(
45257        mut self,
45258        custom_emoji_sticker_set_name: String,
45259    ) -> Self {
45260        self.custom_emoji_sticker_set_name = Some(custom_emoji_sticker_set_name);
45261        self
45262    }
45263    #[allow(rustdoc::invalid_html_tags)]
45264    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
45265    pub fn set_linked_chat_id(mut self, linked_chat_id: i64) -> Self {
45266        self.linked_chat_id = Some(linked_chat_id);
45267        self
45268    }
45269    #[allow(rustdoc::invalid_html_tags)]
45270    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
45271    pub fn set_location(mut self, location: ChatLocation) -> Self {
45272        self.location = Some(BoxWrapper(Unbox(location)));
45273        self
45274    }
45275    pub fn build(self) -> ChatFullInfo {
45276        ChatFullInfo {
45277            id: self.id,
45278            tg_type: self.tg_type,
45279            title: self.title,
45280            username: self.username,
45281            first_name: self.first_name,
45282            last_name: self.last_name,
45283            is_forum: self.is_forum,
45284            is_direct_messages: self.is_direct_messages,
45285            accent_color_id: self.accent_color_id,
45286            max_reaction_count: self.max_reaction_count,
45287            photo: self.photo,
45288            active_usernames: self.active_usernames,
45289            birthdate: self.birthdate,
45290            business_intro: self.business_intro,
45291            business_location: self.business_location,
45292            business_opening_hours: self.business_opening_hours,
45293            personal_chat: self.personal_chat,
45294            parent_chat: self.parent_chat,
45295            available_reactions: self.available_reactions,
45296            background_custom_emoji_id: self.background_custom_emoji_id,
45297            profile_accent_color_id: self.profile_accent_color_id,
45298            profile_background_custom_emoji_id: self.profile_background_custom_emoji_id,
45299            emoji_status_custom_emoji_id: self.emoji_status_custom_emoji_id,
45300            emoji_status_expiration_date: self.emoji_status_expiration_date,
45301            bio: self.bio,
45302            has_private_forwards: self.has_private_forwards,
45303            has_restricted_voice_and_video_messages: self.has_restricted_voice_and_video_messages,
45304            join_to_send_messages: self.join_to_send_messages,
45305            join_by_request: self.join_by_request,
45306            description: self.description,
45307            invite_link: self.invite_link,
45308            pinned_message: self.pinned_message,
45309            permissions: self.permissions,
45310            accepted_gift_types: self.accepted_gift_types,
45311            can_send_paid_media: self.can_send_paid_media,
45312            slow_mode_delay: self.slow_mode_delay,
45313            unrestrict_boost_count: self.unrestrict_boost_count,
45314            message_auto_delete_time: self.message_auto_delete_time,
45315            has_aggressive_anti_spam_enabled: self.has_aggressive_anti_spam_enabled,
45316            has_hidden_members: self.has_hidden_members,
45317            has_protected_content: self.has_protected_content,
45318            has_visible_history: self.has_visible_history,
45319            sticker_set_name: self.sticker_set_name,
45320            can_set_sticker_set: self.can_set_sticker_set,
45321            custom_emoji_sticker_set_name: self.custom_emoji_sticker_set_name,
45322            linked_chat_id: self.linked_chat_id,
45323            location: self.location,
45324        }
45325    }
45326}
45327#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45328#[serde(untagged)]
45329pub enum MessageOrigin {
45330    MessageOriginUser(MessageOriginUser),
45331    MessageOriginHiddenUser(MessageOriginHiddenUser),
45332    MessageOriginChat(MessageOriginChat),
45333    MessageOriginChannel(MessageOriginChannel),
45334}
45335impl Default for MessageOrigin {
45336    fn default() -> Self {
45337        MessageOrigin::MessageOriginUser(MessageOriginUser::default())
45338    }
45339}
45340impl MessageOrigin {
45341    #[allow(rustdoc::invalid_html_tags)]
45342    #[doc = "Date the message was sent originally in Unix time"]
45343    #[allow(clippy::needless_lifetimes)]
45344    pub fn get_date<'a>(&'a self) -> i64 {
45345        match self {
45346            Self::MessageOriginUser(ref v) => v.get_date(),
45347            Self::MessageOriginHiddenUser(ref v) => v.get_date(),
45348            Self::MessageOriginChat(ref v) => v.get_date(),
45349            Self::MessageOriginChannel(ref v) => v.get_date(),
45350        }
45351    }
45352}
45353#[allow(rustdoc::invalid_html_tags)]
45354#[doc = "This object represents an answer of a user in a non-anonymous poll."]
45355#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45356pub struct PollAnswer {
45357    #[allow(rustdoc::invalid_html_tags)]
45358    #[doc = "Unique poll identifier"]
45359    #[serde(rename = "poll_id")]
45360    pub poll_id: String,
45361    #[allow(rustdoc::invalid_html_tags)]
45362    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
45363    #[serde(
45364        skip_serializing_if = "Option::is_none",
45365        rename = "voter_chat",
45366        default
45367    )]
45368    pub voter_chat: Option<BoxWrapper<Unbox<Chat>>>,
45369    #[allow(rustdoc::invalid_html_tags)]
45370    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
45371    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
45372    pub user: Option<BoxWrapper<Unbox<User>>>,
45373    #[allow(rustdoc::invalid_html_tags)]
45374    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
45375    #[serde(rename = "option_ids")]
45376    pub option_ids: Vec<i64>,
45377}
45378#[allow(rustdoc::invalid_html_tags)]
45379#[doc = "Companion type to PollAnswer that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
45380#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45381pub struct NoSkipPollAnswer {
45382    #[allow(rustdoc::invalid_html_tags)]
45383    #[doc = "Unique poll identifier"]
45384    #[serde(rename = "poll_id")]
45385    pub poll_id: String,
45386    pub voter_chat: Option<BoxWrapper<Unbox<Chat>>>,
45387    pub user: Option<BoxWrapper<Unbox<User>>>,
45388    #[allow(rustdoc::invalid_html_tags)]
45389    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
45390    #[serde(rename = "option_ids")]
45391    pub option_ids: Vec<i64>,
45392}
45393impl From<NoSkipPollAnswer> for PollAnswer {
45394    fn from(t: NoSkipPollAnswer) -> Self {
45395        Self {
45396            poll_id: t.poll_id,
45397            voter_chat: t.voter_chat,
45398            user: t.user,
45399            option_ids: t.option_ids,
45400        }
45401    }
45402}
45403#[allow(clippy::from_over_into)]
45404impl Into<NoSkipPollAnswer> for PollAnswer {
45405    fn into(self) -> NoSkipPollAnswer {
45406        NoSkipPollAnswer {
45407            poll_id: self.poll_id,
45408            voter_chat: self.voter_chat,
45409            user: self.user,
45410            option_ids: self.option_ids,
45411        }
45412    }
45413}
45414impl NoSkipPollAnswer {
45415    pub fn skip(self) -> PollAnswer {
45416        self.into()
45417    }
45418}
45419impl PollAnswer {
45420    pub fn noskip(self) -> NoSkipPollAnswer {
45421        self.into()
45422    }
45423}
45424#[allow(rustdoc::invalid_html_tags)]
45425#[doc = "This object represents an answer of a user in a non-anonymous poll."]
45426#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45427pub struct PollAnswerBuilder {
45428    #[allow(rustdoc::invalid_html_tags)]
45429    #[doc = "Unique poll identifier"]
45430    #[serde(rename = "poll_id")]
45431    pub poll_id: String,
45432    #[allow(rustdoc::invalid_html_tags)]
45433    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
45434    #[serde(
45435        skip_serializing_if = "Option::is_none",
45436        rename = "voter_chat",
45437        default
45438    )]
45439    pub voter_chat: Option<BoxWrapper<Unbox<Chat>>>,
45440    #[allow(rustdoc::invalid_html_tags)]
45441    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
45442    #[serde(skip_serializing_if = "Option::is_none", rename = "user", default)]
45443    pub user: Option<BoxWrapper<Unbox<User>>>,
45444    #[allow(rustdoc::invalid_html_tags)]
45445    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
45446    #[serde(rename = "option_ids")]
45447    pub option_ids: Vec<i64>,
45448}
45449impl PollAnswerBuilder {
45450    #[allow(clippy::too_many_arguments)]
45451    pub fn new(poll_id: String, option_ids: Vec<i64>) -> Self {
45452        Self {
45453            poll_id,
45454            option_ids,
45455            voter_chat: None,
45456            user: None,
45457        }
45458    }
45459    #[allow(rustdoc::invalid_html_tags)]
45460    #[doc = "Unique poll identifier"]
45461    pub fn set_poll_id(mut self, poll_id: String) -> Self {
45462        self.poll_id = poll_id;
45463        self
45464    }
45465    #[allow(rustdoc::invalid_html_tags)]
45466    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
45467    pub fn set_voter_chat(mut self, voter_chat: Chat) -> Self {
45468        self.voter_chat = Some(BoxWrapper(Unbox(voter_chat)));
45469        self
45470    }
45471    #[allow(rustdoc::invalid_html_tags)]
45472    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
45473    pub fn set_user(mut self, user: User) -> Self {
45474        self.user = Some(BoxWrapper(Unbox(user)));
45475        self
45476    }
45477    #[allow(rustdoc::invalid_html_tags)]
45478    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
45479    pub fn set_option_ids(mut self, option_ids: Vec<i64>) -> Self {
45480        self.option_ids = option_ids;
45481        self
45482    }
45483    pub fn build(self) -> PollAnswer {
45484        PollAnswer {
45485            poll_id: self.poll_id,
45486            voter_chat: self.voter_chat,
45487            user: self.user,
45488            option_ids: self.option_ids,
45489        }
45490    }
45491}
45492#[allow(rustdoc::invalid_html_tags)]
45493#[doc = "Describes the current status of a webhook."]
45494#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45495pub struct WebhookInfo {
45496    #[allow(rustdoc::invalid_html_tags)]
45497    #[doc = "Webhook URL, may be empty if webhook is not set up"]
45498    #[serde(rename = "url")]
45499    pub url: String,
45500    #[allow(rustdoc::invalid_html_tags)]
45501    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
45502    #[serde(rename = "has_custom_certificate")]
45503    pub has_custom_certificate: bool,
45504    #[allow(rustdoc::invalid_html_tags)]
45505    #[doc = "Number of updates awaiting delivery"]
45506    #[serde(rename = "pending_update_count")]
45507    pub pending_update_count: i64,
45508    #[allow(rustdoc::invalid_html_tags)]
45509    #[doc = "Optional. Currently used webhook IP address"]
45510    #[serde(
45511        skip_serializing_if = "Option::is_none",
45512        rename = "ip_address",
45513        default
45514    )]
45515    pub ip_address: Option<String>,
45516    #[allow(rustdoc::invalid_html_tags)]
45517    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
45518    #[serde(
45519        skip_serializing_if = "Option::is_none",
45520        rename = "last_error_date",
45521        default
45522    )]
45523    pub last_error_date: Option<i64>,
45524    #[allow(rustdoc::invalid_html_tags)]
45525    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
45526    #[serde(
45527        skip_serializing_if = "Option::is_none",
45528        rename = "last_error_message",
45529        default
45530    )]
45531    pub last_error_message: Option<String>,
45532    #[allow(rustdoc::invalid_html_tags)]
45533    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
45534    #[serde(
45535        skip_serializing_if = "Option::is_none",
45536        rename = "last_synchronization_error_date",
45537        default
45538    )]
45539    pub last_synchronization_error_date: Option<i64>,
45540    #[allow(rustdoc::invalid_html_tags)]
45541    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
45542    #[serde(
45543        skip_serializing_if = "Option::is_none",
45544        rename = "max_connections",
45545        default
45546    )]
45547    pub max_connections: Option<i64>,
45548    #[allow(rustdoc::invalid_html_tags)]
45549    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
45550    #[serde(
45551        skip_serializing_if = "Option::is_none",
45552        rename = "allowed_updates",
45553        default
45554    )]
45555    pub allowed_updates: Option<Vec<String>>,
45556}
45557#[allow(rustdoc::invalid_html_tags)]
45558#[doc = "Companion type to WebhookInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
45559#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45560pub struct NoSkipWebhookInfo {
45561    #[allow(rustdoc::invalid_html_tags)]
45562    #[doc = "Webhook URL, may be empty if webhook is not set up"]
45563    #[serde(rename = "url")]
45564    pub url: String,
45565    #[allow(rustdoc::invalid_html_tags)]
45566    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
45567    #[serde(rename = "has_custom_certificate")]
45568    pub has_custom_certificate: bool,
45569    #[allow(rustdoc::invalid_html_tags)]
45570    #[doc = "Number of updates awaiting delivery"]
45571    #[serde(rename = "pending_update_count")]
45572    pub pending_update_count: i64,
45573    pub ip_address: Option<String>,
45574    pub last_error_date: Option<i64>,
45575    pub last_error_message: Option<String>,
45576    pub last_synchronization_error_date: Option<i64>,
45577    pub max_connections: Option<i64>,
45578    pub allowed_updates: Option<Vec<String>>,
45579}
45580impl From<NoSkipWebhookInfo> for WebhookInfo {
45581    fn from(t: NoSkipWebhookInfo) -> Self {
45582        Self {
45583            url: t.url,
45584            has_custom_certificate: t.has_custom_certificate,
45585            pending_update_count: t.pending_update_count,
45586            ip_address: t.ip_address,
45587            last_error_date: t.last_error_date,
45588            last_error_message: t.last_error_message,
45589            last_synchronization_error_date: t.last_synchronization_error_date,
45590            max_connections: t.max_connections,
45591            allowed_updates: t.allowed_updates,
45592        }
45593    }
45594}
45595#[allow(clippy::from_over_into)]
45596impl Into<NoSkipWebhookInfo> for WebhookInfo {
45597    fn into(self) -> NoSkipWebhookInfo {
45598        NoSkipWebhookInfo {
45599            url: self.url,
45600            has_custom_certificate: self.has_custom_certificate,
45601            pending_update_count: self.pending_update_count,
45602            ip_address: self.ip_address,
45603            last_error_date: self.last_error_date,
45604            last_error_message: self.last_error_message,
45605            last_synchronization_error_date: self.last_synchronization_error_date,
45606            max_connections: self.max_connections,
45607            allowed_updates: self.allowed_updates,
45608        }
45609    }
45610}
45611impl NoSkipWebhookInfo {
45612    pub fn skip(self) -> WebhookInfo {
45613        self.into()
45614    }
45615}
45616impl WebhookInfo {
45617    pub fn noskip(self) -> NoSkipWebhookInfo {
45618        self.into()
45619    }
45620}
45621#[allow(rustdoc::invalid_html_tags)]
45622#[doc = "Describes the current status of a webhook."]
45623#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45624pub struct WebhookInfoBuilder {
45625    #[allow(rustdoc::invalid_html_tags)]
45626    #[doc = "Webhook URL, may be empty if webhook is not set up"]
45627    #[serde(rename = "url")]
45628    pub url: String,
45629    #[allow(rustdoc::invalid_html_tags)]
45630    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
45631    #[serde(rename = "has_custom_certificate")]
45632    pub has_custom_certificate: bool,
45633    #[allow(rustdoc::invalid_html_tags)]
45634    #[doc = "Number of updates awaiting delivery"]
45635    #[serde(rename = "pending_update_count")]
45636    pub pending_update_count: i64,
45637    #[allow(rustdoc::invalid_html_tags)]
45638    #[doc = "Optional. Currently used webhook IP address"]
45639    #[serde(
45640        skip_serializing_if = "Option::is_none",
45641        rename = "ip_address",
45642        default
45643    )]
45644    pub ip_address: Option<String>,
45645    #[allow(rustdoc::invalid_html_tags)]
45646    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
45647    #[serde(
45648        skip_serializing_if = "Option::is_none",
45649        rename = "last_error_date",
45650        default
45651    )]
45652    pub last_error_date: Option<i64>,
45653    #[allow(rustdoc::invalid_html_tags)]
45654    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
45655    #[serde(
45656        skip_serializing_if = "Option::is_none",
45657        rename = "last_error_message",
45658        default
45659    )]
45660    pub last_error_message: Option<String>,
45661    #[allow(rustdoc::invalid_html_tags)]
45662    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
45663    #[serde(
45664        skip_serializing_if = "Option::is_none",
45665        rename = "last_synchronization_error_date",
45666        default
45667    )]
45668    pub last_synchronization_error_date: Option<i64>,
45669    #[allow(rustdoc::invalid_html_tags)]
45670    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
45671    #[serde(
45672        skip_serializing_if = "Option::is_none",
45673        rename = "max_connections",
45674        default
45675    )]
45676    pub max_connections: Option<i64>,
45677    #[allow(rustdoc::invalid_html_tags)]
45678    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
45679    #[serde(
45680        skip_serializing_if = "Option::is_none",
45681        rename = "allowed_updates",
45682        default
45683    )]
45684    pub allowed_updates: Option<Vec<String>>,
45685}
45686impl WebhookInfoBuilder {
45687    #[allow(clippy::too_many_arguments)]
45688    pub fn new(url: String, has_custom_certificate: bool, pending_update_count: i64) -> Self {
45689        Self {
45690            url,
45691            has_custom_certificate,
45692            pending_update_count,
45693            ip_address: None,
45694            last_error_date: None,
45695            last_error_message: None,
45696            last_synchronization_error_date: None,
45697            max_connections: None,
45698            allowed_updates: None,
45699        }
45700    }
45701    #[allow(rustdoc::invalid_html_tags)]
45702    #[doc = "Webhook URL, may be empty if webhook is not set up"]
45703    pub fn set_url(mut self, url: String) -> Self {
45704        self.url = url;
45705        self
45706    }
45707    #[allow(rustdoc::invalid_html_tags)]
45708    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
45709    pub fn set_has_custom_certificate(mut self, has_custom_certificate: bool) -> Self {
45710        self.has_custom_certificate = has_custom_certificate;
45711        self
45712    }
45713    #[allow(rustdoc::invalid_html_tags)]
45714    #[doc = "Number of updates awaiting delivery"]
45715    pub fn set_pending_update_count(mut self, pending_update_count: i64) -> Self {
45716        self.pending_update_count = pending_update_count;
45717        self
45718    }
45719    #[allow(rustdoc::invalid_html_tags)]
45720    #[doc = "Optional. Currently used webhook IP address"]
45721    pub fn set_ip_address(mut self, ip_address: String) -> Self {
45722        self.ip_address = Some(ip_address);
45723        self
45724    }
45725    #[allow(rustdoc::invalid_html_tags)]
45726    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
45727    pub fn set_last_error_date(mut self, last_error_date: i64) -> Self {
45728        self.last_error_date = Some(last_error_date);
45729        self
45730    }
45731    #[allow(rustdoc::invalid_html_tags)]
45732    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
45733    pub fn set_last_error_message(mut self, last_error_message: String) -> Self {
45734        self.last_error_message = Some(last_error_message);
45735        self
45736    }
45737    #[allow(rustdoc::invalid_html_tags)]
45738    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
45739    pub fn set_last_synchronization_error_date(
45740        mut self,
45741        last_synchronization_error_date: i64,
45742    ) -> Self {
45743        self.last_synchronization_error_date = Some(last_synchronization_error_date);
45744        self
45745    }
45746    #[allow(rustdoc::invalid_html_tags)]
45747    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
45748    pub fn set_max_connections(mut self, max_connections: i64) -> Self {
45749        self.max_connections = Some(max_connections);
45750        self
45751    }
45752    #[allow(rustdoc::invalid_html_tags)]
45753    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
45754    pub fn set_allowed_updates(mut self, allowed_updates: Vec<String>) -> Self {
45755        self.allowed_updates = Some(allowed_updates);
45756        self
45757    }
45758    pub fn build(self) -> WebhookInfo {
45759        WebhookInfo {
45760            url: self.url,
45761            has_custom_certificate: self.has_custom_certificate,
45762            pending_update_count: self.pending_update_count,
45763            ip_address: self.ip_address,
45764            last_error_date: self.last_error_date,
45765            last_error_message: self.last_error_message,
45766            last_synchronization_error_date: self.last_synchronization_error_date,
45767            max_connections: self.max_connections,
45768            allowed_updates: self.allowed_updates,
45769        }
45770    }
45771}
45772#[allow(rustdoc::invalid_html_tags)]
45773#[doc = "This object is received when messages are deleted from a connected business account."]
45774#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45775pub struct BusinessMessagesDeleted {
45776    #[allow(rustdoc::invalid_html_tags)]
45777    #[doc = "Unique identifier of the business connection"]
45778    #[serde(rename = "business_connection_id")]
45779    pub business_connection_id: String,
45780    #[allow(rustdoc::invalid_html_tags)]
45781    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
45782    #[serde(rename = "chat")]
45783    pub chat: BoxWrapper<Unbox<Chat>>,
45784    #[allow(rustdoc::invalid_html_tags)]
45785    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
45786    #[serde(rename = "message_ids")]
45787    pub message_ids: Vec<i64>,
45788}
45789#[allow(rustdoc::invalid_html_tags)]
45790#[doc = "Companion type to BusinessMessagesDeleted that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
45791#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45792pub struct NoSkipBusinessMessagesDeleted {
45793    #[allow(rustdoc::invalid_html_tags)]
45794    #[doc = "Unique identifier of the business connection"]
45795    #[serde(rename = "business_connection_id")]
45796    pub business_connection_id: String,
45797    #[allow(rustdoc::invalid_html_tags)]
45798    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
45799    #[serde(rename = "chat")]
45800    pub chat: BoxWrapper<Unbox<Chat>>,
45801    #[allow(rustdoc::invalid_html_tags)]
45802    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
45803    #[serde(rename = "message_ids")]
45804    pub message_ids: Vec<i64>,
45805}
45806impl From<NoSkipBusinessMessagesDeleted> for BusinessMessagesDeleted {
45807    fn from(t: NoSkipBusinessMessagesDeleted) -> Self {
45808        Self {
45809            business_connection_id: t.business_connection_id,
45810            chat: t.chat,
45811            message_ids: t.message_ids,
45812        }
45813    }
45814}
45815#[allow(clippy::from_over_into)]
45816impl Into<NoSkipBusinessMessagesDeleted> for BusinessMessagesDeleted {
45817    fn into(self) -> NoSkipBusinessMessagesDeleted {
45818        NoSkipBusinessMessagesDeleted {
45819            business_connection_id: self.business_connection_id,
45820            chat: self.chat,
45821            message_ids: self.message_ids,
45822        }
45823    }
45824}
45825impl NoSkipBusinessMessagesDeleted {
45826    pub fn skip(self) -> BusinessMessagesDeleted {
45827        self.into()
45828    }
45829}
45830impl BusinessMessagesDeleted {
45831    pub fn noskip(self) -> NoSkipBusinessMessagesDeleted {
45832        self.into()
45833    }
45834}
45835#[allow(rustdoc::invalid_html_tags)]
45836#[doc = "This object is received when messages are deleted from a connected business account."]
45837#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45838pub struct BusinessMessagesDeletedBuilder {
45839    #[allow(rustdoc::invalid_html_tags)]
45840    #[doc = "Unique identifier of the business connection"]
45841    #[serde(rename = "business_connection_id")]
45842    pub business_connection_id: String,
45843    #[allow(rustdoc::invalid_html_tags)]
45844    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
45845    #[serde(rename = "chat")]
45846    pub chat: BoxWrapper<Unbox<Chat>>,
45847    #[allow(rustdoc::invalid_html_tags)]
45848    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
45849    #[serde(rename = "message_ids")]
45850    pub message_ids: Vec<i64>,
45851}
45852impl BusinessMessagesDeletedBuilder {
45853    #[allow(clippy::too_many_arguments)]
45854    pub fn new<A: Into<Chat>>(
45855        business_connection_id: String,
45856        chat: A,
45857        message_ids: Vec<i64>,
45858    ) -> Self {
45859        Self {
45860            business_connection_id,
45861            chat: BoxWrapper::new_unbox(chat.into()),
45862            message_ids,
45863        }
45864    }
45865    #[allow(rustdoc::invalid_html_tags)]
45866    #[doc = "Unique identifier of the business connection"]
45867    pub fn set_business_connection_id(mut self, business_connection_id: String) -> Self {
45868        self.business_connection_id = business_connection_id;
45869        self
45870    }
45871    #[allow(rustdoc::invalid_html_tags)]
45872    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
45873    pub fn set_chat(mut self, chat: Chat) -> Self {
45874        self.chat = BoxWrapper(Unbox(chat));
45875        self
45876    }
45877    #[allow(rustdoc::invalid_html_tags)]
45878    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
45879    pub fn set_message_ids(mut self, message_ids: Vec<i64>) -> Self {
45880        self.message_ids = message_ids;
45881        self
45882    }
45883    pub fn build(self) -> BusinessMessagesDeleted {
45884        BusinessMessagesDeleted {
45885            business_connection_id: self.business_connection_id,
45886            chat: self.chat,
45887            message_ids: self.message_ids,
45888        }
45889    }
45890}
45891#[allow(rustdoc::invalid_html_tags)]
45892#[doc = "Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user."]
45893#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45894pub struct BotCommandScopeDefault {
45895    #[allow(rustdoc::invalid_html_tags)]
45896    #[doc = "Scope type, must be default"]
45897    #[serde(rename = "type")]
45898    pub tg_type: String,
45899}
45900#[allow(rustdoc::invalid_html_tags)]
45901#[doc = "Companion type to BotCommandScopeDefault that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
45902#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45903pub struct NoSkipBotCommandScopeDefault {
45904    #[allow(rustdoc::invalid_html_tags)]
45905    #[doc = "Scope type, must be default"]
45906    #[serde(rename = "type")]
45907    pub tg_type: String,
45908}
45909impl From<NoSkipBotCommandScopeDefault> for BotCommandScopeDefault {
45910    fn from(t: NoSkipBotCommandScopeDefault) -> Self {
45911        Self { tg_type: t.tg_type }
45912    }
45913}
45914#[allow(clippy::from_over_into)]
45915impl Into<NoSkipBotCommandScopeDefault> for BotCommandScopeDefault {
45916    fn into(self) -> NoSkipBotCommandScopeDefault {
45917        NoSkipBotCommandScopeDefault {
45918            tg_type: self.tg_type,
45919        }
45920    }
45921}
45922impl NoSkipBotCommandScopeDefault {
45923    pub fn skip(self) -> BotCommandScopeDefault {
45924        self.into()
45925    }
45926}
45927impl BotCommandScopeDefault {
45928    pub fn noskip(self) -> NoSkipBotCommandScopeDefault {
45929        self.into()
45930    }
45931}
45932#[allow(rustdoc::invalid_html_tags)]
45933#[doc = "Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user."]
45934#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45935pub struct BotCommandScopeDefaultBuilder {
45936    #[allow(rustdoc::invalid_html_tags)]
45937    #[doc = "Scope type, must be default"]
45938    #[serde(rename = "type")]
45939    pub tg_type: String,
45940}
45941impl BotCommandScopeDefaultBuilder {
45942    #[allow(clippy::too_many_arguments)]
45943    pub fn new() -> Self {
45944        Self {
45945            tg_type: "default".to_owned(),
45946        }
45947    }
45948    #[allow(rustdoc::invalid_html_tags)]
45949    #[doc = "Scope type, must be default"]
45950    pub fn set_type(mut self, tg_type: String) -> Self {
45951        self.tg_type = tg_type;
45952        self
45953    }
45954    pub fn build(self) -> BotCommandScopeDefault {
45955        BotCommandScopeDefault {
45956            tg_type: self.tg_type,
45957        }
45958    }
45959}
45960#[allow(rustdoc::invalid_html_tags)]
45961#[doc = "Represents an invite link for a chat."]
45962#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
45963pub struct ChatInviteLink {
45964    #[allow(rustdoc::invalid_html_tags)]
45965    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
45966    #[serde(rename = "invite_link")]
45967    pub invite_link: String,
45968    #[allow(rustdoc::invalid_html_tags)]
45969    #[doc = "Creator of the link"]
45970    #[serde(rename = "creator")]
45971    pub creator: BoxWrapper<Unbox<User>>,
45972    #[allow(rustdoc::invalid_html_tags)]
45973    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
45974    #[serde(rename = "creates_join_request")]
45975    pub creates_join_request: bool,
45976    #[allow(rustdoc::invalid_html_tags)]
45977    #[doc = "True, if the link is primary"]
45978    #[serde(rename = "is_primary")]
45979    pub is_primary: bool,
45980    #[allow(rustdoc::invalid_html_tags)]
45981    #[doc = "True, if the link is revoked"]
45982    #[serde(rename = "is_revoked")]
45983    pub is_revoked: bool,
45984    #[allow(rustdoc::invalid_html_tags)]
45985    #[doc = "Optional. Invite link name"]
45986    #[serde(skip_serializing_if = "Option::is_none", rename = "name", default)]
45987    pub name: Option<String>,
45988    #[allow(rustdoc::invalid_html_tags)]
45989    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
45990    #[serde(
45991        skip_serializing_if = "Option::is_none",
45992        rename = "expire_date",
45993        default
45994    )]
45995    pub expire_date: Option<i64>,
45996    #[allow(rustdoc::invalid_html_tags)]
45997    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
45998    #[serde(
45999        skip_serializing_if = "Option::is_none",
46000        rename = "member_limit",
46001        default
46002    )]
46003    pub member_limit: Option<i64>,
46004    #[allow(rustdoc::invalid_html_tags)]
46005    #[doc = "Optional. Number of pending join requests created using this link"]
46006    #[serde(
46007        skip_serializing_if = "Option::is_none",
46008        rename = "pending_join_request_count",
46009        default
46010    )]
46011    pub pending_join_request_count: Option<i64>,
46012    #[allow(rustdoc::invalid_html_tags)]
46013    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
46014    #[serde(
46015        skip_serializing_if = "Option::is_none",
46016        rename = "subscription_period",
46017        default
46018    )]
46019    pub subscription_period: Option<i64>,
46020    #[allow(rustdoc::invalid_html_tags)]
46021    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
46022    #[serde(
46023        skip_serializing_if = "Option::is_none",
46024        rename = "subscription_price",
46025        default
46026    )]
46027    pub subscription_price: Option<i64>,
46028}
46029#[allow(rustdoc::invalid_html_tags)]
46030#[doc = "Companion type to ChatInviteLink that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
46031#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46032pub struct NoSkipChatInviteLink {
46033    #[allow(rustdoc::invalid_html_tags)]
46034    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
46035    #[serde(rename = "invite_link")]
46036    pub invite_link: String,
46037    #[allow(rustdoc::invalid_html_tags)]
46038    #[doc = "Creator of the link"]
46039    #[serde(rename = "creator")]
46040    pub creator: BoxWrapper<Unbox<User>>,
46041    #[allow(rustdoc::invalid_html_tags)]
46042    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
46043    #[serde(rename = "creates_join_request")]
46044    pub creates_join_request: bool,
46045    #[allow(rustdoc::invalid_html_tags)]
46046    #[doc = "True, if the link is primary"]
46047    #[serde(rename = "is_primary")]
46048    pub is_primary: bool,
46049    #[allow(rustdoc::invalid_html_tags)]
46050    #[doc = "True, if the link is revoked"]
46051    #[serde(rename = "is_revoked")]
46052    pub is_revoked: bool,
46053    pub name: Option<String>,
46054    pub expire_date: Option<i64>,
46055    pub member_limit: Option<i64>,
46056    pub pending_join_request_count: Option<i64>,
46057    pub subscription_period: Option<i64>,
46058    pub subscription_price: Option<i64>,
46059}
46060impl From<NoSkipChatInviteLink> for ChatInviteLink {
46061    fn from(t: NoSkipChatInviteLink) -> Self {
46062        Self {
46063            invite_link: t.invite_link,
46064            creator: t.creator,
46065            creates_join_request: t.creates_join_request,
46066            is_primary: t.is_primary,
46067            is_revoked: t.is_revoked,
46068            name: t.name,
46069            expire_date: t.expire_date,
46070            member_limit: t.member_limit,
46071            pending_join_request_count: t.pending_join_request_count,
46072            subscription_period: t.subscription_period,
46073            subscription_price: t.subscription_price,
46074        }
46075    }
46076}
46077#[allow(clippy::from_over_into)]
46078impl Into<NoSkipChatInviteLink> for ChatInviteLink {
46079    fn into(self) -> NoSkipChatInviteLink {
46080        NoSkipChatInviteLink {
46081            invite_link: self.invite_link,
46082            creator: self.creator,
46083            creates_join_request: self.creates_join_request,
46084            is_primary: self.is_primary,
46085            is_revoked: self.is_revoked,
46086            name: self.name,
46087            expire_date: self.expire_date,
46088            member_limit: self.member_limit,
46089            pending_join_request_count: self.pending_join_request_count,
46090            subscription_period: self.subscription_period,
46091            subscription_price: self.subscription_price,
46092        }
46093    }
46094}
46095impl NoSkipChatInviteLink {
46096    pub fn skip(self) -> ChatInviteLink {
46097        self.into()
46098    }
46099}
46100impl ChatInviteLink {
46101    pub fn noskip(self) -> NoSkipChatInviteLink {
46102        self.into()
46103    }
46104}
46105#[allow(rustdoc::invalid_html_tags)]
46106#[doc = "Represents an invite link for a chat."]
46107#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46108pub struct ChatInviteLinkBuilder {
46109    #[allow(rustdoc::invalid_html_tags)]
46110    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
46111    #[serde(rename = "invite_link")]
46112    pub invite_link: String,
46113    #[allow(rustdoc::invalid_html_tags)]
46114    #[doc = "Creator of the link"]
46115    #[serde(rename = "creator")]
46116    pub creator: BoxWrapper<Unbox<User>>,
46117    #[allow(rustdoc::invalid_html_tags)]
46118    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
46119    #[serde(rename = "creates_join_request")]
46120    pub creates_join_request: bool,
46121    #[allow(rustdoc::invalid_html_tags)]
46122    #[doc = "True, if the link is primary"]
46123    #[serde(rename = "is_primary")]
46124    pub is_primary: bool,
46125    #[allow(rustdoc::invalid_html_tags)]
46126    #[doc = "True, if the link is revoked"]
46127    #[serde(rename = "is_revoked")]
46128    pub is_revoked: bool,
46129    #[allow(rustdoc::invalid_html_tags)]
46130    #[doc = "Optional. Invite link name"]
46131    #[serde(skip_serializing_if = "Option::is_none", rename = "name", default)]
46132    pub name: Option<String>,
46133    #[allow(rustdoc::invalid_html_tags)]
46134    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
46135    #[serde(
46136        skip_serializing_if = "Option::is_none",
46137        rename = "expire_date",
46138        default
46139    )]
46140    pub expire_date: Option<i64>,
46141    #[allow(rustdoc::invalid_html_tags)]
46142    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
46143    #[serde(
46144        skip_serializing_if = "Option::is_none",
46145        rename = "member_limit",
46146        default
46147    )]
46148    pub member_limit: Option<i64>,
46149    #[allow(rustdoc::invalid_html_tags)]
46150    #[doc = "Optional. Number of pending join requests created using this link"]
46151    #[serde(
46152        skip_serializing_if = "Option::is_none",
46153        rename = "pending_join_request_count",
46154        default
46155    )]
46156    pub pending_join_request_count: Option<i64>,
46157    #[allow(rustdoc::invalid_html_tags)]
46158    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
46159    #[serde(
46160        skip_serializing_if = "Option::is_none",
46161        rename = "subscription_period",
46162        default
46163    )]
46164    pub subscription_period: Option<i64>,
46165    #[allow(rustdoc::invalid_html_tags)]
46166    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
46167    #[serde(
46168        skip_serializing_if = "Option::is_none",
46169        rename = "subscription_price",
46170        default
46171    )]
46172    pub subscription_price: Option<i64>,
46173}
46174impl ChatInviteLinkBuilder {
46175    #[allow(clippy::too_many_arguments)]
46176    pub fn new<A: Into<User>>(
46177        invite_link: String,
46178        creator: A,
46179        creates_join_request: bool,
46180        is_primary: bool,
46181        is_revoked: bool,
46182    ) -> Self {
46183        Self {
46184            invite_link,
46185            creator: BoxWrapper::new_unbox(creator.into()),
46186            creates_join_request,
46187            is_primary,
46188            is_revoked,
46189            name: None,
46190            expire_date: None,
46191            member_limit: None,
46192            pending_join_request_count: None,
46193            subscription_period: None,
46194            subscription_price: None,
46195        }
46196    }
46197    #[allow(rustdoc::invalid_html_tags)]
46198    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
46199    pub fn set_invite_link(mut self, invite_link: String) -> Self {
46200        self.invite_link = invite_link;
46201        self
46202    }
46203    #[allow(rustdoc::invalid_html_tags)]
46204    #[doc = "Creator of the link"]
46205    pub fn set_creator(mut self, creator: User) -> Self {
46206        self.creator = BoxWrapper(Unbox(creator));
46207        self
46208    }
46209    #[allow(rustdoc::invalid_html_tags)]
46210    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
46211    pub fn set_creates_join_request(mut self, creates_join_request: bool) -> Self {
46212        self.creates_join_request = creates_join_request;
46213        self
46214    }
46215    #[allow(rustdoc::invalid_html_tags)]
46216    #[doc = "True, if the link is primary"]
46217    pub fn set_is_primary(mut self, is_primary: bool) -> Self {
46218        self.is_primary = is_primary;
46219        self
46220    }
46221    #[allow(rustdoc::invalid_html_tags)]
46222    #[doc = "True, if the link is revoked"]
46223    pub fn set_is_revoked(mut self, is_revoked: bool) -> Self {
46224        self.is_revoked = is_revoked;
46225        self
46226    }
46227    #[allow(rustdoc::invalid_html_tags)]
46228    #[doc = "Optional. Invite link name"]
46229    pub fn set_name(mut self, name: String) -> Self {
46230        self.name = Some(name);
46231        self
46232    }
46233    #[allow(rustdoc::invalid_html_tags)]
46234    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
46235    pub fn set_expire_date(mut self, expire_date: i64) -> Self {
46236        self.expire_date = Some(expire_date);
46237        self
46238    }
46239    #[allow(rustdoc::invalid_html_tags)]
46240    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
46241    pub fn set_member_limit(mut self, member_limit: i64) -> Self {
46242        self.member_limit = Some(member_limit);
46243        self
46244    }
46245    #[allow(rustdoc::invalid_html_tags)]
46246    #[doc = "Optional. Number of pending join requests created using this link"]
46247    pub fn set_pending_join_request_count(mut self, pending_join_request_count: i64) -> Self {
46248        self.pending_join_request_count = Some(pending_join_request_count);
46249        self
46250    }
46251    #[allow(rustdoc::invalid_html_tags)]
46252    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
46253    pub fn set_subscription_period(mut self, subscription_period: i64) -> Self {
46254        self.subscription_period = Some(subscription_period);
46255        self
46256    }
46257    #[allow(rustdoc::invalid_html_tags)]
46258    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
46259    pub fn set_subscription_price(mut self, subscription_price: i64) -> Self {
46260        self.subscription_price = Some(subscription_price);
46261        self
46262    }
46263    pub fn build(self) -> ChatInviteLink {
46264        ChatInviteLink {
46265            invite_link: self.invite_link,
46266            creator: self.creator,
46267            creates_join_request: self.creates_join_request,
46268            is_primary: self.is_primary,
46269            is_revoked: self.is_revoked,
46270            name: self.name,
46271            expire_date: self.expire_date,
46272            member_limit: self.member_limit,
46273            pending_join_request_count: self.pending_join_request_count,
46274            subscription_period: self.subscription_period,
46275            subscription_price: self.subscription_price,
46276        }
46277    }
46278}
46279#[allow(rustdoc::invalid_html_tags)]
46280#[doc = "Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message."]
46281#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46282pub struct InlineQueryResultCachedVoice {
46283    #[allow(rustdoc::invalid_html_tags)]
46284    #[doc = "Type of the result, must be voice"]
46285    #[serde(rename = "type")]
46286    pub tg_type: String,
46287    #[allow(rustdoc::invalid_html_tags)]
46288    #[doc = "Unique identifier for this result, 1-64 bytes"]
46289    #[serde(rename = "id")]
46290    pub id: String,
46291    #[allow(rustdoc::invalid_html_tags)]
46292    #[doc = "A valid file identifier for the voice message"]
46293    #[serde(rename = "voice_file_id")]
46294    pub voice_file_id: String,
46295    #[allow(rustdoc::invalid_html_tags)]
46296    #[doc = "Voice message title"]
46297    #[serde(rename = "title")]
46298    pub title: String,
46299    #[allow(rustdoc::invalid_html_tags)]
46300    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
46301    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
46302    pub caption: Option<String>,
46303    #[allow(rustdoc::invalid_html_tags)]
46304    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
46305    #[serde(
46306        skip_serializing_if = "Option::is_none",
46307        rename = "parse_mode",
46308        default
46309    )]
46310    pub parse_mode: Option<String>,
46311    #[allow(rustdoc::invalid_html_tags)]
46312    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
46313    #[serde(
46314        skip_serializing_if = "Option::is_none",
46315        rename = "caption_entities",
46316        default
46317    )]
46318    pub caption_entities: Option<Vec<MessageEntity>>,
46319    #[allow(rustdoc::invalid_html_tags)]
46320    #[doc = "Optional. Inline keyboard attached to the message"]
46321    #[serde(
46322        skip_serializing_if = "Option::is_none",
46323        rename = "reply_markup",
46324        default
46325    )]
46326    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
46327    #[allow(rustdoc::invalid_html_tags)]
46328    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
46329    #[serde(
46330        skip_serializing_if = "Option::is_none",
46331        rename = "input_message_content",
46332        default
46333    )]
46334    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
46335}
46336#[allow(rustdoc::invalid_html_tags)]
46337#[doc = "Companion type to InlineQueryResultCachedVoice that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
46338#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46339pub struct NoSkipInlineQueryResultCachedVoice {
46340    #[allow(rustdoc::invalid_html_tags)]
46341    #[doc = "Type of the result, must be voice"]
46342    #[serde(rename = "type")]
46343    pub tg_type: String,
46344    #[allow(rustdoc::invalid_html_tags)]
46345    #[doc = "Unique identifier for this result, 1-64 bytes"]
46346    #[serde(rename = "id")]
46347    pub id: String,
46348    #[allow(rustdoc::invalid_html_tags)]
46349    #[doc = "A valid file identifier for the voice message"]
46350    #[serde(rename = "voice_file_id")]
46351    pub voice_file_id: String,
46352    #[allow(rustdoc::invalid_html_tags)]
46353    #[doc = "Voice message title"]
46354    #[serde(rename = "title")]
46355    pub title: String,
46356    pub caption: Option<String>,
46357    pub parse_mode: Option<String>,
46358    pub caption_entities: Option<Vec<MessageEntity>>,
46359    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
46360    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
46361}
46362impl From<NoSkipInlineQueryResultCachedVoice> for InlineQueryResultCachedVoice {
46363    fn from(t: NoSkipInlineQueryResultCachedVoice) -> Self {
46364        Self {
46365            tg_type: t.tg_type,
46366            id: t.id,
46367            voice_file_id: t.voice_file_id,
46368            title: t.title,
46369            caption: t.caption,
46370            parse_mode: t.parse_mode,
46371            caption_entities: t.caption_entities,
46372            reply_markup: t.reply_markup,
46373            input_message_content: t.input_message_content,
46374        }
46375    }
46376}
46377#[allow(clippy::from_over_into)]
46378impl Into<NoSkipInlineQueryResultCachedVoice> for InlineQueryResultCachedVoice {
46379    fn into(self) -> NoSkipInlineQueryResultCachedVoice {
46380        NoSkipInlineQueryResultCachedVoice {
46381            tg_type: self.tg_type,
46382            id: self.id,
46383            voice_file_id: self.voice_file_id,
46384            title: self.title,
46385            caption: self.caption,
46386            parse_mode: self.parse_mode,
46387            caption_entities: self.caption_entities,
46388            reply_markup: self.reply_markup,
46389            input_message_content: self.input_message_content,
46390        }
46391    }
46392}
46393impl NoSkipInlineQueryResultCachedVoice {
46394    pub fn skip(self) -> InlineQueryResultCachedVoice {
46395        self.into()
46396    }
46397}
46398impl InlineQueryResultCachedVoice {
46399    pub fn noskip(self) -> NoSkipInlineQueryResultCachedVoice {
46400        self.into()
46401    }
46402}
46403#[allow(rustdoc::invalid_html_tags)]
46404#[doc = "Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message."]
46405#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46406pub struct InlineQueryResultCachedVoiceBuilder {
46407    #[allow(rustdoc::invalid_html_tags)]
46408    #[doc = "Type of the result, must be voice"]
46409    #[serde(rename = "type")]
46410    pub tg_type: String,
46411    #[allow(rustdoc::invalid_html_tags)]
46412    #[doc = "Unique identifier for this result, 1-64 bytes"]
46413    #[serde(rename = "id")]
46414    pub id: String,
46415    #[allow(rustdoc::invalid_html_tags)]
46416    #[doc = "A valid file identifier for the voice message"]
46417    #[serde(rename = "voice_file_id")]
46418    pub voice_file_id: String,
46419    #[allow(rustdoc::invalid_html_tags)]
46420    #[doc = "Voice message title"]
46421    #[serde(rename = "title")]
46422    pub title: String,
46423    #[allow(rustdoc::invalid_html_tags)]
46424    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
46425    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
46426    pub caption: Option<String>,
46427    #[allow(rustdoc::invalid_html_tags)]
46428    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
46429    #[serde(
46430        skip_serializing_if = "Option::is_none",
46431        rename = "parse_mode",
46432        default
46433    )]
46434    pub parse_mode: Option<String>,
46435    #[allow(rustdoc::invalid_html_tags)]
46436    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
46437    #[serde(
46438        skip_serializing_if = "Option::is_none",
46439        rename = "caption_entities",
46440        default
46441    )]
46442    pub caption_entities: Option<Vec<MessageEntity>>,
46443    #[allow(rustdoc::invalid_html_tags)]
46444    #[doc = "Optional. Inline keyboard attached to the message"]
46445    #[serde(
46446        skip_serializing_if = "Option::is_none",
46447        rename = "reply_markup",
46448        default
46449    )]
46450    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
46451    #[allow(rustdoc::invalid_html_tags)]
46452    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
46453    #[serde(
46454        skip_serializing_if = "Option::is_none",
46455        rename = "input_message_content",
46456        default
46457    )]
46458    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
46459}
46460impl InlineQueryResultCachedVoiceBuilder {
46461    #[allow(clippy::too_many_arguments)]
46462    pub fn new(id: String, voice_file_id: String, title: String) -> Self {
46463        Self {
46464            tg_type: "voice".to_owned(),
46465            id,
46466            voice_file_id,
46467            title,
46468            caption: None,
46469            parse_mode: None,
46470            caption_entities: None,
46471            reply_markup: None,
46472            input_message_content: None,
46473        }
46474    }
46475    #[allow(rustdoc::invalid_html_tags)]
46476    #[doc = "Type of the result, must be voice"]
46477    pub fn set_type(mut self, tg_type: String) -> Self {
46478        self.tg_type = tg_type;
46479        self
46480    }
46481    #[allow(rustdoc::invalid_html_tags)]
46482    #[doc = "Unique identifier for this result, 1-64 bytes"]
46483    pub fn set_id(mut self, id: String) -> Self {
46484        self.id = id;
46485        self
46486    }
46487    #[allow(rustdoc::invalid_html_tags)]
46488    #[doc = "A valid file identifier for the voice message"]
46489    pub fn set_voice_file_id(mut self, voice_file_id: String) -> Self {
46490        self.voice_file_id = voice_file_id;
46491        self
46492    }
46493    #[allow(rustdoc::invalid_html_tags)]
46494    #[doc = "Voice message title"]
46495    pub fn set_title(mut self, title: String) -> Self {
46496        self.title = title;
46497        self
46498    }
46499    #[allow(rustdoc::invalid_html_tags)]
46500    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
46501    pub fn set_caption(mut self, caption: String) -> Self {
46502        self.caption = Some(caption);
46503        self
46504    }
46505    #[allow(rustdoc::invalid_html_tags)]
46506    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
46507    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
46508        self.parse_mode = Some(parse_mode);
46509        self
46510    }
46511    #[allow(rustdoc::invalid_html_tags)]
46512    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
46513    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
46514        self.caption_entities = Some(caption_entities);
46515        self
46516    }
46517    #[allow(rustdoc::invalid_html_tags)]
46518    #[doc = "Optional. Inline keyboard attached to the message"]
46519    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
46520        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
46521        self
46522    }
46523    #[allow(rustdoc::invalid_html_tags)]
46524    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
46525    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
46526        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
46527        self
46528    }
46529    pub fn build(self) -> InlineQueryResultCachedVoice {
46530        InlineQueryResultCachedVoice {
46531            tg_type: self.tg_type,
46532            id: self.id,
46533            voice_file_id: self.voice_file_id,
46534            title: self.title,
46535            caption: self.caption,
46536            parse_mode: self.parse_mode,
46537            caption_entities: self.caption_entities,
46538            reply_markup: self.reply_markup,
46539            input_message_content: self.input_message_content,
46540        }
46541    }
46542}
46543#[allow(rustdoc::invalid_html_tags)]
46544#[doc = "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change."]
46545#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46546pub struct PassportElementErrorTranslationFiles {
46547    #[allow(rustdoc::invalid_html_tags)]
46548    #[doc = "Error source, must be translation_files"]
46549    #[serde(rename = "source")]
46550    pub source: String,
46551    #[allow(rustdoc::invalid_html_tags)]
46552    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
46553    #[serde(rename = "type")]
46554    pub tg_type: String,
46555    #[allow(rustdoc::invalid_html_tags)]
46556    #[doc = "List of base64-encoded file hashes"]
46557    #[serde(rename = "file_hashes")]
46558    pub file_hashes: Vec<String>,
46559    #[allow(rustdoc::invalid_html_tags)]
46560    #[doc = "Error message"]
46561    #[serde(rename = "message")]
46562    pub message: String,
46563}
46564#[allow(rustdoc::invalid_html_tags)]
46565#[doc = "Companion type to PassportElementErrorTranslationFiles that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
46566#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46567pub struct NoSkipPassportElementErrorTranslationFiles {
46568    #[allow(rustdoc::invalid_html_tags)]
46569    #[doc = "Error source, must be translation_files"]
46570    #[serde(rename = "source")]
46571    pub source: String,
46572    #[allow(rustdoc::invalid_html_tags)]
46573    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
46574    #[serde(rename = "type")]
46575    pub tg_type: String,
46576    #[allow(rustdoc::invalid_html_tags)]
46577    #[doc = "List of base64-encoded file hashes"]
46578    #[serde(rename = "file_hashes")]
46579    pub file_hashes: Vec<String>,
46580    #[allow(rustdoc::invalid_html_tags)]
46581    #[doc = "Error message"]
46582    #[serde(rename = "message")]
46583    pub message: String,
46584}
46585impl From<NoSkipPassportElementErrorTranslationFiles> for PassportElementErrorTranslationFiles {
46586    fn from(t: NoSkipPassportElementErrorTranslationFiles) -> Self {
46587        Self {
46588            source: t.source,
46589            tg_type: t.tg_type,
46590            file_hashes: t.file_hashes,
46591            message: t.message,
46592        }
46593    }
46594}
46595#[allow(clippy::from_over_into)]
46596impl Into<NoSkipPassportElementErrorTranslationFiles> for PassportElementErrorTranslationFiles {
46597    fn into(self) -> NoSkipPassportElementErrorTranslationFiles {
46598        NoSkipPassportElementErrorTranslationFiles {
46599            source: self.source,
46600            tg_type: self.tg_type,
46601            file_hashes: self.file_hashes,
46602            message: self.message,
46603        }
46604    }
46605}
46606impl NoSkipPassportElementErrorTranslationFiles {
46607    pub fn skip(self) -> PassportElementErrorTranslationFiles {
46608        self.into()
46609    }
46610}
46611impl PassportElementErrorTranslationFiles {
46612    pub fn noskip(self) -> NoSkipPassportElementErrorTranslationFiles {
46613        self.into()
46614    }
46615}
46616#[allow(rustdoc::invalid_html_tags)]
46617#[doc = "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change."]
46618#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46619pub struct PassportElementErrorTranslationFilesBuilder {
46620    #[allow(rustdoc::invalid_html_tags)]
46621    #[doc = "Error source, must be translation_files"]
46622    #[serde(rename = "source")]
46623    pub source: String,
46624    #[allow(rustdoc::invalid_html_tags)]
46625    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
46626    #[serde(rename = "type")]
46627    pub tg_type: String,
46628    #[allow(rustdoc::invalid_html_tags)]
46629    #[doc = "List of base64-encoded file hashes"]
46630    #[serde(rename = "file_hashes")]
46631    pub file_hashes: Vec<String>,
46632    #[allow(rustdoc::invalid_html_tags)]
46633    #[doc = "Error message"]
46634    #[serde(rename = "message")]
46635    pub message: String,
46636}
46637impl PassportElementErrorTranslationFilesBuilder {
46638    #[allow(clippy::too_many_arguments)]
46639    pub fn new(source: String, file_hashes: Vec<String>, message: String) -> Self {
46640        Self {
46641            tg_type: "PassportElementErrorTranslationFiles".to_owned(),
46642            source,
46643            file_hashes,
46644            message,
46645        }
46646    }
46647    #[allow(rustdoc::invalid_html_tags)]
46648    #[doc = "Error source, must be translation_files"]
46649    pub fn set_source(mut self, source: String) -> Self {
46650        self.source = source;
46651        self
46652    }
46653    #[allow(rustdoc::invalid_html_tags)]
46654    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
46655    pub fn set_type(mut self, tg_type: String) -> Self {
46656        self.tg_type = tg_type;
46657        self
46658    }
46659    #[allow(rustdoc::invalid_html_tags)]
46660    #[doc = "List of base64-encoded file hashes"]
46661    pub fn set_file_hashes(mut self, file_hashes: Vec<String>) -> Self {
46662        self.file_hashes = file_hashes;
46663        self
46664    }
46665    #[allow(rustdoc::invalid_html_tags)]
46666    #[doc = "Error message"]
46667    pub fn set_message(mut self, message: String) -> Self {
46668        self.message = message;
46669        self
46670    }
46671    pub fn build(self) -> PassportElementErrorTranslationFiles {
46672        PassportElementErrorTranslationFiles {
46673            source: self.source,
46674            tg_type: self.tg_type,
46675            file_hashes: self.file_hashes,
46676            message: self.message,
46677        }
46678    }
46679}
46680#[allow(rustdoc::invalid_html_tags)]
46681#[doc = "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound)."]
46682#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46683pub struct Animation {
46684    #[allow(rustdoc::invalid_html_tags)]
46685    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
46686    #[serde(rename = "file_id")]
46687    pub file_id: String,
46688    #[allow(rustdoc::invalid_html_tags)]
46689    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
46690    #[serde(rename = "file_unique_id")]
46691    pub file_unique_id: String,
46692    #[allow(rustdoc::invalid_html_tags)]
46693    #[doc = "Video width as defined by the sender"]
46694    #[serde(rename = "width")]
46695    pub width: i64,
46696    #[allow(rustdoc::invalid_html_tags)]
46697    #[doc = "Video height as defined by the sender"]
46698    #[serde(rename = "height")]
46699    pub height: i64,
46700    #[allow(rustdoc::invalid_html_tags)]
46701    #[doc = "Duration of the video in seconds as defined by the sender"]
46702    #[serde(rename = "duration")]
46703    pub duration: i64,
46704    #[allow(rustdoc::invalid_html_tags)]
46705    #[doc = "Optional. Animation thumbnail as defined by the sender"]
46706    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
46707    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
46708    #[allow(rustdoc::invalid_html_tags)]
46709    #[doc = "Optional. Original animation filename as defined by the sender"]
46710    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
46711    pub file_name: Option<String>,
46712    #[allow(rustdoc::invalid_html_tags)]
46713    #[doc = "Optional. MIME type of the file as defined by the sender"]
46714    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
46715    pub mime_type: Option<String>,
46716    #[allow(rustdoc::invalid_html_tags)]
46717    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
46718    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
46719    pub file_size: Option<i64>,
46720}
46721#[allow(rustdoc::invalid_html_tags)]
46722#[doc = "Companion type to Animation that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
46723#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46724pub struct NoSkipAnimation {
46725    #[allow(rustdoc::invalid_html_tags)]
46726    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
46727    #[serde(rename = "file_id")]
46728    pub file_id: String,
46729    #[allow(rustdoc::invalid_html_tags)]
46730    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
46731    #[serde(rename = "file_unique_id")]
46732    pub file_unique_id: String,
46733    #[allow(rustdoc::invalid_html_tags)]
46734    #[doc = "Video width as defined by the sender"]
46735    #[serde(rename = "width")]
46736    pub width: i64,
46737    #[allow(rustdoc::invalid_html_tags)]
46738    #[doc = "Video height as defined by the sender"]
46739    #[serde(rename = "height")]
46740    pub height: i64,
46741    #[allow(rustdoc::invalid_html_tags)]
46742    #[doc = "Duration of the video in seconds as defined by the sender"]
46743    #[serde(rename = "duration")]
46744    pub duration: i64,
46745    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
46746    pub file_name: Option<String>,
46747    pub mime_type: Option<String>,
46748    pub file_size: Option<i64>,
46749}
46750impl From<NoSkipAnimation> for Animation {
46751    fn from(t: NoSkipAnimation) -> Self {
46752        Self {
46753            file_id: t.file_id,
46754            file_unique_id: t.file_unique_id,
46755            width: t.width,
46756            height: t.height,
46757            duration: t.duration,
46758            thumbnail: t.thumbnail,
46759            file_name: t.file_name,
46760            mime_type: t.mime_type,
46761            file_size: t.file_size,
46762        }
46763    }
46764}
46765#[allow(clippy::from_over_into)]
46766impl Into<NoSkipAnimation> for Animation {
46767    fn into(self) -> NoSkipAnimation {
46768        NoSkipAnimation {
46769            file_id: self.file_id,
46770            file_unique_id: self.file_unique_id,
46771            width: self.width,
46772            height: self.height,
46773            duration: self.duration,
46774            thumbnail: self.thumbnail,
46775            file_name: self.file_name,
46776            mime_type: self.mime_type,
46777            file_size: self.file_size,
46778        }
46779    }
46780}
46781impl NoSkipAnimation {
46782    pub fn skip(self) -> Animation {
46783        self.into()
46784    }
46785}
46786impl Animation {
46787    pub fn noskip(self) -> NoSkipAnimation {
46788        self.into()
46789    }
46790}
46791#[allow(rustdoc::invalid_html_tags)]
46792#[doc = "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound)."]
46793#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46794pub struct AnimationBuilder {
46795    #[allow(rustdoc::invalid_html_tags)]
46796    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
46797    #[serde(rename = "file_id")]
46798    pub file_id: String,
46799    #[allow(rustdoc::invalid_html_tags)]
46800    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
46801    #[serde(rename = "file_unique_id")]
46802    pub file_unique_id: String,
46803    #[allow(rustdoc::invalid_html_tags)]
46804    #[doc = "Video width as defined by the sender"]
46805    #[serde(rename = "width")]
46806    pub width: i64,
46807    #[allow(rustdoc::invalid_html_tags)]
46808    #[doc = "Video height as defined by the sender"]
46809    #[serde(rename = "height")]
46810    pub height: i64,
46811    #[allow(rustdoc::invalid_html_tags)]
46812    #[doc = "Duration of the video in seconds as defined by the sender"]
46813    #[serde(rename = "duration")]
46814    pub duration: i64,
46815    #[allow(rustdoc::invalid_html_tags)]
46816    #[doc = "Optional. Animation thumbnail as defined by the sender"]
46817    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
46818    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
46819    #[allow(rustdoc::invalid_html_tags)]
46820    #[doc = "Optional. Original animation filename as defined by the sender"]
46821    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
46822    pub file_name: Option<String>,
46823    #[allow(rustdoc::invalid_html_tags)]
46824    #[doc = "Optional. MIME type of the file as defined by the sender"]
46825    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
46826    pub mime_type: Option<String>,
46827    #[allow(rustdoc::invalid_html_tags)]
46828    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
46829    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
46830    pub file_size: Option<i64>,
46831}
46832impl AnimationBuilder {
46833    #[allow(clippy::too_many_arguments)]
46834    pub fn new(
46835        file_id: String,
46836        file_unique_id: String,
46837        width: i64,
46838        height: i64,
46839        duration: i64,
46840    ) -> Self {
46841        Self {
46842            file_id,
46843            file_unique_id,
46844            width,
46845            height,
46846            duration,
46847            thumbnail: None,
46848            file_name: None,
46849            mime_type: None,
46850            file_size: None,
46851        }
46852    }
46853    #[allow(rustdoc::invalid_html_tags)]
46854    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
46855    pub fn set_file_id(mut self, file_id: String) -> Self {
46856        self.file_id = file_id;
46857        self
46858    }
46859    #[allow(rustdoc::invalid_html_tags)]
46860    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
46861    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
46862        self.file_unique_id = file_unique_id;
46863        self
46864    }
46865    #[allow(rustdoc::invalid_html_tags)]
46866    #[doc = "Video width as defined by the sender"]
46867    pub fn set_width(mut self, width: i64) -> Self {
46868        self.width = width;
46869        self
46870    }
46871    #[allow(rustdoc::invalid_html_tags)]
46872    #[doc = "Video height as defined by the sender"]
46873    pub fn set_height(mut self, height: i64) -> Self {
46874        self.height = height;
46875        self
46876    }
46877    #[allow(rustdoc::invalid_html_tags)]
46878    #[doc = "Duration of the video in seconds as defined by the sender"]
46879    pub fn set_duration(mut self, duration: i64) -> Self {
46880        self.duration = duration;
46881        self
46882    }
46883    #[allow(rustdoc::invalid_html_tags)]
46884    #[doc = "Optional. Animation thumbnail as defined by the sender"]
46885    pub fn set_thumbnail(mut self, thumbnail: PhotoSize) -> Self {
46886        self.thumbnail = Some(BoxWrapper(Unbox(thumbnail)));
46887        self
46888    }
46889    #[allow(rustdoc::invalid_html_tags)]
46890    #[doc = "Optional. Original animation filename as defined by the sender"]
46891    pub fn set_file_name(mut self, file_name: String) -> Self {
46892        self.file_name = Some(file_name);
46893        self
46894    }
46895    #[allow(rustdoc::invalid_html_tags)]
46896    #[doc = "Optional. MIME type of the file as defined by the sender"]
46897    pub fn set_mime_type(mut self, mime_type: String) -> Self {
46898        self.mime_type = Some(mime_type);
46899        self
46900    }
46901    #[allow(rustdoc::invalid_html_tags)]
46902    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
46903    pub fn set_file_size(mut self, file_size: i64) -> Self {
46904        self.file_size = Some(file_size);
46905        self
46906    }
46907    pub fn build(self) -> Animation {
46908        Animation {
46909            file_id: self.file_id,
46910            file_unique_id: self.file_unique_id,
46911            width: self.width,
46912            height: self.height,
46913            duration: self.duration,
46914            thumbnail: self.thumbnail,
46915            file_name: self.file_name,
46916            mime_type: self.mime_type,
46917            file_size: self.file_size,
46918        }
46919    }
46920}
46921#[allow(rustdoc::invalid_html_tags)]
46922#[doc = "This object represents an audio file to be treated as music by the Telegram clients."]
46923#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46924pub struct Audio {
46925    #[allow(rustdoc::invalid_html_tags)]
46926    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
46927    #[serde(rename = "file_id")]
46928    pub file_id: String,
46929    #[allow(rustdoc::invalid_html_tags)]
46930    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
46931    #[serde(rename = "file_unique_id")]
46932    pub file_unique_id: String,
46933    #[allow(rustdoc::invalid_html_tags)]
46934    #[doc = "Duration of the audio in seconds as defined by the sender"]
46935    #[serde(rename = "duration")]
46936    pub duration: i64,
46937    #[allow(rustdoc::invalid_html_tags)]
46938    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
46939    #[serde(skip_serializing_if = "Option::is_none", rename = "performer", default)]
46940    pub performer: Option<String>,
46941    #[allow(rustdoc::invalid_html_tags)]
46942    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
46943    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
46944    pub title: Option<String>,
46945    #[allow(rustdoc::invalid_html_tags)]
46946    #[doc = "Optional. Original filename as defined by the sender"]
46947    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
46948    pub file_name: Option<String>,
46949    #[allow(rustdoc::invalid_html_tags)]
46950    #[doc = "Optional. MIME type of the file as defined by the sender"]
46951    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
46952    pub mime_type: Option<String>,
46953    #[allow(rustdoc::invalid_html_tags)]
46954    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
46955    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
46956    pub file_size: Option<i64>,
46957    #[allow(rustdoc::invalid_html_tags)]
46958    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
46959    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
46960    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
46961}
46962#[allow(rustdoc::invalid_html_tags)]
46963#[doc = "Companion type to Audio that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
46964#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
46965pub struct NoSkipAudio {
46966    #[allow(rustdoc::invalid_html_tags)]
46967    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
46968    #[serde(rename = "file_id")]
46969    pub file_id: String,
46970    #[allow(rustdoc::invalid_html_tags)]
46971    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
46972    #[serde(rename = "file_unique_id")]
46973    pub file_unique_id: String,
46974    #[allow(rustdoc::invalid_html_tags)]
46975    #[doc = "Duration of the audio in seconds as defined by the sender"]
46976    #[serde(rename = "duration")]
46977    pub duration: i64,
46978    pub performer: Option<String>,
46979    pub title: Option<String>,
46980    pub file_name: Option<String>,
46981    pub mime_type: Option<String>,
46982    pub file_size: Option<i64>,
46983    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
46984}
46985impl From<NoSkipAudio> for Audio {
46986    fn from(t: NoSkipAudio) -> Self {
46987        Self {
46988            file_id: t.file_id,
46989            file_unique_id: t.file_unique_id,
46990            duration: t.duration,
46991            performer: t.performer,
46992            title: t.title,
46993            file_name: t.file_name,
46994            mime_type: t.mime_type,
46995            file_size: t.file_size,
46996            thumbnail: t.thumbnail,
46997        }
46998    }
46999}
47000#[allow(clippy::from_over_into)]
47001impl Into<NoSkipAudio> for Audio {
47002    fn into(self) -> NoSkipAudio {
47003        NoSkipAudio {
47004            file_id: self.file_id,
47005            file_unique_id: self.file_unique_id,
47006            duration: self.duration,
47007            performer: self.performer,
47008            title: self.title,
47009            file_name: self.file_name,
47010            mime_type: self.mime_type,
47011            file_size: self.file_size,
47012            thumbnail: self.thumbnail,
47013        }
47014    }
47015}
47016impl NoSkipAudio {
47017    pub fn skip(self) -> Audio {
47018        self.into()
47019    }
47020}
47021impl Audio {
47022    pub fn noskip(self) -> NoSkipAudio {
47023        self.into()
47024    }
47025}
47026#[allow(rustdoc::invalid_html_tags)]
47027#[doc = "This object represents an audio file to be treated as music by the Telegram clients."]
47028#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47029pub struct AudioBuilder {
47030    #[allow(rustdoc::invalid_html_tags)]
47031    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
47032    #[serde(rename = "file_id")]
47033    pub file_id: String,
47034    #[allow(rustdoc::invalid_html_tags)]
47035    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
47036    #[serde(rename = "file_unique_id")]
47037    pub file_unique_id: String,
47038    #[allow(rustdoc::invalid_html_tags)]
47039    #[doc = "Duration of the audio in seconds as defined by the sender"]
47040    #[serde(rename = "duration")]
47041    pub duration: i64,
47042    #[allow(rustdoc::invalid_html_tags)]
47043    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
47044    #[serde(skip_serializing_if = "Option::is_none", rename = "performer", default)]
47045    pub performer: Option<String>,
47046    #[allow(rustdoc::invalid_html_tags)]
47047    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
47048    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
47049    pub title: Option<String>,
47050    #[allow(rustdoc::invalid_html_tags)]
47051    #[doc = "Optional. Original filename as defined by the sender"]
47052    #[serde(skip_serializing_if = "Option::is_none", rename = "file_name", default)]
47053    pub file_name: Option<String>,
47054    #[allow(rustdoc::invalid_html_tags)]
47055    #[doc = "Optional. MIME type of the file as defined by the sender"]
47056    #[serde(skip_serializing_if = "Option::is_none", rename = "mime_type", default)]
47057    pub mime_type: Option<String>,
47058    #[allow(rustdoc::invalid_html_tags)]
47059    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
47060    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
47061    pub file_size: Option<i64>,
47062    #[allow(rustdoc::invalid_html_tags)]
47063    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
47064    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
47065    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
47066}
47067impl AudioBuilder {
47068    #[allow(clippy::too_many_arguments)]
47069    pub fn new(file_id: String, file_unique_id: String, duration: i64) -> Self {
47070        Self {
47071            file_id,
47072            file_unique_id,
47073            duration,
47074            performer: None,
47075            title: None,
47076            file_name: None,
47077            mime_type: None,
47078            file_size: None,
47079            thumbnail: None,
47080        }
47081    }
47082    #[allow(rustdoc::invalid_html_tags)]
47083    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
47084    pub fn set_file_id(mut self, file_id: String) -> Self {
47085        self.file_id = file_id;
47086        self
47087    }
47088    #[allow(rustdoc::invalid_html_tags)]
47089    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
47090    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
47091        self.file_unique_id = file_unique_id;
47092        self
47093    }
47094    #[allow(rustdoc::invalid_html_tags)]
47095    #[doc = "Duration of the audio in seconds as defined by the sender"]
47096    pub fn set_duration(mut self, duration: i64) -> Self {
47097        self.duration = duration;
47098        self
47099    }
47100    #[allow(rustdoc::invalid_html_tags)]
47101    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
47102    pub fn set_performer(mut self, performer: String) -> Self {
47103        self.performer = Some(performer);
47104        self
47105    }
47106    #[allow(rustdoc::invalid_html_tags)]
47107    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
47108    pub fn set_title(mut self, title: String) -> Self {
47109        self.title = Some(title);
47110        self
47111    }
47112    #[allow(rustdoc::invalid_html_tags)]
47113    #[doc = "Optional. Original filename as defined by the sender"]
47114    pub fn set_file_name(mut self, file_name: String) -> Self {
47115        self.file_name = Some(file_name);
47116        self
47117    }
47118    #[allow(rustdoc::invalid_html_tags)]
47119    #[doc = "Optional. MIME type of the file as defined by the sender"]
47120    pub fn set_mime_type(mut self, mime_type: String) -> Self {
47121        self.mime_type = Some(mime_type);
47122        self
47123    }
47124    #[allow(rustdoc::invalid_html_tags)]
47125    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
47126    pub fn set_file_size(mut self, file_size: i64) -> Self {
47127        self.file_size = Some(file_size);
47128        self
47129    }
47130    #[allow(rustdoc::invalid_html_tags)]
47131    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
47132    pub fn set_thumbnail(mut self, thumbnail: PhotoSize) -> Self {
47133        self.thumbnail = Some(BoxWrapper(Unbox(thumbnail)));
47134        self
47135    }
47136    pub fn build(self) -> Audio {
47137        Audio {
47138            file_id: self.file_id,
47139            file_unique_id: self.file_unique_id,
47140            duration: self.duration,
47141            performer: self.performer,
47142            title: self.title,
47143            file_name: self.file_name,
47144            mime_type: self.mime_type,
47145            file_size: self.file_size,
47146            thumbnail: self.thumbnail,
47147        }
47148    }
47149}
47150#[allow(rustdoc::invalid_html_tags)]
47151#[doc = "This object contains basic information about a refunded payment."]
47152#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47153pub struct RefundedPayment {
47154    #[allow(rustdoc::invalid_html_tags)]
47155    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
47156    #[serde(rename = "currency")]
47157    pub currency: String,
47158    #[allow(rustdoc::invalid_html_tags)]
47159    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
47160    #[serde(rename = "total_amount")]
47161    pub total_amount: i64,
47162    #[allow(rustdoc::invalid_html_tags)]
47163    #[doc = "Bot-specified invoice payload"]
47164    #[serde(rename = "invoice_payload")]
47165    pub invoice_payload: String,
47166    #[allow(rustdoc::invalid_html_tags)]
47167    #[doc = "Telegram payment identifier"]
47168    #[serde(rename = "telegram_payment_charge_id")]
47169    pub telegram_payment_charge_id: String,
47170    #[allow(rustdoc::invalid_html_tags)]
47171    #[doc = "Optional. Provider payment identifier"]
47172    #[serde(
47173        skip_serializing_if = "Option::is_none",
47174        rename = "provider_payment_charge_id",
47175        default
47176    )]
47177    pub provider_payment_charge_id: Option<String>,
47178}
47179#[allow(rustdoc::invalid_html_tags)]
47180#[doc = "Companion type to RefundedPayment that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
47181#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47182pub struct NoSkipRefundedPayment {
47183    #[allow(rustdoc::invalid_html_tags)]
47184    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
47185    #[serde(rename = "currency")]
47186    pub currency: String,
47187    #[allow(rustdoc::invalid_html_tags)]
47188    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
47189    #[serde(rename = "total_amount")]
47190    pub total_amount: i64,
47191    #[allow(rustdoc::invalid_html_tags)]
47192    #[doc = "Bot-specified invoice payload"]
47193    #[serde(rename = "invoice_payload")]
47194    pub invoice_payload: String,
47195    #[allow(rustdoc::invalid_html_tags)]
47196    #[doc = "Telegram payment identifier"]
47197    #[serde(rename = "telegram_payment_charge_id")]
47198    pub telegram_payment_charge_id: String,
47199    pub provider_payment_charge_id: Option<String>,
47200}
47201impl From<NoSkipRefundedPayment> for RefundedPayment {
47202    fn from(t: NoSkipRefundedPayment) -> Self {
47203        Self {
47204            currency: t.currency,
47205            total_amount: t.total_amount,
47206            invoice_payload: t.invoice_payload,
47207            telegram_payment_charge_id: t.telegram_payment_charge_id,
47208            provider_payment_charge_id: t.provider_payment_charge_id,
47209        }
47210    }
47211}
47212#[allow(clippy::from_over_into)]
47213impl Into<NoSkipRefundedPayment> for RefundedPayment {
47214    fn into(self) -> NoSkipRefundedPayment {
47215        NoSkipRefundedPayment {
47216            currency: self.currency,
47217            total_amount: self.total_amount,
47218            invoice_payload: self.invoice_payload,
47219            telegram_payment_charge_id: self.telegram_payment_charge_id,
47220            provider_payment_charge_id: self.provider_payment_charge_id,
47221        }
47222    }
47223}
47224impl NoSkipRefundedPayment {
47225    pub fn skip(self) -> RefundedPayment {
47226        self.into()
47227    }
47228}
47229impl RefundedPayment {
47230    pub fn noskip(self) -> NoSkipRefundedPayment {
47231        self.into()
47232    }
47233}
47234#[allow(rustdoc::invalid_html_tags)]
47235#[doc = "This object contains basic information about a refunded payment."]
47236#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47237pub struct RefundedPaymentBuilder {
47238    #[allow(rustdoc::invalid_html_tags)]
47239    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
47240    #[serde(rename = "currency")]
47241    pub currency: String,
47242    #[allow(rustdoc::invalid_html_tags)]
47243    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
47244    #[serde(rename = "total_amount")]
47245    pub total_amount: i64,
47246    #[allow(rustdoc::invalid_html_tags)]
47247    #[doc = "Bot-specified invoice payload"]
47248    #[serde(rename = "invoice_payload")]
47249    pub invoice_payload: String,
47250    #[allow(rustdoc::invalid_html_tags)]
47251    #[doc = "Telegram payment identifier"]
47252    #[serde(rename = "telegram_payment_charge_id")]
47253    pub telegram_payment_charge_id: String,
47254    #[allow(rustdoc::invalid_html_tags)]
47255    #[doc = "Optional. Provider payment identifier"]
47256    #[serde(
47257        skip_serializing_if = "Option::is_none",
47258        rename = "provider_payment_charge_id",
47259        default
47260    )]
47261    pub provider_payment_charge_id: Option<String>,
47262}
47263impl RefundedPaymentBuilder {
47264    #[allow(clippy::too_many_arguments)]
47265    pub fn new(
47266        currency: String,
47267        total_amount: i64,
47268        invoice_payload: String,
47269        telegram_payment_charge_id: String,
47270    ) -> Self {
47271        Self {
47272            currency,
47273            total_amount,
47274            invoice_payload,
47275            telegram_payment_charge_id,
47276            provider_payment_charge_id: None,
47277        }
47278    }
47279    #[allow(rustdoc::invalid_html_tags)]
47280    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
47281    pub fn set_currency(mut self, currency: String) -> Self {
47282        self.currency = currency;
47283        self
47284    }
47285    #[allow(rustdoc::invalid_html_tags)]
47286    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
47287    pub fn set_total_amount(mut self, total_amount: i64) -> Self {
47288        self.total_amount = total_amount;
47289        self
47290    }
47291    #[allow(rustdoc::invalid_html_tags)]
47292    #[doc = "Bot-specified invoice payload"]
47293    pub fn set_invoice_payload(mut self, invoice_payload: String) -> Self {
47294        self.invoice_payload = invoice_payload;
47295        self
47296    }
47297    #[allow(rustdoc::invalid_html_tags)]
47298    #[doc = "Telegram payment identifier"]
47299    pub fn set_telegram_payment_charge_id(mut self, telegram_payment_charge_id: String) -> Self {
47300        self.telegram_payment_charge_id = telegram_payment_charge_id;
47301        self
47302    }
47303    #[allow(rustdoc::invalid_html_tags)]
47304    #[doc = "Optional. Provider payment identifier"]
47305    pub fn set_provider_payment_charge_id(mut self, provider_payment_charge_id: String) -> Self {
47306        self.provider_payment_charge_id = Some(provider_payment_charge_id);
47307        self
47308    }
47309    pub fn build(self) -> RefundedPayment {
47310        RefundedPayment {
47311            currency: self.currency,
47312            total_amount: self.total_amount,
47313            invoice_payload: self.invoice_payload,
47314            telegram_payment_charge_id: self.telegram_payment_charge_id,
47315            provider_payment_charge_id: self.provider_payment_charge_id,
47316        }
47317    }
47318}
47319#[allow(rustdoc::invalid_html_tags)]
47320#[doc = "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent."]
47321#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47322pub struct InputMediaAnimation {
47323    #[allow(rustdoc::invalid_html_tags)]
47324    #[doc = "Type of the result, must be animation"]
47325    #[serde(rename = "type")]
47326    pub tg_type: String,
47327    #[allow(rustdoc::invalid_html_tags)]
47328    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
47329    #[serde(rename = "media")]
47330    pub media: Option<InputFile>,
47331    #[allow(rustdoc::invalid_html_tags)]
47332    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
47333    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
47334    pub thumbnail: Option<String>,
47335    #[allow(rustdoc::invalid_html_tags)]
47336    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
47337    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
47338    pub caption: Option<String>,
47339    #[allow(rustdoc::invalid_html_tags)]
47340    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
47341    #[serde(
47342        skip_serializing_if = "Option::is_none",
47343        rename = "parse_mode",
47344        default
47345    )]
47346    pub parse_mode: Option<String>,
47347    #[allow(rustdoc::invalid_html_tags)]
47348    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
47349    #[serde(
47350        skip_serializing_if = "Option::is_none",
47351        rename = "caption_entities",
47352        default
47353    )]
47354    pub caption_entities: Option<Vec<MessageEntity>>,
47355    #[allow(rustdoc::invalid_html_tags)]
47356    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
47357    #[serde(
47358        skip_serializing_if = "Option::is_none",
47359        rename = "show_caption_above_media",
47360        default
47361    )]
47362    pub show_caption_above_media: Option<bool>,
47363    #[allow(rustdoc::invalid_html_tags)]
47364    #[doc = "Optional. Animation width"]
47365    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
47366    pub width: Option<i64>,
47367    #[allow(rustdoc::invalid_html_tags)]
47368    #[doc = "Optional. Animation height"]
47369    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
47370    pub height: Option<i64>,
47371    #[allow(rustdoc::invalid_html_tags)]
47372    #[doc = "Optional. Animation duration in seconds"]
47373    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
47374    pub duration: Option<i64>,
47375    #[allow(rustdoc::invalid_html_tags)]
47376    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
47377    #[serde(
47378        skip_serializing_if = "Option::is_none",
47379        rename = "has_spoiler",
47380        default
47381    )]
47382    pub has_spoiler: Option<bool>,
47383}
47384#[allow(rustdoc::invalid_html_tags)]
47385#[doc = "Companion type to InputMediaAnimation that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
47386#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47387pub struct NoSkipInputMediaAnimation {
47388    #[allow(rustdoc::invalid_html_tags)]
47389    #[doc = "Type of the result, must be animation"]
47390    #[serde(rename = "type")]
47391    pub tg_type: String,
47392    #[allow(rustdoc::invalid_html_tags)]
47393    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
47394    #[serde(rename = "media")]
47395    pub media: Option<InputFile>,
47396    pub thumbnail: Option<String>,
47397    pub caption: Option<String>,
47398    pub parse_mode: Option<String>,
47399    pub caption_entities: Option<Vec<MessageEntity>>,
47400    pub show_caption_above_media: Option<bool>,
47401    pub width: Option<i64>,
47402    pub height: Option<i64>,
47403    pub duration: Option<i64>,
47404    pub has_spoiler: Option<bool>,
47405}
47406impl From<NoSkipInputMediaAnimation> for InputMediaAnimation {
47407    fn from(t: NoSkipInputMediaAnimation) -> Self {
47408        Self {
47409            tg_type: t.tg_type,
47410            media: t.media,
47411            thumbnail: t.thumbnail,
47412            caption: t.caption,
47413            parse_mode: t.parse_mode,
47414            caption_entities: t.caption_entities,
47415            show_caption_above_media: t.show_caption_above_media,
47416            width: t.width,
47417            height: t.height,
47418            duration: t.duration,
47419            has_spoiler: t.has_spoiler,
47420        }
47421    }
47422}
47423#[allow(clippy::from_over_into)]
47424impl Into<NoSkipInputMediaAnimation> for InputMediaAnimation {
47425    fn into(self) -> NoSkipInputMediaAnimation {
47426        NoSkipInputMediaAnimation {
47427            tg_type: self.tg_type,
47428            media: self.media,
47429            thumbnail: self.thumbnail,
47430            caption: self.caption,
47431            parse_mode: self.parse_mode,
47432            caption_entities: self.caption_entities,
47433            show_caption_above_media: self.show_caption_above_media,
47434            width: self.width,
47435            height: self.height,
47436            duration: self.duration,
47437            has_spoiler: self.has_spoiler,
47438        }
47439    }
47440}
47441impl NoSkipInputMediaAnimation {
47442    pub fn skip(self) -> InputMediaAnimation {
47443        self.into()
47444    }
47445}
47446impl InputMediaAnimation {
47447    pub fn noskip(self) -> NoSkipInputMediaAnimation {
47448        self.into()
47449    }
47450}
47451#[allow(rustdoc::invalid_html_tags)]
47452#[doc = "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent."]
47453#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47454pub struct InputMediaAnimationBuilder {
47455    #[allow(rustdoc::invalid_html_tags)]
47456    #[doc = "Type of the result, must be animation"]
47457    #[serde(rename = "type")]
47458    pub tg_type: String,
47459    #[allow(rustdoc::invalid_html_tags)]
47460    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
47461    #[serde(rename = "media")]
47462    pub media: Option<InputFile>,
47463    #[allow(rustdoc::invalid_html_tags)]
47464    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
47465    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
47466    pub thumbnail: Option<String>,
47467    #[allow(rustdoc::invalid_html_tags)]
47468    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
47469    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
47470    pub caption: Option<String>,
47471    #[allow(rustdoc::invalid_html_tags)]
47472    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
47473    #[serde(
47474        skip_serializing_if = "Option::is_none",
47475        rename = "parse_mode",
47476        default
47477    )]
47478    pub parse_mode: Option<String>,
47479    #[allow(rustdoc::invalid_html_tags)]
47480    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
47481    #[serde(
47482        skip_serializing_if = "Option::is_none",
47483        rename = "caption_entities",
47484        default
47485    )]
47486    pub caption_entities: Option<Vec<MessageEntity>>,
47487    #[allow(rustdoc::invalid_html_tags)]
47488    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
47489    #[serde(
47490        skip_serializing_if = "Option::is_none",
47491        rename = "show_caption_above_media",
47492        default
47493    )]
47494    pub show_caption_above_media: Option<bool>,
47495    #[allow(rustdoc::invalid_html_tags)]
47496    #[doc = "Optional. Animation width"]
47497    #[serde(skip_serializing_if = "Option::is_none", rename = "width", default)]
47498    pub width: Option<i64>,
47499    #[allow(rustdoc::invalid_html_tags)]
47500    #[doc = "Optional. Animation height"]
47501    #[serde(skip_serializing_if = "Option::is_none", rename = "height", default)]
47502    pub height: Option<i64>,
47503    #[allow(rustdoc::invalid_html_tags)]
47504    #[doc = "Optional. Animation duration in seconds"]
47505    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
47506    pub duration: Option<i64>,
47507    #[allow(rustdoc::invalid_html_tags)]
47508    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
47509    #[serde(
47510        skip_serializing_if = "Option::is_none",
47511        rename = "has_spoiler",
47512        default
47513    )]
47514    pub has_spoiler: Option<bool>,
47515}
47516impl InputMediaAnimationBuilder {
47517    #[allow(clippy::too_many_arguments)]
47518    pub fn new(media: Option<InputFile>) -> Self {
47519        Self {
47520            tg_type: "animation".to_owned(),
47521            media,
47522            thumbnail: None,
47523            caption: None,
47524            parse_mode: None,
47525            caption_entities: None,
47526            show_caption_above_media: None,
47527            width: None,
47528            height: None,
47529            duration: None,
47530            has_spoiler: None,
47531        }
47532    }
47533    #[allow(rustdoc::invalid_html_tags)]
47534    #[doc = "Type of the result, must be animation"]
47535    pub fn set_type(mut self, tg_type: String) -> Self {
47536        self.tg_type = tg_type;
47537        self
47538    }
47539    #[allow(rustdoc::invalid_html_tags)]
47540    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
47541    pub fn set_media(mut self, media: Option<InputFile>) -> Self {
47542        self.media = media;
47543        self
47544    }
47545    #[allow(rustdoc::invalid_html_tags)]
47546    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
47547    pub fn set_thumbnail(mut self, thumbnail: String) -> Self {
47548        self.thumbnail = Some(thumbnail);
47549        self
47550    }
47551    #[allow(rustdoc::invalid_html_tags)]
47552    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
47553    pub fn set_caption(mut self, caption: String) -> Self {
47554        self.caption = Some(caption);
47555        self
47556    }
47557    #[allow(rustdoc::invalid_html_tags)]
47558    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
47559    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
47560        self.parse_mode = Some(parse_mode);
47561        self
47562    }
47563    #[allow(rustdoc::invalid_html_tags)]
47564    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
47565    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
47566        self.caption_entities = Some(caption_entities);
47567        self
47568    }
47569    #[allow(rustdoc::invalid_html_tags)]
47570    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
47571    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
47572        self.show_caption_above_media = Some(show_caption_above_media);
47573        self
47574    }
47575    #[allow(rustdoc::invalid_html_tags)]
47576    #[doc = "Optional. Animation width"]
47577    pub fn set_width(mut self, width: i64) -> Self {
47578        self.width = Some(width);
47579        self
47580    }
47581    #[allow(rustdoc::invalid_html_tags)]
47582    #[doc = "Optional. Animation height"]
47583    pub fn set_height(mut self, height: i64) -> Self {
47584        self.height = Some(height);
47585        self
47586    }
47587    #[allow(rustdoc::invalid_html_tags)]
47588    #[doc = "Optional. Animation duration in seconds"]
47589    pub fn set_duration(mut self, duration: i64) -> Self {
47590        self.duration = Some(duration);
47591        self
47592    }
47593    #[allow(rustdoc::invalid_html_tags)]
47594    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
47595    pub fn set_has_spoiler(mut self, has_spoiler: bool) -> Self {
47596        self.has_spoiler = Some(has_spoiler);
47597        self
47598    }
47599    pub fn build(self) -> InputMediaAnimation {
47600        InputMediaAnimation {
47601            tg_type: self.tg_type,
47602            media: self.media,
47603            thumbnail: self.thumbnail,
47604            caption: self.caption,
47605            parse_mode: self.parse_mode,
47606            caption_entities: self.caption_entities,
47607            show_caption_above_media: self.show_caption_above_media,
47608            width: self.width,
47609            height: self.height,
47610            duration: self.duration,
47611            has_spoiler: self.has_spoiler,
47612        }
47613    }
47614}
47615#[allow(rustdoc::invalid_html_tags)]
47616#[doc = "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers."]
47617#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47618pub struct Game {
47619    #[allow(rustdoc::invalid_html_tags)]
47620    #[doc = "Title of the game"]
47621    #[serde(rename = "title")]
47622    pub title: String,
47623    #[allow(rustdoc::invalid_html_tags)]
47624    #[doc = "Description of the game"]
47625    #[serde(rename = "description")]
47626    pub description: String,
47627    #[allow(rustdoc::invalid_html_tags)]
47628    #[doc = "Photo that will be displayed in the game message in chats."]
47629    #[serde(rename = "photo")]
47630    pub photo: Vec<PhotoSize>,
47631    #[allow(rustdoc::invalid_html_tags)]
47632    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
47633    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
47634    pub text: Option<String>,
47635    #[allow(rustdoc::invalid_html_tags)]
47636    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
47637    #[serde(
47638        skip_serializing_if = "Option::is_none",
47639        rename = "text_entities",
47640        default
47641    )]
47642    pub text_entities: Option<Vec<MessageEntity>>,
47643    #[allow(rustdoc::invalid_html_tags)]
47644    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
47645    #[serde(skip_serializing_if = "Option::is_none", rename = "animation", default)]
47646    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
47647}
47648#[allow(rustdoc::invalid_html_tags)]
47649#[doc = "Companion type to Game that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
47650#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47651pub struct NoSkipGame {
47652    #[allow(rustdoc::invalid_html_tags)]
47653    #[doc = "Title of the game"]
47654    #[serde(rename = "title")]
47655    pub title: String,
47656    #[allow(rustdoc::invalid_html_tags)]
47657    #[doc = "Description of the game"]
47658    #[serde(rename = "description")]
47659    pub description: String,
47660    #[allow(rustdoc::invalid_html_tags)]
47661    #[doc = "Photo that will be displayed in the game message in chats."]
47662    #[serde(rename = "photo")]
47663    pub photo: Vec<PhotoSize>,
47664    pub text: Option<String>,
47665    pub text_entities: Option<Vec<MessageEntity>>,
47666    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
47667}
47668impl From<NoSkipGame> for Game {
47669    fn from(t: NoSkipGame) -> Self {
47670        Self {
47671            title: t.title,
47672            description: t.description,
47673            photo: t.photo,
47674            text: t.text,
47675            text_entities: t.text_entities,
47676            animation: t.animation,
47677        }
47678    }
47679}
47680#[allow(clippy::from_over_into)]
47681impl Into<NoSkipGame> for Game {
47682    fn into(self) -> NoSkipGame {
47683        NoSkipGame {
47684            title: self.title,
47685            description: self.description,
47686            photo: self.photo,
47687            text: self.text,
47688            text_entities: self.text_entities,
47689            animation: self.animation,
47690        }
47691    }
47692}
47693impl NoSkipGame {
47694    pub fn skip(self) -> Game {
47695        self.into()
47696    }
47697}
47698impl Game {
47699    pub fn noskip(self) -> NoSkipGame {
47700        self.into()
47701    }
47702}
47703#[allow(rustdoc::invalid_html_tags)]
47704#[doc = "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers."]
47705#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47706pub struct GameBuilder {
47707    #[allow(rustdoc::invalid_html_tags)]
47708    #[doc = "Title of the game"]
47709    #[serde(rename = "title")]
47710    pub title: String,
47711    #[allow(rustdoc::invalid_html_tags)]
47712    #[doc = "Description of the game"]
47713    #[serde(rename = "description")]
47714    pub description: String,
47715    #[allow(rustdoc::invalid_html_tags)]
47716    #[doc = "Photo that will be displayed in the game message in chats."]
47717    #[serde(rename = "photo")]
47718    pub photo: Vec<PhotoSize>,
47719    #[allow(rustdoc::invalid_html_tags)]
47720    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
47721    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
47722    pub text: Option<String>,
47723    #[allow(rustdoc::invalid_html_tags)]
47724    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
47725    #[serde(
47726        skip_serializing_if = "Option::is_none",
47727        rename = "text_entities",
47728        default
47729    )]
47730    pub text_entities: Option<Vec<MessageEntity>>,
47731    #[allow(rustdoc::invalid_html_tags)]
47732    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
47733    #[serde(skip_serializing_if = "Option::is_none", rename = "animation", default)]
47734    pub animation: Option<BoxWrapper<Unbox<Animation>>>,
47735}
47736impl GameBuilder {
47737    #[allow(clippy::too_many_arguments)]
47738    pub fn new(title: String, description: String, photo: Vec<PhotoSize>) -> Self {
47739        Self {
47740            title,
47741            description,
47742            photo,
47743            text: None,
47744            text_entities: None,
47745            animation: None,
47746        }
47747    }
47748    #[allow(rustdoc::invalid_html_tags)]
47749    #[doc = "Title of the game"]
47750    pub fn set_title(mut self, title: String) -> Self {
47751        self.title = title;
47752        self
47753    }
47754    #[allow(rustdoc::invalid_html_tags)]
47755    #[doc = "Description of the game"]
47756    pub fn set_description(mut self, description: String) -> Self {
47757        self.description = description;
47758        self
47759    }
47760    #[allow(rustdoc::invalid_html_tags)]
47761    #[doc = "Photo that will be displayed in the game message in chats."]
47762    pub fn set_photo(mut self, photo: Vec<PhotoSize>) -> Self {
47763        self.photo = photo;
47764        self
47765    }
47766    #[allow(rustdoc::invalid_html_tags)]
47767    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
47768    pub fn set_text(mut self, text: String) -> Self {
47769        self.text = Some(text);
47770        self
47771    }
47772    #[allow(rustdoc::invalid_html_tags)]
47773    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
47774    pub fn set_text_entities(mut self, text_entities: Vec<MessageEntity>) -> Self {
47775        self.text_entities = Some(text_entities);
47776        self
47777    }
47778    #[allow(rustdoc::invalid_html_tags)]
47779    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
47780    pub fn set_animation(mut self, animation: Animation) -> Self {
47781        self.animation = Some(BoxWrapper(Unbox(animation)));
47782        self
47783    }
47784    pub fn build(self) -> Game {
47785        Game {
47786            title: self.title,
47787            description: self.description,
47788            photo: self.photo,
47789            text: self.text,
47790            text_entities: self.text_entities,
47791            animation: self.animation,
47792        }
47793    }
47794}
47795#[allow(rustdoc::invalid_html_tags)]
47796#[doc = "Represents a chat member that has no additional privileges or restrictions."]
47797#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47798pub struct ChatMemberMember {
47799    #[allow(rustdoc::invalid_html_tags)]
47800    #[doc = "Information about the user"]
47801    #[serde(rename = "user")]
47802    pub user: BoxWrapper<Unbox<User>>,
47803    #[allow(rustdoc::invalid_html_tags)]
47804    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
47805    #[serde(
47806        skip_serializing_if = "Option::is_none",
47807        rename = "until_date",
47808        default
47809    )]
47810    pub until_date: Option<i64>,
47811}
47812#[allow(rustdoc::invalid_html_tags)]
47813#[doc = "Companion type to ChatMemberMember that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
47814#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47815pub struct NoSkipChatMemberMember {
47816    #[allow(rustdoc::invalid_html_tags)]
47817    #[doc = "Information about the user"]
47818    #[serde(rename = "user")]
47819    pub user: BoxWrapper<Unbox<User>>,
47820    pub until_date: Option<i64>,
47821}
47822impl From<NoSkipChatMemberMember> for ChatMemberMember {
47823    fn from(t: NoSkipChatMemberMember) -> Self {
47824        Self {
47825            user: t.user,
47826            until_date: t.until_date,
47827        }
47828    }
47829}
47830#[allow(clippy::from_over_into)]
47831impl Into<NoSkipChatMemberMember> for ChatMemberMember {
47832    fn into(self) -> NoSkipChatMemberMember {
47833        NoSkipChatMemberMember {
47834            user: self.user,
47835            until_date: self.until_date,
47836        }
47837    }
47838}
47839impl NoSkipChatMemberMember {
47840    pub fn skip(self) -> ChatMemberMember {
47841        self.into()
47842    }
47843}
47844impl ChatMemberMember {
47845    pub fn noskip(self) -> NoSkipChatMemberMember {
47846        self.into()
47847    }
47848}
47849#[allow(rustdoc::invalid_html_tags)]
47850#[doc = "Represents a chat member that has no additional privileges or restrictions."]
47851#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47852pub struct ChatMemberMemberBuilder {
47853    #[allow(rustdoc::invalid_html_tags)]
47854    #[doc = "Information about the user"]
47855    #[serde(rename = "user")]
47856    pub user: BoxWrapper<Unbox<User>>,
47857    #[allow(rustdoc::invalid_html_tags)]
47858    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
47859    #[serde(
47860        skip_serializing_if = "Option::is_none",
47861        rename = "until_date",
47862        default
47863    )]
47864    pub until_date: Option<i64>,
47865}
47866impl ChatMemberMemberBuilder {
47867    #[allow(clippy::too_many_arguments)]
47868    pub fn new<A: Into<User>>(user: A) -> Self {
47869        Self {
47870            user: BoxWrapper::new_unbox(user.into()),
47871            until_date: None,
47872        }
47873    }
47874    #[allow(rustdoc::invalid_html_tags)]
47875    #[doc = "Information about the user"]
47876    pub fn set_user(mut self, user: User) -> Self {
47877        self.user = BoxWrapper(Unbox(user));
47878        self
47879    }
47880    #[allow(rustdoc::invalid_html_tags)]
47881    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
47882    pub fn set_until_date(mut self, until_date: i64) -> Self {
47883        self.until_date = Some(until_date);
47884        self
47885    }
47886    pub fn build(self) -> ChatMemberMember {
47887        ChatMemberMember {
47888            user: self.user,
47889            until_date: self.until_date,
47890        }
47891    }
47892}
47893#[allow(rustdoc::invalid_html_tags)]
47894#[doc = "Describes actions that a non-administrator user is allowed to take in a chat."]
47895#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
47896pub struct ChatPermissions {
47897    #[allow(rustdoc::invalid_html_tags)]
47898    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
47899    #[serde(
47900        skip_serializing_if = "Option::is_none",
47901        rename = "can_send_messages",
47902        default
47903    )]
47904    pub can_send_messages: Option<bool>,
47905    #[allow(rustdoc::invalid_html_tags)]
47906    #[doc = "Optional. True, if the user is allowed to send audios"]
47907    #[serde(
47908        skip_serializing_if = "Option::is_none",
47909        rename = "can_send_audios",
47910        default
47911    )]
47912    pub can_send_audios: Option<bool>,
47913    #[allow(rustdoc::invalid_html_tags)]
47914    #[doc = "Optional. True, if the user is allowed to send documents"]
47915    #[serde(
47916        skip_serializing_if = "Option::is_none",
47917        rename = "can_send_documents",
47918        default
47919    )]
47920    pub can_send_documents: Option<bool>,
47921    #[allow(rustdoc::invalid_html_tags)]
47922    #[doc = "Optional. True, if the user is allowed to send photos"]
47923    #[serde(
47924        skip_serializing_if = "Option::is_none",
47925        rename = "can_send_photos",
47926        default
47927    )]
47928    pub can_send_photos: Option<bool>,
47929    #[allow(rustdoc::invalid_html_tags)]
47930    #[doc = "Optional. True, if the user is allowed to send videos"]
47931    #[serde(
47932        skip_serializing_if = "Option::is_none",
47933        rename = "can_send_videos",
47934        default
47935    )]
47936    pub can_send_videos: Option<bool>,
47937    #[allow(rustdoc::invalid_html_tags)]
47938    #[doc = "Optional. True, if the user is allowed to send video notes"]
47939    #[serde(
47940        skip_serializing_if = "Option::is_none",
47941        rename = "can_send_video_notes",
47942        default
47943    )]
47944    pub can_send_video_notes: Option<bool>,
47945    #[allow(rustdoc::invalid_html_tags)]
47946    #[doc = "Optional. True, if the user is allowed to send voice notes"]
47947    #[serde(
47948        skip_serializing_if = "Option::is_none",
47949        rename = "can_send_voice_notes",
47950        default
47951    )]
47952    pub can_send_voice_notes: Option<bool>,
47953    #[allow(rustdoc::invalid_html_tags)]
47954    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
47955    #[serde(
47956        skip_serializing_if = "Option::is_none",
47957        rename = "can_send_polls",
47958        default
47959    )]
47960    pub can_send_polls: Option<bool>,
47961    #[allow(rustdoc::invalid_html_tags)]
47962    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
47963    #[serde(
47964        skip_serializing_if = "Option::is_none",
47965        rename = "can_send_other_messages",
47966        default
47967    )]
47968    pub can_send_other_messages: Option<bool>,
47969    #[allow(rustdoc::invalid_html_tags)]
47970    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
47971    #[serde(
47972        skip_serializing_if = "Option::is_none",
47973        rename = "can_add_web_page_previews",
47974        default
47975    )]
47976    pub can_add_web_page_previews: Option<bool>,
47977    #[allow(rustdoc::invalid_html_tags)]
47978    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
47979    #[serde(
47980        skip_serializing_if = "Option::is_none",
47981        rename = "can_change_info",
47982        default
47983    )]
47984    pub can_change_info: Option<bool>,
47985    #[allow(rustdoc::invalid_html_tags)]
47986    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
47987    #[serde(
47988        skip_serializing_if = "Option::is_none",
47989        rename = "can_invite_users",
47990        default
47991    )]
47992    pub can_invite_users: Option<bool>,
47993    #[allow(rustdoc::invalid_html_tags)]
47994    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
47995    #[serde(
47996        skip_serializing_if = "Option::is_none",
47997        rename = "can_pin_messages",
47998        default
47999    )]
48000    pub can_pin_messages: Option<bool>,
48001    #[allow(rustdoc::invalid_html_tags)]
48002    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
48003    #[serde(
48004        skip_serializing_if = "Option::is_none",
48005        rename = "can_manage_topics",
48006        default
48007    )]
48008    pub can_manage_topics: Option<bool>,
48009}
48010#[allow(rustdoc::invalid_html_tags)]
48011#[doc = "Companion type to ChatPermissions that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
48012#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48013pub struct NoSkipChatPermissions {
48014    pub can_send_messages: Option<bool>,
48015    pub can_send_audios: Option<bool>,
48016    pub can_send_documents: Option<bool>,
48017    pub can_send_photos: Option<bool>,
48018    pub can_send_videos: Option<bool>,
48019    pub can_send_video_notes: Option<bool>,
48020    pub can_send_voice_notes: Option<bool>,
48021    pub can_send_polls: Option<bool>,
48022    pub can_send_other_messages: Option<bool>,
48023    pub can_add_web_page_previews: Option<bool>,
48024    pub can_change_info: Option<bool>,
48025    pub can_invite_users: Option<bool>,
48026    pub can_pin_messages: Option<bool>,
48027    pub can_manage_topics: Option<bool>,
48028}
48029impl From<NoSkipChatPermissions> for ChatPermissions {
48030    fn from(t: NoSkipChatPermissions) -> Self {
48031        Self {
48032            can_send_messages: t.can_send_messages,
48033            can_send_audios: t.can_send_audios,
48034            can_send_documents: t.can_send_documents,
48035            can_send_photos: t.can_send_photos,
48036            can_send_videos: t.can_send_videos,
48037            can_send_video_notes: t.can_send_video_notes,
48038            can_send_voice_notes: t.can_send_voice_notes,
48039            can_send_polls: t.can_send_polls,
48040            can_send_other_messages: t.can_send_other_messages,
48041            can_add_web_page_previews: t.can_add_web_page_previews,
48042            can_change_info: t.can_change_info,
48043            can_invite_users: t.can_invite_users,
48044            can_pin_messages: t.can_pin_messages,
48045            can_manage_topics: t.can_manage_topics,
48046        }
48047    }
48048}
48049#[allow(clippy::from_over_into)]
48050impl Into<NoSkipChatPermissions> for ChatPermissions {
48051    fn into(self) -> NoSkipChatPermissions {
48052        NoSkipChatPermissions {
48053            can_send_messages: self.can_send_messages,
48054            can_send_audios: self.can_send_audios,
48055            can_send_documents: self.can_send_documents,
48056            can_send_photos: self.can_send_photos,
48057            can_send_videos: self.can_send_videos,
48058            can_send_video_notes: self.can_send_video_notes,
48059            can_send_voice_notes: self.can_send_voice_notes,
48060            can_send_polls: self.can_send_polls,
48061            can_send_other_messages: self.can_send_other_messages,
48062            can_add_web_page_previews: self.can_add_web_page_previews,
48063            can_change_info: self.can_change_info,
48064            can_invite_users: self.can_invite_users,
48065            can_pin_messages: self.can_pin_messages,
48066            can_manage_topics: self.can_manage_topics,
48067        }
48068    }
48069}
48070impl NoSkipChatPermissions {
48071    pub fn skip(self) -> ChatPermissions {
48072        self.into()
48073    }
48074}
48075impl ChatPermissions {
48076    pub fn noskip(self) -> NoSkipChatPermissions {
48077        self.into()
48078    }
48079}
48080#[allow(rustdoc::invalid_html_tags)]
48081#[doc = "Describes actions that a non-administrator user is allowed to take in a chat."]
48082#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48083pub struct ChatPermissionsBuilder {
48084    #[allow(rustdoc::invalid_html_tags)]
48085    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
48086    #[serde(
48087        skip_serializing_if = "Option::is_none",
48088        rename = "can_send_messages",
48089        default
48090    )]
48091    pub can_send_messages: Option<bool>,
48092    #[allow(rustdoc::invalid_html_tags)]
48093    #[doc = "Optional. True, if the user is allowed to send audios"]
48094    #[serde(
48095        skip_serializing_if = "Option::is_none",
48096        rename = "can_send_audios",
48097        default
48098    )]
48099    pub can_send_audios: Option<bool>,
48100    #[allow(rustdoc::invalid_html_tags)]
48101    #[doc = "Optional. True, if the user is allowed to send documents"]
48102    #[serde(
48103        skip_serializing_if = "Option::is_none",
48104        rename = "can_send_documents",
48105        default
48106    )]
48107    pub can_send_documents: Option<bool>,
48108    #[allow(rustdoc::invalid_html_tags)]
48109    #[doc = "Optional. True, if the user is allowed to send photos"]
48110    #[serde(
48111        skip_serializing_if = "Option::is_none",
48112        rename = "can_send_photos",
48113        default
48114    )]
48115    pub can_send_photos: Option<bool>,
48116    #[allow(rustdoc::invalid_html_tags)]
48117    #[doc = "Optional. True, if the user is allowed to send videos"]
48118    #[serde(
48119        skip_serializing_if = "Option::is_none",
48120        rename = "can_send_videos",
48121        default
48122    )]
48123    pub can_send_videos: Option<bool>,
48124    #[allow(rustdoc::invalid_html_tags)]
48125    #[doc = "Optional. True, if the user is allowed to send video notes"]
48126    #[serde(
48127        skip_serializing_if = "Option::is_none",
48128        rename = "can_send_video_notes",
48129        default
48130    )]
48131    pub can_send_video_notes: Option<bool>,
48132    #[allow(rustdoc::invalid_html_tags)]
48133    #[doc = "Optional. True, if the user is allowed to send voice notes"]
48134    #[serde(
48135        skip_serializing_if = "Option::is_none",
48136        rename = "can_send_voice_notes",
48137        default
48138    )]
48139    pub can_send_voice_notes: Option<bool>,
48140    #[allow(rustdoc::invalid_html_tags)]
48141    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
48142    #[serde(
48143        skip_serializing_if = "Option::is_none",
48144        rename = "can_send_polls",
48145        default
48146    )]
48147    pub can_send_polls: Option<bool>,
48148    #[allow(rustdoc::invalid_html_tags)]
48149    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
48150    #[serde(
48151        skip_serializing_if = "Option::is_none",
48152        rename = "can_send_other_messages",
48153        default
48154    )]
48155    pub can_send_other_messages: Option<bool>,
48156    #[allow(rustdoc::invalid_html_tags)]
48157    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
48158    #[serde(
48159        skip_serializing_if = "Option::is_none",
48160        rename = "can_add_web_page_previews",
48161        default
48162    )]
48163    pub can_add_web_page_previews: Option<bool>,
48164    #[allow(rustdoc::invalid_html_tags)]
48165    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
48166    #[serde(
48167        skip_serializing_if = "Option::is_none",
48168        rename = "can_change_info",
48169        default
48170    )]
48171    pub can_change_info: Option<bool>,
48172    #[allow(rustdoc::invalid_html_tags)]
48173    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
48174    #[serde(
48175        skip_serializing_if = "Option::is_none",
48176        rename = "can_invite_users",
48177        default
48178    )]
48179    pub can_invite_users: Option<bool>,
48180    #[allow(rustdoc::invalid_html_tags)]
48181    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
48182    #[serde(
48183        skip_serializing_if = "Option::is_none",
48184        rename = "can_pin_messages",
48185        default
48186    )]
48187    pub can_pin_messages: Option<bool>,
48188    #[allow(rustdoc::invalid_html_tags)]
48189    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
48190    #[serde(
48191        skip_serializing_if = "Option::is_none",
48192        rename = "can_manage_topics",
48193        default
48194    )]
48195    pub can_manage_topics: Option<bool>,
48196}
48197impl ChatPermissionsBuilder {
48198    #[allow(clippy::too_many_arguments)]
48199    pub fn new() -> Self {
48200        Self {
48201            can_send_messages: None,
48202            can_send_audios: None,
48203            can_send_documents: None,
48204            can_send_photos: None,
48205            can_send_videos: None,
48206            can_send_video_notes: None,
48207            can_send_voice_notes: None,
48208            can_send_polls: None,
48209            can_send_other_messages: None,
48210            can_add_web_page_previews: None,
48211            can_change_info: None,
48212            can_invite_users: None,
48213            can_pin_messages: None,
48214            can_manage_topics: None,
48215        }
48216    }
48217    #[allow(rustdoc::invalid_html_tags)]
48218    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
48219    pub fn set_can_send_messages(mut self, can_send_messages: bool) -> Self {
48220        self.can_send_messages = Some(can_send_messages);
48221        self
48222    }
48223    #[allow(rustdoc::invalid_html_tags)]
48224    #[doc = "Optional. True, if the user is allowed to send audios"]
48225    pub fn set_can_send_audios(mut self, can_send_audios: bool) -> Self {
48226        self.can_send_audios = Some(can_send_audios);
48227        self
48228    }
48229    #[allow(rustdoc::invalid_html_tags)]
48230    #[doc = "Optional. True, if the user is allowed to send documents"]
48231    pub fn set_can_send_documents(mut self, can_send_documents: bool) -> Self {
48232        self.can_send_documents = Some(can_send_documents);
48233        self
48234    }
48235    #[allow(rustdoc::invalid_html_tags)]
48236    #[doc = "Optional. True, if the user is allowed to send photos"]
48237    pub fn set_can_send_photos(mut self, can_send_photos: bool) -> Self {
48238        self.can_send_photos = Some(can_send_photos);
48239        self
48240    }
48241    #[allow(rustdoc::invalid_html_tags)]
48242    #[doc = "Optional. True, if the user is allowed to send videos"]
48243    pub fn set_can_send_videos(mut self, can_send_videos: bool) -> Self {
48244        self.can_send_videos = Some(can_send_videos);
48245        self
48246    }
48247    #[allow(rustdoc::invalid_html_tags)]
48248    #[doc = "Optional. True, if the user is allowed to send video notes"]
48249    pub fn set_can_send_video_notes(mut self, can_send_video_notes: bool) -> Self {
48250        self.can_send_video_notes = Some(can_send_video_notes);
48251        self
48252    }
48253    #[allow(rustdoc::invalid_html_tags)]
48254    #[doc = "Optional. True, if the user is allowed to send voice notes"]
48255    pub fn set_can_send_voice_notes(mut self, can_send_voice_notes: bool) -> Self {
48256        self.can_send_voice_notes = Some(can_send_voice_notes);
48257        self
48258    }
48259    #[allow(rustdoc::invalid_html_tags)]
48260    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
48261    pub fn set_can_send_polls(mut self, can_send_polls: bool) -> Self {
48262        self.can_send_polls = Some(can_send_polls);
48263        self
48264    }
48265    #[allow(rustdoc::invalid_html_tags)]
48266    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
48267    pub fn set_can_send_other_messages(mut self, can_send_other_messages: bool) -> Self {
48268        self.can_send_other_messages = Some(can_send_other_messages);
48269        self
48270    }
48271    #[allow(rustdoc::invalid_html_tags)]
48272    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
48273    pub fn set_can_add_web_page_previews(mut self, can_add_web_page_previews: bool) -> Self {
48274        self.can_add_web_page_previews = Some(can_add_web_page_previews);
48275        self
48276    }
48277    #[allow(rustdoc::invalid_html_tags)]
48278    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
48279    pub fn set_can_change_info(mut self, can_change_info: bool) -> Self {
48280        self.can_change_info = Some(can_change_info);
48281        self
48282    }
48283    #[allow(rustdoc::invalid_html_tags)]
48284    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
48285    pub fn set_can_invite_users(mut self, can_invite_users: bool) -> Self {
48286        self.can_invite_users = Some(can_invite_users);
48287        self
48288    }
48289    #[allow(rustdoc::invalid_html_tags)]
48290    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
48291    pub fn set_can_pin_messages(mut self, can_pin_messages: bool) -> Self {
48292        self.can_pin_messages = Some(can_pin_messages);
48293        self
48294    }
48295    #[allow(rustdoc::invalid_html_tags)]
48296    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
48297    pub fn set_can_manage_topics(mut self, can_manage_topics: bool) -> Self {
48298        self.can_manage_topics = Some(can_manage_topics);
48299        self
48300    }
48301    pub fn build(self) -> ChatPermissions {
48302        ChatPermissions {
48303            can_send_messages: self.can_send_messages,
48304            can_send_audios: self.can_send_audios,
48305            can_send_documents: self.can_send_documents,
48306            can_send_photos: self.can_send_photos,
48307            can_send_videos: self.can_send_videos,
48308            can_send_video_notes: self.can_send_video_notes,
48309            can_send_voice_notes: self.can_send_voice_notes,
48310            can_send_polls: self.can_send_polls,
48311            can_send_other_messages: self.can_send_other_messages,
48312            can_add_web_page_previews: self.can_add_web_page_previews,
48313            can_change_info: self.can_change_info,
48314            can_invite_users: self.can_invite_users,
48315            can_pin_messages: self.can_pin_messages,
48316            can_manage_topics: self.can_manage_topics,
48317        }
48318    }
48319}
48320#[allow(rustdoc::invalid_html_tags)]
48321#[doc = "Contains a list of Telegram Star transactions."]
48322#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48323pub struct StarTransactions {
48324    #[allow(rustdoc::invalid_html_tags)]
48325    #[doc = "The list of transactions"]
48326    #[serde(rename = "transactions")]
48327    pub transactions: Vec<StarTransaction>,
48328}
48329#[allow(rustdoc::invalid_html_tags)]
48330#[doc = "Companion type to StarTransactions that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
48331#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48332pub struct NoSkipStarTransactions {
48333    #[allow(rustdoc::invalid_html_tags)]
48334    #[doc = "The list of transactions"]
48335    #[serde(rename = "transactions")]
48336    pub transactions: Vec<StarTransaction>,
48337}
48338impl From<NoSkipStarTransactions> for StarTransactions {
48339    fn from(t: NoSkipStarTransactions) -> Self {
48340        Self {
48341            transactions: t.transactions,
48342        }
48343    }
48344}
48345#[allow(clippy::from_over_into)]
48346impl Into<NoSkipStarTransactions> for StarTransactions {
48347    fn into(self) -> NoSkipStarTransactions {
48348        NoSkipStarTransactions {
48349            transactions: self.transactions,
48350        }
48351    }
48352}
48353impl NoSkipStarTransactions {
48354    pub fn skip(self) -> StarTransactions {
48355        self.into()
48356    }
48357}
48358impl StarTransactions {
48359    pub fn noskip(self) -> NoSkipStarTransactions {
48360        self.into()
48361    }
48362}
48363#[allow(rustdoc::invalid_html_tags)]
48364#[doc = "Contains a list of Telegram Star transactions."]
48365#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48366pub struct StarTransactionsBuilder {
48367    #[allow(rustdoc::invalid_html_tags)]
48368    #[doc = "The list of transactions"]
48369    #[serde(rename = "transactions")]
48370    pub transactions: Vec<StarTransaction>,
48371}
48372impl StarTransactionsBuilder {
48373    #[allow(clippy::too_many_arguments)]
48374    pub fn new(transactions: Vec<StarTransaction>) -> Self {
48375        Self { transactions }
48376    }
48377    #[allow(rustdoc::invalid_html_tags)]
48378    #[doc = "The list of transactions"]
48379    pub fn set_transactions(mut self, transactions: Vec<StarTransaction>) -> Self {
48380        self.transactions = transactions;
48381        self
48382    }
48383    pub fn build(self) -> StarTransactions {
48384        StarTransactions {
48385            transactions: self.transactions,
48386        }
48387    }
48388}
48389#[allow(rustdoc::invalid_html_tags)]
48390#[doc = "Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes."]
48391#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48392pub struct EncryptedCredentials {
48393    #[allow(rustdoc::invalid_html_tags)]
48394    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
48395    #[serde(rename = "data")]
48396    pub data: String,
48397    #[allow(rustdoc::invalid_html_tags)]
48398    #[doc = "Base64-encoded data hash for data authentication"]
48399    #[serde(rename = "hash")]
48400    pub hash: String,
48401    #[allow(rustdoc::invalid_html_tags)]
48402    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
48403    #[serde(rename = "secret")]
48404    pub secret: String,
48405}
48406#[allow(rustdoc::invalid_html_tags)]
48407#[doc = "Companion type to EncryptedCredentials that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
48408#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48409pub struct NoSkipEncryptedCredentials {
48410    #[allow(rustdoc::invalid_html_tags)]
48411    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
48412    #[serde(rename = "data")]
48413    pub data: String,
48414    #[allow(rustdoc::invalid_html_tags)]
48415    #[doc = "Base64-encoded data hash for data authentication"]
48416    #[serde(rename = "hash")]
48417    pub hash: String,
48418    #[allow(rustdoc::invalid_html_tags)]
48419    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
48420    #[serde(rename = "secret")]
48421    pub secret: String,
48422}
48423impl From<NoSkipEncryptedCredentials> for EncryptedCredentials {
48424    fn from(t: NoSkipEncryptedCredentials) -> Self {
48425        Self {
48426            data: t.data,
48427            hash: t.hash,
48428            secret: t.secret,
48429        }
48430    }
48431}
48432#[allow(clippy::from_over_into)]
48433impl Into<NoSkipEncryptedCredentials> for EncryptedCredentials {
48434    fn into(self) -> NoSkipEncryptedCredentials {
48435        NoSkipEncryptedCredentials {
48436            data: self.data,
48437            hash: self.hash,
48438            secret: self.secret,
48439        }
48440    }
48441}
48442impl NoSkipEncryptedCredentials {
48443    pub fn skip(self) -> EncryptedCredentials {
48444        self.into()
48445    }
48446}
48447impl EncryptedCredentials {
48448    pub fn noskip(self) -> NoSkipEncryptedCredentials {
48449        self.into()
48450    }
48451}
48452#[allow(rustdoc::invalid_html_tags)]
48453#[doc = "Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes."]
48454#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48455pub struct EncryptedCredentialsBuilder {
48456    #[allow(rustdoc::invalid_html_tags)]
48457    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
48458    #[serde(rename = "data")]
48459    pub data: String,
48460    #[allow(rustdoc::invalid_html_tags)]
48461    #[doc = "Base64-encoded data hash for data authentication"]
48462    #[serde(rename = "hash")]
48463    pub hash: String,
48464    #[allow(rustdoc::invalid_html_tags)]
48465    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
48466    #[serde(rename = "secret")]
48467    pub secret: String,
48468}
48469impl EncryptedCredentialsBuilder {
48470    #[allow(clippy::too_many_arguments)]
48471    pub fn new(data: String, hash: String, secret: String) -> Self {
48472        Self { data, hash, secret }
48473    }
48474    #[allow(rustdoc::invalid_html_tags)]
48475    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
48476    pub fn set_data(mut self, data: String) -> Self {
48477        self.data = data;
48478        self
48479    }
48480    #[allow(rustdoc::invalid_html_tags)]
48481    #[doc = "Base64-encoded data hash for data authentication"]
48482    pub fn set_hash(mut self, hash: String) -> Self {
48483        self.hash = hash;
48484        self
48485    }
48486    #[allow(rustdoc::invalid_html_tags)]
48487    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
48488    pub fn set_secret(mut self, secret: String) -> Self {
48489        self.secret = secret;
48490        self
48491    }
48492    pub fn build(self) -> EncryptedCredentials {
48493        EncryptedCredentials {
48494            data: self.data,
48495            hash: self.hash,
48496            secret: self.secret,
48497        }
48498    }
48499}
48500#[allow(rustdoc::invalid_html_tags)]
48501#[doc = "Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas."]
48502#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48503pub struct StoryAreaTypeSuggestedReaction {
48504    #[allow(rustdoc::invalid_html_tags)]
48505    #[doc = "Type of the area, always \"suggested_reaction\""]
48506    #[serde(rename = "type")]
48507    pub tg_type: String,
48508    #[allow(rustdoc::invalid_html_tags)]
48509    #[doc = "Type of the reaction"]
48510    #[serde(rename = "reaction_type")]
48511    pub reaction_type: BoxWrapper<Unbox<ReactionType>>,
48512    #[allow(rustdoc::invalid_html_tags)]
48513    #[doc = "Optional. Pass True if the reaction area has a dark background"]
48514    #[serde(skip_serializing_if = "Option::is_none", rename = "is_dark", default)]
48515    pub is_dark: Option<bool>,
48516    #[allow(rustdoc::invalid_html_tags)]
48517    #[doc = "Optional. Pass True if reaction area corner is flipped"]
48518    #[serde(
48519        skip_serializing_if = "Option::is_none",
48520        rename = "is_flipped",
48521        default
48522    )]
48523    pub is_flipped: Option<bool>,
48524}
48525#[allow(rustdoc::invalid_html_tags)]
48526#[doc = "Companion type to StoryAreaTypeSuggestedReaction that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
48527#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48528pub struct NoSkipStoryAreaTypeSuggestedReaction {
48529    #[allow(rustdoc::invalid_html_tags)]
48530    #[doc = "Type of the area, always \"suggested_reaction\""]
48531    #[serde(rename = "type")]
48532    pub tg_type: String,
48533    #[allow(rustdoc::invalid_html_tags)]
48534    #[doc = "Type of the reaction"]
48535    #[serde(rename = "reaction_type")]
48536    pub reaction_type: BoxWrapper<Unbox<ReactionType>>,
48537    pub is_dark: Option<bool>,
48538    pub is_flipped: Option<bool>,
48539}
48540impl From<NoSkipStoryAreaTypeSuggestedReaction> for StoryAreaTypeSuggestedReaction {
48541    fn from(t: NoSkipStoryAreaTypeSuggestedReaction) -> Self {
48542        Self {
48543            tg_type: t.tg_type,
48544            reaction_type: t.reaction_type,
48545            is_dark: t.is_dark,
48546            is_flipped: t.is_flipped,
48547        }
48548    }
48549}
48550#[allow(clippy::from_over_into)]
48551impl Into<NoSkipStoryAreaTypeSuggestedReaction> for StoryAreaTypeSuggestedReaction {
48552    fn into(self) -> NoSkipStoryAreaTypeSuggestedReaction {
48553        NoSkipStoryAreaTypeSuggestedReaction {
48554            tg_type: self.tg_type,
48555            reaction_type: self.reaction_type,
48556            is_dark: self.is_dark,
48557            is_flipped: self.is_flipped,
48558        }
48559    }
48560}
48561impl NoSkipStoryAreaTypeSuggestedReaction {
48562    pub fn skip(self) -> StoryAreaTypeSuggestedReaction {
48563        self.into()
48564    }
48565}
48566impl StoryAreaTypeSuggestedReaction {
48567    pub fn noskip(self) -> NoSkipStoryAreaTypeSuggestedReaction {
48568        self.into()
48569    }
48570}
48571#[allow(rustdoc::invalid_html_tags)]
48572#[doc = "Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas."]
48573#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48574pub struct StoryAreaTypeSuggestedReactionBuilder {
48575    #[allow(rustdoc::invalid_html_tags)]
48576    #[doc = "Type of the area, always \"suggested_reaction\""]
48577    #[serde(rename = "type")]
48578    pub tg_type: String,
48579    #[allow(rustdoc::invalid_html_tags)]
48580    #[doc = "Type of the reaction"]
48581    #[serde(rename = "reaction_type")]
48582    pub reaction_type: BoxWrapper<Unbox<ReactionType>>,
48583    #[allow(rustdoc::invalid_html_tags)]
48584    #[doc = "Optional. Pass True if the reaction area has a dark background"]
48585    #[serde(skip_serializing_if = "Option::is_none", rename = "is_dark", default)]
48586    pub is_dark: Option<bool>,
48587    #[allow(rustdoc::invalid_html_tags)]
48588    #[doc = "Optional. Pass True if reaction area corner is flipped"]
48589    #[serde(
48590        skip_serializing_if = "Option::is_none",
48591        rename = "is_flipped",
48592        default
48593    )]
48594    pub is_flipped: Option<bool>,
48595}
48596impl StoryAreaTypeSuggestedReactionBuilder {
48597    #[allow(clippy::too_many_arguments)]
48598    pub fn new<A: Into<ReactionType>>(reaction_type: A) -> Self {
48599        Self {
48600            tg_type: "StoryAreaTypeSuggestedReaction".to_owned(),
48601            reaction_type: BoxWrapper::new_unbox(reaction_type.into()),
48602            is_dark: None,
48603            is_flipped: None,
48604        }
48605    }
48606    #[allow(rustdoc::invalid_html_tags)]
48607    #[doc = "Type of the area, always \"suggested_reaction\""]
48608    pub fn set_type(mut self, tg_type: String) -> Self {
48609        self.tg_type = tg_type;
48610        self
48611    }
48612    #[allow(rustdoc::invalid_html_tags)]
48613    #[doc = "Type of the reaction"]
48614    pub fn set_reaction_type(mut self, reaction_type: ReactionType) -> Self {
48615        self.reaction_type = BoxWrapper(Unbox(reaction_type));
48616        self
48617    }
48618    #[allow(rustdoc::invalid_html_tags)]
48619    #[doc = "Optional. Pass True if the reaction area has a dark background"]
48620    pub fn set_is_dark(mut self, is_dark: bool) -> Self {
48621        self.is_dark = Some(is_dark);
48622        self
48623    }
48624    #[allow(rustdoc::invalid_html_tags)]
48625    #[doc = "Optional. Pass True if reaction area corner is flipped"]
48626    pub fn set_is_flipped(mut self, is_flipped: bool) -> Self {
48627        self.is_flipped = Some(is_flipped);
48628        self
48629    }
48630    pub fn build(self) -> StoryAreaTypeSuggestedReaction {
48631        StoryAreaTypeSuggestedReaction {
48632            tg_type: self.tg_type,
48633            reaction_type: self.reaction_type,
48634            is_dark: self.is_dark,
48635            is_flipped: self.is_flipped,
48636        }
48637    }
48638}
48639#[allow(rustdoc::invalid_html_tags)]
48640#[doc = "Describes a service message about tasks added to a checklist."]
48641#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48642pub struct ChecklistTasksAdded {
48643    #[allow(rustdoc::invalid_html_tags)]
48644    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
48645    #[serde(
48646        skip_serializing_if = "Option::is_none",
48647        rename = "checklist_message",
48648        default
48649    )]
48650    pub checklist_message: Option<BoxWrapper<Unbox<Message>>>,
48651    #[allow(rustdoc::invalid_html_tags)]
48652    #[doc = "List of tasks added to the checklist"]
48653    #[serde(rename = "tasks")]
48654    pub tasks: Vec<ChecklistTask>,
48655}
48656#[allow(rustdoc::invalid_html_tags)]
48657#[doc = "Companion type to ChecklistTasksAdded that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
48658#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48659pub struct NoSkipChecklistTasksAdded {
48660    pub checklist_message: Option<BoxWrapper<Unbox<Message>>>,
48661    #[allow(rustdoc::invalid_html_tags)]
48662    #[doc = "List of tasks added to the checklist"]
48663    #[serde(rename = "tasks")]
48664    pub tasks: Vec<ChecklistTask>,
48665}
48666impl From<NoSkipChecklistTasksAdded> for ChecklistTasksAdded {
48667    fn from(t: NoSkipChecklistTasksAdded) -> Self {
48668        Self {
48669            checklist_message: t.checklist_message,
48670            tasks: t.tasks,
48671        }
48672    }
48673}
48674#[allow(clippy::from_over_into)]
48675impl Into<NoSkipChecklistTasksAdded> for ChecklistTasksAdded {
48676    fn into(self) -> NoSkipChecklistTasksAdded {
48677        NoSkipChecklistTasksAdded {
48678            checklist_message: self.checklist_message,
48679            tasks: self.tasks,
48680        }
48681    }
48682}
48683impl NoSkipChecklistTasksAdded {
48684    pub fn skip(self) -> ChecklistTasksAdded {
48685        self.into()
48686    }
48687}
48688impl ChecklistTasksAdded {
48689    pub fn noskip(self) -> NoSkipChecklistTasksAdded {
48690        self.into()
48691    }
48692}
48693#[allow(rustdoc::invalid_html_tags)]
48694#[doc = "Describes a service message about tasks added to a checklist."]
48695#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48696pub struct ChecklistTasksAddedBuilder {
48697    #[allow(rustdoc::invalid_html_tags)]
48698    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
48699    #[serde(
48700        skip_serializing_if = "Option::is_none",
48701        rename = "checklist_message",
48702        default
48703    )]
48704    pub checklist_message: Option<BoxWrapper<Unbox<Message>>>,
48705    #[allow(rustdoc::invalid_html_tags)]
48706    #[doc = "List of tasks added to the checklist"]
48707    #[serde(rename = "tasks")]
48708    pub tasks: Vec<ChecklistTask>,
48709}
48710impl ChecklistTasksAddedBuilder {
48711    #[allow(clippy::too_many_arguments)]
48712    pub fn new(tasks: Vec<ChecklistTask>) -> Self {
48713        Self {
48714            tasks,
48715            checklist_message: None,
48716        }
48717    }
48718    #[allow(rustdoc::invalid_html_tags)]
48719    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
48720    pub fn set_checklist_message(mut self, checklist_message: Message) -> Self {
48721        self.checklist_message = Some(BoxWrapper(Unbox(checklist_message)));
48722        self
48723    }
48724    #[allow(rustdoc::invalid_html_tags)]
48725    #[doc = "List of tasks added to the checklist"]
48726    pub fn set_tasks(mut self, tasks: Vec<ChecklistTask>) -> Self {
48727        self.tasks = tasks;
48728        self
48729    }
48730    pub fn build(self) -> ChecklistTasksAdded {
48731        ChecklistTasksAdded {
48732            checklist_message: self.checklist_message,
48733            tasks: self.tasks,
48734        }
48735    }
48736}
48737#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48738#[serde(untagged)]
48739pub enum InputMessageContent {
48740    InputTextMessageContent(InputTextMessageContent),
48741    InputLocationMessageContent(InputLocationMessageContent),
48742    InputVenueMessageContent(InputVenueMessageContent),
48743    InputContactMessageContent(InputContactMessageContent),
48744    InputInvoiceMessageContent(InputInvoiceMessageContent),
48745}
48746impl Default for InputMessageContent {
48747    fn default() -> Self {
48748        InputMessageContent::InputTextMessageContent(InputTextMessageContent::default())
48749    }
48750}
48751impl InputMessageContent {}
48752#[allow(rustdoc::invalid_html_tags)]
48753#[doc = "The background is a gradient fill."]
48754#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48755pub struct BackgroundFillGradient {
48756    #[allow(rustdoc::invalid_html_tags)]
48757    #[doc = "Type of the background fill, always \"gradient\""]
48758    #[serde(rename = "type")]
48759    pub tg_type: String,
48760    #[allow(rustdoc::invalid_html_tags)]
48761    #[doc = "Top color of the gradient in the RGB24 format"]
48762    #[serde(rename = "top_color")]
48763    pub top_color: i64,
48764    #[allow(rustdoc::invalid_html_tags)]
48765    #[doc = "Bottom color of the gradient in the RGB24 format"]
48766    #[serde(rename = "bottom_color")]
48767    pub bottom_color: i64,
48768    #[allow(rustdoc::invalid_html_tags)]
48769    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
48770    #[serde(rename = "rotation_angle")]
48771    pub rotation_angle: i64,
48772}
48773#[allow(rustdoc::invalid_html_tags)]
48774#[doc = "Companion type to BackgroundFillGradient that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
48775#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48776pub struct NoSkipBackgroundFillGradient {
48777    #[allow(rustdoc::invalid_html_tags)]
48778    #[doc = "Type of the background fill, always \"gradient\""]
48779    #[serde(rename = "type")]
48780    pub tg_type: String,
48781    #[allow(rustdoc::invalid_html_tags)]
48782    #[doc = "Top color of the gradient in the RGB24 format"]
48783    #[serde(rename = "top_color")]
48784    pub top_color: i64,
48785    #[allow(rustdoc::invalid_html_tags)]
48786    #[doc = "Bottom color of the gradient in the RGB24 format"]
48787    #[serde(rename = "bottom_color")]
48788    pub bottom_color: i64,
48789    #[allow(rustdoc::invalid_html_tags)]
48790    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
48791    #[serde(rename = "rotation_angle")]
48792    pub rotation_angle: i64,
48793}
48794impl From<NoSkipBackgroundFillGradient> for BackgroundFillGradient {
48795    fn from(t: NoSkipBackgroundFillGradient) -> Self {
48796        Self {
48797            tg_type: t.tg_type,
48798            top_color: t.top_color,
48799            bottom_color: t.bottom_color,
48800            rotation_angle: t.rotation_angle,
48801        }
48802    }
48803}
48804#[allow(clippy::from_over_into)]
48805impl Into<NoSkipBackgroundFillGradient> for BackgroundFillGradient {
48806    fn into(self) -> NoSkipBackgroundFillGradient {
48807        NoSkipBackgroundFillGradient {
48808            tg_type: self.tg_type,
48809            top_color: self.top_color,
48810            bottom_color: self.bottom_color,
48811            rotation_angle: self.rotation_angle,
48812        }
48813    }
48814}
48815impl NoSkipBackgroundFillGradient {
48816    pub fn skip(self) -> BackgroundFillGradient {
48817        self.into()
48818    }
48819}
48820impl BackgroundFillGradient {
48821    pub fn noskip(self) -> NoSkipBackgroundFillGradient {
48822        self.into()
48823    }
48824}
48825#[allow(rustdoc::invalid_html_tags)]
48826#[doc = "The background is a gradient fill."]
48827#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48828pub struct BackgroundFillGradientBuilder {
48829    #[allow(rustdoc::invalid_html_tags)]
48830    #[doc = "Type of the background fill, always \"gradient\""]
48831    #[serde(rename = "type")]
48832    pub tg_type: String,
48833    #[allow(rustdoc::invalid_html_tags)]
48834    #[doc = "Top color of the gradient in the RGB24 format"]
48835    #[serde(rename = "top_color")]
48836    pub top_color: i64,
48837    #[allow(rustdoc::invalid_html_tags)]
48838    #[doc = "Bottom color of the gradient in the RGB24 format"]
48839    #[serde(rename = "bottom_color")]
48840    pub bottom_color: i64,
48841    #[allow(rustdoc::invalid_html_tags)]
48842    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
48843    #[serde(rename = "rotation_angle")]
48844    pub rotation_angle: i64,
48845}
48846impl BackgroundFillGradientBuilder {
48847    #[allow(clippy::too_many_arguments)]
48848    pub fn new(top_color: i64, bottom_color: i64, rotation_angle: i64) -> Self {
48849        Self {
48850            tg_type: "BackgroundFillGradient".to_owned(),
48851            top_color,
48852            bottom_color,
48853            rotation_angle,
48854        }
48855    }
48856    #[allow(rustdoc::invalid_html_tags)]
48857    #[doc = "Type of the background fill, always \"gradient\""]
48858    pub fn set_type(mut self, tg_type: String) -> Self {
48859        self.tg_type = tg_type;
48860        self
48861    }
48862    #[allow(rustdoc::invalid_html_tags)]
48863    #[doc = "Top color of the gradient in the RGB24 format"]
48864    pub fn set_top_color(mut self, top_color: i64) -> Self {
48865        self.top_color = top_color;
48866        self
48867    }
48868    #[allow(rustdoc::invalid_html_tags)]
48869    #[doc = "Bottom color of the gradient in the RGB24 format"]
48870    pub fn set_bottom_color(mut self, bottom_color: i64) -> Self {
48871        self.bottom_color = bottom_color;
48872        self
48873    }
48874    #[allow(rustdoc::invalid_html_tags)]
48875    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
48876    pub fn set_rotation_angle(mut self, rotation_angle: i64) -> Self {
48877        self.rotation_angle = rotation_angle;
48878        self
48879    }
48880    pub fn build(self) -> BackgroundFillGradient {
48881        BackgroundFillGradient {
48882            tg_type: self.tg_type,
48883            top_color: self.top_color,
48884            bottom_color: self.bottom_color,
48885            rotation_angle: self.rotation_angle,
48886        }
48887    }
48888}
48889#[allow(rustdoc::invalid_html_tags)]
48890#[doc = "Describes a service message about a payment refund for a suggested post."]
48891#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48892pub struct SuggestedPostRefunded {
48893    #[allow(rustdoc::invalid_html_tags)]
48894    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
48895    #[serde(
48896        skip_serializing_if = "Option::is_none",
48897        rename = "suggested_post_message",
48898        default
48899    )]
48900    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
48901    #[allow(rustdoc::invalid_html_tags)]
48902    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
48903    #[serde(rename = "reason")]
48904    pub reason: String,
48905}
48906#[allow(rustdoc::invalid_html_tags)]
48907#[doc = "Companion type to SuggestedPostRefunded that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
48908#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48909pub struct NoSkipSuggestedPostRefunded {
48910    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
48911    #[allow(rustdoc::invalid_html_tags)]
48912    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
48913    #[serde(rename = "reason")]
48914    pub reason: String,
48915}
48916impl From<NoSkipSuggestedPostRefunded> for SuggestedPostRefunded {
48917    fn from(t: NoSkipSuggestedPostRefunded) -> Self {
48918        Self {
48919            suggested_post_message: t.suggested_post_message,
48920            reason: t.reason,
48921        }
48922    }
48923}
48924#[allow(clippy::from_over_into)]
48925impl Into<NoSkipSuggestedPostRefunded> for SuggestedPostRefunded {
48926    fn into(self) -> NoSkipSuggestedPostRefunded {
48927        NoSkipSuggestedPostRefunded {
48928            suggested_post_message: self.suggested_post_message,
48929            reason: self.reason,
48930        }
48931    }
48932}
48933impl NoSkipSuggestedPostRefunded {
48934    pub fn skip(self) -> SuggestedPostRefunded {
48935        self.into()
48936    }
48937}
48938impl SuggestedPostRefunded {
48939    pub fn noskip(self) -> NoSkipSuggestedPostRefunded {
48940        self.into()
48941    }
48942}
48943#[allow(rustdoc::invalid_html_tags)]
48944#[doc = "Describes a service message about a payment refund for a suggested post."]
48945#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48946pub struct SuggestedPostRefundedBuilder {
48947    #[allow(rustdoc::invalid_html_tags)]
48948    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
48949    #[serde(
48950        skip_serializing_if = "Option::is_none",
48951        rename = "suggested_post_message",
48952        default
48953    )]
48954    pub suggested_post_message: Option<BoxWrapper<Box<Message>>>,
48955    #[allow(rustdoc::invalid_html_tags)]
48956    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
48957    #[serde(rename = "reason")]
48958    pub reason: String,
48959}
48960impl SuggestedPostRefundedBuilder {
48961    #[allow(clippy::too_many_arguments)]
48962    pub fn new(reason: String) -> Self {
48963        Self {
48964            reason,
48965            suggested_post_message: None,
48966        }
48967    }
48968    #[allow(rustdoc::invalid_html_tags)]
48969    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
48970    pub fn set_suggested_post_message(mut self, suggested_post_message: Box<Message>) -> Self {
48971        self.suggested_post_message = Some(BoxWrapper(suggested_post_message));
48972        self
48973    }
48974    #[allow(rustdoc::invalid_html_tags)]
48975    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
48976    pub fn set_reason(mut self, reason: String) -> Self {
48977        self.reason = reason;
48978        self
48979    }
48980    pub fn build(self) -> SuggestedPostRefunded {
48981        SuggestedPostRefunded {
48982            suggested_post_message: self.suggested_post_message,
48983            reason: self.reason,
48984        }
48985    }
48986}
48987#[allow(rustdoc::invalid_html_tags)]
48988#[doc = "This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present."]
48989#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
48990pub struct CallbackQuery {
48991    #[allow(rustdoc::invalid_html_tags)]
48992    #[doc = "Unique identifier for this query"]
48993    #[serde(rename = "id")]
48994    pub id: String,
48995    #[allow(rustdoc::invalid_html_tags)]
48996    #[doc = "Sender"]
48997    #[serde(rename = "from")]
48998    pub from: BoxWrapper<Unbox<User>>,
48999    #[allow(rustdoc::invalid_html_tags)]
49000    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
49001    #[serde(skip_serializing_if = "Option::is_none", rename = "message", default)]
49002    pub message: Option<BoxWrapper<Unbox<MaybeInaccessibleMessage>>>,
49003    #[allow(rustdoc::invalid_html_tags)]
49004    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
49005    #[serde(
49006        skip_serializing_if = "Option::is_none",
49007        rename = "inline_message_id",
49008        default
49009    )]
49010    pub inline_message_id: Option<String>,
49011    #[allow(rustdoc::invalid_html_tags)]
49012    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
49013    #[serde(rename = "chat_instance")]
49014    pub chat_instance: String,
49015    #[allow(rustdoc::invalid_html_tags)]
49016    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
49017    #[serde(skip_serializing_if = "Option::is_none", rename = "data", default)]
49018    pub data: Option<String>,
49019    #[allow(rustdoc::invalid_html_tags)]
49020    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
49021    #[serde(
49022        skip_serializing_if = "Option::is_none",
49023        rename = "game_short_name",
49024        default
49025    )]
49026    pub game_short_name: Option<String>,
49027}
49028#[allow(rustdoc::invalid_html_tags)]
49029#[doc = "Companion type to CallbackQuery that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
49030#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49031pub struct NoSkipCallbackQuery {
49032    #[allow(rustdoc::invalid_html_tags)]
49033    #[doc = "Unique identifier for this query"]
49034    #[serde(rename = "id")]
49035    pub id: String,
49036    #[allow(rustdoc::invalid_html_tags)]
49037    #[doc = "Sender"]
49038    #[serde(rename = "from")]
49039    pub from: BoxWrapper<Unbox<User>>,
49040    pub message: Option<BoxWrapper<Unbox<MaybeInaccessibleMessage>>>,
49041    pub inline_message_id: Option<String>,
49042    #[allow(rustdoc::invalid_html_tags)]
49043    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
49044    #[serde(rename = "chat_instance")]
49045    pub chat_instance: String,
49046    pub data: Option<String>,
49047    pub game_short_name: Option<String>,
49048}
49049impl From<NoSkipCallbackQuery> for CallbackQuery {
49050    fn from(t: NoSkipCallbackQuery) -> Self {
49051        Self {
49052            id: t.id,
49053            from: t.from,
49054            message: t.message,
49055            inline_message_id: t.inline_message_id,
49056            chat_instance: t.chat_instance,
49057            data: t.data,
49058            game_short_name: t.game_short_name,
49059        }
49060    }
49061}
49062#[allow(clippy::from_over_into)]
49063impl Into<NoSkipCallbackQuery> for CallbackQuery {
49064    fn into(self) -> NoSkipCallbackQuery {
49065        NoSkipCallbackQuery {
49066            id: self.id,
49067            from: self.from,
49068            message: self.message,
49069            inline_message_id: self.inline_message_id,
49070            chat_instance: self.chat_instance,
49071            data: self.data,
49072            game_short_name: self.game_short_name,
49073        }
49074    }
49075}
49076impl NoSkipCallbackQuery {
49077    pub fn skip(self) -> CallbackQuery {
49078        self.into()
49079    }
49080}
49081impl CallbackQuery {
49082    pub fn noskip(self) -> NoSkipCallbackQuery {
49083        self.into()
49084    }
49085}
49086#[allow(rustdoc::invalid_html_tags)]
49087#[doc = "This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present."]
49088#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49089pub struct CallbackQueryBuilder {
49090    #[allow(rustdoc::invalid_html_tags)]
49091    #[doc = "Unique identifier for this query"]
49092    #[serde(rename = "id")]
49093    pub id: String,
49094    #[allow(rustdoc::invalid_html_tags)]
49095    #[doc = "Sender"]
49096    #[serde(rename = "from")]
49097    pub from: BoxWrapper<Unbox<User>>,
49098    #[allow(rustdoc::invalid_html_tags)]
49099    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
49100    #[serde(skip_serializing_if = "Option::is_none", rename = "message", default)]
49101    pub message: Option<BoxWrapper<Unbox<MaybeInaccessibleMessage>>>,
49102    #[allow(rustdoc::invalid_html_tags)]
49103    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
49104    #[serde(
49105        skip_serializing_if = "Option::is_none",
49106        rename = "inline_message_id",
49107        default
49108    )]
49109    pub inline_message_id: Option<String>,
49110    #[allow(rustdoc::invalid_html_tags)]
49111    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
49112    #[serde(rename = "chat_instance")]
49113    pub chat_instance: String,
49114    #[allow(rustdoc::invalid_html_tags)]
49115    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
49116    #[serde(skip_serializing_if = "Option::is_none", rename = "data", default)]
49117    pub data: Option<String>,
49118    #[allow(rustdoc::invalid_html_tags)]
49119    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
49120    #[serde(
49121        skip_serializing_if = "Option::is_none",
49122        rename = "game_short_name",
49123        default
49124    )]
49125    pub game_short_name: Option<String>,
49126}
49127impl CallbackQueryBuilder {
49128    #[allow(clippy::too_many_arguments)]
49129    pub fn new<A: Into<User>>(id: String, from: A, chat_instance: String) -> Self {
49130        Self {
49131            id,
49132            from: BoxWrapper::new_unbox(from.into()),
49133            chat_instance,
49134            message: None,
49135            inline_message_id: None,
49136            data: None,
49137            game_short_name: None,
49138        }
49139    }
49140    #[allow(rustdoc::invalid_html_tags)]
49141    #[doc = "Unique identifier for this query"]
49142    pub fn set_id(mut self, id: String) -> Self {
49143        self.id = id;
49144        self
49145    }
49146    #[allow(rustdoc::invalid_html_tags)]
49147    #[doc = "Sender"]
49148    pub fn set_from(mut self, from: User) -> Self {
49149        self.from = BoxWrapper(Unbox(from));
49150        self
49151    }
49152    #[allow(rustdoc::invalid_html_tags)]
49153    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
49154    pub fn set_message(mut self, message: MaybeInaccessibleMessage) -> Self {
49155        self.message = Some(BoxWrapper(Unbox(message)));
49156        self
49157    }
49158    #[allow(rustdoc::invalid_html_tags)]
49159    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
49160    pub fn set_inline_message_id(mut self, inline_message_id: String) -> Self {
49161        self.inline_message_id = Some(inline_message_id);
49162        self
49163    }
49164    #[allow(rustdoc::invalid_html_tags)]
49165    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
49166    pub fn set_chat_instance(mut self, chat_instance: String) -> Self {
49167        self.chat_instance = chat_instance;
49168        self
49169    }
49170    #[allow(rustdoc::invalid_html_tags)]
49171    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
49172    pub fn set_data(mut self, data: String) -> Self {
49173        self.data = Some(data);
49174        self
49175    }
49176    #[allow(rustdoc::invalid_html_tags)]
49177    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
49178    pub fn set_game_short_name(mut self, game_short_name: String) -> Self {
49179        self.game_short_name = Some(game_short_name);
49180        self
49181    }
49182    pub fn build(self) -> CallbackQuery {
49183        CallbackQuery {
49184            id: self.id,
49185            from: self.from,
49186            message: self.message,
49187            inline_message_id: self.inline_message_id,
49188            chat_instance: self.chat_instance,
49189            data: self.data,
49190            game_short_name: self.game_short_name,
49191        }
49192    }
49193}
49194#[allow(rustdoc::invalid_html_tags)]
49195#[doc = "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes."]
49196#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49197pub struct PassportElementErrorFiles {
49198    #[allow(rustdoc::invalid_html_tags)]
49199    #[doc = "Error source, must be files"]
49200    #[serde(rename = "source")]
49201    pub source: String,
49202    #[allow(rustdoc::invalid_html_tags)]
49203    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
49204    #[serde(rename = "type")]
49205    pub tg_type: String,
49206    #[allow(rustdoc::invalid_html_tags)]
49207    #[doc = "List of base64-encoded file hashes"]
49208    #[serde(rename = "file_hashes")]
49209    pub file_hashes: Vec<String>,
49210    #[allow(rustdoc::invalid_html_tags)]
49211    #[doc = "Error message"]
49212    #[serde(rename = "message")]
49213    pub message: String,
49214}
49215#[allow(rustdoc::invalid_html_tags)]
49216#[doc = "Companion type to PassportElementErrorFiles that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
49217#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49218pub struct NoSkipPassportElementErrorFiles {
49219    #[allow(rustdoc::invalid_html_tags)]
49220    #[doc = "Error source, must be files"]
49221    #[serde(rename = "source")]
49222    pub source: String,
49223    #[allow(rustdoc::invalid_html_tags)]
49224    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
49225    #[serde(rename = "type")]
49226    pub tg_type: String,
49227    #[allow(rustdoc::invalid_html_tags)]
49228    #[doc = "List of base64-encoded file hashes"]
49229    #[serde(rename = "file_hashes")]
49230    pub file_hashes: Vec<String>,
49231    #[allow(rustdoc::invalid_html_tags)]
49232    #[doc = "Error message"]
49233    #[serde(rename = "message")]
49234    pub message: String,
49235}
49236impl From<NoSkipPassportElementErrorFiles> for PassportElementErrorFiles {
49237    fn from(t: NoSkipPassportElementErrorFiles) -> Self {
49238        Self {
49239            source: t.source,
49240            tg_type: t.tg_type,
49241            file_hashes: t.file_hashes,
49242            message: t.message,
49243        }
49244    }
49245}
49246#[allow(clippy::from_over_into)]
49247impl Into<NoSkipPassportElementErrorFiles> for PassportElementErrorFiles {
49248    fn into(self) -> NoSkipPassportElementErrorFiles {
49249        NoSkipPassportElementErrorFiles {
49250            source: self.source,
49251            tg_type: self.tg_type,
49252            file_hashes: self.file_hashes,
49253            message: self.message,
49254        }
49255    }
49256}
49257impl NoSkipPassportElementErrorFiles {
49258    pub fn skip(self) -> PassportElementErrorFiles {
49259        self.into()
49260    }
49261}
49262impl PassportElementErrorFiles {
49263    pub fn noskip(self) -> NoSkipPassportElementErrorFiles {
49264        self.into()
49265    }
49266}
49267#[allow(rustdoc::invalid_html_tags)]
49268#[doc = "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes."]
49269#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49270pub struct PassportElementErrorFilesBuilder {
49271    #[allow(rustdoc::invalid_html_tags)]
49272    #[doc = "Error source, must be files"]
49273    #[serde(rename = "source")]
49274    pub source: String,
49275    #[allow(rustdoc::invalid_html_tags)]
49276    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
49277    #[serde(rename = "type")]
49278    pub tg_type: String,
49279    #[allow(rustdoc::invalid_html_tags)]
49280    #[doc = "List of base64-encoded file hashes"]
49281    #[serde(rename = "file_hashes")]
49282    pub file_hashes: Vec<String>,
49283    #[allow(rustdoc::invalid_html_tags)]
49284    #[doc = "Error message"]
49285    #[serde(rename = "message")]
49286    pub message: String,
49287}
49288impl PassportElementErrorFilesBuilder {
49289    #[allow(clippy::too_many_arguments)]
49290    pub fn new(source: String, file_hashes: Vec<String>, message: String) -> Self {
49291        Self {
49292            tg_type: "PassportElementErrorFiles".to_owned(),
49293            source,
49294            file_hashes,
49295            message,
49296        }
49297    }
49298    #[allow(rustdoc::invalid_html_tags)]
49299    #[doc = "Error source, must be files"]
49300    pub fn set_source(mut self, source: String) -> Self {
49301        self.source = source;
49302        self
49303    }
49304    #[allow(rustdoc::invalid_html_tags)]
49305    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
49306    pub fn set_type(mut self, tg_type: String) -> Self {
49307        self.tg_type = tg_type;
49308        self
49309    }
49310    #[allow(rustdoc::invalid_html_tags)]
49311    #[doc = "List of base64-encoded file hashes"]
49312    pub fn set_file_hashes(mut self, file_hashes: Vec<String>) -> Self {
49313        self.file_hashes = file_hashes;
49314        self
49315    }
49316    #[allow(rustdoc::invalid_html_tags)]
49317    #[doc = "Error message"]
49318    pub fn set_message(mut self, message: String) -> Self {
49319        self.message = message;
49320        self
49321    }
49322    pub fn build(self) -> PassportElementErrorFiles {
49323        PassportElementErrorFiles {
49324            source: self.source,
49325            tg_type: self.tg_type,
49326            file_hashes: self.file_hashes,
49327            message: self.message,
49328        }
49329    }
49330}
49331#[allow(rustdoc::invalid_html_tags)]
49332#[doc = "Describes that no specific value for the menu button was set."]
49333#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49334pub struct MenuButtonDefault {
49335    #[allow(rustdoc::invalid_html_tags)]
49336    #[doc = "Type of the button, must be default"]
49337    #[serde(rename = "type")]
49338    pub tg_type: String,
49339}
49340#[allow(rustdoc::invalid_html_tags)]
49341#[doc = "Companion type to MenuButtonDefault that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
49342#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49343pub struct NoSkipMenuButtonDefault {
49344    #[allow(rustdoc::invalid_html_tags)]
49345    #[doc = "Type of the button, must be default"]
49346    #[serde(rename = "type")]
49347    pub tg_type: String,
49348}
49349impl From<NoSkipMenuButtonDefault> for MenuButtonDefault {
49350    fn from(t: NoSkipMenuButtonDefault) -> Self {
49351        Self { tg_type: t.tg_type }
49352    }
49353}
49354#[allow(clippy::from_over_into)]
49355impl Into<NoSkipMenuButtonDefault> for MenuButtonDefault {
49356    fn into(self) -> NoSkipMenuButtonDefault {
49357        NoSkipMenuButtonDefault {
49358            tg_type: self.tg_type,
49359        }
49360    }
49361}
49362impl NoSkipMenuButtonDefault {
49363    pub fn skip(self) -> MenuButtonDefault {
49364        self.into()
49365    }
49366}
49367impl MenuButtonDefault {
49368    pub fn noskip(self) -> NoSkipMenuButtonDefault {
49369        self.into()
49370    }
49371}
49372#[allow(rustdoc::invalid_html_tags)]
49373#[doc = "Describes that no specific value for the menu button was set."]
49374#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49375pub struct MenuButtonDefaultBuilder {
49376    #[allow(rustdoc::invalid_html_tags)]
49377    #[doc = "Type of the button, must be default"]
49378    #[serde(rename = "type")]
49379    pub tg_type: String,
49380}
49381impl MenuButtonDefaultBuilder {
49382    #[allow(clippy::too_many_arguments)]
49383    pub fn new() -> Self {
49384        Self {
49385            tg_type: "default".to_owned(),
49386        }
49387    }
49388    #[allow(rustdoc::invalid_html_tags)]
49389    #[doc = "Type of the button, must be default"]
49390    pub fn set_type(mut self, tg_type: String) -> Self {
49391        self.tg_type = tg_type;
49392        self
49393    }
49394    pub fn build(self) -> MenuButtonDefault {
49395        MenuButtonDefault {
49396            tg_type: self.tg_type,
49397        }
49398    }
49399}
49400#[allow(rustdoc::invalid_html_tags)]
49401#[doc = "This object represents a service message about an edited forum topic."]
49402#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49403pub struct ForumTopicEdited {
49404    #[allow(rustdoc::invalid_html_tags)]
49405    #[doc = "Optional. New name of the topic, if it was edited"]
49406    #[serde(skip_serializing_if = "Option::is_none", rename = "name", default)]
49407    pub name: Option<String>,
49408    #[allow(rustdoc::invalid_html_tags)]
49409    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
49410    #[serde(
49411        skip_serializing_if = "Option::is_none",
49412        rename = "icon_custom_emoji_id",
49413        default
49414    )]
49415    pub icon_custom_emoji_id: Option<String>,
49416}
49417#[allow(rustdoc::invalid_html_tags)]
49418#[doc = "Companion type to ForumTopicEdited that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
49419#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49420pub struct NoSkipForumTopicEdited {
49421    pub name: Option<String>,
49422    pub icon_custom_emoji_id: Option<String>,
49423}
49424impl From<NoSkipForumTopicEdited> for ForumTopicEdited {
49425    fn from(t: NoSkipForumTopicEdited) -> Self {
49426        Self {
49427            name: t.name,
49428            icon_custom_emoji_id: t.icon_custom_emoji_id,
49429        }
49430    }
49431}
49432#[allow(clippy::from_over_into)]
49433impl Into<NoSkipForumTopicEdited> for ForumTopicEdited {
49434    fn into(self) -> NoSkipForumTopicEdited {
49435        NoSkipForumTopicEdited {
49436            name: self.name,
49437            icon_custom_emoji_id: self.icon_custom_emoji_id,
49438        }
49439    }
49440}
49441impl NoSkipForumTopicEdited {
49442    pub fn skip(self) -> ForumTopicEdited {
49443        self.into()
49444    }
49445}
49446impl ForumTopicEdited {
49447    pub fn noskip(self) -> NoSkipForumTopicEdited {
49448        self.into()
49449    }
49450}
49451#[allow(rustdoc::invalid_html_tags)]
49452#[doc = "This object represents a service message about an edited forum topic."]
49453#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49454pub struct ForumTopicEditedBuilder {
49455    #[allow(rustdoc::invalid_html_tags)]
49456    #[doc = "Optional. New name of the topic, if it was edited"]
49457    #[serde(skip_serializing_if = "Option::is_none", rename = "name", default)]
49458    pub name: Option<String>,
49459    #[allow(rustdoc::invalid_html_tags)]
49460    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
49461    #[serde(
49462        skip_serializing_if = "Option::is_none",
49463        rename = "icon_custom_emoji_id",
49464        default
49465    )]
49466    pub icon_custom_emoji_id: Option<String>,
49467}
49468impl ForumTopicEditedBuilder {
49469    #[allow(clippy::too_many_arguments)]
49470    pub fn new() -> Self {
49471        Self {
49472            name: None,
49473            icon_custom_emoji_id: None,
49474        }
49475    }
49476    #[allow(rustdoc::invalid_html_tags)]
49477    #[doc = "Optional. New name of the topic, if it was edited"]
49478    pub fn set_name(mut self, name: String) -> Self {
49479        self.name = Some(name);
49480        self
49481    }
49482    #[allow(rustdoc::invalid_html_tags)]
49483    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
49484    pub fn set_icon_custom_emoji_id(mut self, icon_custom_emoji_id: String) -> Self {
49485        self.icon_custom_emoji_id = Some(icon_custom_emoji_id);
49486        self
49487    }
49488    pub fn build(self) -> ForumTopicEdited {
49489        ForumTopicEdited {
49490            name: self.name,
49491            icon_custom_emoji_id: self.icon_custom_emoji_id,
49492        }
49493    }
49494}
49495#[allow(rustdoc::invalid_html_tags)]
49496#[doc = "This object represents a service message about the completion of a giveaway without public winners."]
49497#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49498pub struct GiveawayCompleted {
49499    #[allow(rustdoc::invalid_html_tags)]
49500    #[doc = "Number of winners in the giveaway"]
49501    #[serde(rename = "winner_count")]
49502    pub winner_count: i64,
49503    #[allow(rustdoc::invalid_html_tags)]
49504    #[doc = "Optional. Number of undistributed prizes"]
49505    #[serde(
49506        skip_serializing_if = "Option::is_none",
49507        rename = "unclaimed_prize_count",
49508        default
49509    )]
49510    pub unclaimed_prize_count: Option<i64>,
49511    #[allow(rustdoc::invalid_html_tags)]
49512    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
49513    #[serde(
49514        skip_serializing_if = "Option::is_none",
49515        rename = "giveaway_message",
49516        default
49517    )]
49518    pub giveaway_message: Option<BoxWrapper<Unbox<Message>>>,
49519    #[allow(rustdoc::invalid_html_tags)]
49520    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
49521    #[serde(
49522        skip_serializing_if = "Option::is_none",
49523        rename = "is_star_giveaway",
49524        default
49525    )]
49526    pub is_star_giveaway: Option<bool>,
49527}
49528#[allow(rustdoc::invalid_html_tags)]
49529#[doc = "Companion type to GiveawayCompleted that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
49530#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49531pub struct NoSkipGiveawayCompleted {
49532    #[allow(rustdoc::invalid_html_tags)]
49533    #[doc = "Number of winners in the giveaway"]
49534    #[serde(rename = "winner_count")]
49535    pub winner_count: i64,
49536    pub unclaimed_prize_count: Option<i64>,
49537    pub giveaway_message: Option<BoxWrapper<Unbox<Message>>>,
49538    pub is_star_giveaway: Option<bool>,
49539}
49540impl From<NoSkipGiveawayCompleted> for GiveawayCompleted {
49541    fn from(t: NoSkipGiveawayCompleted) -> Self {
49542        Self {
49543            winner_count: t.winner_count,
49544            unclaimed_prize_count: t.unclaimed_prize_count,
49545            giveaway_message: t.giveaway_message,
49546            is_star_giveaway: t.is_star_giveaway,
49547        }
49548    }
49549}
49550#[allow(clippy::from_over_into)]
49551impl Into<NoSkipGiveawayCompleted> for GiveawayCompleted {
49552    fn into(self) -> NoSkipGiveawayCompleted {
49553        NoSkipGiveawayCompleted {
49554            winner_count: self.winner_count,
49555            unclaimed_prize_count: self.unclaimed_prize_count,
49556            giveaway_message: self.giveaway_message,
49557            is_star_giveaway: self.is_star_giveaway,
49558        }
49559    }
49560}
49561impl NoSkipGiveawayCompleted {
49562    pub fn skip(self) -> GiveawayCompleted {
49563        self.into()
49564    }
49565}
49566impl GiveawayCompleted {
49567    pub fn noskip(self) -> NoSkipGiveawayCompleted {
49568        self.into()
49569    }
49570}
49571#[allow(rustdoc::invalid_html_tags)]
49572#[doc = "This object represents a service message about the completion of a giveaway without public winners."]
49573#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49574pub struct GiveawayCompletedBuilder {
49575    #[allow(rustdoc::invalid_html_tags)]
49576    #[doc = "Number of winners in the giveaway"]
49577    #[serde(rename = "winner_count")]
49578    pub winner_count: i64,
49579    #[allow(rustdoc::invalid_html_tags)]
49580    #[doc = "Optional. Number of undistributed prizes"]
49581    #[serde(
49582        skip_serializing_if = "Option::is_none",
49583        rename = "unclaimed_prize_count",
49584        default
49585    )]
49586    pub unclaimed_prize_count: Option<i64>,
49587    #[allow(rustdoc::invalid_html_tags)]
49588    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
49589    #[serde(
49590        skip_serializing_if = "Option::is_none",
49591        rename = "giveaway_message",
49592        default
49593    )]
49594    pub giveaway_message: Option<BoxWrapper<Unbox<Message>>>,
49595    #[allow(rustdoc::invalid_html_tags)]
49596    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
49597    #[serde(
49598        skip_serializing_if = "Option::is_none",
49599        rename = "is_star_giveaway",
49600        default
49601    )]
49602    pub is_star_giveaway: Option<bool>,
49603}
49604impl GiveawayCompletedBuilder {
49605    #[allow(clippy::too_many_arguments)]
49606    pub fn new(winner_count: i64) -> Self {
49607        Self {
49608            winner_count,
49609            unclaimed_prize_count: None,
49610            giveaway_message: None,
49611            is_star_giveaway: None,
49612        }
49613    }
49614    #[allow(rustdoc::invalid_html_tags)]
49615    #[doc = "Number of winners in the giveaway"]
49616    pub fn set_winner_count(mut self, winner_count: i64) -> Self {
49617        self.winner_count = winner_count;
49618        self
49619    }
49620    #[allow(rustdoc::invalid_html_tags)]
49621    #[doc = "Optional. Number of undistributed prizes"]
49622    pub fn set_unclaimed_prize_count(mut self, unclaimed_prize_count: i64) -> Self {
49623        self.unclaimed_prize_count = Some(unclaimed_prize_count);
49624        self
49625    }
49626    #[allow(rustdoc::invalid_html_tags)]
49627    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
49628    pub fn set_giveaway_message(mut self, giveaway_message: Message) -> Self {
49629        self.giveaway_message = Some(BoxWrapper(Unbox(giveaway_message)));
49630        self
49631    }
49632    #[allow(rustdoc::invalid_html_tags)]
49633    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
49634    pub fn set_is_star_giveaway(mut self, is_star_giveaway: bool) -> Self {
49635        self.is_star_giveaway = Some(is_star_giveaway);
49636        self
49637    }
49638    pub fn build(self) -> GiveawayCompleted {
49639        GiveawayCompleted {
49640            winner_count: self.winner_count,
49641            unclaimed_prize_count: self.unclaimed_prize_count,
49642            giveaway_message: self.giveaway_message,
49643            is_star_giveaway: self.is_star_giveaway,
49644        }
49645    }
49646}
49647#[allow(rustdoc::invalid_html_tags)]
49648#[doc = "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account."]
49649#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49650pub struct ReplyKeyboardMarkup {
49651    #[allow(rustdoc::invalid_html_tags)]
49652    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
49653    #[serde(rename = "keyboard")]
49654    pub keyboard: Vec<Vec<KeyboardButton>>,
49655    #[allow(rustdoc::invalid_html_tags)]
49656    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
49657    #[serde(
49658        skip_serializing_if = "Option::is_none",
49659        rename = "is_persistent",
49660        default
49661    )]
49662    pub is_persistent: Option<bool>,
49663    #[allow(rustdoc::invalid_html_tags)]
49664    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
49665    #[serde(
49666        skip_serializing_if = "Option::is_none",
49667        rename = "resize_keyboard",
49668        default
49669    )]
49670    pub resize_keyboard: Option<bool>,
49671    #[allow(rustdoc::invalid_html_tags)]
49672    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
49673    #[serde(
49674        skip_serializing_if = "Option::is_none",
49675        rename = "one_time_keyboard",
49676        default
49677    )]
49678    pub one_time_keyboard: Option<bool>,
49679    #[allow(rustdoc::invalid_html_tags)]
49680    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
49681    #[serde(
49682        skip_serializing_if = "Option::is_none",
49683        rename = "input_field_placeholder",
49684        default
49685    )]
49686    pub input_field_placeholder: Option<String>,
49687    #[allow(rustdoc::invalid_html_tags)]
49688    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
49689    #[serde(skip_serializing_if = "Option::is_none", rename = "selective", default)]
49690    pub selective: Option<bool>,
49691}
49692#[allow(rustdoc::invalid_html_tags)]
49693#[doc = "Companion type to ReplyKeyboardMarkup that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
49694#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49695pub struct NoSkipReplyKeyboardMarkup {
49696    #[allow(rustdoc::invalid_html_tags)]
49697    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
49698    #[serde(rename = "keyboard")]
49699    pub keyboard: Vec<Vec<KeyboardButton>>,
49700    pub is_persistent: Option<bool>,
49701    pub resize_keyboard: Option<bool>,
49702    pub one_time_keyboard: Option<bool>,
49703    pub input_field_placeholder: Option<String>,
49704    pub selective: Option<bool>,
49705}
49706impl From<NoSkipReplyKeyboardMarkup> for ReplyKeyboardMarkup {
49707    fn from(t: NoSkipReplyKeyboardMarkup) -> Self {
49708        Self {
49709            keyboard: t.keyboard,
49710            is_persistent: t.is_persistent,
49711            resize_keyboard: t.resize_keyboard,
49712            one_time_keyboard: t.one_time_keyboard,
49713            input_field_placeholder: t.input_field_placeholder,
49714            selective: t.selective,
49715        }
49716    }
49717}
49718#[allow(clippy::from_over_into)]
49719impl Into<NoSkipReplyKeyboardMarkup> for ReplyKeyboardMarkup {
49720    fn into(self) -> NoSkipReplyKeyboardMarkup {
49721        NoSkipReplyKeyboardMarkup {
49722            keyboard: self.keyboard,
49723            is_persistent: self.is_persistent,
49724            resize_keyboard: self.resize_keyboard,
49725            one_time_keyboard: self.one_time_keyboard,
49726            input_field_placeholder: self.input_field_placeholder,
49727            selective: self.selective,
49728        }
49729    }
49730}
49731impl NoSkipReplyKeyboardMarkup {
49732    pub fn skip(self) -> ReplyKeyboardMarkup {
49733        self.into()
49734    }
49735}
49736impl ReplyKeyboardMarkup {
49737    pub fn noskip(self) -> NoSkipReplyKeyboardMarkup {
49738        self.into()
49739    }
49740}
49741#[allow(rustdoc::invalid_html_tags)]
49742#[doc = "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account."]
49743#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49744pub struct ReplyKeyboardMarkupBuilder {
49745    #[allow(rustdoc::invalid_html_tags)]
49746    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
49747    #[serde(rename = "keyboard")]
49748    pub keyboard: Vec<Vec<KeyboardButton>>,
49749    #[allow(rustdoc::invalid_html_tags)]
49750    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
49751    #[serde(
49752        skip_serializing_if = "Option::is_none",
49753        rename = "is_persistent",
49754        default
49755    )]
49756    pub is_persistent: Option<bool>,
49757    #[allow(rustdoc::invalid_html_tags)]
49758    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
49759    #[serde(
49760        skip_serializing_if = "Option::is_none",
49761        rename = "resize_keyboard",
49762        default
49763    )]
49764    pub resize_keyboard: Option<bool>,
49765    #[allow(rustdoc::invalid_html_tags)]
49766    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
49767    #[serde(
49768        skip_serializing_if = "Option::is_none",
49769        rename = "one_time_keyboard",
49770        default
49771    )]
49772    pub one_time_keyboard: Option<bool>,
49773    #[allow(rustdoc::invalid_html_tags)]
49774    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
49775    #[serde(
49776        skip_serializing_if = "Option::is_none",
49777        rename = "input_field_placeholder",
49778        default
49779    )]
49780    pub input_field_placeholder: Option<String>,
49781    #[allow(rustdoc::invalid_html_tags)]
49782    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
49783    #[serde(skip_serializing_if = "Option::is_none", rename = "selective", default)]
49784    pub selective: Option<bool>,
49785}
49786impl ReplyKeyboardMarkupBuilder {
49787    #[allow(clippy::too_many_arguments)]
49788    pub fn new(keyboard: Vec<Vec<KeyboardButton>>) -> Self {
49789        Self {
49790            keyboard,
49791            is_persistent: None,
49792            resize_keyboard: None,
49793            one_time_keyboard: None,
49794            input_field_placeholder: None,
49795            selective: None,
49796        }
49797    }
49798    #[allow(rustdoc::invalid_html_tags)]
49799    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
49800    pub fn set_keyboard(mut self, keyboard: Vec<Vec<KeyboardButton>>) -> Self {
49801        self.keyboard = keyboard;
49802        self
49803    }
49804    #[allow(rustdoc::invalid_html_tags)]
49805    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
49806    pub fn set_is_persistent(mut self, is_persistent: bool) -> Self {
49807        self.is_persistent = Some(is_persistent);
49808        self
49809    }
49810    #[allow(rustdoc::invalid_html_tags)]
49811    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
49812    pub fn set_resize_keyboard(mut self, resize_keyboard: bool) -> Self {
49813        self.resize_keyboard = Some(resize_keyboard);
49814        self
49815    }
49816    #[allow(rustdoc::invalid_html_tags)]
49817    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
49818    pub fn set_one_time_keyboard(mut self, one_time_keyboard: bool) -> Self {
49819        self.one_time_keyboard = Some(one_time_keyboard);
49820        self
49821    }
49822    #[allow(rustdoc::invalid_html_tags)]
49823    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
49824    pub fn set_input_field_placeholder(mut self, input_field_placeholder: String) -> Self {
49825        self.input_field_placeholder = Some(input_field_placeholder);
49826        self
49827    }
49828    #[allow(rustdoc::invalid_html_tags)]
49829    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
49830    pub fn set_selective(mut self, selective: bool) -> Self {
49831        self.selective = Some(selective);
49832        self
49833    }
49834    pub fn build(self) -> ReplyKeyboardMarkup {
49835        ReplyKeyboardMarkup {
49836            keyboard: self.keyboard,
49837            is_persistent: self.is_persistent,
49838            resize_keyboard: self.resize_keyboard,
49839            one_time_keyboard: self.one_time_keyboard,
49840            input_field_placeholder: self.input_field_placeholder,
49841            selective: self.selective,
49842        }
49843    }
49844}
49845#[allow(rustdoc::invalid_html_tags)]
49846#[doc = "Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio."]
49847#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49848pub struct InlineQueryResultCachedAudio {
49849    #[allow(rustdoc::invalid_html_tags)]
49850    #[doc = "Type of the result, must be audio"]
49851    #[serde(rename = "type")]
49852    pub tg_type: String,
49853    #[allow(rustdoc::invalid_html_tags)]
49854    #[doc = "Unique identifier for this result, 1-64 bytes"]
49855    #[serde(rename = "id")]
49856    pub id: String,
49857    #[allow(rustdoc::invalid_html_tags)]
49858    #[doc = "A valid file identifier for the audio file"]
49859    #[serde(rename = "audio_file_id")]
49860    pub audio_file_id: String,
49861    #[allow(rustdoc::invalid_html_tags)]
49862    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
49863    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
49864    pub caption: Option<String>,
49865    #[allow(rustdoc::invalid_html_tags)]
49866    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
49867    #[serde(
49868        skip_serializing_if = "Option::is_none",
49869        rename = "parse_mode",
49870        default
49871    )]
49872    pub parse_mode: Option<String>,
49873    #[allow(rustdoc::invalid_html_tags)]
49874    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
49875    #[serde(
49876        skip_serializing_if = "Option::is_none",
49877        rename = "caption_entities",
49878        default
49879    )]
49880    pub caption_entities: Option<Vec<MessageEntity>>,
49881    #[allow(rustdoc::invalid_html_tags)]
49882    #[doc = "Optional. Inline keyboard attached to the message"]
49883    #[serde(
49884        skip_serializing_if = "Option::is_none",
49885        rename = "reply_markup",
49886        default
49887    )]
49888    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
49889    #[allow(rustdoc::invalid_html_tags)]
49890    #[doc = "Optional. Content of the message to be sent instead of the audio"]
49891    #[serde(
49892        skip_serializing_if = "Option::is_none",
49893        rename = "input_message_content",
49894        default
49895    )]
49896    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
49897}
49898#[allow(rustdoc::invalid_html_tags)]
49899#[doc = "Companion type to InlineQueryResultCachedAudio that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
49900#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49901pub struct NoSkipInlineQueryResultCachedAudio {
49902    #[allow(rustdoc::invalid_html_tags)]
49903    #[doc = "Type of the result, must be audio"]
49904    #[serde(rename = "type")]
49905    pub tg_type: String,
49906    #[allow(rustdoc::invalid_html_tags)]
49907    #[doc = "Unique identifier for this result, 1-64 bytes"]
49908    #[serde(rename = "id")]
49909    pub id: String,
49910    #[allow(rustdoc::invalid_html_tags)]
49911    #[doc = "A valid file identifier for the audio file"]
49912    #[serde(rename = "audio_file_id")]
49913    pub audio_file_id: String,
49914    pub caption: Option<String>,
49915    pub parse_mode: Option<String>,
49916    pub caption_entities: Option<Vec<MessageEntity>>,
49917    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
49918    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
49919}
49920impl From<NoSkipInlineQueryResultCachedAudio> for InlineQueryResultCachedAudio {
49921    fn from(t: NoSkipInlineQueryResultCachedAudio) -> Self {
49922        Self {
49923            tg_type: t.tg_type,
49924            id: t.id,
49925            audio_file_id: t.audio_file_id,
49926            caption: t.caption,
49927            parse_mode: t.parse_mode,
49928            caption_entities: t.caption_entities,
49929            reply_markup: t.reply_markup,
49930            input_message_content: t.input_message_content,
49931        }
49932    }
49933}
49934#[allow(clippy::from_over_into)]
49935impl Into<NoSkipInlineQueryResultCachedAudio> for InlineQueryResultCachedAudio {
49936    fn into(self) -> NoSkipInlineQueryResultCachedAudio {
49937        NoSkipInlineQueryResultCachedAudio {
49938            tg_type: self.tg_type,
49939            id: self.id,
49940            audio_file_id: self.audio_file_id,
49941            caption: self.caption,
49942            parse_mode: self.parse_mode,
49943            caption_entities: self.caption_entities,
49944            reply_markup: self.reply_markup,
49945            input_message_content: self.input_message_content,
49946        }
49947    }
49948}
49949impl NoSkipInlineQueryResultCachedAudio {
49950    pub fn skip(self) -> InlineQueryResultCachedAudio {
49951        self.into()
49952    }
49953}
49954impl InlineQueryResultCachedAudio {
49955    pub fn noskip(self) -> NoSkipInlineQueryResultCachedAudio {
49956        self.into()
49957    }
49958}
49959#[allow(rustdoc::invalid_html_tags)]
49960#[doc = "Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio."]
49961#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49962pub struct InlineQueryResultCachedAudioBuilder {
49963    #[allow(rustdoc::invalid_html_tags)]
49964    #[doc = "Type of the result, must be audio"]
49965    #[serde(rename = "type")]
49966    pub tg_type: String,
49967    #[allow(rustdoc::invalid_html_tags)]
49968    #[doc = "Unique identifier for this result, 1-64 bytes"]
49969    #[serde(rename = "id")]
49970    pub id: String,
49971    #[allow(rustdoc::invalid_html_tags)]
49972    #[doc = "A valid file identifier for the audio file"]
49973    #[serde(rename = "audio_file_id")]
49974    pub audio_file_id: String,
49975    #[allow(rustdoc::invalid_html_tags)]
49976    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
49977    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
49978    pub caption: Option<String>,
49979    #[allow(rustdoc::invalid_html_tags)]
49980    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
49981    #[serde(
49982        skip_serializing_if = "Option::is_none",
49983        rename = "parse_mode",
49984        default
49985    )]
49986    pub parse_mode: Option<String>,
49987    #[allow(rustdoc::invalid_html_tags)]
49988    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
49989    #[serde(
49990        skip_serializing_if = "Option::is_none",
49991        rename = "caption_entities",
49992        default
49993    )]
49994    pub caption_entities: Option<Vec<MessageEntity>>,
49995    #[allow(rustdoc::invalid_html_tags)]
49996    #[doc = "Optional. Inline keyboard attached to the message"]
49997    #[serde(
49998        skip_serializing_if = "Option::is_none",
49999        rename = "reply_markup",
50000        default
50001    )]
50002    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
50003    #[allow(rustdoc::invalid_html_tags)]
50004    #[doc = "Optional. Content of the message to be sent instead of the audio"]
50005    #[serde(
50006        skip_serializing_if = "Option::is_none",
50007        rename = "input_message_content",
50008        default
50009    )]
50010    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
50011}
50012impl InlineQueryResultCachedAudioBuilder {
50013    #[allow(clippy::too_many_arguments)]
50014    pub fn new(id: String, audio_file_id: String) -> Self {
50015        Self {
50016            tg_type: "audio".to_owned(),
50017            id,
50018            audio_file_id,
50019            caption: None,
50020            parse_mode: None,
50021            caption_entities: None,
50022            reply_markup: None,
50023            input_message_content: None,
50024        }
50025    }
50026    #[allow(rustdoc::invalid_html_tags)]
50027    #[doc = "Type of the result, must be audio"]
50028    pub fn set_type(mut self, tg_type: String) -> Self {
50029        self.tg_type = tg_type;
50030        self
50031    }
50032    #[allow(rustdoc::invalid_html_tags)]
50033    #[doc = "Unique identifier for this result, 1-64 bytes"]
50034    pub fn set_id(mut self, id: String) -> Self {
50035        self.id = id;
50036        self
50037    }
50038    #[allow(rustdoc::invalid_html_tags)]
50039    #[doc = "A valid file identifier for the audio file"]
50040    pub fn set_audio_file_id(mut self, audio_file_id: String) -> Self {
50041        self.audio_file_id = audio_file_id;
50042        self
50043    }
50044    #[allow(rustdoc::invalid_html_tags)]
50045    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
50046    pub fn set_caption(mut self, caption: String) -> Self {
50047        self.caption = Some(caption);
50048        self
50049    }
50050    #[allow(rustdoc::invalid_html_tags)]
50051    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
50052    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
50053        self.parse_mode = Some(parse_mode);
50054        self
50055    }
50056    #[allow(rustdoc::invalid_html_tags)]
50057    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
50058    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
50059        self.caption_entities = Some(caption_entities);
50060        self
50061    }
50062    #[allow(rustdoc::invalid_html_tags)]
50063    #[doc = "Optional. Inline keyboard attached to the message"]
50064    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
50065        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
50066        self
50067    }
50068    #[allow(rustdoc::invalid_html_tags)]
50069    #[doc = "Optional. Content of the message to be sent instead of the audio"]
50070    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
50071        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
50072        self
50073    }
50074    pub fn build(self) -> InlineQueryResultCachedAudio {
50075        InlineQueryResultCachedAudio {
50076            tg_type: self.tg_type,
50077            id: self.id,
50078            audio_file_id: self.audio_file_id,
50079            caption: self.caption,
50080            parse_mode: self.parse_mode,
50081            caption_entities: self.caption_entities,
50082            reply_markup: self.reply_markup,
50083            input_message_content: self.input_message_content,
50084        }
50085    }
50086}
50087#[allow(rustdoc::invalid_html_tags)]
50088#[doc = "This object represents an inline keyboard button that copies specified text to the clipboard."]
50089#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50090pub struct CopyTextButton {
50091    #[allow(rustdoc::invalid_html_tags)]
50092    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
50093    #[serde(rename = "text")]
50094    pub text: String,
50095}
50096#[allow(rustdoc::invalid_html_tags)]
50097#[doc = "Companion type to CopyTextButton that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
50098#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50099pub struct NoSkipCopyTextButton {
50100    #[allow(rustdoc::invalid_html_tags)]
50101    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
50102    #[serde(rename = "text")]
50103    pub text: String,
50104}
50105impl From<NoSkipCopyTextButton> for CopyTextButton {
50106    fn from(t: NoSkipCopyTextButton) -> Self {
50107        Self { text: t.text }
50108    }
50109}
50110#[allow(clippy::from_over_into)]
50111impl Into<NoSkipCopyTextButton> for CopyTextButton {
50112    fn into(self) -> NoSkipCopyTextButton {
50113        NoSkipCopyTextButton { text: self.text }
50114    }
50115}
50116impl NoSkipCopyTextButton {
50117    pub fn skip(self) -> CopyTextButton {
50118        self.into()
50119    }
50120}
50121impl CopyTextButton {
50122    pub fn noskip(self) -> NoSkipCopyTextButton {
50123        self.into()
50124    }
50125}
50126#[allow(rustdoc::invalid_html_tags)]
50127#[doc = "This object represents an inline keyboard button that copies specified text to the clipboard."]
50128#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50129pub struct CopyTextButtonBuilder {
50130    #[allow(rustdoc::invalid_html_tags)]
50131    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
50132    #[serde(rename = "text")]
50133    pub text: String,
50134}
50135impl CopyTextButtonBuilder {
50136    #[allow(clippy::too_many_arguments)]
50137    pub fn new(text: String) -> Self {
50138        Self { text }
50139    }
50140    #[allow(rustdoc::invalid_html_tags)]
50141    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
50142    pub fn set_text(mut self, text: String) -> Self {
50143        self.text = text;
50144        self
50145    }
50146    pub fn build(self) -> CopyTextButton {
50147        CopyTextButton { text: self.text }
50148    }
50149}
50150#[allow(rustdoc::invalid_html_tags)]
50151#[doc = "The background is a wallpaper in the JPEG format."]
50152#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50153pub struct BackgroundTypeWallpaper {
50154    #[allow(rustdoc::invalid_html_tags)]
50155    #[doc = "Type of the background, always \"wallpaper\""]
50156    #[serde(rename = "type")]
50157    pub tg_type: String,
50158    #[allow(rustdoc::invalid_html_tags)]
50159    #[doc = "Document with the wallpaper"]
50160    #[serde(rename = "document")]
50161    pub document: BoxWrapper<Unbox<Document>>,
50162    #[allow(rustdoc::invalid_html_tags)]
50163    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
50164    #[serde(rename = "dark_theme_dimming")]
50165    pub dark_theme_dimming: i64,
50166    #[allow(rustdoc::invalid_html_tags)]
50167    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
50168    #[serde(
50169        skip_serializing_if = "Option::is_none",
50170        rename = "is_blurred",
50171        default
50172    )]
50173    pub is_blurred: Option<bool>,
50174    #[allow(rustdoc::invalid_html_tags)]
50175    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
50176    #[serde(skip_serializing_if = "Option::is_none", rename = "is_moving", default)]
50177    pub is_moving: Option<bool>,
50178}
50179#[allow(rustdoc::invalid_html_tags)]
50180#[doc = "Companion type to BackgroundTypeWallpaper that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
50181#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50182pub struct NoSkipBackgroundTypeWallpaper {
50183    #[allow(rustdoc::invalid_html_tags)]
50184    #[doc = "Type of the background, always \"wallpaper\""]
50185    #[serde(rename = "type")]
50186    pub tg_type: String,
50187    #[allow(rustdoc::invalid_html_tags)]
50188    #[doc = "Document with the wallpaper"]
50189    #[serde(rename = "document")]
50190    pub document: BoxWrapper<Unbox<Document>>,
50191    #[allow(rustdoc::invalid_html_tags)]
50192    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
50193    #[serde(rename = "dark_theme_dimming")]
50194    pub dark_theme_dimming: i64,
50195    pub is_blurred: Option<bool>,
50196    pub is_moving: Option<bool>,
50197}
50198impl From<NoSkipBackgroundTypeWallpaper> for BackgroundTypeWallpaper {
50199    fn from(t: NoSkipBackgroundTypeWallpaper) -> Self {
50200        Self {
50201            tg_type: t.tg_type,
50202            document: t.document,
50203            dark_theme_dimming: t.dark_theme_dimming,
50204            is_blurred: t.is_blurred,
50205            is_moving: t.is_moving,
50206        }
50207    }
50208}
50209#[allow(clippy::from_over_into)]
50210impl Into<NoSkipBackgroundTypeWallpaper> for BackgroundTypeWallpaper {
50211    fn into(self) -> NoSkipBackgroundTypeWallpaper {
50212        NoSkipBackgroundTypeWallpaper {
50213            tg_type: self.tg_type,
50214            document: self.document,
50215            dark_theme_dimming: self.dark_theme_dimming,
50216            is_blurred: self.is_blurred,
50217            is_moving: self.is_moving,
50218        }
50219    }
50220}
50221impl NoSkipBackgroundTypeWallpaper {
50222    pub fn skip(self) -> BackgroundTypeWallpaper {
50223        self.into()
50224    }
50225}
50226impl BackgroundTypeWallpaper {
50227    pub fn noskip(self) -> NoSkipBackgroundTypeWallpaper {
50228        self.into()
50229    }
50230}
50231#[allow(rustdoc::invalid_html_tags)]
50232#[doc = "The background is a wallpaper in the JPEG format."]
50233#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50234pub struct BackgroundTypeWallpaperBuilder {
50235    #[allow(rustdoc::invalid_html_tags)]
50236    #[doc = "Type of the background, always \"wallpaper\""]
50237    #[serde(rename = "type")]
50238    pub tg_type: String,
50239    #[allow(rustdoc::invalid_html_tags)]
50240    #[doc = "Document with the wallpaper"]
50241    #[serde(rename = "document")]
50242    pub document: BoxWrapper<Unbox<Document>>,
50243    #[allow(rustdoc::invalid_html_tags)]
50244    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
50245    #[serde(rename = "dark_theme_dimming")]
50246    pub dark_theme_dimming: i64,
50247    #[allow(rustdoc::invalid_html_tags)]
50248    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
50249    #[serde(
50250        skip_serializing_if = "Option::is_none",
50251        rename = "is_blurred",
50252        default
50253    )]
50254    pub is_blurred: Option<bool>,
50255    #[allow(rustdoc::invalid_html_tags)]
50256    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
50257    #[serde(skip_serializing_if = "Option::is_none", rename = "is_moving", default)]
50258    pub is_moving: Option<bool>,
50259}
50260impl BackgroundTypeWallpaperBuilder {
50261    #[allow(clippy::too_many_arguments)]
50262    pub fn new<A: Into<Document>>(document: A, dark_theme_dimming: i64) -> Self {
50263        Self {
50264            tg_type: "BackgroundTypeWallpaper".to_owned(),
50265            document: BoxWrapper::new_unbox(document.into()),
50266            dark_theme_dimming,
50267            is_blurred: None,
50268            is_moving: None,
50269        }
50270    }
50271    #[allow(rustdoc::invalid_html_tags)]
50272    #[doc = "Type of the background, always \"wallpaper\""]
50273    pub fn set_type(mut self, tg_type: String) -> Self {
50274        self.tg_type = tg_type;
50275        self
50276    }
50277    #[allow(rustdoc::invalid_html_tags)]
50278    #[doc = "Document with the wallpaper"]
50279    pub fn set_document(mut self, document: Document) -> Self {
50280        self.document = BoxWrapper(Unbox(document));
50281        self
50282    }
50283    #[allow(rustdoc::invalid_html_tags)]
50284    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
50285    pub fn set_dark_theme_dimming(mut self, dark_theme_dimming: i64) -> Self {
50286        self.dark_theme_dimming = dark_theme_dimming;
50287        self
50288    }
50289    #[allow(rustdoc::invalid_html_tags)]
50290    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
50291    pub fn set_is_blurred(mut self, is_blurred: bool) -> Self {
50292        self.is_blurred = Some(is_blurred);
50293        self
50294    }
50295    #[allow(rustdoc::invalid_html_tags)]
50296    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
50297    pub fn set_is_moving(mut self, is_moving: bool) -> Self {
50298        self.is_moving = Some(is_moving);
50299        self
50300    }
50301    pub fn build(self) -> BackgroundTypeWallpaper {
50302        BackgroundTypeWallpaper {
50303            tg_type: self.tg_type,
50304            document: self.document,
50305            dark_theme_dimming: self.dark_theme_dimming,
50306            is_blurred: self.is_blurred,
50307            is_moving: self.is_moving,
50308        }
50309    }
50310}
50311#[allow(rustdoc::invalid_html_tags)]
50312#[doc = "This object represents a forum topic."]
50313#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50314pub struct ForumTopic {
50315    #[allow(rustdoc::invalid_html_tags)]
50316    #[doc = "Unique identifier of the forum topic"]
50317    #[serde(rename = "message_thread_id")]
50318    pub message_thread_id: i64,
50319    #[allow(rustdoc::invalid_html_tags)]
50320    #[doc = "Name of the topic"]
50321    #[serde(rename = "name")]
50322    pub name: String,
50323    #[allow(rustdoc::invalid_html_tags)]
50324    #[doc = "Color of the topic icon in RGB format"]
50325    #[serde(rename = "icon_color")]
50326    pub icon_color: i64,
50327    #[allow(rustdoc::invalid_html_tags)]
50328    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
50329    #[serde(
50330        skip_serializing_if = "Option::is_none",
50331        rename = "icon_custom_emoji_id",
50332        default
50333    )]
50334    pub icon_custom_emoji_id: Option<String>,
50335}
50336#[allow(rustdoc::invalid_html_tags)]
50337#[doc = "Companion type to ForumTopic that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
50338#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50339pub struct NoSkipForumTopic {
50340    #[allow(rustdoc::invalid_html_tags)]
50341    #[doc = "Unique identifier of the forum topic"]
50342    #[serde(rename = "message_thread_id")]
50343    pub message_thread_id: i64,
50344    #[allow(rustdoc::invalid_html_tags)]
50345    #[doc = "Name of the topic"]
50346    #[serde(rename = "name")]
50347    pub name: String,
50348    #[allow(rustdoc::invalid_html_tags)]
50349    #[doc = "Color of the topic icon in RGB format"]
50350    #[serde(rename = "icon_color")]
50351    pub icon_color: i64,
50352    pub icon_custom_emoji_id: Option<String>,
50353}
50354impl From<NoSkipForumTopic> for ForumTopic {
50355    fn from(t: NoSkipForumTopic) -> Self {
50356        Self {
50357            message_thread_id: t.message_thread_id,
50358            name: t.name,
50359            icon_color: t.icon_color,
50360            icon_custom_emoji_id: t.icon_custom_emoji_id,
50361        }
50362    }
50363}
50364#[allow(clippy::from_over_into)]
50365impl Into<NoSkipForumTopic> for ForumTopic {
50366    fn into(self) -> NoSkipForumTopic {
50367        NoSkipForumTopic {
50368            message_thread_id: self.message_thread_id,
50369            name: self.name,
50370            icon_color: self.icon_color,
50371            icon_custom_emoji_id: self.icon_custom_emoji_id,
50372        }
50373    }
50374}
50375impl NoSkipForumTopic {
50376    pub fn skip(self) -> ForumTopic {
50377        self.into()
50378    }
50379}
50380impl ForumTopic {
50381    pub fn noskip(self) -> NoSkipForumTopic {
50382        self.into()
50383    }
50384}
50385#[allow(rustdoc::invalid_html_tags)]
50386#[doc = "This object represents a forum topic."]
50387#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50388pub struct ForumTopicBuilder {
50389    #[allow(rustdoc::invalid_html_tags)]
50390    #[doc = "Unique identifier of the forum topic"]
50391    #[serde(rename = "message_thread_id")]
50392    pub message_thread_id: i64,
50393    #[allow(rustdoc::invalid_html_tags)]
50394    #[doc = "Name of the topic"]
50395    #[serde(rename = "name")]
50396    pub name: String,
50397    #[allow(rustdoc::invalid_html_tags)]
50398    #[doc = "Color of the topic icon in RGB format"]
50399    #[serde(rename = "icon_color")]
50400    pub icon_color: i64,
50401    #[allow(rustdoc::invalid_html_tags)]
50402    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
50403    #[serde(
50404        skip_serializing_if = "Option::is_none",
50405        rename = "icon_custom_emoji_id",
50406        default
50407    )]
50408    pub icon_custom_emoji_id: Option<String>,
50409}
50410impl ForumTopicBuilder {
50411    #[allow(clippy::too_many_arguments)]
50412    pub fn new(message_thread_id: i64, name: String, icon_color: i64) -> Self {
50413        Self {
50414            message_thread_id,
50415            name,
50416            icon_color,
50417            icon_custom_emoji_id: None,
50418        }
50419    }
50420    #[allow(rustdoc::invalid_html_tags)]
50421    #[doc = "Unique identifier of the forum topic"]
50422    pub fn set_message_thread_id(mut self, message_thread_id: i64) -> Self {
50423        self.message_thread_id = message_thread_id;
50424        self
50425    }
50426    #[allow(rustdoc::invalid_html_tags)]
50427    #[doc = "Name of the topic"]
50428    pub fn set_name(mut self, name: String) -> Self {
50429        self.name = name;
50430        self
50431    }
50432    #[allow(rustdoc::invalid_html_tags)]
50433    #[doc = "Color of the topic icon in RGB format"]
50434    pub fn set_icon_color(mut self, icon_color: i64) -> Self {
50435        self.icon_color = icon_color;
50436        self
50437    }
50438    #[allow(rustdoc::invalid_html_tags)]
50439    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
50440    pub fn set_icon_custom_emoji_id(mut self, icon_custom_emoji_id: String) -> Self {
50441        self.icon_custom_emoji_id = Some(icon_custom_emoji_id);
50442        self
50443    }
50444    pub fn build(self) -> ForumTopic {
50445        ForumTopic {
50446            message_thread_id: self.message_thread_id,
50447            name: self.name,
50448            icon_color: self.icon_color,
50449            icon_custom_emoji_id: self.icon_custom_emoji_id,
50450        }
50451    }
50452}
50453#[allow(rustdoc::invalid_html_tags)]
50454#[doc = "Represents the content of a contact message to be sent as the result of an inline query."]
50455#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50456pub struct InputContactMessageContent {
50457    #[allow(rustdoc::invalid_html_tags)]
50458    #[doc = "Contact's phone number"]
50459    #[serde(rename = "phone_number")]
50460    pub phone_number: String,
50461    #[allow(rustdoc::invalid_html_tags)]
50462    #[doc = "Contact's first name"]
50463    #[serde(rename = "first_name")]
50464    pub first_name: String,
50465    #[allow(rustdoc::invalid_html_tags)]
50466    #[doc = "Optional. Contact's last name"]
50467    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
50468    pub last_name: Option<String>,
50469    #[allow(rustdoc::invalid_html_tags)]
50470    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
50471    #[serde(skip_serializing_if = "Option::is_none", rename = "vcard", default)]
50472    pub vcard: Option<String>,
50473}
50474#[allow(rustdoc::invalid_html_tags)]
50475#[doc = "Companion type to InputContactMessageContent that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
50476#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50477pub struct NoSkipInputContactMessageContent {
50478    #[allow(rustdoc::invalid_html_tags)]
50479    #[doc = "Contact's phone number"]
50480    #[serde(rename = "phone_number")]
50481    pub phone_number: String,
50482    #[allow(rustdoc::invalid_html_tags)]
50483    #[doc = "Contact's first name"]
50484    #[serde(rename = "first_name")]
50485    pub first_name: String,
50486    pub last_name: Option<String>,
50487    pub vcard: Option<String>,
50488}
50489impl From<NoSkipInputContactMessageContent> for InputContactMessageContent {
50490    fn from(t: NoSkipInputContactMessageContent) -> Self {
50491        Self {
50492            phone_number: t.phone_number,
50493            first_name: t.first_name,
50494            last_name: t.last_name,
50495            vcard: t.vcard,
50496        }
50497    }
50498}
50499#[allow(clippy::from_over_into)]
50500impl Into<NoSkipInputContactMessageContent> for InputContactMessageContent {
50501    fn into(self) -> NoSkipInputContactMessageContent {
50502        NoSkipInputContactMessageContent {
50503            phone_number: self.phone_number,
50504            first_name: self.first_name,
50505            last_name: self.last_name,
50506            vcard: self.vcard,
50507        }
50508    }
50509}
50510impl NoSkipInputContactMessageContent {
50511    pub fn skip(self) -> InputContactMessageContent {
50512        self.into()
50513    }
50514}
50515impl InputContactMessageContent {
50516    pub fn noskip(self) -> NoSkipInputContactMessageContent {
50517        self.into()
50518    }
50519}
50520#[allow(rustdoc::invalid_html_tags)]
50521#[doc = "Represents the content of a contact message to be sent as the result of an inline query."]
50522#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50523pub struct InputContactMessageContentBuilder {
50524    #[allow(rustdoc::invalid_html_tags)]
50525    #[doc = "Contact's phone number"]
50526    #[serde(rename = "phone_number")]
50527    pub phone_number: String,
50528    #[allow(rustdoc::invalid_html_tags)]
50529    #[doc = "Contact's first name"]
50530    #[serde(rename = "first_name")]
50531    pub first_name: String,
50532    #[allow(rustdoc::invalid_html_tags)]
50533    #[doc = "Optional. Contact's last name"]
50534    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
50535    pub last_name: Option<String>,
50536    #[allow(rustdoc::invalid_html_tags)]
50537    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
50538    #[serde(skip_serializing_if = "Option::is_none", rename = "vcard", default)]
50539    pub vcard: Option<String>,
50540}
50541impl InputContactMessageContentBuilder {
50542    #[allow(clippy::too_many_arguments)]
50543    pub fn new(phone_number: String, first_name: String) -> Self {
50544        Self {
50545            phone_number,
50546            first_name,
50547            last_name: None,
50548            vcard: None,
50549        }
50550    }
50551    #[allow(rustdoc::invalid_html_tags)]
50552    #[doc = "Contact's phone number"]
50553    pub fn set_phone_number(mut self, phone_number: String) -> Self {
50554        self.phone_number = phone_number;
50555        self
50556    }
50557    #[allow(rustdoc::invalid_html_tags)]
50558    #[doc = "Contact's first name"]
50559    pub fn set_first_name(mut self, first_name: String) -> Self {
50560        self.first_name = first_name;
50561        self
50562    }
50563    #[allow(rustdoc::invalid_html_tags)]
50564    #[doc = "Optional. Contact's last name"]
50565    pub fn set_last_name(mut self, last_name: String) -> Self {
50566        self.last_name = Some(last_name);
50567        self
50568    }
50569    #[allow(rustdoc::invalid_html_tags)]
50570    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
50571    pub fn set_vcard(mut self, vcard: String) -> Self {
50572        self.vcard = Some(vcard);
50573        self
50574    }
50575    pub fn build(self) -> InputContactMessageContent {
50576        InputContactMessageContent {
50577            phone_number: self.phone_number,
50578            first_name: self.first_name,
50579            last_name: self.last_name,
50580            vcard: self.vcard,
50581        }
50582    }
50583}
50584#[allow(rustdoc::invalid_html_tags)]
50585#[doc = "Describes reply parameters for the message that is being sent."]
50586#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50587pub struct ReplyParameters {
50588    #[allow(rustdoc::invalid_html_tags)]
50589    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
50590    #[serde(rename = "message_id")]
50591    pub message_id: i64,
50592    #[allow(rustdoc::invalid_html_tags)]
50593    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
50594    #[serde(skip_serializing_if = "Option::is_none", rename = "chat_id", default)]
50595    pub chat_id: Option<ChatHandle>,
50596    #[allow(rustdoc::invalid_html_tags)]
50597    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
50598    #[serde(
50599        skip_serializing_if = "Option::is_none",
50600        rename = "allow_sending_without_reply",
50601        default
50602    )]
50603    pub allow_sending_without_reply: Option<bool>,
50604    #[allow(rustdoc::invalid_html_tags)]
50605    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
50606    #[serde(skip_serializing_if = "Option::is_none", rename = "quote", default)]
50607    pub quote: Option<String>,
50608    #[allow(rustdoc::invalid_html_tags)]
50609    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
50610    #[serde(
50611        skip_serializing_if = "Option::is_none",
50612        rename = "quote_parse_mode",
50613        default
50614    )]
50615    pub quote_parse_mode: Option<String>,
50616    #[allow(rustdoc::invalid_html_tags)]
50617    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
50618    #[serde(
50619        skip_serializing_if = "Option::is_none",
50620        rename = "quote_entities",
50621        default
50622    )]
50623    pub quote_entities: Option<Vec<MessageEntity>>,
50624    #[allow(rustdoc::invalid_html_tags)]
50625    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
50626    #[serde(
50627        skip_serializing_if = "Option::is_none",
50628        rename = "quote_position",
50629        default
50630    )]
50631    pub quote_position: Option<i64>,
50632    #[allow(rustdoc::invalid_html_tags)]
50633    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
50634    #[serde(
50635        skip_serializing_if = "Option::is_none",
50636        rename = "checklist_task_id",
50637        default
50638    )]
50639    pub checklist_task_id: Option<i64>,
50640}
50641#[allow(rustdoc::invalid_html_tags)]
50642#[doc = "Companion type to ReplyParameters that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
50643#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50644pub struct NoSkipReplyParameters {
50645    #[allow(rustdoc::invalid_html_tags)]
50646    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
50647    #[serde(rename = "message_id")]
50648    pub message_id: i64,
50649    pub chat_id: Option<ChatHandle>,
50650    pub allow_sending_without_reply: Option<bool>,
50651    pub quote: Option<String>,
50652    pub quote_parse_mode: Option<String>,
50653    pub quote_entities: Option<Vec<MessageEntity>>,
50654    pub quote_position: Option<i64>,
50655    pub checklist_task_id: Option<i64>,
50656}
50657impl From<NoSkipReplyParameters> for ReplyParameters {
50658    fn from(t: NoSkipReplyParameters) -> Self {
50659        Self {
50660            message_id: t.message_id,
50661            chat_id: t.chat_id,
50662            allow_sending_without_reply: t.allow_sending_without_reply,
50663            quote: t.quote,
50664            quote_parse_mode: t.quote_parse_mode,
50665            quote_entities: t.quote_entities,
50666            quote_position: t.quote_position,
50667            checklist_task_id: t.checklist_task_id,
50668        }
50669    }
50670}
50671#[allow(clippy::from_over_into)]
50672impl Into<NoSkipReplyParameters> for ReplyParameters {
50673    fn into(self) -> NoSkipReplyParameters {
50674        NoSkipReplyParameters {
50675            message_id: self.message_id,
50676            chat_id: self.chat_id,
50677            allow_sending_without_reply: self.allow_sending_without_reply,
50678            quote: self.quote,
50679            quote_parse_mode: self.quote_parse_mode,
50680            quote_entities: self.quote_entities,
50681            quote_position: self.quote_position,
50682            checklist_task_id: self.checklist_task_id,
50683        }
50684    }
50685}
50686impl NoSkipReplyParameters {
50687    pub fn skip(self) -> ReplyParameters {
50688        self.into()
50689    }
50690}
50691impl ReplyParameters {
50692    pub fn noskip(self) -> NoSkipReplyParameters {
50693        self.into()
50694    }
50695}
50696#[allow(rustdoc::invalid_html_tags)]
50697#[doc = "Describes reply parameters for the message that is being sent."]
50698#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50699pub struct ReplyParametersBuilder {
50700    #[allow(rustdoc::invalid_html_tags)]
50701    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
50702    #[serde(rename = "message_id")]
50703    pub message_id: i64,
50704    #[allow(rustdoc::invalid_html_tags)]
50705    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
50706    #[serde(skip_serializing_if = "Option::is_none", rename = "chat_id", default)]
50707    pub chat_id: Option<ChatHandle>,
50708    #[allow(rustdoc::invalid_html_tags)]
50709    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
50710    #[serde(
50711        skip_serializing_if = "Option::is_none",
50712        rename = "allow_sending_without_reply",
50713        default
50714    )]
50715    pub allow_sending_without_reply: Option<bool>,
50716    #[allow(rustdoc::invalid_html_tags)]
50717    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
50718    #[serde(skip_serializing_if = "Option::is_none", rename = "quote", default)]
50719    pub quote: Option<String>,
50720    #[allow(rustdoc::invalid_html_tags)]
50721    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
50722    #[serde(
50723        skip_serializing_if = "Option::is_none",
50724        rename = "quote_parse_mode",
50725        default
50726    )]
50727    pub quote_parse_mode: Option<String>,
50728    #[allow(rustdoc::invalid_html_tags)]
50729    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
50730    #[serde(
50731        skip_serializing_if = "Option::is_none",
50732        rename = "quote_entities",
50733        default
50734    )]
50735    pub quote_entities: Option<Vec<MessageEntity>>,
50736    #[allow(rustdoc::invalid_html_tags)]
50737    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
50738    #[serde(
50739        skip_serializing_if = "Option::is_none",
50740        rename = "quote_position",
50741        default
50742    )]
50743    pub quote_position: Option<i64>,
50744    #[allow(rustdoc::invalid_html_tags)]
50745    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
50746    #[serde(
50747        skip_serializing_if = "Option::is_none",
50748        rename = "checklist_task_id",
50749        default
50750    )]
50751    pub checklist_task_id: Option<i64>,
50752}
50753impl ReplyParametersBuilder {
50754    #[allow(clippy::too_many_arguments)]
50755    pub fn new(message_id: i64) -> Self {
50756        Self {
50757            message_id,
50758            chat_id: None,
50759            allow_sending_without_reply: None,
50760            quote: None,
50761            quote_parse_mode: None,
50762            quote_entities: None,
50763            quote_position: None,
50764            checklist_task_id: None,
50765        }
50766    }
50767    #[allow(rustdoc::invalid_html_tags)]
50768    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
50769    pub fn set_message_id(mut self, message_id: i64) -> Self {
50770        self.message_id = message_id;
50771        self
50772    }
50773    #[allow(rustdoc::invalid_html_tags)]
50774    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
50775    pub fn set_chat_id(mut self, chat_id: ChatHandle) -> Self {
50776        self.chat_id = Some(chat_id);
50777        self
50778    }
50779    #[allow(rustdoc::invalid_html_tags)]
50780    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
50781    pub fn set_allow_sending_without_reply(mut self, allow_sending_without_reply: bool) -> Self {
50782        self.allow_sending_without_reply = Some(allow_sending_without_reply);
50783        self
50784    }
50785    #[allow(rustdoc::invalid_html_tags)]
50786    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
50787    pub fn set_quote(mut self, quote: String) -> Self {
50788        self.quote = Some(quote);
50789        self
50790    }
50791    #[allow(rustdoc::invalid_html_tags)]
50792    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
50793    pub fn set_quote_parse_mode(mut self, quote_parse_mode: String) -> Self {
50794        self.quote_parse_mode = Some(quote_parse_mode);
50795        self
50796    }
50797    #[allow(rustdoc::invalid_html_tags)]
50798    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
50799    pub fn set_quote_entities(mut self, quote_entities: Vec<MessageEntity>) -> Self {
50800        self.quote_entities = Some(quote_entities);
50801        self
50802    }
50803    #[allow(rustdoc::invalid_html_tags)]
50804    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
50805    pub fn set_quote_position(mut self, quote_position: i64) -> Self {
50806        self.quote_position = Some(quote_position);
50807        self
50808    }
50809    #[allow(rustdoc::invalid_html_tags)]
50810    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
50811    pub fn set_checklist_task_id(mut self, checklist_task_id: i64) -> Self {
50812        self.checklist_task_id = Some(checklist_task_id);
50813        self
50814    }
50815    pub fn build(self) -> ReplyParameters {
50816        ReplyParameters {
50817            message_id: self.message_id,
50818            chat_id: self.chat_id,
50819            allow_sending_without_reply: self.allow_sending_without_reply,
50820            quote: self.quote,
50821            quote_parse_mode: self.quote_parse_mode,
50822            quote_entities: self.quote_entities,
50823            quote_position: self.quote_position,
50824            checklist_task_id: self.checklist_task_id,
50825        }
50826    }
50827}
50828#[allow(rustdoc::invalid_html_tags)]
50829#[doc = "Represents a general file to be sent."]
50830#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50831pub struct InputMediaDocument {
50832    #[allow(rustdoc::invalid_html_tags)]
50833    #[doc = "Type of the result, must be document"]
50834    #[serde(rename = "type")]
50835    pub tg_type: String,
50836    #[allow(rustdoc::invalid_html_tags)]
50837    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
50838    #[serde(rename = "media")]
50839    pub media: Option<InputFile>,
50840    #[allow(rustdoc::invalid_html_tags)]
50841    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
50842    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
50843    pub thumbnail: Option<String>,
50844    #[allow(rustdoc::invalid_html_tags)]
50845    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
50846    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
50847    pub caption: Option<String>,
50848    #[allow(rustdoc::invalid_html_tags)]
50849    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
50850    #[serde(
50851        skip_serializing_if = "Option::is_none",
50852        rename = "parse_mode",
50853        default
50854    )]
50855    pub parse_mode: Option<String>,
50856    #[allow(rustdoc::invalid_html_tags)]
50857    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
50858    #[serde(
50859        skip_serializing_if = "Option::is_none",
50860        rename = "caption_entities",
50861        default
50862    )]
50863    pub caption_entities: Option<Vec<MessageEntity>>,
50864    #[allow(rustdoc::invalid_html_tags)]
50865    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
50866    #[serde(
50867        skip_serializing_if = "Option::is_none",
50868        rename = "disable_content_type_detection",
50869        default
50870    )]
50871    pub disable_content_type_detection: Option<bool>,
50872}
50873#[allow(rustdoc::invalid_html_tags)]
50874#[doc = "Companion type to InputMediaDocument that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
50875#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50876pub struct NoSkipInputMediaDocument {
50877    #[allow(rustdoc::invalid_html_tags)]
50878    #[doc = "Type of the result, must be document"]
50879    #[serde(rename = "type")]
50880    pub tg_type: String,
50881    #[allow(rustdoc::invalid_html_tags)]
50882    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
50883    #[serde(rename = "media")]
50884    pub media: Option<InputFile>,
50885    pub thumbnail: Option<String>,
50886    pub caption: Option<String>,
50887    pub parse_mode: Option<String>,
50888    pub caption_entities: Option<Vec<MessageEntity>>,
50889    pub disable_content_type_detection: Option<bool>,
50890}
50891impl From<NoSkipInputMediaDocument> for InputMediaDocument {
50892    fn from(t: NoSkipInputMediaDocument) -> Self {
50893        Self {
50894            tg_type: t.tg_type,
50895            media: t.media,
50896            thumbnail: t.thumbnail,
50897            caption: t.caption,
50898            parse_mode: t.parse_mode,
50899            caption_entities: t.caption_entities,
50900            disable_content_type_detection: t.disable_content_type_detection,
50901        }
50902    }
50903}
50904#[allow(clippy::from_over_into)]
50905impl Into<NoSkipInputMediaDocument> for InputMediaDocument {
50906    fn into(self) -> NoSkipInputMediaDocument {
50907        NoSkipInputMediaDocument {
50908            tg_type: self.tg_type,
50909            media: self.media,
50910            thumbnail: self.thumbnail,
50911            caption: self.caption,
50912            parse_mode: self.parse_mode,
50913            caption_entities: self.caption_entities,
50914            disable_content_type_detection: self.disable_content_type_detection,
50915        }
50916    }
50917}
50918impl NoSkipInputMediaDocument {
50919    pub fn skip(self) -> InputMediaDocument {
50920        self.into()
50921    }
50922}
50923impl InputMediaDocument {
50924    pub fn noskip(self) -> NoSkipInputMediaDocument {
50925        self.into()
50926    }
50927}
50928#[allow(rustdoc::invalid_html_tags)]
50929#[doc = "Represents a general file to be sent."]
50930#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50931pub struct InputMediaDocumentBuilder {
50932    #[allow(rustdoc::invalid_html_tags)]
50933    #[doc = "Type of the result, must be document"]
50934    #[serde(rename = "type")]
50935    pub tg_type: String,
50936    #[allow(rustdoc::invalid_html_tags)]
50937    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
50938    #[serde(rename = "media")]
50939    pub media: Option<InputFile>,
50940    #[allow(rustdoc::invalid_html_tags)]
50941    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
50942    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
50943    pub thumbnail: Option<String>,
50944    #[allow(rustdoc::invalid_html_tags)]
50945    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
50946    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
50947    pub caption: Option<String>,
50948    #[allow(rustdoc::invalid_html_tags)]
50949    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
50950    #[serde(
50951        skip_serializing_if = "Option::is_none",
50952        rename = "parse_mode",
50953        default
50954    )]
50955    pub parse_mode: Option<String>,
50956    #[allow(rustdoc::invalid_html_tags)]
50957    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
50958    #[serde(
50959        skip_serializing_if = "Option::is_none",
50960        rename = "caption_entities",
50961        default
50962    )]
50963    pub caption_entities: Option<Vec<MessageEntity>>,
50964    #[allow(rustdoc::invalid_html_tags)]
50965    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
50966    #[serde(
50967        skip_serializing_if = "Option::is_none",
50968        rename = "disable_content_type_detection",
50969        default
50970    )]
50971    pub disable_content_type_detection: Option<bool>,
50972}
50973impl InputMediaDocumentBuilder {
50974    #[allow(clippy::too_many_arguments)]
50975    pub fn new(media: Option<InputFile>) -> Self {
50976        Self {
50977            tg_type: "document".to_owned(),
50978            media,
50979            thumbnail: None,
50980            caption: None,
50981            parse_mode: None,
50982            caption_entities: None,
50983            disable_content_type_detection: None,
50984        }
50985    }
50986    #[allow(rustdoc::invalid_html_tags)]
50987    #[doc = "Type of the result, must be document"]
50988    pub fn set_type(mut self, tg_type: String) -> Self {
50989        self.tg_type = tg_type;
50990        self
50991    }
50992    #[allow(rustdoc::invalid_html_tags)]
50993    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
50994    pub fn set_media(mut self, media: Option<InputFile>) -> Self {
50995        self.media = media;
50996        self
50997    }
50998    #[allow(rustdoc::invalid_html_tags)]
50999    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
51000    pub fn set_thumbnail(mut self, thumbnail: String) -> Self {
51001        self.thumbnail = Some(thumbnail);
51002        self
51003    }
51004    #[allow(rustdoc::invalid_html_tags)]
51005    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
51006    pub fn set_caption(mut self, caption: String) -> Self {
51007        self.caption = Some(caption);
51008        self
51009    }
51010    #[allow(rustdoc::invalid_html_tags)]
51011    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
51012    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
51013        self.parse_mode = Some(parse_mode);
51014        self
51015    }
51016    #[allow(rustdoc::invalid_html_tags)]
51017    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
51018    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
51019        self.caption_entities = Some(caption_entities);
51020        self
51021    }
51022    #[allow(rustdoc::invalid_html_tags)]
51023    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
51024    pub fn set_disable_content_type_detection(
51025        mut self,
51026        disable_content_type_detection: bool,
51027    ) -> Self {
51028        self.disable_content_type_detection = Some(disable_content_type_detection);
51029        self
51030    }
51031    pub fn build(self) -> InputMediaDocument {
51032        InputMediaDocument {
51033            tg_type: self.tg_type,
51034            media: self.media,
51035            thumbnail: self.thumbnail,
51036            caption: self.caption,
51037            parse_mode: self.parse_mode,
51038            caption_entities: self.caption_entities,
51039            disable_content_type_detection: self.disable_content_type_detection,
51040        }
51041    }
51042}
51043#[allow(rustdoc::invalid_html_tags)]
51044#[doc = "Contains information about the start page settings of a Telegram Business account."]
51045#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51046pub struct BusinessIntro {
51047    #[allow(rustdoc::invalid_html_tags)]
51048    #[doc = "Optional. Title text of the business intro"]
51049    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
51050    pub title: Option<String>,
51051    #[allow(rustdoc::invalid_html_tags)]
51052    #[doc = "Optional. Message text of the business intro"]
51053    #[serde(skip_serializing_if = "Option::is_none", rename = "message", default)]
51054    pub message: Option<String>,
51055    #[allow(rustdoc::invalid_html_tags)]
51056    #[doc = "Optional. Sticker of the business intro"]
51057    #[serde(skip_serializing_if = "Option::is_none", rename = "sticker", default)]
51058    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
51059}
51060#[allow(rustdoc::invalid_html_tags)]
51061#[doc = "Companion type to BusinessIntro that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
51062#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51063pub struct NoSkipBusinessIntro {
51064    pub title: Option<String>,
51065    pub message: Option<String>,
51066    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
51067}
51068impl From<NoSkipBusinessIntro> for BusinessIntro {
51069    fn from(t: NoSkipBusinessIntro) -> Self {
51070        Self {
51071            title: t.title,
51072            message: t.message,
51073            sticker: t.sticker,
51074        }
51075    }
51076}
51077#[allow(clippy::from_over_into)]
51078impl Into<NoSkipBusinessIntro> for BusinessIntro {
51079    fn into(self) -> NoSkipBusinessIntro {
51080        NoSkipBusinessIntro {
51081            title: self.title,
51082            message: self.message,
51083            sticker: self.sticker,
51084        }
51085    }
51086}
51087impl NoSkipBusinessIntro {
51088    pub fn skip(self) -> BusinessIntro {
51089        self.into()
51090    }
51091}
51092impl BusinessIntro {
51093    pub fn noskip(self) -> NoSkipBusinessIntro {
51094        self.into()
51095    }
51096}
51097#[allow(rustdoc::invalid_html_tags)]
51098#[doc = "Contains information about the start page settings of a Telegram Business account."]
51099#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51100pub struct BusinessIntroBuilder {
51101    #[allow(rustdoc::invalid_html_tags)]
51102    #[doc = "Optional. Title text of the business intro"]
51103    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
51104    pub title: Option<String>,
51105    #[allow(rustdoc::invalid_html_tags)]
51106    #[doc = "Optional. Message text of the business intro"]
51107    #[serde(skip_serializing_if = "Option::is_none", rename = "message", default)]
51108    pub message: Option<String>,
51109    #[allow(rustdoc::invalid_html_tags)]
51110    #[doc = "Optional. Sticker of the business intro"]
51111    #[serde(skip_serializing_if = "Option::is_none", rename = "sticker", default)]
51112    pub sticker: Option<BoxWrapper<Unbox<Sticker>>>,
51113}
51114impl BusinessIntroBuilder {
51115    #[allow(clippy::too_many_arguments)]
51116    pub fn new() -> Self {
51117        Self {
51118            title: None,
51119            message: None,
51120            sticker: None,
51121        }
51122    }
51123    #[allow(rustdoc::invalid_html_tags)]
51124    #[doc = "Optional. Title text of the business intro"]
51125    pub fn set_title(mut self, title: String) -> Self {
51126        self.title = Some(title);
51127        self
51128    }
51129    #[allow(rustdoc::invalid_html_tags)]
51130    #[doc = "Optional. Message text of the business intro"]
51131    pub fn set_message(mut self, message: String) -> Self {
51132        self.message = Some(message);
51133        self
51134    }
51135    #[allow(rustdoc::invalid_html_tags)]
51136    #[doc = "Optional. Sticker of the business intro"]
51137    pub fn set_sticker(mut self, sticker: Sticker) -> Self {
51138        self.sticker = Some(BoxWrapper(Unbox(sticker)));
51139        self
51140    }
51141    pub fn build(self) -> BusinessIntro {
51142        BusinessIntro {
51143            title: self.title,
51144            message: self.message,
51145            sticker: self.sticker,
51146        }
51147    }
51148}
51149#[allow(rustdoc::invalid_html_tags)]
51150#[doc = "This object represents a service message about the creation of a scheduled giveaway."]
51151#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51152pub struct GiveawayCreated {
51153    #[allow(rustdoc::invalid_html_tags)]
51154    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
51155    #[serde(
51156        skip_serializing_if = "Option::is_none",
51157        rename = "prize_star_count",
51158        default
51159    )]
51160    pub prize_star_count: Option<i64>,
51161}
51162#[allow(rustdoc::invalid_html_tags)]
51163#[doc = "Companion type to GiveawayCreated that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
51164#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51165pub struct NoSkipGiveawayCreated {
51166    pub prize_star_count: Option<i64>,
51167}
51168impl From<NoSkipGiveawayCreated> for GiveawayCreated {
51169    fn from(t: NoSkipGiveawayCreated) -> Self {
51170        Self {
51171            prize_star_count: t.prize_star_count,
51172        }
51173    }
51174}
51175#[allow(clippy::from_over_into)]
51176impl Into<NoSkipGiveawayCreated> for GiveawayCreated {
51177    fn into(self) -> NoSkipGiveawayCreated {
51178        NoSkipGiveawayCreated {
51179            prize_star_count: self.prize_star_count,
51180        }
51181    }
51182}
51183impl NoSkipGiveawayCreated {
51184    pub fn skip(self) -> GiveawayCreated {
51185        self.into()
51186    }
51187}
51188impl GiveawayCreated {
51189    pub fn noskip(self) -> NoSkipGiveawayCreated {
51190        self.into()
51191    }
51192}
51193#[allow(rustdoc::invalid_html_tags)]
51194#[doc = "This object represents a service message about the creation of a scheduled giveaway."]
51195#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51196pub struct GiveawayCreatedBuilder {
51197    #[allow(rustdoc::invalid_html_tags)]
51198    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
51199    #[serde(
51200        skip_serializing_if = "Option::is_none",
51201        rename = "prize_star_count",
51202        default
51203    )]
51204    pub prize_star_count: Option<i64>,
51205}
51206impl GiveawayCreatedBuilder {
51207    #[allow(clippy::too_many_arguments)]
51208    pub fn new() -> Self {
51209        Self {
51210            prize_star_count: None,
51211        }
51212    }
51213    #[allow(rustdoc::invalid_html_tags)]
51214    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
51215    pub fn set_prize_star_count(mut self, prize_star_count: i64) -> Self {
51216        self.prize_star_count = Some(prize_star_count);
51217        self
51218    }
51219    pub fn build(self) -> GiveawayCreated {
51220        GiveawayCreated {
51221            prize_star_count: self.prize_star_count,
51222        }
51223    }
51224}
51225#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51226#[serde(untagged)]
51227pub enum InputProfilePhoto {
51228    InputProfilePhotoStatic(InputProfilePhotoStatic),
51229    InputProfilePhotoAnimated(InputProfilePhotoAnimated),
51230}
51231impl Default for InputProfilePhoto {
51232    fn default() -> Self {
51233        InputProfilePhoto::InputProfilePhotoStatic(InputProfilePhotoStatic::default())
51234    }
51235}
51236impl InputProfilePhoto {}
51237#[allow(rustdoc::invalid_html_tags)]
51238#[doc = "Represents a chat member that has some additional privileges."]
51239#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51240pub struct ChatMemberAdministrator {
51241    #[allow(rustdoc::invalid_html_tags)]
51242    #[doc = "Information about the user"]
51243    #[serde(rename = "user")]
51244    pub user: BoxWrapper<Unbox<User>>,
51245    #[allow(rustdoc::invalid_html_tags)]
51246    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
51247    #[serde(rename = "can_be_edited")]
51248    pub can_be_edited: bool,
51249    #[allow(rustdoc::invalid_html_tags)]
51250    #[doc = "True, if the user's presence in the chat is hidden"]
51251    #[serde(rename = "is_anonymous")]
51252    pub is_anonymous: bool,
51253    #[allow(rustdoc::invalid_html_tags)]
51254    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
51255    #[serde(rename = "can_manage_chat")]
51256    pub can_manage_chat: bool,
51257    #[allow(rustdoc::invalid_html_tags)]
51258    #[doc = "True, if the administrator can delete messages of other users"]
51259    #[serde(rename = "can_delete_messages")]
51260    pub can_delete_messages: bool,
51261    #[allow(rustdoc::invalid_html_tags)]
51262    #[doc = "True, if the administrator can manage video chats"]
51263    #[serde(rename = "can_manage_video_chats")]
51264    pub can_manage_video_chats: bool,
51265    #[allow(rustdoc::invalid_html_tags)]
51266    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
51267    #[serde(rename = "can_restrict_members")]
51268    pub can_restrict_members: bool,
51269    #[allow(rustdoc::invalid_html_tags)]
51270    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
51271    #[serde(rename = "can_promote_members")]
51272    pub can_promote_members: bool,
51273    #[allow(rustdoc::invalid_html_tags)]
51274    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
51275    #[serde(rename = "can_change_info")]
51276    pub can_change_info: bool,
51277    #[allow(rustdoc::invalid_html_tags)]
51278    #[doc = "True, if the user is allowed to invite new users to the chat"]
51279    #[serde(rename = "can_invite_users")]
51280    pub can_invite_users: bool,
51281    #[allow(rustdoc::invalid_html_tags)]
51282    #[doc = "True, if the administrator can post stories to the chat"]
51283    #[serde(rename = "can_post_stories")]
51284    pub can_post_stories: bool,
51285    #[allow(rustdoc::invalid_html_tags)]
51286    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
51287    #[serde(rename = "can_edit_stories")]
51288    pub can_edit_stories: bool,
51289    #[allow(rustdoc::invalid_html_tags)]
51290    #[doc = "True, if the administrator can delete stories posted by other users"]
51291    #[serde(rename = "can_delete_stories")]
51292    pub can_delete_stories: bool,
51293    #[allow(rustdoc::invalid_html_tags)]
51294    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
51295    #[serde(
51296        skip_serializing_if = "Option::is_none",
51297        rename = "can_post_messages",
51298        default
51299    )]
51300    pub can_post_messages: Option<bool>,
51301    #[allow(rustdoc::invalid_html_tags)]
51302    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
51303    #[serde(
51304        skip_serializing_if = "Option::is_none",
51305        rename = "can_edit_messages",
51306        default
51307    )]
51308    pub can_edit_messages: Option<bool>,
51309    #[allow(rustdoc::invalid_html_tags)]
51310    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
51311    #[serde(
51312        skip_serializing_if = "Option::is_none",
51313        rename = "can_pin_messages",
51314        default
51315    )]
51316    pub can_pin_messages: Option<bool>,
51317    #[allow(rustdoc::invalid_html_tags)]
51318    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
51319    #[serde(
51320        skip_serializing_if = "Option::is_none",
51321        rename = "can_manage_topics",
51322        default
51323    )]
51324    pub can_manage_topics: Option<bool>,
51325    #[allow(rustdoc::invalid_html_tags)]
51326    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
51327    #[serde(
51328        skip_serializing_if = "Option::is_none",
51329        rename = "can_manage_direct_messages",
51330        default
51331    )]
51332    pub can_manage_direct_messages: Option<bool>,
51333    #[allow(rustdoc::invalid_html_tags)]
51334    #[doc = "Optional. Custom title for this user"]
51335    #[serde(
51336        skip_serializing_if = "Option::is_none",
51337        rename = "custom_title",
51338        default
51339    )]
51340    pub custom_title: Option<String>,
51341}
51342#[allow(rustdoc::invalid_html_tags)]
51343#[doc = "Companion type to ChatMemberAdministrator that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
51344#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51345pub struct NoSkipChatMemberAdministrator {
51346    #[allow(rustdoc::invalid_html_tags)]
51347    #[doc = "Information about the user"]
51348    #[serde(rename = "user")]
51349    pub user: BoxWrapper<Unbox<User>>,
51350    #[allow(rustdoc::invalid_html_tags)]
51351    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
51352    #[serde(rename = "can_be_edited")]
51353    pub can_be_edited: bool,
51354    #[allow(rustdoc::invalid_html_tags)]
51355    #[doc = "True, if the user's presence in the chat is hidden"]
51356    #[serde(rename = "is_anonymous")]
51357    pub is_anonymous: bool,
51358    #[allow(rustdoc::invalid_html_tags)]
51359    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
51360    #[serde(rename = "can_manage_chat")]
51361    pub can_manage_chat: bool,
51362    #[allow(rustdoc::invalid_html_tags)]
51363    #[doc = "True, if the administrator can delete messages of other users"]
51364    #[serde(rename = "can_delete_messages")]
51365    pub can_delete_messages: bool,
51366    #[allow(rustdoc::invalid_html_tags)]
51367    #[doc = "True, if the administrator can manage video chats"]
51368    #[serde(rename = "can_manage_video_chats")]
51369    pub can_manage_video_chats: bool,
51370    #[allow(rustdoc::invalid_html_tags)]
51371    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
51372    #[serde(rename = "can_restrict_members")]
51373    pub can_restrict_members: bool,
51374    #[allow(rustdoc::invalid_html_tags)]
51375    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
51376    #[serde(rename = "can_promote_members")]
51377    pub can_promote_members: bool,
51378    #[allow(rustdoc::invalid_html_tags)]
51379    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
51380    #[serde(rename = "can_change_info")]
51381    pub can_change_info: bool,
51382    #[allow(rustdoc::invalid_html_tags)]
51383    #[doc = "True, if the user is allowed to invite new users to the chat"]
51384    #[serde(rename = "can_invite_users")]
51385    pub can_invite_users: bool,
51386    #[allow(rustdoc::invalid_html_tags)]
51387    #[doc = "True, if the administrator can post stories to the chat"]
51388    #[serde(rename = "can_post_stories")]
51389    pub can_post_stories: bool,
51390    #[allow(rustdoc::invalid_html_tags)]
51391    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
51392    #[serde(rename = "can_edit_stories")]
51393    pub can_edit_stories: bool,
51394    #[allow(rustdoc::invalid_html_tags)]
51395    #[doc = "True, if the administrator can delete stories posted by other users"]
51396    #[serde(rename = "can_delete_stories")]
51397    pub can_delete_stories: bool,
51398    pub can_post_messages: Option<bool>,
51399    pub can_edit_messages: Option<bool>,
51400    pub can_pin_messages: Option<bool>,
51401    pub can_manage_topics: Option<bool>,
51402    pub can_manage_direct_messages: Option<bool>,
51403    pub custom_title: Option<String>,
51404}
51405impl From<NoSkipChatMemberAdministrator> for ChatMemberAdministrator {
51406    fn from(t: NoSkipChatMemberAdministrator) -> Self {
51407        Self {
51408            user: t.user,
51409            can_be_edited: t.can_be_edited,
51410            is_anonymous: t.is_anonymous,
51411            can_manage_chat: t.can_manage_chat,
51412            can_delete_messages: t.can_delete_messages,
51413            can_manage_video_chats: t.can_manage_video_chats,
51414            can_restrict_members: t.can_restrict_members,
51415            can_promote_members: t.can_promote_members,
51416            can_change_info: t.can_change_info,
51417            can_invite_users: t.can_invite_users,
51418            can_post_stories: t.can_post_stories,
51419            can_edit_stories: t.can_edit_stories,
51420            can_delete_stories: t.can_delete_stories,
51421            can_post_messages: t.can_post_messages,
51422            can_edit_messages: t.can_edit_messages,
51423            can_pin_messages: t.can_pin_messages,
51424            can_manage_topics: t.can_manage_topics,
51425            can_manage_direct_messages: t.can_manage_direct_messages,
51426            custom_title: t.custom_title,
51427        }
51428    }
51429}
51430#[allow(clippy::from_over_into)]
51431impl Into<NoSkipChatMemberAdministrator> for ChatMemberAdministrator {
51432    fn into(self) -> NoSkipChatMemberAdministrator {
51433        NoSkipChatMemberAdministrator {
51434            user: self.user,
51435            can_be_edited: self.can_be_edited,
51436            is_anonymous: self.is_anonymous,
51437            can_manage_chat: self.can_manage_chat,
51438            can_delete_messages: self.can_delete_messages,
51439            can_manage_video_chats: self.can_manage_video_chats,
51440            can_restrict_members: self.can_restrict_members,
51441            can_promote_members: self.can_promote_members,
51442            can_change_info: self.can_change_info,
51443            can_invite_users: self.can_invite_users,
51444            can_post_stories: self.can_post_stories,
51445            can_edit_stories: self.can_edit_stories,
51446            can_delete_stories: self.can_delete_stories,
51447            can_post_messages: self.can_post_messages,
51448            can_edit_messages: self.can_edit_messages,
51449            can_pin_messages: self.can_pin_messages,
51450            can_manage_topics: self.can_manage_topics,
51451            can_manage_direct_messages: self.can_manage_direct_messages,
51452            custom_title: self.custom_title,
51453        }
51454    }
51455}
51456impl NoSkipChatMemberAdministrator {
51457    pub fn skip(self) -> ChatMemberAdministrator {
51458        self.into()
51459    }
51460}
51461impl ChatMemberAdministrator {
51462    pub fn noskip(self) -> NoSkipChatMemberAdministrator {
51463        self.into()
51464    }
51465}
51466#[allow(rustdoc::invalid_html_tags)]
51467#[doc = "Represents a chat member that has some additional privileges."]
51468#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51469pub struct ChatMemberAdministratorBuilder {
51470    #[allow(rustdoc::invalid_html_tags)]
51471    #[doc = "Information about the user"]
51472    #[serde(rename = "user")]
51473    pub user: BoxWrapper<Unbox<User>>,
51474    #[allow(rustdoc::invalid_html_tags)]
51475    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
51476    #[serde(rename = "can_be_edited")]
51477    pub can_be_edited: bool,
51478    #[allow(rustdoc::invalid_html_tags)]
51479    #[doc = "True, if the user's presence in the chat is hidden"]
51480    #[serde(rename = "is_anonymous")]
51481    pub is_anonymous: bool,
51482    #[allow(rustdoc::invalid_html_tags)]
51483    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
51484    #[serde(rename = "can_manage_chat")]
51485    pub can_manage_chat: bool,
51486    #[allow(rustdoc::invalid_html_tags)]
51487    #[doc = "True, if the administrator can delete messages of other users"]
51488    #[serde(rename = "can_delete_messages")]
51489    pub can_delete_messages: bool,
51490    #[allow(rustdoc::invalid_html_tags)]
51491    #[doc = "True, if the administrator can manage video chats"]
51492    #[serde(rename = "can_manage_video_chats")]
51493    pub can_manage_video_chats: bool,
51494    #[allow(rustdoc::invalid_html_tags)]
51495    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
51496    #[serde(rename = "can_restrict_members")]
51497    pub can_restrict_members: bool,
51498    #[allow(rustdoc::invalid_html_tags)]
51499    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
51500    #[serde(rename = "can_promote_members")]
51501    pub can_promote_members: bool,
51502    #[allow(rustdoc::invalid_html_tags)]
51503    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
51504    #[serde(rename = "can_change_info")]
51505    pub can_change_info: bool,
51506    #[allow(rustdoc::invalid_html_tags)]
51507    #[doc = "True, if the user is allowed to invite new users to the chat"]
51508    #[serde(rename = "can_invite_users")]
51509    pub can_invite_users: bool,
51510    #[allow(rustdoc::invalid_html_tags)]
51511    #[doc = "True, if the administrator can post stories to the chat"]
51512    #[serde(rename = "can_post_stories")]
51513    pub can_post_stories: bool,
51514    #[allow(rustdoc::invalid_html_tags)]
51515    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
51516    #[serde(rename = "can_edit_stories")]
51517    pub can_edit_stories: bool,
51518    #[allow(rustdoc::invalid_html_tags)]
51519    #[doc = "True, if the administrator can delete stories posted by other users"]
51520    #[serde(rename = "can_delete_stories")]
51521    pub can_delete_stories: bool,
51522    #[allow(rustdoc::invalid_html_tags)]
51523    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
51524    #[serde(
51525        skip_serializing_if = "Option::is_none",
51526        rename = "can_post_messages",
51527        default
51528    )]
51529    pub can_post_messages: Option<bool>,
51530    #[allow(rustdoc::invalid_html_tags)]
51531    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
51532    #[serde(
51533        skip_serializing_if = "Option::is_none",
51534        rename = "can_edit_messages",
51535        default
51536    )]
51537    pub can_edit_messages: Option<bool>,
51538    #[allow(rustdoc::invalid_html_tags)]
51539    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
51540    #[serde(
51541        skip_serializing_if = "Option::is_none",
51542        rename = "can_pin_messages",
51543        default
51544    )]
51545    pub can_pin_messages: Option<bool>,
51546    #[allow(rustdoc::invalid_html_tags)]
51547    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
51548    #[serde(
51549        skip_serializing_if = "Option::is_none",
51550        rename = "can_manage_topics",
51551        default
51552    )]
51553    pub can_manage_topics: Option<bool>,
51554    #[allow(rustdoc::invalid_html_tags)]
51555    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
51556    #[serde(
51557        skip_serializing_if = "Option::is_none",
51558        rename = "can_manage_direct_messages",
51559        default
51560    )]
51561    pub can_manage_direct_messages: Option<bool>,
51562    #[allow(rustdoc::invalid_html_tags)]
51563    #[doc = "Optional. Custom title for this user"]
51564    #[serde(
51565        skip_serializing_if = "Option::is_none",
51566        rename = "custom_title",
51567        default
51568    )]
51569    pub custom_title: Option<String>,
51570}
51571impl ChatMemberAdministratorBuilder {
51572    #[allow(clippy::too_many_arguments)]
51573    pub fn new<A: Into<User>>(
51574        user: A,
51575        can_be_edited: bool,
51576        is_anonymous: bool,
51577        can_manage_chat: bool,
51578        can_delete_messages: bool,
51579        can_manage_video_chats: bool,
51580        can_restrict_members: bool,
51581        can_promote_members: bool,
51582        can_change_info: bool,
51583        can_invite_users: bool,
51584        can_post_stories: bool,
51585        can_edit_stories: bool,
51586        can_delete_stories: bool,
51587    ) -> Self {
51588        Self {
51589            user: BoxWrapper::new_unbox(user.into()),
51590            can_be_edited,
51591            is_anonymous,
51592            can_manage_chat,
51593            can_delete_messages,
51594            can_manage_video_chats,
51595            can_restrict_members,
51596            can_promote_members,
51597            can_change_info,
51598            can_invite_users,
51599            can_post_stories,
51600            can_edit_stories,
51601            can_delete_stories,
51602            can_post_messages: None,
51603            can_edit_messages: None,
51604            can_pin_messages: None,
51605            can_manage_topics: None,
51606            can_manage_direct_messages: None,
51607            custom_title: None,
51608        }
51609    }
51610    #[allow(rustdoc::invalid_html_tags)]
51611    #[doc = "Information about the user"]
51612    pub fn set_user(mut self, user: User) -> Self {
51613        self.user = BoxWrapper(Unbox(user));
51614        self
51615    }
51616    #[allow(rustdoc::invalid_html_tags)]
51617    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
51618    pub fn set_can_be_edited(mut self, can_be_edited: bool) -> Self {
51619        self.can_be_edited = can_be_edited;
51620        self
51621    }
51622    #[allow(rustdoc::invalid_html_tags)]
51623    #[doc = "True, if the user's presence in the chat is hidden"]
51624    pub fn set_is_anonymous(mut self, is_anonymous: bool) -> Self {
51625        self.is_anonymous = is_anonymous;
51626        self
51627    }
51628    #[allow(rustdoc::invalid_html_tags)]
51629    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
51630    pub fn set_can_manage_chat(mut self, can_manage_chat: bool) -> Self {
51631        self.can_manage_chat = can_manage_chat;
51632        self
51633    }
51634    #[allow(rustdoc::invalid_html_tags)]
51635    #[doc = "True, if the administrator can delete messages of other users"]
51636    pub fn set_can_delete_messages(mut self, can_delete_messages: bool) -> Self {
51637        self.can_delete_messages = can_delete_messages;
51638        self
51639    }
51640    #[allow(rustdoc::invalid_html_tags)]
51641    #[doc = "True, if the administrator can manage video chats"]
51642    pub fn set_can_manage_video_chats(mut self, can_manage_video_chats: bool) -> Self {
51643        self.can_manage_video_chats = can_manage_video_chats;
51644        self
51645    }
51646    #[allow(rustdoc::invalid_html_tags)]
51647    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
51648    pub fn set_can_restrict_members(mut self, can_restrict_members: bool) -> Self {
51649        self.can_restrict_members = can_restrict_members;
51650        self
51651    }
51652    #[allow(rustdoc::invalid_html_tags)]
51653    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
51654    pub fn set_can_promote_members(mut self, can_promote_members: bool) -> Self {
51655        self.can_promote_members = can_promote_members;
51656        self
51657    }
51658    #[allow(rustdoc::invalid_html_tags)]
51659    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
51660    pub fn set_can_change_info(mut self, can_change_info: bool) -> Self {
51661        self.can_change_info = can_change_info;
51662        self
51663    }
51664    #[allow(rustdoc::invalid_html_tags)]
51665    #[doc = "True, if the user is allowed to invite new users to the chat"]
51666    pub fn set_can_invite_users(mut self, can_invite_users: bool) -> Self {
51667        self.can_invite_users = can_invite_users;
51668        self
51669    }
51670    #[allow(rustdoc::invalid_html_tags)]
51671    #[doc = "True, if the administrator can post stories to the chat"]
51672    pub fn set_can_post_stories(mut self, can_post_stories: bool) -> Self {
51673        self.can_post_stories = can_post_stories;
51674        self
51675    }
51676    #[allow(rustdoc::invalid_html_tags)]
51677    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
51678    pub fn set_can_edit_stories(mut self, can_edit_stories: bool) -> Self {
51679        self.can_edit_stories = can_edit_stories;
51680        self
51681    }
51682    #[allow(rustdoc::invalid_html_tags)]
51683    #[doc = "True, if the administrator can delete stories posted by other users"]
51684    pub fn set_can_delete_stories(mut self, can_delete_stories: bool) -> Self {
51685        self.can_delete_stories = can_delete_stories;
51686        self
51687    }
51688    #[allow(rustdoc::invalid_html_tags)]
51689    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
51690    pub fn set_can_post_messages(mut self, can_post_messages: bool) -> Self {
51691        self.can_post_messages = Some(can_post_messages);
51692        self
51693    }
51694    #[allow(rustdoc::invalid_html_tags)]
51695    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
51696    pub fn set_can_edit_messages(mut self, can_edit_messages: bool) -> Self {
51697        self.can_edit_messages = Some(can_edit_messages);
51698        self
51699    }
51700    #[allow(rustdoc::invalid_html_tags)]
51701    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
51702    pub fn set_can_pin_messages(mut self, can_pin_messages: bool) -> Self {
51703        self.can_pin_messages = Some(can_pin_messages);
51704        self
51705    }
51706    #[allow(rustdoc::invalid_html_tags)]
51707    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
51708    pub fn set_can_manage_topics(mut self, can_manage_topics: bool) -> Self {
51709        self.can_manage_topics = Some(can_manage_topics);
51710        self
51711    }
51712    #[allow(rustdoc::invalid_html_tags)]
51713    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
51714    pub fn set_can_manage_direct_messages(mut self, can_manage_direct_messages: bool) -> Self {
51715        self.can_manage_direct_messages = Some(can_manage_direct_messages);
51716        self
51717    }
51718    #[allow(rustdoc::invalid_html_tags)]
51719    #[doc = "Optional. Custom title for this user"]
51720    pub fn set_custom_title(mut self, custom_title: String) -> Self {
51721        self.custom_title = Some(custom_title);
51722        self
51723    }
51724    pub fn build(self) -> ChatMemberAdministrator {
51725        ChatMemberAdministrator {
51726            user: self.user,
51727            can_be_edited: self.can_be_edited,
51728            is_anonymous: self.is_anonymous,
51729            can_manage_chat: self.can_manage_chat,
51730            can_delete_messages: self.can_delete_messages,
51731            can_manage_video_chats: self.can_manage_video_chats,
51732            can_restrict_members: self.can_restrict_members,
51733            can_promote_members: self.can_promote_members,
51734            can_change_info: self.can_change_info,
51735            can_invite_users: self.can_invite_users,
51736            can_post_stories: self.can_post_stories,
51737            can_edit_stories: self.can_edit_stories,
51738            can_delete_stories: self.can_delete_stories,
51739            can_post_messages: self.can_post_messages,
51740            can_edit_messages: self.can_edit_messages,
51741            can_pin_messages: self.can_pin_messages,
51742            can_manage_topics: self.can_manage_topics,
51743            can_manage_direct_messages: self.can_manage_direct_messages,
51744            custom_title: self.custom_title,
51745        }
51746    }
51747}
51748#[allow(rustdoc::invalid_html_tags)]
51749#[doc = "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation."]
51750#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51751pub struct InlineQueryResultGif {
51752    #[allow(rustdoc::invalid_html_tags)]
51753    #[doc = "Type of the result, must be gif"]
51754    #[serde(rename = "type")]
51755    pub tg_type: String,
51756    #[allow(rustdoc::invalid_html_tags)]
51757    #[doc = "Unique identifier for this result, 1-64 bytes"]
51758    #[serde(rename = "id")]
51759    pub id: String,
51760    #[allow(rustdoc::invalid_html_tags)]
51761    #[doc = "A valid URL for the GIF file"]
51762    #[serde(rename = "gif_url")]
51763    pub gif_url: String,
51764    #[allow(rustdoc::invalid_html_tags)]
51765    #[doc = "Optional. Width of the GIF"]
51766    #[serde(skip_serializing_if = "Option::is_none", rename = "gif_width", default)]
51767    pub gif_width: Option<i64>,
51768    #[allow(rustdoc::invalid_html_tags)]
51769    #[doc = "Optional. Height of the GIF"]
51770    #[serde(
51771        skip_serializing_if = "Option::is_none",
51772        rename = "gif_height",
51773        default
51774    )]
51775    pub gif_height: Option<i64>,
51776    #[allow(rustdoc::invalid_html_tags)]
51777    #[doc = "Optional. Duration of the GIF in seconds"]
51778    #[serde(
51779        skip_serializing_if = "Option::is_none",
51780        rename = "gif_duration",
51781        default
51782    )]
51783    pub gif_duration: Option<i64>,
51784    #[allow(rustdoc::invalid_html_tags)]
51785    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
51786    #[serde(rename = "thumbnail_url")]
51787    pub thumbnail_url: String,
51788    #[allow(rustdoc::invalid_html_tags)]
51789    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
51790    #[serde(
51791        skip_serializing_if = "Option::is_none",
51792        rename = "thumbnail_mime_type",
51793        default
51794    )]
51795    pub thumbnail_mime_type: Option<String>,
51796    #[allow(rustdoc::invalid_html_tags)]
51797    #[doc = "Optional. Title for the result"]
51798    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
51799    pub title: Option<String>,
51800    #[allow(rustdoc::invalid_html_tags)]
51801    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
51802    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
51803    pub caption: Option<String>,
51804    #[allow(rustdoc::invalid_html_tags)]
51805    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
51806    #[serde(
51807        skip_serializing_if = "Option::is_none",
51808        rename = "parse_mode",
51809        default
51810    )]
51811    pub parse_mode: Option<String>,
51812    #[allow(rustdoc::invalid_html_tags)]
51813    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
51814    #[serde(
51815        skip_serializing_if = "Option::is_none",
51816        rename = "caption_entities",
51817        default
51818    )]
51819    pub caption_entities: Option<Vec<MessageEntity>>,
51820    #[allow(rustdoc::invalid_html_tags)]
51821    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
51822    #[serde(
51823        skip_serializing_if = "Option::is_none",
51824        rename = "show_caption_above_media",
51825        default
51826    )]
51827    pub show_caption_above_media: Option<bool>,
51828    #[allow(rustdoc::invalid_html_tags)]
51829    #[doc = "Optional. Inline keyboard attached to the message"]
51830    #[serde(
51831        skip_serializing_if = "Option::is_none",
51832        rename = "reply_markup",
51833        default
51834    )]
51835    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
51836    #[allow(rustdoc::invalid_html_tags)]
51837    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
51838    #[serde(
51839        skip_serializing_if = "Option::is_none",
51840        rename = "input_message_content",
51841        default
51842    )]
51843    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
51844}
51845#[allow(rustdoc::invalid_html_tags)]
51846#[doc = "Companion type to InlineQueryResultGif that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
51847#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51848pub struct NoSkipInlineQueryResultGif {
51849    #[allow(rustdoc::invalid_html_tags)]
51850    #[doc = "Type of the result, must be gif"]
51851    #[serde(rename = "type")]
51852    pub tg_type: String,
51853    #[allow(rustdoc::invalid_html_tags)]
51854    #[doc = "Unique identifier for this result, 1-64 bytes"]
51855    #[serde(rename = "id")]
51856    pub id: String,
51857    #[allow(rustdoc::invalid_html_tags)]
51858    #[doc = "A valid URL for the GIF file"]
51859    #[serde(rename = "gif_url")]
51860    pub gif_url: String,
51861    pub gif_width: Option<i64>,
51862    pub gif_height: Option<i64>,
51863    pub gif_duration: Option<i64>,
51864    #[allow(rustdoc::invalid_html_tags)]
51865    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
51866    #[serde(rename = "thumbnail_url")]
51867    pub thumbnail_url: String,
51868    pub thumbnail_mime_type: Option<String>,
51869    pub title: Option<String>,
51870    pub caption: Option<String>,
51871    pub parse_mode: Option<String>,
51872    pub caption_entities: Option<Vec<MessageEntity>>,
51873    pub show_caption_above_media: Option<bool>,
51874    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
51875    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
51876}
51877impl From<NoSkipInlineQueryResultGif> for InlineQueryResultGif {
51878    fn from(t: NoSkipInlineQueryResultGif) -> Self {
51879        Self {
51880            tg_type: t.tg_type,
51881            id: t.id,
51882            gif_url: t.gif_url,
51883            gif_width: t.gif_width,
51884            gif_height: t.gif_height,
51885            gif_duration: t.gif_duration,
51886            thumbnail_url: t.thumbnail_url,
51887            thumbnail_mime_type: t.thumbnail_mime_type,
51888            title: t.title,
51889            caption: t.caption,
51890            parse_mode: t.parse_mode,
51891            caption_entities: t.caption_entities,
51892            show_caption_above_media: t.show_caption_above_media,
51893            reply_markup: t.reply_markup,
51894            input_message_content: t.input_message_content,
51895        }
51896    }
51897}
51898#[allow(clippy::from_over_into)]
51899impl Into<NoSkipInlineQueryResultGif> for InlineQueryResultGif {
51900    fn into(self) -> NoSkipInlineQueryResultGif {
51901        NoSkipInlineQueryResultGif {
51902            tg_type: self.tg_type,
51903            id: self.id,
51904            gif_url: self.gif_url,
51905            gif_width: self.gif_width,
51906            gif_height: self.gif_height,
51907            gif_duration: self.gif_duration,
51908            thumbnail_url: self.thumbnail_url,
51909            thumbnail_mime_type: self.thumbnail_mime_type,
51910            title: self.title,
51911            caption: self.caption,
51912            parse_mode: self.parse_mode,
51913            caption_entities: self.caption_entities,
51914            show_caption_above_media: self.show_caption_above_media,
51915            reply_markup: self.reply_markup,
51916            input_message_content: self.input_message_content,
51917        }
51918    }
51919}
51920impl NoSkipInlineQueryResultGif {
51921    pub fn skip(self) -> InlineQueryResultGif {
51922        self.into()
51923    }
51924}
51925impl InlineQueryResultGif {
51926    pub fn noskip(self) -> NoSkipInlineQueryResultGif {
51927        self.into()
51928    }
51929}
51930#[allow(rustdoc::invalid_html_tags)]
51931#[doc = "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation."]
51932#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
51933pub struct InlineQueryResultGifBuilder {
51934    #[allow(rustdoc::invalid_html_tags)]
51935    #[doc = "Type of the result, must be gif"]
51936    #[serde(rename = "type")]
51937    pub tg_type: String,
51938    #[allow(rustdoc::invalid_html_tags)]
51939    #[doc = "Unique identifier for this result, 1-64 bytes"]
51940    #[serde(rename = "id")]
51941    pub id: String,
51942    #[allow(rustdoc::invalid_html_tags)]
51943    #[doc = "A valid URL for the GIF file"]
51944    #[serde(rename = "gif_url")]
51945    pub gif_url: String,
51946    #[allow(rustdoc::invalid_html_tags)]
51947    #[doc = "Optional. Width of the GIF"]
51948    #[serde(skip_serializing_if = "Option::is_none", rename = "gif_width", default)]
51949    pub gif_width: Option<i64>,
51950    #[allow(rustdoc::invalid_html_tags)]
51951    #[doc = "Optional. Height of the GIF"]
51952    #[serde(
51953        skip_serializing_if = "Option::is_none",
51954        rename = "gif_height",
51955        default
51956    )]
51957    pub gif_height: Option<i64>,
51958    #[allow(rustdoc::invalid_html_tags)]
51959    #[doc = "Optional. Duration of the GIF in seconds"]
51960    #[serde(
51961        skip_serializing_if = "Option::is_none",
51962        rename = "gif_duration",
51963        default
51964    )]
51965    pub gif_duration: Option<i64>,
51966    #[allow(rustdoc::invalid_html_tags)]
51967    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
51968    #[serde(rename = "thumbnail_url")]
51969    pub thumbnail_url: String,
51970    #[allow(rustdoc::invalid_html_tags)]
51971    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
51972    #[serde(
51973        skip_serializing_if = "Option::is_none",
51974        rename = "thumbnail_mime_type",
51975        default
51976    )]
51977    pub thumbnail_mime_type: Option<String>,
51978    #[allow(rustdoc::invalid_html_tags)]
51979    #[doc = "Optional. Title for the result"]
51980    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
51981    pub title: Option<String>,
51982    #[allow(rustdoc::invalid_html_tags)]
51983    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
51984    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
51985    pub caption: Option<String>,
51986    #[allow(rustdoc::invalid_html_tags)]
51987    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
51988    #[serde(
51989        skip_serializing_if = "Option::is_none",
51990        rename = "parse_mode",
51991        default
51992    )]
51993    pub parse_mode: Option<String>,
51994    #[allow(rustdoc::invalid_html_tags)]
51995    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
51996    #[serde(
51997        skip_serializing_if = "Option::is_none",
51998        rename = "caption_entities",
51999        default
52000    )]
52001    pub caption_entities: Option<Vec<MessageEntity>>,
52002    #[allow(rustdoc::invalid_html_tags)]
52003    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
52004    #[serde(
52005        skip_serializing_if = "Option::is_none",
52006        rename = "show_caption_above_media",
52007        default
52008    )]
52009    pub show_caption_above_media: Option<bool>,
52010    #[allow(rustdoc::invalid_html_tags)]
52011    #[doc = "Optional. Inline keyboard attached to the message"]
52012    #[serde(
52013        skip_serializing_if = "Option::is_none",
52014        rename = "reply_markup",
52015        default
52016    )]
52017    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
52018    #[allow(rustdoc::invalid_html_tags)]
52019    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
52020    #[serde(
52021        skip_serializing_if = "Option::is_none",
52022        rename = "input_message_content",
52023        default
52024    )]
52025    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
52026}
52027impl InlineQueryResultGifBuilder {
52028    #[allow(clippy::too_many_arguments)]
52029    pub fn new(id: String, gif_url: String, thumbnail_url: String) -> Self {
52030        Self {
52031            tg_type: "gif".to_owned(),
52032            id,
52033            gif_url,
52034            thumbnail_url,
52035            gif_width: None,
52036            gif_height: None,
52037            gif_duration: None,
52038            thumbnail_mime_type: None,
52039            title: None,
52040            caption: None,
52041            parse_mode: None,
52042            caption_entities: None,
52043            show_caption_above_media: None,
52044            reply_markup: None,
52045            input_message_content: None,
52046        }
52047    }
52048    #[allow(rustdoc::invalid_html_tags)]
52049    #[doc = "Type of the result, must be gif"]
52050    pub fn set_type(mut self, tg_type: String) -> Self {
52051        self.tg_type = tg_type;
52052        self
52053    }
52054    #[allow(rustdoc::invalid_html_tags)]
52055    #[doc = "Unique identifier for this result, 1-64 bytes"]
52056    pub fn set_id(mut self, id: String) -> Self {
52057        self.id = id;
52058        self
52059    }
52060    #[allow(rustdoc::invalid_html_tags)]
52061    #[doc = "A valid URL for the GIF file"]
52062    pub fn set_gif_url(mut self, gif_url: String) -> Self {
52063        self.gif_url = gif_url;
52064        self
52065    }
52066    #[allow(rustdoc::invalid_html_tags)]
52067    #[doc = "Optional. Width of the GIF"]
52068    pub fn set_gif_width(mut self, gif_width: i64) -> Self {
52069        self.gif_width = Some(gif_width);
52070        self
52071    }
52072    #[allow(rustdoc::invalid_html_tags)]
52073    #[doc = "Optional. Height of the GIF"]
52074    pub fn set_gif_height(mut self, gif_height: i64) -> Self {
52075        self.gif_height = Some(gif_height);
52076        self
52077    }
52078    #[allow(rustdoc::invalid_html_tags)]
52079    #[doc = "Optional. Duration of the GIF in seconds"]
52080    pub fn set_gif_duration(mut self, gif_duration: i64) -> Self {
52081        self.gif_duration = Some(gif_duration);
52082        self
52083    }
52084    #[allow(rustdoc::invalid_html_tags)]
52085    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
52086    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
52087        self.thumbnail_url = thumbnail_url;
52088        self
52089    }
52090    #[allow(rustdoc::invalid_html_tags)]
52091    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
52092    pub fn set_thumbnail_mime_type(mut self, thumbnail_mime_type: String) -> Self {
52093        self.thumbnail_mime_type = Some(thumbnail_mime_type);
52094        self
52095    }
52096    #[allow(rustdoc::invalid_html_tags)]
52097    #[doc = "Optional. Title for the result"]
52098    pub fn set_title(mut self, title: String) -> Self {
52099        self.title = Some(title);
52100        self
52101    }
52102    #[allow(rustdoc::invalid_html_tags)]
52103    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
52104    pub fn set_caption(mut self, caption: String) -> Self {
52105        self.caption = Some(caption);
52106        self
52107    }
52108    #[allow(rustdoc::invalid_html_tags)]
52109    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
52110    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
52111        self.parse_mode = Some(parse_mode);
52112        self
52113    }
52114    #[allow(rustdoc::invalid_html_tags)]
52115    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
52116    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
52117        self.caption_entities = Some(caption_entities);
52118        self
52119    }
52120    #[allow(rustdoc::invalid_html_tags)]
52121    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
52122    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
52123        self.show_caption_above_media = Some(show_caption_above_media);
52124        self
52125    }
52126    #[allow(rustdoc::invalid_html_tags)]
52127    #[doc = "Optional. Inline keyboard attached to the message"]
52128    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
52129        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
52130        self
52131    }
52132    #[allow(rustdoc::invalid_html_tags)]
52133    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
52134    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
52135        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
52136        self
52137    }
52138    pub fn build(self) -> InlineQueryResultGif {
52139        InlineQueryResultGif {
52140            tg_type: self.tg_type,
52141            id: self.id,
52142            gif_url: self.gif_url,
52143            gif_width: self.gif_width,
52144            gif_height: self.gif_height,
52145            gif_duration: self.gif_duration,
52146            thumbnail_url: self.thumbnail_url,
52147            thumbnail_mime_type: self.thumbnail_mime_type,
52148            title: self.title,
52149            caption: self.caption,
52150            parse_mode: self.parse_mode,
52151            caption_entities: self.caption_entities,
52152            show_caption_above_media: self.show_caption_above_media,
52153            reply_markup: self.reply_markup,
52154            input_message_content: self.input_message_content,
52155        }
52156    }
52157}
52158#[allow(rustdoc::invalid_html_tags)]
52159#[doc = "An animated profile photo in the MPEG4 format."]
52160#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52161pub struct InputProfilePhotoAnimated {
52162    #[allow(rustdoc::invalid_html_tags)]
52163    #[doc = "Type of the profile photo, must be animated"]
52164    #[serde(rename = "type")]
52165    pub tg_type: String,
52166    #[allow(rustdoc::invalid_html_tags)]
52167    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
52168    #[serde(rename = "animation")]
52169    pub animation: String,
52170    #[allow(rustdoc::invalid_html_tags)]
52171    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
52172    #[serde(
52173        skip_serializing_if = "Option::is_none",
52174        rename = "main_frame_timestamp",
52175        default
52176    )]
52177    pub main_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
52178}
52179#[allow(rustdoc::invalid_html_tags)]
52180#[doc = "Companion type to InputProfilePhotoAnimated that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
52181#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52182pub struct NoSkipInputProfilePhotoAnimated {
52183    #[allow(rustdoc::invalid_html_tags)]
52184    #[doc = "Type of the profile photo, must be animated"]
52185    #[serde(rename = "type")]
52186    pub tg_type: String,
52187    #[allow(rustdoc::invalid_html_tags)]
52188    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
52189    #[serde(rename = "animation")]
52190    pub animation: String,
52191    pub main_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
52192}
52193impl From<NoSkipInputProfilePhotoAnimated> for InputProfilePhotoAnimated {
52194    fn from(t: NoSkipInputProfilePhotoAnimated) -> Self {
52195        Self {
52196            tg_type: t.tg_type,
52197            animation: t.animation,
52198            main_frame_timestamp: t.main_frame_timestamp,
52199        }
52200    }
52201}
52202#[allow(clippy::from_over_into)]
52203impl Into<NoSkipInputProfilePhotoAnimated> for InputProfilePhotoAnimated {
52204    fn into(self) -> NoSkipInputProfilePhotoAnimated {
52205        NoSkipInputProfilePhotoAnimated {
52206            tg_type: self.tg_type,
52207            animation: self.animation,
52208            main_frame_timestamp: self.main_frame_timestamp,
52209        }
52210    }
52211}
52212impl NoSkipInputProfilePhotoAnimated {
52213    pub fn skip(self) -> InputProfilePhotoAnimated {
52214        self.into()
52215    }
52216}
52217impl InputProfilePhotoAnimated {
52218    pub fn noskip(self) -> NoSkipInputProfilePhotoAnimated {
52219        self.into()
52220    }
52221}
52222#[allow(rustdoc::invalid_html_tags)]
52223#[doc = "An animated profile photo in the MPEG4 format."]
52224#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52225pub struct InputProfilePhotoAnimatedBuilder {
52226    #[allow(rustdoc::invalid_html_tags)]
52227    #[doc = "Type of the profile photo, must be animated"]
52228    #[serde(rename = "type")]
52229    pub tg_type: String,
52230    #[allow(rustdoc::invalid_html_tags)]
52231    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
52232    #[serde(rename = "animation")]
52233    pub animation: String,
52234    #[allow(rustdoc::invalid_html_tags)]
52235    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
52236    #[serde(
52237        skip_serializing_if = "Option::is_none",
52238        rename = "main_frame_timestamp",
52239        default
52240    )]
52241    pub main_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
52242}
52243impl InputProfilePhotoAnimatedBuilder {
52244    #[allow(clippy::too_many_arguments)]
52245    pub fn new(animation: String) -> Self {
52246        Self {
52247            tg_type: "animated".to_owned(),
52248            animation,
52249            main_frame_timestamp: None,
52250        }
52251    }
52252    #[allow(rustdoc::invalid_html_tags)]
52253    #[doc = "Type of the profile photo, must be animated"]
52254    pub fn set_type(mut self, tg_type: String) -> Self {
52255        self.tg_type = tg_type;
52256        self
52257    }
52258    #[allow(rustdoc::invalid_html_tags)]
52259    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
52260    pub fn set_animation(mut self, animation: String) -> Self {
52261        self.animation = animation;
52262        self
52263    }
52264    #[allow(rustdoc::invalid_html_tags)]
52265    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
52266    pub fn set_main_frame_timestamp(
52267        mut self,
52268        main_frame_timestamp: ::ordered_float::OrderedFloat<f64>,
52269    ) -> Self {
52270        self.main_frame_timestamp = Some(main_frame_timestamp);
52271        self
52272    }
52273    pub fn build(self) -> InputProfilePhotoAnimated {
52274        InputProfilePhotoAnimated {
52275            tg_type: self.tg_type,
52276            animation: self.animation,
52277            main_frame_timestamp: self.main_frame_timestamp,
52278        }
52279    }
52280}
52281#[allow(rustdoc::invalid_html_tags)]
52282#[doc = "This object represents a service message about new members invited to a video chat."]
52283#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52284pub struct VideoChatParticipantsInvited {
52285    #[allow(rustdoc::invalid_html_tags)]
52286    #[doc = "New members that were invited to the video chat"]
52287    #[serde(rename = "users")]
52288    pub users: Vec<User>,
52289}
52290#[allow(rustdoc::invalid_html_tags)]
52291#[doc = "Companion type to VideoChatParticipantsInvited that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
52292#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52293pub struct NoSkipVideoChatParticipantsInvited {
52294    #[allow(rustdoc::invalid_html_tags)]
52295    #[doc = "New members that were invited to the video chat"]
52296    #[serde(rename = "users")]
52297    pub users: Vec<User>,
52298}
52299impl From<NoSkipVideoChatParticipantsInvited> for VideoChatParticipantsInvited {
52300    fn from(t: NoSkipVideoChatParticipantsInvited) -> Self {
52301        Self { users: t.users }
52302    }
52303}
52304#[allow(clippy::from_over_into)]
52305impl Into<NoSkipVideoChatParticipantsInvited> for VideoChatParticipantsInvited {
52306    fn into(self) -> NoSkipVideoChatParticipantsInvited {
52307        NoSkipVideoChatParticipantsInvited { users: self.users }
52308    }
52309}
52310impl NoSkipVideoChatParticipantsInvited {
52311    pub fn skip(self) -> VideoChatParticipantsInvited {
52312        self.into()
52313    }
52314}
52315impl VideoChatParticipantsInvited {
52316    pub fn noskip(self) -> NoSkipVideoChatParticipantsInvited {
52317        self.into()
52318    }
52319}
52320#[allow(rustdoc::invalid_html_tags)]
52321#[doc = "This object represents a service message about new members invited to a video chat."]
52322#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52323pub struct VideoChatParticipantsInvitedBuilder {
52324    #[allow(rustdoc::invalid_html_tags)]
52325    #[doc = "New members that were invited to the video chat"]
52326    #[serde(rename = "users")]
52327    pub users: Vec<User>,
52328}
52329impl VideoChatParticipantsInvitedBuilder {
52330    #[allow(clippy::too_many_arguments)]
52331    pub fn new(users: Vec<User>) -> Self {
52332        Self { users }
52333    }
52334    #[allow(rustdoc::invalid_html_tags)]
52335    #[doc = "New members that were invited to the video chat"]
52336    pub fn set_users(mut self, users: Vec<User>) -> Self {
52337        self.users = users;
52338        self
52339    }
52340    pub fn build(self) -> VideoChatParticipantsInvited {
52341        VideoChatParticipantsInvited { users: self.users }
52342    }
52343}
52344#[allow(rustdoc::invalid_html_tags)]
52345#[doc = "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:Telegram apps support these buttons as of version 5.7."]
52346#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52347pub struct LoginUrl {
52348    #[allow(rustdoc::invalid_html_tags)]
52349    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
52350    #[serde(rename = "url")]
52351    pub url: String,
52352    #[allow(rustdoc::invalid_html_tags)]
52353    #[doc = "Optional. New text of the button in forwarded messages."]
52354    #[serde(
52355        skip_serializing_if = "Option::is_none",
52356        rename = "forward_text",
52357        default
52358    )]
52359    pub forward_text: Option<String>,
52360    #[allow(rustdoc::invalid_html_tags)]
52361    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
52362    #[serde(
52363        skip_serializing_if = "Option::is_none",
52364        rename = "bot_username",
52365        default
52366    )]
52367    pub bot_username: Option<String>,
52368    #[allow(rustdoc::invalid_html_tags)]
52369    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
52370    #[serde(
52371        skip_serializing_if = "Option::is_none",
52372        rename = "request_write_access",
52373        default
52374    )]
52375    pub request_write_access: Option<bool>,
52376}
52377#[allow(rustdoc::invalid_html_tags)]
52378#[doc = "Companion type to LoginUrl that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
52379#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52380pub struct NoSkipLoginUrl {
52381    #[allow(rustdoc::invalid_html_tags)]
52382    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
52383    #[serde(rename = "url")]
52384    pub url: String,
52385    pub forward_text: Option<String>,
52386    pub bot_username: Option<String>,
52387    pub request_write_access: Option<bool>,
52388}
52389impl From<NoSkipLoginUrl> for LoginUrl {
52390    fn from(t: NoSkipLoginUrl) -> Self {
52391        Self {
52392            url: t.url,
52393            forward_text: t.forward_text,
52394            bot_username: t.bot_username,
52395            request_write_access: t.request_write_access,
52396        }
52397    }
52398}
52399#[allow(clippy::from_over_into)]
52400impl Into<NoSkipLoginUrl> for LoginUrl {
52401    fn into(self) -> NoSkipLoginUrl {
52402        NoSkipLoginUrl {
52403            url: self.url,
52404            forward_text: self.forward_text,
52405            bot_username: self.bot_username,
52406            request_write_access: self.request_write_access,
52407        }
52408    }
52409}
52410impl NoSkipLoginUrl {
52411    pub fn skip(self) -> LoginUrl {
52412        self.into()
52413    }
52414}
52415impl LoginUrl {
52416    pub fn noskip(self) -> NoSkipLoginUrl {
52417        self.into()
52418    }
52419}
52420#[allow(rustdoc::invalid_html_tags)]
52421#[doc = "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:Telegram apps support these buttons as of version 5.7."]
52422#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52423pub struct LoginUrlBuilder {
52424    #[allow(rustdoc::invalid_html_tags)]
52425    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
52426    #[serde(rename = "url")]
52427    pub url: String,
52428    #[allow(rustdoc::invalid_html_tags)]
52429    #[doc = "Optional. New text of the button in forwarded messages."]
52430    #[serde(
52431        skip_serializing_if = "Option::is_none",
52432        rename = "forward_text",
52433        default
52434    )]
52435    pub forward_text: Option<String>,
52436    #[allow(rustdoc::invalid_html_tags)]
52437    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
52438    #[serde(
52439        skip_serializing_if = "Option::is_none",
52440        rename = "bot_username",
52441        default
52442    )]
52443    pub bot_username: Option<String>,
52444    #[allow(rustdoc::invalid_html_tags)]
52445    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
52446    #[serde(
52447        skip_serializing_if = "Option::is_none",
52448        rename = "request_write_access",
52449        default
52450    )]
52451    pub request_write_access: Option<bool>,
52452}
52453impl LoginUrlBuilder {
52454    #[allow(clippy::too_many_arguments)]
52455    pub fn new(url: String) -> Self {
52456        Self {
52457            url,
52458            forward_text: None,
52459            bot_username: None,
52460            request_write_access: None,
52461        }
52462    }
52463    #[allow(rustdoc::invalid_html_tags)]
52464    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
52465    pub fn set_url(mut self, url: String) -> Self {
52466        self.url = url;
52467        self
52468    }
52469    #[allow(rustdoc::invalid_html_tags)]
52470    #[doc = "Optional. New text of the button in forwarded messages."]
52471    pub fn set_forward_text(mut self, forward_text: String) -> Self {
52472        self.forward_text = Some(forward_text);
52473        self
52474    }
52475    #[allow(rustdoc::invalid_html_tags)]
52476    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
52477    pub fn set_bot_username(mut self, bot_username: String) -> Self {
52478        self.bot_username = Some(bot_username);
52479        self
52480    }
52481    #[allow(rustdoc::invalid_html_tags)]
52482    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
52483    pub fn set_request_write_access(mut self, request_write_access: bool) -> Self {
52484        self.request_write_access = Some(request_write_access);
52485        self
52486    }
52487    pub fn build(self) -> LoginUrl {
52488        LoginUrl {
52489            url: self.url,
52490            forward_text: self.forward_text,
52491            bot_username: self.bot_username,
52492            request_write_access: self.request_write_access,
52493        }
52494    }
52495}
52496#[allow(rustdoc::invalid_html_tags)]
52497#[doc = "Represents a result of an inline query that was chosen by the user and sent to their chat partner.Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates."]
52498#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52499pub struct ChosenInlineResult {
52500    #[allow(rustdoc::invalid_html_tags)]
52501    #[doc = "The unique identifier for the result that was chosen"]
52502    #[serde(rename = "result_id")]
52503    pub result_id: String,
52504    #[allow(rustdoc::invalid_html_tags)]
52505    #[doc = "The user that chose the result"]
52506    #[serde(rename = "from")]
52507    pub from: BoxWrapper<Unbox<User>>,
52508    #[allow(rustdoc::invalid_html_tags)]
52509    #[doc = "Optional. Sender location, only for bots that require user location"]
52510    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
52511    pub location: Option<BoxWrapper<Unbox<Location>>>,
52512    #[allow(rustdoc::invalid_html_tags)]
52513    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
52514    #[serde(
52515        skip_serializing_if = "Option::is_none",
52516        rename = "inline_message_id",
52517        default
52518    )]
52519    pub inline_message_id: Option<String>,
52520    #[allow(rustdoc::invalid_html_tags)]
52521    #[doc = "The query that was used to obtain the result"]
52522    #[serde(rename = "query")]
52523    pub query: String,
52524}
52525#[allow(rustdoc::invalid_html_tags)]
52526#[doc = "Companion type to ChosenInlineResult that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
52527#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52528pub struct NoSkipChosenInlineResult {
52529    #[allow(rustdoc::invalid_html_tags)]
52530    #[doc = "The unique identifier for the result that was chosen"]
52531    #[serde(rename = "result_id")]
52532    pub result_id: String,
52533    #[allow(rustdoc::invalid_html_tags)]
52534    #[doc = "The user that chose the result"]
52535    #[serde(rename = "from")]
52536    pub from: BoxWrapper<Unbox<User>>,
52537    pub location: Option<BoxWrapper<Unbox<Location>>>,
52538    pub inline_message_id: Option<String>,
52539    #[allow(rustdoc::invalid_html_tags)]
52540    #[doc = "The query that was used to obtain the result"]
52541    #[serde(rename = "query")]
52542    pub query: String,
52543}
52544impl From<NoSkipChosenInlineResult> for ChosenInlineResult {
52545    fn from(t: NoSkipChosenInlineResult) -> Self {
52546        Self {
52547            result_id: t.result_id,
52548            from: t.from,
52549            location: t.location,
52550            inline_message_id: t.inline_message_id,
52551            query: t.query,
52552        }
52553    }
52554}
52555#[allow(clippy::from_over_into)]
52556impl Into<NoSkipChosenInlineResult> for ChosenInlineResult {
52557    fn into(self) -> NoSkipChosenInlineResult {
52558        NoSkipChosenInlineResult {
52559            result_id: self.result_id,
52560            from: self.from,
52561            location: self.location,
52562            inline_message_id: self.inline_message_id,
52563            query: self.query,
52564        }
52565    }
52566}
52567impl NoSkipChosenInlineResult {
52568    pub fn skip(self) -> ChosenInlineResult {
52569        self.into()
52570    }
52571}
52572impl ChosenInlineResult {
52573    pub fn noskip(self) -> NoSkipChosenInlineResult {
52574        self.into()
52575    }
52576}
52577#[allow(rustdoc::invalid_html_tags)]
52578#[doc = "Represents a result of an inline query that was chosen by the user and sent to their chat partner.Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates."]
52579#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52580pub struct ChosenInlineResultBuilder {
52581    #[allow(rustdoc::invalid_html_tags)]
52582    #[doc = "The unique identifier for the result that was chosen"]
52583    #[serde(rename = "result_id")]
52584    pub result_id: String,
52585    #[allow(rustdoc::invalid_html_tags)]
52586    #[doc = "The user that chose the result"]
52587    #[serde(rename = "from")]
52588    pub from: BoxWrapper<Unbox<User>>,
52589    #[allow(rustdoc::invalid_html_tags)]
52590    #[doc = "Optional. Sender location, only for bots that require user location"]
52591    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
52592    pub location: Option<BoxWrapper<Unbox<Location>>>,
52593    #[allow(rustdoc::invalid_html_tags)]
52594    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
52595    #[serde(
52596        skip_serializing_if = "Option::is_none",
52597        rename = "inline_message_id",
52598        default
52599    )]
52600    pub inline_message_id: Option<String>,
52601    #[allow(rustdoc::invalid_html_tags)]
52602    #[doc = "The query that was used to obtain the result"]
52603    #[serde(rename = "query")]
52604    pub query: String,
52605}
52606impl ChosenInlineResultBuilder {
52607    #[allow(clippy::too_many_arguments)]
52608    pub fn new<A: Into<User>>(result_id: String, from: A, query: String) -> Self {
52609        Self {
52610            result_id,
52611            from: BoxWrapper::new_unbox(from.into()),
52612            query,
52613            location: None,
52614            inline_message_id: None,
52615        }
52616    }
52617    #[allow(rustdoc::invalid_html_tags)]
52618    #[doc = "The unique identifier for the result that was chosen"]
52619    pub fn set_result_id(mut self, result_id: String) -> Self {
52620        self.result_id = result_id;
52621        self
52622    }
52623    #[allow(rustdoc::invalid_html_tags)]
52624    #[doc = "The user that chose the result"]
52625    pub fn set_from(mut self, from: User) -> Self {
52626        self.from = BoxWrapper(Unbox(from));
52627        self
52628    }
52629    #[allow(rustdoc::invalid_html_tags)]
52630    #[doc = "Optional. Sender location, only for bots that require user location"]
52631    pub fn set_location(mut self, location: Location) -> Self {
52632        self.location = Some(BoxWrapper(Unbox(location)));
52633        self
52634    }
52635    #[allow(rustdoc::invalid_html_tags)]
52636    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
52637    pub fn set_inline_message_id(mut self, inline_message_id: String) -> Self {
52638        self.inline_message_id = Some(inline_message_id);
52639        self
52640    }
52641    #[allow(rustdoc::invalid_html_tags)]
52642    #[doc = "The query that was used to obtain the result"]
52643    pub fn set_query(mut self, query: String) -> Self {
52644        self.query = query;
52645        self
52646    }
52647    pub fn build(self) -> ChosenInlineResult {
52648        ChosenInlineResult {
52649            result_id: self.result_id,
52650            from: self.from,
52651            location: self.location,
52652            inline_message_id: self.inline_message_id,
52653            query: self.query,
52654        }
52655    }
52656}
52657#[allow(rustdoc::invalid_html_tags)]
52658#[doc = "Represents an issue in an unspecified place. The error is considered resolved when new data is added."]
52659#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52660pub struct PassportElementErrorUnspecified {
52661    #[allow(rustdoc::invalid_html_tags)]
52662    #[doc = "Error source, must be unspecified"]
52663    #[serde(rename = "source")]
52664    pub source: String,
52665    #[allow(rustdoc::invalid_html_tags)]
52666    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
52667    #[serde(rename = "type")]
52668    pub tg_type: String,
52669    #[allow(rustdoc::invalid_html_tags)]
52670    #[doc = "Base64-encoded element hash"]
52671    #[serde(rename = "element_hash")]
52672    pub element_hash: String,
52673    #[allow(rustdoc::invalid_html_tags)]
52674    #[doc = "Error message"]
52675    #[serde(rename = "message")]
52676    pub message: String,
52677}
52678#[allow(rustdoc::invalid_html_tags)]
52679#[doc = "Companion type to PassportElementErrorUnspecified that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
52680#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52681pub struct NoSkipPassportElementErrorUnspecified {
52682    #[allow(rustdoc::invalid_html_tags)]
52683    #[doc = "Error source, must be unspecified"]
52684    #[serde(rename = "source")]
52685    pub source: String,
52686    #[allow(rustdoc::invalid_html_tags)]
52687    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
52688    #[serde(rename = "type")]
52689    pub tg_type: String,
52690    #[allow(rustdoc::invalid_html_tags)]
52691    #[doc = "Base64-encoded element hash"]
52692    #[serde(rename = "element_hash")]
52693    pub element_hash: String,
52694    #[allow(rustdoc::invalid_html_tags)]
52695    #[doc = "Error message"]
52696    #[serde(rename = "message")]
52697    pub message: String,
52698}
52699impl From<NoSkipPassportElementErrorUnspecified> for PassportElementErrorUnspecified {
52700    fn from(t: NoSkipPassportElementErrorUnspecified) -> Self {
52701        Self {
52702            source: t.source,
52703            tg_type: t.tg_type,
52704            element_hash: t.element_hash,
52705            message: t.message,
52706        }
52707    }
52708}
52709#[allow(clippy::from_over_into)]
52710impl Into<NoSkipPassportElementErrorUnspecified> for PassportElementErrorUnspecified {
52711    fn into(self) -> NoSkipPassportElementErrorUnspecified {
52712        NoSkipPassportElementErrorUnspecified {
52713            source: self.source,
52714            tg_type: self.tg_type,
52715            element_hash: self.element_hash,
52716            message: self.message,
52717        }
52718    }
52719}
52720impl NoSkipPassportElementErrorUnspecified {
52721    pub fn skip(self) -> PassportElementErrorUnspecified {
52722        self.into()
52723    }
52724}
52725impl PassportElementErrorUnspecified {
52726    pub fn noskip(self) -> NoSkipPassportElementErrorUnspecified {
52727        self.into()
52728    }
52729}
52730#[allow(rustdoc::invalid_html_tags)]
52731#[doc = "Represents an issue in an unspecified place. The error is considered resolved when new data is added."]
52732#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52733pub struct PassportElementErrorUnspecifiedBuilder {
52734    #[allow(rustdoc::invalid_html_tags)]
52735    #[doc = "Error source, must be unspecified"]
52736    #[serde(rename = "source")]
52737    pub source: String,
52738    #[allow(rustdoc::invalid_html_tags)]
52739    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
52740    #[serde(rename = "type")]
52741    pub tg_type: String,
52742    #[allow(rustdoc::invalid_html_tags)]
52743    #[doc = "Base64-encoded element hash"]
52744    #[serde(rename = "element_hash")]
52745    pub element_hash: String,
52746    #[allow(rustdoc::invalid_html_tags)]
52747    #[doc = "Error message"]
52748    #[serde(rename = "message")]
52749    pub message: String,
52750}
52751impl PassportElementErrorUnspecifiedBuilder {
52752    #[allow(clippy::too_many_arguments)]
52753    pub fn new(source: String, element_hash: String, message: String) -> Self {
52754        Self {
52755            tg_type: "PassportElementErrorUnspecified".to_owned(),
52756            source,
52757            element_hash,
52758            message,
52759        }
52760    }
52761    #[allow(rustdoc::invalid_html_tags)]
52762    #[doc = "Error source, must be unspecified"]
52763    pub fn set_source(mut self, source: String) -> Self {
52764        self.source = source;
52765        self
52766    }
52767    #[allow(rustdoc::invalid_html_tags)]
52768    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
52769    pub fn set_type(mut self, tg_type: String) -> Self {
52770        self.tg_type = tg_type;
52771        self
52772    }
52773    #[allow(rustdoc::invalid_html_tags)]
52774    #[doc = "Base64-encoded element hash"]
52775    pub fn set_element_hash(mut self, element_hash: String) -> Self {
52776        self.element_hash = element_hash;
52777        self
52778    }
52779    #[allow(rustdoc::invalid_html_tags)]
52780    #[doc = "Error message"]
52781    pub fn set_message(mut self, message: String) -> Self {
52782        self.message = message;
52783        self
52784    }
52785    pub fn build(self) -> PassportElementErrorUnspecified {
52786        PassportElementErrorUnspecified {
52787            source: self.source,
52788            tg_type: self.tg_type,
52789            element_hash: self.element_hash,
52790            message: self.message,
52791        }
52792    }
52793}
52794#[allow(rustdoc::invalid_html_tags)]
52795#[doc = "Represents a menu button, which launches a Web App."]
52796#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52797pub struct MenuButtonWebApp {
52798    #[allow(rustdoc::invalid_html_tags)]
52799    #[doc = "Type of the button, must be web_app"]
52800    #[serde(rename = "type")]
52801    pub tg_type: String,
52802    #[allow(rustdoc::invalid_html_tags)]
52803    #[doc = "Text on the button"]
52804    #[serde(rename = "text")]
52805    pub text: String,
52806    #[allow(rustdoc::invalid_html_tags)]
52807    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
52808    #[serde(rename = "web_app")]
52809    pub web_app: BoxWrapper<Unbox<WebAppInfo>>,
52810}
52811#[allow(rustdoc::invalid_html_tags)]
52812#[doc = "Companion type to MenuButtonWebApp that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
52813#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52814pub struct NoSkipMenuButtonWebApp {
52815    #[allow(rustdoc::invalid_html_tags)]
52816    #[doc = "Type of the button, must be web_app"]
52817    #[serde(rename = "type")]
52818    pub tg_type: String,
52819    #[allow(rustdoc::invalid_html_tags)]
52820    #[doc = "Text on the button"]
52821    #[serde(rename = "text")]
52822    pub text: String,
52823    #[allow(rustdoc::invalid_html_tags)]
52824    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
52825    #[serde(rename = "web_app")]
52826    pub web_app: BoxWrapper<Unbox<WebAppInfo>>,
52827}
52828impl From<NoSkipMenuButtonWebApp> for MenuButtonWebApp {
52829    fn from(t: NoSkipMenuButtonWebApp) -> Self {
52830        Self {
52831            tg_type: t.tg_type,
52832            text: t.text,
52833            web_app: t.web_app,
52834        }
52835    }
52836}
52837#[allow(clippy::from_over_into)]
52838impl Into<NoSkipMenuButtonWebApp> for MenuButtonWebApp {
52839    fn into(self) -> NoSkipMenuButtonWebApp {
52840        NoSkipMenuButtonWebApp {
52841            tg_type: self.tg_type,
52842            text: self.text,
52843            web_app: self.web_app,
52844        }
52845    }
52846}
52847impl NoSkipMenuButtonWebApp {
52848    pub fn skip(self) -> MenuButtonWebApp {
52849        self.into()
52850    }
52851}
52852impl MenuButtonWebApp {
52853    pub fn noskip(self) -> NoSkipMenuButtonWebApp {
52854        self.into()
52855    }
52856}
52857#[allow(rustdoc::invalid_html_tags)]
52858#[doc = "Represents a menu button, which launches a Web App."]
52859#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52860pub struct MenuButtonWebAppBuilder {
52861    #[allow(rustdoc::invalid_html_tags)]
52862    #[doc = "Type of the button, must be web_app"]
52863    #[serde(rename = "type")]
52864    pub tg_type: String,
52865    #[allow(rustdoc::invalid_html_tags)]
52866    #[doc = "Text on the button"]
52867    #[serde(rename = "text")]
52868    pub text: String,
52869    #[allow(rustdoc::invalid_html_tags)]
52870    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
52871    #[serde(rename = "web_app")]
52872    pub web_app: BoxWrapper<Unbox<WebAppInfo>>,
52873}
52874impl MenuButtonWebAppBuilder {
52875    #[allow(clippy::too_many_arguments)]
52876    pub fn new<A: Into<WebAppInfo>>(text: String, web_app: A) -> Self {
52877        Self {
52878            tg_type: "web_app".to_owned(),
52879            text,
52880            web_app: BoxWrapper::new_unbox(web_app.into()),
52881        }
52882    }
52883    #[allow(rustdoc::invalid_html_tags)]
52884    #[doc = "Type of the button, must be web_app"]
52885    pub fn set_type(mut self, tg_type: String) -> Self {
52886        self.tg_type = tg_type;
52887        self
52888    }
52889    #[allow(rustdoc::invalid_html_tags)]
52890    #[doc = "Text on the button"]
52891    pub fn set_text(mut self, text: String) -> Self {
52892        self.text = text;
52893        self
52894    }
52895    #[allow(rustdoc::invalid_html_tags)]
52896    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
52897    pub fn set_web_app(mut self, web_app: WebAppInfo) -> Self {
52898        self.web_app = BoxWrapper(Unbox(web_app));
52899        self
52900    }
52901    pub fn build(self) -> MenuButtonWebApp {
52902        MenuButtonWebApp {
52903            tg_type: self.tg_type,
52904            text: self.text,
52905            web_app: self.web_app,
52906        }
52907    }
52908}
52909#[allow(rustdoc::invalid_html_tags)]
52910#[doc = "This object represents a list of boosts added to a chat by a user."]
52911#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52912pub struct UserChatBoosts {
52913    #[allow(rustdoc::invalid_html_tags)]
52914    #[doc = "The list of boosts added to the chat by the user"]
52915    #[serde(rename = "boosts")]
52916    pub boosts: Vec<ChatBoost>,
52917}
52918#[allow(rustdoc::invalid_html_tags)]
52919#[doc = "Companion type to UserChatBoosts that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
52920#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52921pub struct NoSkipUserChatBoosts {
52922    #[allow(rustdoc::invalid_html_tags)]
52923    #[doc = "The list of boosts added to the chat by the user"]
52924    #[serde(rename = "boosts")]
52925    pub boosts: Vec<ChatBoost>,
52926}
52927impl From<NoSkipUserChatBoosts> for UserChatBoosts {
52928    fn from(t: NoSkipUserChatBoosts) -> Self {
52929        Self { boosts: t.boosts }
52930    }
52931}
52932#[allow(clippy::from_over_into)]
52933impl Into<NoSkipUserChatBoosts> for UserChatBoosts {
52934    fn into(self) -> NoSkipUserChatBoosts {
52935        NoSkipUserChatBoosts {
52936            boosts: self.boosts,
52937        }
52938    }
52939}
52940impl NoSkipUserChatBoosts {
52941    pub fn skip(self) -> UserChatBoosts {
52942        self.into()
52943    }
52944}
52945impl UserChatBoosts {
52946    pub fn noskip(self) -> NoSkipUserChatBoosts {
52947        self.into()
52948    }
52949}
52950#[allow(rustdoc::invalid_html_tags)]
52951#[doc = "This object represents a list of boosts added to a chat by a user."]
52952#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52953pub struct UserChatBoostsBuilder {
52954    #[allow(rustdoc::invalid_html_tags)]
52955    #[doc = "The list of boosts added to the chat by the user"]
52956    #[serde(rename = "boosts")]
52957    pub boosts: Vec<ChatBoost>,
52958}
52959impl UserChatBoostsBuilder {
52960    #[allow(clippy::too_many_arguments)]
52961    pub fn new(boosts: Vec<ChatBoost>) -> Self {
52962        Self { boosts }
52963    }
52964    #[allow(rustdoc::invalid_html_tags)]
52965    #[doc = "The list of boosts added to the chat by the user"]
52966    pub fn set_boosts(mut self, boosts: Vec<ChatBoost>) -> Self {
52967        self.boosts = boosts;
52968        self
52969    }
52970    pub fn build(self) -> UserChatBoosts {
52971        UserChatBoosts {
52972            boosts: self.boosts,
52973        }
52974    }
52975}
52976#[allow(rustdoc::invalid_html_tags)]
52977#[doc = "Describes a service message about a regular gift that was sent or received."]
52978#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
52979pub struct GiftInfo {
52980    #[allow(rustdoc::invalid_html_tags)]
52981    #[doc = "Information about the gift"]
52982    #[serde(rename = "gift")]
52983    pub gift: BoxWrapper<Unbox<Gift>>,
52984    #[allow(rustdoc::invalid_html_tags)]
52985    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
52986    #[serde(
52987        skip_serializing_if = "Option::is_none",
52988        rename = "owned_gift_id",
52989        default
52990    )]
52991    pub owned_gift_id: Option<String>,
52992    #[allow(rustdoc::invalid_html_tags)]
52993    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
52994    #[serde(
52995        skip_serializing_if = "Option::is_none",
52996        rename = "convert_star_count",
52997        default
52998    )]
52999    pub convert_star_count: Option<i64>,
53000    #[allow(rustdoc::invalid_html_tags)]
53001    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
53002    #[serde(
53003        skip_serializing_if = "Option::is_none",
53004        rename = "prepaid_upgrade_star_count",
53005        default
53006    )]
53007    pub prepaid_upgrade_star_count: Option<i64>,
53008    #[allow(rustdoc::invalid_html_tags)]
53009    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
53010    #[serde(
53011        skip_serializing_if = "Option::is_none",
53012        rename = "can_be_upgraded",
53013        default
53014    )]
53015    pub can_be_upgraded: Option<bool>,
53016    #[allow(rustdoc::invalid_html_tags)]
53017    #[doc = "Optional. Text of the message that was added to the gift"]
53018    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
53019    pub text: Option<String>,
53020    #[allow(rustdoc::invalid_html_tags)]
53021    #[doc = "Optional. Special entities that appear in the text"]
53022    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
53023    pub entities: Option<Vec<MessageEntity>>,
53024    #[allow(rustdoc::invalid_html_tags)]
53025    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
53026    #[serde(
53027        skip_serializing_if = "Option::is_none",
53028        rename = "is_private",
53029        default
53030    )]
53031    pub is_private: Option<bool>,
53032}
53033#[allow(rustdoc::invalid_html_tags)]
53034#[doc = "Companion type to GiftInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53035#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53036pub struct NoSkipGiftInfo {
53037    #[allow(rustdoc::invalid_html_tags)]
53038    #[doc = "Information about the gift"]
53039    #[serde(rename = "gift")]
53040    pub gift: BoxWrapper<Unbox<Gift>>,
53041    pub owned_gift_id: Option<String>,
53042    pub convert_star_count: Option<i64>,
53043    pub prepaid_upgrade_star_count: Option<i64>,
53044    pub can_be_upgraded: Option<bool>,
53045    pub text: Option<String>,
53046    pub entities: Option<Vec<MessageEntity>>,
53047    pub is_private: Option<bool>,
53048}
53049impl From<NoSkipGiftInfo> for GiftInfo {
53050    fn from(t: NoSkipGiftInfo) -> Self {
53051        Self {
53052            gift: t.gift,
53053            owned_gift_id: t.owned_gift_id,
53054            convert_star_count: t.convert_star_count,
53055            prepaid_upgrade_star_count: t.prepaid_upgrade_star_count,
53056            can_be_upgraded: t.can_be_upgraded,
53057            text: t.text,
53058            entities: t.entities,
53059            is_private: t.is_private,
53060        }
53061    }
53062}
53063#[allow(clippy::from_over_into)]
53064impl Into<NoSkipGiftInfo> for GiftInfo {
53065    fn into(self) -> NoSkipGiftInfo {
53066        NoSkipGiftInfo {
53067            gift: self.gift,
53068            owned_gift_id: self.owned_gift_id,
53069            convert_star_count: self.convert_star_count,
53070            prepaid_upgrade_star_count: self.prepaid_upgrade_star_count,
53071            can_be_upgraded: self.can_be_upgraded,
53072            text: self.text,
53073            entities: self.entities,
53074            is_private: self.is_private,
53075        }
53076    }
53077}
53078impl NoSkipGiftInfo {
53079    pub fn skip(self) -> GiftInfo {
53080        self.into()
53081    }
53082}
53083impl GiftInfo {
53084    pub fn noskip(self) -> NoSkipGiftInfo {
53085        self.into()
53086    }
53087}
53088#[allow(rustdoc::invalid_html_tags)]
53089#[doc = "Describes a service message about a regular gift that was sent or received."]
53090#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53091pub struct GiftInfoBuilder {
53092    #[allow(rustdoc::invalid_html_tags)]
53093    #[doc = "Information about the gift"]
53094    #[serde(rename = "gift")]
53095    pub gift: BoxWrapper<Unbox<Gift>>,
53096    #[allow(rustdoc::invalid_html_tags)]
53097    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
53098    #[serde(
53099        skip_serializing_if = "Option::is_none",
53100        rename = "owned_gift_id",
53101        default
53102    )]
53103    pub owned_gift_id: Option<String>,
53104    #[allow(rustdoc::invalid_html_tags)]
53105    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
53106    #[serde(
53107        skip_serializing_if = "Option::is_none",
53108        rename = "convert_star_count",
53109        default
53110    )]
53111    pub convert_star_count: Option<i64>,
53112    #[allow(rustdoc::invalid_html_tags)]
53113    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
53114    #[serde(
53115        skip_serializing_if = "Option::is_none",
53116        rename = "prepaid_upgrade_star_count",
53117        default
53118    )]
53119    pub prepaid_upgrade_star_count: Option<i64>,
53120    #[allow(rustdoc::invalid_html_tags)]
53121    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
53122    #[serde(
53123        skip_serializing_if = "Option::is_none",
53124        rename = "can_be_upgraded",
53125        default
53126    )]
53127    pub can_be_upgraded: Option<bool>,
53128    #[allow(rustdoc::invalid_html_tags)]
53129    #[doc = "Optional. Text of the message that was added to the gift"]
53130    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
53131    pub text: Option<String>,
53132    #[allow(rustdoc::invalid_html_tags)]
53133    #[doc = "Optional. Special entities that appear in the text"]
53134    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
53135    pub entities: Option<Vec<MessageEntity>>,
53136    #[allow(rustdoc::invalid_html_tags)]
53137    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
53138    #[serde(
53139        skip_serializing_if = "Option::is_none",
53140        rename = "is_private",
53141        default
53142    )]
53143    pub is_private: Option<bool>,
53144}
53145impl GiftInfoBuilder {
53146    #[allow(clippy::too_many_arguments)]
53147    pub fn new<A: Into<Gift>>(gift: A) -> Self {
53148        Self {
53149            gift: BoxWrapper::new_unbox(gift.into()),
53150            owned_gift_id: None,
53151            convert_star_count: None,
53152            prepaid_upgrade_star_count: None,
53153            can_be_upgraded: None,
53154            text: None,
53155            entities: None,
53156            is_private: None,
53157        }
53158    }
53159    #[allow(rustdoc::invalid_html_tags)]
53160    #[doc = "Information about the gift"]
53161    pub fn set_gift(mut self, gift: Gift) -> Self {
53162        self.gift = BoxWrapper(Unbox(gift));
53163        self
53164    }
53165    #[allow(rustdoc::invalid_html_tags)]
53166    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
53167    pub fn set_owned_gift_id(mut self, owned_gift_id: String) -> Self {
53168        self.owned_gift_id = Some(owned_gift_id);
53169        self
53170    }
53171    #[allow(rustdoc::invalid_html_tags)]
53172    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
53173    pub fn set_convert_star_count(mut self, convert_star_count: i64) -> Self {
53174        self.convert_star_count = Some(convert_star_count);
53175        self
53176    }
53177    #[allow(rustdoc::invalid_html_tags)]
53178    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
53179    pub fn set_prepaid_upgrade_star_count(mut self, prepaid_upgrade_star_count: i64) -> Self {
53180        self.prepaid_upgrade_star_count = Some(prepaid_upgrade_star_count);
53181        self
53182    }
53183    #[allow(rustdoc::invalid_html_tags)]
53184    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
53185    pub fn set_can_be_upgraded(mut self, can_be_upgraded: bool) -> Self {
53186        self.can_be_upgraded = Some(can_be_upgraded);
53187        self
53188    }
53189    #[allow(rustdoc::invalid_html_tags)]
53190    #[doc = "Optional. Text of the message that was added to the gift"]
53191    pub fn set_text(mut self, text: String) -> Self {
53192        self.text = Some(text);
53193        self
53194    }
53195    #[allow(rustdoc::invalid_html_tags)]
53196    #[doc = "Optional. Special entities that appear in the text"]
53197    pub fn set_entities(mut self, entities: Vec<MessageEntity>) -> Self {
53198        self.entities = Some(entities);
53199        self
53200    }
53201    #[allow(rustdoc::invalid_html_tags)]
53202    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
53203    pub fn set_is_private(mut self, is_private: bool) -> Self {
53204        self.is_private = Some(is_private);
53205        self
53206    }
53207    pub fn build(self) -> GiftInfo {
53208        GiftInfo {
53209            gift: self.gift,
53210            owned_gift_id: self.owned_gift_id,
53211            convert_star_count: self.convert_star_count,
53212            prepaid_upgrade_star_count: self.prepaid_upgrade_star_count,
53213            can_be_upgraded: self.can_be_upgraded,
53214            text: self.text,
53215            entities: self.entities,
53216            is_private: self.is_private,
53217        }
53218    }
53219}
53220#[allow(rustdoc::invalid_html_tags)]
53221#[doc = "This object represents a shipping address."]
53222#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53223pub struct ShippingAddress {
53224    #[allow(rustdoc::invalid_html_tags)]
53225    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
53226    #[serde(rename = "country_code")]
53227    pub country_code: String,
53228    #[allow(rustdoc::invalid_html_tags)]
53229    #[doc = "State, if applicable"]
53230    #[serde(rename = "state")]
53231    pub state: String,
53232    #[allow(rustdoc::invalid_html_tags)]
53233    #[doc = "City"]
53234    #[serde(rename = "city")]
53235    pub city: String,
53236    #[allow(rustdoc::invalid_html_tags)]
53237    #[doc = "First line for the address"]
53238    #[serde(rename = "street_line1")]
53239    pub street_line_1: String,
53240    #[allow(rustdoc::invalid_html_tags)]
53241    #[doc = "Second line for the address"]
53242    #[serde(rename = "street_line2")]
53243    pub street_line_2: String,
53244    #[allow(rustdoc::invalid_html_tags)]
53245    #[doc = "Address post code"]
53246    #[serde(rename = "post_code")]
53247    pub post_code: String,
53248}
53249#[allow(rustdoc::invalid_html_tags)]
53250#[doc = "Companion type to ShippingAddress that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53251#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53252pub struct NoSkipShippingAddress {
53253    #[allow(rustdoc::invalid_html_tags)]
53254    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
53255    #[serde(rename = "country_code")]
53256    pub country_code: String,
53257    #[allow(rustdoc::invalid_html_tags)]
53258    #[doc = "State, if applicable"]
53259    #[serde(rename = "state")]
53260    pub state: String,
53261    #[allow(rustdoc::invalid_html_tags)]
53262    #[doc = "City"]
53263    #[serde(rename = "city")]
53264    pub city: String,
53265    #[allow(rustdoc::invalid_html_tags)]
53266    #[doc = "First line for the address"]
53267    #[serde(rename = "street_line1")]
53268    pub street_line_1: String,
53269    #[allow(rustdoc::invalid_html_tags)]
53270    #[doc = "Second line for the address"]
53271    #[serde(rename = "street_line2")]
53272    pub street_line_2: String,
53273    #[allow(rustdoc::invalid_html_tags)]
53274    #[doc = "Address post code"]
53275    #[serde(rename = "post_code")]
53276    pub post_code: String,
53277}
53278impl From<NoSkipShippingAddress> for ShippingAddress {
53279    fn from(t: NoSkipShippingAddress) -> Self {
53280        Self {
53281            country_code: t.country_code,
53282            state: t.state,
53283            city: t.city,
53284            street_line_1: t.street_line_1,
53285            street_line_2: t.street_line_2,
53286            post_code: t.post_code,
53287        }
53288    }
53289}
53290#[allow(clippy::from_over_into)]
53291impl Into<NoSkipShippingAddress> for ShippingAddress {
53292    fn into(self) -> NoSkipShippingAddress {
53293        NoSkipShippingAddress {
53294            country_code: self.country_code,
53295            state: self.state,
53296            city: self.city,
53297            street_line_1: self.street_line_1,
53298            street_line_2: self.street_line_2,
53299            post_code: self.post_code,
53300        }
53301    }
53302}
53303impl NoSkipShippingAddress {
53304    pub fn skip(self) -> ShippingAddress {
53305        self.into()
53306    }
53307}
53308impl ShippingAddress {
53309    pub fn noskip(self) -> NoSkipShippingAddress {
53310        self.into()
53311    }
53312}
53313#[allow(rustdoc::invalid_html_tags)]
53314#[doc = "This object represents a shipping address."]
53315#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53316pub struct ShippingAddressBuilder {
53317    #[allow(rustdoc::invalid_html_tags)]
53318    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
53319    #[serde(rename = "country_code")]
53320    pub country_code: String,
53321    #[allow(rustdoc::invalid_html_tags)]
53322    #[doc = "State, if applicable"]
53323    #[serde(rename = "state")]
53324    pub state: String,
53325    #[allow(rustdoc::invalid_html_tags)]
53326    #[doc = "City"]
53327    #[serde(rename = "city")]
53328    pub city: String,
53329    #[allow(rustdoc::invalid_html_tags)]
53330    #[doc = "First line for the address"]
53331    #[serde(rename = "street_line1")]
53332    pub street_line_1: String,
53333    #[allow(rustdoc::invalid_html_tags)]
53334    #[doc = "Second line for the address"]
53335    #[serde(rename = "street_line2")]
53336    pub street_line_2: String,
53337    #[allow(rustdoc::invalid_html_tags)]
53338    #[doc = "Address post code"]
53339    #[serde(rename = "post_code")]
53340    pub post_code: String,
53341}
53342impl ShippingAddressBuilder {
53343    #[allow(clippy::too_many_arguments)]
53344    pub fn new(
53345        country_code: String,
53346        state: String,
53347        city: String,
53348        street_line_1: String,
53349        street_line_2: String,
53350        post_code: String,
53351    ) -> Self {
53352        Self {
53353            country_code,
53354            state,
53355            city,
53356            street_line_1,
53357            street_line_2,
53358            post_code,
53359        }
53360    }
53361    #[allow(rustdoc::invalid_html_tags)]
53362    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
53363    pub fn set_country_code(mut self, country_code: String) -> Self {
53364        self.country_code = country_code;
53365        self
53366    }
53367    #[allow(rustdoc::invalid_html_tags)]
53368    #[doc = "State, if applicable"]
53369    pub fn set_state(mut self, state: String) -> Self {
53370        self.state = state;
53371        self
53372    }
53373    #[allow(rustdoc::invalid_html_tags)]
53374    #[doc = "City"]
53375    pub fn set_city(mut self, city: String) -> Self {
53376        self.city = city;
53377        self
53378    }
53379    #[allow(rustdoc::invalid_html_tags)]
53380    #[doc = "First line for the address"]
53381    pub fn set_street_line_1(mut self, street_line_1: String) -> Self {
53382        self.street_line_1 = street_line_1;
53383        self
53384    }
53385    #[allow(rustdoc::invalid_html_tags)]
53386    #[doc = "Second line for the address"]
53387    pub fn set_street_line_2(mut self, street_line_2: String) -> Self {
53388        self.street_line_2 = street_line_2;
53389        self
53390    }
53391    #[allow(rustdoc::invalid_html_tags)]
53392    #[doc = "Address post code"]
53393    pub fn set_post_code(mut self, post_code: String) -> Self {
53394        self.post_code = post_code;
53395        self
53396    }
53397    pub fn build(self) -> ShippingAddress {
53398        ShippingAddress {
53399            country_code: self.country_code,
53400            state: self.state,
53401            city: self.city,
53402            street_line_1: self.street_line_1,
53403            street_line_2: self.street_line_2,
53404            post_code: self.post_code,
53405        }
53406    }
53407}
53408#[allow(rustdoc::invalid_html_tags)]
53409#[doc = "This object represents a service message about a change in auto-delete timer settings."]
53410#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53411pub struct MessageAutoDeleteTimerChanged {
53412    #[allow(rustdoc::invalid_html_tags)]
53413    #[doc = "New auto-delete time for messages in the chat; in seconds"]
53414    #[serde(rename = "message_auto_delete_time")]
53415    pub message_auto_delete_time: i64,
53416}
53417#[allow(rustdoc::invalid_html_tags)]
53418#[doc = "Companion type to MessageAutoDeleteTimerChanged that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53419#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53420pub struct NoSkipMessageAutoDeleteTimerChanged {
53421    #[allow(rustdoc::invalid_html_tags)]
53422    #[doc = "New auto-delete time for messages in the chat; in seconds"]
53423    #[serde(rename = "message_auto_delete_time")]
53424    pub message_auto_delete_time: i64,
53425}
53426impl From<NoSkipMessageAutoDeleteTimerChanged> for MessageAutoDeleteTimerChanged {
53427    fn from(t: NoSkipMessageAutoDeleteTimerChanged) -> Self {
53428        Self {
53429            message_auto_delete_time: t.message_auto_delete_time,
53430        }
53431    }
53432}
53433#[allow(clippy::from_over_into)]
53434impl Into<NoSkipMessageAutoDeleteTimerChanged> for MessageAutoDeleteTimerChanged {
53435    fn into(self) -> NoSkipMessageAutoDeleteTimerChanged {
53436        NoSkipMessageAutoDeleteTimerChanged {
53437            message_auto_delete_time: self.message_auto_delete_time,
53438        }
53439    }
53440}
53441impl NoSkipMessageAutoDeleteTimerChanged {
53442    pub fn skip(self) -> MessageAutoDeleteTimerChanged {
53443        self.into()
53444    }
53445}
53446impl MessageAutoDeleteTimerChanged {
53447    pub fn noskip(self) -> NoSkipMessageAutoDeleteTimerChanged {
53448        self.into()
53449    }
53450}
53451#[allow(rustdoc::invalid_html_tags)]
53452#[doc = "This object represents a service message about a change in auto-delete timer settings."]
53453#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53454pub struct MessageAutoDeleteTimerChangedBuilder {
53455    #[allow(rustdoc::invalid_html_tags)]
53456    #[doc = "New auto-delete time for messages in the chat; in seconds"]
53457    #[serde(rename = "message_auto_delete_time")]
53458    pub message_auto_delete_time: i64,
53459}
53460impl MessageAutoDeleteTimerChangedBuilder {
53461    #[allow(clippy::too_many_arguments)]
53462    pub fn new(message_auto_delete_time: i64) -> Self {
53463        Self {
53464            message_auto_delete_time,
53465        }
53466    }
53467    #[allow(rustdoc::invalid_html_tags)]
53468    #[doc = "New auto-delete time for messages in the chat; in seconds"]
53469    pub fn set_message_auto_delete_time(mut self, message_auto_delete_time: i64) -> Self {
53470        self.message_auto_delete_time = message_auto_delete_time;
53471        self
53472    }
53473    pub fn build(self) -> MessageAutoDeleteTimerChanged {
53474        MessageAutoDeleteTimerChanged {
53475            message_auto_delete_time: self.message_auto_delete_time,
53476        }
53477    }
53478}
53479#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53480#[serde(untagged)]
53481pub enum BackgroundFill {
53482    BackgroundFillSolid(BackgroundFillSolid),
53483    BackgroundFillGradient(BackgroundFillGradient),
53484    BackgroundFillFreeformGradient(BackgroundFillFreeformGradient),
53485}
53486impl Default for BackgroundFill {
53487    fn default() -> Self {
53488        BackgroundFill::BackgroundFillSolid(BackgroundFillSolid::default())
53489    }
53490}
53491impl BackgroundFill {}
53492#[allow(rustdoc::invalid_html_tags)]
53493#[doc = "This object represents a button to be shown above inline query results. You must use exactly one of the optional fields."]
53494#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53495pub struct InlineQueryResultsButton {
53496    #[allow(rustdoc::invalid_html_tags)]
53497    #[doc = "Label text on the button"]
53498    #[serde(rename = "text")]
53499    pub text: String,
53500    #[allow(rustdoc::invalid_html_tags)]
53501    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
53502    #[serde(skip_serializing_if = "Option::is_none", rename = "web_app", default)]
53503    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
53504    #[allow(rustdoc::invalid_html_tags)]
53505    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
53506    #[serde(
53507        skip_serializing_if = "Option::is_none",
53508        rename = "start_parameter",
53509        default
53510    )]
53511    pub start_parameter: Option<String>,
53512}
53513#[allow(rustdoc::invalid_html_tags)]
53514#[doc = "Companion type to InlineQueryResultsButton that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53515#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53516pub struct NoSkipInlineQueryResultsButton {
53517    #[allow(rustdoc::invalid_html_tags)]
53518    #[doc = "Label text on the button"]
53519    #[serde(rename = "text")]
53520    pub text: String,
53521    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
53522    pub start_parameter: Option<String>,
53523}
53524impl From<NoSkipInlineQueryResultsButton> for InlineQueryResultsButton {
53525    fn from(t: NoSkipInlineQueryResultsButton) -> Self {
53526        Self {
53527            text: t.text,
53528            web_app: t.web_app,
53529            start_parameter: t.start_parameter,
53530        }
53531    }
53532}
53533#[allow(clippy::from_over_into)]
53534impl Into<NoSkipInlineQueryResultsButton> for InlineQueryResultsButton {
53535    fn into(self) -> NoSkipInlineQueryResultsButton {
53536        NoSkipInlineQueryResultsButton {
53537            text: self.text,
53538            web_app: self.web_app,
53539            start_parameter: self.start_parameter,
53540        }
53541    }
53542}
53543impl NoSkipInlineQueryResultsButton {
53544    pub fn skip(self) -> InlineQueryResultsButton {
53545        self.into()
53546    }
53547}
53548impl InlineQueryResultsButton {
53549    pub fn noskip(self) -> NoSkipInlineQueryResultsButton {
53550        self.into()
53551    }
53552}
53553#[allow(rustdoc::invalid_html_tags)]
53554#[doc = "This object represents a button to be shown above inline query results. You must use exactly one of the optional fields."]
53555#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53556pub struct InlineQueryResultsButtonBuilder {
53557    #[allow(rustdoc::invalid_html_tags)]
53558    #[doc = "Label text on the button"]
53559    #[serde(rename = "text")]
53560    pub text: String,
53561    #[allow(rustdoc::invalid_html_tags)]
53562    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
53563    #[serde(skip_serializing_if = "Option::is_none", rename = "web_app", default)]
53564    pub web_app: Option<BoxWrapper<Unbox<WebAppInfo>>>,
53565    #[allow(rustdoc::invalid_html_tags)]
53566    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
53567    #[serde(
53568        skip_serializing_if = "Option::is_none",
53569        rename = "start_parameter",
53570        default
53571    )]
53572    pub start_parameter: Option<String>,
53573}
53574impl InlineQueryResultsButtonBuilder {
53575    #[allow(clippy::too_many_arguments)]
53576    pub fn new(text: String) -> Self {
53577        Self {
53578            text,
53579            web_app: None,
53580            start_parameter: None,
53581        }
53582    }
53583    #[allow(rustdoc::invalid_html_tags)]
53584    #[doc = "Label text on the button"]
53585    pub fn set_text(mut self, text: String) -> Self {
53586        self.text = text;
53587        self
53588    }
53589    #[allow(rustdoc::invalid_html_tags)]
53590    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
53591    pub fn set_web_app(mut self, web_app: WebAppInfo) -> Self {
53592        self.web_app = Some(BoxWrapper(Unbox(web_app)));
53593        self
53594    }
53595    #[allow(rustdoc::invalid_html_tags)]
53596    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
53597    pub fn set_start_parameter(mut self, start_parameter: String) -> Self {
53598        self.start_parameter = Some(start_parameter);
53599        self
53600    }
53601    pub fn build(self) -> InlineQueryResultsButton {
53602        InlineQueryResultsButton {
53603            text: self.text,
53604            web_app: self.web_app,
53605            start_parameter: self.start_parameter,
53606        }
53607    }
53608}
53609#[allow(rustdoc::invalid_html_tags)]
53610#[doc = "The background is filled using the selected color."]
53611#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53612pub struct BackgroundFillSolid {
53613    #[allow(rustdoc::invalid_html_tags)]
53614    #[doc = "Type of the background fill, always \"solid\""]
53615    #[serde(rename = "type")]
53616    pub tg_type: String,
53617    #[allow(rustdoc::invalid_html_tags)]
53618    #[doc = "The color of the background fill in the RGB24 format"]
53619    #[serde(rename = "color")]
53620    pub color: i64,
53621}
53622#[allow(rustdoc::invalid_html_tags)]
53623#[doc = "Companion type to BackgroundFillSolid that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53624#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53625pub struct NoSkipBackgroundFillSolid {
53626    #[allow(rustdoc::invalid_html_tags)]
53627    #[doc = "Type of the background fill, always \"solid\""]
53628    #[serde(rename = "type")]
53629    pub tg_type: String,
53630    #[allow(rustdoc::invalid_html_tags)]
53631    #[doc = "The color of the background fill in the RGB24 format"]
53632    #[serde(rename = "color")]
53633    pub color: i64,
53634}
53635impl From<NoSkipBackgroundFillSolid> for BackgroundFillSolid {
53636    fn from(t: NoSkipBackgroundFillSolid) -> Self {
53637        Self {
53638            tg_type: t.tg_type,
53639            color: t.color,
53640        }
53641    }
53642}
53643#[allow(clippy::from_over_into)]
53644impl Into<NoSkipBackgroundFillSolid> for BackgroundFillSolid {
53645    fn into(self) -> NoSkipBackgroundFillSolid {
53646        NoSkipBackgroundFillSolid {
53647            tg_type: self.tg_type,
53648            color: self.color,
53649        }
53650    }
53651}
53652impl NoSkipBackgroundFillSolid {
53653    pub fn skip(self) -> BackgroundFillSolid {
53654        self.into()
53655    }
53656}
53657impl BackgroundFillSolid {
53658    pub fn noskip(self) -> NoSkipBackgroundFillSolid {
53659        self.into()
53660    }
53661}
53662#[allow(rustdoc::invalid_html_tags)]
53663#[doc = "The background is filled using the selected color."]
53664#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53665pub struct BackgroundFillSolidBuilder {
53666    #[allow(rustdoc::invalid_html_tags)]
53667    #[doc = "Type of the background fill, always \"solid\""]
53668    #[serde(rename = "type")]
53669    pub tg_type: String,
53670    #[allow(rustdoc::invalid_html_tags)]
53671    #[doc = "The color of the background fill in the RGB24 format"]
53672    #[serde(rename = "color")]
53673    pub color: i64,
53674}
53675impl BackgroundFillSolidBuilder {
53676    #[allow(clippy::too_many_arguments)]
53677    pub fn new(color: i64) -> Self {
53678        Self {
53679            tg_type: "BackgroundFillSolid".to_owned(),
53680            color,
53681        }
53682    }
53683    #[allow(rustdoc::invalid_html_tags)]
53684    #[doc = "Type of the background fill, always \"solid\""]
53685    pub fn set_type(mut self, tg_type: String) -> Self {
53686        self.tg_type = tg_type;
53687        self
53688    }
53689    #[allow(rustdoc::invalid_html_tags)]
53690    #[doc = "The color of the background fill in the RGB24 format"]
53691    pub fn set_color(mut self, color: i64) -> Self {
53692        self.color = color;
53693        self
53694    }
53695    pub fn build(self) -> BackgroundFillSolid {
53696        BackgroundFillSolid {
53697            tg_type: self.tg_type,
53698            color: self.color,
53699        }
53700    }
53701}
53702#[allow(rustdoc::invalid_html_tags)]
53703#[doc = "Represents the scope of bot commands, covering all group and supergroup chats."]
53704#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53705pub struct BotCommandScopeAllGroupChats {
53706    #[allow(rustdoc::invalid_html_tags)]
53707    #[doc = "Scope type, must be all_group_chats"]
53708    #[serde(rename = "type")]
53709    pub tg_type: String,
53710}
53711#[allow(rustdoc::invalid_html_tags)]
53712#[doc = "Companion type to BotCommandScopeAllGroupChats that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53713#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53714pub struct NoSkipBotCommandScopeAllGroupChats {
53715    #[allow(rustdoc::invalid_html_tags)]
53716    #[doc = "Scope type, must be all_group_chats"]
53717    #[serde(rename = "type")]
53718    pub tg_type: String,
53719}
53720impl From<NoSkipBotCommandScopeAllGroupChats> for BotCommandScopeAllGroupChats {
53721    fn from(t: NoSkipBotCommandScopeAllGroupChats) -> Self {
53722        Self { tg_type: t.tg_type }
53723    }
53724}
53725#[allow(clippy::from_over_into)]
53726impl Into<NoSkipBotCommandScopeAllGroupChats> for BotCommandScopeAllGroupChats {
53727    fn into(self) -> NoSkipBotCommandScopeAllGroupChats {
53728        NoSkipBotCommandScopeAllGroupChats {
53729            tg_type: self.tg_type,
53730        }
53731    }
53732}
53733impl NoSkipBotCommandScopeAllGroupChats {
53734    pub fn skip(self) -> BotCommandScopeAllGroupChats {
53735        self.into()
53736    }
53737}
53738impl BotCommandScopeAllGroupChats {
53739    pub fn noskip(self) -> NoSkipBotCommandScopeAllGroupChats {
53740        self.into()
53741    }
53742}
53743#[allow(rustdoc::invalid_html_tags)]
53744#[doc = "Represents the scope of bot commands, covering all group and supergroup chats."]
53745#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53746pub struct BotCommandScopeAllGroupChatsBuilder {
53747    #[allow(rustdoc::invalid_html_tags)]
53748    #[doc = "Scope type, must be all_group_chats"]
53749    #[serde(rename = "type")]
53750    pub tg_type: String,
53751}
53752impl BotCommandScopeAllGroupChatsBuilder {
53753    #[allow(clippy::too_many_arguments)]
53754    pub fn new() -> Self {
53755        Self {
53756            tg_type: "all_group_chats".to_owned(),
53757        }
53758    }
53759    #[allow(rustdoc::invalid_html_tags)]
53760    #[doc = "Scope type, must be all_group_chats"]
53761    pub fn set_type(mut self, tg_type: String) -> Self {
53762        self.tg_type = tg_type;
53763        self
53764    }
53765    pub fn build(self) -> BotCommandScopeAllGroupChats {
53766        BotCommandScopeAllGroupChats {
53767            tg_type: self.tg_type,
53768        }
53769    }
53770}
53771#[allow(rustdoc::invalid_html_tags)]
53772#[doc = "This object represents a boost added to a chat or changed."]
53773#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53774pub struct ChatBoostUpdated {
53775    #[allow(rustdoc::invalid_html_tags)]
53776    #[doc = "Chat which was boosted"]
53777    #[serde(rename = "chat")]
53778    pub chat: BoxWrapper<Unbox<Chat>>,
53779    #[allow(rustdoc::invalid_html_tags)]
53780    #[doc = "Information about the chat boost"]
53781    #[serde(rename = "boost")]
53782    pub boost: BoxWrapper<Box<ChatBoost>>,
53783}
53784#[allow(rustdoc::invalid_html_tags)]
53785#[doc = "Companion type to ChatBoostUpdated that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53786#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53787pub struct NoSkipChatBoostUpdated {
53788    #[allow(rustdoc::invalid_html_tags)]
53789    #[doc = "Chat which was boosted"]
53790    #[serde(rename = "chat")]
53791    pub chat: BoxWrapper<Unbox<Chat>>,
53792    #[allow(rustdoc::invalid_html_tags)]
53793    #[doc = "Information about the chat boost"]
53794    #[serde(rename = "boost")]
53795    pub boost: BoxWrapper<Box<ChatBoost>>,
53796}
53797impl From<NoSkipChatBoostUpdated> for ChatBoostUpdated {
53798    fn from(t: NoSkipChatBoostUpdated) -> Self {
53799        Self {
53800            chat: t.chat,
53801            boost: t.boost,
53802        }
53803    }
53804}
53805#[allow(clippy::from_over_into)]
53806impl Into<NoSkipChatBoostUpdated> for ChatBoostUpdated {
53807    fn into(self) -> NoSkipChatBoostUpdated {
53808        NoSkipChatBoostUpdated {
53809            chat: self.chat,
53810            boost: self.boost,
53811        }
53812    }
53813}
53814impl NoSkipChatBoostUpdated {
53815    pub fn skip(self) -> ChatBoostUpdated {
53816        self.into()
53817    }
53818}
53819impl ChatBoostUpdated {
53820    pub fn noskip(self) -> NoSkipChatBoostUpdated {
53821        self.into()
53822    }
53823}
53824#[allow(rustdoc::invalid_html_tags)]
53825#[doc = "This object represents a boost added to a chat or changed."]
53826#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53827pub struct ChatBoostUpdatedBuilder {
53828    #[allow(rustdoc::invalid_html_tags)]
53829    #[doc = "Chat which was boosted"]
53830    #[serde(rename = "chat")]
53831    pub chat: BoxWrapper<Unbox<Chat>>,
53832    #[allow(rustdoc::invalid_html_tags)]
53833    #[doc = "Information about the chat boost"]
53834    #[serde(rename = "boost")]
53835    pub boost: BoxWrapper<Box<ChatBoost>>,
53836}
53837impl ChatBoostUpdatedBuilder {
53838    #[allow(clippy::too_many_arguments)]
53839    pub fn new<A: Into<Chat>, B: Into<Box<ChatBoost>>>(chat: A, boost: B) -> Self {
53840        Self {
53841            chat: BoxWrapper::new_unbox(chat.into()),
53842            boost: BoxWrapper(boost.into()),
53843        }
53844    }
53845    #[allow(rustdoc::invalid_html_tags)]
53846    #[doc = "Chat which was boosted"]
53847    pub fn set_chat(mut self, chat: Chat) -> Self {
53848        self.chat = BoxWrapper(Unbox(chat));
53849        self
53850    }
53851    #[allow(rustdoc::invalid_html_tags)]
53852    #[doc = "Information about the chat boost"]
53853    pub fn set_boost(mut self, boost: Box<ChatBoost>) -> Self {
53854        self.boost = BoxWrapper(boost);
53855        self
53856    }
53857    pub fn build(self) -> ChatBoostUpdated {
53858        ChatBoostUpdated {
53859            chat: self.chat,
53860            boost: self.boost,
53861        }
53862    }
53863}
53864#[allow(rustdoc::invalid_html_tags)]
53865#[doc = "This object describes the position on faces where a mask should be placed by default."]
53866#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53867pub struct MaskPosition {
53868    #[allow(rustdoc::invalid_html_tags)]
53869    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
53870    #[serde(rename = "point")]
53871    pub point: String,
53872    #[allow(rustdoc::invalid_html_tags)]
53873    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
53874    #[serde(rename = "x_shift")]
53875    pub x_shift: ::ordered_float::OrderedFloat<f64>,
53876    #[allow(rustdoc::invalid_html_tags)]
53877    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
53878    #[serde(rename = "y_shift")]
53879    pub y_shift: ::ordered_float::OrderedFloat<f64>,
53880    #[allow(rustdoc::invalid_html_tags)]
53881    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
53882    #[serde(rename = "scale")]
53883    pub scale: ::ordered_float::OrderedFloat<f64>,
53884}
53885#[allow(rustdoc::invalid_html_tags)]
53886#[doc = "Companion type to MaskPosition that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
53887#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53888pub struct NoSkipMaskPosition {
53889    #[allow(rustdoc::invalid_html_tags)]
53890    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
53891    #[serde(rename = "point")]
53892    pub point: String,
53893    #[allow(rustdoc::invalid_html_tags)]
53894    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
53895    #[serde(rename = "x_shift")]
53896    pub x_shift: ::ordered_float::OrderedFloat<f64>,
53897    #[allow(rustdoc::invalid_html_tags)]
53898    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
53899    #[serde(rename = "y_shift")]
53900    pub y_shift: ::ordered_float::OrderedFloat<f64>,
53901    #[allow(rustdoc::invalid_html_tags)]
53902    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
53903    #[serde(rename = "scale")]
53904    pub scale: ::ordered_float::OrderedFloat<f64>,
53905}
53906impl From<NoSkipMaskPosition> for MaskPosition {
53907    fn from(t: NoSkipMaskPosition) -> Self {
53908        Self {
53909            point: t.point,
53910            x_shift: t.x_shift,
53911            y_shift: t.y_shift,
53912            scale: t.scale,
53913        }
53914    }
53915}
53916#[allow(clippy::from_over_into)]
53917impl Into<NoSkipMaskPosition> for MaskPosition {
53918    fn into(self) -> NoSkipMaskPosition {
53919        NoSkipMaskPosition {
53920            point: self.point,
53921            x_shift: self.x_shift,
53922            y_shift: self.y_shift,
53923            scale: self.scale,
53924        }
53925    }
53926}
53927impl NoSkipMaskPosition {
53928    pub fn skip(self) -> MaskPosition {
53929        self.into()
53930    }
53931}
53932impl MaskPosition {
53933    pub fn noskip(self) -> NoSkipMaskPosition {
53934        self.into()
53935    }
53936}
53937#[allow(rustdoc::invalid_html_tags)]
53938#[doc = "This object describes the position on faces where a mask should be placed by default."]
53939#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
53940pub struct MaskPositionBuilder {
53941    #[allow(rustdoc::invalid_html_tags)]
53942    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
53943    #[serde(rename = "point")]
53944    pub point: String,
53945    #[allow(rustdoc::invalid_html_tags)]
53946    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
53947    #[serde(rename = "x_shift")]
53948    pub x_shift: ::ordered_float::OrderedFloat<f64>,
53949    #[allow(rustdoc::invalid_html_tags)]
53950    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
53951    #[serde(rename = "y_shift")]
53952    pub y_shift: ::ordered_float::OrderedFloat<f64>,
53953    #[allow(rustdoc::invalid_html_tags)]
53954    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
53955    #[serde(rename = "scale")]
53956    pub scale: ::ordered_float::OrderedFloat<f64>,
53957}
53958impl MaskPositionBuilder {
53959    #[allow(clippy::too_many_arguments)]
53960    pub fn new(
53961        point: String,
53962        x_shift: ::ordered_float::OrderedFloat<f64>,
53963        y_shift: ::ordered_float::OrderedFloat<f64>,
53964        scale: ::ordered_float::OrderedFloat<f64>,
53965    ) -> Self {
53966        Self {
53967            point,
53968            x_shift,
53969            y_shift,
53970            scale,
53971        }
53972    }
53973    #[allow(rustdoc::invalid_html_tags)]
53974    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
53975    pub fn set_point(mut self, point: String) -> Self {
53976        self.point = point;
53977        self
53978    }
53979    #[allow(rustdoc::invalid_html_tags)]
53980    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
53981    pub fn set_x_shift(mut self, x_shift: ::ordered_float::OrderedFloat<f64>) -> Self {
53982        self.x_shift = x_shift;
53983        self
53984    }
53985    #[allow(rustdoc::invalid_html_tags)]
53986    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
53987    pub fn set_y_shift(mut self, y_shift: ::ordered_float::OrderedFloat<f64>) -> Self {
53988        self.y_shift = y_shift;
53989        self
53990    }
53991    #[allow(rustdoc::invalid_html_tags)]
53992    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
53993    pub fn set_scale(mut self, scale: ::ordered_float::OrderedFloat<f64>) -> Self {
53994        self.scale = scale;
53995        self
53996    }
53997    pub fn build(self) -> MaskPosition {
53998        MaskPosition {
53999            point: self.point,
54000            x_shift: self.x_shift,
54001            y_shift: self.y_shift,
54002            scale: self.scale,
54003        }
54004    }
54005}
54006#[allow(rustdoc::invalid_html_tags)]
54007#[doc = "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes."]
54008#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54009pub struct PassportElementErrorFile {
54010    #[allow(rustdoc::invalid_html_tags)]
54011    #[doc = "Error source, must be file"]
54012    #[serde(rename = "source")]
54013    pub source: String,
54014    #[allow(rustdoc::invalid_html_tags)]
54015    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
54016    #[serde(rename = "type")]
54017    pub tg_type: String,
54018    #[allow(rustdoc::invalid_html_tags)]
54019    #[doc = "Base64-encoded file hash"]
54020    #[serde(rename = "file_hash")]
54021    pub file_hash: String,
54022    #[allow(rustdoc::invalid_html_tags)]
54023    #[doc = "Error message"]
54024    #[serde(rename = "message")]
54025    pub message: String,
54026}
54027#[allow(rustdoc::invalid_html_tags)]
54028#[doc = "Companion type to PassportElementErrorFile that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
54029#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54030pub struct NoSkipPassportElementErrorFile {
54031    #[allow(rustdoc::invalid_html_tags)]
54032    #[doc = "Error source, must be file"]
54033    #[serde(rename = "source")]
54034    pub source: String,
54035    #[allow(rustdoc::invalid_html_tags)]
54036    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
54037    #[serde(rename = "type")]
54038    pub tg_type: String,
54039    #[allow(rustdoc::invalid_html_tags)]
54040    #[doc = "Base64-encoded file hash"]
54041    #[serde(rename = "file_hash")]
54042    pub file_hash: String,
54043    #[allow(rustdoc::invalid_html_tags)]
54044    #[doc = "Error message"]
54045    #[serde(rename = "message")]
54046    pub message: String,
54047}
54048impl From<NoSkipPassportElementErrorFile> for PassportElementErrorFile {
54049    fn from(t: NoSkipPassportElementErrorFile) -> Self {
54050        Self {
54051            source: t.source,
54052            tg_type: t.tg_type,
54053            file_hash: t.file_hash,
54054            message: t.message,
54055        }
54056    }
54057}
54058#[allow(clippy::from_over_into)]
54059impl Into<NoSkipPassportElementErrorFile> for PassportElementErrorFile {
54060    fn into(self) -> NoSkipPassportElementErrorFile {
54061        NoSkipPassportElementErrorFile {
54062            source: self.source,
54063            tg_type: self.tg_type,
54064            file_hash: self.file_hash,
54065            message: self.message,
54066        }
54067    }
54068}
54069impl NoSkipPassportElementErrorFile {
54070    pub fn skip(self) -> PassportElementErrorFile {
54071        self.into()
54072    }
54073}
54074impl PassportElementErrorFile {
54075    pub fn noskip(self) -> NoSkipPassportElementErrorFile {
54076        self.into()
54077    }
54078}
54079#[allow(rustdoc::invalid_html_tags)]
54080#[doc = "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes."]
54081#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54082pub struct PassportElementErrorFileBuilder {
54083    #[allow(rustdoc::invalid_html_tags)]
54084    #[doc = "Error source, must be file"]
54085    #[serde(rename = "source")]
54086    pub source: String,
54087    #[allow(rustdoc::invalid_html_tags)]
54088    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
54089    #[serde(rename = "type")]
54090    pub tg_type: String,
54091    #[allow(rustdoc::invalid_html_tags)]
54092    #[doc = "Base64-encoded file hash"]
54093    #[serde(rename = "file_hash")]
54094    pub file_hash: String,
54095    #[allow(rustdoc::invalid_html_tags)]
54096    #[doc = "Error message"]
54097    #[serde(rename = "message")]
54098    pub message: String,
54099}
54100impl PassportElementErrorFileBuilder {
54101    #[allow(clippy::too_many_arguments)]
54102    pub fn new(source: String, file_hash: String, message: String) -> Self {
54103        Self {
54104            tg_type: "PassportElementErrorFile".to_owned(),
54105            source,
54106            file_hash,
54107            message,
54108        }
54109    }
54110    #[allow(rustdoc::invalid_html_tags)]
54111    #[doc = "Error source, must be file"]
54112    pub fn set_source(mut self, source: String) -> Self {
54113        self.source = source;
54114        self
54115    }
54116    #[allow(rustdoc::invalid_html_tags)]
54117    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
54118    pub fn set_type(mut self, tg_type: String) -> Self {
54119        self.tg_type = tg_type;
54120        self
54121    }
54122    #[allow(rustdoc::invalid_html_tags)]
54123    #[doc = "Base64-encoded file hash"]
54124    pub fn set_file_hash(mut self, file_hash: String) -> Self {
54125        self.file_hash = file_hash;
54126        self
54127    }
54128    #[allow(rustdoc::invalid_html_tags)]
54129    #[doc = "Error message"]
54130    pub fn set_message(mut self, message: String) -> Self {
54131        self.message = message;
54132        self
54133    }
54134    pub fn build(self) -> PassportElementErrorFile {
54135        PassportElementErrorFile {
54136            source: self.source,
54137            tg_type: self.tg_type,
54138            file_hash: self.file_hash,
54139            message: self.message,
54140        }
54141    }
54142}
54143#[allow(rustdoc::invalid_html_tags)]
54144#[doc = "This object represents a sticker."]
54145#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54146pub struct Sticker {
54147    #[allow(rustdoc::invalid_html_tags)]
54148    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
54149    #[serde(rename = "file_id")]
54150    pub file_id: String,
54151    #[allow(rustdoc::invalid_html_tags)]
54152    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
54153    #[serde(rename = "file_unique_id")]
54154    pub file_unique_id: String,
54155    #[allow(rustdoc::invalid_html_tags)]
54156    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
54157    #[serde(rename = "type")]
54158    pub tg_type: String,
54159    #[allow(rustdoc::invalid_html_tags)]
54160    #[doc = "Sticker width"]
54161    #[serde(rename = "width")]
54162    pub width: i64,
54163    #[allow(rustdoc::invalid_html_tags)]
54164    #[doc = "Sticker height"]
54165    #[serde(rename = "height")]
54166    pub height: i64,
54167    #[allow(rustdoc::invalid_html_tags)]
54168    #[doc = "True, if the sticker is animated"]
54169    #[serde(rename = "is_animated")]
54170    pub is_animated: bool,
54171    #[allow(rustdoc::invalid_html_tags)]
54172    #[doc = "True, if the sticker is a video sticker"]
54173    #[serde(rename = "is_video")]
54174    pub is_video: bool,
54175    #[allow(rustdoc::invalid_html_tags)]
54176    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
54177    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
54178    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
54179    #[allow(rustdoc::invalid_html_tags)]
54180    #[doc = "Optional. Emoji associated with the sticker"]
54181    #[serde(skip_serializing_if = "Option::is_none", rename = "emoji", default)]
54182    pub emoji: Option<String>,
54183    #[allow(rustdoc::invalid_html_tags)]
54184    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
54185    #[serde(skip_serializing_if = "Option::is_none", rename = "set_name", default)]
54186    pub set_name: Option<String>,
54187    #[allow(rustdoc::invalid_html_tags)]
54188    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
54189    #[serde(
54190        skip_serializing_if = "Option::is_none",
54191        rename = "premium_animation",
54192        default
54193    )]
54194    pub premium_animation: Option<BoxWrapper<Unbox<File>>>,
54195    #[allow(rustdoc::invalid_html_tags)]
54196    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
54197    #[serde(
54198        skip_serializing_if = "Option::is_none",
54199        rename = "mask_position",
54200        default
54201    )]
54202    pub mask_position: Option<BoxWrapper<Unbox<MaskPosition>>>,
54203    #[allow(rustdoc::invalid_html_tags)]
54204    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
54205    #[serde(
54206        skip_serializing_if = "Option::is_none",
54207        rename = "custom_emoji_id",
54208        default
54209    )]
54210    pub custom_emoji_id: Option<String>,
54211    #[allow(rustdoc::invalid_html_tags)]
54212    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
54213    #[serde(
54214        skip_serializing_if = "Option::is_none",
54215        rename = "needs_repainting",
54216        default
54217    )]
54218    pub needs_repainting: Option<bool>,
54219    #[allow(rustdoc::invalid_html_tags)]
54220    #[doc = "Optional. File size in bytes"]
54221    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
54222    pub file_size: Option<i64>,
54223}
54224#[allow(rustdoc::invalid_html_tags)]
54225#[doc = "Companion type to Sticker that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
54226#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54227pub struct NoSkipSticker {
54228    #[allow(rustdoc::invalid_html_tags)]
54229    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
54230    #[serde(rename = "file_id")]
54231    pub file_id: String,
54232    #[allow(rustdoc::invalid_html_tags)]
54233    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
54234    #[serde(rename = "file_unique_id")]
54235    pub file_unique_id: String,
54236    #[allow(rustdoc::invalid_html_tags)]
54237    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
54238    #[serde(rename = "type")]
54239    pub tg_type: String,
54240    #[allow(rustdoc::invalid_html_tags)]
54241    #[doc = "Sticker width"]
54242    #[serde(rename = "width")]
54243    pub width: i64,
54244    #[allow(rustdoc::invalid_html_tags)]
54245    #[doc = "Sticker height"]
54246    #[serde(rename = "height")]
54247    pub height: i64,
54248    #[allow(rustdoc::invalid_html_tags)]
54249    #[doc = "True, if the sticker is animated"]
54250    #[serde(rename = "is_animated")]
54251    pub is_animated: bool,
54252    #[allow(rustdoc::invalid_html_tags)]
54253    #[doc = "True, if the sticker is a video sticker"]
54254    #[serde(rename = "is_video")]
54255    pub is_video: bool,
54256    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
54257    pub emoji: Option<String>,
54258    pub set_name: Option<String>,
54259    pub premium_animation: Option<BoxWrapper<Unbox<File>>>,
54260    pub mask_position: Option<BoxWrapper<Unbox<MaskPosition>>>,
54261    pub custom_emoji_id: Option<String>,
54262    pub needs_repainting: Option<bool>,
54263    pub file_size: Option<i64>,
54264}
54265impl From<NoSkipSticker> for Sticker {
54266    fn from(t: NoSkipSticker) -> Self {
54267        Self {
54268            file_id: t.file_id,
54269            file_unique_id: t.file_unique_id,
54270            tg_type: t.tg_type,
54271            width: t.width,
54272            height: t.height,
54273            is_animated: t.is_animated,
54274            is_video: t.is_video,
54275            thumbnail: t.thumbnail,
54276            emoji: t.emoji,
54277            set_name: t.set_name,
54278            premium_animation: t.premium_animation,
54279            mask_position: t.mask_position,
54280            custom_emoji_id: t.custom_emoji_id,
54281            needs_repainting: t.needs_repainting,
54282            file_size: t.file_size,
54283        }
54284    }
54285}
54286#[allow(clippy::from_over_into)]
54287impl Into<NoSkipSticker> for Sticker {
54288    fn into(self) -> NoSkipSticker {
54289        NoSkipSticker {
54290            file_id: self.file_id,
54291            file_unique_id: self.file_unique_id,
54292            tg_type: self.tg_type,
54293            width: self.width,
54294            height: self.height,
54295            is_animated: self.is_animated,
54296            is_video: self.is_video,
54297            thumbnail: self.thumbnail,
54298            emoji: self.emoji,
54299            set_name: self.set_name,
54300            premium_animation: self.premium_animation,
54301            mask_position: self.mask_position,
54302            custom_emoji_id: self.custom_emoji_id,
54303            needs_repainting: self.needs_repainting,
54304            file_size: self.file_size,
54305        }
54306    }
54307}
54308impl NoSkipSticker {
54309    pub fn skip(self) -> Sticker {
54310        self.into()
54311    }
54312}
54313impl Sticker {
54314    pub fn noskip(self) -> NoSkipSticker {
54315        self.into()
54316    }
54317}
54318#[allow(rustdoc::invalid_html_tags)]
54319#[doc = "This object represents a sticker."]
54320#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54321pub struct StickerBuilder {
54322    #[allow(rustdoc::invalid_html_tags)]
54323    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
54324    #[serde(rename = "file_id")]
54325    pub file_id: String,
54326    #[allow(rustdoc::invalid_html_tags)]
54327    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
54328    #[serde(rename = "file_unique_id")]
54329    pub file_unique_id: String,
54330    #[allow(rustdoc::invalid_html_tags)]
54331    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
54332    #[serde(rename = "type")]
54333    pub tg_type: String,
54334    #[allow(rustdoc::invalid_html_tags)]
54335    #[doc = "Sticker width"]
54336    #[serde(rename = "width")]
54337    pub width: i64,
54338    #[allow(rustdoc::invalid_html_tags)]
54339    #[doc = "Sticker height"]
54340    #[serde(rename = "height")]
54341    pub height: i64,
54342    #[allow(rustdoc::invalid_html_tags)]
54343    #[doc = "True, if the sticker is animated"]
54344    #[serde(rename = "is_animated")]
54345    pub is_animated: bool,
54346    #[allow(rustdoc::invalid_html_tags)]
54347    #[doc = "True, if the sticker is a video sticker"]
54348    #[serde(rename = "is_video")]
54349    pub is_video: bool,
54350    #[allow(rustdoc::invalid_html_tags)]
54351    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
54352    #[serde(skip_serializing_if = "Option::is_none", rename = "thumbnail", default)]
54353    pub thumbnail: Option<BoxWrapper<Unbox<PhotoSize>>>,
54354    #[allow(rustdoc::invalid_html_tags)]
54355    #[doc = "Optional. Emoji associated with the sticker"]
54356    #[serde(skip_serializing_if = "Option::is_none", rename = "emoji", default)]
54357    pub emoji: Option<String>,
54358    #[allow(rustdoc::invalid_html_tags)]
54359    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
54360    #[serde(skip_serializing_if = "Option::is_none", rename = "set_name", default)]
54361    pub set_name: Option<String>,
54362    #[allow(rustdoc::invalid_html_tags)]
54363    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
54364    #[serde(
54365        skip_serializing_if = "Option::is_none",
54366        rename = "premium_animation",
54367        default
54368    )]
54369    pub premium_animation: Option<BoxWrapper<Unbox<File>>>,
54370    #[allow(rustdoc::invalid_html_tags)]
54371    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
54372    #[serde(
54373        skip_serializing_if = "Option::is_none",
54374        rename = "mask_position",
54375        default
54376    )]
54377    pub mask_position: Option<BoxWrapper<Unbox<MaskPosition>>>,
54378    #[allow(rustdoc::invalid_html_tags)]
54379    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
54380    #[serde(
54381        skip_serializing_if = "Option::is_none",
54382        rename = "custom_emoji_id",
54383        default
54384    )]
54385    pub custom_emoji_id: Option<String>,
54386    #[allow(rustdoc::invalid_html_tags)]
54387    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
54388    #[serde(
54389        skip_serializing_if = "Option::is_none",
54390        rename = "needs_repainting",
54391        default
54392    )]
54393    pub needs_repainting: Option<bool>,
54394    #[allow(rustdoc::invalid_html_tags)]
54395    #[doc = "Optional. File size in bytes"]
54396    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
54397    pub file_size: Option<i64>,
54398}
54399impl StickerBuilder {
54400    #[allow(clippy::too_many_arguments)]
54401    pub fn new(
54402        file_id: String,
54403        file_unique_id: String,
54404        width: i64,
54405        height: i64,
54406        is_animated: bool,
54407        is_video: bool,
54408    ) -> Self {
54409        Self {
54410            tg_type: "Sticker".to_owned(),
54411            file_id,
54412            file_unique_id,
54413            width,
54414            height,
54415            is_animated,
54416            is_video,
54417            thumbnail: None,
54418            emoji: None,
54419            set_name: None,
54420            premium_animation: None,
54421            mask_position: None,
54422            custom_emoji_id: None,
54423            needs_repainting: None,
54424            file_size: None,
54425        }
54426    }
54427    #[allow(rustdoc::invalid_html_tags)]
54428    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
54429    pub fn set_file_id(mut self, file_id: String) -> Self {
54430        self.file_id = file_id;
54431        self
54432    }
54433    #[allow(rustdoc::invalid_html_tags)]
54434    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
54435    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
54436        self.file_unique_id = file_unique_id;
54437        self
54438    }
54439    #[allow(rustdoc::invalid_html_tags)]
54440    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
54441    pub fn set_type(mut self, tg_type: String) -> Self {
54442        self.tg_type = tg_type;
54443        self
54444    }
54445    #[allow(rustdoc::invalid_html_tags)]
54446    #[doc = "Sticker width"]
54447    pub fn set_width(mut self, width: i64) -> Self {
54448        self.width = width;
54449        self
54450    }
54451    #[allow(rustdoc::invalid_html_tags)]
54452    #[doc = "Sticker height"]
54453    pub fn set_height(mut self, height: i64) -> Self {
54454        self.height = height;
54455        self
54456    }
54457    #[allow(rustdoc::invalid_html_tags)]
54458    #[doc = "True, if the sticker is animated"]
54459    pub fn set_is_animated(mut self, is_animated: bool) -> Self {
54460        self.is_animated = is_animated;
54461        self
54462    }
54463    #[allow(rustdoc::invalid_html_tags)]
54464    #[doc = "True, if the sticker is a video sticker"]
54465    pub fn set_is_video(mut self, is_video: bool) -> Self {
54466        self.is_video = is_video;
54467        self
54468    }
54469    #[allow(rustdoc::invalid_html_tags)]
54470    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
54471    pub fn set_thumbnail(mut self, thumbnail: PhotoSize) -> Self {
54472        self.thumbnail = Some(BoxWrapper(Unbox(thumbnail)));
54473        self
54474    }
54475    #[allow(rustdoc::invalid_html_tags)]
54476    #[doc = "Optional. Emoji associated with the sticker"]
54477    pub fn set_emoji(mut self, emoji: String) -> Self {
54478        self.emoji = Some(emoji);
54479        self
54480    }
54481    #[allow(rustdoc::invalid_html_tags)]
54482    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
54483    pub fn set_set_name(mut self, set_name: String) -> Self {
54484        self.set_name = Some(set_name);
54485        self
54486    }
54487    #[allow(rustdoc::invalid_html_tags)]
54488    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
54489    pub fn set_premium_animation(mut self, premium_animation: File) -> Self {
54490        self.premium_animation = Some(BoxWrapper(Unbox(premium_animation)));
54491        self
54492    }
54493    #[allow(rustdoc::invalid_html_tags)]
54494    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
54495    pub fn set_mask_position(mut self, mask_position: MaskPosition) -> Self {
54496        self.mask_position = Some(BoxWrapper(Unbox(mask_position)));
54497        self
54498    }
54499    #[allow(rustdoc::invalid_html_tags)]
54500    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
54501    pub fn set_custom_emoji_id(mut self, custom_emoji_id: String) -> Self {
54502        self.custom_emoji_id = Some(custom_emoji_id);
54503        self
54504    }
54505    #[allow(rustdoc::invalid_html_tags)]
54506    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
54507    pub fn set_needs_repainting(mut self, needs_repainting: bool) -> Self {
54508        self.needs_repainting = Some(needs_repainting);
54509        self
54510    }
54511    #[allow(rustdoc::invalid_html_tags)]
54512    #[doc = "Optional. File size in bytes"]
54513    pub fn set_file_size(mut self, file_size: i64) -> Self {
54514        self.file_size = Some(file_size);
54515        self
54516    }
54517    pub fn build(self) -> Sticker {
54518        Sticker {
54519            file_id: self.file_id,
54520            file_unique_id: self.file_unique_id,
54521            tg_type: self.tg_type,
54522            width: self.width,
54523            height: self.height,
54524            is_animated: self.is_animated,
54525            is_video: self.is_video,
54526            thumbnail: self.thumbnail,
54527            emoji: self.emoji,
54528            set_name: self.set_name,
54529            premium_animation: self.premium_animation,
54530            mask_position: self.mask_position,
54531            custom_emoji_id: self.custom_emoji_id,
54532            needs_repainting: self.needs_repainting,
54533            file_size: self.file_size,
54534        }
54535    }
54536}
54537#[allow(rustdoc::invalid_html_tags)]
54538#[doc = "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes."]
54539#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54540pub struct PassportElementErrorSelfie {
54541    #[allow(rustdoc::invalid_html_tags)]
54542    #[doc = "Error source, must be selfie"]
54543    #[serde(rename = "source")]
54544    pub source: String,
54545    #[allow(rustdoc::invalid_html_tags)]
54546    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
54547    #[serde(rename = "type")]
54548    pub tg_type: String,
54549    #[allow(rustdoc::invalid_html_tags)]
54550    #[doc = "Base64-encoded hash of the file with the selfie"]
54551    #[serde(rename = "file_hash")]
54552    pub file_hash: String,
54553    #[allow(rustdoc::invalid_html_tags)]
54554    #[doc = "Error message"]
54555    #[serde(rename = "message")]
54556    pub message: String,
54557}
54558#[allow(rustdoc::invalid_html_tags)]
54559#[doc = "Companion type to PassportElementErrorSelfie that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
54560#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54561pub struct NoSkipPassportElementErrorSelfie {
54562    #[allow(rustdoc::invalid_html_tags)]
54563    #[doc = "Error source, must be selfie"]
54564    #[serde(rename = "source")]
54565    pub source: String,
54566    #[allow(rustdoc::invalid_html_tags)]
54567    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
54568    #[serde(rename = "type")]
54569    pub tg_type: String,
54570    #[allow(rustdoc::invalid_html_tags)]
54571    #[doc = "Base64-encoded hash of the file with the selfie"]
54572    #[serde(rename = "file_hash")]
54573    pub file_hash: String,
54574    #[allow(rustdoc::invalid_html_tags)]
54575    #[doc = "Error message"]
54576    #[serde(rename = "message")]
54577    pub message: String,
54578}
54579impl From<NoSkipPassportElementErrorSelfie> for PassportElementErrorSelfie {
54580    fn from(t: NoSkipPassportElementErrorSelfie) -> Self {
54581        Self {
54582            source: t.source,
54583            tg_type: t.tg_type,
54584            file_hash: t.file_hash,
54585            message: t.message,
54586        }
54587    }
54588}
54589#[allow(clippy::from_over_into)]
54590impl Into<NoSkipPassportElementErrorSelfie> for PassportElementErrorSelfie {
54591    fn into(self) -> NoSkipPassportElementErrorSelfie {
54592        NoSkipPassportElementErrorSelfie {
54593            source: self.source,
54594            tg_type: self.tg_type,
54595            file_hash: self.file_hash,
54596            message: self.message,
54597        }
54598    }
54599}
54600impl NoSkipPassportElementErrorSelfie {
54601    pub fn skip(self) -> PassportElementErrorSelfie {
54602        self.into()
54603    }
54604}
54605impl PassportElementErrorSelfie {
54606    pub fn noskip(self) -> NoSkipPassportElementErrorSelfie {
54607        self.into()
54608    }
54609}
54610#[allow(rustdoc::invalid_html_tags)]
54611#[doc = "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes."]
54612#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54613pub struct PassportElementErrorSelfieBuilder {
54614    #[allow(rustdoc::invalid_html_tags)]
54615    #[doc = "Error source, must be selfie"]
54616    #[serde(rename = "source")]
54617    pub source: String,
54618    #[allow(rustdoc::invalid_html_tags)]
54619    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
54620    #[serde(rename = "type")]
54621    pub tg_type: String,
54622    #[allow(rustdoc::invalid_html_tags)]
54623    #[doc = "Base64-encoded hash of the file with the selfie"]
54624    #[serde(rename = "file_hash")]
54625    pub file_hash: String,
54626    #[allow(rustdoc::invalid_html_tags)]
54627    #[doc = "Error message"]
54628    #[serde(rename = "message")]
54629    pub message: String,
54630}
54631impl PassportElementErrorSelfieBuilder {
54632    #[allow(clippy::too_many_arguments)]
54633    pub fn new(source: String, file_hash: String, message: String) -> Self {
54634        Self {
54635            tg_type: "PassportElementErrorSelfie".to_owned(),
54636            source,
54637            file_hash,
54638            message,
54639        }
54640    }
54641    #[allow(rustdoc::invalid_html_tags)]
54642    #[doc = "Error source, must be selfie"]
54643    pub fn set_source(mut self, source: String) -> Self {
54644        self.source = source;
54645        self
54646    }
54647    #[allow(rustdoc::invalid_html_tags)]
54648    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
54649    pub fn set_type(mut self, tg_type: String) -> Self {
54650        self.tg_type = tg_type;
54651        self
54652    }
54653    #[allow(rustdoc::invalid_html_tags)]
54654    #[doc = "Base64-encoded hash of the file with the selfie"]
54655    pub fn set_file_hash(mut self, file_hash: String) -> Self {
54656        self.file_hash = file_hash;
54657        self
54658    }
54659    #[allow(rustdoc::invalid_html_tags)]
54660    #[doc = "Error message"]
54661    pub fn set_message(mut self, message: String) -> Self {
54662        self.message = message;
54663        self
54664    }
54665    pub fn build(self) -> PassportElementErrorSelfie {
54666        PassportElementErrorSelfie {
54667            source: self.source,
54668            tg_type: self.tg_type,
54669            file_hash: self.file_hash,
54670            message: self.message,
54671        }
54672    }
54673}
54674#[allow(rustdoc::invalid_html_tags)]
54675#[doc = "The background is a .PNG or .TGV (gzipped subset of SVG with MIME type \"application/x-tgwallpattern\") pattern to be combined with the background fill chosen by the user."]
54676#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54677pub struct BackgroundTypePattern {
54678    #[allow(rustdoc::invalid_html_tags)]
54679    #[doc = "Type of the background, always \"pattern\""]
54680    #[serde(rename = "type")]
54681    pub tg_type: String,
54682    #[allow(rustdoc::invalid_html_tags)]
54683    #[doc = "Document with the pattern"]
54684    #[serde(rename = "document")]
54685    pub document: BoxWrapper<Unbox<Document>>,
54686    #[allow(rustdoc::invalid_html_tags)]
54687    #[doc = "The background fill that is combined with the pattern"]
54688    #[serde(rename = "fill")]
54689    pub fill: BoxWrapper<Unbox<BackgroundFill>>,
54690    #[allow(rustdoc::invalid_html_tags)]
54691    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
54692    #[serde(rename = "intensity")]
54693    pub intensity: i64,
54694    #[allow(rustdoc::invalid_html_tags)]
54695    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
54696    #[serde(
54697        skip_serializing_if = "Option::is_none",
54698        rename = "is_inverted",
54699        default
54700    )]
54701    pub is_inverted: Option<bool>,
54702    #[allow(rustdoc::invalid_html_tags)]
54703    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
54704    #[serde(skip_serializing_if = "Option::is_none", rename = "is_moving", default)]
54705    pub is_moving: Option<bool>,
54706}
54707#[allow(rustdoc::invalid_html_tags)]
54708#[doc = "Companion type to BackgroundTypePattern that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
54709#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54710pub struct NoSkipBackgroundTypePattern {
54711    #[allow(rustdoc::invalid_html_tags)]
54712    #[doc = "Type of the background, always \"pattern\""]
54713    #[serde(rename = "type")]
54714    pub tg_type: String,
54715    #[allow(rustdoc::invalid_html_tags)]
54716    #[doc = "Document with the pattern"]
54717    #[serde(rename = "document")]
54718    pub document: BoxWrapper<Unbox<Document>>,
54719    #[allow(rustdoc::invalid_html_tags)]
54720    #[doc = "The background fill that is combined with the pattern"]
54721    #[serde(rename = "fill")]
54722    pub fill: BoxWrapper<Unbox<BackgroundFill>>,
54723    #[allow(rustdoc::invalid_html_tags)]
54724    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
54725    #[serde(rename = "intensity")]
54726    pub intensity: i64,
54727    pub is_inverted: Option<bool>,
54728    pub is_moving: Option<bool>,
54729}
54730impl From<NoSkipBackgroundTypePattern> for BackgroundTypePattern {
54731    fn from(t: NoSkipBackgroundTypePattern) -> Self {
54732        Self {
54733            tg_type: t.tg_type,
54734            document: t.document,
54735            fill: t.fill,
54736            intensity: t.intensity,
54737            is_inverted: t.is_inverted,
54738            is_moving: t.is_moving,
54739        }
54740    }
54741}
54742#[allow(clippy::from_over_into)]
54743impl Into<NoSkipBackgroundTypePattern> for BackgroundTypePattern {
54744    fn into(self) -> NoSkipBackgroundTypePattern {
54745        NoSkipBackgroundTypePattern {
54746            tg_type: self.tg_type,
54747            document: self.document,
54748            fill: self.fill,
54749            intensity: self.intensity,
54750            is_inverted: self.is_inverted,
54751            is_moving: self.is_moving,
54752        }
54753    }
54754}
54755impl NoSkipBackgroundTypePattern {
54756    pub fn skip(self) -> BackgroundTypePattern {
54757        self.into()
54758    }
54759}
54760impl BackgroundTypePattern {
54761    pub fn noskip(self) -> NoSkipBackgroundTypePattern {
54762        self.into()
54763    }
54764}
54765#[allow(rustdoc::invalid_html_tags)]
54766#[doc = "The background is a .PNG or .TGV (gzipped subset of SVG with MIME type \"application/x-tgwallpattern\") pattern to be combined with the background fill chosen by the user."]
54767#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54768pub struct BackgroundTypePatternBuilder {
54769    #[allow(rustdoc::invalid_html_tags)]
54770    #[doc = "Type of the background, always \"pattern\""]
54771    #[serde(rename = "type")]
54772    pub tg_type: String,
54773    #[allow(rustdoc::invalid_html_tags)]
54774    #[doc = "Document with the pattern"]
54775    #[serde(rename = "document")]
54776    pub document: BoxWrapper<Unbox<Document>>,
54777    #[allow(rustdoc::invalid_html_tags)]
54778    #[doc = "The background fill that is combined with the pattern"]
54779    #[serde(rename = "fill")]
54780    pub fill: BoxWrapper<Unbox<BackgroundFill>>,
54781    #[allow(rustdoc::invalid_html_tags)]
54782    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
54783    #[serde(rename = "intensity")]
54784    pub intensity: i64,
54785    #[allow(rustdoc::invalid_html_tags)]
54786    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
54787    #[serde(
54788        skip_serializing_if = "Option::is_none",
54789        rename = "is_inverted",
54790        default
54791    )]
54792    pub is_inverted: Option<bool>,
54793    #[allow(rustdoc::invalid_html_tags)]
54794    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
54795    #[serde(skip_serializing_if = "Option::is_none", rename = "is_moving", default)]
54796    pub is_moving: Option<bool>,
54797}
54798impl BackgroundTypePatternBuilder {
54799    #[allow(clippy::too_many_arguments)]
54800    pub fn new<A: Into<Document>, B: Into<BackgroundFill>>(
54801        document: A,
54802        fill: B,
54803        intensity: i64,
54804    ) -> Self {
54805        Self {
54806            tg_type: "BackgroundTypePattern".to_owned(),
54807            document: BoxWrapper::new_unbox(document.into()),
54808            fill: BoxWrapper::new_unbox(fill.into()),
54809            intensity,
54810            is_inverted: None,
54811            is_moving: None,
54812        }
54813    }
54814    #[allow(rustdoc::invalid_html_tags)]
54815    #[doc = "Type of the background, always \"pattern\""]
54816    pub fn set_type(mut self, tg_type: String) -> Self {
54817        self.tg_type = tg_type;
54818        self
54819    }
54820    #[allow(rustdoc::invalid_html_tags)]
54821    #[doc = "Document with the pattern"]
54822    pub fn set_document(mut self, document: Document) -> Self {
54823        self.document = BoxWrapper(Unbox(document));
54824        self
54825    }
54826    #[allow(rustdoc::invalid_html_tags)]
54827    #[doc = "The background fill that is combined with the pattern"]
54828    pub fn set_fill(mut self, fill: BackgroundFill) -> Self {
54829        self.fill = BoxWrapper(Unbox(fill));
54830        self
54831    }
54832    #[allow(rustdoc::invalid_html_tags)]
54833    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
54834    pub fn set_intensity(mut self, intensity: i64) -> Self {
54835        self.intensity = intensity;
54836        self
54837    }
54838    #[allow(rustdoc::invalid_html_tags)]
54839    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
54840    pub fn set_is_inverted(mut self, is_inverted: bool) -> Self {
54841        self.is_inverted = Some(is_inverted);
54842        self
54843    }
54844    #[allow(rustdoc::invalid_html_tags)]
54845    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
54846    pub fn set_is_moving(mut self, is_moving: bool) -> Self {
54847        self.is_moving = Some(is_moving);
54848        self
54849    }
54850    pub fn build(self) -> BackgroundTypePattern {
54851        BackgroundTypePattern {
54852            tg_type: self.tg_type,
54853            document: self.document,
54854            fill: self.fill,
54855            intensity: self.intensity,
54856            is_inverted: self.is_inverted,
54857            is_moving: self.is_moving,
54858        }
54859    }
54860}
54861#[allow(rustdoc::invalid_html_tags)]
54862#[doc = "Describes an amount of Telegram Stars."]
54863#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54864pub struct StarAmount {
54865    #[allow(rustdoc::invalid_html_tags)]
54866    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
54867    #[serde(rename = "amount")]
54868    pub amount: i64,
54869    #[allow(rustdoc::invalid_html_tags)]
54870    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
54871    #[serde(
54872        skip_serializing_if = "Option::is_none",
54873        rename = "nanostar_amount",
54874        default
54875    )]
54876    pub nanostar_amount: Option<i64>,
54877}
54878#[allow(rustdoc::invalid_html_tags)]
54879#[doc = "Companion type to StarAmount that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
54880#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54881pub struct NoSkipStarAmount {
54882    #[allow(rustdoc::invalid_html_tags)]
54883    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
54884    #[serde(rename = "amount")]
54885    pub amount: i64,
54886    pub nanostar_amount: Option<i64>,
54887}
54888impl From<NoSkipStarAmount> for StarAmount {
54889    fn from(t: NoSkipStarAmount) -> Self {
54890        Self {
54891            amount: t.amount,
54892            nanostar_amount: t.nanostar_amount,
54893        }
54894    }
54895}
54896#[allow(clippy::from_over_into)]
54897impl Into<NoSkipStarAmount> for StarAmount {
54898    fn into(self) -> NoSkipStarAmount {
54899        NoSkipStarAmount {
54900            amount: self.amount,
54901            nanostar_amount: self.nanostar_amount,
54902        }
54903    }
54904}
54905impl NoSkipStarAmount {
54906    pub fn skip(self) -> StarAmount {
54907        self.into()
54908    }
54909}
54910impl StarAmount {
54911    pub fn noskip(self) -> NoSkipStarAmount {
54912        self.into()
54913    }
54914}
54915#[allow(rustdoc::invalid_html_tags)]
54916#[doc = "Describes an amount of Telegram Stars."]
54917#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54918pub struct StarAmountBuilder {
54919    #[allow(rustdoc::invalid_html_tags)]
54920    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
54921    #[serde(rename = "amount")]
54922    pub amount: i64,
54923    #[allow(rustdoc::invalid_html_tags)]
54924    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
54925    #[serde(
54926        skip_serializing_if = "Option::is_none",
54927        rename = "nanostar_amount",
54928        default
54929    )]
54930    pub nanostar_amount: Option<i64>,
54931}
54932impl StarAmountBuilder {
54933    #[allow(clippy::too_many_arguments)]
54934    pub fn new(amount: i64) -> Self {
54935        Self {
54936            amount,
54937            nanostar_amount: None,
54938        }
54939    }
54940    #[allow(rustdoc::invalid_html_tags)]
54941    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
54942    pub fn set_amount(mut self, amount: i64) -> Self {
54943        self.amount = amount;
54944        self
54945    }
54946    #[allow(rustdoc::invalid_html_tags)]
54947    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
54948    pub fn set_nanostar_amount(mut self, nanostar_amount: i64) -> Self {
54949        self.nanostar_amount = Some(nanostar_amount);
54950        self
54951    }
54952    pub fn build(self) -> StarAmount {
54953        StarAmount {
54954            amount: self.amount,
54955            nanostar_amount: self.nanostar_amount,
54956        }
54957    }
54958}
54959#[allow(rustdoc::invalid_html_tags)]
54960#[doc = "Describes a withdrawal transaction with Fragment."]
54961#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54962pub struct TransactionPartnerFragment {
54963    #[allow(rustdoc::invalid_html_tags)]
54964    #[doc = "Type of the transaction partner, always \"fragment\""]
54965    #[serde(rename = "type")]
54966    pub tg_type: String,
54967    #[allow(rustdoc::invalid_html_tags)]
54968    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
54969    #[serde(
54970        skip_serializing_if = "Option::is_none",
54971        rename = "withdrawal_state",
54972        default
54973    )]
54974    pub withdrawal_state: Option<BoxWrapper<Unbox<RevenueWithdrawalState>>>,
54975}
54976#[allow(rustdoc::invalid_html_tags)]
54977#[doc = "Companion type to TransactionPartnerFragment that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
54978#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
54979pub struct NoSkipTransactionPartnerFragment {
54980    #[allow(rustdoc::invalid_html_tags)]
54981    #[doc = "Type of the transaction partner, always \"fragment\""]
54982    #[serde(rename = "type")]
54983    pub tg_type: String,
54984    pub withdrawal_state: Option<BoxWrapper<Unbox<RevenueWithdrawalState>>>,
54985}
54986impl From<NoSkipTransactionPartnerFragment> for TransactionPartnerFragment {
54987    fn from(t: NoSkipTransactionPartnerFragment) -> Self {
54988        Self {
54989            tg_type: t.tg_type,
54990            withdrawal_state: t.withdrawal_state,
54991        }
54992    }
54993}
54994#[allow(clippy::from_over_into)]
54995impl Into<NoSkipTransactionPartnerFragment> for TransactionPartnerFragment {
54996    fn into(self) -> NoSkipTransactionPartnerFragment {
54997        NoSkipTransactionPartnerFragment {
54998            tg_type: self.tg_type,
54999            withdrawal_state: self.withdrawal_state,
55000        }
55001    }
55002}
55003impl NoSkipTransactionPartnerFragment {
55004    pub fn skip(self) -> TransactionPartnerFragment {
55005        self.into()
55006    }
55007}
55008impl TransactionPartnerFragment {
55009    pub fn noskip(self) -> NoSkipTransactionPartnerFragment {
55010        self.into()
55011    }
55012}
55013#[allow(rustdoc::invalid_html_tags)]
55014#[doc = "Describes a withdrawal transaction with Fragment."]
55015#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55016pub struct TransactionPartnerFragmentBuilder {
55017    #[allow(rustdoc::invalid_html_tags)]
55018    #[doc = "Type of the transaction partner, always \"fragment\""]
55019    #[serde(rename = "type")]
55020    pub tg_type: String,
55021    #[allow(rustdoc::invalid_html_tags)]
55022    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
55023    #[serde(
55024        skip_serializing_if = "Option::is_none",
55025        rename = "withdrawal_state",
55026        default
55027    )]
55028    pub withdrawal_state: Option<BoxWrapper<Unbox<RevenueWithdrawalState>>>,
55029}
55030impl TransactionPartnerFragmentBuilder {
55031    #[allow(clippy::too_many_arguments)]
55032    pub fn new() -> Self {
55033        Self {
55034            tg_type: "TransactionPartnerFragment".to_owned(),
55035            withdrawal_state: None,
55036        }
55037    }
55038    #[allow(rustdoc::invalid_html_tags)]
55039    #[doc = "Type of the transaction partner, always \"fragment\""]
55040    pub fn set_type(mut self, tg_type: String) -> Self {
55041        self.tg_type = tg_type;
55042        self
55043    }
55044    #[allow(rustdoc::invalid_html_tags)]
55045    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
55046    pub fn set_withdrawal_state(mut self, withdrawal_state: RevenueWithdrawalState) -> Self {
55047        self.withdrawal_state = Some(BoxWrapper(Unbox(withdrawal_state)));
55048        self
55049    }
55050    pub fn build(self) -> TransactionPartnerFragment {
55051        TransactionPartnerFragment {
55052            tg_type: self.tg_type,
55053            withdrawal_state: self.withdrawal_state,
55054        }
55055    }
55056}
55057#[allow(rustdoc::invalid_html_tags)]
55058#[doc = "Represents a chat member that isn't currently a member of the chat, but may join it themselves."]
55059#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55060pub struct ChatMemberLeft {
55061    #[allow(rustdoc::invalid_html_tags)]
55062    #[doc = "Information about the user"]
55063    #[serde(rename = "user")]
55064    pub user: BoxWrapper<Unbox<User>>,
55065}
55066#[allow(rustdoc::invalid_html_tags)]
55067#[doc = "Companion type to ChatMemberLeft that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55068#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55069pub struct NoSkipChatMemberLeft {
55070    #[allow(rustdoc::invalid_html_tags)]
55071    #[doc = "Information about the user"]
55072    #[serde(rename = "user")]
55073    pub user: BoxWrapper<Unbox<User>>,
55074}
55075impl From<NoSkipChatMemberLeft> for ChatMemberLeft {
55076    fn from(t: NoSkipChatMemberLeft) -> Self {
55077        Self { user: t.user }
55078    }
55079}
55080#[allow(clippy::from_over_into)]
55081impl Into<NoSkipChatMemberLeft> for ChatMemberLeft {
55082    fn into(self) -> NoSkipChatMemberLeft {
55083        NoSkipChatMemberLeft { user: self.user }
55084    }
55085}
55086impl NoSkipChatMemberLeft {
55087    pub fn skip(self) -> ChatMemberLeft {
55088        self.into()
55089    }
55090}
55091impl ChatMemberLeft {
55092    pub fn noskip(self) -> NoSkipChatMemberLeft {
55093        self.into()
55094    }
55095}
55096#[allow(rustdoc::invalid_html_tags)]
55097#[doc = "Represents a chat member that isn't currently a member of the chat, but may join it themselves."]
55098#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55099pub struct ChatMemberLeftBuilder {
55100    #[allow(rustdoc::invalid_html_tags)]
55101    #[doc = "Information about the user"]
55102    #[serde(rename = "user")]
55103    pub user: BoxWrapper<Unbox<User>>,
55104}
55105impl ChatMemberLeftBuilder {
55106    #[allow(clippy::too_many_arguments)]
55107    pub fn new<A: Into<User>>(user: A) -> Self {
55108        Self {
55109            user: BoxWrapper::new_unbox(user.into()),
55110        }
55111    }
55112    #[allow(rustdoc::invalid_html_tags)]
55113    #[doc = "Information about the user"]
55114    pub fn set_user(mut self, user: User) -> Self {
55115        self.user = BoxWrapper(Unbox(user));
55116        self
55117    }
55118    pub fn build(self) -> ChatMemberLeft {
55119        ChatMemberLeft { user: self.user }
55120    }
55121}
55122#[allow(rustdoc::invalid_html_tags)]
55123#[doc = "The paid media is a photo."]
55124#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55125pub struct PaidMediaPhoto {
55126    #[allow(rustdoc::invalid_html_tags)]
55127    #[doc = "Type of the paid media, always \"photo\""]
55128    #[serde(rename = "type")]
55129    pub tg_type: String,
55130    #[allow(rustdoc::invalid_html_tags)]
55131    #[doc = "The photo"]
55132    #[serde(rename = "photo")]
55133    pub photo: Vec<PhotoSize>,
55134}
55135#[allow(rustdoc::invalid_html_tags)]
55136#[doc = "Companion type to PaidMediaPhoto that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55137#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55138pub struct NoSkipPaidMediaPhoto {
55139    #[allow(rustdoc::invalid_html_tags)]
55140    #[doc = "Type of the paid media, always \"photo\""]
55141    #[serde(rename = "type")]
55142    pub tg_type: String,
55143    #[allow(rustdoc::invalid_html_tags)]
55144    #[doc = "The photo"]
55145    #[serde(rename = "photo")]
55146    pub photo: Vec<PhotoSize>,
55147}
55148impl From<NoSkipPaidMediaPhoto> for PaidMediaPhoto {
55149    fn from(t: NoSkipPaidMediaPhoto) -> Self {
55150        Self {
55151            tg_type: t.tg_type,
55152            photo: t.photo,
55153        }
55154    }
55155}
55156#[allow(clippy::from_over_into)]
55157impl Into<NoSkipPaidMediaPhoto> for PaidMediaPhoto {
55158    fn into(self) -> NoSkipPaidMediaPhoto {
55159        NoSkipPaidMediaPhoto {
55160            tg_type: self.tg_type,
55161            photo: self.photo,
55162        }
55163    }
55164}
55165impl NoSkipPaidMediaPhoto {
55166    pub fn skip(self) -> PaidMediaPhoto {
55167        self.into()
55168    }
55169}
55170impl PaidMediaPhoto {
55171    pub fn noskip(self) -> NoSkipPaidMediaPhoto {
55172        self.into()
55173    }
55174}
55175#[allow(rustdoc::invalid_html_tags)]
55176#[doc = "The paid media is a photo."]
55177#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55178pub struct PaidMediaPhotoBuilder {
55179    #[allow(rustdoc::invalid_html_tags)]
55180    #[doc = "Type of the paid media, always \"photo\""]
55181    #[serde(rename = "type")]
55182    pub tg_type: String,
55183    #[allow(rustdoc::invalid_html_tags)]
55184    #[doc = "The photo"]
55185    #[serde(rename = "photo")]
55186    pub photo: Vec<PhotoSize>,
55187}
55188impl PaidMediaPhotoBuilder {
55189    #[allow(clippy::too_many_arguments)]
55190    pub fn new(photo: Vec<PhotoSize>) -> Self {
55191        Self {
55192            tg_type: "PaidMediaPhoto".to_owned(),
55193            photo,
55194        }
55195    }
55196    #[allow(rustdoc::invalid_html_tags)]
55197    #[doc = "Type of the paid media, always \"photo\""]
55198    pub fn set_type(mut self, tg_type: String) -> Self {
55199        self.tg_type = tg_type;
55200        self
55201    }
55202    #[allow(rustdoc::invalid_html_tags)]
55203    #[doc = "The photo"]
55204    pub fn set_photo(mut self, photo: Vec<PhotoSize>) -> Self {
55205        self.photo = photo;
55206        self
55207    }
55208    pub fn build(self) -> PaidMediaPhoto {
55209        PaidMediaPhoto {
55210            tg_type: self.tg_type,
55211            photo: self.photo,
55212        }
55213    }
55214}
55215#[allow(rustdoc::invalid_html_tags)]
55216#[doc = "This object describes a unique gift that was upgraded from a regular gift."]
55217#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55218pub struct UniqueGift {
55219    #[allow(rustdoc::invalid_html_tags)]
55220    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
55221    #[serde(rename = "base_name")]
55222    pub base_name: String,
55223    #[allow(rustdoc::invalid_html_tags)]
55224    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
55225    #[serde(rename = "name")]
55226    pub name: String,
55227    #[allow(rustdoc::invalid_html_tags)]
55228    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
55229    #[serde(rename = "number")]
55230    pub number: i64,
55231    #[allow(rustdoc::invalid_html_tags)]
55232    #[doc = "Model of the gift"]
55233    #[serde(rename = "model")]
55234    pub model: BoxWrapper<Unbox<UniqueGiftModel>>,
55235    #[allow(rustdoc::invalid_html_tags)]
55236    #[doc = "Symbol of the gift"]
55237    #[serde(rename = "symbol")]
55238    pub symbol: BoxWrapper<Unbox<UniqueGiftSymbol>>,
55239    #[allow(rustdoc::invalid_html_tags)]
55240    #[doc = "Backdrop of the gift"]
55241    #[serde(rename = "backdrop")]
55242    pub backdrop: BoxWrapper<Unbox<UniqueGiftBackdrop>>,
55243    #[allow(rustdoc::invalid_html_tags)]
55244    #[doc = "Optional. Information about the chat that published the gift"]
55245    #[serde(
55246        skip_serializing_if = "Option::is_none",
55247        rename = "publisher_chat",
55248        default
55249    )]
55250    pub publisher_chat: Option<BoxWrapper<Unbox<Chat>>>,
55251}
55252#[allow(rustdoc::invalid_html_tags)]
55253#[doc = "Companion type to UniqueGift that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55254#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55255pub struct NoSkipUniqueGift {
55256    #[allow(rustdoc::invalid_html_tags)]
55257    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
55258    #[serde(rename = "base_name")]
55259    pub base_name: String,
55260    #[allow(rustdoc::invalid_html_tags)]
55261    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
55262    #[serde(rename = "name")]
55263    pub name: String,
55264    #[allow(rustdoc::invalid_html_tags)]
55265    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
55266    #[serde(rename = "number")]
55267    pub number: i64,
55268    #[allow(rustdoc::invalid_html_tags)]
55269    #[doc = "Model of the gift"]
55270    #[serde(rename = "model")]
55271    pub model: BoxWrapper<Unbox<UniqueGiftModel>>,
55272    #[allow(rustdoc::invalid_html_tags)]
55273    #[doc = "Symbol of the gift"]
55274    #[serde(rename = "symbol")]
55275    pub symbol: BoxWrapper<Unbox<UniqueGiftSymbol>>,
55276    #[allow(rustdoc::invalid_html_tags)]
55277    #[doc = "Backdrop of the gift"]
55278    #[serde(rename = "backdrop")]
55279    pub backdrop: BoxWrapper<Unbox<UniqueGiftBackdrop>>,
55280    pub publisher_chat: Option<BoxWrapper<Unbox<Chat>>>,
55281}
55282impl From<NoSkipUniqueGift> for UniqueGift {
55283    fn from(t: NoSkipUniqueGift) -> Self {
55284        Self {
55285            base_name: t.base_name,
55286            name: t.name,
55287            number: t.number,
55288            model: t.model,
55289            symbol: t.symbol,
55290            backdrop: t.backdrop,
55291            publisher_chat: t.publisher_chat,
55292        }
55293    }
55294}
55295#[allow(clippy::from_over_into)]
55296impl Into<NoSkipUniqueGift> for UniqueGift {
55297    fn into(self) -> NoSkipUniqueGift {
55298        NoSkipUniqueGift {
55299            base_name: self.base_name,
55300            name: self.name,
55301            number: self.number,
55302            model: self.model,
55303            symbol: self.symbol,
55304            backdrop: self.backdrop,
55305            publisher_chat: self.publisher_chat,
55306        }
55307    }
55308}
55309impl NoSkipUniqueGift {
55310    pub fn skip(self) -> UniqueGift {
55311        self.into()
55312    }
55313}
55314impl UniqueGift {
55315    pub fn noskip(self) -> NoSkipUniqueGift {
55316        self.into()
55317    }
55318}
55319#[allow(rustdoc::invalid_html_tags)]
55320#[doc = "This object describes a unique gift that was upgraded from a regular gift."]
55321#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55322pub struct UniqueGiftBuilder {
55323    #[allow(rustdoc::invalid_html_tags)]
55324    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
55325    #[serde(rename = "base_name")]
55326    pub base_name: String,
55327    #[allow(rustdoc::invalid_html_tags)]
55328    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
55329    #[serde(rename = "name")]
55330    pub name: String,
55331    #[allow(rustdoc::invalid_html_tags)]
55332    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
55333    #[serde(rename = "number")]
55334    pub number: i64,
55335    #[allow(rustdoc::invalid_html_tags)]
55336    #[doc = "Model of the gift"]
55337    #[serde(rename = "model")]
55338    pub model: BoxWrapper<Unbox<UniqueGiftModel>>,
55339    #[allow(rustdoc::invalid_html_tags)]
55340    #[doc = "Symbol of the gift"]
55341    #[serde(rename = "symbol")]
55342    pub symbol: BoxWrapper<Unbox<UniqueGiftSymbol>>,
55343    #[allow(rustdoc::invalid_html_tags)]
55344    #[doc = "Backdrop of the gift"]
55345    #[serde(rename = "backdrop")]
55346    pub backdrop: BoxWrapper<Unbox<UniqueGiftBackdrop>>,
55347    #[allow(rustdoc::invalid_html_tags)]
55348    #[doc = "Optional. Information about the chat that published the gift"]
55349    #[serde(
55350        skip_serializing_if = "Option::is_none",
55351        rename = "publisher_chat",
55352        default
55353    )]
55354    pub publisher_chat: Option<BoxWrapper<Unbox<Chat>>>,
55355}
55356impl UniqueGiftBuilder {
55357    #[allow(clippy::too_many_arguments)]
55358    pub fn new<A: Into<UniqueGiftModel>, B: Into<UniqueGiftSymbol>, C: Into<UniqueGiftBackdrop>>(
55359        base_name: String,
55360        name: String,
55361        number: i64,
55362        model: A,
55363        symbol: B,
55364        backdrop: C,
55365    ) -> Self {
55366        Self {
55367            base_name,
55368            name,
55369            number,
55370            model: BoxWrapper::new_unbox(model.into()),
55371            symbol: BoxWrapper::new_unbox(symbol.into()),
55372            backdrop: BoxWrapper::new_unbox(backdrop.into()),
55373            publisher_chat: None,
55374        }
55375    }
55376    #[allow(rustdoc::invalid_html_tags)]
55377    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
55378    pub fn set_base_name(mut self, base_name: String) -> Self {
55379        self.base_name = base_name;
55380        self
55381    }
55382    #[allow(rustdoc::invalid_html_tags)]
55383    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
55384    pub fn set_name(mut self, name: String) -> Self {
55385        self.name = name;
55386        self
55387    }
55388    #[allow(rustdoc::invalid_html_tags)]
55389    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
55390    pub fn set_number(mut self, number: i64) -> Self {
55391        self.number = number;
55392        self
55393    }
55394    #[allow(rustdoc::invalid_html_tags)]
55395    #[doc = "Model of the gift"]
55396    pub fn set_model(mut self, model: UniqueGiftModel) -> Self {
55397        self.model = BoxWrapper(Unbox(model));
55398        self
55399    }
55400    #[allow(rustdoc::invalid_html_tags)]
55401    #[doc = "Symbol of the gift"]
55402    pub fn set_symbol(mut self, symbol: UniqueGiftSymbol) -> Self {
55403        self.symbol = BoxWrapper(Unbox(symbol));
55404        self
55405    }
55406    #[allow(rustdoc::invalid_html_tags)]
55407    #[doc = "Backdrop of the gift"]
55408    pub fn set_backdrop(mut self, backdrop: UniqueGiftBackdrop) -> Self {
55409        self.backdrop = BoxWrapper(Unbox(backdrop));
55410        self
55411    }
55412    #[allow(rustdoc::invalid_html_tags)]
55413    #[doc = "Optional. Information about the chat that published the gift"]
55414    pub fn set_publisher_chat(mut self, publisher_chat: Chat) -> Self {
55415        self.publisher_chat = Some(BoxWrapper(Unbox(publisher_chat)));
55416        self
55417    }
55418    pub fn build(self) -> UniqueGift {
55419        UniqueGift {
55420            base_name: self.base_name,
55421            name: self.name,
55422            number: self.number,
55423            model: self.model,
55424            symbol: self.symbol,
55425            backdrop: self.backdrop,
55426            publisher_chat: self.publisher_chat,
55427        }
55428    }
55429}
55430#[allow(rustdoc::invalid_html_tags)]
55431#[doc = "Represents a menu button, which opens the bot's list of commands."]
55432#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55433pub struct MenuButtonCommands {
55434    #[allow(rustdoc::invalid_html_tags)]
55435    #[doc = "Type of the button, must be commands"]
55436    #[serde(rename = "type")]
55437    pub tg_type: String,
55438}
55439#[allow(rustdoc::invalid_html_tags)]
55440#[doc = "Companion type to MenuButtonCommands that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55441#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55442pub struct NoSkipMenuButtonCommands {
55443    #[allow(rustdoc::invalid_html_tags)]
55444    #[doc = "Type of the button, must be commands"]
55445    #[serde(rename = "type")]
55446    pub tg_type: String,
55447}
55448impl From<NoSkipMenuButtonCommands> for MenuButtonCommands {
55449    fn from(t: NoSkipMenuButtonCommands) -> Self {
55450        Self { tg_type: t.tg_type }
55451    }
55452}
55453#[allow(clippy::from_over_into)]
55454impl Into<NoSkipMenuButtonCommands> for MenuButtonCommands {
55455    fn into(self) -> NoSkipMenuButtonCommands {
55456        NoSkipMenuButtonCommands {
55457            tg_type: self.tg_type,
55458        }
55459    }
55460}
55461impl NoSkipMenuButtonCommands {
55462    pub fn skip(self) -> MenuButtonCommands {
55463        self.into()
55464    }
55465}
55466impl MenuButtonCommands {
55467    pub fn noskip(self) -> NoSkipMenuButtonCommands {
55468        self.into()
55469    }
55470}
55471#[allow(rustdoc::invalid_html_tags)]
55472#[doc = "Represents a menu button, which opens the bot's list of commands."]
55473#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55474pub struct MenuButtonCommandsBuilder {
55475    #[allow(rustdoc::invalid_html_tags)]
55476    #[doc = "Type of the button, must be commands"]
55477    #[serde(rename = "type")]
55478    pub tg_type: String,
55479}
55480impl MenuButtonCommandsBuilder {
55481    #[allow(clippy::too_many_arguments)]
55482    pub fn new() -> Self {
55483        Self {
55484            tg_type: "commands".to_owned(),
55485        }
55486    }
55487    #[allow(rustdoc::invalid_html_tags)]
55488    #[doc = "Type of the button, must be commands"]
55489    pub fn set_type(mut self, tg_type: String) -> Self {
55490        self.tg_type = tg_type;
55491        self
55492    }
55493    pub fn build(self) -> MenuButtonCommands {
55494        MenuButtonCommands {
55495            tg_type: self.tg_type,
55496        }
55497    }
55498}
55499#[allow(rustdoc::invalid_html_tags)]
55500#[doc = "Describes a transaction with an unknown source or recipient."]
55501#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55502pub struct TransactionPartnerOther {
55503    #[allow(rustdoc::invalid_html_tags)]
55504    #[doc = "Type of the transaction partner, always \"other\""]
55505    #[serde(rename = "type")]
55506    pub tg_type: String,
55507}
55508#[allow(rustdoc::invalid_html_tags)]
55509#[doc = "Companion type to TransactionPartnerOther that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55510#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55511pub struct NoSkipTransactionPartnerOther {
55512    #[allow(rustdoc::invalid_html_tags)]
55513    #[doc = "Type of the transaction partner, always \"other\""]
55514    #[serde(rename = "type")]
55515    pub tg_type: String,
55516}
55517impl From<NoSkipTransactionPartnerOther> for TransactionPartnerOther {
55518    fn from(t: NoSkipTransactionPartnerOther) -> Self {
55519        Self { tg_type: t.tg_type }
55520    }
55521}
55522#[allow(clippy::from_over_into)]
55523impl Into<NoSkipTransactionPartnerOther> for TransactionPartnerOther {
55524    fn into(self) -> NoSkipTransactionPartnerOther {
55525        NoSkipTransactionPartnerOther {
55526            tg_type: self.tg_type,
55527        }
55528    }
55529}
55530impl NoSkipTransactionPartnerOther {
55531    pub fn skip(self) -> TransactionPartnerOther {
55532        self.into()
55533    }
55534}
55535impl TransactionPartnerOther {
55536    pub fn noskip(self) -> NoSkipTransactionPartnerOther {
55537        self.into()
55538    }
55539}
55540#[allow(rustdoc::invalid_html_tags)]
55541#[doc = "Describes a transaction with an unknown source or recipient."]
55542#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55543pub struct TransactionPartnerOtherBuilder {
55544    #[allow(rustdoc::invalid_html_tags)]
55545    #[doc = "Type of the transaction partner, always \"other\""]
55546    #[serde(rename = "type")]
55547    pub tg_type: String,
55548}
55549impl TransactionPartnerOtherBuilder {
55550    #[allow(clippy::too_many_arguments)]
55551    pub fn new() -> Self {
55552        Self {
55553            tg_type: "TransactionPartnerOther".to_owned(),
55554        }
55555    }
55556    #[allow(rustdoc::invalid_html_tags)]
55557    #[doc = "Type of the transaction partner, always \"other\""]
55558    pub fn set_type(mut self, tg_type: String) -> Self {
55559        self.tg_type = tg_type;
55560        self
55561    }
55562    pub fn build(self) -> TransactionPartnerOther {
55563        TransactionPartnerOther {
55564            tg_type: self.tg_type,
55565        }
55566    }
55567}
55568#[allow(rustdoc::invalid_html_tags)]
55569#[doc = "This object represent a list of gifts."]
55570#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55571pub struct Gifts {
55572    #[allow(rustdoc::invalid_html_tags)]
55573    #[doc = "The list of gifts"]
55574    #[serde(rename = "gifts")]
55575    pub gifts: Vec<Gift>,
55576}
55577#[allow(rustdoc::invalid_html_tags)]
55578#[doc = "Companion type to Gifts that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55579#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55580pub struct NoSkipGifts {
55581    #[allow(rustdoc::invalid_html_tags)]
55582    #[doc = "The list of gifts"]
55583    #[serde(rename = "gifts")]
55584    pub gifts: Vec<Gift>,
55585}
55586impl From<NoSkipGifts> for Gifts {
55587    fn from(t: NoSkipGifts) -> Self {
55588        Self { gifts: t.gifts }
55589    }
55590}
55591#[allow(clippy::from_over_into)]
55592impl Into<NoSkipGifts> for Gifts {
55593    fn into(self) -> NoSkipGifts {
55594        NoSkipGifts { gifts: self.gifts }
55595    }
55596}
55597impl NoSkipGifts {
55598    pub fn skip(self) -> Gifts {
55599        self.into()
55600    }
55601}
55602impl Gifts {
55603    pub fn noskip(self) -> NoSkipGifts {
55604        self.into()
55605    }
55606}
55607#[allow(rustdoc::invalid_html_tags)]
55608#[doc = "This object represent a list of gifts."]
55609#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55610pub struct GiftsBuilder {
55611    #[allow(rustdoc::invalid_html_tags)]
55612    #[doc = "The list of gifts"]
55613    #[serde(rename = "gifts")]
55614    pub gifts: Vec<Gift>,
55615}
55616impl GiftsBuilder {
55617    #[allow(clippy::too_many_arguments)]
55618    pub fn new(gifts: Vec<Gift>) -> Self {
55619        Self { gifts }
55620    }
55621    #[allow(rustdoc::invalid_html_tags)]
55622    #[doc = "The list of gifts"]
55623    pub fn set_gifts(mut self, gifts: Vec<Gift>) -> Self {
55624        self.gifts = gifts;
55625        self
55626    }
55627    pub fn build(self) -> Gifts {
55628        Gifts { gifts: self.gifts }
55629    }
55630}
55631#[allow(rustdoc::invalid_html_tags)]
55632#[doc = "This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile."]
55633#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55634pub struct File {
55635    #[allow(rustdoc::invalid_html_tags)]
55636    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
55637    #[serde(rename = "file_id")]
55638    pub file_id: String,
55639    #[allow(rustdoc::invalid_html_tags)]
55640    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
55641    #[serde(rename = "file_unique_id")]
55642    pub file_unique_id: String,
55643    #[allow(rustdoc::invalid_html_tags)]
55644    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
55645    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
55646    pub file_size: Option<i64>,
55647    #[allow(rustdoc::invalid_html_tags)]
55648    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
55649    #[serde(skip_serializing_if = "Option::is_none", rename = "file_path", default)]
55650    pub file_path: Option<String>,
55651}
55652#[allow(rustdoc::invalid_html_tags)]
55653#[doc = "Companion type to File that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55654#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55655pub struct NoSkipFile {
55656    #[allow(rustdoc::invalid_html_tags)]
55657    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
55658    #[serde(rename = "file_id")]
55659    pub file_id: String,
55660    #[allow(rustdoc::invalid_html_tags)]
55661    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
55662    #[serde(rename = "file_unique_id")]
55663    pub file_unique_id: String,
55664    pub file_size: Option<i64>,
55665    pub file_path: Option<String>,
55666}
55667impl From<NoSkipFile> for File {
55668    fn from(t: NoSkipFile) -> Self {
55669        Self {
55670            file_id: t.file_id,
55671            file_unique_id: t.file_unique_id,
55672            file_size: t.file_size,
55673            file_path: t.file_path,
55674        }
55675    }
55676}
55677#[allow(clippy::from_over_into)]
55678impl Into<NoSkipFile> for File {
55679    fn into(self) -> NoSkipFile {
55680        NoSkipFile {
55681            file_id: self.file_id,
55682            file_unique_id: self.file_unique_id,
55683            file_size: self.file_size,
55684            file_path: self.file_path,
55685        }
55686    }
55687}
55688impl NoSkipFile {
55689    pub fn skip(self) -> File {
55690        self.into()
55691    }
55692}
55693impl File {
55694    pub fn noskip(self) -> NoSkipFile {
55695        self.into()
55696    }
55697}
55698#[allow(rustdoc::invalid_html_tags)]
55699#[doc = "This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile."]
55700#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55701pub struct FileBuilder {
55702    #[allow(rustdoc::invalid_html_tags)]
55703    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
55704    #[serde(rename = "file_id")]
55705    pub file_id: String,
55706    #[allow(rustdoc::invalid_html_tags)]
55707    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
55708    #[serde(rename = "file_unique_id")]
55709    pub file_unique_id: String,
55710    #[allow(rustdoc::invalid_html_tags)]
55711    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
55712    #[serde(skip_serializing_if = "Option::is_none", rename = "file_size", default)]
55713    pub file_size: Option<i64>,
55714    #[allow(rustdoc::invalid_html_tags)]
55715    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
55716    #[serde(skip_serializing_if = "Option::is_none", rename = "file_path", default)]
55717    pub file_path: Option<String>,
55718}
55719impl FileBuilder {
55720    #[allow(clippy::too_many_arguments)]
55721    pub fn new(file_id: String, file_unique_id: String) -> Self {
55722        Self {
55723            file_id,
55724            file_unique_id,
55725            file_size: None,
55726            file_path: None,
55727        }
55728    }
55729    #[allow(rustdoc::invalid_html_tags)]
55730    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
55731    pub fn set_file_id(mut self, file_id: String) -> Self {
55732        self.file_id = file_id;
55733        self
55734    }
55735    #[allow(rustdoc::invalid_html_tags)]
55736    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
55737    pub fn set_file_unique_id(mut self, file_unique_id: String) -> Self {
55738        self.file_unique_id = file_unique_id;
55739        self
55740    }
55741    #[allow(rustdoc::invalid_html_tags)]
55742    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
55743    pub fn set_file_size(mut self, file_size: i64) -> Self {
55744        self.file_size = Some(file_size);
55745        self
55746    }
55747    #[allow(rustdoc::invalid_html_tags)]
55748    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
55749    pub fn set_file_path(mut self, file_path: String) -> Self {
55750        self.file_path = Some(file_path);
55751        self
55752    }
55753    pub fn build(self) -> File {
55754        File {
55755            file_id: self.file_id,
55756            file_unique_id: self.file_unique_id,
55757            file_size: self.file_size,
55758            file_path: self.file_path,
55759        }
55760    }
55761}
55762#[allow(rustdoc::invalid_html_tags)]
55763#[doc = "Describes the birthdate of a user."]
55764#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55765pub struct Birthdate {
55766    #[allow(rustdoc::invalid_html_tags)]
55767    #[doc = "Day of the user's birth; 1-31"]
55768    #[serde(rename = "day")]
55769    pub day: i64,
55770    #[allow(rustdoc::invalid_html_tags)]
55771    #[doc = "Month of the user's birth; 1-12"]
55772    #[serde(rename = "month")]
55773    pub month: i64,
55774    #[allow(rustdoc::invalid_html_tags)]
55775    #[doc = "Optional. Year of the user's birth"]
55776    #[serde(skip_serializing_if = "Option::is_none", rename = "year", default)]
55777    pub year: Option<i64>,
55778}
55779#[allow(rustdoc::invalid_html_tags)]
55780#[doc = "Companion type to Birthdate that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55781#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55782pub struct NoSkipBirthdate {
55783    #[allow(rustdoc::invalid_html_tags)]
55784    #[doc = "Day of the user's birth; 1-31"]
55785    #[serde(rename = "day")]
55786    pub day: i64,
55787    #[allow(rustdoc::invalid_html_tags)]
55788    #[doc = "Month of the user's birth; 1-12"]
55789    #[serde(rename = "month")]
55790    pub month: i64,
55791    pub year: Option<i64>,
55792}
55793impl From<NoSkipBirthdate> for Birthdate {
55794    fn from(t: NoSkipBirthdate) -> Self {
55795        Self {
55796            day: t.day,
55797            month: t.month,
55798            year: t.year,
55799        }
55800    }
55801}
55802#[allow(clippy::from_over_into)]
55803impl Into<NoSkipBirthdate> for Birthdate {
55804    fn into(self) -> NoSkipBirthdate {
55805        NoSkipBirthdate {
55806            day: self.day,
55807            month: self.month,
55808            year: self.year,
55809        }
55810    }
55811}
55812impl NoSkipBirthdate {
55813    pub fn skip(self) -> Birthdate {
55814        self.into()
55815    }
55816}
55817impl Birthdate {
55818    pub fn noskip(self) -> NoSkipBirthdate {
55819        self.into()
55820    }
55821}
55822#[allow(rustdoc::invalid_html_tags)]
55823#[doc = "Describes the birthdate of a user."]
55824#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55825pub struct BirthdateBuilder {
55826    #[allow(rustdoc::invalid_html_tags)]
55827    #[doc = "Day of the user's birth; 1-31"]
55828    #[serde(rename = "day")]
55829    pub day: i64,
55830    #[allow(rustdoc::invalid_html_tags)]
55831    #[doc = "Month of the user's birth; 1-12"]
55832    #[serde(rename = "month")]
55833    pub month: i64,
55834    #[allow(rustdoc::invalid_html_tags)]
55835    #[doc = "Optional. Year of the user's birth"]
55836    #[serde(skip_serializing_if = "Option::is_none", rename = "year", default)]
55837    pub year: Option<i64>,
55838}
55839impl BirthdateBuilder {
55840    #[allow(clippy::too_many_arguments)]
55841    pub fn new(day: i64, month: i64) -> Self {
55842        Self {
55843            day,
55844            month,
55845            year: None,
55846        }
55847    }
55848    #[allow(rustdoc::invalid_html_tags)]
55849    #[doc = "Day of the user's birth; 1-31"]
55850    pub fn set_day(mut self, day: i64) -> Self {
55851        self.day = day;
55852        self
55853    }
55854    #[allow(rustdoc::invalid_html_tags)]
55855    #[doc = "Month of the user's birth; 1-12"]
55856    pub fn set_month(mut self, month: i64) -> Self {
55857        self.month = month;
55858        self
55859    }
55860    #[allow(rustdoc::invalid_html_tags)]
55861    #[doc = "Optional. Year of the user's birth"]
55862    pub fn set_year(mut self, year: i64) -> Self {
55863        self.year = Some(year);
55864        self
55865    }
55866    pub fn build(self) -> Birthdate {
55867        Birthdate {
55868            day: self.day,
55869            month: self.month,
55870            year: self.year,
55871        }
55872    }
55873}
55874#[allow(rustdoc::invalid_html_tags)]
55875#[doc = "Describes a withdrawal transaction to the Telegram Ads platform."]
55876#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55877pub struct TransactionPartnerTelegramAds {
55878    #[allow(rustdoc::invalid_html_tags)]
55879    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
55880    #[serde(rename = "type")]
55881    pub tg_type: String,
55882}
55883#[allow(rustdoc::invalid_html_tags)]
55884#[doc = "Companion type to TransactionPartnerTelegramAds that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
55885#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55886pub struct NoSkipTransactionPartnerTelegramAds {
55887    #[allow(rustdoc::invalid_html_tags)]
55888    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
55889    #[serde(rename = "type")]
55890    pub tg_type: String,
55891}
55892impl From<NoSkipTransactionPartnerTelegramAds> for TransactionPartnerTelegramAds {
55893    fn from(t: NoSkipTransactionPartnerTelegramAds) -> Self {
55894        Self { tg_type: t.tg_type }
55895    }
55896}
55897#[allow(clippy::from_over_into)]
55898impl Into<NoSkipTransactionPartnerTelegramAds> for TransactionPartnerTelegramAds {
55899    fn into(self) -> NoSkipTransactionPartnerTelegramAds {
55900        NoSkipTransactionPartnerTelegramAds {
55901            tg_type: self.tg_type,
55902        }
55903    }
55904}
55905impl NoSkipTransactionPartnerTelegramAds {
55906    pub fn skip(self) -> TransactionPartnerTelegramAds {
55907        self.into()
55908    }
55909}
55910impl TransactionPartnerTelegramAds {
55911    pub fn noskip(self) -> NoSkipTransactionPartnerTelegramAds {
55912        self.into()
55913    }
55914}
55915#[allow(rustdoc::invalid_html_tags)]
55916#[doc = "Describes a withdrawal transaction to the Telegram Ads platform."]
55917#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55918pub struct TransactionPartnerTelegramAdsBuilder {
55919    #[allow(rustdoc::invalid_html_tags)]
55920    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
55921    #[serde(rename = "type")]
55922    pub tg_type: String,
55923}
55924impl TransactionPartnerTelegramAdsBuilder {
55925    #[allow(clippy::too_many_arguments)]
55926    pub fn new() -> Self {
55927        Self {
55928            tg_type: "TransactionPartnerTelegramAds".to_owned(),
55929        }
55930    }
55931    #[allow(rustdoc::invalid_html_tags)]
55932    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
55933    pub fn set_type(mut self, tg_type: String) -> Self {
55934        self.tg_type = tg_type;
55935        self
55936    }
55937    pub fn build(self) -> TransactionPartnerTelegramAds {
55938        TransactionPartnerTelegramAds {
55939            tg_type: self.tg_type,
55940        }
55941    }
55942}
55943#[allow(rustdoc::invalid_html_tags)]
55944#[doc = "Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact."]
55945#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
55946pub struct InlineQueryResultContact {
55947    #[allow(rustdoc::invalid_html_tags)]
55948    #[doc = "Type of the result, must be contact"]
55949    #[serde(rename = "type")]
55950    pub tg_type: String,
55951    #[allow(rustdoc::invalid_html_tags)]
55952    #[doc = "Unique identifier for this result, 1-64 Bytes"]
55953    #[serde(rename = "id")]
55954    pub id: String,
55955    #[allow(rustdoc::invalid_html_tags)]
55956    #[doc = "Contact's phone number"]
55957    #[serde(rename = "phone_number")]
55958    pub phone_number: String,
55959    #[allow(rustdoc::invalid_html_tags)]
55960    #[doc = "Contact's first name"]
55961    #[serde(rename = "first_name")]
55962    pub first_name: String,
55963    #[allow(rustdoc::invalid_html_tags)]
55964    #[doc = "Optional. Contact's last name"]
55965    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
55966    pub last_name: Option<String>,
55967    #[allow(rustdoc::invalid_html_tags)]
55968    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
55969    #[serde(skip_serializing_if = "Option::is_none", rename = "vcard", default)]
55970    pub vcard: Option<String>,
55971    #[allow(rustdoc::invalid_html_tags)]
55972    #[doc = "Optional. Inline keyboard attached to the message"]
55973    #[serde(
55974        skip_serializing_if = "Option::is_none",
55975        rename = "reply_markup",
55976        default
55977    )]
55978    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
55979    #[allow(rustdoc::invalid_html_tags)]
55980    #[doc = "Optional. Content of the message to be sent instead of the contact"]
55981    #[serde(
55982        skip_serializing_if = "Option::is_none",
55983        rename = "input_message_content",
55984        default
55985    )]
55986    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
55987    #[allow(rustdoc::invalid_html_tags)]
55988    #[doc = "Optional. Url of the thumbnail for the result"]
55989    #[serde(
55990        skip_serializing_if = "Option::is_none",
55991        rename = "thumbnail_url",
55992        default
55993    )]
55994    pub thumbnail_url: Option<String>,
55995    #[allow(rustdoc::invalid_html_tags)]
55996    #[doc = "Optional. Thumbnail width"]
55997    #[serde(
55998        skip_serializing_if = "Option::is_none",
55999        rename = "thumbnail_width",
56000        default
56001    )]
56002    pub thumbnail_width: Option<i64>,
56003    #[allow(rustdoc::invalid_html_tags)]
56004    #[doc = "Optional. Thumbnail height"]
56005    #[serde(
56006        skip_serializing_if = "Option::is_none",
56007        rename = "thumbnail_height",
56008        default
56009    )]
56010    pub thumbnail_height: Option<i64>,
56011}
56012#[allow(rustdoc::invalid_html_tags)]
56013#[doc = "Companion type to InlineQueryResultContact that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
56014#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56015pub struct NoSkipInlineQueryResultContact {
56016    #[allow(rustdoc::invalid_html_tags)]
56017    #[doc = "Type of the result, must be contact"]
56018    #[serde(rename = "type")]
56019    pub tg_type: String,
56020    #[allow(rustdoc::invalid_html_tags)]
56021    #[doc = "Unique identifier for this result, 1-64 Bytes"]
56022    #[serde(rename = "id")]
56023    pub id: String,
56024    #[allow(rustdoc::invalid_html_tags)]
56025    #[doc = "Contact's phone number"]
56026    #[serde(rename = "phone_number")]
56027    pub phone_number: String,
56028    #[allow(rustdoc::invalid_html_tags)]
56029    #[doc = "Contact's first name"]
56030    #[serde(rename = "first_name")]
56031    pub first_name: String,
56032    pub last_name: Option<String>,
56033    pub vcard: Option<String>,
56034    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
56035    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
56036    pub thumbnail_url: Option<String>,
56037    pub thumbnail_width: Option<i64>,
56038    pub thumbnail_height: Option<i64>,
56039}
56040impl From<NoSkipInlineQueryResultContact> for InlineQueryResultContact {
56041    fn from(t: NoSkipInlineQueryResultContact) -> Self {
56042        Self {
56043            tg_type: t.tg_type,
56044            id: t.id,
56045            phone_number: t.phone_number,
56046            first_name: t.first_name,
56047            last_name: t.last_name,
56048            vcard: t.vcard,
56049            reply_markup: t.reply_markup,
56050            input_message_content: t.input_message_content,
56051            thumbnail_url: t.thumbnail_url,
56052            thumbnail_width: t.thumbnail_width,
56053            thumbnail_height: t.thumbnail_height,
56054        }
56055    }
56056}
56057#[allow(clippy::from_over_into)]
56058impl Into<NoSkipInlineQueryResultContact> for InlineQueryResultContact {
56059    fn into(self) -> NoSkipInlineQueryResultContact {
56060        NoSkipInlineQueryResultContact {
56061            tg_type: self.tg_type,
56062            id: self.id,
56063            phone_number: self.phone_number,
56064            first_name: self.first_name,
56065            last_name: self.last_name,
56066            vcard: self.vcard,
56067            reply_markup: self.reply_markup,
56068            input_message_content: self.input_message_content,
56069            thumbnail_url: self.thumbnail_url,
56070            thumbnail_width: self.thumbnail_width,
56071            thumbnail_height: self.thumbnail_height,
56072        }
56073    }
56074}
56075impl NoSkipInlineQueryResultContact {
56076    pub fn skip(self) -> InlineQueryResultContact {
56077        self.into()
56078    }
56079}
56080impl InlineQueryResultContact {
56081    pub fn noskip(self) -> NoSkipInlineQueryResultContact {
56082        self.into()
56083    }
56084}
56085#[allow(rustdoc::invalid_html_tags)]
56086#[doc = "Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact."]
56087#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56088pub struct InlineQueryResultContactBuilder {
56089    #[allow(rustdoc::invalid_html_tags)]
56090    #[doc = "Type of the result, must be contact"]
56091    #[serde(rename = "type")]
56092    pub tg_type: String,
56093    #[allow(rustdoc::invalid_html_tags)]
56094    #[doc = "Unique identifier for this result, 1-64 Bytes"]
56095    #[serde(rename = "id")]
56096    pub id: String,
56097    #[allow(rustdoc::invalid_html_tags)]
56098    #[doc = "Contact's phone number"]
56099    #[serde(rename = "phone_number")]
56100    pub phone_number: String,
56101    #[allow(rustdoc::invalid_html_tags)]
56102    #[doc = "Contact's first name"]
56103    #[serde(rename = "first_name")]
56104    pub first_name: String,
56105    #[allow(rustdoc::invalid_html_tags)]
56106    #[doc = "Optional. Contact's last name"]
56107    #[serde(skip_serializing_if = "Option::is_none", rename = "last_name", default)]
56108    pub last_name: Option<String>,
56109    #[allow(rustdoc::invalid_html_tags)]
56110    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
56111    #[serde(skip_serializing_if = "Option::is_none", rename = "vcard", default)]
56112    pub vcard: Option<String>,
56113    #[allow(rustdoc::invalid_html_tags)]
56114    #[doc = "Optional. Inline keyboard attached to the message"]
56115    #[serde(
56116        skip_serializing_if = "Option::is_none",
56117        rename = "reply_markup",
56118        default
56119    )]
56120    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
56121    #[allow(rustdoc::invalid_html_tags)]
56122    #[doc = "Optional. Content of the message to be sent instead of the contact"]
56123    #[serde(
56124        skip_serializing_if = "Option::is_none",
56125        rename = "input_message_content",
56126        default
56127    )]
56128    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
56129    #[allow(rustdoc::invalid_html_tags)]
56130    #[doc = "Optional. Url of the thumbnail for the result"]
56131    #[serde(
56132        skip_serializing_if = "Option::is_none",
56133        rename = "thumbnail_url",
56134        default
56135    )]
56136    pub thumbnail_url: Option<String>,
56137    #[allow(rustdoc::invalid_html_tags)]
56138    #[doc = "Optional. Thumbnail width"]
56139    #[serde(
56140        skip_serializing_if = "Option::is_none",
56141        rename = "thumbnail_width",
56142        default
56143    )]
56144    pub thumbnail_width: Option<i64>,
56145    #[allow(rustdoc::invalid_html_tags)]
56146    #[doc = "Optional. Thumbnail height"]
56147    #[serde(
56148        skip_serializing_if = "Option::is_none",
56149        rename = "thumbnail_height",
56150        default
56151    )]
56152    pub thumbnail_height: Option<i64>,
56153}
56154impl InlineQueryResultContactBuilder {
56155    #[allow(clippy::too_many_arguments)]
56156    pub fn new(id: String, phone_number: String, first_name: String) -> Self {
56157        Self {
56158            tg_type: "contact".to_owned(),
56159            id,
56160            phone_number,
56161            first_name,
56162            last_name: None,
56163            vcard: None,
56164            reply_markup: None,
56165            input_message_content: None,
56166            thumbnail_url: None,
56167            thumbnail_width: None,
56168            thumbnail_height: None,
56169        }
56170    }
56171    #[allow(rustdoc::invalid_html_tags)]
56172    #[doc = "Type of the result, must be contact"]
56173    pub fn set_type(mut self, tg_type: String) -> Self {
56174        self.tg_type = tg_type;
56175        self
56176    }
56177    #[allow(rustdoc::invalid_html_tags)]
56178    #[doc = "Unique identifier for this result, 1-64 Bytes"]
56179    pub fn set_id(mut self, id: String) -> Self {
56180        self.id = id;
56181        self
56182    }
56183    #[allow(rustdoc::invalid_html_tags)]
56184    #[doc = "Contact's phone number"]
56185    pub fn set_phone_number(mut self, phone_number: String) -> Self {
56186        self.phone_number = phone_number;
56187        self
56188    }
56189    #[allow(rustdoc::invalid_html_tags)]
56190    #[doc = "Contact's first name"]
56191    pub fn set_first_name(mut self, first_name: String) -> Self {
56192        self.first_name = first_name;
56193        self
56194    }
56195    #[allow(rustdoc::invalid_html_tags)]
56196    #[doc = "Optional. Contact's last name"]
56197    pub fn set_last_name(mut self, last_name: String) -> Self {
56198        self.last_name = Some(last_name);
56199        self
56200    }
56201    #[allow(rustdoc::invalid_html_tags)]
56202    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
56203    pub fn set_vcard(mut self, vcard: String) -> Self {
56204        self.vcard = Some(vcard);
56205        self
56206    }
56207    #[allow(rustdoc::invalid_html_tags)]
56208    #[doc = "Optional. Inline keyboard attached to the message"]
56209    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
56210        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
56211        self
56212    }
56213    #[allow(rustdoc::invalid_html_tags)]
56214    #[doc = "Optional. Content of the message to be sent instead of the contact"]
56215    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
56216        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
56217        self
56218    }
56219    #[allow(rustdoc::invalid_html_tags)]
56220    #[doc = "Optional. Url of the thumbnail for the result"]
56221    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
56222        self.thumbnail_url = Some(thumbnail_url);
56223        self
56224    }
56225    #[allow(rustdoc::invalid_html_tags)]
56226    #[doc = "Optional. Thumbnail width"]
56227    pub fn set_thumbnail_width(mut self, thumbnail_width: i64) -> Self {
56228        self.thumbnail_width = Some(thumbnail_width);
56229        self
56230    }
56231    #[allow(rustdoc::invalid_html_tags)]
56232    #[doc = "Optional. Thumbnail height"]
56233    pub fn set_thumbnail_height(mut self, thumbnail_height: i64) -> Self {
56234        self.thumbnail_height = Some(thumbnail_height);
56235        self
56236    }
56237    pub fn build(self) -> InlineQueryResultContact {
56238        InlineQueryResultContact {
56239            tg_type: self.tg_type,
56240            id: self.id,
56241            phone_number: self.phone_number,
56242            first_name: self.first_name,
56243            last_name: self.last_name,
56244            vcard: self.vcard,
56245            reply_markup: self.reply_markup,
56246            input_message_content: self.input_message_content,
56247            thumbnail_url: self.thumbnail_url,
56248            thumbnail_width: self.thumbnail_width,
56249            thumbnail_height: self.thumbnail_height,
56250        }
56251    }
56252}
56253#[allow(rustdoc::invalid_html_tags)]
56254#[doc = "Represents a chat member that is under certain restrictions in the chat. Supergroups only."]
56255#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56256pub struct ChatMemberRestricted {
56257    #[allow(rustdoc::invalid_html_tags)]
56258    #[doc = "Information about the user"]
56259    #[serde(rename = "user")]
56260    pub user: BoxWrapper<Unbox<User>>,
56261    #[allow(rustdoc::invalid_html_tags)]
56262    #[doc = "True, if the user is a member of the chat at the moment of the request"]
56263    #[serde(rename = "is_member")]
56264    pub is_member: bool,
56265    #[allow(rustdoc::invalid_html_tags)]
56266    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
56267    #[serde(rename = "can_send_messages")]
56268    pub can_send_messages: bool,
56269    #[allow(rustdoc::invalid_html_tags)]
56270    #[doc = "True, if the user is allowed to send audios"]
56271    #[serde(rename = "can_send_audios")]
56272    pub can_send_audios: bool,
56273    #[allow(rustdoc::invalid_html_tags)]
56274    #[doc = "True, if the user is allowed to send documents"]
56275    #[serde(rename = "can_send_documents")]
56276    pub can_send_documents: bool,
56277    #[allow(rustdoc::invalid_html_tags)]
56278    #[doc = "True, if the user is allowed to send photos"]
56279    #[serde(rename = "can_send_photos")]
56280    pub can_send_photos: bool,
56281    #[allow(rustdoc::invalid_html_tags)]
56282    #[doc = "True, if the user is allowed to send videos"]
56283    #[serde(rename = "can_send_videos")]
56284    pub can_send_videos: bool,
56285    #[allow(rustdoc::invalid_html_tags)]
56286    #[doc = "True, if the user is allowed to send video notes"]
56287    #[serde(rename = "can_send_video_notes")]
56288    pub can_send_video_notes: bool,
56289    #[allow(rustdoc::invalid_html_tags)]
56290    #[doc = "True, if the user is allowed to send voice notes"]
56291    #[serde(rename = "can_send_voice_notes")]
56292    pub can_send_voice_notes: bool,
56293    #[allow(rustdoc::invalid_html_tags)]
56294    #[doc = "True, if the user is allowed to send polls and checklists"]
56295    #[serde(rename = "can_send_polls")]
56296    pub can_send_polls: bool,
56297    #[allow(rustdoc::invalid_html_tags)]
56298    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
56299    #[serde(rename = "can_send_other_messages")]
56300    pub can_send_other_messages: bool,
56301    #[allow(rustdoc::invalid_html_tags)]
56302    #[doc = "True, if the user is allowed to add web page previews to their messages"]
56303    #[serde(rename = "can_add_web_page_previews")]
56304    pub can_add_web_page_previews: bool,
56305    #[allow(rustdoc::invalid_html_tags)]
56306    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
56307    #[serde(rename = "can_change_info")]
56308    pub can_change_info: bool,
56309    #[allow(rustdoc::invalid_html_tags)]
56310    #[doc = "True, if the user is allowed to invite new users to the chat"]
56311    #[serde(rename = "can_invite_users")]
56312    pub can_invite_users: bool,
56313    #[allow(rustdoc::invalid_html_tags)]
56314    #[doc = "True, if the user is allowed to pin messages"]
56315    #[serde(rename = "can_pin_messages")]
56316    pub can_pin_messages: bool,
56317    #[allow(rustdoc::invalid_html_tags)]
56318    #[doc = "True, if the user is allowed to create forum topics"]
56319    #[serde(rename = "can_manage_topics")]
56320    pub can_manage_topics: bool,
56321    #[allow(rustdoc::invalid_html_tags)]
56322    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
56323    #[serde(rename = "until_date")]
56324    pub until_date: i64,
56325}
56326#[allow(rustdoc::invalid_html_tags)]
56327#[doc = "Companion type to ChatMemberRestricted that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
56328#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56329pub struct NoSkipChatMemberRestricted {
56330    #[allow(rustdoc::invalid_html_tags)]
56331    #[doc = "Information about the user"]
56332    #[serde(rename = "user")]
56333    pub user: BoxWrapper<Unbox<User>>,
56334    #[allow(rustdoc::invalid_html_tags)]
56335    #[doc = "True, if the user is a member of the chat at the moment of the request"]
56336    #[serde(rename = "is_member")]
56337    pub is_member: bool,
56338    #[allow(rustdoc::invalid_html_tags)]
56339    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
56340    #[serde(rename = "can_send_messages")]
56341    pub can_send_messages: bool,
56342    #[allow(rustdoc::invalid_html_tags)]
56343    #[doc = "True, if the user is allowed to send audios"]
56344    #[serde(rename = "can_send_audios")]
56345    pub can_send_audios: bool,
56346    #[allow(rustdoc::invalid_html_tags)]
56347    #[doc = "True, if the user is allowed to send documents"]
56348    #[serde(rename = "can_send_documents")]
56349    pub can_send_documents: bool,
56350    #[allow(rustdoc::invalid_html_tags)]
56351    #[doc = "True, if the user is allowed to send photos"]
56352    #[serde(rename = "can_send_photos")]
56353    pub can_send_photos: bool,
56354    #[allow(rustdoc::invalid_html_tags)]
56355    #[doc = "True, if the user is allowed to send videos"]
56356    #[serde(rename = "can_send_videos")]
56357    pub can_send_videos: bool,
56358    #[allow(rustdoc::invalid_html_tags)]
56359    #[doc = "True, if the user is allowed to send video notes"]
56360    #[serde(rename = "can_send_video_notes")]
56361    pub can_send_video_notes: bool,
56362    #[allow(rustdoc::invalid_html_tags)]
56363    #[doc = "True, if the user is allowed to send voice notes"]
56364    #[serde(rename = "can_send_voice_notes")]
56365    pub can_send_voice_notes: bool,
56366    #[allow(rustdoc::invalid_html_tags)]
56367    #[doc = "True, if the user is allowed to send polls and checklists"]
56368    #[serde(rename = "can_send_polls")]
56369    pub can_send_polls: bool,
56370    #[allow(rustdoc::invalid_html_tags)]
56371    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
56372    #[serde(rename = "can_send_other_messages")]
56373    pub can_send_other_messages: bool,
56374    #[allow(rustdoc::invalid_html_tags)]
56375    #[doc = "True, if the user is allowed to add web page previews to their messages"]
56376    #[serde(rename = "can_add_web_page_previews")]
56377    pub can_add_web_page_previews: bool,
56378    #[allow(rustdoc::invalid_html_tags)]
56379    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
56380    #[serde(rename = "can_change_info")]
56381    pub can_change_info: bool,
56382    #[allow(rustdoc::invalid_html_tags)]
56383    #[doc = "True, if the user is allowed to invite new users to the chat"]
56384    #[serde(rename = "can_invite_users")]
56385    pub can_invite_users: bool,
56386    #[allow(rustdoc::invalid_html_tags)]
56387    #[doc = "True, if the user is allowed to pin messages"]
56388    #[serde(rename = "can_pin_messages")]
56389    pub can_pin_messages: bool,
56390    #[allow(rustdoc::invalid_html_tags)]
56391    #[doc = "True, if the user is allowed to create forum topics"]
56392    #[serde(rename = "can_manage_topics")]
56393    pub can_manage_topics: bool,
56394    #[allow(rustdoc::invalid_html_tags)]
56395    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
56396    #[serde(rename = "until_date")]
56397    pub until_date: i64,
56398}
56399impl From<NoSkipChatMemberRestricted> for ChatMemberRestricted {
56400    fn from(t: NoSkipChatMemberRestricted) -> Self {
56401        Self {
56402            user: t.user,
56403            is_member: t.is_member,
56404            can_send_messages: t.can_send_messages,
56405            can_send_audios: t.can_send_audios,
56406            can_send_documents: t.can_send_documents,
56407            can_send_photos: t.can_send_photos,
56408            can_send_videos: t.can_send_videos,
56409            can_send_video_notes: t.can_send_video_notes,
56410            can_send_voice_notes: t.can_send_voice_notes,
56411            can_send_polls: t.can_send_polls,
56412            can_send_other_messages: t.can_send_other_messages,
56413            can_add_web_page_previews: t.can_add_web_page_previews,
56414            can_change_info: t.can_change_info,
56415            can_invite_users: t.can_invite_users,
56416            can_pin_messages: t.can_pin_messages,
56417            can_manage_topics: t.can_manage_topics,
56418            until_date: t.until_date,
56419        }
56420    }
56421}
56422#[allow(clippy::from_over_into)]
56423impl Into<NoSkipChatMemberRestricted> for ChatMemberRestricted {
56424    fn into(self) -> NoSkipChatMemberRestricted {
56425        NoSkipChatMemberRestricted {
56426            user: self.user,
56427            is_member: self.is_member,
56428            can_send_messages: self.can_send_messages,
56429            can_send_audios: self.can_send_audios,
56430            can_send_documents: self.can_send_documents,
56431            can_send_photos: self.can_send_photos,
56432            can_send_videos: self.can_send_videos,
56433            can_send_video_notes: self.can_send_video_notes,
56434            can_send_voice_notes: self.can_send_voice_notes,
56435            can_send_polls: self.can_send_polls,
56436            can_send_other_messages: self.can_send_other_messages,
56437            can_add_web_page_previews: self.can_add_web_page_previews,
56438            can_change_info: self.can_change_info,
56439            can_invite_users: self.can_invite_users,
56440            can_pin_messages: self.can_pin_messages,
56441            can_manage_topics: self.can_manage_topics,
56442            until_date: self.until_date,
56443        }
56444    }
56445}
56446impl NoSkipChatMemberRestricted {
56447    pub fn skip(self) -> ChatMemberRestricted {
56448        self.into()
56449    }
56450}
56451impl ChatMemberRestricted {
56452    pub fn noskip(self) -> NoSkipChatMemberRestricted {
56453        self.into()
56454    }
56455}
56456#[allow(rustdoc::invalid_html_tags)]
56457#[doc = "Represents a chat member that is under certain restrictions in the chat. Supergroups only."]
56458#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56459pub struct ChatMemberRestrictedBuilder {
56460    #[allow(rustdoc::invalid_html_tags)]
56461    #[doc = "Information about the user"]
56462    #[serde(rename = "user")]
56463    pub user: BoxWrapper<Unbox<User>>,
56464    #[allow(rustdoc::invalid_html_tags)]
56465    #[doc = "True, if the user is a member of the chat at the moment of the request"]
56466    #[serde(rename = "is_member")]
56467    pub is_member: bool,
56468    #[allow(rustdoc::invalid_html_tags)]
56469    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
56470    #[serde(rename = "can_send_messages")]
56471    pub can_send_messages: bool,
56472    #[allow(rustdoc::invalid_html_tags)]
56473    #[doc = "True, if the user is allowed to send audios"]
56474    #[serde(rename = "can_send_audios")]
56475    pub can_send_audios: bool,
56476    #[allow(rustdoc::invalid_html_tags)]
56477    #[doc = "True, if the user is allowed to send documents"]
56478    #[serde(rename = "can_send_documents")]
56479    pub can_send_documents: bool,
56480    #[allow(rustdoc::invalid_html_tags)]
56481    #[doc = "True, if the user is allowed to send photos"]
56482    #[serde(rename = "can_send_photos")]
56483    pub can_send_photos: bool,
56484    #[allow(rustdoc::invalid_html_tags)]
56485    #[doc = "True, if the user is allowed to send videos"]
56486    #[serde(rename = "can_send_videos")]
56487    pub can_send_videos: bool,
56488    #[allow(rustdoc::invalid_html_tags)]
56489    #[doc = "True, if the user is allowed to send video notes"]
56490    #[serde(rename = "can_send_video_notes")]
56491    pub can_send_video_notes: bool,
56492    #[allow(rustdoc::invalid_html_tags)]
56493    #[doc = "True, if the user is allowed to send voice notes"]
56494    #[serde(rename = "can_send_voice_notes")]
56495    pub can_send_voice_notes: bool,
56496    #[allow(rustdoc::invalid_html_tags)]
56497    #[doc = "True, if the user is allowed to send polls and checklists"]
56498    #[serde(rename = "can_send_polls")]
56499    pub can_send_polls: bool,
56500    #[allow(rustdoc::invalid_html_tags)]
56501    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
56502    #[serde(rename = "can_send_other_messages")]
56503    pub can_send_other_messages: bool,
56504    #[allow(rustdoc::invalid_html_tags)]
56505    #[doc = "True, if the user is allowed to add web page previews to their messages"]
56506    #[serde(rename = "can_add_web_page_previews")]
56507    pub can_add_web_page_previews: bool,
56508    #[allow(rustdoc::invalid_html_tags)]
56509    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
56510    #[serde(rename = "can_change_info")]
56511    pub can_change_info: bool,
56512    #[allow(rustdoc::invalid_html_tags)]
56513    #[doc = "True, if the user is allowed to invite new users to the chat"]
56514    #[serde(rename = "can_invite_users")]
56515    pub can_invite_users: bool,
56516    #[allow(rustdoc::invalid_html_tags)]
56517    #[doc = "True, if the user is allowed to pin messages"]
56518    #[serde(rename = "can_pin_messages")]
56519    pub can_pin_messages: bool,
56520    #[allow(rustdoc::invalid_html_tags)]
56521    #[doc = "True, if the user is allowed to create forum topics"]
56522    #[serde(rename = "can_manage_topics")]
56523    pub can_manage_topics: bool,
56524    #[allow(rustdoc::invalid_html_tags)]
56525    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
56526    #[serde(rename = "until_date")]
56527    pub until_date: i64,
56528}
56529impl ChatMemberRestrictedBuilder {
56530    #[allow(clippy::too_many_arguments)]
56531    pub fn new<A: Into<User>>(
56532        user: A,
56533        is_member: bool,
56534        can_send_messages: bool,
56535        can_send_audios: bool,
56536        can_send_documents: bool,
56537        can_send_photos: bool,
56538        can_send_videos: bool,
56539        can_send_video_notes: bool,
56540        can_send_voice_notes: bool,
56541        can_send_polls: bool,
56542        can_send_other_messages: bool,
56543        can_add_web_page_previews: bool,
56544        can_change_info: bool,
56545        can_invite_users: bool,
56546        can_pin_messages: bool,
56547        can_manage_topics: bool,
56548        until_date: i64,
56549    ) -> Self {
56550        Self {
56551            user: BoxWrapper::new_unbox(user.into()),
56552            is_member,
56553            can_send_messages,
56554            can_send_audios,
56555            can_send_documents,
56556            can_send_photos,
56557            can_send_videos,
56558            can_send_video_notes,
56559            can_send_voice_notes,
56560            can_send_polls,
56561            can_send_other_messages,
56562            can_add_web_page_previews,
56563            can_change_info,
56564            can_invite_users,
56565            can_pin_messages,
56566            can_manage_topics,
56567            until_date,
56568        }
56569    }
56570    #[allow(rustdoc::invalid_html_tags)]
56571    #[doc = "Information about the user"]
56572    pub fn set_user(mut self, user: User) -> Self {
56573        self.user = BoxWrapper(Unbox(user));
56574        self
56575    }
56576    #[allow(rustdoc::invalid_html_tags)]
56577    #[doc = "True, if the user is a member of the chat at the moment of the request"]
56578    pub fn set_is_member(mut self, is_member: bool) -> Self {
56579        self.is_member = is_member;
56580        self
56581    }
56582    #[allow(rustdoc::invalid_html_tags)]
56583    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
56584    pub fn set_can_send_messages(mut self, can_send_messages: bool) -> Self {
56585        self.can_send_messages = can_send_messages;
56586        self
56587    }
56588    #[allow(rustdoc::invalid_html_tags)]
56589    #[doc = "True, if the user is allowed to send audios"]
56590    pub fn set_can_send_audios(mut self, can_send_audios: bool) -> Self {
56591        self.can_send_audios = can_send_audios;
56592        self
56593    }
56594    #[allow(rustdoc::invalid_html_tags)]
56595    #[doc = "True, if the user is allowed to send documents"]
56596    pub fn set_can_send_documents(mut self, can_send_documents: bool) -> Self {
56597        self.can_send_documents = can_send_documents;
56598        self
56599    }
56600    #[allow(rustdoc::invalid_html_tags)]
56601    #[doc = "True, if the user is allowed to send photos"]
56602    pub fn set_can_send_photos(mut self, can_send_photos: bool) -> Self {
56603        self.can_send_photos = can_send_photos;
56604        self
56605    }
56606    #[allow(rustdoc::invalid_html_tags)]
56607    #[doc = "True, if the user is allowed to send videos"]
56608    pub fn set_can_send_videos(mut self, can_send_videos: bool) -> Self {
56609        self.can_send_videos = can_send_videos;
56610        self
56611    }
56612    #[allow(rustdoc::invalid_html_tags)]
56613    #[doc = "True, if the user is allowed to send video notes"]
56614    pub fn set_can_send_video_notes(mut self, can_send_video_notes: bool) -> Self {
56615        self.can_send_video_notes = can_send_video_notes;
56616        self
56617    }
56618    #[allow(rustdoc::invalid_html_tags)]
56619    #[doc = "True, if the user is allowed to send voice notes"]
56620    pub fn set_can_send_voice_notes(mut self, can_send_voice_notes: bool) -> Self {
56621        self.can_send_voice_notes = can_send_voice_notes;
56622        self
56623    }
56624    #[allow(rustdoc::invalid_html_tags)]
56625    #[doc = "True, if the user is allowed to send polls and checklists"]
56626    pub fn set_can_send_polls(mut self, can_send_polls: bool) -> Self {
56627        self.can_send_polls = can_send_polls;
56628        self
56629    }
56630    #[allow(rustdoc::invalid_html_tags)]
56631    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
56632    pub fn set_can_send_other_messages(mut self, can_send_other_messages: bool) -> Self {
56633        self.can_send_other_messages = can_send_other_messages;
56634        self
56635    }
56636    #[allow(rustdoc::invalid_html_tags)]
56637    #[doc = "True, if the user is allowed to add web page previews to their messages"]
56638    pub fn set_can_add_web_page_previews(mut self, can_add_web_page_previews: bool) -> Self {
56639        self.can_add_web_page_previews = can_add_web_page_previews;
56640        self
56641    }
56642    #[allow(rustdoc::invalid_html_tags)]
56643    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
56644    pub fn set_can_change_info(mut self, can_change_info: bool) -> Self {
56645        self.can_change_info = can_change_info;
56646        self
56647    }
56648    #[allow(rustdoc::invalid_html_tags)]
56649    #[doc = "True, if the user is allowed to invite new users to the chat"]
56650    pub fn set_can_invite_users(mut self, can_invite_users: bool) -> Self {
56651        self.can_invite_users = can_invite_users;
56652        self
56653    }
56654    #[allow(rustdoc::invalid_html_tags)]
56655    #[doc = "True, if the user is allowed to pin messages"]
56656    pub fn set_can_pin_messages(mut self, can_pin_messages: bool) -> Self {
56657        self.can_pin_messages = can_pin_messages;
56658        self
56659    }
56660    #[allow(rustdoc::invalid_html_tags)]
56661    #[doc = "True, if the user is allowed to create forum topics"]
56662    pub fn set_can_manage_topics(mut self, can_manage_topics: bool) -> Self {
56663        self.can_manage_topics = can_manage_topics;
56664        self
56665    }
56666    #[allow(rustdoc::invalid_html_tags)]
56667    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
56668    pub fn set_until_date(mut self, until_date: i64) -> Self {
56669        self.until_date = until_date;
56670        self
56671    }
56672    pub fn build(self) -> ChatMemberRestricted {
56673        ChatMemberRestricted {
56674            user: self.user,
56675            is_member: self.is_member,
56676            can_send_messages: self.can_send_messages,
56677            can_send_audios: self.can_send_audios,
56678            can_send_documents: self.can_send_documents,
56679            can_send_photos: self.can_send_photos,
56680            can_send_videos: self.can_send_videos,
56681            can_send_video_notes: self.can_send_video_notes,
56682            can_send_voice_notes: self.can_send_voice_notes,
56683            can_send_polls: self.can_send_polls,
56684            can_send_other_messages: self.can_send_other_messages,
56685            can_add_web_page_previews: self.can_add_web_page_previews,
56686            can_change_info: self.can_change_info,
56687            can_invite_users: self.can_invite_users,
56688            can_pin_messages: self.can_pin_messages,
56689            can_manage_topics: self.can_manage_topics,
56690            until_date: self.until_date,
56691        }
56692    }
56693}
56694#[allow(rustdoc::invalid_html_tags)]
56695#[doc = "Describes the options used for link preview generation."]
56696#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56697pub struct LinkPreviewOptions {
56698    #[allow(rustdoc::invalid_html_tags)]
56699    #[doc = "Optional. True, if the link preview is disabled"]
56700    #[serde(
56701        skip_serializing_if = "Option::is_none",
56702        rename = "is_disabled",
56703        default
56704    )]
56705    pub is_disabled: Option<bool>,
56706    #[allow(rustdoc::invalid_html_tags)]
56707    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
56708    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
56709    pub url: Option<String>,
56710    #[allow(rustdoc::invalid_html_tags)]
56711    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
56712    #[serde(
56713        skip_serializing_if = "Option::is_none",
56714        rename = "prefer_small_media",
56715        default
56716    )]
56717    pub prefer_small_media: Option<bool>,
56718    #[allow(rustdoc::invalid_html_tags)]
56719    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
56720    #[serde(
56721        skip_serializing_if = "Option::is_none",
56722        rename = "prefer_large_media",
56723        default
56724    )]
56725    pub prefer_large_media: Option<bool>,
56726    #[allow(rustdoc::invalid_html_tags)]
56727    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
56728    #[serde(
56729        skip_serializing_if = "Option::is_none",
56730        rename = "show_above_text",
56731        default
56732    )]
56733    pub show_above_text: Option<bool>,
56734}
56735#[allow(rustdoc::invalid_html_tags)]
56736#[doc = "Companion type to LinkPreviewOptions that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
56737#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56738pub struct NoSkipLinkPreviewOptions {
56739    pub is_disabled: Option<bool>,
56740    pub url: Option<String>,
56741    pub prefer_small_media: Option<bool>,
56742    pub prefer_large_media: Option<bool>,
56743    pub show_above_text: Option<bool>,
56744}
56745impl From<NoSkipLinkPreviewOptions> for LinkPreviewOptions {
56746    fn from(t: NoSkipLinkPreviewOptions) -> Self {
56747        Self {
56748            is_disabled: t.is_disabled,
56749            url: t.url,
56750            prefer_small_media: t.prefer_small_media,
56751            prefer_large_media: t.prefer_large_media,
56752            show_above_text: t.show_above_text,
56753        }
56754    }
56755}
56756#[allow(clippy::from_over_into)]
56757impl Into<NoSkipLinkPreviewOptions> for LinkPreviewOptions {
56758    fn into(self) -> NoSkipLinkPreviewOptions {
56759        NoSkipLinkPreviewOptions {
56760            is_disabled: self.is_disabled,
56761            url: self.url,
56762            prefer_small_media: self.prefer_small_media,
56763            prefer_large_media: self.prefer_large_media,
56764            show_above_text: self.show_above_text,
56765        }
56766    }
56767}
56768impl NoSkipLinkPreviewOptions {
56769    pub fn skip(self) -> LinkPreviewOptions {
56770        self.into()
56771    }
56772}
56773impl LinkPreviewOptions {
56774    pub fn noskip(self) -> NoSkipLinkPreviewOptions {
56775        self.into()
56776    }
56777}
56778#[allow(rustdoc::invalid_html_tags)]
56779#[doc = "Describes the options used for link preview generation."]
56780#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56781pub struct LinkPreviewOptionsBuilder {
56782    #[allow(rustdoc::invalid_html_tags)]
56783    #[doc = "Optional. True, if the link preview is disabled"]
56784    #[serde(
56785        skip_serializing_if = "Option::is_none",
56786        rename = "is_disabled",
56787        default
56788    )]
56789    pub is_disabled: Option<bool>,
56790    #[allow(rustdoc::invalid_html_tags)]
56791    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
56792    #[serde(skip_serializing_if = "Option::is_none", rename = "url", default)]
56793    pub url: Option<String>,
56794    #[allow(rustdoc::invalid_html_tags)]
56795    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
56796    #[serde(
56797        skip_serializing_if = "Option::is_none",
56798        rename = "prefer_small_media",
56799        default
56800    )]
56801    pub prefer_small_media: Option<bool>,
56802    #[allow(rustdoc::invalid_html_tags)]
56803    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
56804    #[serde(
56805        skip_serializing_if = "Option::is_none",
56806        rename = "prefer_large_media",
56807        default
56808    )]
56809    pub prefer_large_media: Option<bool>,
56810    #[allow(rustdoc::invalid_html_tags)]
56811    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
56812    #[serde(
56813        skip_serializing_if = "Option::is_none",
56814        rename = "show_above_text",
56815        default
56816    )]
56817    pub show_above_text: Option<bool>,
56818}
56819impl LinkPreviewOptionsBuilder {
56820    #[allow(clippy::too_many_arguments)]
56821    pub fn new() -> Self {
56822        Self {
56823            is_disabled: None,
56824            url: None,
56825            prefer_small_media: None,
56826            prefer_large_media: None,
56827            show_above_text: None,
56828        }
56829    }
56830    #[allow(rustdoc::invalid_html_tags)]
56831    #[doc = "Optional. True, if the link preview is disabled"]
56832    pub fn set_is_disabled(mut self, is_disabled: bool) -> Self {
56833        self.is_disabled = Some(is_disabled);
56834        self
56835    }
56836    #[allow(rustdoc::invalid_html_tags)]
56837    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
56838    pub fn set_url(mut self, url: String) -> Self {
56839        self.url = Some(url);
56840        self
56841    }
56842    #[allow(rustdoc::invalid_html_tags)]
56843    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
56844    pub fn set_prefer_small_media(mut self, prefer_small_media: bool) -> Self {
56845        self.prefer_small_media = Some(prefer_small_media);
56846        self
56847    }
56848    #[allow(rustdoc::invalid_html_tags)]
56849    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
56850    pub fn set_prefer_large_media(mut self, prefer_large_media: bool) -> Self {
56851        self.prefer_large_media = Some(prefer_large_media);
56852        self
56853    }
56854    #[allow(rustdoc::invalid_html_tags)]
56855    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
56856    pub fn set_show_above_text(mut self, show_above_text: bool) -> Self {
56857        self.show_above_text = Some(show_above_text);
56858        self
56859    }
56860    pub fn build(self) -> LinkPreviewOptions {
56861        LinkPreviewOptions {
56862            is_disabled: self.is_disabled,
56863            url: self.url,
56864            prefer_small_media: self.prefer_small_media,
56865            prefer_large_media: self.prefer_large_media,
56866            show_above_text: self.show_above_text,
56867        }
56868    }
56869}
56870#[allow(rustdoc::invalid_html_tags)]
56871#[doc = "Describes an inline message to be sent by a user of a Mini App."]
56872#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56873pub struct PreparedInlineMessage {
56874    #[allow(rustdoc::invalid_html_tags)]
56875    #[doc = "Unique identifier of the prepared message"]
56876    #[serde(rename = "id")]
56877    pub id: String,
56878    #[allow(rustdoc::invalid_html_tags)]
56879    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
56880    #[serde(rename = "expiration_date")]
56881    pub expiration_date: i64,
56882}
56883#[allow(rustdoc::invalid_html_tags)]
56884#[doc = "Companion type to PreparedInlineMessage that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
56885#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56886pub struct NoSkipPreparedInlineMessage {
56887    #[allow(rustdoc::invalid_html_tags)]
56888    #[doc = "Unique identifier of the prepared message"]
56889    #[serde(rename = "id")]
56890    pub id: String,
56891    #[allow(rustdoc::invalid_html_tags)]
56892    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
56893    #[serde(rename = "expiration_date")]
56894    pub expiration_date: i64,
56895}
56896impl From<NoSkipPreparedInlineMessage> for PreparedInlineMessage {
56897    fn from(t: NoSkipPreparedInlineMessage) -> Self {
56898        Self {
56899            id: t.id,
56900            expiration_date: t.expiration_date,
56901        }
56902    }
56903}
56904#[allow(clippy::from_over_into)]
56905impl Into<NoSkipPreparedInlineMessage> for PreparedInlineMessage {
56906    fn into(self) -> NoSkipPreparedInlineMessage {
56907        NoSkipPreparedInlineMessage {
56908            id: self.id,
56909            expiration_date: self.expiration_date,
56910        }
56911    }
56912}
56913impl NoSkipPreparedInlineMessage {
56914    pub fn skip(self) -> PreparedInlineMessage {
56915        self.into()
56916    }
56917}
56918impl PreparedInlineMessage {
56919    pub fn noskip(self) -> NoSkipPreparedInlineMessage {
56920        self.into()
56921    }
56922}
56923#[allow(rustdoc::invalid_html_tags)]
56924#[doc = "Describes an inline message to be sent by a user of a Mini App."]
56925#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56926pub struct PreparedInlineMessageBuilder {
56927    #[allow(rustdoc::invalid_html_tags)]
56928    #[doc = "Unique identifier of the prepared message"]
56929    #[serde(rename = "id")]
56930    pub id: String,
56931    #[allow(rustdoc::invalid_html_tags)]
56932    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
56933    #[serde(rename = "expiration_date")]
56934    pub expiration_date: i64,
56935}
56936impl PreparedInlineMessageBuilder {
56937    #[allow(clippy::too_many_arguments)]
56938    pub fn new(id: String, expiration_date: i64) -> Self {
56939        Self {
56940            id,
56941            expiration_date,
56942        }
56943    }
56944    #[allow(rustdoc::invalid_html_tags)]
56945    #[doc = "Unique identifier of the prepared message"]
56946    pub fn set_id(mut self, id: String) -> Self {
56947        self.id = id;
56948        self
56949    }
56950    #[allow(rustdoc::invalid_html_tags)]
56951    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
56952    pub fn set_expiration_date(mut self, expiration_date: i64) -> Self {
56953        self.expiration_date = expiration_date;
56954        self
56955    }
56956    pub fn build(self) -> PreparedInlineMessage {
56957        PreparedInlineMessage {
56958            id: self.id,
56959            expiration_date: self.expiration_date,
56960        }
56961    }
56962}
56963#[allow(rustdoc::invalid_html_tags)]
56964#[doc = "This object contains information about the quoted part of a message that is replied to by the given message."]
56965#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56966pub struct TextQuote {
56967    #[allow(rustdoc::invalid_html_tags)]
56968    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
56969    #[serde(rename = "text")]
56970    pub text: String,
56971    #[allow(rustdoc::invalid_html_tags)]
56972    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
56973    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
56974    pub entities: Option<Vec<MessageEntity>>,
56975    #[allow(rustdoc::invalid_html_tags)]
56976    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
56977    #[serde(rename = "position")]
56978    pub position: i64,
56979    #[allow(rustdoc::invalid_html_tags)]
56980    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
56981    #[serde(skip_serializing_if = "Option::is_none", rename = "is_manual", default)]
56982    pub is_manual: Option<bool>,
56983}
56984#[allow(rustdoc::invalid_html_tags)]
56985#[doc = "Companion type to TextQuote that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
56986#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
56987pub struct NoSkipTextQuote {
56988    #[allow(rustdoc::invalid_html_tags)]
56989    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
56990    #[serde(rename = "text")]
56991    pub text: String,
56992    pub entities: Option<Vec<MessageEntity>>,
56993    #[allow(rustdoc::invalid_html_tags)]
56994    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
56995    #[serde(rename = "position")]
56996    pub position: i64,
56997    pub is_manual: Option<bool>,
56998}
56999impl From<NoSkipTextQuote> for TextQuote {
57000    fn from(t: NoSkipTextQuote) -> Self {
57001        Self {
57002            text: t.text,
57003            entities: t.entities,
57004            position: t.position,
57005            is_manual: t.is_manual,
57006        }
57007    }
57008}
57009#[allow(clippy::from_over_into)]
57010impl Into<NoSkipTextQuote> for TextQuote {
57011    fn into(self) -> NoSkipTextQuote {
57012        NoSkipTextQuote {
57013            text: self.text,
57014            entities: self.entities,
57015            position: self.position,
57016            is_manual: self.is_manual,
57017        }
57018    }
57019}
57020impl NoSkipTextQuote {
57021    pub fn skip(self) -> TextQuote {
57022        self.into()
57023    }
57024}
57025impl TextQuote {
57026    pub fn noskip(self) -> NoSkipTextQuote {
57027        self.into()
57028    }
57029}
57030#[allow(rustdoc::invalid_html_tags)]
57031#[doc = "This object contains information about the quoted part of a message that is replied to by the given message."]
57032#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57033pub struct TextQuoteBuilder {
57034    #[allow(rustdoc::invalid_html_tags)]
57035    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
57036    #[serde(rename = "text")]
57037    pub text: String,
57038    #[allow(rustdoc::invalid_html_tags)]
57039    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
57040    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
57041    pub entities: Option<Vec<MessageEntity>>,
57042    #[allow(rustdoc::invalid_html_tags)]
57043    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
57044    #[serde(rename = "position")]
57045    pub position: i64,
57046    #[allow(rustdoc::invalid_html_tags)]
57047    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
57048    #[serde(skip_serializing_if = "Option::is_none", rename = "is_manual", default)]
57049    pub is_manual: Option<bool>,
57050}
57051impl TextQuoteBuilder {
57052    #[allow(clippy::too_many_arguments)]
57053    pub fn new(text: String, position: i64) -> Self {
57054        Self {
57055            text,
57056            position,
57057            entities: None,
57058            is_manual: None,
57059        }
57060    }
57061    #[allow(rustdoc::invalid_html_tags)]
57062    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
57063    pub fn set_text(mut self, text: String) -> Self {
57064        self.text = text;
57065        self
57066    }
57067    #[allow(rustdoc::invalid_html_tags)]
57068    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
57069    pub fn set_entities(mut self, entities: Vec<MessageEntity>) -> Self {
57070        self.entities = Some(entities);
57071        self
57072    }
57073    #[allow(rustdoc::invalid_html_tags)]
57074    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
57075    pub fn set_position(mut self, position: i64) -> Self {
57076        self.position = position;
57077        self
57078    }
57079    #[allow(rustdoc::invalid_html_tags)]
57080    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
57081    pub fn set_is_manual(mut self, is_manual: bool) -> Self {
57082        self.is_manual = Some(is_manual);
57083        self
57084    }
57085    pub fn build(self) -> TextQuote {
57086        TextQuote {
57087            text: self.text,
57088            entities: self.entities,
57089            position: self.position,
57090            is_manual: self.is_manual,
57091        }
57092    }
57093}
57094#[allow(rustdoc::invalid_html_tags)]
57095#[doc = "Describes a service message about checklist tasks marked as done or not done."]
57096#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57097pub struct ChecklistTasksDone {
57098    #[allow(rustdoc::invalid_html_tags)]
57099    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
57100    #[serde(
57101        skip_serializing_if = "Option::is_none",
57102        rename = "checklist_message",
57103        default
57104    )]
57105    pub checklist_message: Option<BoxWrapper<Unbox<Message>>>,
57106    #[allow(rustdoc::invalid_html_tags)]
57107    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
57108    #[serde(
57109        skip_serializing_if = "Option::is_none",
57110        rename = "marked_as_done_task_ids",
57111        default
57112    )]
57113    pub marked_as_done_task_ids: Option<Vec<i64>>,
57114    #[allow(rustdoc::invalid_html_tags)]
57115    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
57116    #[serde(
57117        skip_serializing_if = "Option::is_none",
57118        rename = "marked_as_not_done_task_ids",
57119        default
57120    )]
57121    pub marked_as_not_done_task_ids: Option<Vec<i64>>,
57122}
57123#[allow(rustdoc::invalid_html_tags)]
57124#[doc = "Companion type to ChecklistTasksDone that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
57125#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57126pub struct NoSkipChecklistTasksDone {
57127    pub checklist_message: Option<BoxWrapper<Unbox<Message>>>,
57128    pub marked_as_done_task_ids: Option<Vec<i64>>,
57129    pub marked_as_not_done_task_ids: Option<Vec<i64>>,
57130}
57131impl From<NoSkipChecklistTasksDone> for ChecklistTasksDone {
57132    fn from(t: NoSkipChecklistTasksDone) -> Self {
57133        Self {
57134            checklist_message: t.checklist_message,
57135            marked_as_done_task_ids: t.marked_as_done_task_ids,
57136            marked_as_not_done_task_ids: t.marked_as_not_done_task_ids,
57137        }
57138    }
57139}
57140#[allow(clippy::from_over_into)]
57141impl Into<NoSkipChecklistTasksDone> for ChecklistTasksDone {
57142    fn into(self) -> NoSkipChecklistTasksDone {
57143        NoSkipChecklistTasksDone {
57144            checklist_message: self.checklist_message,
57145            marked_as_done_task_ids: self.marked_as_done_task_ids,
57146            marked_as_not_done_task_ids: self.marked_as_not_done_task_ids,
57147        }
57148    }
57149}
57150impl NoSkipChecklistTasksDone {
57151    pub fn skip(self) -> ChecklistTasksDone {
57152        self.into()
57153    }
57154}
57155impl ChecklistTasksDone {
57156    pub fn noskip(self) -> NoSkipChecklistTasksDone {
57157        self.into()
57158    }
57159}
57160#[allow(rustdoc::invalid_html_tags)]
57161#[doc = "Describes a service message about checklist tasks marked as done or not done."]
57162#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57163pub struct ChecklistTasksDoneBuilder {
57164    #[allow(rustdoc::invalid_html_tags)]
57165    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
57166    #[serde(
57167        skip_serializing_if = "Option::is_none",
57168        rename = "checklist_message",
57169        default
57170    )]
57171    pub checklist_message: Option<BoxWrapper<Unbox<Message>>>,
57172    #[allow(rustdoc::invalid_html_tags)]
57173    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
57174    #[serde(
57175        skip_serializing_if = "Option::is_none",
57176        rename = "marked_as_done_task_ids",
57177        default
57178    )]
57179    pub marked_as_done_task_ids: Option<Vec<i64>>,
57180    #[allow(rustdoc::invalid_html_tags)]
57181    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
57182    #[serde(
57183        skip_serializing_if = "Option::is_none",
57184        rename = "marked_as_not_done_task_ids",
57185        default
57186    )]
57187    pub marked_as_not_done_task_ids: Option<Vec<i64>>,
57188}
57189impl ChecklistTasksDoneBuilder {
57190    #[allow(clippy::too_many_arguments)]
57191    pub fn new() -> Self {
57192        Self {
57193            checklist_message: None,
57194            marked_as_done_task_ids: None,
57195            marked_as_not_done_task_ids: None,
57196        }
57197    }
57198    #[allow(rustdoc::invalid_html_tags)]
57199    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
57200    pub fn set_checklist_message(mut self, checklist_message: Message) -> Self {
57201        self.checklist_message = Some(BoxWrapper(Unbox(checklist_message)));
57202        self
57203    }
57204    #[allow(rustdoc::invalid_html_tags)]
57205    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
57206    pub fn set_marked_as_done_task_ids(mut self, marked_as_done_task_ids: Vec<i64>) -> Self {
57207        self.marked_as_done_task_ids = Some(marked_as_done_task_ids);
57208        self
57209    }
57210    #[allow(rustdoc::invalid_html_tags)]
57211    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
57212    pub fn set_marked_as_not_done_task_ids(
57213        mut self,
57214        marked_as_not_done_task_ids: Vec<i64>,
57215    ) -> Self {
57216        self.marked_as_not_done_task_ids = Some(marked_as_not_done_task_ids);
57217        self
57218    }
57219    pub fn build(self) -> ChecklistTasksDone {
57220        ChecklistTasksDone {
57221            checklist_message: self.checklist_message,
57222            marked_as_done_task_ids: self.marked_as_done_task_ids,
57223            marked_as_not_done_task_ids: self.marked_as_not_done_task_ids,
57224        }
57225    }
57226}
57227#[allow(rustdoc::invalid_html_tags)]
57228#[doc = "Describes a video to post as a story."]
57229#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57230pub struct InputStoryContentVideo {
57231    #[allow(rustdoc::invalid_html_tags)]
57232    #[doc = "Type of the content, must be video"]
57233    #[serde(rename = "type")]
57234    pub tg_type: String,
57235    #[allow(rustdoc::invalid_html_tags)]
57236    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
57237    #[serde(rename = "video")]
57238    pub video: String,
57239    #[allow(rustdoc::invalid_html_tags)]
57240    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
57241    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
57242    pub duration: Option<::ordered_float::OrderedFloat<f64>>,
57243    #[allow(rustdoc::invalid_html_tags)]
57244    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
57245    #[serde(
57246        skip_serializing_if = "Option::is_none",
57247        rename = "cover_frame_timestamp",
57248        default
57249    )]
57250    pub cover_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
57251    #[allow(rustdoc::invalid_html_tags)]
57252    #[doc = "Optional. Pass True if the video has no sound"]
57253    #[serde(
57254        skip_serializing_if = "Option::is_none",
57255        rename = "is_animation",
57256        default
57257    )]
57258    pub is_animation: Option<bool>,
57259}
57260#[allow(rustdoc::invalid_html_tags)]
57261#[doc = "Companion type to InputStoryContentVideo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
57262#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57263pub struct NoSkipInputStoryContentVideo {
57264    #[allow(rustdoc::invalid_html_tags)]
57265    #[doc = "Type of the content, must be video"]
57266    #[serde(rename = "type")]
57267    pub tg_type: String,
57268    #[allow(rustdoc::invalid_html_tags)]
57269    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
57270    #[serde(rename = "video")]
57271    pub video: String,
57272    pub duration: Option<::ordered_float::OrderedFloat<f64>>,
57273    pub cover_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
57274    pub is_animation: Option<bool>,
57275}
57276impl From<NoSkipInputStoryContentVideo> for InputStoryContentVideo {
57277    fn from(t: NoSkipInputStoryContentVideo) -> Self {
57278        Self {
57279            tg_type: t.tg_type,
57280            video: t.video,
57281            duration: t.duration,
57282            cover_frame_timestamp: t.cover_frame_timestamp,
57283            is_animation: t.is_animation,
57284        }
57285    }
57286}
57287#[allow(clippy::from_over_into)]
57288impl Into<NoSkipInputStoryContentVideo> for InputStoryContentVideo {
57289    fn into(self) -> NoSkipInputStoryContentVideo {
57290        NoSkipInputStoryContentVideo {
57291            tg_type: self.tg_type,
57292            video: self.video,
57293            duration: self.duration,
57294            cover_frame_timestamp: self.cover_frame_timestamp,
57295            is_animation: self.is_animation,
57296        }
57297    }
57298}
57299impl NoSkipInputStoryContentVideo {
57300    pub fn skip(self) -> InputStoryContentVideo {
57301        self.into()
57302    }
57303}
57304impl InputStoryContentVideo {
57305    pub fn noskip(self) -> NoSkipInputStoryContentVideo {
57306        self.into()
57307    }
57308}
57309#[allow(rustdoc::invalid_html_tags)]
57310#[doc = "Describes a video to post as a story."]
57311#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57312pub struct InputStoryContentVideoBuilder {
57313    #[allow(rustdoc::invalid_html_tags)]
57314    #[doc = "Type of the content, must be video"]
57315    #[serde(rename = "type")]
57316    pub tg_type: String,
57317    #[allow(rustdoc::invalid_html_tags)]
57318    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
57319    #[serde(rename = "video")]
57320    pub video: String,
57321    #[allow(rustdoc::invalid_html_tags)]
57322    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
57323    #[serde(skip_serializing_if = "Option::is_none", rename = "duration", default)]
57324    pub duration: Option<::ordered_float::OrderedFloat<f64>>,
57325    #[allow(rustdoc::invalid_html_tags)]
57326    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
57327    #[serde(
57328        skip_serializing_if = "Option::is_none",
57329        rename = "cover_frame_timestamp",
57330        default
57331    )]
57332    pub cover_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
57333    #[allow(rustdoc::invalid_html_tags)]
57334    #[doc = "Optional. Pass True if the video has no sound"]
57335    #[serde(
57336        skip_serializing_if = "Option::is_none",
57337        rename = "is_animation",
57338        default
57339    )]
57340    pub is_animation: Option<bool>,
57341}
57342impl InputStoryContentVideoBuilder {
57343    #[allow(clippy::too_many_arguments)]
57344    pub fn new(video: String) -> Self {
57345        Self {
57346            tg_type: "video".to_owned(),
57347            video,
57348            duration: None,
57349            cover_frame_timestamp: None,
57350            is_animation: None,
57351        }
57352    }
57353    #[allow(rustdoc::invalid_html_tags)]
57354    #[doc = "Type of the content, must be video"]
57355    pub fn set_type(mut self, tg_type: String) -> Self {
57356        self.tg_type = tg_type;
57357        self
57358    }
57359    #[allow(rustdoc::invalid_html_tags)]
57360    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
57361    pub fn set_video(mut self, video: String) -> Self {
57362        self.video = video;
57363        self
57364    }
57365    #[allow(rustdoc::invalid_html_tags)]
57366    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
57367    pub fn set_duration(mut self, duration: ::ordered_float::OrderedFloat<f64>) -> Self {
57368        self.duration = Some(duration);
57369        self
57370    }
57371    #[allow(rustdoc::invalid_html_tags)]
57372    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
57373    pub fn set_cover_frame_timestamp(
57374        mut self,
57375        cover_frame_timestamp: ::ordered_float::OrderedFloat<f64>,
57376    ) -> Self {
57377        self.cover_frame_timestamp = Some(cover_frame_timestamp);
57378        self
57379    }
57380    #[allow(rustdoc::invalid_html_tags)]
57381    #[doc = "Optional. Pass True if the video has no sound"]
57382    pub fn set_is_animation(mut self, is_animation: bool) -> Self {
57383        self.is_animation = Some(is_animation);
57384        self
57385    }
57386    pub fn build(self) -> InputStoryContentVideo {
57387        InputStoryContentVideo {
57388            tg_type: self.tg_type,
57389            video: self.video,
57390            duration: self.duration,
57391            cover_frame_timestamp: self.cover_frame_timestamp,
57392            is_animation: self.is_animation,
57393        }
57394    }
57395}
57396#[allow(rustdoc::invalid_html_tags)]
57397#[doc = "The background is taken directly from a built-in chat theme."]
57398#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57399pub struct BackgroundTypeChatTheme {
57400    #[allow(rustdoc::invalid_html_tags)]
57401    #[doc = "Type of the background, always \"chat_theme\""]
57402    #[serde(rename = "type")]
57403    pub tg_type: String,
57404    #[allow(rustdoc::invalid_html_tags)]
57405    #[doc = "Name of the chat theme, which is usually an emoji"]
57406    #[serde(rename = "theme_name")]
57407    pub theme_name: String,
57408}
57409#[allow(rustdoc::invalid_html_tags)]
57410#[doc = "Companion type to BackgroundTypeChatTheme that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
57411#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57412pub struct NoSkipBackgroundTypeChatTheme {
57413    #[allow(rustdoc::invalid_html_tags)]
57414    #[doc = "Type of the background, always \"chat_theme\""]
57415    #[serde(rename = "type")]
57416    pub tg_type: String,
57417    #[allow(rustdoc::invalid_html_tags)]
57418    #[doc = "Name of the chat theme, which is usually an emoji"]
57419    #[serde(rename = "theme_name")]
57420    pub theme_name: String,
57421}
57422impl From<NoSkipBackgroundTypeChatTheme> for BackgroundTypeChatTheme {
57423    fn from(t: NoSkipBackgroundTypeChatTheme) -> Self {
57424        Self {
57425            tg_type: t.tg_type,
57426            theme_name: t.theme_name,
57427        }
57428    }
57429}
57430#[allow(clippy::from_over_into)]
57431impl Into<NoSkipBackgroundTypeChatTheme> for BackgroundTypeChatTheme {
57432    fn into(self) -> NoSkipBackgroundTypeChatTheme {
57433        NoSkipBackgroundTypeChatTheme {
57434            tg_type: self.tg_type,
57435            theme_name: self.theme_name,
57436        }
57437    }
57438}
57439impl NoSkipBackgroundTypeChatTheme {
57440    pub fn skip(self) -> BackgroundTypeChatTheme {
57441        self.into()
57442    }
57443}
57444impl BackgroundTypeChatTheme {
57445    pub fn noskip(self) -> NoSkipBackgroundTypeChatTheme {
57446        self.into()
57447    }
57448}
57449#[allow(rustdoc::invalid_html_tags)]
57450#[doc = "The background is taken directly from a built-in chat theme."]
57451#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57452pub struct BackgroundTypeChatThemeBuilder {
57453    #[allow(rustdoc::invalid_html_tags)]
57454    #[doc = "Type of the background, always \"chat_theme\""]
57455    #[serde(rename = "type")]
57456    pub tg_type: String,
57457    #[allow(rustdoc::invalid_html_tags)]
57458    #[doc = "Name of the chat theme, which is usually an emoji"]
57459    #[serde(rename = "theme_name")]
57460    pub theme_name: String,
57461}
57462impl BackgroundTypeChatThemeBuilder {
57463    #[allow(clippy::too_many_arguments)]
57464    pub fn new(theme_name: String) -> Self {
57465        Self {
57466            tg_type: "BackgroundTypeChatTheme".to_owned(),
57467            theme_name,
57468        }
57469    }
57470    #[allow(rustdoc::invalid_html_tags)]
57471    #[doc = "Type of the background, always \"chat_theme\""]
57472    pub fn set_type(mut self, tg_type: String) -> Self {
57473        self.tg_type = tg_type;
57474        self
57475    }
57476    #[allow(rustdoc::invalid_html_tags)]
57477    #[doc = "Name of the chat theme, which is usually an emoji"]
57478    pub fn set_theme_name(mut self, theme_name: String) -> Self {
57479        self.theme_name = theme_name;
57480        self
57481    }
57482    pub fn build(self) -> BackgroundTypeChatTheme {
57483        BackgroundTypeChatTheme {
57484            tg_type: self.tg_type,
57485            theme_name: self.theme_name,
57486        }
57487    }
57488}
57489#[allow(rustdoc::invalid_html_tags)]
57490#[doc = "This object describes a message that was deleted or is otherwise inaccessible to the bot."]
57491#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57492pub struct InaccessibleMessage {
57493    #[allow(rustdoc::invalid_html_tags)]
57494    #[doc = "Chat the message belonged to"]
57495    #[serde(rename = "chat")]
57496    pub chat: BoxWrapper<Unbox<Chat>>,
57497    #[allow(rustdoc::invalid_html_tags)]
57498    #[doc = "Unique message identifier inside the chat"]
57499    #[serde(rename = "message_id")]
57500    pub message_id: i64,
57501    #[allow(rustdoc::invalid_html_tags)]
57502    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
57503    #[serde(rename = "date")]
57504    pub date: i64,
57505}
57506#[allow(rustdoc::invalid_html_tags)]
57507#[doc = "Companion type to InaccessibleMessage that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
57508#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57509pub struct NoSkipInaccessibleMessage {
57510    #[allow(rustdoc::invalid_html_tags)]
57511    #[doc = "Chat the message belonged to"]
57512    #[serde(rename = "chat")]
57513    pub chat: BoxWrapper<Unbox<Chat>>,
57514    #[allow(rustdoc::invalid_html_tags)]
57515    #[doc = "Unique message identifier inside the chat"]
57516    #[serde(rename = "message_id")]
57517    pub message_id: i64,
57518    #[allow(rustdoc::invalid_html_tags)]
57519    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
57520    #[serde(rename = "date")]
57521    pub date: i64,
57522}
57523impl From<NoSkipInaccessibleMessage> for InaccessibleMessage {
57524    fn from(t: NoSkipInaccessibleMessage) -> Self {
57525        Self {
57526            chat: t.chat,
57527            message_id: t.message_id,
57528            date: t.date,
57529        }
57530    }
57531}
57532#[allow(clippy::from_over_into)]
57533impl Into<NoSkipInaccessibleMessage> for InaccessibleMessage {
57534    fn into(self) -> NoSkipInaccessibleMessage {
57535        NoSkipInaccessibleMessage {
57536            chat: self.chat,
57537            message_id: self.message_id,
57538            date: self.date,
57539        }
57540    }
57541}
57542impl NoSkipInaccessibleMessage {
57543    pub fn skip(self) -> InaccessibleMessage {
57544        self.into()
57545    }
57546}
57547impl InaccessibleMessage {
57548    pub fn noskip(self) -> NoSkipInaccessibleMessage {
57549        self.into()
57550    }
57551}
57552#[allow(rustdoc::invalid_html_tags)]
57553#[doc = "This object describes a message that was deleted or is otherwise inaccessible to the bot."]
57554#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57555pub struct InaccessibleMessageBuilder {
57556    #[allow(rustdoc::invalid_html_tags)]
57557    #[doc = "Chat the message belonged to"]
57558    #[serde(rename = "chat")]
57559    pub chat: BoxWrapper<Unbox<Chat>>,
57560    #[allow(rustdoc::invalid_html_tags)]
57561    #[doc = "Unique message identifier inside the chat"]
57562    #[serde(rename = "message_id")]
57563    pub message_id: i64,
57564    #[allow(rustdoc::invalid_html_tags)]
57565    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
57566    #[serde(rename = "date")]
57567    pub date: i64,
57568}
57569impl InaccessibleMessageBuilder {
57570    #[allow(clippy::too_many_arguments)]
57571    pub fn new<A: Into<Chat>>(chat: A, message_id: i64, date: i64) -> Self {
57572        Self {
57573            chat: BoxWrapper::new_unbox(chat.into()),
57574            message_id,
57575            date,
57576        }
57577    }
57578    #[allow(rustdoc::invalid_html_tags)]
57579    #[doc = "Chat the message belonged to"]
57580    pub fn set_chat(mut self, chat: Chat) -> Self {
57581        self.chat = BoxWrapper(Unbox(chat));
57582        self
57583    }
57584    #[allow(rustdoc::invalid_html_tags)]
57585    #[doc = "Unique message identifier inside the chat"]
57586    pub fn set_message_id(mut self, message_id: i64) -> Self {
57587        self.message_id = message_id;
57588        self
57589    }
57590    #[allow(rustdoc::invalid_html_tags)]
57591    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
57592    pub fn set_date(mut self, date: i64) -> Self {
57593        self.date = date;
57594        self
57595    }
57596    pub fn build(self) -> InaccessibleMessage {
57597        InaccessibleMessage {
57598            chat: self.chat,
57599            message_id: self.message_id,
57600            date: self.date,
57601        }
57602    }
57603}
57604#[allow(rustdoc::invalid_html_tags)]
57605#[doc = "Describes a checklist to create."]
57606#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57607pub struct InputChecklist {
57608    #[allow(rustdoc::invalid_html_tags)]
57609    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
57610    #[serde(rename = "title")]
57611    pub title: String,
57612    #[allow(rustdoc::invalid_html_tags)]
57613    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
57614    #[serde(
57615        skip_serializing_if = "Option::is_none",
57616        rename = "parse_mode",
57617        default
57618    )]
57619    pub parse_mode: Option<String>,
57620    #[allow(rustdoc::invalid_html_tags)]
57621    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
57622    #[serde(
57623        skip_serializing_if = "Option::is_none",
57624        rename = "title_entities",
57625        default
57626    )]
57627    pub title_entities: Option<Vec<MessageEntity>>,
57628    #[allow(rustdoc::invalid_html_tags)]
57629    #[doc = "List of 1-30 tasks in the checklist"]
57630    #[serde(rename = "tasks")]
57631    pub tasks: Vec<InputChecklistTask>,
57632    #[allow(rustdoc::invalid_html_tags)]
57633    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
57634    #[serde(
57635        skip_serializing_if = "Option::is_none",
57636        rename = "others_can_add_tasks",
57637        default
57638    )]
57639    pub others_can_add_tasks: Option<bool>,
57640    #[allow(rustdoc::invalid_html_tags)]
57641    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
57642    #[serde(
57643        skip_serializing_if = "Option::is_none",
57644        rename = "others_can_mark_tasks_as_done",
57645        default
57646    )]
57647    pub others_can_mark_tasks_as_done: Option<bool>,
57648}
57649#[allow(rustdoc::invalid_html_tags)]
57650#[doc = "Companion type to InputChecklist that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
57651#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57652pub struct NoSkipInputChecklist {
57653    #[allow(rustdoc::invalid_html_tags)]
57654    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
57655    #[serde(rename = "title")]
57656    pub title: String,
57657    pub parse_mode: Option<String>,
57658    pub title_entities: Option<Vec<MessageEntity>>,
57659    #[allow(rustdoc::invalid_html_tags)]
57660    #[doc = "List of 1-30 tasks in the checklist"]
57661    #[serde(rename = "tasks")]
57662    pub tasks: Vec<InputChecklistTask>,
57663    pub others_can_add_tasks: Option<bool>,
57664    pub others_can_mark_tasks_as_done: Option<bool>,
57665}
57666impl From<NoSkipInputChecklist> for InputChecklist {
57667    fn from(t: NoSkipInputChecklist) -> Self {
57668        Self {
57669            title: t.title,
57670            parse_mode: t.parse_mode,
57671            title_entities: t.title_entities,
57672            tasks: t.tasks,
57673            others_can_add_tasks: t.others_can_add_tasks,
57674            others_can_mark_tasks_as_done: t.others_can_mark_tasks_as_done,
57675        }
57676    }
57677}
57678#[allow(clippy::from_over_into)]
57679impl Into<NoSkipInputChecklist> for InputChecklist {
57680    fn into(self) -> NoSkipInputChecklist {
57681        NoSkipInputChecklist {
57682            title: self.title,
57683            parse_mode: self.parse_mode,
57684            title_entities: self.title_entities,
57685            tasks: self.tasks,
57686            others_can_add_tasks: self.others_can_add_tasks,
57687            others_can_mark_tasks_as_done: self.others_can_mark_tasks_as_done,
57688        }
57689    }
57690}
57691impl NoSkipInputChecklist {
57692    pub fn skip(self) -> InputChecklist {
57693        self.into()
57694    }
57695}
57696impl InputChecklist {
57697    pub fn noskip(self) -> NoSkipInputChecklist {
57698        self.into()
57699    }
57700}
57701#[allow(rustdoc::invalid_html_tags)]
57702#[doc = "Describes a checklist to create."]
57703#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57704pub struct InputChecklistBuilder {
57705    #[allow(rustdoc::invalid_html_tags)]
57706    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
57707    #[serde(rename = "title")]
57708    pub title: String,
57709    #[allow(rustdoc::invalid_html_tags)]
57710    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
57711    #[serde(
57712        skip_serializing_if = "Option::is_none",
57713        rename = "parse_mode",
57714        default
57715    )]
57716    pub parse_mode: Option<String>,
57717    #[allow(rustdoc::invalid_html_tags)]
57718    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
57719    #[serde(
57720        skip_serializing_if = "Option::is_none",
57721        rename = "title_entities",
57722        default
57723    )]
57724    pub title_entities: Option<Vec<MessageEntity>>,
57725    #[allow(rustdoc::invalid_html_tags)]
57726    #[doc = "List of 1-30 tasks in the checklist"]
57727    #[serde(rename = "tasks")]
57728    pub tasks: Vec<InputChecklistTask>,
57729    #[allow(rustdoc::invalid_html_tags)]
57730    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
57731    #[serde(
57732        skip_serializing_if = "Option::is_none",
57733        rename = "others_can_add_tasks",
57734        default
57735    )]
57736    pub others_can_add_tasks: Option<bool>,
57737    #[allow(rustdoc::invalid_html_tags)]
57738    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
57739    #[serde(
57740        skip_serializing_if = "Option::is_none",
57741        rename = "others_can_mark_tasks_as_done",
57742        default
57743    )]
57744    pub others_can_mark_tasks_as_done: Option<bool>,
57745}
57746impl InputChecklistBuilder {
57747    #[allow(clippy::too_many_arguments)]
57748    pub fn new(title: String, tasks: Vec<InputChecklistTask>) -> Self {
57749        Self {
57750            title,
57751            tasks,
57752            parse_mode: None,
57753            title_entities: None,
57754            others_can_add_tasks: None,
57755            others_can_mark_tasks_as_done: None,
57756        }
57757    }
57758    #[allow(rustdoc::invalid_html_tags)]
57759    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
57760    pub fn set_title(mut self, title: String) -> Self {
57761        self.title = title;
57762        self
57763    }
57764    #[allow(rustdoc::invalid_html_tags)]
57765    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
57766    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
57767        self.parse_mode = Some(parse_mode);
57768        self
57769    }
57770    #[allow(rustdoc::invalid_html_tags)]
57771    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
57772    pub fn set_title_entities(mut self, title_entities: Vec<MessageEntity>) -> Self {
57773        self.title_entities = Some(title_entities);
57774        self
57775    }
57776    #[allow(rustdoc::invalid_html_tags)]
57777    #[doc = "List of 1-30 tasks in the checklist"]
57778    pub fn set_tasks(mut self, tasks: Vec<InputChecklistTask>) -> Self {
57779        self.tasks = tasks;
57780        self
57781    }
57782    #[allow(rustdoc::invalid_html_tags)]
57783    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
57784    pub fn set_others_can_add_tasks(mut self, others_can_add_tasks: bool) -> Self {
57785        self.others_can_add_tasks = Some(others_can_add_tasks);
57786        self
57787    }
57788    #[allow(rustdoc::invalid_html_tags)]
57789    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
57790    pub fn set_others_can_mark_tasks_as_done(
57791        mut self,
57792        others_can_mark_tasks_as_done: bool,
57793    ) -> Self {
57794        self.others_can_mark_tasks_as_done = Some(others_can_mark_tasks_as_done);
57795        self
57796    }
57797    pub fn build(self) -> InputChecklist {
57798        InputChecklist {
57799            title: self.title,
57800            parse_mode: self.parse_mode,
57801            title_entities: self.title_entities,
57802            tasks: self.tasks,
57803            others_can_add_tasks: self.others_can_add_tasks,
57804            others_can_mark_tasks_as_done: self.others_can_mark_tasks_as_done,
57805        }
57806    }
57807}
57808#[allow(rustdoc::invalid_html_tags)]
57809#[doc = "Contains information about a suggested post."]
57810#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57811pub struct SuggestedPostInfo {
57812    #[allow(rustdoc::invalid_html_tags)]
57813    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
57814    #[serde(rename = "state")]
57815    pub state: String,
57816    #[allow(rustdoc::invalid_html_tags)]
57817    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
57818    #[serde(skip_serializing_if = "Option::is_none", rename = "price", default)]
57819    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
57820    #[allow(rustdoc::invalid_html_tags)]
57821    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
57822    #[serde(skip_serializing_if = "Option::is_none", rename = "send_date", default)]
57823    pub send_date: Option<i64>,
57824}
57825#[allow(rustdoc::invalid_html_tags)]
57826#[doc = "Companion type to SuggestedPostInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
57827#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57828pub struct NoSkipSuggestedPostInfo {
57829    #[allow(rustdoc::invalid_html_tags)]
57830    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
57831    #[serde(rename = "state")]
57832    pub state: String,
57833    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
57834    pub send_date: Option<i64>,
57835}
57836impl From<NoSkipSuggestedPostInfo> for SuggestedPostInfo {
57837    fn from(t: NoSkipSuggestedPostInfo) -> Self {
57838        Self {
57839            state: t.state,
57840            price: t.price,
57841            send_date: t.send_date,
57842        }
57843    }
57844}
57845#[allow(clippy::from_over_into)]
57846impl Into<NoSkipSuggestedPostInfo> for SuggestedPostInfo {
57847    fn into(self) -> NoSkipSuggestedPostInfo {
57848        NoSkipSuggestedPostInfo {
57849            state: self.state,
57850            price: self.price,
57851            send_date: self.send_date,
57852        }
57853    }
57854}
57855impl NoSkipSuggestedPostInfo {
57856    pub fn skip(self) -> SuggestedPostInfo {
57857        self.into()
57858    }
57859}
57860impl SuggestedPostInfo {
57861    pub fn noskip(self) -> NoSkipSuggestedPostInfo {
57862        self.into()
57863    }
57864}
57865#[allow(rustdoc::invalid_html_tags)]
57866#[doc = "Contains information about a suggested post."]
57867#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57868pub struct SuggestedPostInfoBuilder {
57869    #[allow(rustdoc::invalid_html_tags)]
57870    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
57871    #[serde(rename = "state")]
57872    pub state: String,
57873    #[allow(rustdoc::invalid_html_tags)]
57874    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
57875    #[serde(skip_serializing_if = "Option::is_none", rename = "price", default)]
57876    pub price: Option<BoxWrapper<Unbox<SuggestedPostPrice>>>,
57877    #[allow(rustdoc::invalid_html_tags)]
57878    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
57879    #[serde(skip_serializing_if = "Option::is_none", rename = "send_date", default)]
57880    pub send_date: Option<i64>,
57881}
57882impl SuggestedPostInfoBuilder {
57883    #[allow(clippy::too_many_arguments)]
57884    pub fn new(state: String) -> Self {
57885        Self {
57886            state,
57887            price: None,
57888            send_date: None,
57889        }
57890    }
57891    #[allow(rustdoc::invalid_html_tags)]
57892    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
57893    pub fn set_state(mut self, state: String) -> Self {
57894        self.state = state;
57895        self
57896    }
57897    #[allow(rustdoc::invalid_html_tags)]
57898    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
57899    pub fn set_price(mut self, price: SuggestedPostPrice) -> Self {
57900        self.price = Some(BoxWrapper(Unbox(price)));
57901        self
57902    }
57903    #[allow(rustdoc::invalid_html_tags)]
57904    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
57905    pub fn set_send_date(mut self, send_date: i64) -> Self {
57906        self.send_date = Some(send_date);
57907        self
57908    }
57909    pub fn build(self) -> SuggestedPostInfo {
57910        SuggestedPostInfo {
57911            state: self.state,
57912            price: self.price,
57913            send_date: self.send_date,
57914        }
57915    }
57916}
57917#[allow(rustdoc::invalid_html_tags)]
57918#[doc = "This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query."]
57919#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57920pub struct SwitchInlineQueryChosenChat {
57921    #[allow(rustdoc::invalid_html_tags)]
57922    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
57923    #[serde(skip_serializing_if = "Option::is_none", rename = "query", default)]
57924    pub query: Option<String>,
57925    #[allow(rustdoc::invalid_html_tags)]
57926    #[doc = "Optional. True, if private chats with users can be chosen"]
57927    #[serde(
57928        skip_serializing_if = "Option::is_none",
57929        rename = "allow_user_chats",
57930        default
57931    )]
57932    pub allow_user_chats: Option<bool>,
57933    #[allow(rustdoc::invalid_html_tags)]
57934    #[doc = "Optional. True, if private chats with bots can be chosen"]
57935    #[serde(
57936        skip_serializing_if = "Option::is_none",
57937        rename = "allow_bot_chats",
57938        default
57939    )]
57940    pub allow_bot_chats: Option<bool>,
57941    #[allow(rustdoc::invalid_html_tags)]
57942    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
57943    #[serde(
57944        skip_serializing_if = "Option::is_none",
57945        rename = "allow_group_chats",
57946        default
57947    )]
57948    pub allow_group_chats: Option<bool>,
57949    #[allow(rustdoc::invalid_html_tags)]
57950    #[doc = "Optional. True, if channel chats can be chosen"]
57951    #[serde(
57952        skip_serializing_if = "Option::is_none",
57953        rename = "allow_channel_chats",
57954        default
57955    )]
57956    pub allow_channel_chats: Option<bool>,
57957}
57958#[allow(rustdoc::invalid_html_tags)]
57959#[doc = "Companion type to SwitchInlineQueryChosenChat that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
57960#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
57961pub struct NoSkipSwitchInlineQueryChosenChat {
57962    pub query: Option<String>,
57963    pub allow_user_chats: Option<bool>,
57964    pub allow_bot_chats: Option<bool>,
57965    pub allow_group_chats: Option<bool>,
57966    pub allow_channel_chats: Option<bool>,
57967}
57968impl From<NoSkipSwitchInlineQueryChosenChat> for SwitchInlineQueryChosenChat {
57969    fn from(t: NoSkipSwitchInlineQueryChosenChat) -> Self {
57970        Self {
57971            query: t.query,
57972            allow_user_chats: t.allow_user_chats,
57973            allow_bot_chats: t.allow_bot_chats,
57974            allow_group_chats: t.allow_group_chats,
57975            allow_channel_chats: t.allow_channel_chats,
57976        }
57977    }
57978}
57979#[allow(clippy::from_over_into)]
57980impl Into<NoSkipSwitchInlineQueryChosenChat> for SwitchInlineQueryChosenChat {
57981    fn into(self) -> NoSkipSwitchInlineQueryChosenChat {
57982        NoSkipSwitchInlineQueryChosenChat {
57983            query: self.query,
57984            allow_user_chats: self.allow_user_chats,
57985            allow_bot_chats: self.allow_bot_chats,
57986            allow_group_chats: self.allow_group_chats,
57987            allow_channel_chats: self.allow_channel_chats,
57988        }
57989    }
57990}
57991impl NoSkipSwitchInlineQueryChosenChat {
57992    pub fn skip(self) -> SwitchInlineQueryChosenChat {
57993        self.into()
57994    }
57995}
57996impl SwitchInlineQueryChosenChat {
57997    pub fn noskip(self) -> NoSkipSwitchInlineQueryChosenChat {
57998        self.into()
57999    }
58000}
58001#[allow(rustdoc::invalid_html_tags)]
58002#[doc = "This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query."]
58003#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58004pub struct SwitchInlineQueryChosenChatBuilder {
58005    #[allow(rustdoc::invalid_html_tags)]
58006    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
58007    #[serde(skip_serializing_if = "Option::is_none", rename = "query", default)]
58008    pub query: Option<String>,
58009    #[allow(rustdoc::invalid_html_tags)]
58010    #[doc = "Optional. True, if private chats with users can be chosen"]
58011    #[serde(
58012        skip_serializing_if = "Option::is_none",
58013        rename = "allow_user_chats",
58014        default
58015    )]
58016    pub allow_user_chats: Option<bool>,
58017    #[allow(rustdoc::invalid_html_tags)]
58018    #[doc = "Optional. True, if private chats with bots can be chosen"]
58019    #[serde(
58020        skip_serializing_if = "Option::is_none",
58021        rename = "allow_bot_chats",
58022        default
58023    )]
58024    pub allow_bot_chats: Option<bool>,
58025    #[allow(rustdoc::invalid_html_tags)]
58026    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
58027    #[serde(
58028        skip_serializing_if = "Option::is_none",
58029        rename = "allow_group_chats",
58030        default
58031    )]
58032    pub allow_group_chats: Option<bool>,
58033    #[allow(rustdoc::invalid_html_tags)]
58034    #[doc = "Optional. True, if channel chats can be chosen"]
58035    #[serde(
58036        skip_serializing_if = "Option::is_none",
58037        rename = "allow_channel_chats",
58038        default
58039    )]
58040    pub allow_channel_chats: Option<bool>,
58041}
58042impl SwitchInlineQueryChosenChatBuilder {
58043    #[allow(clippy::too_many_arguments)]
58044    pub fn new() -> Self {
58045        Self {
58046            query: None,
58047            allow_user_chats: None,
58048            allow_bot_chats: None,
58049            allow_group_chats: None,
58050            allow_channel_chats: None,
58051        }
58052    }
58053    #[allow(rustdoc::invalid_html_tags)]
58054    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
58055    pub fn set_query(mut self, query: String) -> Self {
58056        self.query = Some(query);
58057        self
58058    }
58059    #[allow(rustdoc::invalid_html_tags)]
58060    #[doc = "Optional. True, if private chats with users can be chosen"]
58061    pub fn set_allow_user_chats(mut self, allow_user_chats: bool) -> Self {
58062        self.allow_user_chats = Some(allow_user_chats);
58063        self
58064    }
58065    #[allow(rustdoc::invalid_html_tags)]
58066    #[doc = "Optional. True, if private chats with bots can be chosen"]
58067    pub fn set_allow_bot_chats(mut self, allow_bot_chats: bool) -> Self {
58068        self.allow_bot_chats = Some(allow_bot_chats);
58069        self
58070    }
58071    #[allow(rustdoc::invalid_html_tags)]
58072    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
58073    pub fn set_allow_group_chats(mut self, allow_group_chats: bool) -> Self {
58074        self.allow_group_chats = Some(allow_group_chats);
58075        self
58076    }
58077    #[allow(rustdoc::invalid_html_tags)]
58078    #[doc = "Optional. True, if channel chats can be chosen"]
58079    pub fn set_allow_channel_chats(mut self, allow_channel_chats: bool) -> Self {
58080        self.allow_channel_chats = Some(allow_channel_chats);
58081        self
58082    }
58083    pub fn build(self) -> SwitchInlineQueryChosenChat {
58084        SwitchInlineQueryChosenChat {
58085            query: self.query,
58086            allow_user_chats: self.allow_user_chats,
58087            allow_bot_chats: self.allow_bot_chats,
58088            allow_group_chats: self.allow_group_chats,
58089            allow_channel_chats: self.allow_channel_chats,
58090        }
58091    }
58092}
58093#[allow(rustdoc::invalid_html_tags)]
58094#[doc = "This object describes the types of gifts that can be gifted to a user or a chat."]
58095#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58096pub struct AcceptedGiftTypes {
58097    #[allow(rustdoc::invalid_html_tags)]
58098    #[doc = "True, if unlimited regular gifts are accepted"]
58099    #[serde(rename = "unlimited_gifts")]
58100    pub unlimited_gifts: bool,
58101    #[allow(rustdoc::invalid_html_tags)]
58102    #[doc = "True, if limited regular gifts are accepted"]
58103    #[serde(rename = "limited_gifts")]
58104    pub limited_gifts: bool,
58105    #[allow(rustdoc::invalid_html_tags)]
58106    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
58107    #[serde(rename = "unique_gifts")]
58108    pub unique_gifts: bool,
58109    #[allow(rustdoc::invalid_html_tags)]
58110    #[doc = "True, if a Telegram Premium subscription is accepted"]
58111    #[serde(rename = "premium_subscription")]
58112    pub premium_subscription: bool,
58113}
58114#[allow(rustdoc::invalid_html_tags)]
58115#[doc = "Companion type to AcceptedGiftTypes that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
58116#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58117pub struct NoSkipAcceptedGiftTypes {
58118    #[allow(rustdoc::invalid_html_tags)]
58119    #[doc = "True, if unlimited regular gifts are accepted"]
58120    #[serde(rename = "unlimited_gifts")]
58121    pub unlimited_gifts: bool,
58122    #[allow(rustdoc::invalid_html_tags)]
58123    #[doc = "True, if limited regular gifts are accepted"]
58124    #[serde(rename = "limited_gifts")]
58125    pub limited_gifts: bool,
58126    #[allow(rustdoc::invalid_html_tags)]
58127    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
58128    #[serde(rename = "unique_gifts")]
58129    pub unique_gifts: bool,
58130    #[allow(rustdoc::invalid_html_tags)]
58131    #[doc = "True, if a Telegram Premium subscription is accepted"]
58132    #[serde(rename = "premium_subscription")]
58133    pub premium_subscription: bool,
58134}
58135impl From<NoSkipAcceptedGiftTypes> for AcceptedGiftTypes {
58136    fn from(t: NoSkipAcceptedGiftTypes) -> Self {
58137        Self {
58138            unlimited_gifts: t.unlimited_gifts,
58139            limited_gifts: t.limited_gifts,
58140            unique_gifts: t.unique_gifts,
58141            premium_subscription: t.premium_subscription,
58142        }
58143    }
58144}
58145#[allow(clippy::from_over_into)]
58146impl Into<NoSkipAcceptedGiftTypes> for AcceptedGiftTypes {
58147    fn into(self) -> NoSkipAcceptedGiftTypes {
58148        NoSkipAcceptedGiftTypes {
58149            unlimited_gifts: self.unlimited_gifts,
58150            limited_gifts: self.limited_gifts,
58151            unique_gifts: self.unique_gifts,
58152            premium_subscription: self.premium_subscription,
58153        }
58154    }
58155}
58156impl NoSkipAcceptedGiftTypes {
58157    pub fn skip(self) -> AcceptedGiftTypes {
58158        self.into()
58159    }
58160}
58161impl AcceptedGiftTypes {
58162    pub fn noskip(self) -> NoSkipAcceptedGiftTypes {
58163        self.into()
58164    }
58165}
58166#[allow(rustdoc::invalid_html_tags)]
58167#[doc = "This object describes the types of gifts that can be gifted to a user or a chat."]
58168#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58169pub struct AcceptedGiftTypesBuilder {
58170    #[allow(rustdoc::invalid_html_tags)]
58171    #[doc = "True, if unlimited regular gifts are accepted"]
58172    #[serde(rename = "unlimited_gifts")]
58173    pub unlimited_gifts: bool,
58174    #[allow(rustdoc::invalid_html_tags)]
58175    #[doc = "True, if limited regular gifts are accepted"]
58176    #[serde(rename = "limited_gifts")]
58177    pub limited_gifts: bool,
58178    #[allow(rustdoc::invalid_html_tags)]
58179    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
58180    #[serde(rename = "unique_gifts")]
58181    pub unique_gifts: bool,
58182    #[allow(rustdoc::invalid_html_tags)]
58183    #[doc = "True, if a Telegram Premium subscription is accepted"]
58184    #[serde(rename = "premium_subscription")]
58185    pub premium_subscription: bool,
58186}
58187impl AcceptedGiftTypesBuilder {
58188    #[allow(clippy::too_many_arguments)]
58189    pub fn new(
58190        unlimited_gifts: bool,
58191        limited_gifts: bool,
58192        unique_gifts: bool,
58193        premium_subscription: bool,
58194    ) -> Self {
58195        Self {
58196            unlimited_gifts,
58197            limited_gifts,
58198            unique_gifts,
58199            premium_subscription,
58200        }
58201    }
58202    #[allow(rustdoc::invalid_html_tags)]
58203    #[doc = "True, if unlimited regular gifts are accepted"]
58204    pub fn set_unlimited_gifts(mut self, unlimited_gifts: bool) -> Self {
58205        self.unlimited_gifts = unlimited_gifts;
58206        self
58207    }
58208    #[allow(rustdoc::invalid_html_tags)]
58209    #[doc = "True, if limited regular gifts are accepted"]
58210    pub fn set_limited_gifts(mut self, limited_gifts: bool) -> Self {
58211        self.limited_gifts = limited_gifts;
58212        self
58213    }
58214    #[allow(rustdoc::invalid_html_tags)]
58215    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
58216    pub fn set_unique_gifts(mut self, unique_gifts: bool) -> Self {
58217        self.unique_gifts = unique_gifts;
58218        self
58219    }
58220    #[allow(rustdoc::invalid_html_tags)]
58221    #[doc = "True, if a Telegram Premium subscription is accepted"]
58222    pub fn set_premium_subscription(mut self, premium_subscription: bool) -> Self {
58223        self.premium_subscription = premium_subscription;
58224        self
58225    }
58226    pub fn build(self) -> AcceptedGiftTypes {
58227        AcceptedGiftTypes {
58228            unlimited_gifts: self.unlimited_gifts,
58229            limited_gifts: self.limited_gifts,
58230            unique_gifts: self.unique_gifts,
58231            premium_subscription: self.premium_subscription,
58232        }
58233    }
58234}
58235#[allow(rustdoc::invalid_html_tags)]
58236#[doc = "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes."]
58237#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58238pub struct PassportElementErrorTranslationFile {
58239    #[allow(rustdoc::invalid_html_tags)]
58240    #[doc = "Error source, must be translation_file"]
58241    #[serde(rename = "source")]
58242    pub source: String,
58243    #[allow(rustdoc::invalid_html_tags)]
58244    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
58245    #[serde(rename = "type")]
58246    pub tg_type: String,
58247    #[allow(rustdoc::invalid_html_tags)]
58248    #[doc = "Base64-encoded file hash"]
58249    #[serde(rename = "file_hash")]
58250    pub file_hash: String,
58251    #[allow(rustdoc::invalid_html_tags)]
58252    #[doc = "Error message"]
58253    #[serde(rename = "message")]
58254    pub message: String,
58255}
58256#[allow(rustdoc::invalid_html_tags)]
58257#[doc = "Companion type to PassportElementErrorTranslationFile that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
58258#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58259pub struct NoSkipPassportElementErrorTranslationFile {
58260    #[allow(rustdoc::invalid_html_tags)]
58261    #[doc = "Error source, must be translation_file"]
58262    #[serde(rename = "source")]
58263    pub source: String,
58264    #[allow(rustdoc::invalid_html_tags)]
58265    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
58266    #[serde(rename = "type")]
58267    pub tg_type: String,
58268    #[allow(rustdoc::invalid_html_tags)]
58269    #[doc = "Base64-encoded file hash"]
58270    #[serde(rename = "file_hash")]
58271    pub file_hash: String,
58272    #[allow(rustdoc::invalid_html_tags)]
58273    #[doc = "Error message"]
58274    #[serde(rename = "message")]
58275    pub message: String,
58276}
58277impl From<NoSkipPassportElementErrorTranslationFile> for PassportElementErrorTranslationFile {
58278    fn from(t: NoSkipPassportElementErrorTranslationFile) -> Self {
58279        Self {
58280            source: t.source,
58281            tg_type: t.tg_type,
58282            file_hash: t.file_hash,
58283            message: t.message,
58284        }
58285    }
58286}
58287#[allow(clippy::from_over_into)]
58288impl Into<NoSkipPassportElementErrorTranslationFile> for PassportElementErrorTranslationFile {
58289    fn into(self) -> NoSkipPassportElementErrorTranslationFile {
58290        NoSkipPassportElementErrorTranslationFile {
58291            source: self.source,
58292            tg_type: self.tg_type,
58293            file_hash: self.file_hash,
58294            message: self.message,
58295        }
58296    }
58297}
58298impl NoSkipPassportElementErrorTranslationFile {
58299    pub fn skip(self) -> PassportElementErrorTranslationFile {
58300        self.into()
58301    }
58302}
58303impl PassportElementErrorTranslationFile {
58304    pub fn noskip(self) -> NoSkipPassportElementErrorTranslationFile {
58305        self.into()
58306    }
58307}
58308#[allow(rustdoc::invalid_html_tags)]
58309#[doc = "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes."]
58310#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58311pub struct PassportElementErrorTranslationFileBuilder {
58312    #[allow(rustdoc::invalid_html_tags)]
58313    #[doc = "Error source, must be translation_file"]
58314    #[serde(rename = "source")]
58315    pub source: String,
58316    #[allow(rustdoc::invalid_html_tags)]
58317    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
58318    #[serde(rename = "type")]
58319    pub tg_type: String,
58320    #[allow(rustdoc::invalid_html_tags)]
58321    #[doc = "Base64-encoded file hash"]
58322    #[serde(rename = "file_hash")]
58323    pub file_hash: String,
58324    #[allow(rustdoc::invalid_html_tags)]
58325    #[doc = "Error message"]
58326    #[serde(rename = "message")]
58327    pub message: String,
58328}
58329impl PassportElementErrorTranslationFileBuilder {
58330    #[allow(clippy::too_many_arguments)]
58331    pub fn new(source: String, file_hash: String, message: String) -> Self {
58332        Self {
58333            tg_type: "PassportElementErrorTranslationFile".to_owned(),
58334            source,
58335            file_hash,
58336            message,
58337        }
58338    }
58339    #[allow(rustdoc::invalid_html_tags)]
58340    #[doc = "Error source, must be translation_file"]
58341    pub fn set_source(mut self, source: String) -> Self {
58342        self.source = source;
58343        self
58344    }
58345    #[allow(rustdoc::invalid_html_tags)]
58346    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
58347    pub fn set_type(mut self, tg_type: String) -> Self {
58348        self.tg_type = tg_type;
58349        self
58350    }
58351    #[allow(rustdoc::invalid_html_tags)]
58352    #[doc = "Base64-encoded file hash"]
58353    pub fn set_file_hash(mut self, file_hash: String) -> Self {
58354        self.file_hash = file_hash;
58355        self
58356    }
58357    #[allow(rustdoc::invalid_html_tags)]
58358    #[doc = "Error message"]
58359    pub fn set_message(mut self, message: String) -> Self {
58360        self.message = message;
58361        self
58362    }
58363    pub fn build(self) -> PassportElementErrorTranslationFile {
58364        PassportElementErrorTranslationFile {
58365            source: self.source,
58366            tg_type: self.tg_type,
58367            file_hash: self.file_hash,
58368            message: self.message,
58369        }
58370    }
58371}
58372#[allow(rustdoc::invalid_html_tags)]
58373#[doc = "Contains information about the location of a Telegram Business account."]
58374#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58375pub struct BusinessLocation {
58376    #[allow(rustdoc::invalid_html_tags)]
58377    #[doc = "Address of the business"]
58378    #[serde(rename = "address")]
58379    pub address: String,
58380    #[allow(rustdoc::invalid_html_tags)]
58381    #[doc = "Optional. Location of the business"]
58382    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
58383    pub location: Option<BoxWrapper<Unbox<Location>>>,
58384}
58385#[allow(rustdoc::invalid_html_tags)]
58386#[doc = "Companion type to BusinessLocation that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
58387#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58388pub struct NoSkipBusinessLocation {
58389    #[allow(rustdoc::invalid_html_tags)]
58390    #[doc = "Address of the business"]
58391    #[serde(rename = "address")]
58392    pub address: String,
58393    pub location: Option<BoxWrapper<Unbox<Location>>>,
58394}
58395impl From<NoSkipBusinessLocation> for BusinessLocation {
58396    fn from(t: NoSkipBusinessLocation) -> Self {
58397        Self {
58398            address: t.address,
58399            location: t.location,
58400        }
58401    }
58402}
58403#[allow(clippy::from_over_into)]
58404impl Into<NoSkipBusinessLocation> for BusinessLocation {
58405    fn into(self) -> NoSkipBusinessLocation {
58406        NoSkipBusinessLocation {
58407            address: self.address,
58408            location: self.location,
58409        }
58410    }
58411}
58412impl NoSkipBusinessLocation {
58413    pub fn skip(self) -> BusinessLocation {
58414        self.into()
58415    }
58416}
58417impl BusinessLocation {
58418    pub fn noskip(self) -> NoSkipBusinessLocation {
58419        self.into()
58420    }
58421}
58422#[allow(rustdoc::invalid_html_tags)]
58423#[doc = "Contains information about the location of a Telegram Business account."]
58424#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58425pub struct BusinessLocationBuilder {
58426    #[allow(rustdoc::invalid_html_tags)]
58427    #[doc = "Address of the business"]
58428    #[serde(rename = "address")]
58429    pub address: String,
58430    #[allow(rustdoc::invalid_html_tags)]
58431    #[doc = "Optional. Location of the business"]
58432    #[serde(skip_serializing_if = "Option::is_none", rename = "location", default)]
58433    pub location: Option<BoxWrapper<Unbox<Location>>>,
58434}
58435impl BusinessLocationBuilder {
58436    #[allow(clippy::too_many_arguments)]
58437    pub fn new(address: String) -> Self {
58438        Self {
58439            address,
58440            location: None,
58441        }
58442    }
58443    #[allow(rustdoc::invalid_html_tags)]
58444    #[doc = "Address of the business"]
58445    pub fn set_address(mut self, address: String) -> Self {
58446        self.address = address;
58447        self
58448    }
58449    #[allow(rustdoc::invalid_html_tags)]
58450    #[doc = "Optional. Location of the business"]
58451    pub fn set_location(mut self, location: Location) -> Self {
58452        self.location = Some(BoxWrapper(Unbox(location)));
58453        self
58454    }
58455    pub fn build(self) -> BusinessLocation {
58456        BusinessLocation {
58457            address: self.address,
58458            location: self.location,
58459        }
58460    }
58461}
58462#[allow(rustdoc::invalid_html_tags)]
58463#[doc = "Contains information about the affiliate that received a commission via this transaction."]
58464#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58465pub struct AffiliateInfo {
58466    #[allow(rustdoc::invalid_html_tags)]
58467    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
58468    #[serde(
58469        skip_serializing_if = "Option::is_none",
58470        rename = "affiliate_user",
58471        default
58472    )]
58473    pub affiliate_user: Option<BoxWrapper<Unbox<User>>>,
58474    #[allow(rustdoc::invalid_html_tags)]
58475    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
58476    #[serde(
58477        skip_serializing_if = "Option::is_none",
58478        rename = "affiliate_chat",
58479        default
58480    )]
58481    pub affiliate_chat: Option<BoxWrapper<Unbox<Chat>>>,
58482    #[allow(rustdoc::invalid_html_tags)]
58483    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
58484    #[serde(rename = "commission_per_mille")]
58485    pub commission_per_mille: i64,
58486    #[allow(rustdoc::invalid_html_tags)]
58487    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
58488    #[serde(rename = "amount")]
58489    pub amount: i64,
58490    #[allow(rustdoc::invalid_html_tags)]
58491    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
58492    #[serde(
58493        skip_serializing_if = "Option::is_none",
58494        rename = "nanostar_amount",
58495        default
58496    )]
58497    pub nanostar_amount: Option<i64>,
58498}
58499#[allow(rustdoc::invalid_html_tags)]
58500#[doc = "Companion type to AffiliateInfo that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
58501#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58502pub struct NoSkipAffiliateInfo {
58503    pub affiliate_user: Option<BoxWrapper<Unbox<User>>>,
58504    pub affiliate_chat: Option<BoxWrapper<Unbox<Chat>>>,
58505    #[allow(rustdoc::invalid_html_tags)]
58506    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
58507    #[serde(rename = "commission_per_mille")]
58508    pub commission_per_mille: i64,
58509    #[allow(rustdoc::invalid_html_tags)]
58510    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
58511    #[serde(rename = "amount")]
58512    pub amount: i64,
58513    pub nanostar_amount: Option<i64>,
58514}
58515impl From<NoSkipAffiliateInfo> for AffiliateInfo {
58516    fn from(t: NoSkipAffiliateInfo) -> Self {
58517        Self {
58518            affiliate_user: t.affiliate_user,
58519            affiliate_chat: t.affiliate_chat,
58520            commission_per_mille: t.commission_per_mille,
58521            amount: t.amount,
58522            nanostar_amount: t.nanostar_amount,
58523        }
58524    }
58525}
58526#[allow(clippy::from_over_into)]
58527impl Into<NoSkipAffiliateInfo> for AffiliateInfo {
58528    fn into(self) -> NoSkipAffiliateInfo {
58529        NoSkipAffiliateInfo {
58530            affiliate_user: self.affiliate_user,
58531            affiliate_chat: self.affiliate_chat,
58532            commission_per_mille: self.commission_per_mille,
58533            amount: self.amount,
58534            nanostar_amount: self.nanostar_amount,
58535        }
58536    }
58537}
58538impl NoSkipAffiliateInfo {
58539    pub fn skip(self) -> AffiliateInfo {
58540        self.into()
58541    }
58542}
58543impl AffiliateInfo {
58544    pub fn noskip(self) -> NoSkipAffiliateInfo {
58545        self.into()
58546    }
58547}
58548#[allow(rustdoc::invalid_html_tags)]
58549#[doc = "Contains information about the affiliate that received a commission via this transaction."]
58550#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58551pub struct AffiliateInfoBuilder {
58552    #[allow(rustdoc::invalid_html_tags)]
58553    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
58554    #[serde(
58555        skip_serializing_if = "Option::is_none",
58556        rename = "affiliate_user",
58557        default
58558    )]
58559    pub affiliate_user: Option<BoxWrapper<Unbox<User>>>,
58560    #[allow(rustdoc::invalid_html_tags)]
58561    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
58562    #[serde(
58563        skip_serializing_if = "Option::is_none",
58564        rename = "affiliate_chat",
58565        default
58566    )]
58567    pub affiliate_chat: Option<BoxWrapper<Unbox<Chat>>>,
58568    #[allow(rustdoc::invalid_html_tags)]
58569    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
58570    #[serde(rename = "commission_per_mille")]
58571    pub commission_per_mille: i64,
58572    #[allow(rustdoc::invalid_html_tags)]
58573    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
58574    #[serde(rename = "amount")]
58575    pub amount: i64,
58576    #[allow(rustdoc::invalid_html_tags)]
58577    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
58578    #[serde(
58579        skip_serializing_if = "Option::is_none",
58580        rename = "nanostar_amount",
58581        default
58582    )]
58583    pub nanostar_amount: Option<i64>,
58584}
58585impl AffiliateInfoBuilder {
58586    #[allow(clippy::too_many_arguments)]
58587    pub fn new(commission_per_mille: i64, amount: i64) -> Self {
58588        Self {
58589            commission_per_mille,
58590            amount,
58591            affiliate_user: None,
58592            affiliate_chat: None,
58593            nanostar_amount: None,
58594        }
58595    }
58596    #[allow(rustdoc::invalid_html_tags)]
58597    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
58598    pub fn set_affiliate_user(mut self, affiliate_user: User) -> Self {
58599        self.affiliate_user = Some(BoxWrapper(Unbox(affiliate_user)));
58600        self
58601    }
58602    #[allow(rustdoc::invalid_html_tags)]
58603    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
58604    pub fn set_affiliate_chat(mut self, affiliate_chat: Chat) -> Self {
58605        self.affiliate_chat = Some(BoxWrapper(Unbox(affiliate_chat)));
58606        self
58607    }
58608    #[allow(rustdoc::invalid_html_tags)]
58609    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
58610    pub fn set_commission_per_mille(mut self, commission_per_mille: i64) -> Self {
58611        self.commission_per_mille = commission_per_mille;
58612        self
58613    }
58614    #[allow(rustdoc::invalid_html_tags)]
58615    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
58616    pub fn set_amount(mut self, amount: i64) -> Self {
58617        self.amount = amount;
58618        self
58619    }
58620    #[allow(rustdoc::invalid_html_tags)]
58621    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
58622    pub fn set_nanostar_amount(mut self, nanostar_amount: i64) -> Self {
58623        self.nanostar_amount = Some(nanostar_amount);
58624        self
58625    }
58626    pub fn build(self) -> AffiliateInfo {
58627        AffiliateInfo {
58628            affiliate_user: self.affiliate_user,
58629            affiliate_chat: self.affiliate_chat,
58630            commission_per_mille: self.commission_per_mille,
58631            amount: self.amount,
58632            nanostar_amount: self.nanostar_amount,
58633        }
58634    }
58635}
58636#[allow(rustdoc::invalid_html_tags)]
58637#[doc = "The message was originally sent on behalf of a chat to a group chat."]
58638#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58639pub struct MessageOriginChat {
58640    #[allow(rustdoc::invalid_html_tags)]
58641    #[doc = "Type of the message origin, always \"chat\""]
58642    #[serde(rename = "type")]
58643    pub tg_type: String,
58644    #[allow(rustdoc::invalid_html_tags)]
58645    #[doc = "Date the message was sent originally in Unix time"]
58646    #[serde(rename = "date")]
58647    pub date: i64,
58648    #[allow(rustdoc::invalid_html_tags)]
58649    #[doc = "Chat that sent the message originally"]
58650    #[serde(rename = "sender_chat")]
58651    pub sender_chat: BoxWrapper<Unbox<Chat>>,
58652    #[allow(rustdoc::invalid_html_tags)]
58653    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
58654    #[serde(
58655        skip_serializing_if = "Option::is_none",
58656        rename = "author_signature",
58657        default
58658    )]
58659    pub author_signature: Option<String>,
58660}
58661#[allow(rustdoc::invalid_html_tags)]
58662#[doc = "Companion type to MessageOriginChat that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
58663#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58664pub struct NoSkipMessageOriginChat {
58665    #[allow(rustdoc::invalid_html_tags)]
58666    #[doc = "Type of the message origin, always \"chat\""]
58667    #[serde(rename = "type")]
58668    pub tg_type: String,
58669    #[allow(rustdoc::invalid_html_tags)]
58670    #[doc = "Date the message was sent originally in Unix time"]
58671    #[serde(rename = "date")]
58672    pub date: i64,
58673    #[allow(rustdoc::invalid_html_tags)]
58674    #[doc = "Chat that sent the message originally"]
58675    #[serde(rename = "sender_chat")]
58676    pub sender_chat: BoxWrapper<Unbox<Chat>>,
58677    pub author_signature: Option<String>,
58678}
58679impl From<NoSkipMessageOriginChat> for MessageOriginChat {
58680    fn from(t: NoSkipMessageOriginChat) -> Self {
58681        Self {
58682            tg_type: t.tg_type,
58683            date: t.date,
58684            sender_chat: t.sender_chat,
58685            author_signature: t.author_signature,
58686        }
58687    }
58688}
58689#[allow(clippy::from_over_into)]
58690impl Into<NoSkipMessageOriginChat> for MessageOriginChat {
58691    fn into(self) -> NoSkipMessageOriginChat {
58692        NoSkipMessageOriginChat {
58693            tg_type: self.tg_type,
58694            date: self.date,
58695            sender_chat: self.sender_chat,
58696            author_signature: self.author_signature,
58697        }
58698    }
58699}
58700impl NoSkipMessageOriginChat {
58701    pub fn skip(self) -> MessageOriginChat {
58702        self.into()
58703    }
58704}
58705impl MessageOriginChat {
58706    pub fn noskip(self) -> NoSkipMessageOriginChat {
58707        self.into()
58708    }
58709}
58710#[allow(rustdoc::invalid_html_tags)]
58711#[doc = "The message was originally sent on behalf of a chat to a group chat."]
58712#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58713pub struct MessageOriginChatBuilder {
58714    #[allow(rustdoc::invalid_html_tags)]
58715    #[doc = "Type of the message origin, always \"chat\""]
58716    #[serde(rename = "type")]
58717    pub tg_type: String,
58718    #[allow(rustdoc::invalid_html_tags)]
58719    #[doc = "Date the message was sent originally in Unix time"]
58720    #[serde(rename = "date")]
58721    pub date: i64,
58722    #[allow(rustdoc::invalid_html_tags)]
58723    #[doc = "Chat that sent the message originally"]
58724    #[serde(rename = "sender_chat")]
58725    pub sender_chat: BoxWrapper<Unbox<Chat>>,
58726    #[allow(rustdoc::invalid_html_tags)]
58727    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
58728    #[serde(
58729        skip_serializing_if = "Option::is_none",
58730        rename = "author_signature",
58731        default
58732    )]
58733    pub author_signature: Option<String>,
58734}
58735impl MessageOriginChatBuilder {
58736    #[allow(clippy::too_many_arguments)]
58737    pub fn new<A: Into<Chat>>(date: i64, sender_chat: A) -> Self {
58738        Self {
58739            tg_type: "MessageOriginChat".to_owned(),
58740            date,
58741            sender_chat: BoxWrapper::new_unbox(sender_chat.into()),
58742            author_signature: None,
58743        }
58744    }
58745    #[allow(rustdoc::invalid_html_tags)]
58746    #[doc = "Type of the message origin, always \"chat\""]
58747    pub fn set_type(mut self, tg_type: String) -> Self {
58748        self.tg_type = tg_type;
58749        self
58750    }
58751    #[allow(rustdoc::invalid_html_tags)]
58752    #[doc = "Date the message was sent originally in Unix time"]
58753    pub fn set_date(mut self, date: i64) -> Self {
58754        self.date = date;
58755        self
58756    }
58757    #[allow(rustdoc::invalid_html_tags)]
58758    #[doc = "Chat that sent the message originally"]
58759    pub fn set_sender_chat(mut self, sender_chat: Chat) -> Self {
58760        self.sender_chat = BoxWrapper(Unbox(sender_chat));
58761        self
58762    }
58763    #[allow(rustdoc::invalid_html_tags)]
58764    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
58765    pub fn set_author_signature(mut self, author_signature: String) -> Self {
58766        self.author_signature = Some(author_signature);
58767        self
58768    }
58769    pub fn build(self) -> MessageOriginChat {
58770        MessageOriginChat {
58771            tg_type: self.tg_type,
58772            date: self.date,
58773            sender_chat: self.sender_chat,
58774            author_signature: self.author_signature,
58775        }
58776    }
58777}
58778#[allow(rustdoc::invalid_html_tags)]
58779#[doc = "Represents the scope of bot commands, covering a specific chat."]
58780#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58781pub struct BotCommandScopeChat {
58782    #[allow(rustdoc::invalid_html_tags)]
58783    #[doc = "Scope type, must be chat"]
58784    #[serde(rename = "type")]
58785    pub tg_type: String,
58786    #[allow(rustdoc::invalid_html_tags)]
58787    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
58788    #[serde(rename = "chat_id")]
58789    pub chat_id: ChatHandle,
58790}
58791#[allow(rustdoc::invalid_html_tags)]
58792#[doc = "Companion type to BotCommandScopeChat that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
58793#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58794pub struct NoSkipBotCommandScopeChat {
58795    #[allow(rustdoc::invalid_html_tags)]
58796    #[doc = "Scope type, must be chat"]
58797    #[serde(rename = "type")]
58798    pub tg_type: String,
58799    #[allow(rustdoc::invalid_html_tags)]
58800    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
58801    #[serde(rename = "chat_id")]
58802    pub chat_id: ChatHandle,
58803}
58804impl From<NoSkipBotCommandScopeChat> for BotCommandScopeChat {
58805    fn from(t: NoSkipBotCommandScopeChat) -> Self {
58806        Self {
58807            tg_type: t.tg_type,
58808            chat_id: t.chat_id,
58809        }
58810    }
58811}
58812#[allow(clippy::from_over_into)]
58813impl Into<NoSkipBotCommandScopeChat> for BotCommandScopeChat {
58814    fn into(self) -> NoSkipBotCommandScopeChat {
58815        NoSkipBotCommandScopeChat {
58816            tg_type: self.tg_type,
58817            chat_id: self.chat_id,
58818        }
58819    }
58820}
58821impl NoSkipBotCommandScopeChat {
58822    pub fn skip(self) -> BotCommandScopeChat {
58823        self.into()
58824    }
58825}
58826impl BotCommandScopeChat {
58827    pub fn noskip(self) -> NoSkipBotCommandScopeChat {
58828        self.into()
58829    }
58830}
58831#[allow(rustdoc::invalid_html_tags)]
58832#[doc = "Represents the scope of bot commands, covering a specific chat."]
58833#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58834pub struct BotCommandScopeChatBuilder {
58835    #[allow(rustdoc::invalid_html_tags)]
58836    #[doc = "Scope type, must be chat"]
58837    #[serde(rename = "type")]
58838    pub tg_type: String,
58839    #[allow(rustdoc::invalid_html_tags)]
58840    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
58841    #[serde(rename = "chat_id")]
58842    pub chat_id: ChatHandle,
58843}
58844impl BotCommandScopeChatBuilder {
58845    #[allow(clippy::too_many_arguments)]
58846    pub fn new(chat_id: ChatHandle) -> Self {
58847        Self {
58848            tg_type: "chat".to_owned(),
58849            chat_id,
58850        }
58851    }
58852    #[allow(rustdoc::invalid_html_tags)]
58853    #[doc = "Scope type, must be chat"]
58854    pub fn set_type(mut self, tg_type: String) -> Self {
58855        self.tg_type = tg_type;
58856        self
58857    }
58858    #[allow(rustdoc::invalid_html_tags)]
58859    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
58860    pub fn set_chat_id(mut self, chat_id: ChatHandle) -> Self {
58861        self.chat_id = chat_id;
58862        self
58863    }
58864    pub fn build(self) -> BotCommandScopeChat {
58865        BotCommandScopeChat {
58866            tg_type: self.tg_type,
58867            chat_id: self.chat_id,
58868        }
58869    }
58870}
58871#[allow(rustdoc::invalid_html_tags)]
58872#[doc = "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes."]
58873#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58874pub struct PassportElementErrorReverseSide {
58875    #[allow(rustdoc::invalid_html_tags)]
58876    #[doc = "Error source, must be reverse_side"]
58877    #[serde(rename = "source")]
58878    pub source: String,
58879    #[allow(rustdoc::invalid_html_tags)]
58880    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
58881    #[serde(rename = "type")]
58882    pub tg_type: String,
58883    #[allow(rustdoc::invalid_html_tags)]
58884    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
58885    #[serde(rename = "file_hash")]
58886    pub file_hash: String,
58887    #[allow(rustdoc::invalid_html_tags)]
58888    #[doc = "Error message"]
58889    #[serde(rename = "message")]
58890    pub message: String,
58891}
58892#[allow(rustdoc::invalid_html_tags)]
58893#[doc = "Companion type to PassportElementErrorReverseSide that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
58894#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58895pub struct NoSkipPassportElementErrorReverseSide {
58896    #[allow(rustdoc::invalid_html_tags)]
58897    #[doc = "Error source, must be reverse_side"]
58898    #[serde(rename = "source")]
58899    pub source: String,
58900    #[allow(rustdoc::invalid_html_tags)]
58901    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
58902    #[serde(rename = "type")]
58903    pub tg_type: String,
58904    #[allow(rustdoc::invalid_html_tags)]
58905    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
58906    #[serde(rename = "file_hash")]
58907    pub file_hash: String,
58908    #[allow(rustdoc::invalid_html_tags)]
58909    #[doc = "Error message"]
58910    #[serde(rename = "message")]
58911    pub message: String,
58912}
58913impl From<NoSkipPassportElementErrorReverseSide> for PassportElementErrorReverseSide {
58914    fn from(t: NoSkipPassportElementErrorReverseSide) -> Self {
58915        Self {
58916            source: t.source,
58917            tg_type: t.tg_type,
58918            file_hash: t.file_hash,
58919            message: t.message,
58920        }
58921    }
58922}
58923#[allow(clippy::from_over_into)]
58924impl Into<NoSkipPassportElementErrorReverseSide> for PassportElementErrorReverseSide {
58925    fn into(self) -> NoSkipPassportElementErrorReverseSide {
58926        NoSkipPassportElementErrorReverseSide {
58927            source: self.source,
58928            tg_type: self.tg_type,
58929            file_hash: self.file_hash,
58930            message: self.message,
58931        }
58932    }
58933}
58934impl NoSkipPassportElementErrorReverseSide {
58935    pub fn skip(self) -> PassportElementErrorReverseSide {
58936        self.into()
58937    }
58938}
58939impl PassportElementErrorReverseSide {
58940    pub fn noskip(self) -> NoSkipPassportElementErrorReverseSide {
58941        self.into()
58942    }
58943}
58944#[allow(rustdoc::invalid_html_tags)]
58945#[doc = "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes."]
58946#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
58947pub struct PassportElementErrorReverseSideBuilder {
58948    #[allow(rustdoc::invalid_html_tags)]
58949    #[doc = "Error source, must be reverse_side"]
58950    #[serde(rename = "source")]
58951    pub source: String,
58952    #[allow(rustdoc::invalid_html_tags)]
58953    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
58954    #[serde(rename = "type")]
58955    pub tg_type: String,
58956    #[allow(rustdoc::invalid_html_tags)]
58957    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
58958    #[serde(rename = "file_hash")]
58959    pub file_hash: String,
58960    #[allow(rustdoc::invalid_html_tags)]
58961    #[doc = "Error message"]
58962    #[serde(rename = "message")]
58963    pub message: String,
58964}
58965impl PassportElementErrorReverseSideBuilder {
58966    #[allow(clippy::too_many_arguments)]
58967    pub fn new(source: String, file_hash: String, message: String) -> Self {
58968        Self {
58969            tg_type: "PassportElementErrorReverseSide".to_owned(),
58970            source,
58971            file_hash,
58972            message,
58973        }
58974    }
58975    #[allow(rustdoc::invalid_html_tags)]
58976    #[doc = "Error source, must be reverse_side"]
58977    pub fn set_source(mut self, source: String) -> Self {
58978        self.source = source;
58979        self
58980    }
58981    #[allow(rustdoc::invalid_html_tags)]
58982    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
58983    pub fn set_type(mut self, tg_type: String) -> Self {
58984        self.tg_type = tg_type;
58985        self
58986    }
58987    #[allow(rustdoc::invalid_html_tags)]
58988    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
58989    pub fn set_file_hash(mut self, file_hash: String) -> Self {
58990        self.file_hash = file_hash;
58991        self
58992    }
58993    #[allow(rustdoc::invalid_html_tags)]
58994    #[doc = "Error message"]
58995    pub fn set_message(mut self, message: String) -> Self {
58996        self.message = message;
58997        self
58998    }
58999    pub fn build(self) -> PassportElementErrorReverseSide {
59000        PassportElementErrorReverseSide {
59001            source: self.source,
59002            tg_type: self.tg_type,
59003            file_hash: self.file_hash,
59004            message: self.message,
59005        }
59006    }
59007}
59008#[allow(rustdoc::invalid_html_tags)]
59009#[doc = "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo."]
59010#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59011pub struct InlineQueryResultPhoto {
59012    #[allow(rustdoc::invalid_html_tags)]
59013    #[doc = "Type of the result, must be photo"]
59014    #[serde(rename = "type")]
59015    pub tg_type: String,
59016    #[allow(rustdoc::invalid_html_tags)]
59017    #[doc = "Unique identifier for this result, 1-64 bytes"]
59018    #[serde(rename = "id")]
59019    pub id: String,
59020    #[allow(rustdoc::invalid_html_tags)]
59021    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
59022    #[serde(rename = "photo_url")]
59023    pub photo_url: String,
59024    #[allow(rustdoc::invalid_html_tags)]
59025    #[doc = "URL of the thumbnail for the photo"]
59026    #[serde(rename = "thumbnail_url")]
59027    pub thumbnail_url: String,
59028    #[allow(rustdoc::invalid_html_tags)]
59029    #[doc = "Optional. Width of the photo"]
59030    #[serde(
59031        skip_serializing_if = "Option::is_none",
59032        rename = "photo_width",
59033        default
59034    )]
59035    pub photo_width: Option<i64>,
59036    #[allow(rustdoc::invalid_html_tags)]
59037    #[doc = "Optional. Height of the photo"]
59038    #[serde(
59039        skip_serializing_if = "Option::is_none",
59040        rename = "photo_height",
59041        default
59042    )]
59043    pub photo_height: Option<i64>,
59044    #[allow(rustdoc::invalid_html_tags)]
59045    #[doc = "Optional. Title for the result"]
59046    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
59047    pub title: Option<String>,
59048    #[allow(rustdoc::invalid_html_tags)]
59049    #[doc = "Optional. Short description of the result"]
59050    #[serde(
59051        skip_serializing_if = "Option::is_none",
59052        rename = "description",
59053        default
59054    )]
59055    pub description: Option<String>,
59056    #[allow(rustdoc::invalid_html_tags)]
59057    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
59058    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
59059    pub caption: Option<String>,
59060    #[allow(rustdoc::invalid_html_tags)]
59061    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
59062    #[serde(
59063        skip_serializing_if = "Option::is_none",
59064        rename = "parse_mode",
59065        default
59066    )]
59067    pub parse_mode: Option<String>,
59068    #[allow(rustdoc::invalid_html_tags)]
59069    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
59070    #[serde(
59071        skip_serializing_if = "Option::is_none",
59072        rename = "caption_entities",
59073        default
59074    )]
59075    pub caption_entities: Option<Vec<MessageEntity>>,
59076    #[allow(rustdoc::invalid_html_tags)]
59077    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
59078    #[serde(
59079        skip_serializing_if = "Option::is_none",
59080        rename = "show_caption_above_media",
59081        default
59082    )]
59083    pub show_caption_above_media: Option<bool>,
59084    #[allow(rustdoc::invalid_html_tags)]
59085    #[doc = "Optional. Inline keyboard attached to the message"]
59086    #[serde(
59087        skip_serializing_if = "Option::is_none",
59088        rename = "reply_markup",
59089        default
59090    )]
59091    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
59092    #[allow(rustdoc::invalid_html_tags)]
59093    #[doc = "Optional. Content of the message to be sent instead of the photo"]
59094    #[serde(
59095        skip_serializing_if = "Option::is_none",
59096        rename = "input_message_content",
59097        default
59098    )]
59099    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
59100}
59101#[allow(rustdoc::invalid_html_tags)]
59102#[doc = "Companion type to InlineQueryResultPhoto that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
59103#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59104pub struct NoSkipInlineQueryResultPhoto {
59105    #[allow(rustdoc::invalid_html_tags)]
59106    #[doc = "Type of the result, must be photo"]
59107    #[serde(rename = "type")]
59108    pub tg_type: String,
59109    #[allow(rustdoc::invalid_html_tags)]
59110    #[doc = "Unique identifier for this result, 1-64 bytes"]
59111    #[serde(rename = "id")]
59112    pub id: String,
59113    #[allow(rustdoc::invalid_html_tags)]
59114    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
59115    #[serde(rename = "photo_url")]
59116    pub photo_url: String,
59117    #[allow(rustdoc::invalid_html_tags)]
59118    #[doc = "URL of the thumbnail for the photo"]
59119    #[serde(rename = "thumbnail_url")]
59120    pub thumbnail_url: String,
59121    pub photo_width: Option<i64>,
59122    pub photo_height: Option<i64>,
59123    pub title: Option<String>,
59124    pub description: Option<String>,
59125    pub caption: Option<String>,
59126    pub parse_mode: Option<String>,
59127    pub caption_entities: Option<Vec<MessageEntity>>,
59128    pub show_caption_above_media: Option<bool>,
59129    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
59130    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
59131}
59132impl From<NoSkipInlineQueryResultPhoto> for InlineQueryResultPhoto {
59133    fn from(t: NoSkipInlineQueryResultPhoto) -> Self {
59134        Self {
59135            tg_type: t.tg_type,
59136            id: t.id,
59137            photo_url: t.photo_url,
59138            thumbnail_url: t.thumbnail_url,
59139            photo_width: t.photo_width,
59140            photo_height: t.photo_height,
59141            title: t.title,
59142            description: t.description,
59143            caption: t.caption,
59144            parse_mode: t.parse_mode,
59145            caption_entities: t.caption_entities,
59146            show_caption_above_media: t.show_caption_above_media,
59147            reply_markup: t.reply_markup,
59148            input_message_content: t.input_message_content,
59149        }
59150    }
59151}
59152#[allow(clippy::from_over_into)]
59153impl Into<NoSkipInlineQueryResultPhoto> for InlineQueryResultPhoto {
59154    fn into(self) -> NoSkipInlineQueryResultPhoto {
59155        NoSkipInlineQueryResultPhoto {
59156            tg_type: self.tg_type,
59157            id: self.id,
59158            photo_url: self.photo_url,
59159            thumbnail_url: self.thumbnail_url,
59160            photo_width: self.photo_width,
59161            photo_height: self.photo_height,
59162            title: self.title,
59163            description: self.description,
59164            caption: self.caption,
59165            parse_mode: self.parse_mode,
59166            caption_entities: self.caption_entities,
59167            show_caption_above_media: self.show_caption_above_media,
59168            reply_markup: self.reply_markup,
59169            input_message_content: self.input_message_content,
59170        }
59171    }
59172}
59173impl NoSkipInlineQueryResultPhoto {
59174    pub fn skip(self) -> InlineQueryResultPhoto {
59175        self.into()
59176    }
59177}
59178impl InlineQueryResultPhoto {
59179    pub fn noskip(self) -> NoSkipInlineQueryResultPhoto {
59180        self.into()
59181    }
59182}
59183#[allow(rustdoc::invalid_html_tags)]
59184#[doc = "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo."]
59185#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59186pub struct InlineQueryResultPhotoBuilder {
59187    #[allow(rustdoc::invalid_html_tags)]
59188    #[doc = "Type of the result, must be photo"]
59189    #[serde(rename = "type")]
59190    pub tg_type: String,
59191    #[allow(rustdoc::invalid_html_tags)]
59192    #[doc = "Unique identifier for this result, 1-64 bytes"]
59193    #[serde(rename = "id")]
59194    pub id: String,
59195    #[allow(rustdoc::invalid_html_tags)]
59196    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
59197    #[serde(rename = "photo_url")]
59198    pub photo_url: String,
59199    #[allow(rustdoc::invalid_html_tags)]
59200    #[doc = "URL of the thumbnail for the photo"]
59201    #[serde(rename = "thumbnail_url")]
59202    pub thumbnail_url: String,
59203    #[allow(rustdoc::invalid_html_tags)]
59204    #[doc = "Optional. Width of the photo"]
59205    #[serde(
59206        skip_serializing_if = "Option::is_none",
59207        rename = "photo_width",
59208        default
59209    )]
59210    pub photo_width: Option<i64>,
59211    #[allow(rustdoc::invalid_html_tags)]
59212    #[doc = "Optional. Height of the photo"]
59213    #[serde(
59214        skip_serializing_if = "Option::is_none",
59215        rename = "photo_height",
59216        default
59217    )]
59218    pub photo_height: Option<i64>,
59219    #[allow(rustdoc::invalid_html_tags)]
59220    #[doc = "Optional. Title for the result"]
59221    #[serde(skip_serializing_if = "Option::is_none", rename = "title", default)]
59222    pub title: Option<String>,
59223    #[allow(rustdoc::invalid_html_tags)]
59224    #[doc = "Optional. Short description of the result"]
59225    #[serde(
59226        skip_serializing_if = "Option::is_none",
59227        rename = "description",
59228        default
59229    )]
59230    pub description: Option<String>,
59231    #[allow(rustdoc::invalid_html_tags)]
59232    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
59233    #[serde(skip_serializing_if = "Option::is_none", rename = "caption", default)]
59234    pub caption: Option<String>,
59235    #[allow(rustdoc::invalid_html_tags)]
59236    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
59237    #[serde(
59238        skip_serializing_if = "Option::is_none",
59239        rename = "parse_mode",
59240        default
59241    )]
59242    pub parse_mode: Option<String>,
59243    #[allow(rustdoc::invalid_html_tags)]
59244    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
59245    #[serde(
59246        skip_serializing_if = "Option::is_none",
59247        rename = "caption_entities",
59248        default
59249    )]
59250    pub caption_entities: Option<Vec<MessageEntity>>,
59251    #[allow(rustdoc::invalid_html_tags)]
59252    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
59253    #[serde(
59254        skip_serializing_if = "Option::is_none",
59255        rename = "show_caption_above_media",
59256        default
59257    )]
59258    pub show_caption_above_media: Option<bool>,
59259    #[allow(rustdoc::invalid_html_tags)]
59260    #[doc = "Optional. Inline keyboard attached to the message"]
59261    #[serde(
59262        skip_serializing_if = "Option::is_none",
59263        rename = "reply_markup",
59264        default
59265    )]
59266    pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
59267    #[allow(rustdoc::invalid_html_tags)]
59268    #[doc = "Optional. Content of the message to be sent instead of the photo"]
59269    #[serde(
59270        skip_serializing_if = "Option::is_none",
59271        rename = "input_message_content",
59272        default
59273    )]
59274    pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
59275}
59276impl InlineQueryResultPhotoBuilder {
59277    #[allow(clippy::too_many_arguments)]
59278    pub fn new(id: String, photo_url: String, thumbnail_url: String) -> Self {
59279        Self {
59280            tg_type: "photo".to_owned(),
59281            id,
59282            photo_url,
59283            thumbnail_url,
59284            photo_width: None,
59285            photo_height: None,
59286            title: None,
59287            description: None,
59288            caption: None,
59289            parse_mode: None,
59290            caption_entities: None,
59291            show_caption_above_media: None,
59292            reply_markup: None,
59293            input_message_content: None,
59294        }
59295    }
59296    #[allow(rustdoc::invalid_html_tags)]
59297    #[doc = "Type of the result, must be photo"]
59298    pub fn set_type(mut self, tg_type: String) -> Self {
59299        self.tg_type = tg_type;
59300        self
59301    }
59302    #[allow(rustdoc::invalid_html_tags)]
59303    #[doc = "Unique identifier for this result, 1-64 bytes"]
59304    pub fn set_id(mut self, id: String) -> Self {
59305        self.id = id;
59306        self
59307    }
59308    #[allow(rustdoc::invalid_html_tags)]
59309    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
59310    pub fn set_photo_url(mut self, photo_url: String) -> Self {
59311        self.photo_url = photo_url;
59312        self
59313    }
59314    #[allow(rustdoc::invalid_html_tags)]
59315    #[doc = "URL of the thumbnail for the photo"]
59316    pub fn set_thumbnail_url(mut self, thumbnail_url: String) -> Self {
59317        self.thumbnail_url = thumbnail_url;
59318        self
59319    }
59320    #[allow(rustdoc::invalid_html_tags)]
59321    #[doc = "Optional. Width of the photo"]
59322    pub fn set_photo_width(mut self, photo_width: i64) -> Self {
59323        self.photo_width = Some(photo_width);
59324        self
59325    }
59326    #[allow(rustdoc::invalid_html_tags)]
59327    #[doc = "Optional. Height of the photo"]
59328    pub fn set_photo_height(mut self, photo_height: i64) -> Self {
59329        self.photo_height = Some(photo_height);
59330        self
59331    }
59332    #[allow(rustdoc::invalid_html_tags)]
59333    #[doc = "Optional. Title for the result"]
59334    pub fn set_title(mut self, title: String) -> Self {
59335        self.title = Some(title);
59336        self
59337    }
59338    #[allow(rustdoc::invalid_html_tags)]
59339    #[doc = "Optional. Short description of the result"]
59340    pub fn set_description(mut self, description: String) -> Self {
59341        self.description = Some(description);
59342        self
59343    }
59344    #[allow(rustdoc::invalid_html_tags)]
59345    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
59346    pub fn set_caption(mut self, caption: String) -> Self {
59347        self.caption = Some(caption);
59348        self
59349    }
59350    #[allow(rustdoc::invalid_html_tags)]
59351    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
59352    pub fn set_parse_mode(mut self, parse_mode: String) -> Self {
59353        self.parse_mode = Some(parse_mode);
59354        self
59355    }
59356    #[allow(rustdoc::invalid_html_tags)]
59357    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
59358    pub fn set_caption_entities(mut self, caption_entities: Vec<MessageEntity>) -> Self {
59359        self.caption_entities = Some(caption_entities);
59360        self
59361    }
59362    #[allow(rustdoc::invalid_html_tags)]
59363    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
59364    pub fn set_show_caption_above_media(mut self, show_caption_above_media: bool) -> Self {
59365        self.show_caption_above_media = Some(show_caption_above_media);
59366        self
59367    }
59368    #[allow(rustdoc::invalid_html_tags)]
59369    #[doc = "Optional. Inline keyboard attached to the message"]
59370    pub fn set_reply_markup(mut self, reply_markup: InlineKeyboardMarkup) -> Self {
59371        self.reply_markup = Some(BoxWrapper(Unbox(reply_markup)));
59372        self
59373    }
59374    #[allow(rustdoc::invalid_html_tags)]
59375    #[doc = "Optional. Content of the message to be sent instead of the photo"]
59376    pub fn set_input_message_content(mut self, input_message_content: InputMessageContent) -> Self {
59377        self.input_message_content = Some(BoxWrapper(Unbox(input_message_content)));
59378        self
59379    }
59380    pub fn build(self) -> InlineQueryResultPhoto {
59381        InlineQueryResultPhoto {
59382            tg_type: self.tg_type,
59383            id: self.id,
59384            photo_url: self.photo_url,
59385            thumbnail_url: self.thumbnail_url,
59386            photo_width: self.photo_width,
59387            photo_height: self.photo_height,
59388            title: self.title,
59389            description: self.description,
59390            caption: self.caption,
59391            parse_mode: self.parse_mode,
59392            caption_entities: self.caption_entities,
59393            show_caption_above_media: self.show_caption_above_media,
59394            reply_markup: self.reply_markup,
59395            input_message_content: self.input_message_content,
59396        }
59397    }
59398}
59399#[allow(rustdoc::invalid_html_tags)]
59400#[doc = "Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas."]
59401#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59402pub struct StoryAreaTypeLink {
59403    #[allow(rustdoc::invalid_html_tags)]
59404    #[doc = "Type of the area, always \"link\""]
59405    #[serde(rename = "type")]
59406    pub tg_type: String,
59407    #[allow(rustdoc::invalid_html_tags)]
59408    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
59409    #[serde(rename = "url")]
59410    pub url: String,
59411}
59412#[allow(rustdoc::invalid_html_tags)]
59413#[doc = "Companion type to StoryAreaTypeLink that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
59414#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59415pub struct NoSkipStoryAreaTypeLink {
59416    #[allow(rustdoc::invalid_html_tags)]
59417    #[doc = "Type of the area, always \"link\""]
59418    #[serde(rename = "type")]
59419    pub tg_type: String,
59420    #[allow(rustdoc::invalid_html_tags)]
59421    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
59422    #[serde(rename = "url")]
59423    pub url: String,
59424}
59425impl From<NoSkipStoryAreaTypeLink> for StoryAreaTypeLink {
59426    fn from(t: NoSkipStoryAreaTypeLink) -> Self {
59427        Self {
59428            tg_type: t.tg_type,
59429            url: t.url,
59430        }
59431    }
59432}
59433#[allow(clippy::from_over_into)]
59434impl Into<NoSkipStoryAreaTypeLink> for StoryAreaTypeLink {
59435    fn into(self) -> NoSkipStoryAreaTypeLink {
59436        NoSkipStoryAreaTypeLink {
59437            tg_type: self.tg_type,
59438            url: self.url,
59439        }
59440    }
59441}
59442impl NoSkipStoryAreaTypeLink {
59443    pub fn skip(self) -> StoryAreaTypeLink {
59444        self.into()
59445    }
59446}
59447impl StoryAreaTypeLink {
59448    pub fn noskip(self) -> NoSkipStoryAreaTypeLink {
59449        self.into()
59450    }
59451}
59452#[allow(rustdoc::invalid_html_tags)]
59453#[doc = "Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas."]
59454#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59455pub struct StoryAreaTypeLinkBuilder {
59456    #[allow(rustdoc::invalid_html_tags)]
59457    #[doc = "Type of the area, always \"link\""]
59458    #[serde(rename = "type")]
59459    pub tg_type: String,
59460    #[allow(rustdoc::invalid_html_tags)]
59461    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
59462    #[serde(rename = "url")]
59463    pub url: String,
59464}
59465impl StoryAreaTypeLinkBuilder {
59466    #[allow(clippy::too_many_arguments)]
59467    pub fn new(url: String) -> Self {
59468        Self {
59469            tg_type: "StoryAreaTypeLink".to_owned(),
59470            url,
59471        }
59472    }
59473    #[allow(rustdoc::invalid_html_tags)]
59474    #[doc = "Type of the area, always \"link\""]
59475    pub fn set_type(mut self, tg_type: String) -> Self {
59476        self.tg_type = tg_type;
59477        self
59478    }
59479    #[allow(rustdoc::invalid_html_tags)]
59480    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
59481    pub fn set_url(mut self, url: String) -> Self {
59482        self.url = url;
59483        self
59484    }
59485    pub fn build(self) -> StoryAreaTypeLink {
59486        StoryAreaTypeLink {
59487            tg_type: self.tg_type,
59488            url: self.url,
59489        }
59490    }
59491}
59492#[allow(rustdoc::invalid_html_tags)]
59493#[doc = "This object describes a sticker to be added to a sticker set."]
59494#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59495pub struct InputSticker {
59496    #[allow(rustdoc::invalid_html_tags)]
59497    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59498    #[serde(rename = "sticker")]
59499    pub sticker: String,
59500    #[allow(rustdoc::invalid_html_tags)]
59501    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
59502    #[serde(rename = "format")]
59503    pub format: String,
59504    #[allow(rustdoc::invalid_html_tags)]
59505    #[doc = "List of 1-20 emoji associated with the sticker"]
59506    #[serde(rename = "emoji_list")]
59507    pub emoji_list: Vec<String>,
59508    #[allow(rustdoc::invalid_html_tags)]
59509    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
59510    #[serde(
59511        skip_serializing_if = "Option::is_none",
59512        rename = "mask_position",
59513        default
59514    )]
59515    pub mask_position: Option<BoxWrapper<Unbox<MaskPosition>>>,
59516    #[allow(rustdoc::invalid_html_tags)]
59517    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
59518    #[serde(skip_serializing_if = "Option::is_none", rename = "keywords", default)]
59519    pub keywords: Option<Vec<String>>,
59520}
59521#[allow(rustdoc::invalid_html_tags)]
59522#[doc = "Companion type to InputSticker that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
59523#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59524pub struct NoSkipInputSticker {
59525    #[allow(rustdoc::invalid_html_tags)]
59526    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59527    #[serde(rename = "sticker")]
59528    pub sticker: String,
59529    #[allow(rustdoc::invalid_html_tags)]
59530    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
59531    #[serde(rename = "format")]
59532    pub format: String,
59533    #[allow(rustdoc::invalid_html_tags)]
59534    #[doc = "List of 1-20 emoji associated with the sticker"]
59535    #[serde(rename = "emoji_list")]
59536    pub emoji_list: Vec<String>,
59537    pub mask_position: Option<BoxWrapper<Unbox<MaskPosition>>>,
59538    pub keywords: Option<Vec<String>>,
59539}
59540impl From<NoSkipInputSticker> for InputSticker {
59541    fn from(t: NoSkipInputSticker) -> Self {
59542        Self {
59543            sticker: t.sticker,
59544            format: t.format,
59545            emoji_list: t.emoji_list,
59546            mask_position: t.mask_position,
59547            keywords: t.keywords,
59548        }
59549    }
59550}
59551#[allow(clippy::from_over_into)]
59552impl Into<NoSkipInputSticker> for InputSticker {
59553    fn into(self) -> NoSkipInputSticker {
59554        NoSkipInputSticker {
59555            sticker: self.sticker,
59556            format: self.format,
59557            emoji_list: self.emoji_list,
59558            mask_position: self.mask_position,
59559            keywords: self.keywords,
59560        }
59561    }
59562}
59563impl NoSkipInputSticker {
59564    pub fn skip(self) -> InputSticker {
59565        self.into()
59566    }
59567}
59568impl InputSticker {
59569    pub fn noskip(self) -> NoSkipInputSticker {
59570        self.into()
59571    }
59572}
59573#[allow(rustdoc::invalid_html_tags)]
59574#[doc = "This object describes a sticker to be added to a sticker set."]
59575#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59576pub struct InputStickerBuilder {
59577    #[allow(rustdoc::invalid_html_tags)]
59578    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59579    #[serde(rename = "sticker")]
59580    pub sticker: String,
59581    #[allow(rustdoc::invalid_html_tags)]
59582    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
59583    #[serde(rename = "format")]
59584    pub format: String,
59585    #[allow(rustdoc::invalid_html_tags)]
59586    #[doc = "List of 1-20 emoji associated with the sticker"]
59587    #[serde(rename = "emoji_list")]
59588    pub emoji_list: Vec<String>,
59589    #[allow(rustdoc::invalid_html_tags)]
59590    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
59591    #[serde(
59592        skip_serializing_if = "Option::is_none",
59593        rename = "mask_position",
59594        default
59595    )]
59596    pub mask_position: Option<BoxWrapper<Unbox<MaskPosition>>>,
59597    #[allow(rustdoc::invalid_html_tags)]
59598    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
59599    #[serde(skip_serializing_if = "Option::is_none", rename = "keywords", default)]
59600    pub keywords: Option<Vec<String>>,
59601}
59602impl InputStickerBuilder {
59603    #[allow(clippy::too_many_arguments)]
59604    pub fn new(sticker: String, format: String, emoji_list: Vec<String>) -> Self {
59605        Self {
59606            sticker,
59607            format,
59608            emoji_list,
59609            mask_position: None,
59610            keywords: None,
59611        }
59612    }
59613    #[allow(rustdoc::invalid_html_tags)]
59614    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59615    pub fn set_sticker(mut self, sticker: String) -> Self {
59616        self.sticker = sticker;
59617        self
59618    }
59619    #[allow(rustdoc::invalid_html_tags)]
59620    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
59621    pub fn set_format(mut self, format: String) -> Self {
59622        self.format = format;
59623        self
59624    }
59625    #[allow(rustdoc::invalid_html_tags)]
59626    #[doc = "List of 1-20 emoji associated with the sticker"]
59627    pub fn set_emoji_list(mut self, emoji_list: Vec<String>) -> Self {
59628        self.emoji_list = emoji_list;
59629        self
59630    }
59631    #[allow(rustdoc::invalid_html_tags)]
59632    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
59633    pub fn set_mask_position(mut self, mask_position: MaskPosition) -> Self {
59634        self.mask_position = Some(BoxWrapper(Unbox(mask_position)));
59635        self
59636    }
59637    #[allow(rustdoc::invalid_html_tags)]
59638    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
59639    pub fn set_keywords(mut self, keywords: Vec<String>) -> Self {
59640        self.keywords = Some(keywords);
59641        self
59642    }
59643    pub fn build(self) -> InputSticker {
59644        InputSticker {
59645            sticker: self.sticker,
59646            format: self.format,
59647            emoji_list: self.emoji_list,
59648            mask_position: self.mask_position,
59649            keywords: self.keywords,
59650        }
59651    }
59652}
59653#[allow(rustdoc::invalid_html_tags)]
59654#[doc = "The paid media to send is a photo."]
59655#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59656pub struct InputPaidMediaPhoto {
59657    #[allow(rustdoc::invalid_html_tags)]
59658    #[doc = "Type of the media, must be photo"]
59659    #[serde(rename = "type")]
59660    pub tg_type: String,
59661    #[allow(rustdoc::invalid_html_tags)]
59662    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59663    #[serde(rename = "media")]
59664    pub media: String,
59665}
59666#[allow(rustdoc::invalid_html_tags)]
59667#[doc = "Companion type to InputPaidMediaPhoto that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
59668#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59669pub struct NoSkipInputPaidMediaPhoto {
59670    #[allow(rustdoc::invalid_html_tags)]
59671    #[doc = "Type of the media, must be photo"]
59672    #[serde(rename = "type")]
59673    pub tg_type: String,
59674    #[allow(rustdoc::invalid_html_tags)]
59675    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59676    #[serde(rename = "media")]
59677    pub media: String,
59678}
59679impl From<NoSkipInputPaidMediaPhoto> for InputPaidMediaPhoto {
59680    fn from(t: NoSkipInputPaidMediaPhoto) -> Self {
59681        Self {
59682            tg_type: t.tg_type,
59683            media: t.media,
59684        }
59685    }
59686}
59687#[allow(clippy::from_over_into)]
59688impl Into<NoSkipInputPaidMediaPhoto> for InputPaidMediaPhoto {
59689    fn into(self) -> NoSkipInputPaidMediaPhoto {
59690        NoSkipInputPaidMediaPhoto {
59691            tg_type: self.tg_type,
59692            media: self.media,
59693        }
59694    }
59695}
59696impl NoSkipInputPaidMediaPhoto {
59697    pub fn skip(self) -> InputPaidMediaPhoto {
59698        self.into()
59699    }
59700}
59701impl InputPaidMediaPhoto {
59702    pub fn noskip(self) -> NoSkipInputPaidMediaPhoto {
59703        self.into()
59704    }
59705}
59706#[allow(rustdoc::invalid_html_tags)]
59707#[doc = "The paid media to send is a photo."]
59708#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59709pub struct InputPaidMediaPhotoBuilder {
59710    #[allow(rustdoc::invalid_html_tags)]
59711    #[doc = "Type of the media, must be photo"]
59712    #[serde(rename = "type")]
59713    pub tg_type: String,
59714    #[allow(rustdoc::invalid_html_tags)]
59715    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59716    #[serde(rename = "media")]
59717    pub media: String,
59718}
59719impl InputPaidMediaPhotoBuilder {
59720    #[allow(clippy::too_many_arguments)]
59721    pub fn new(media: String) -> Self {
59722        Self {
59723            tg_type: "photo".to_owned(),
59724            media,
59725        }
59726    }
59727    #[allow(rustdoc::invalid_html_tags)]
59728    #[doc = "Type of the media, must be photo"]
59729    pub fn set_type(mut self, tg_type: String) -> Self {
59730        self.tg_type = tg_type;
59731        self
59732    }
59733    #[allow(rustdoc::invalid_html_tags)]
59734    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59735    pub fn set_media(mut self, media: String) -> Self {
59736        self.media = media;
59737        self
59738    }
59739    pub fn build(self) -> InputPaidMediaPhoto {
59740        InputPaidMediaPhoto {
59741            tg_type: self.tg_type,
59742            media: self.media,
59743        }
59744    }
59745}
59746#[allow(rustdoc::invalid_html_tags)]
59747#[doc = "A static profile photo in the .JPG format."]
59748#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59749pub struct InputProfilePhotoStatic {
59750    #[allow(rustdoc::invalid_html_tags)]
59751    #[doc = "Type of the profile photo, must be static"]
59752    #[serde(rename = "type")]
59753    pub tg_type: String,
59754    #[allow(rustdoc::invalid_html_tags)]
59755    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59756    #[serde(rename = "photo")]
59757    pub photo: String,
59758}
59759#[allow(rustdoc::invalid_html_tags)]
59760#[doc = "Companion type to InputProfilePhotoStatic that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
59761#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59762pub struct NoSkipInputProfilePhotoStatic {
59763    #[allow(rustdoc::invalid_html_tags)]
59764    #[doc = "Type of the profile photo, must be static"]
59765    #[serde(rename = "type")]
59766    pub tg_type: String,
59767    #[allow(rustdoc::invalid_html_tags)]
59768    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59769    #[serde(rename = "photo")]
59770    pub photo: String,
59771}
59772impl From<NoSkipInputProfilePhotoStatic> for InputProfilePhotoStatic {
59773    fn from(t: NoSkipInputProfilePhotoStatic) -> Self {
59774        Self {
59775            tg_type: t.tg_type,
59776            photo: t.photo,
59777        }
59778    }
59779}
59780#[allow(clippy::from_over_into)]
59781impl Into<NoSkipInputProfilePhotoStatic> for InputProfilePhotoStatic {
59782    fn into(self) -> NoSkipInputProfilePhotoStatic {
59783        NoSkipInputProfilePhotoStatic {
59784            tg_type: self.tg_type,
59785            photo: self.photo,
59786        }
59787    }
59788}
59789impl NoSkipInputProfilePhotoStatic {
59790    pub fn skip(self) -> InputProfilePhotoStatic {
59791        self.into()
59792    }
59793}
59794impl InputProfilePhotoStatic {
59795    pub fn noskip(self) -> NoSkipInputProfilePhotoStatic {
59796        self.into()
59797    }
59798}
59799#[allow(rustdoc::invalid_html_tags)]
59800#[doc = "A static profile photo in the .JPG format."]
59801#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59802pub struct InputProfilePhotoStaticBuilder {
59803    #[allow(rustdoc::invalid_html_tags)]
59804    #[doc = "Type of the profile photo, must be static"]
59805    #[serde(rename = "type")]
59806    pub tg_type: String,
59807    #[allow(rustdoc::invalid_html_tags)]
59808    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59809    #[serde(rename = "photo")]
59810    pub photo: String,
59811}
59812impl InputProfilePhotoStaticBuilder {
59813    #[allow(clippy::too_many_arguments)]
59814    pub fn new(photo: String) -> Self {
59815        Self {
59816            tg_type: "static".to_owned(),
59817            photo,
59818        }
59819    }
59820    #[allow(rustdoc::invalid_html_tags)]
59821    #[doc = "Type of the profile photo, must be static"]
59822    pub fn set_type(mut self, tg_type: String) -> Self {
59823        self.tg_type = tg_type;
59824        self
59825    }
59826    #[allow(rustdoc::invalid_html_tags)]
59827    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
59828    pub fn set_photo(mut self, photo: String) -> Self {
59829        self.photo = photo;
59830        self
59831    }
59832    pub fn build(self) -> InputProfilePhotoStatic {
59833        InputProfilePhotoStatic {
59834            tg_type: self.tg_type,
59835            photo: self.photo,
59836        }
59837    }
59838}
59839#[allow(rustdoc::invalid_html_tags)]
59840#[doc = "Describes a transaction with a chat."]
59841#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59842pub struct TransactionPartnerChat {
59843    #[allow(rustdoc::invalid_html_tags)]
59844    #[doc = "Type of the transaction partner, always \"chat\""]
59845    #[serde(rename = "type")]
59846    pub tg_type: String,
59847    #[allow(rustdoc::invalid_html_tags)]
59848    #[doc = "Information about the chat"]
59849    #[serde(rename = "chat")]
59850    pub chat: BoxWrapper<Unbox<Chat>>,
59851    #[allow(rustdoc::invalid_html_tags)]
59852    #[doc = "Optional. The gift sent to the chat by the bot"]
59853    #[serde(skip_serializing_if = "Option::is_none", rename = "gift", default)]
59854    pub gift: Option<BoxWrapper<Unbox<Gift>>>,
59855}
59856#[allow(rustdoc::invalid_html_tags)]
59857#[doc = "Companion type to TransactionPartnerChat that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
59858#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59859pub struct NoSkipTransactionPartnerChat {
59860    #[allow(rustdoc::invalid_html_tags)]
59861    #[doc = "Type of the transaction partner, always \"chat\""]
59862    #[serde(rename = "type")]
59863    pub tg_type: String,
59864    #[allow(rustdoc::invalid_html_tags)]
59865    #[doc = "Information about the chat"]
59866    #[serde(rename = "chat")]
59867    pub chat: BoxWrapper<Unbox<Chat>>,
59868    pub gift: Option<BoxWrapper<Unbox<Gift>>>,
59869}
59870impl From<NoSkipTransactionPartnerChat> for TransactionPartnerChat {
59871    fn from(t: NoSkipTransactionPartnerChat) -> Self {
59872        Self {
59873            tg_type: t.tg_type,
59874            chat: t.chat,
59875            gift: t.gift,
59876        }
59877    }
59878}
59879#[allow(clippy::from_over_into)]
59880impl Into<NoSkipTransactionPartnerChat> for TransactionPartnerChat {
59881    fn into(self) -> NoSkipTransactionPartnerChat {
59882        NoSkipTransactionPartnerChat {
59883            tg_type: self.tg_type,
59884            chat: self.chat,
59885            gift: self.gift,
59886        }
59887    }
59888}
59889impl NoSkipTransactionPartnerChat {
59890    pub fn skip(self) -> TransactionPartnerChat {
59891        self.into()
59892    }
59893}
59894impl TransactionPartnerChat {
59895    pub fn noskip(self) -> NoSkipTransactionPartnerChat {
59896        self.into()
59897    }
59898}
59899#[allow(rustdoc::invalid_html_tags)]
59900#[doc = "Describes a transaction with a chat."]
59901#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59902pub struct TransactionPartnerChatBuilder {
59903    #[allow(rustdoc::invalid_html_tags)]
59904    #[doc = "Type of the transaction partner, always \"chat\""]
59905    #[serde(rename = "type")]
59906    pub tg_type: String,
59907    #[allow(rustdoc::invalid_html_tags)]
59908    #[doc = "Information about the chat"]
59909    #[serde(rename = "chat")]
59910    pub chat: BoxWrapper<Unbox<Chat>>,
59911    #[allow(rustdoc::invalid_html_tags)]
59912    #[doc = "Optional. The gift sent to the chat by the bot"]
59913    #[serde(skip_serializing_if = "Option::is_none", rename = "gift", default)]
59914    pub gift: Option<BoxWrapper<Unbox<Gift>>>,
59915}
59916impl TransactionPartnerChatBuilder {
59917    #[allow(clippy::too_many_arguments)]
59918    pub fn new<A: Into<Chat>>(chat: A) -> Self {
59919        Self {
59920            tg_type: "TransactionPartnerChat".to_owned(),
59921            chat: BoxWrapper::new_unbox(chat.into()),
59922            gift: None,
59923        }
59924    }
59925    #[allow(rustdoc::invalid_html_tags)]
59926    #[doc = "Type of the transaction partner, always \"chat\""]
59927    pub fn set_type(mut self, tg_type: String) -> Self {
59928        self.tg_type = tg_type;
59929        self
59930    }
59931    #[allow(rustdoc::invalid_html_tags)]
59932    #[doc = "Information about the chat"]
59933    pub fn set_chat(mut self, chat: Chat) -> Self {
59934        self.chat = BoxWrapper(Unbox(chat));
59935        self
59936    }
59937    #[allow(rustdoc::invalid_html_tags)]
59938    #[doc = "Optional. The gift sent to the chat by the bot"]
59939    pub fn set_gift(mut self, gift: Gift) -> Self {
59940        self.gift = Some(BoxWrapper(Unbox(gift)));
59941        self
59942    }
59943    pub fn build(self) -> TransactionPartnerChat {
59944        TransactionPartnerChat {
59945            tg_type: self.tg_type,
59946            chat: self.chat,
59947            gift: self.gift,
59948        }
59949    }
59950}
59951#[allow(rustdoc::invalid_html_tags)]
59952#[doc = "Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat."]
59953#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59954pub struct BotCommandScopeChatAdministrators {
59955    #[allow(rustdoc::invalid_html_tags)]
59956    #[doc = "Scope type, must be chat_administrators"]
59957    #[serde(rename = "type")]
59958    pub tg_type: String,
59959    #[allow(rustdoc::invalid_html_tags)]
59960    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
59961    #[serde(rename = "chat_id")]
59962    pub chat_id: ChatHandle,
59963}
59964#[allow(rustdoc::invalid_html_tags)]
59965#[doc = "Companion type to BotCommandScopeChatAdministrators that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
59966#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
59967pub struct NoSkipBotCommandScopeChatAdministrators {
59968    #[allow(rustdoc::invalid_html_tags)]
59969    #[doc = "Scope type, must be chat_administrators"]
59970    #[serde(rename = "type")]
59971    pub tg_type: String,
59972    #[allow(rustdoc::invalid_html_tags)]
59973    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
59974    #[serde(rename = "chat_id")]
59975    pub chat_id: ChatHandle,
59976}
59977impl From<NoSkipBotCommandScopeChatAdministrators> for BotCommandScopeChatAdministrators {
59978    fn from(t: NoSkipBotCommandScopeChatAdministrators) -> Self {
59979        Self {
59980            tg_type: t.tg_type,
59981            chat_id: t.chat_id,
59982        }
59983    }
59984}
59985#[allow(clippy::from_over_into)]
59986impl Into<NoSkipBotCommandScopeChatAdministrators> for BotCommandScopeChatAdministrators {
59987    fn into(self) -> NoSkipBotCommandScopeChatAdministrators {
59988        NoSkipBotCommandScopeChatAdministrators {
59989            tg_type: self.tg_type,
59990            chat_id: self.chat_id,
59991        }
59992    }
59993}
59994impl NoSkipBotCommandScopeChatAdministrators {
59995    pub fn skip(self) -> BotCommandScopeChatAdministrators {
59996        self.into()
59997    }
59998}
59999impl BotCommandScopeChatAdministrators {
60000    pub fn noskip(self) -> NoSkipBotCommandScopeChatAdministrators {
60001        self.into()
60002    }
60003}
60004#[allow(rustdoc::invalid_html_tags)]
60005#[doc = "Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat."]
60006#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60007pub struct BotCommandScopeChatAdministratorsBuilder {
60008    #[allow(rustdoc::invalid_html_tags)]
60009    #[doc = "Scope type, must be chat_administrators"]
60010    #[serde(rename = "type")]
60011    pub tg_type: String,
60012    #[allow(rustdoc::invalid_html_tags)]
60013    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
60014    #[serde(rename = "chat_id")]
60015    pub chat_id: ChatHandle,
60016}
60017impl BotCommandScopeChatAdministratorsBuilder {
60018    #[allow(clippy::too_many_arguments)]
60019    pub fn new(chat_id: ChatHandle) -> Self {
60020        Self {
60021            tg_type: "chat_administrators".to_owned(),
60022            chat_id,
60023        }
60024    }
60025    #[allow(rustdoc::invalid_html_tags)]
60026    #[doc = "Scope type, must be chat_administrators"]
60027    pub fn set_type(mut self, tg_type: String) -> Self {
60028        self.tg_type = tg_type;
60029        self
60030    }
60031    #[allow(rustdoc::invalid_html_tags)]
60032    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
60033    pub fn set_chat_id(mut self, chat_id: ChatHandle) -> Self {
60034        self.chat_id = chat_id;
60035        self
60036    }
60037    pub fn build(self) -> BotCommandScopeChatAdministrators {
60038        BotCommandScopeChatAdministrators {
60039            tg_type: self.tg_type,
60040            chat_id: self.chat_id,
60041        }
60042    }
60043}
60044#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
60045pub struct ForumTopicClosed {}
60046impl ForumTopicClosed {}
60047#[allow(rustdoc::invalid_html_tags)]
60048#[doc = "This object contains information about a paid media purchase."]
60049#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60050pub struct PaidMediaPurchased {
60051    #[allow(rustdoc::invalid_html_tags)]
60052    #[doc = "User who purchased the media"]
60053    #[serde(rename = "from")]
60054    pub from: BoxWrapper<Unbox<User>>,
60055    #[allow(rustdoc::invalid_html_tags)]
60056    #[doc = "Bot-specified paid media payload"]
60057    #[serde(rename = "paid_media_payload")]
60058    pub paid_media_payload: String,
60059}
60060#[allow(rustdoc::invalid_html_tags)]
60061#[doc = "Companion type to PaidMediaPurchased that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
60062#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60063pub struct NoSkipPaidMediaPurchased {
60064    #[allow(rustdoc::invalid_html_tags)]
60065    #[doc = "User who purchased the media"]
60066    #[serde(rename = "from")]
60067    pub from: BoxWrapper<Unbox<User>>,
60068    #[allow(rustdoc::invalid_html_tags)]
60069    #[doc = "Bot-specified paid media payload"]
60070    #[serde(rename = "paid_media_payload")]
60071    pub paid_media_payload: String,
60072}
60073impl From<NoSkipPaidMediaPurchased> for PaidMediaPurchased {
60074    fn from(t: NoSkipPaidMediaPurchased) -> Self {
60075        Self {
60076            from: t.from,
60077            paid_media_payload: t.paid_media_payload,
60078        }
60079    }
60080}
60081#[allow(clippy::from_over_into)]
60082impl Into<NoSkipPaidMediaPurchased> for PaidMediaPurchased {
60083    fn into(self) -> NoSkipPaidMediaPurchased {
60084        NoSkipPaidMediaPurchased {
60085            from: self.from,
60086            paid_media_payload: self.paid_media_payload,
60087        }
60088    }
60089}
60090impl NoSkipPaidMediaPurchased {
60091    pub fn skip(self) -> PaidMediaPurchased {
60092        self.into()
60093    }
60094}
60095impl PaidMediaPurchased {
60096    pub fn noskip(self) -> NoSkipPaidMediaPurchased {
60097        self.into()
60098    }
60099}
60100#[allow(rustdoc::invalid_html_tags)]
60101#[doc = "This object contains information about a paid media purchase."]
60102#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60103pub struct PaidMediaPurchasedBuilder {
60104    #[allow(rustdoc::invalid_html_tags)]
60105    #[doc = "User who purchased the media"]
60106    #[serde(rename = "from")]
60107    pub from: BoxWrapper<Unbox<User>>,
60108    #[allow(rustdoc::invalid_html_tags)]
60109    #[doc = "Bot-specified paid media payload"]
60110    #[serde(rename = "paid_media_payload")]
60111    pub paid_media_payload: String,
60112}
60113impl PaidMediaPurchasedBuilder {
60114    #[allow(clippy::too_many_arguments)]
60115    pub fn new<A: Into<User>>(from: A, paid_media_payload: String) -> Self {
60116        Self {
60117            from: BoxWrapper::new_unbox(from.into()),
60118            paid_media_payload,
60119        }
60120    }
60121    #[allow(rustdoc::invalid_html_tags)]
60122    #[doc = "User who purchased the media"]
60123    pub fn set_from(mut self, from: User) -> Self {
60124        self.from = BoxWrapper(Unbox(from));
60125        self
60126    }
60127    #[allow(rustdoc::invalid_html_tags)]
60128    #[doc = "Bot-specified paid media payload"]
60129    pub fn set_paid_media_payload(mut self, paid_media_payload: String) -> Self {
60130        self.paid_media_payload = paid_media_payload;
60131        self
60132    }
60133    pub fn build(self) -> PaidMediaPurchased {
60134        PaidMediaPurchased {
60135            from: self.from,
60136            paid_media_payload: self.paid_media_payload,
60137        }
60138    }
60139}
60140#[allow(rustdoc::invalid_html_tags)]
60141#[doc = "Represents a location to which a chat is connected."]
60142#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60143pub struct ChatLocation {
60144    #[allow(rustdoc::invalid_html_tags)]
60145    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
60146    #[serde(rename = "location")]
60147    pub location: BoxWrapper<Unbox<Location>>,
60148    #[allow(rustdoc::invalid_html_tags)]
60149    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
60150    #[serde(rename = "address")]
60151    pub address: String,
60152}
60153#[allow(rustdoc::invalid_html_tags)]
60154#[doc = "Companion type to ChatLocation that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
60155#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60156pub struct NoSkipChatLocation {
60157    #[allow(rustdoc::invalid_html_tags)]
60158    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
60159    #[serde(rename = "location")]
60160    pub location: BoxWrapper<Unbox<Location>>,
60161    #[allow(rustdoc::invalid_html_tags)]
60162    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
60163    #[serde(rename = "address")]
60164    pub address: String,
60165}
60166impl From<NoSkipChatLocation> for ChatLocation {
60167    fn from(t: NoSkipChatLocation) -> Self {
60168        Self {
60169            location: t.location,
60170            address: t.address,
60171        }
60172    }
60173}
60174#[allow(clippy::from_over_into)]
60175impl Into<NoSkipChatLocation> for ChatLocation {
60176    fn into(self) -> NoSkipChatLocation {
60177        NoSkipChatLocation {
60178            location: self.location,
60179            address: self.address,
60180        }
60181    }
60182}
60183impl NoSkipChatLocation {
60184    pub fn skip(self) -> ChatLocation {
60185        self.into()
60186    }
60187}
60188impl ChatLocation {
60189    pub fn noskip(self) -> NoSkipChatLocation {
60190        self.into()
60191    }
60192}
60193#[allow(rustdoc::invalid_html_tags)]
60194#[doc = "Represents a location to which a chat is connected."]
60195#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60196pub struct ChatLocationBuilder {
60197    #[allow(rustdoc::invalid_html_tags)]
60198    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
60199    #[serde(rename = "location")]
60200    pub location: BoxWrapper<Unbox<Location>>,
60201    #[allow(rustdoc::invalid_html_tags)]
60202    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
60203    #[serde(rename = "address")]
60204    pub address: String,
60205}
60206impl ChatLocationBuilder {
60207    #[allow(clippy::too_many_arguments)]
60208    pub fn new<A: Into<Location>>(location: A, address: String) -> Self {
60209        Self {
60210            location: BoxWrapper::new_unbox(location.into()),
60211            address,
60212        }
60213    }
60214    #[allow(rustdoc::invalid_html_tags)]
60215    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
60216    pub fn set_location(mut self, location: Location) -> Self {
60217        self.location = BoxWrapper(Unbox(location));
60218        self
60219    }
60220    #[allow(rustdoc::invalid_html_tags)]
60221    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
60222    pub fn set_address(mut self, address: String) -> Self {
60223        self.address = address;
60224        self
60225    }
60226    pub fn build(self) -> ChatLocation {
60227        ChatLocation {
60228            location: self.location,
60229            address: self.address,
60230        }
60231    }
60232}
60233#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
60234pub struct VideoChatStarted {}
60235impl VideoChatStarted {}
60236#[allow(rustdoc::invalid_html_tags)]
60237#[doc = "This object represents changes in the status of a chat member."]
60238#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60239pub struct ChatMemberUpdated {
60240    #[allow(rustdoc::invalid_html_tags)]
60241    #[doc = "Chat the user belongs to"]
60242    #[serde(rename = "chat")]
60243    pub chat: BoxWrapper<Unbox<Chat>>,
60244    #[allow(rustdoc::invalid_html_tags)]
60245    #[doc = "Performer of the action, which resulted in the change"]
60246    #[serde(rename = "from")]
60247    pub from: BoxWrapper<Unbox<User>>,
60248    #[allow(rustdoc::invalid_html_tags)]
60249    #[doc = "Date the change was done in Unix time"]
60250    #[serde(rename = "date")]
60251    pub date: i64,
60252    #[allow(rustdoc::invalid_html_tags)]
60253    #[doc = "Previous information about the chat member"]
60254    #[serde(rename = "old_chat_member")]
60255    pub old_chat_member: BoxWrapper<Unbox<ChatMember>>,
60256    #[allow(rustdoc::invalid_html_tags)]
60257    #[doc = "New information about the chat member"]
60258    #[serde(rename = "new_chat_member")]
60259    pub new_chat_member: BoxWrapper<Unbox<ChatMember>>,
60260    #[allow(rustdoc::invalid_html_tags)]
60261    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
60262    #[serde(
60263        skip_serializing_if = "Option::is_none",
60264        rename = "invite_link",
60265        default
60266    )]
60267    pub invite_link: Option<BoxWrapper<Unbox<ChatInviteLink>>>,
60268    #[allow(rustdoc::invalid_html_tags)]
60269    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
60270    #[serde(
60271        skip_serializing_if = "Option::is_none",
60272        rename = "via_join_request",
60273        default
60274    )]
60275    pub via_join_request: Option<bool>,
60276    #[allow(rustdoc::invalid_html_tags)]
60277    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
60278    #[serde(
60279        skip_serializing_if = "Option::is_none",
60280        rename = "via_chat_folder_invite_link",
60281        default
60282    )]
60283    pub via_chat_folder_invite_link: Option<bool>,
60284}
60285#[allow(rustdoc::invalid_html_tags)]
60286#[doc = "Companion type to ChatMemberUpdated that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
60287#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60288pub struct NoSkipChatMemberUpdated {
60289    #[allow(rustdoc::invalid_html_tags)]
60290    #[doc = "Chat the user belongs to"]
60291    #[serde(rename = "chat")]
60292    pub chat: BoxWrapper<Unbox<Chat>>,
60293    #[allow(rustdoc::invalid_html_tags)]
60294    #[doc = "Performer of the action, which resulted in the change"]
60295    #[serde(rename = "from")]
60296    pub from: BoxWrapper<Unbox<User>>,
60297    #[allow(rustdoc::invalid_html_tags)]
60298    #[doc = "Date the change was done in Unix time"]
60299    #[serde(rename = "date")]
60300    pub date: i64,
60301    #[allow(rustdoc::invalid_html_tags)]
60302    #[doc = "Previous information about the chat member"]
60303    #[serde(rename = "old_chat_member")]
60304    pub old_chat_member: BoxWrapper<Unbox<ChatMember>>,
60305    #[allow(rustdoc::invalid_html_tags)]
60306    #[doc = "New information about the chat member"]
60307    #[serde(rename = "new_chat_member")]
60308    pub new_chat_member: BoxWrapper<Unbox<ChatMember>>,
60309    pub invite_link: Option<BoxWrapper<Unbox<ChatInviteLink>>>,
60310    pub via_join_request: Option<bool>,
60311    pub via_chat_folder_invite_link: Option<bool>,
60312}
60313impl From<NoSkipChatMemberUpdated> for ChatMemberUpdated {
60314    fn from(t: NoSkipChatMemberUpdated) -> Self {
60315        Self {
60316            chat: t.chat,
60317            from: t.from,
60318            date: t.date,
60319            old_chat_member: t.old_chat_member,
60320            new_chat_member: t.new_chat_member,
60321            invite_link: t.invite_link,
60322            via_join_request: t.via_join_request,
60323            via_chat_folder_invite_link: t.via_chat_folder_invite_link,
60324        }
60325    }
60326}
60327#[allow(clippy::from_over_into)]
60328impl Into<NoSkipChatMemberUpdated> for ChatMemberUpdated {
60329    fn into(self) -> NoSkipChatMemberUpdated {
60330        NoSkipChatMemberUpdated {
60331            chat: self.chat,
60332            from: self.from,
60333            date: self.date,
60334            old_chat_member: self.old_chat_member,
60335            new_chat_member: self.new_chat_member,
60336            invite_link: self.invite_link,
60337            via_join_request: self.via_join_request,
60338            via_chat_folder_invite_link: self.via_chat_folder_invite_link,
60339        }
60340    }
60341}
60342impl NoSkipChatMemberUpdated {
60343    pub fn skip(self) -> ChatMemberUpdated {
60344        self.into()
60345    }
60346}
60347impl ChatMemberUpdated {
60348    pub fn noskip(self) -> NoSkipChatMemberUpdated {
60349        self.into()
60350    }
60351}
60352#[allow(rustdoc::invalid_html_tags)]
60353#[doc = "This object represents changes in the status of a chat member."]
60354#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60355pub struct ChatMemberUpdatedBuilder {
60356    #[allow(rustdoc::invalid_html_tags)]
60357    #[doc = "Chat the user belongs to"]
60358    #[serde(rename = "chat")]
60359    pub chat: BoxWrapper<Unbox<Chat>>,
60360    #[allow(rustdoc::invalid_html_tags)]
60361    #[doc = "Performer of the action, which resulted in the change"]
60362    #[serde(rename = "from")]
60363    pub from: BoxWrapper<Unbox<User>>,
60364    #[allow(rustdoc::invalid_html_tags)]
60365    #[doc = "Date the change was done in Unix time"]
60366    #[serde(rename = "date")]
60367    pub date: i64,
60368    #[allow(rustdoc::invalid_html_tags)]
60369    #[doc = "Previous information about the chat member"]
60370    #[serde(rename = "old_chat_member")]
60371    pub old_chat_member: BoxWrapper<Unbox<ChatMember>>,
60372    #[allow(rustdoc::invalid_html_tags)]
60373    #[doc = "New information about the chat member"]
60374    #[serde(rename = "new_chat_member")]
60375    pub new_chat_member: BoxWrapper<Unbox<ChatMember>>,
60376    #[allow(rustdoc::invalid_html_tags)]
60377    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
60378    #[serde(
60379        skip_serializing_if = "Option::is_none",
60380        rename = "invite_link",
60381        default
60382    )]
60383    pub invite_link: Option<BoxWrapper<Unbox<ChatInviteLink>>>,
60384    #[allow(rustdoc::invalid_html_tags)]
60385    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
60386    #[serde(
60387        skip_serializing_if = "Option::is_none",
60388        rename = "via_join_request",
60389        default
60390    )]
60391    pub via_join_request: Option<bool>,
60392    #[allow(rustdoc::invalid_html_tags)]
60393    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
60394    #[serde(
60395        skip_serializing_if = "Option::is_none",
60396        rename = "via_chat_folder_invite_link",
60397        default
60398    )]
60399    pub via_chat_folder_invite_link: Option<bool>,
60400}
60401impl ChatMemberUpdatedBuilder {
60402    #[allow(clippy::too_many_arguments)]
60403    pub fn new<A: Into<Chat>, B: Into<User>, C: Into<ChatMember>, D: Into<ChatMember>>(
60404        chat: A,
60405        from: B,
60406        date: i64,
60407        old_chat_member: C,
60408        new_chat_member: D,
60409    ) -> Self {
60410        Self {
60411            chat: BoxWrapper::new_unbox(chat.into()),
60412            from: BoxWrapper::new_unbox(from.into()),
60413            date,
60414            old_chat_member: BoxWrapper::new_unbox(old_chat_member.into()),
60415            new_chat_member: BoxWrapper::new_unbox(new_chat_member.into()),
60416            invite_link: None,
60417            via_join_request: None,
60418            via_chat_folder_invite_link: None,
60419        }
60420    }
60421    #[allow(rustdoc::invalid_html_tags)]
60422    #[doc = "Chat the user belongs to"]
60423    pub fn set_chat(mut self, chat: Chat) -> Self {
60424        self.chat = BoxWrapper(Unbox(chat));
60425        self
60426    }
60427    #[allow(rustdoc::invalid_html_tags)]
60428    #[doc = "Performer of the action, which resulted in the change"]
60429    pub fn set_from(mut self, from: User) -> Self {
60430        self.from = BoxWrapper(Unbox(from));
60431        self
60432    }
60433    #[allow(rustdoc::invalid_html_tags)]
60434    #[doc = "Date the change was done in Unix time"]
60435    pub fn set_date(mut self, date: i64) -> Self {
60436        self.date = date;
60437        self
60438    }
60439    #[allow(rustdoc::invalid_html_tags)]
60440    #[doc = "Previous information about the chat member"]
60441    pub fn set_old_chat_member(mut self, old_chat_member: ChatMember) -> Self {
60442        self.old_chat_member = BoxWrapper(Unbox(old_chat_member));
60443        self
60444    }
60445    #[allow(rustdoc::invalid_html_tags)]
60446    #[doc = "New information about the chat member"]
60447    pub fn set_new_chat_member(mut self, new_chat_member: ChatMember) -> Self {
60448        self.new_chat_member = BoxWrapper(Unbox(new_chat_member));
60449        self
60450    }
60451    #[allow(rustdoc::invalid_html_tags)]
60452    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
60453    pub fn set_invite_link(mut self, invite_link: ChatInviteLink) -> Self {
60454        self.invite_link = Some(BoxWrapper(Unbox(invite_link)));
60455        self
60456    }
60457    #[allow(rustdoc::invalid_html_tags)]
60458    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
60459    pub fn set_via_join_request(mut self, via_join_request: bool) -> Self {
60460        self.via_join_request = Some(via_join_request);
60461        self
60462    }
60463    #[allow(rustdoc::invalid_html_tags)]
60464    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
60465    pub fn set_via_chat_folder_invite_link(mut self, via_chat_folder_invite_link: bool) -> Self {
60466        self.via_chat_folder_invite_link = Some(via_chat_folder_invite_link);
60467        self
60468    }
60469    pub fn build(self) -> ChatMemberUpdated {
60470        ChatMemberUpdated {
60471            chat: self.chat,
60472            from: self.from,
60473            date: self.date,
60474            old_chat_member: self.old_chat_member,
60475            new_chat_member: self.new_chat_member,
60476            invite_link: self.invite_link,
60477            via_join_request: self.via_join_request,
60478            via_chat_folder_invite_link: self.via_chat_folder_invite_link,
60479        }
60480    }
60481}
60482#[allow(rustdoc::invalid_html_tags)]
60483#[doc = "This object represents a venue."]
60484#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60485pub struct Venue {
60486    #[allow(rustdoc::invalid_html_tags)]
60487    #[doc = "Venue location. Can't be a live location"]
60488    #[serde(rename = "location")]
60489    pub location: BoxWrapper<Unbox<Location>>,
60490    #[allow(rustdoc::invalid_html_tags)]
60491    #[doc = "Name of the venue"]
60492    #[serde(rename = "title")]
60493    pub title: String,
60494    #[allow(rustdoc::invalid_html_tags)]
60495    #[doc = "Address of the venue"]
60496    #[serde(rename = "address")]
60497    pub address: String,
60498    #[allow(rustdoc::invalid_html_tags)]
60499    #[doc = "Optional. Foursquare identifier of the venue"]
60500    #[serde(
60501        skip_serializing_if = "Option::is_none",
60502        rename = "foursquare_id",
60503        default
60504    )]
60505    pub foursquare_id: Option<String>,
60506    #[allow(rustdoc::invalid_html_tags)]
60507    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
60508    #[serde(
60509        skip_serializing_if = "Option::is_none",
60510        rename = "foursquare_type",
60511        default
60512    )]
60513    pub foursquare_type: Option<String>,
60514    #[allow(rustdoc::invalid_html_tags)]
60515    #[doc = "Optional. Google Places identifier of the venue"]
60516    #[serde(
60517        skip_serializing_if = "Option::is_none",
60518        rename = "google_place_id",
60519        default
60520    )]
60521    pub google_place_id: Option<String>,
60522    #[allow(rustdoc::invalid_html_tags)]
60523    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
60524    #[serde(
60525        skip_serializing_if = "Option::is_none",
60526        rename = "google_place_type",
60527        default
60528    )]
60529    pub google_place_type: Option<String>,
60530}
60531#[allow(rustdoc::invalid_html_tags)]
60532#[doc = "Companion type to Venue that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
60533#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60534pub struct NoSkipVenue {
60535    #[allow(rustdoc::invalid_html_tags)]
60536    #[doc = "Venue location. Can't be a live location"]
60537    #[serde(rename = "location")]
60538    pub location: BoxWrapper<Unbox<Location>>,
60539    #[allow(rustdoc::invalid_html_tags)]
60540    #[doc = "Name of the venue"]
60541    #[serde(rename = "title")]
60542    pub title: String,
60543    #[allow(rustdoc::invalid_html_tags)]
60544    #[doc = "Address of the venue"]
60545    #[serde(rename = "address")]
60546    pub address: String,
60547    pub foursquare_id: Option<String>,
60548    pub foursquare_type: Option<String>,
60549    pub google_place_id: Option<String>,
60550    pub google_place_type: Option<String>,
60551}
60552impl From<NoSkipVenue> for Venue {
60553    fn from(t: NoSkipVenue) -> Self {
60554        Self {
60555            location: t.location,
60556            title: t.title,
60557            address: t.address,
60558            foursquare_id: t.foursquare_id,
60559            foursquare_type: t.foursquare_type,
60560            google_place_id: t.google_place_id,
60561            google_place_type: t.google_place_type,
60562        }
60563    }
60564}
60565#[allow(clippy::from_over_into)]
60566impl Into<NoSkipVenue> for Venue {
60567    fn into(self) -> NoSkipVenue {
60568        NoSkipVenue {
60569            location: self.location,
60570            title: self.title,
60571            address: self.address,
60572            foursquare_id: self.foursquare_id,
60573            foursquare_type: self.foursquare_type,
60574            google_place_id: self.google_place_id,
60575            google_place_type: self.google_place_type,
60576        }
60577    }
60578}
60579impl NoSkipVenue {
60580    pub fn skip(self) -> Venue {
60581        self.into()
60582    }
60583}
60584impl Venue {
60585    pub fn noskip(self) -> NoSkipVenue {
60586        self.into()
60587    }
60588}
60589#[allow(rustdoc::invalid_html_tags)]
60590#[doc = "This object represents a venue."]
60591#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60592pub struct VenueBuilder {
60593    #[allow(rustdoc::invalid_html_tags)]
60594    #[doc = "Venue location. Can't be a live location"]
60595    #[serde(rename = "location")]
60596    pub location: BoxWrapper<Unbox<Location>>,
60597    #[allow(rustdoc::invalid_html_tags)]
60598    #[doc = "Name of the venue"]
60599    #[serde(rename = "title")]
60600    pub title: String,
60601    #[allow(rustdoc::invalid_html_tags)]
60602    #[doc = "Address of the venue"]
60603    #[serde(rename = "address")]
60604    pub address: String,
60605    #[allow(rustdoc::invalid_html_tags)]
60606    #[doc = "Optional. Foursquare identifier of the venue"]
60607    #[serde(
60608        skip_serializing_if = "Option::is_none",
60609        rename = "foursquare_id",
60610        default
60611    )]
60612    pub foursquare_id: Option<String>,
60613    #[allow(rustdoc::invalid_html_tags)]
60614    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
60615    #[serde(
60616        skip_serializing_if = "Option::is_none",
60617        rename = "foursquare_type",
60618        default
60619    )]
60620    pub foursquare_type: Option<String>,
60621    #[allow(rustdoc::invalid_html_tags)]
60622    #[doc = "Optional. Google Places identifier of the venue"]
60623    #[serde(
60624        skip_serializing_if = "Option::is_none",
60625        rename = "google_place_id",
60626        default
60627    )]
60628    pub google_place_id: Option<String>,
60629    #[allow(rustdoc::invalid_html_tags)]
60630    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
60631    #[serde(
60632        skip_serializing_if = "Option::is_none",
60633        rename = "google_place_type",
60634        default
60635    )]
60636    pub google_place_type: Option<String>,
60637}
60638impl VenueBuilder {
60639    #[allow(clippy::too_many_arguments)]
60640    pub fn new<A: Into<Location>>(location: A, title: String, address: String) -> Self {
60641        Self {
60642            location: BoxWrapper::new_unbox(location.into()),
60643            title,
60644            address,
60645            foursquare_id: None,
60646            foursquare_type: None,
60647            google_place_id: None,
60648            google_place_type: None,
60649        }
60650    }
60651    #[allow(rustdoc::invalid_html_tags)]
60652    #[doc = "Venue location. Can't be a live location"]
60653    pub fn set_location(mut self, location: Location) -> Self {
60654        self.location = BoxWrapper(Unbox(location));
60655        self
60656    }
60657    #[allow(rustdoc::invalid_html_tags)]
60658    #[doc = "Name of the venue"]
60659    pub fn set_title(mut self, title: String) -> Self {
60660        self.title = title;
60661        self
60662    }
60663    #[allow(rustdoc::invalid_html_tags)]
60664    #[doc = "Address of the venue"]
60665    pub fn set_address(mut self, address: String) -> Self {
60666        self.address = address;
60667        self
60668    }
60669    #[allow(rustdoc::invalid_html_tags)]
60670    #[doc = "Optional. Foursquare identifier of the venue"]
60671    pub fn set_foursquare_id(mut self, foursquare_id: String) -> Self {
60672        self.foursquare_id = Some(foursquare_id);
60673        self
60674    }
60675    #[allow(rustdoc::invalid_html_tags)]
60676    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
60677    pub fn set_foursquare_type(mut self, foursquare_type: String) -> Self {
60678        self.foursquare_type = Some(foursquare_type);
60679        self
60680    }
60681    #[allow(rustdoc::invalid_html_tags)]
60682    #[doc = "Optional. Google Places identifier of the venue"]
60683    pub fn set_google_place_id(mut self, google_place_id: String) -> Self {
60684        self.google_place_id = Some(google_place_id);
60685        self
60686    }
60687    #[allow(rustdoc::invalid_html_tags)]
60688    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
60689    pub fn set_google_place_type(mut self, google_place_type: String) -> Self {
60690        self.google_place_type = Some(google_place_type);
60691        self
60692    }
60693    pub fn build(self) -> Venue {
60694        Venue {
60695            location: self.location,
60696            title: self.title,
60697            address: self.address,
60698            foursquare_id: self.foursquare_id,
60699            foursquare_type: self.foursquare_type,
60700            google_place_id: self.google_place_id,
60701            google_place_type: self.google_place_type,
60702        }
60703    }
60704}
60705#[allow(rustdoc::invalid_html_tags)]
60706#[doc = "This object represents a service message about a user boosting a chat."]
60707#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60708pub struct ChatBoostAdded {
60709    #[allow(rustdoc::invalid_html_tags)]
60710    #[doc = "Number of boosts added by the user"]
60711    #[serde(rename = "boost_count")]
60712    pub boost_count: i64,
60713}
60714#[allow(rustdoc::invalid_html_tags)]
60715#[doc = "Companion type to ChatBoostAdded that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
60716#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60717pub struct NoSkipChatBoostAdded {
60718    #[allow(rustdoc::invalid_html_tags)]
60719    #[doc = "Number of boosts added by the user"]
60720    #[serde(rename = "boost_count")]
60721    pub boost_count: i64,
60722}
60723impl From<NoSkipChatBoostAdded> for ChatBoostAdded {
60724    fn from(t: NoSkipChatBoostAdded) -> Self {
60725        Self {
60726            boost_count: t.boost_count,
60727        }
60728    }
60729}
60730#[allow(clippy::from_over_into)]
60731impl Into<NoSkipChatBoostAdded> for ChatBoostAdded {
60732    fn into(self) -> NoSkipChatBoostAdded {
60733        NoSkipChatBoostAdded {
60734            boost_count: self.boost_count,
60735        }
60736    }
60737}
60738impl NoSkipChatBoostAdded {
60739    pub fn skip(self) -> ChatBoostAdded {
60740        self.into()
60741    }
60742}
60743impl ChatBoostAdded {
60744    pub fn noskip(self) -> NoSkipChatBoostAdded {
60745        self.into()
60746    }
60747}
60748#[allow(rustdoc::invalid_html_tags)]
60749#[doc = "This object represents a service message about a user boosting a chat."]
60750#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60751pub struct ChatBoostAddedBuilder {
60752    #[allow(rustdoc::invalid_html_tags)]
60753    #[doc = "Number of boosts added by the user"]
60754    #[serde(rename = "boost_count")]
60755    pub boost_count: i64,
60756}
60757impl ChatBoostAddedBuilder {
60758    #[allow(clippy::too_many_arguments)]
60759    pub fn new(boost_count: i64) -> Self {
60760        Self { boost_count }
60761    }
60762    #[allow(rustdoc::invalid_html_tags)]
60763    #[doc = "Number of boosts added by the user"]
60764    pub fn set_boost_count(mut self, boost_count: i64) -> Self {
60765        self.boost_count = boost_count;
60766        self
60767    }
60768    pub fn build(self) -> ChatBoostAdded {
60769        ChatBoostAdded {
60770            boost_count: self.boost_count,
60771        }
60772    }
60773}
60774#[allow(rustdoc::invalid_html_tags)]
60775#[doc = "The reaction is based on a custom emoji."]
60776#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60777pub struct ReactionTypeCustomEmoji {
60778    #[allow(rustdoc::invalid_html_tags)]
60779    #[doc = "Type of the reaction, always \"custom_emoji\""]
60780    #[serde(rename = "type")]
60781    pub tg_type: String,
60782    #[allow(rustdoc::invalid_html_tags)]
60783    #[doc = "Custom emoji identifier"]
60784    #[serde(rename = "custom_emoji_id")]
60785    pub custom_emoji_id: String,
60786}
60787#[allow(rustdoc::invalid_html_tags)]
60788#[doc = "Companion type to ReactionTypeCustomEmoji that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
60789#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60790pub struct NoSkipReactionTypeCustomEmoji {
60791    #[allow(rustdoc::invalid_html_tags)]
60792    #[doc = "Type of the reaction, always \"custom_emoji\""]
60793    #[serde(rename = "type")]
60794    pub tg_type: String,
60795    #[allow(rustdoc::invalid_html_tags)]
60796    #[doc = "Custom emoji identifier"]
60797    #[serde(rename = "custom_emoji_id")]
60798    pub custom_emoji_id: String,
60799}
60800impl From<NoSkipReactionTypeCustomEmoji> for ReactionTypeCustomEmoji {
60801    fn from(t: NoSkipReactionTypeCustomEmoji) -> Self {
60802        Self {
60803            tg_type: t.tg_type,
60804            custom_emoji_id: t.custom_emoji_id,
60805        }
60806    }
60807}
60808#[allow(clippy::from_over_into)]
60809impl Into<NoSkipReactionTypeCustomEmoji> for ReactionTypeCustomEmoji {
60810    fn into(self) -> NoSkipReactionTypeCustomEmoji {
60811        NoSkipReactionTypeCustomEmoji {
60812            tg_type: self.tg_type,
60813            custom_emoji_id: self.custom_emoji_id,
60814        }
60815    }
60816}
60817impl NoSkipReactionTypeCustomEmoji {
60818    pub fn skip(self) -> ReactionTypeCustomEmoji {
60819        self.into()
60820    }
60821}
60822impl ReactionTypeCustomEmoji {
60823    pub fn noskip(self) -> NoSkipReactionTypeCustomEmoji {
60824        self.into()
60825    }
60826}
60827#[allow(rustdoc::invalid_html_tags)]
60828#[doc = "The reaction is based on a custom emoji."]
60829#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60830pub struct ReactionTypeCustomEmojiBuilder {
60831    #[allow(rustdoc::invalid_html_tags)]
60832    #[doc = "Type of the reaction, always \"custom_emoji\""]
60833    #[serde(rename = "type")]
60834    pub tg_type: String,
60835    #[allow(rustdoc::invalid_html_tags)]
60836    #[doc = "Custom emoji identifier"]
60837    #[serde(rename = "custom_emoji_id")]
60838    pub custom_emoji_id: String,
60839}
60840impl ReactionTypeCustomEmojiBuilder {
60841    #[allow(clippy::too_many_arguments)]
60842    pub fn new(custom_emoji_id: String) -> Self {
60843        Self {
60844            tg_type: "ReactionTypeCustomEmoji".to_owned(),
60845            custom_emoji_id,
60846        }
60847    }
60848    #[allow(rustdoc::invalid_html_tags)]
60849    #[doc = "Type of the reaction, always \"custom_emoji\""]
60850    pub fn set_type(mut self, tg_type: String) -> Self {
60851        self.tg_type = tg_type;
60852        self
60853    }
60854    #[allow(rustdoc::invalid_html_tags)]
60855    #[doc = "Custom emoji identifier"]
60856    pub fn set_custom_emoji_id(mut self, custom_emoji_id: String) -> Self {
60857        self.custom_emoji_id = custom_emoji_id;
60858        self
60859    }
60860    pub fn build(self) -> ReactionTypeCustomEmoji {
60861        ReactionTypeCustomEmoji {
60862            tg_type: self.tg_type,
60863            custom_emoji_id: self.custom_emoji_id,
60864        }
60865    }
60866}
60867#[allow(rustdoc::invalid_html_tags)]
60868#[doc = "Describes the physical address of a location."]
60869#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60870pub struct LocationAddress {
60871    #[allow(rustdoc::invalid_html_tags)]
60872    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
60873    #[serde(rename = "country_code")]
60874    pub country_code: String,
60875    #[allow(rustdoc::invalid_html_tags)]
60876    #[doc = "Optional. State of the location"]
60877    #[serde(skip_serializing_if = "Option::is_none", rename = "state", default)]
60878    pub state: Option<String>,
60879    #[allow(rustdoc::invalid_html_tags)]
60880    #[doc = "Optional. City of the location"]
60881    #[serde(skip_serializing_if = "Option::is_none", rename = "city", default)]
60882    pub city: Option<String>,
60883    #[allow(rustdoc::invalid_html_tags)]
60884    #[doc = "Optional. Street address of the location"]
60885    #[serde(skip_serializing_if = "Option::is_none", rename = "street", default)]
60886    pub street: Option<String>,
60887}
60888#[allow(rustdoc::invalid_html_tags)]
60889#[doc = "Companion type to LocationAddress that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
60890#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60891pub struct NoSkipLocationAddress {
60892    #[allow(rustdoc::invalid_html_tags)]
60893    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
60894    #[serde(rename = "country_code")]
60895    pub country_code: String,
60896    pub state: Option<String>,
60897    pub city: Option<String>,
60898    pub street: Option<String>,
60899}
60900impl From<NoSkipLocationAddress> for LocationAddress {
60901    fn from(t: NoSkipLocationAddress) -> Self {
60902        Self {
60903            country_code: t.country_code,
60904            state: t.state,
60905            city: t.city,
60906            street: t.street,
60907        }
60908    }
60909}
60910#[allow(clippy::from_over_into)]
60911impl Into<NoSkipLocationAddress> for LocationAddress {
60912    fn into(self) -> NoSkipLocationAddress {
60913        NoSkipLocationAddress {
60914            country_code: self.country_code,
60915            state: self.state,
60916            city: self.city,
60917            street: self.street,
60918        }
60919    }
60920}
60921impl NoSkipLocationAddress {
60922    pub fn skip(self) -> LocationAddress {
60923        self.into()
60924    }
60925}
60926impl LocationAddress {
60927    pub fn noskip(self) -> NoSkipLocationAddress {
60928        self.into()
60929    }
60930}
60931#[allow(rustdoc::invalid_html_tags)]
60932#[doc = "Describes the physical address of a location."]
60933#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60934pub struct LocationAddressBuilder {
60935    #[allow(rustdoc::invalid_html_tags)]
60936    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
60937    #[serde(rename = "country_code")]
60938    pub country_code: String,
60939    #[allow(rustdoc::invalid_html_tags)]
60940    #[doc = "Optional. State of the location"]
60941    #[serde(skip_serializing_if = "Option::is_none", rename = "state", default)]
60942    pub state: Option<String>,
60943    #[allow(rustdoc::invalid_html_tags)]
60944    #[doc = "Optional. City of the location"]
60945    #[serde(skip_serializing_if = "Option::is_none", rename = "city", default)]
60946    pub city: Option<String>,
60947    #[allow(rustdoc::invalid_html_tags)]
60948    #[doc = "Optional. Street address of the location"]
60949    #[serde(skip_serializing_if = "Option::is_none", rename = "street", default)]
60950    pub street: Option<String>,
60951}
60952impl LocationAddressBuilder {
60953    #[allow(clippy::too_many_arguments)]
60954    pub fn new(country_code: String) -> Self {
60955        Self {
60956            country_code,
60957            state: None,
60958            city: None,
60959            street: None,
60960        }
60961    }
60962    #[allow(rustdoc::invalid_html_tags)]
60963    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
60964    pub fn set_country_code(mut self, country_code: String) -> Self {
60965        self.country_code = country_code;
60966        self
60967    }
60968    #[allow(rustdoc::invalid_html_tags)]
60969    #[doc = "Optional. State of the location"]
60970    pub fn set_state(mut self, state: String) -> Self {
60971        self.state = Some(state);
60972        self
60973    }
60974    #[allow(rustdoc::invalid_html_tags)]
60975    #[doc = "Optional. City of the location"]
60976    pub fn set_city(mut self, city: String) -> Self {
60977        self.city = Some(city);
60978        self
60979    }
60980    #[allow(rustdoc::invalid_html_tags)]
60981    #[doc = "Optional. Street address of the location"]
60982    pub fn set_street(mut self, street: String) -> Self {
60983        self.street = Some(street);
60984        self
60985    }
60986    pub fn build(self) -> LocationAddress {
60987        LocationAddress {
60988            country_code: self.country_code,
60989            state: self.state,
60990            city: self.city,
60991            street: self.street,
60992        }
60993    }
60994}
60995#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
60996#[serde(untagged)]
60997pub enum PassportElementError {
60998    PassportElementErrorDataField(PassportElementErrorDataField),
60999    PassportElementErrorFrontSide(PassportElementErrorFrontSide),
61000    PassportElementErrorReverseSide(PassportElementErrorReverseSide),
61001    PassportElementErrorSelfie(PassportElementErrorSelfie),
61002    PassportElementErrorFile(PassportElementErrorFile),
61003    PassportElementErrorFiles(PassportElementErrorFiles),
61004    PassportElementErrorTranslationFile(PassportElementErrorTranslationFile),
61005    PassportElementErrorTranslationFiles(PassportElementErrorTranslationFiles),
61006    PassportElementErrorUnspecified(PassportElementErrorUnspecified),
61007}
61008impl Default for PassportElementError {
61009    fn default() -> Self {
61010        PassportElementError::PassportElementErrorDataField(PassportElementErrorDataField::default())
61011    }
61012}
61013impl PassportElementError {
61014    #[allow(rustdoc::invalid_html_tags)]
61015    #[doc = "Error message"]
61016    #[allow(clippy::needless_lifetimes)]
61017    pub fn get_message<'a>(&'a self) -> &'a str {
61018        match self {
61019            Self::PassportElementErrorDataField(ref v) => v.get_message(),
61020            Self::PassportElementErrorFrontSide(ref v) => v.get_message(),
61021            Self::PassportElementErrorReverseSide(ref v) => v.get_message(),
61022            Self::PassportElementErrorSelfie(ref v) => v.get_message(),
61023            Self::PassportElementErrorFile(ref v) => v.get_message(),
61024            Self::PassportElementErrorFiles(ref v) => v.get_message(),
61025            Self::PassportElementErrorTranslationFile(ref v) => v.get_message(),
61026            Self::PassportElementErrorTranslationFiles(ref v) => v.get_message(),
61027            Self::PassportElementErrorUnspecified(ref v) => v.get_message(),
61028        }
61029    }
61030}
61031#[allow(rustdoc::invalid_html_tags)]
61032#[doc = "Describes a regular gift owned by a user or a chat."]
61033#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61034pub struct OwnedGiftRegular {
61035    #[allow(rustdoc::invalid_html_tags)]
61036    #[doc = "Type of the gift, always \"regular\""]
61037    #[serde(rename = "type")]
61038    pub tg_type: String,
61039    #[allow(rustdoc::invalid_html_tags)]
61040    #[doc = "Information about the regular gift"]
61041    #[serde(rename = "gift")]
61042    pub gift: BoxWrapper<Unbox<Gift>>,
61043    #[allow(rustdoc::invalid_html_tags)]
61044    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
61045    #[serde(
61046        skip_serializing_if = "Option::is_none",
61047        rename = "owned_gift_id",
61048        default
61049    )]
61050    pub owned_gift_id: Option<String>,
61051    #[allow(rustdoc::invalid_html_tags)]
61052    #[doc = "Optional. Sender of the gift if it is a known user"]
61053    #[serde(
61054        skip_serializing_if = "Option::is_none",
61055        rename = "sender_user",
61056        default
61057    )]
61058    pub sender_user: Option<BoxWrapper<Unbox<User>>>,
61059    #[allow(rustdoc::invalid_html_tags)]
61060    #[doc = "Date the gift was sent in Unix time"]
61061    #[serde(rename = "send_date")]
61062    pub send_date: i64,
61063    #[allow(rustdoc::invalid_html_tags)]
61064    #[doc = "Optional. Text of the message that was added to the gift"]
61065    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
61066    pub text: Option<String>,
61067    #[allow(rustdoc::invalid_html_tags)]
61068    #[doc = "Optional. Special entities that appear in the text"]
61069    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
61070    pub entities: Option<Vec<MessageEntity>>,
61071    #[allow(rustdoc::invalid_html_tags)]
61072    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
61073    #[serde(
61074        skip_serializing_if = "Option::is_none",
61075        rename = "is_private",
61076        default
61077    )]
61078    pub is_private: Option<bool>,
61079    #[allow(rustdoc::invalid_html_tags)]
61080    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
61081    #[serde(skip_serializing_if = "Option::is_none", rename = "is_saved", default)]
61082    pub is_saved: Option<bool>,
61083    #[allow(rustdoc::invalid_html_tags)]
61084    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
61085    #[serde(
61086        skip_serializing_if = "Option::is_none",
61087        rename = "can_be_upgraded",
61088        default
61089    )]
61090    pub can_be_upgraded: Option<bool>,
61091    #[allow(rustdoc::invalid_html_tags)]
61092    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
61093    #[serde(
61094        skip_serializing_if = "Option::is_none",
61095        rename = "was_refunded",
61096        default
61097    )]
61098    pub was_refunded: Option<bool>,
61099    #[allow(rustdoc::invalid_html_tags)]
61100    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
61101    #[serde(
61102        skip_serializing_if = "Option::is_none",
61103        rename = "convert_star_count",
61104        default
61105    )]
61106    pub convert_star_count: Option<i64>,
61107    #[allow(rustdoc::invalid_html_tags)]
61108    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
61109    #[serde(
61110        skip_serializing_if = "Option::is_none",
61111        rename = "prepaid_upgrade_star_count",
61112        default
61113    )]
61114    pub prepaid_upgrade_star_count: Option<i64>,
61115}
61116#[allow(rustdoc::invalid_html_tags)]
61117#[doc = "Companion type to OwnedGiftRegular that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
61118#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61119pub struct NoSkipOwnedGiftRegular {
61120    #[allow(rustdoc::invalid_html_tags)]
61121    #[doc = "Type of the gift, always \"regular\""]
61122    #[serde(rename = "type")]
61123    pub tg_type: String,
61124    #[allow(rustdoc::invalid_html_tags)]
61125    #[doc = "Information about the regular gift"]
61126    #[serde(rename = "gift")]
61127    pub gift: BoxWrapper<Unbox<Gift>>,
61128    pub owned_gift_id: Option<String>,
61129    pub sender_user: Option<BoxWrapper<Unbox<User>>>,
61130    #[allow(rustdoc::invalid_html_tags)]
61131    #[doc = "Date the gift was sent in Unix time"]
61132    #[serde(rename = "send_date")]
61133    pub send_date: i64,
61134    pub text: Option<String>,
61135    pub entities: Option<Vec<MessageEntity>>,
61136    pub is_private: Option<bool>,
61137    pub is_saved: Option<bool>,
61138    pub can_be_upgraded: Option<bool>,
61139    pub was_refunded: Option<bool>,
61140    pub convert_star_count: Option<i64>,
61141    pub prepaid_upgrade_star_count: Option<i64>,
61142}
61143impl From<NoSkipOwnedGiftRegular> for OwnedGiftRegular {
61144    fn from(t: NoSkipOwnedGiftRegular) -> Self {
61145        Self {
61146            tg_type: t.tg_type,
61147            gift: t.gift,
61148            owned_gift_id: t.owned_gift_id,
61149            sender_user: t.sender_user,
61150            send_date: t.send_date,
61151            text: t.text,
61152            entities: t.entities,
61153            is_private: t.is_private,
61154            is_saved: t.is_saved,
61155            can_be_upgraded: t.can_be_upgraded,
61156            was_refunded: t.was_refunded,
61157            convert_star_count: t.convert_star_count,
61158            prepaid_upgrade_star_count: t.prepaid_upgrade_star_count,
61159        }
61160    }
61161}
61162#[allow(clippy::from_over_into)]
61163impl Into<NoSkipOwnedGiftRegular> for OwnedGiftRegular {
61164    fn into(self) -> NoSkipOwnedGiftRegular {
61165        NoSkipOwnedGiftRegular {
61166            tg_type: self.tg_type,
61167            gift: self.gift,
61168            owned_gift_id: self.owned_gift_id,
61169            sender_user: self.sender_user,
61170            send_date: self.send_date,
61171            text: self.text,
61172            entities: self.entities,
61173            is_private: self.is_private,
61174            is_saved: self.is_saved,
61175            can_be_upgraded: self.can_be_upgraded,
61176            was_refunded: self.was_refunded,
61177            convert_star_count: self.convert_star_count,
61178            prepaid_upgrade_star_count: self.prepaid_upgrade_star_count,
61179        }
61180    }
61181}
61182impl NoSkipOwnedGiftRegular {
61183    pub fn skip(self) -> OwnedGiftRegular {
61184        self.into()
61185    }
61186}
61187impl OwnedGiftRegular {
61188    pub fn noskip(self) -> NoSkipOwnedGiftRegular {
61189        self.into()
61190    }
61191}
61192#[allow(rustdoc::invalid_html_tags)]
61193#[doc = "Describes a regular gift owned by a user or a chat."]
61194#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61195pub struct OwnedGiftRegularBuilder {
61196    #[allow(rustdoc::invalid_html_tags)]
61197    #[doc = "Type of the gift, always \"regular\""]
61198    #[serde(rename = "type")]
61199    pub tg_type: String,
61200    #[allow(rustdoc::invalid_html_tags)]
61201    #[doc = "Information about the regular gift"]
61202    #[serde(rename = "gift")]
61203    pub gift: BoxWrapper<Unbox<Gift>>,
61204    #[allow(rustdoc::invalid_html_tags)]
61205    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
61206    #[serde(
61207        skip_serializing_if = "Option::is_none",
61208        rename = "owned_gift_id",
61209        default
61210    )]
61211    pub owned_gift_id: Option<String>,
61212    #[allow(rustdoc::invalid_html_tags)]
61213    #[doc = "Optional. Sender of the gift if it is a known user"]
61214    #[serde(
61215        skip_serializing_if = "Option::is_none",
61216        rename = "sender_user",
61217        default
61218    )]
61219    pub sender_user: Option<BoxWrapper<Unbox<User>>>,
61220    #[allow(rustdoc::invalid_html_tags)]
61221    #[doc = "Date the gift was sent in Unix time"]
61222    #[serde(rename = "send_date")]
61223    pub send_date: i64,
61224    #[allow(rustdoc::invalid_html_tags)]
61225    #[doc = "Optional. Text of the message that was added to the gift"]
61226    #[serde(skip_serializing_if = "Option::is_none", rename = "text", default)]
61227    pub text: Option<String>,
61228    #[allow(rustdoc::invalid_html_tags)]
61229    #[doc = "Optional. Special entities that appear in the text"]
61230    #[serde(skip_serializing_if = "Option::is_none", rename = "entities", default)]
61231    pub entities: Option<Vec<MessageEntity>>,
61232    #[allow(rustdoc::invalid_html_tags)]
61233    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
61234    #[serde(
61235        skip_serializing_if = "Option::is_none",
61236        rename = "is_private",
61237        default
61238    )]
61239    pub is_private: Option<bool>,
61240    #[allow(rustdoc::invalid_html_tags)]
61241    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
61242    #[serde(skip_serializing_if = "Option::is_none", rename = "is_saved", default)]
61243    pub is_saved: Option<bool>,
61244    #[allow(rustdoc::invalid_html_tags)]
61245    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
61246    #[serde(
61247        skip_serializing_if = "Option::is_none",
61248        rename = "can_be_upgraded",
61249        default
61250    )]
61251    pub can_be_upgraded: Option<bool>,
61252    #[allow(rustdoc::invalid_html_tags)]
61253    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
61254    #[serde(
61255        skip_serializing_if = "Option::is_none",
61256        rename = "was_refunded",
61257        default
61258    )]
61259    pub was_refunded: Option<bool>,
61260    #[allow(rustdoc::invalid_html_tags)]
61261    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
61262    #[serde(
61263        skip_serializing_if = "Option::is_none",
61264        rename = "convert_star_count",
61265        default
61266    )]
61267    pub convert_star_count: Option<i64>,
61268    #[allow(rustdoc::invalid_html_tags)]
61269    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
61270    #[serde(
61271        skip_serializing_if = "Option::is_none",
61272        rename = "prepaid_upgrade_star_count",
61273        default
61274    )]
61275    pub prepaid_upgrade_star_count: Option<i64>,
61276}
61277impl OwnedGiftRegularBuilder {
61278    #[allow(clippy::too_many_arguments)]
61279    pub fn new<A: Into<Gift>>(gift: A, send_date: i64) -> Self {
61280        Self {
61281            tg_type: "OwnedGiftRegular".to_owned(),
61282            gift: BoxWrapper::new_unbox(gift.into()),
61283            send_date,
61284            owned_gift_id: None,
61285            sender_user: None,
61286            text: None,
61287            entities: None,
61288            is_private: None,
61289            is_saved: None,
61290            can_be_upgraded: None,
61291            was_refunded: None,
61292            convert_star_count: None,
61293            prepaid_upgrade_star_count: None,
61294        }
61295    }
61296    #[allow(rustdoc::invalid_html_tags)]
61297    #[doc = "Type of the gift, always \"regular\""]
61298    pub fn set_type(mut self, tg_type: String) -> Self {
61299        self.tg_type = tg_type;
61300        self
61301    }
61302    #[allow(rustdoc::invalid_html_tags)]
61303    #[doc = "Information about the regular gift"]
61304    pub fn set_gift(mut self, gift: Gift) -> Self {
61305        self.gift = BoxWrapper(Unbox(gift));
61306        self
61307    }
61308    #[allow(rustdoc::invalid_html_tags)]
61309    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
61310    pub fn set_owned_gift_id(mut self, owned_gift_id: String) -> Self {
61311        self.owned_gift_id = Some(owned_gift_id);
61312        self
61313    }
61314    #[allow(rustdoc::invalid_html_tags)]
61315    #[doc = "Optional. Sender of the gift if it is a known user"]
61316    pub fn set_sender_user(mut self, sender_user: User) -> Self {
61317        self.sender_user = Some(BoxWrapper(Unbox(sender_user)));
61318        self
61319    }
61320    #[allow(rustdoc::invalid_html_tags)]
61321    #[doc = "Date the gift was sent in Unix time"]
61322    pub fn set_send_date(mut self, send_date: i64) -> Self {
61323        self.send_date = send_date;
61324        self
61325    }
61326    #[allow(rustdoc::invalid_html_tags)]
61327    #[doc = "Optional. Text of the message that was added to the gift"]
61328    pub fn set_text(mut self, text: String) -> Self {
61329        self.text = Some(text);
61330        self
61331    }
61332    #[allow(rustdoc::invalid_html_tags)]
61333    #[doc = "Optional. Special entities that appear in the text"]
61334    pub fn set_entities(mut self, entities: Vec<MessageEntity>) -> Self {
61335        self.entities = Some(entities);
61336        self
61337    }
61338    #[allow(rustdoc::invalid_html_tags)]
61339    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
61340    pub fn set_is_private(mut self, is_private: bool) -> Self {
61341        self.is_private = Some(is_private);
61342        self
61343    }
61344    #[allow(rustdoc::invalid_html_tags)]
61345    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
61346    pub fn set_is_saved(mut self, is_saved: bool) -> Self {
61347        self.is_saved = Some(is_saved);
61348        self
61349    }
61350    #[allow(rustdoc::invalid_html_tags)]
61351    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
61352    pub fn set_can_be_upgraded(mut self, can_be_upgraded: bool) -> Self {
61353        self.can_be_upgraded = Some(can_be_upgraded);
61354        self
61355    }
61356    #[allow(rustdoc::invalid_html_tags)]
61357    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
61358    pub fn set_was_refunded(mut self, was_refunded: bool) -> Self {
61359        self.was_refunded = Some(was_refunded);
61360        self
61361    }
61362    #[allow(rustdoc::invalid_html_tags)]
61363    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
61364    pub fn set_convert_star_count(mut self, convert_star_count: i64) -> Self {
61365        self.convert_star_count = Some(convert_star_count);
61366        self
61367    }
61368    #[allow(rustdoc::invalid_html_tags)]
61369    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
61370    pub fn set_prepaid_upgrade_star_count(mut self, prepaid_upgrade_star_count: i64) -> Self {
61371        self.prepaid_upgrade_star_count = Some(prepaid_upgrade_star_count);
61372        self
61373    }
61374    pub fn build(self) -> OwnedGiftRegular {
61375        OwnedGiftRegular {
61376            tg_type: self.tg_type,
61377            gift: self.gift,
61378            owned_gift_id: self.owned_gift_id,
61379            sender_user: self.sender_user,
61380            send_date: self.send_date,
61381            text: self.text,
61382            entities: self.entities,
61383            is_private: self.is_private,
61384            is_saved: self.is_saved,
61385            can_be_upgraded: self.can_be_upgraded,
61386            was_refunded: self.was_refunded,
61387            convert_star_count: self.convert_star_count,
61388            prepaid_upgrade_star_count: self.prepaid_upgrade_star_count,
61389        }
61390    }
61391}
61392#[allow(rustdoc::invalid_html_tags)]
61393#[doc = "This object represents an inline keyboard that appears right next to the message it belongs to."]
61394#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61395pub struct InlineKeyboardMarkup {
61396    #[allow(rustdoc::invalid_html_tags)]
61397    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
61398    #[serde(rename = "inline_keyboard")]
61399    pub inline_keyboard: Vec<Vec<InlineKeyboardButton>>,
61400}
61401#[allow(rustdoc::invalid_html_tags)]
61402#[doc = "Companion type to InlineKeyboardMarkup that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
61403#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61404pub struct NoSkipInlineKeyboardMarkup {
61405    #[allow(rustdoc::invalid_html_tags)]
61406    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
61407    #[serde(rename = "inline_keyboard")]
61408    pub inline_keyboard: Vec<Vec<InlineKeyboardButton>>,
61409}
61410impl From<NoSkipInlineKeyboardMarkup> for InlineKeyboardMarkup {
61411    fn from(t: NoSkipInlineKeyboardMarkup) -> Self {
61412        Self {
61413            inline_keyboard: t.inline_keyboard,
61414        }
61415    }
61416}
61417#[allow(clippy::from_over_into)]
61418impl Into<NoSkipInlineKeyboardMarkup> for InlineKeyboardMarkup {
61419    fn into(self) -> NoSkipInlineKeyboardMarkup {
61420        NoSkipInlineKeyboardMarkup {
61421            inline_keyboard: self.inline_keyboard,
61422        }
61423    }
61424}
61425impl NoSkipInlineKeyboardMarkup {
61426    pub fn skip(self) -> InlineKeyboardMarkup {
61427        self.into()
61428    }
61429}
61430impl InlineKeyboardMarkup {
61431    pub fn noskip(self) -> NoSkipInlineKeyboardMarkup {
61432        self.into()
61433    }
61434}
61435#[allow(rustdoc::invalid_html_tags)]
61436#[doc = "This object represents an inline keyboard that appears right next to the message it belongs to."]
61437#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61438pub struct InlineKeyboardMarkupBuilder {
61439    #[allow(rustdoc::invalid_html_tags)]
61440    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
61441    #[serde(rename = "inline_keyboard")]
61442    pub inline_keyboard: Vec<Vec<InlineKeyboardButton>>,
61443}
61444impl InlineKeyboardMarkupBuilder {
61445    #[allow(clippy::too_many_arguments)]
61446    pub fn new(inline_keyboard: Vec<Vec<InlineKeyboardButton>>) -> Self {
61447        Self { inline_keyboard }
61448    }
61449    #[allow(rustdoc::invalid_html_tags)]
61450    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
61451    pub fn set_inline_keyboard(mut self, inline_keyboard: Vec<Vec<InlineKeyboardButton>>) -> Self {
61452        self.inline_keyboard = inline_keyboard;
61453        self
61454    }
61455    pub fn build(self) -> InlineKeyboardMarkup {
61456        InlineKeyboardMarkup {
61457            inline_keyboard: self.inline_keyboard,
61458        }
61459    }
61460}
61461#[allow(rustdoc::invalid_html_tags)]
61462#[doc = "Describes a clickable area on a story media."]
61463#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61464pub struct StoryArea {
61465    #[allow(rustdoc::invalid_html_tags)]
61466    #[doc = "Position of the area"]
61467    #[serde(rename = "position")]
61468    pub position: BoxWrapper<Unbox<StoryAreaPosition>>,
61469    #[allow(rustdoc::invalid_html_tags)]
61470    #[doc = "Type of the area"]
61471    #[serde(rename = "type")]
61472    pub tg_type: StoryAreaType,
61473}
61474#[allow(rustdoc::invalid_html_tags)]
61475#[doc = "Companion type to StoryArea that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
61476#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61477pub struct NoSkipStoryArea {
61478    #[allow(rustdoc::invalid_html_tags)]
61479    #[doc = "Position of the area"]
61480    #[serde(rename = "position")]
61481    pub position: BoxWrapper<Unbox<StoryAreaPosition>>,
61482    #[allow(rustdoc::invalid_html_tags)]
61483    #[doc = "Type of the area"]
61484    #[serde(rename = "type")]
61485    pub tg_type: StoryAreaType,
61486}
61487impl From<NoSkipStoryArea> for StoryArea {
61488    fn from(t: NoSkipStoryArea) -> Self {
61489        Self {
61490            position: t.position,
61491            tg_type: t.tg_type,
61492        }
61493    }
61494}
61495#[allow(clippy::from_over_into)]
61496impl Into<NoSkipStoryArea> for StoryArea {
61497    fn into(self) -> NoSkipStoryArea {
61498        NoSkipStoryArea {
61499            position: self.position,
61500            tg_type: self.tg_type,
61501        }
61502    }
61503}
61504impl NoSkipStoryArea {
61505    pub fn skip(self) -> StoryArea {
61506        self.into()
61507    }
61508}
61509impl StoryArea {
61510    pub fn noskip(self) -> NoSkipStoryArea {
61511        self.into()
61512    }
61513}
61514#[allow(rustdoc::invalid_html_tags)]
61515#[doc = "Describes a clickable area on a story media."]
61516#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61517pub struct StoryAreaBuilder {
61518    #[allow(rustdoc::invalid_html_tags)]
61519    #[doc = "Position of the area"]
61520    #[serde(rename = "position")]
61521    pub position: BoxWrapper<Unbox<StoryAreaPosition>>,
61522    #[allow(rustdoc::invalid_html_tags)]
61523    #[doc = "Type of the area"]
61524    #[serde(rename = "type")]
61525    pub tg_type: StoryAreaType,
61526}
61527impl StoryAreaBuilder {
61528    #[allow(clippy::too_many_arguments)]
61529    pub fn new<A: Into<StoryAreaPosition>>(position: A, tg_type: StoryAreaType) -> Self {
61530        Self {
61531            tg_type,
61532            position: BoxWrapper::new_unbox(position.into()),
61533        }
61534    }
61535    #[allow(rustdoc::invalid_html_tags)]
61536    #[doc = "Position of the area"]
61537    pub fn set_position(mut self, position: StoryAreaPosition) -> Self {
61538        self.position = BoxWrapper(Unbox(position));
61539        self
61540    }
61541    #[allow(rustdoc::invalid_html_tags)]
61542    #[doc = "Type of the area"]
61543    pub fn set_type(mut self, tg_type: StoryAreaType) -> Self {
61544        self.tg_type = tg_type;
61545        self
61546    }
61547    pub fn build(self) -> StoryArea {
61548        StoryArea {
61549            position: self.position,
61550            tg_type: self.tg_type,
61551        }
61552    }
61553}
61554#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61555#[serde(untagged)]
61556pub enum MaybeInaccessibleMessage {
61557    Message(Message),
61558    InaccessibleMessage(InaccessibleMessage),
61559}
61560impl Default for MaybeInaccessibleMessage {
61561    fn default() -> Self {
61562        MaybeInaccessibleMessage::Message(Message::default())
61563    }
61564}
61565impl MaybeInaccessibleMessage {}
61566#[allow(rustdoc::invalid_html_tags)]
61567#[doc = "Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area."]
61568#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61569pub struct StoryAreaTypeUniqueGift {
61570    #[allow(rustdoc::invalid_html_tags)]
61571    #[doc = "Type of the area, always \"unique_gift\""]
61572    #[serde(rename = "type")]
61573    pub tg_type: String,
61574    #[allow(rustdoc::invalid_html_tags)]
61575    #[doc = "Unique name of the gift"]
61576    #[serde(rename = "name")]
61577    pub name: String,
61578}
61579#[allow(rustdoc::invalid_html_tags)]
61580#[doc = "Companion type to StoryAreaTypeUniqueGift that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
61581#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61582pub struct NoSkipStoryAreaTypeUniqueGift {
61583    #[allow(rustdoc::invalid_html_tags)]
61584    #[doc = "Type of the area, always \"unique_gift\""]
61585    #[serde(rename = "type")]
61586    pub tg_type: String,
61587    #[allow(rustdoc::invalid_html_tags)]
61588    #[doc = "Unique name of the gift"]
61589    #[serde(rename = "name")]
61590    pub name: String,
61591}
61592impl From<NoSkipStoryAreaTypeUniqueGift> for StoryAreaTypeUniqueGift {
61593    fn from(t: NoSkipStoryAreaTypeUniqueGift) -> Self {
61594        Self {
61595            tg_type: t.tg_type,
61596            name: t.name,
61597        }
61598    }
61599}
61600#[allow(clippy::from_over_into)]
61601impl Into<NoSkipStoryAreaTypeUniqueGift> for StoryAreaTypeUniqueGift {
61602    fn into(self) -> NoSkipStoryAreaTypeUniqueGift {
61603        NoSkipStoryAreaTypeUniqueGift {
61604            tg_type: self.tg_type,
61605            name: self.name,
61606        }
61607    }
61608}
61609impl NoSkipStoryAreaTypeUniqueGift {
61610    pub fn skip(self) -> StoryAreaTypeUniqueGift {
61611        self.into()
61612    }
61613}
61614impl StoryAreaTypeUniqueGift {
61615    pub fn noskip(self) -> NoSkipStoryAreaTypeUniqueGift {
61616        self.into()
61617    }
61618}
61619#[allow(rustdoc::invalid_html_tags)]
61620#[doc = "Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area."]
61621#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61622pub struct StoryAreaTypeUniqueGiftBuilder {
61623    #[allow(rustdoc::invalid_html_tags)]
61624    #[doc = "Type of the area, always \"unique_gift\""]
61625    #[serde(rename = "type")]
61626    pub tg_type: String,
61627    #[allow(rustdoc::invalid_html_tags)]
61628    #[doc = "Unique name of the gift"]
61629    #[serde(rename = "name")]
61630    pub name: String,
61631}
61632impl StoryAreaTypeUniqueGiftBuilder {
61633    #[allow(clippy::too_many_arguments)]
61634    pub fn new(name: String) -> Self {
61635        Self {
61636            tg_type: "StoryAreaTypeUniqueGift".to_owned(),
61637            name,
61638        }
61639    }
61640    #[allow(rustdoc::invalid_html_tags)]
61641    #[doc = "Type of the area, always \"unique_gift\""]
61642    pub fn set_type(mut self, tg_type: String) -> Self {
61643        self.tg_type = tg_type;
61644        self
61645    }
61646    #[allow(rustdoc::invalid_html_tags)]
61647    #[doc = "Unique name of the gift"]
61648    pub fn set_name(mut self, name: String) -> Self {
61649        self.name = name;
61650        self
61651    }
61652    pub fn build(self) -> StoryAreaTypeUniqueGift {
61653        StoryAreaTypeUniqueGift {
61654            tg_type: self.tg_type,
61655            name: self.name,
61656        }
61657    }
61658}
61659#[allow(rustdoc::invalid_html_tags)]
61660#[doc = "Describes Telegram Passport data shared with the bot by the user."]
61661#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61662pub struct PassportData {
61663    #[allow(rustdoc::invalid_html_tags)]
61664    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
61665    #[serde(rename = "data")]
61666    pub data: Vec<EncryptedPassportElement>,
61667    #[allow(rustdoc::invalid_html_tags)]
61668    #[doc = "Encrypted credentials required to decrypt the data"]
61669    #[serde(rename = "credentials")]
61670    pub credentials: BoxWrapper<Unbox<EncryptedCredentials>>,
61671}
61672#[allow(rustdoc::invalid_html_tags)]
61673#[doc = "Companion type to PassportData that doesn't skip fields when serializing.\n                Used for certain deserializers that use arrays to represent struct members"]
61674#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61675pub struct NoSkipPassportData {
61676    #[allow(rustdoc::invalid_html_tags)]
61677    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
61678    #[serde(rename = "data")]
61679    pub data: Vec<EncryptedPassportElement>,
61680    #[allow(rustdoc::invalid_html_tags)]
61681    #[doc = "Encrypted credentials required to decrypt the data"]
61682    #[serde(rename = "credentials")]
61683    pub credentials: BoxWrapper<Unbox<EncryptedCredentials>>,
61684}
61685impl From<NoSkipPassportData> for PassportData {
61686    fn from(t: NoSkipPassportData) -> Self {
61687        Self {
61688            data: t.data,
61689            credentials: t.credentials,
61690        }
61691    }
61692}
61693#[allow(clippy::from_over_into)]
61694impl Into<NoSkipPassportData> for PassportData {
61695    fn into(self) -> NoSkipPassportData {
61696        NoSkipPassportData {
61697            data: self.data,
61698            credentials: self.credentials,
61699        }
61700    }
61701}
61702impl NoSkipPassportData {
61703    pub fn skip(self) -> PassportData {
61704        self.into()
61705    }
61706}
61707impl PassportData {
61708    pub fn noskip(self) -> NoSkipPassportData {
61709        self.into()
61710    }
61711}
61712#[allow(rustdoc::invalid_html_tags)]
61713#[doc = "Describes Telegram Passport data shared with the bot by the user."]
61714#[derive(Serialize, Deserialize, Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
61715pub struct PassportDataBuilder {
61716    #[allow(rustdoc::invalid_html_tags)]
61717    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
61718    #[serde(rename = "data")]
61719    pub data: Vec<EncryptedPassportElement>,
61720    #[allow(rustdoc::invalid_html_tags)]
61721    #[doc = "Encrypted credentials required to decrypt the data"]
61722    #[serde(rename = "credentials")]
61723    pub credentials: BoxWrapper<Unbox<EncryptedCredentials>>,
61724}
61725impl PassportDataBuilder {
61726    #[allow(clippy::too_many_arguments)]
61727    pub fn new<A: Into<EncryptedCredentials>>(
61728        data: Vec<EncryptedPassportElement>,
61729        credentials: A,
61730    ) -> Self {
61731        Self {
61732            data,
61733            credentials: BoxWrapper::new_unbox(credentials.into()),
61734        }
61735    }
61736    #[allow(rustdoc::invalid_html_tags)]
61737    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
61738    pub fn set_data(mut self, data: Vec<EncryptedPassportElement>) -> Self {
61739        self.data = data;
61740        self
61741    }
61742    #[allow(rustdoc::invalid_html_tags)]
61743    #[doc = "Encrypted credentials required to decrypt the data"]
61744    pub fn set_credentials(mut self, credentials: EncryptedCredentials) -> Self {
61745        self.credentials = BoxWrapper(Unbox(credentials));
61746        self
61747    }
61748    pub fn build(self) -> PassportData {
61749        PassportData {
61750            data: self.data,
61751            credentials: self.credentials,
61752        }
61753    }
61754}
61755impl TraitInputPaidMediaPhoto for InputPaidMediaPhoto {
61756    #[allow(rustdoc::invalid_html_tags)]
61757    #[doc = "Type of the media, must be photo"]
61758    #[allow(clippy::needless_lifetimes)]
61759    fn get_tg_type<'a>(&'a self) -> &'a str {
61760        self.tg_type.as_str()
61761    }
61762    #[allow(rustdoc::invalid_html_tags)]
61763    #[doc = "Type of the media, must be photo"]
61764    #[allow(clippy::needless_lifetimes)]
61765    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
61766        self.tg_type = tg_type;
61767        self
61768    }
61769    #[allow(rustdoc::invalid_html_tags)]
61770    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61771    #[allow(clippy::needless_lifetimes)]
61772    fn get_media<'a>(&'a self) -> &'a String {
61773        &self.media
61774    }
61775    #[allow(rustdoc::invalid_html_tags)]
61776    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61777    #[allow(clippy::needless_lifetimes)]
61778    fn set_media<'a>(&'a mut self, media: String) -> &'a mut Self {
61779        self.media = media;
61780        self
61781    }
61782}
61783impl TraitInputPaidMediaVideo for InputPaidMediaVideo {
61784    #[allow(rustdoc::invalid_html_tags)]
61785    #[doc = "Type of the media, must be video"]
61786    #[allow(clippy::needless_lifetimes)]
61787    fn get_tg_type<'a>(&'a self) -> &'a str {
61788        self.tg_type.as_str()
61789    }
61790    #[allow(rustdoc::invalid_html_tags)]
61791    #[doc = "Type of the media, must be video"]
61792    #[allow(clippy::needless_lifetimes)]
61793    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
61794        self.tg_type = tg_type;
61795        self
61796    }
61797    #[allow(rustdoc::invalid_html_tags)]
61798    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61799    #[allow(clippy::needless_lifetimes)]
61800    fn get_media<'a>(&'a self) -> &'a String {
61801        &self.media
61802    }
61803    #[allow(rustdoc::invalid_html_tags)]
61804    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61805    #[allow(clippy::needless_lifetimes)]
61806    fn set_media<'a>(&'a mut self, media: String) -> &'a mut Self {
61807        self.media = media;
61808        self
61809    }
61810    #[allow(rustdoc::invalid_html_tags)]
61811    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61812    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61813    fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
61814        self.thumbnail.as_ref().map(|v| v.as_str())
61815    }
61816    #[allow(rustdoc::invalid_html_tags)]
61817    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61818    #[allow(clippy::needless_lifetimes)]
61819    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
61820        self.thumbnail = thumbnail;
61821        self
61822    }
61823    #[allow(rustdoc::invalid_html_tags)]
61824    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61825    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61826    fn get_cover<'a>(&'a self) -> Option<&'a str> {
61827        self.cover.as_ref().map(|v| v.as_str())
61828    }
61829    #[allow(rustdoc::invalid_html_tags)]
61830    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
61831    #[allow(clippy::needless_lifetimes)]
61832    fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self {
61833        self.cover = cover;
61834        self
61835    }
61836    #[allow(rustdoc::invalid_html_tags)]
61837    #[doc = "Optional. Start timestamp for the video in the message"]
61838    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61839    fn get_start_timestamp<'a>(&'a self) -> Option<i64> {
61840        self.start_timestamp.as_ref().map(|v| *v)
61841    }
61842    #[allow(rustdoc::invalid_html_tags)]
61843    #[doc = "Optional. Start timestamp for the video in the message"]
61844    #[allow(clippy::needless_lifetimes)]
61845    fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self {
61846        self.start_timestamp = start_timestamp;
61847        self
61848    }
61849    #[allow(rustdoc::invalid_html_tags)]
61850    #[doc = "Optional. Video width"]
61851    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61852    fn get_width<'a>(&'a self) -> Option<i64> {
61853        self.width.as_ref().map(|v| *v)
61854    }
61855    #[allow(rustdoc::invalid_html_tags)]
61856    #[doc = "Optional. Video width"]
61857    #[allow(clippy::needless_lifetimes)]
61858    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
61859        self.width = width;
61860        self
61861    }
61862    #[allow(rustdoc::invalid_html_tags)]
61863    #[doc = "Optional. Video height"]
61864    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61865    fn get_height<'a>(&'a self) -> Option<i64> {
61866        self.height.as_ref().map(|v| *v)
61867    }
61868    #[allow(rustdoc::invalid_html_tags)]
61869    #[doc = "Optional. Video height"]
61870    #[allow(clippy::needless_lifetimes)]
61871    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
61872        self.height = height;
61873        self
61874    }
61875    #[allow(rustdoc::invalid_html_tags)]
61876    #[doc = "Optional. Video duration in seconds"]
61877    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61878    fn get_duration<'a>(&'a self) -> Option<i64> {
61879        self.duration.as_ref().map(|v| *v)
61880    }
61881    #[allow(rustdoc::invalid_html_tags)]
61882    #[doc = "Optional. Video duration in seconds"]
61883    #[allow(clippy::needless_lifetimes)]
61884    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
61885        self.duration = duration;
61886        self
61887    }
61888    #[allow(rustdoc::invalid_html_tags)]
61889    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
61890    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61891    fn get_supports_streaming<'a>(&'a self) -> Option<bool> {
61892        self.supports_streaming.as_ref().map(|v| *v)
61893    }
61894    #[allow(rustdoc::invalid_html_tags)]
61895    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
61896    #[allow(clippy::needless_lifetimes)]
61897    fn set_supports_streaming<'a>(&'a mut self, supports_streaming: Option<bool>) -> &'a mut Self {
61898        self.supports_streaming = supports_streaming;
61899        self
61900    }
61901}
61902#[allow(dead_code)]
61903impl OrderInfo {
61904    #[allow(clippy::too_many_arguments)]
61905    pub fn new() -> Self {
61906        Self {
61907            name: None,
61908            phone_number: None,
61909            email: None,
61910            shipping_address: None,
61911        }
61912    }
61913    #[allow(rustdoc::invalid_html_tags)]
61914    #[doc = "Optional. User name"]
61915    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61916    pub fn get_name<'a>(&'a self) -> Option<&'a str> {
61917        self.name.as_ref().map(|v| v.as_str())
61918    }
61919    #[allow(rustdoc::invalid_html_tags)]
61920    #[doc = "Optional. User name"]
61921    #[allow(clippy::needless_lifetimes)]
61922    pub fn set_name<'a>(&'a mut self, name: Option<String>) -> &'a mut Self {
61923        self.name = name;
61924        self
61925    }
61926    #[allow(rustdoc::invalid_html_tags)]
61927    #[doc = "Optional. User name"]
61928    fn rhai_get_name(&mut self) -> Option<String> {
61929        self.name.as_ref().cloned()
61930    }
61931    #[allow(rustdoc::invalid_html_tags)]
61932    #[doc = "Optional. User's phone number"]
61933    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61934    pub fn get_phone_number<'a>(&'a self) -> Option<&'a str> {
61935        self.phone_number.as_ref().map(|v| v.as_str())
61936    }
61937    #[allow(rustdoc::invalid_html_tags)]
61938    #[doc = "Optional. User's phone number"]
61939    #[allow(clippy::needless_lifetimes)]
61940    pub fn set_phone_number<'a>(&'a mut self, phone_number: Option<String>) -> &'a mut Self {
61941        self.phone_number = phone_number;
61942        self
61943    }
61944    #[allow(rustdoc::invalid_html_tags)]
61945    #[doc = "Optional. User's phone number"]
61946    fn rhai_get_phone_number(&mut self) -> Option<String> {
61947        self.phone_number.as_ref().cloned()
61948    }
61949    #[allow(rustdoc::invalid_html_tags)]
61950    #[doc = "Optional. User email"]
61951    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61952    pub fn get_email<'a>(&'a self) -> Option<&'a str> {
61953        self.email.as_ref().map(|v| v.as_str())
61954    }
61955    #[allow(rustdoc::invalid_html_tags)]
61956    #[doc = "Optional. User email"]
61957    #[allow(clippy::needless_lifetimes)]
61958    pub fn set_email<'a>(&'a mut self, email: Option<String>) -> &'a mut Self {
61959        self.email = email;
61960        self
61961    }
61962    #[allow(rustdoc::invalid_html_tags)]
61963    #[doc = "Optional. User email"]
61964    fn rhai_get_email(&mut self) -> Option<String> {
61965        self.email.as_ref().cloned()
61966    }
61967    #[allow(rustdoc::invalid_html_tags)]
61968    #[doc = "Optional. User shipping address"]
61969    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
61970    pub fn get_shipping_address<'a>(&'a self) -> Option<&'a ShippingAddress> {
61971        self.shipping_address.as_ref().map(|v| v.inner_ref())
61972    }
61973    #[allow(rustdoc::invalid_html_tags)]
61974    #[doc = "Optional. User shipping address"]
61975    #[allow(clippy::needless_lifetimes)]
61976    pub fn set_shipping_address<'a>(
61977        &'a mut self,
61978        shipping_address: Option<ShippingAddress>,
61979    ) -> &'a mut Self {
61980        self.shipping_address =
61981            shipping_address.map(|shipping_address| BoxWrapper(Unbox(shipping_address)));
61982        self
61983    }
61984    #[allow(rustdoc::invalid_html_tags)]
61985    #[doc = "Optional. User shipping address"]
61986    fn rhai_get_shipping_address(&mut self) -> Option<ShippingAddress> {
61987        self.shipping_address.as_ref().map(|v| v.clone().into())
61988    }
61989}
61990#[allow(dead_code)]
61991impl SuggestedPostPrice {
61992    #[allow(clippy::too_many_arguments)]
61993    pub fn new(currency: String, amount: i64) -> Self {
61994        Self { currency, amount }
61995    }
61996    #[allow(rustdoc::invalid_html_tags)]
61997    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
61998    #[allow(clippy::needless_lifetimes)]
61999    pub fn get_currency<'a>(&'a self) -> &'a str {
62000        self.currency.as_str()
62001    }
62002    #[allow(rustdoc::invalid_html_tags)]
62003    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
62004    #[allow(clippy::needless_lifetimes)]
62005    pub fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
62006        self.currency = currency;
62007        self
62008    }
62009    #[allow(rustdoc::invalid_html_tags)]
62010    #[doc = "Currency in which the post will be paid. Currently, must be one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
62011    fn rhai_get_currency(&mut self) -> String {
62012        self.currency.clone()
62013    }
62014    #[allow(rustdoc::invalid_html_tags)]
62015    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
62016    #[allow(clippy::needless_lifetimes)]
62017    pub fn get_amount<'a>(&'a self) -> i64 {
62018        self.amount
62019    }
62020    #[allow(rustdoc::invalid_html_tags)]
62021    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
62022    #[allow(clippy::needless_lifetimes)]
62023    pub fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self {
62024        self.amount = amount;
62025        self
62026    }
62027    #[allow(rustdoc::invalid_html_tags)]
62028    #[doc = "The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000."]
62029    fn rhai_get_amount(&mut self) -> i64 {
62030        self.amount
62031    }
62032}
62033#[allow(dead_code)]
62034impl Chat {
62035    #[allow(clippy::too_many_arguments)]
62036    pub fn new(id: i64) -> Self {
62037        Self {
62038            tg_type: "Chat".to_owned(),
62039            id,
62040            title: None,
62041            username: None,
62042            first_name: None,
62043            last_name: None,
62044            is_forum: None,
62045            is_direct_messages: None,
62046        }
62047    }
62048    #[allow(rustdoc::invalid_html_tags)]
62049    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
62050    #[allow(clippy::needless_lifetimes)]
62051    pub fn get_id<'a>(&'a self) -> i64 {
62052        self.id
62053    }
62054    #[allow(rustdoc::invalid_html_tags)]
62055    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
62056    #[allow(clippy::needless_lifetimes)]
62057    pub fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self {
62058        self.id = id;
62059        self
62060    }
62061    #[allow(rustdoc::invalid_html_tags)]
62062    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
62063    fn rhai_get_id(&mut self) -> i64 {
62064        self.id
62065    }
62066    #[allow(rustdoc::invalid_html_tags)]
62067    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
62068    #[allow(clippy::needless_lifetimes)]
62069    pub fn get_tg_type<'a>(&'a self) -> &'a str {
62070        self.tg_type.as_str()
62071    }
62072    #[allow(rustdoc::invalid_html_tags)]
62073    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
62074    #[allow(clippy::needless_lifetimes)]
62075    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
62076        self.tg_type = tg_type;
62077        self
62078    }
62079    #[allow(rustdoc::invalid_html_tags)]
62080    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
62081    fn rhai_get_tg_type(&mut self) -> String {
62082        self.tg_type.clone()
62083    }
62084    #[allow(rustdoc::invalid_html_tags)]
62085    #[doc = "Optional. Title, for supergroups, channels and group chats"]
62086    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62087    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
62088        self.title.as_ref().map(|v| v.as_str())
62089    }
62090    #[allow(rustdoc::invalid_html_tags)]
62091    #[doc = "Optional. Title, for supergroups, channels and group chats"]
62092    #[allow(clippy::needless_lifetimes)]
62093    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
62094        self.title = title;
62095        self
62096    }
62097    #[allow(rustdoc::invalid_html_tags)]
62098    #[doc = "Optional. Title, for supergroups, channels and group chats"]
62099    fn rhai_get_title(&mut self) -> Option<String> {
62100        self.title.as_ref().cloned()
62101    }
62102    #[allow(rustdoc::invalid_html_tags)]
62103    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
62104    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62105    pub fn get_username<'a>(&'a self) -> Option<&'a str> {
62106        self.username.as_ref().map(|v| v.as_str())
62107    }
62108    #[allow(rustdoc::invalid_html_tags)]
62109    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
62110    #[allow(clippy::needless_lifetimes)]
62111    pub fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self {
62112        self.username = username;
62113        self
62114    }
62115    #[allow(rustdoc::invalid_html_tags)]
62116    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
62117    fn rhai_get_username(&mut self) -> Option<String> {
62118        self.username.as_ref().cloned()
62119    }
62120    #[allow(rustdoc::invalid_html_tags)]
62121    #[doc = "Optional. First name of the other party in a private chat"]
62122    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62123    pub fn get_first_name<'a>(&'a self) -> Option<&'a str> {
62124        self.first_name.as_ref().map(|v| v.as_str())
62125    }
62126    #[allow(rustdoc::invalid_html_tags)]
62127    #[doc = "Optional. First name of the other party in a private chat"]
62128    #[allow(clippy::needless_lifetimes)]
62129    pub fn set_first_name<'a>(&'a mut self, first_name: Option<String>) -> &'a mut Self {
62130        self.first_name = first_name;
62131        self
62132    }
62133    #[allow(rustdoc::invalid_html_tags)]
62134    #[doc = "Optional. First name of the other party in a private chat"]
62135    fn rhai_get_first_name(&mut self) -> Option<String> {
62136        self.first_name.as_ref().cloned()
62137    }
62138    #[allow(rustdoc::invalid_html_tags)]
62139    #[doc = "Optional. Last name of the other party in a private chat"]
62140    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62141    pub fn get_last_name<'a>(&'a self) -> Option<&'a str> {
62142        self.last_name.as_ref().map(|v| v.as_str())
62143    }
62144    #[allow(rustdoc::invalid_html_tags)]
62145    #[doc = "Optional. Last name of the other party in a private chat"]
62146    #[allow(clippy::needless_lifetimes)]
62147    pub fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
62148        self.last_name = last_name;
62149        self
62150    }
62151    #[allow(rustdoc::invalid_html_tags)]
62152    #[doc = "Optional. Last name of the other party in a private chat"]
62153    fn rhai_get_last_name(&mut self) -> Option<String> {
62154        self.last_name.as_ref().cloned()
62155    }
62156    #[allow(rustdoc::invalid_html_tags)]
62157    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
62158    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62159    pub fn get_is_forum<'a>(&'a self) -> Option<bool> {
62160        self.is_forum.as_ref().map(|v| *v)
62161    }
62162    #[allow(rustdoc::invalid_html_tags)]
62163    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
62164    #[allow(clippy::needless_lifetimes)]
62165    pub fn set_is_forum<'a>(&'a mut self, is_forum: Option<bool>) -> &'a mut Self {
62166        self.is_forum = is_forum;
62167        self
62168    }
62169    #[allow(rustdoc::invalid_html_tags)]
62170    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
62171    fn rhai_get_is_forum(&mut self) -> Option<bool> {
62172        self.is_forum.as_ref().copied()
62173    }
62174    #[allow(rustdoc::invalid_html_tags)]
62175    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
62176    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62177    pub fn get_is_direct_messages<'a>(&'a self) -> Option<bool> {
62178        self.is_direct_messages.as_ref().map(|v| *v)
62179    }
62180    #[allow(rustdoc::invalid_html_tags)]
62181    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
62182    #[allow(clippy::needless_lifetimes)]
62183    pub fn set_is_direct_messages<'a>(
62184        &'a mut self,
62185        is_direct_messages: Option<bool>,
62186    ) -> &'a mut Self {
62187        self.is_direct_messages = is_direct_messages;
62188        self
62189    }
62190    #[allow(rustdoc::invalid_html_tags)]
62191    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
62192    fn rhai_get_is_direct_messages(&mut self) -> Option<bool> {
62193        self.is_direct_messages.as_ref().copied()
62194    }
62195}
62196#[allow(dead_code)]
62197impl CallbackGame {}
62198#[allow(dead_code)]
62199impl Update {
62200    #[allow(clippy::too_many_arguments)]
62201    pub fn new(update_id: i64) -> Self {
62202        Self {
62203            update_id,
62204            message: None,
62205            edited_message: None,
62206            channel_post: None,
62207            edited_channel_post: None,
62208            business_connection: None,
62209            business_message: None,
62210            edited_business_message: None,
62211            deleted_business_messages: None,
62212            message_reaction: None,
62213            message_reaction_count: None,
62214            inline_query: None,
62215            chosen_inline_result: None,
62216            callback_query: None,
62217            shipping_query: None,
62218            pre_checkout_query: None,
62219            purchased_paid_media: None,
62220            poll: None,
62221            poll_answer: None,
62222            my_chat_member: None,
62223            chat_member: None,
62224            chat_join_request: None,
62225            chat_boost: None,
62226            removed_chat_boost: None,
62227        }
62228    }
62229    #[allow(rustdoc::invalid_html_tags)]
62230    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
62231    #[allow(clippy::needless_lifetimes)]
62232    pub fn get_update_id<'a>(&'a self) -> i64 {
62233        self.update_id
62234    }
62235    #[allow(rustdoc::invalid_html_tags)]
62236    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
62237    #[allow(clippy::needless_lifetimes)]
62238    pub fn set_update_id<'a>(&'a mut self, update_id: i64) -> &'a mut Self {
62239        self.update_id = update_id;
62240        self
62241    }
62242    #[allow(rustdoc::invalid_html_tags)]
62243    #[doc = "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially."]
62244    fn rhai_get_update_id(&mut self) -> i64 {
62245        self.update_id
62246    }
62247    #[allow(rustdoc::invalid_html_tags)]
62248    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
62249    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62250    pub fn get_message<'a>(&'a self) -> Option<&'a Message> {
62251        self.message.as_ref().map(|v| v.inner_ref())
62252    }
62253    #[allow(rustdoc::invalid_html_tags)]
62254    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
62255    #[allow(clippy::needless_lifetimes)]
62256    pub fn set_message<'a>(&'a mut self, message: Option<Message>) -> &'a mut Self {
62257        self.message = message.map(|message| BoxWrapper(Box::new(message)));
62258        self
62259    }
62260    #[allow(rustdoc::invalid_html_tags)]
62261    #[doc = "Optional. New incoming message of any kind - text, photo, sticker, etc."]
62262    fn rhai_get_message(&mut self) -> Option<Message> {
62263        self.message.as_ref().map(|v| v.clone().into())
62264    }
62265    #[allow(rustdoc::invalid_html_tags)]
62266    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
62267    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62268    pub fn get_edited_message<'a>(&'a self) -> Option<&'a Message> {
62269        self.edited_message.as_ref().map(|v| v.inner_ref())
62270    }
62271    #[allow(rustdoc::invalid_html_tags)]
62272    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
62273    #[allow(clippy::needless_lifetimes)]
62274    pub fn set_edited_message<'a>(&'a mut self, edited_message: Option<Message>) -> &'a mut Self {
62275        self.edited_message =
62276            edited_message.map(|edited_message| BoxWrapper(Box::new(edited_message)));
62277        self
62278    }
62279    #[allow(rustdoc::invalid_html_tags)]
62280    #[doc = "Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
62281    fn rhai_get_edited_message(&mut self) -> Option<Message> {
62282        self.edited_message.as_ref().map(|v| v.clone().into())
62283    }
62284    #[allow(rustdoc::invalid_html_tags)]
62285    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
62286    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62287    pub fn get_channel_post<'a>(&'a self) -> Option<&'a Message> {
62288        self.channel_post.as_ref().map(|v| v.inner_ref())
62289    }
62290    #[allow(rustdoc::invalid_html_tags)]
62291    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
62292    #[allow(clippy::needless_lifetimes)]
62293    pub fn set_channel_post<'a>(&'a mut self, channel_post: Option<Message>) -> &'a mut Self {
62294        self.channel_post = channel_post.map(|channel_post| BoxWrapper(Box::new(channel_post)));
62295        self
62296    }
62297    #[allow(rustdoc::invalid_html_tags)]
62298    #[doc = "Optional. New incoming channel post of any kind - text, photo, sticker, etc."]
62299    fn rhai_get_channel_post(&mut self) -> Option<Message> {
62300        self.channel_post.as_ref().map(|v| v.clone().into())
62301    }
62302    #[allow(rustdoc::invalid_html_tags)]
62303    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
62304    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62305    pub fn get_edited_channel_post<'a>(&'a self) -> Option<&'a Message> {
62306        self.edited_channel_post.as_ref().map(|v| v.inner_ref())
62307    }
62308    #[allow(rustdoc::invalid_html_tags)]
62309    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
62310    #[allow(clippy::needless_lifetimes)]
62311    pub fn set_edited_channel_post<'a>(
62312        &'a mut self,
62313        edited_channel_post: Option<Message>,
62314    ) -> &'a mut Self {
62315        self.edited_channel_post = edited_channel_post
62316            .map(|edited_channel_post| BoxWrapper(Box::new(edited_channel_post)));
62317        self
62318    }
62319    #[allow(rustdoc::invalid_html_tags)]
62320    #[doc = "Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."]
62321    fn rhai_get_edited_channel_post(&mut self) -> Option<Message> {
62322        self.edited_channel_post.as_ref().map(|v| v.clone().into())
62323    }
62324    #[allow(rustdoc::invalid_html_tags)]
62325    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
62326    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62327    pub fn get_business_connection<'a>(&'a self) -> Option<&'a BusinessConnection> {
62328        self.business_connection.as_ref().map(|v| v.inner_ref())
62329    }
62330    #[allow(rustdoc::invalid_html_tags)]
62331    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
62332    #[allow(clippy::needless_lifetimes)]
62333    pub fn set_business_connection<'a>(
62334        &'a mut self,
62335        business_connection: Option<BusinessConnection>,
62336    ) -> &'a mut Self {
62337        self.business_connection = business_connection
62338            .map(|business_connection| BoxWrapper(Box::new(business_connection)));
62339        self
62340    }
62341    #[allow(rustdoc::invalid_html_tags)]
62342    #[doc = "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"]
62343    fn rhai_get_business_connection(&mut self) -> Option<BusinessConnection> {
62344        self.business_connection.as_ref().map(|v| v.clone().into())
62345    }
62346    #[allow(rustdoc::invalid_html_tags)]
62347    #[doc = "Optional. New message from a connected business account"]
62348    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62349    pub fn get_business_message<'a>(&'a self) -> Option<&'a Message> {
62350        self.business_message.as_ref().map(|v| v.inner_ref())
62351    }
62352    #[allow(rustdoc::invalid_html_tags)]
62353    #[doc = "Optional. New message from a connected business account"]
62354    #[allow(clippy::needless_lifetimes)]
62355    pub fn set_business_message<'a>(
62356        &'a mut self,
62357        business_message: Option<Message>,
62358    ) -> &'a mut Self {
62359        self.business_message =
62360            business_message.map(|business_message| BoxWrapper(Box::new(business_message)));
62361        self
62362    }
62363    #[allow(rustdoc::invalid_html_tags)]
62364    #[doc = "Optional. New message from a connected business account"]
62365    fn rhai_get_business_message(&mut self) -> Option<Message> {
62366        self.business_message.as_ref().map(|v| v.clone().into())
62367    }
62368    #[allow(rustdoc::invalid_html_tags)]
62369    #[doc = "Optional. New version of a message from a connected business account"]
62370    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62371    pub fn get_edited_business_message<'a>(&'a self) -> Option<&'a Message> {
62372        self.edited_business_message.as_ref().map(|v| v.inner_ref())
62373    }
62374    #[allow(rustdoc::invalid_html_tags)]
62375    #[doc = "Optional. New version of a message from a connected business account"]
62376    #[allow(clippy::needless_lifetimes)]
62377    pub fn set_edited_business_message<'a>(
62378        &'a mut self,
62379        edited_business_message: Option<Message>,
62380    ) -> &'a mut Self {
62381        self.edited_business_message = edited_business_message
62382            .map(|edited_business_message| BoxWrapper(Box::new(edited_business_message)));
62383        self
62384    }
62385    #[allow(rustdoc::invalid_html_tags)]
62386    #[doc = "Optional. New version of a message from a connected business account"]
62387    fn rhai_get_edited_business_message(&mut self) -> Option<Message> {
62388        self.edited_business_message
62389            .as_ref()
62390            .map(|v| v.clone().into())
62391    }
62392    #[allow(rustdoc::invalid_html_tags)]
62393    #[doc = "Optional. Messages were deleted from a connected business account"]
62394    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62395    pub fn get_deleted_business_messages<'a>(&'a self) -> Option<&'a BusinessMessagesDeleted> {
62396        self.deleted_business_messages
62397            .as_ref()
62398            .map(|v| v.inner_ref())
62399    }
62400    #[allow(rustdoc::invalid_html_tags)]
62401    #[doc = "Optional. Messages were deleted from a connected business account"]
62402    #[allow(clippy::needless_lifetimes)]
62403    pub fn set_deleted_business_messages<'a>(
62404        &'a mut self,
62405        deleted_business_messages: Option<BusinessMessagesDeleted>,
62406    ) -> &'a mut Self {
62407        self.deleted_business_messages = deleted_business_messages
62408            .map(|deleted_business_messages| BoxWrapper(Box::new(deleted_business_messages)));
62409        self
62410    }
62411    #[allow(rustdoc::invalid_html_tags)]
62412    #[doc = "Optional. Messages were deleted from a connected business account"]
62413    fn rhai_get_deleted_business_messages(&mut self) -> Option<BusinessMessagesDeleted> {
62414        self.deleted_business_messages
62415            .as_ref()
62416            .map(|v| v.clone().into())
62417    }
62418    #[allow(rustdoc::invalid_html_tags)]
62419    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
62420    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62421    pub fn get_message_reaction<'a>(&'a self) -> Option<&'a MessageReactionUpdated> {
62422        self.message_reaction.as_ref().map(|v| v.inner_ref())
62423    }
62424    #[allow(rustdoc::invalid_html_tags)]
62425    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
62426    #[allow(clippy::needless_lifetimes)]
62427    pub fn set_message_reaction<'a>(
62428        &'a mut self,
62429        message_reaction: Option<MessageReactionUpdated>,
62430    ) -> &'a mut Self {
62431        self.message_reaction =
62432            message_reaction.map(|message_reaction| BoxWrapper(Box::new(message_reaction)));
62433        self
62434    }
62435    #[allow(rustdoc::invalid_html_tags)]
62436    #[doc = "Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots."]
62437    fn rhai_get_message_reaction(&mut self) -> Option<MessageReactionUpdated> {
62438        self.message_reaction.as_ref().map(|v| v.clone().into())
62439    }
62440    #[allow(rustdoc::invalid_html_tags)]
62441    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
62442    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62443    pub fn get_message_reaction_count<'a>(&'a self) -> Option<&'a MessageReactionCountUpdated> {
62444        self.message_reaction_count.as_ref().map(|v| v.inner_ref())
62445    }
62446    #[allow(rustdoc::invalid_html_tags)]
62447    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
62448    #[allow(clippy::needless_lifetimes)]
62449    pub fn set_message_reaction_count<'a>(
62450        &'a mut self,
62451        message_reaction_count: Option<MessageReactionCountUpdated>,
62452    ) -> &'a mut Self {
62453        self.message_reaction_count = message_reaction_count
62454            .map(|message_reaction_count| BoxWrapper(Box::new(message_reaction_count)));
62455        self
62456    }
62457    #[allow(rustdoc::invalid_html_tags)]
62458    #[doc = "Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes."]
62459    fn rhai_get_message_reaction_count(&mut self) -> Option<MessageReactionCountUpdated> {
62460        self.message_reaction_count
62461            .as_ref()
62462            .map(|v| v.clone().into())
62463    }
62464    #[allow(rustdoc::invalid_html_tags)]
62465    #[doc = "Optional. New incoming inline query"]
62466    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62467    pub fn get_inline_query<'a>(&'a self) -> Option<&'a InlineQuery> {
62468        self.inline_query.as_ref().map(|v| v.inner_ref())
62469    }
62470    #[allow(rustdoc::invalid_html_tags)]
62471    #[doc = "Optional. New incoming inline query"]
62472    #[allow(clippy::needless_lifetimes)]
62473    pub fn set_inline_query<'a>(&'a mut self, inline_query: Option<InlineQuery>) -> &'a mut Self {
62474        self.inline_query = inline_query.map(|inline_query| BoxWrapper(Box::new(inline_query)));
62475        self
62476    }
62477    #[allow(rustdoc::invalid_html_tags)]
62478    #[doc = "Optional. New incoming inline query"]
62479    fn rhai_get_inline_query(&mut self) -> Option<InlineQuery> {
62480        self.inline_query.as_ref().map(|v| v.clone().into())
62481    }
62482    #[allow(rustdoc::invalid_html_tags)]
62483    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
62484    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62485    pub fn get_chosen_inline_result<'a>(&'a self) -> Option<&'a ChosenInlineResult> {
62486        self.chosen_inline_result.as_ref().map(|v| v.inner_ref())
62487    }
62488    #[allow(rustdoc::invalid_html_tags)]
62489    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
62490    #[allow(clippy::needless_lifetimes)]
62491    pub fn set_chosen_inline_result<'a>(
62492        &'a mut self,
62493        chosen_inline_result: Option<ChosenInlineResult>,
62494    ) -> &'a mut Self {
62495        self.chosen_inline_result = chosen_inline_result
62496            .map(|chosen_inline_result| BoxWrapper(Box::new(chosen_inline_result)));
62497        self
62498    }
62499    #[allow(rustdoc::invalid_html_tags)]
62500    #[doc = "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot."]
62501    fn rhai_get_chosen_inline_result(&mut self) -> Option<ChosenInlineResult> {
62502        self.chosen_inline_result.as_ref().map(|v| v.clone().into())
62503    }
62504    #[allow(rustdoc::invalid_html_tags)]
62505    #[doc = "Optional. New incoming callback query"]
62506    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62507    pub fn get_callback_query<'a>(&'a self) -> Option<&'a CallbackQuery> {
62508        self.callback_query.as_ref().map(|v| v.inner_ref())
62509    }
62510    #[allow(rustdoc::invalid_html_tags)]
62511    #[doc = "Optional. New incoming callback query"]
62512    #[allow(clippy::needless_lifetimes)]
62513    pub fn set_callback_query<'a>(
62514        &'a mut self,
62515        callback_query: Option<CallbackQuery>,
62516    ) -> &'a mut Self {
62517        self.callback_query =
62518            callback_query.map(|callback_query| BoxWrapper(Box::new(callback_query)));
62519        self
62520    }
62521    #[allow(rustdoc::invalid_html_tags)]
62522    #[doc = "Optional. New incoming callback query"]
62523    fn rhai_get_callback_query(&mut self) -> Option<CallbackQuery> {
62524        self.callback_query.as_ref().map(|v| v.clone().into())
62525    }
62526    #[allow(rustdoc::invalid_html_tags)]
62527    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
62528    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62529    pub fn get_shipping_query<'a>(&'a self) -> Option<&'a ShippingQuery> {
62530        self.shipping_query.as_ref().map(|v| v.inner_ref())
62531    }
62532    #[allow(rustdoc::invalid_html_tags)]
62533    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
62534    #[allow(clippy::needless_lifetimes)]
62535    pub fn set_shipping_query<'a>(
62536        &'a mut self,
62537        shipping_query: Option<ShippingQuery>,
62538    ) -> &'a mut Self {
62539        self.shipping_query =
62540            shipping_query.map(|shipping_query| BoxWrapper(Box::new(shipping_query)));
62541        self
62542    }
62543    #[allow(rustdoc::invalid_html_tags)]
62544    #[doc = "Optional. New incoming shipping query. Only for invoices with flexible price"]
62545    fn rhai_get_shipping_query(&mut self) -> Option<ShippingQuery> {
62546        self.shipping_query.as_ref().map(|v| v.clone().into())
62547    }
62548    #[allow(rustdoc::invalid_html_tags)]
62549    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
62550    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62551    pub fn get_pre_checkout_query<'a>(&'a self) -> Option<&'a PreCheckoutQuery> {
62552        self.pre_checkout_query.as_ref().map(|v| v.inner_ref())
62553    }
62554    #[allow(rustdoc::invalid_html_tags)]
62555    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
62556    #[allow(clippy::needless_lifetimes)]
62557    pub fn set_pre_checkout_query<'a>(
62558        &'a mut self,
62559        pre_checkout_query: Option<PreCheckoutQuery>,
62560    ) -> &'a mut Self {
62561        self.pre_checkout_query =
62562            pre_checkout_query.map(|pre_checkout_query| BoxWrapper(Box::new(pre_checkout_query)));
62563        self
62564    }
62565    #[allow(rustdoc::invalid_html_tags)]
62566    #[doc = "Optional. New incoming pre-checkout query. Contains full information about checkout"]
62567    fn rhai_get_pre_checkout_query(&mut self) -> Option<PreCheckoutQuery> {
62568        self.pre_checkout_query.as_ref().map(|v| v.clone().into())
62569    }
62570    #[allow(rustdoc::invalid_html_tags)]
62571    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
62572    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62573    pub fn get_purchased_paid_media<'a>(&'a self) -> Option<&'a PaidMediaPurchased> {
62574        self.purchased_paid_media.as_ref().map(|v| v.inner_ref())
62575    }
62576    #[allow(rustdoc::invalid_html_tags)]
62577    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
62578    #[allow(clippy::needless_lifetimes)]
62579    pub fn set_purchased_paid_media<'a>(
62580        &'a mut self,
62581        purchased_paid_media: Option<PaidMediaPurchased>,
62582    ) -> &'a mut Self {
62583        self.purchased_paid_media = purchased_paid_media
62584            .map(|purchased_paid_media| BoxWrapper(Box::new(purchased_paid_media)));
62585        self
62586    }
62587    #[allow(rustdoc::invalid_html_tags)]
62588    #[doc = "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat"]
62589    fn rhai_get_purchased_paid_media(&mut self) -> Option<PaidMediaPurchased> {
62590        self.purchased_paid_media.as_ref().map(|v| v.clone().into())
62591    }
62592    #[allow(rustdoc::invalid_html_tags)]
62593    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
62594    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62595    pub fn get_poll<'a>(&'a self) -> Option<&'a Poll> {
62596        self.poll.as_ref().map(|v| v.inner_ref())
62597    }
62598    #[allow(rustdoc::invalid_html_tags)]
62599    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
62600    #[allow(clippy::needless_lifetimes)]
62601    pub fn set_poll<'a>(&'a mut self, poll: Option<Poll>) -> &'a mut Self {
62602        self.poll = poll.map(|poll| BoxWrapper(Box::new(poll)));
62603        self
62604    }
62605    #[allow(rustdoc::invalid_html_tags)]
62606    #[doc = "Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot"]
62607    fn rhai_get_poll(&mut self) -> Option<Poll> {
62608        self.poll.as_ref().map(|v| v.clone().into())
62609    }
62610    #[allow(rustdoc::invalid_html_tags)]
62611    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
62612    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62613    pub fn get_poll_answer<'a>(&'a self) -> Option<&'a PollAnswer> {
62614        self.poll_answer.as_ref().map(|v| v.inner_ref())
62615    }
62616    #[allow(rustdoc::invalid_html_tags)]
62617    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
62618    #[allow(clippy::needless_lifetimes)]
62619    pub fn set_poll_answer<'a>(&'a mut self, poll_answer: Option<PollAnswer>) -> &'a mut Self {
62620        self.poll_answer = poll_answer.map(|poll_answer| BoxWrapper(Box::new(poll_answer)));
62621        self
62622    }
62623    #[allow(rustdoc::invalid_html_tags)]
62624    #[doc = "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself."]
62625    fn rhai_get_poll_answer(&mut self) -> Option<PollAnswer> {
62626        self.poll_answer.as_ref().map(|v| v.clone().into())
62627    }
62628    #[allow(rustdoc::invalid_html_tags)]
62629    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
62630    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62631    pub fn get_my_chat_member<'a>(&'a self) -> Option<&'a ChatMemberUpdated> {
62632        self.my_chat_member.as_ref().map(|v| v.inner_ref())
62633    }
62634    #[allow(rustdoc::invalid_html_tags)]
62635    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
62636    #[allow(clippy::needless_lifetimes)]
62637    pub fn set_my_chat_member<'a>(
62638        &'a mut self,
62639        my_chat_member: Option<ChatMemberUpdated>,
62640    ) -> &'a mut Self {
62641        self.my_chat_member =
62642            my_chat_member.map(|my_chat_member| BoxWrapper(Box::new(my_chat_member)));
62643        self
62644    }
62645    #[allow(rustdoc::invalid_html_tags)]
62646    #[doc = "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user."]
62647    fn rhai_get_my_chat_member(&mut self) -> Option<ChatMemberUpdated> {
62648        self.my_chat_member.as_ref().map(|v| v.clone().into())
62649    }
62650    #[allow(rustdoc::invalid_html_tags)]
62651    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
62652    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62653    pub fn get_chat_member<'a>(&'a self) -> Option<&'a ChatMemberUpdated> {
62654        self.chat_member.as_ref().map(|v| v.inner_ref())
62655    }
62656    #[allow(rustdoc::invalid_html_tags)]
62657    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
62658    #[allow(clippy::needless_lifetimes)]
62659    pub fn set_chat_member<'a>(
62660        &'a mut self,
62661        chat_member: Option<ChatMemberUpdated>,
62662    ) -> &'a mut Self {
62663        self.chat_member = chat_member.map(|chat_member| BoxWrapper(Box::new(chat_member)));
62664        self
62665    }
62666    #[allow(rustdoc::invalid_html_tags)]
62667    #[doc = "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify \"chat_member\" in the list of allowed_updates to receive these updates."]
62668    fn rhai_get_chat_member(&mut self) -> Option<ChatMemberUpdated> {
62669        self.chat_member.as_ref().map(|v| v.clone().into())
62670    }
62671    #[allow(rustdoc::invalid_html_tags)]
62672    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
62673    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62674    pub fn get_chat_join_request<'a>(&'a self) -> Option<&'a ChatJoinRequest> {
62675        self.chat_join_request.as_ref().map(|v| v.inner_ref())
62676    }
62677    #[allow(rustdoc::invalid_html_tags)]
62678    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
62679    #[allow(clippy::needless_lifetimes)]
62680    pub fn set_chat_join_request<'a>(
62681        &'a mut self,
62682        chat_join_request: Option<ChatJoinRequest>,
62683    ) -> &'a mut Self {
62684        self.chat_join_request =
62685            chat_join_request.map(|chat_join_request| BoxWrapper(Box::new(chat_join_request)));
62686        self
62687    }
62688    #[allow(rustdoc::invalid_html_tags)]
62689    #[doc = "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates."]
62690    fn rhai_get_chat_join_request(&mut self) -> Option<ChatJoinRequest> {
62691        self.chat_join_request.as_ref().map(|v| v.clone().into())
62692    }
62693    #[allow(rustdoc::invalid_html_tags)]
62694    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
62695    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62696    pub fn get_chat_boost<'a>(&'a self) -> Option<&'a ChatBoostUpdated> {
62697        self.chat_boost.as_ref().map(|v| v.inner_ref())
62698    }
62699    #[allow(rustdoc::invalid_html_tags)]
62700    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
62701    #[allow(clippy::needless_lifetimes)]
62702    pub fn set_chat_boost<'a>(&'a mut self, chat_boost: Option<ChatBoostUpdated>) -> &'a mut Self {
62703        self.chat_boost = chat_boost.map(|chat_boost| BoxWrapper(Box::new(chat_boost)));
62704        self
62705    }
62706    #[allow(rustdoc::invalid_html_tags)]
62707    #[doc = "Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates."]
62708    fn rhai_get_chat_boost(&mut self) -> Option<ChatBoostUpdated> {
62709        self.chat_boost.as_ref().map(|v| v.clone().into())
62710    }
62711    #[allow(rustdoc::invalid_html_tags)]
62712    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
62713    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62714    pub fn get_removed_chat_boost<'a>(&'a self) -> Option<&'a ChatBoostRemoved> {
62715        self.removed_chat_boost.as_ref().map(|v| v.inner_ref())
62716    }
62717    #[allow(rustdoc::invalid_html_tags)]
62718    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
62719    #[allow(clippy::needless_lifetimes)]
62720    pub fn set_removed_chat_boost<'a>(
62721        &'a mut self,
62722        removed_chat_boost: Option<ChatBoostRemoved>,
62723    ) -> &'a mut Self {
62724        self.removed_chat_boost =
62725            removed_chat_boost.map(|removed_chat_boost| BoxWrapper(Box::new(removed_chat_boost)));
62726        self
62727    }
62728    #[allow(rustdoc::invalid_html_tags)]
62729    #[doc = "Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates."]
62730    fn rhai_get_removed_chat_boost(&mut self) -> Option<ChatBoostRemoved> {
62731        self.removed_chat_boost.as_ref().map(|v| v.clone().into())
62732    }
62733}
62734#[allow(dead_code)]
62735impl PhotoSize {
62736    #[allow(clippy::too_many_arguments)]
62737    pub fn new(file_id: String, file_unique_id: String, width: i64, height: i64) -> Self {
62738        Self {
62739            file_id,
62740            file_unique_id,
62741            width,
62742            height,
62743            file_size: None,
62744        }
62745    }
62746    #[allow(rustdoc::invalid_html_tags)]
62747    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
62748    #[allow(clippy::needless_lifetimes)]
62749    pub fn get_file_id<'a>(&'a self) -> &'a str {
62750        self.file_id.as_str()
62751    }
62752    #[allow(rustdoc::invalid_html_tags)]
62753    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
62754    #[allow(clippy::needless_lifetimes)]
62755    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
62756        self.file_id = file_id;
62757        self
62758    }
62759    #[allow(rustdoc::invalid_html_tags)]
62760    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
62761    fn rhai_get_file_id(&mut self) -> String {
62762        self.file_id.clone()
62763    }
62764    #[allow(rustdoc::invalid_html_tags)]
62765    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
62766    #[allow(clippy::needless_lifetimes)]
62767    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
62768        self.file_unique_id.as_str()
62769    }
62770    #[allow(rustdoc::invalid_html_tags)]
62771    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
62772    #[allow(clippy::needless_lifetimes)]
62773    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
62774        self.file_unique_id = file_unique_id;
62775        self
62776    }
62777    #[allow(rustdoc::invalid_html_tags)]
62778    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
62779    fn rhai_get_file_unique_id(&mut self) -> String {
62780        self.file_unique_id.clone()
62781    }
62782    #[allow(rustdoc::invalid_html_tags)]
62783    #[doc = "Photo width"]
62784    #[allow(clippy::needless_lifetimes)]
62785    pub fn get_width<'a>(&'a self) -> i64 {
62786        self.width
62787    }
62788    #[allow(rustdoc::invalid_html_tags)]
62789    #[doc = "Photo width"]
62790    #[allow(clippy::needless_lifetimes)]
62791    pub fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self {
62792        self.width = width;
62793        self
62794    }
62795    #[allow(rustdoc::invalid_html_tags)]
62796    #[doc = "Photo width"]
62797    fn rhai_get_width(&mut self) -> i64 {
62798        self.width
62799    }
62800    #[allow(rustdoc::invalid_html_tags)]
62801    #[doc = "Photo height"]
62802    #[allow(clippy::needless_lifetimes)]
62803    pub fn get_height<'a>(&'a self) -> i64 {
62804        self.height
62805    }
62806    #[allow(rustdoc::invalid_html_tags)]
62807    #[doc = "Photo height"]
62808    #[allow(clippy::needless_lifetimes)]
62809    pub fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self {
62810        self.height = height;
62811        self
62812    }
62813    #[allow(rustdoc::invalid_html_tags)]
62814    #[doc = "Photo height"]
62815    fn rhai_get_height(&mut self) -> i64 {
62816        self.height
62817    }
62818    #[allow(rustdoc::invalid_html_tags)]
62819    #[doc = "Optional. File size in bytes"]
62820    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62821    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
62822        self.file_size.as_ref().map(|v| *v)
62823    }
62824    #[allow(rustdoc::invalid_html_tags)]
62825    #[doc = "Optional. File size in bytes"]
62826    #[allow(clippy::needless_lifetimes)]
62827    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
62828        self.file_size = file_size;
62829        self
62830    }
62831    #[allow(rustdoc::invalid_html_tags)]
62832    #[doc = "Optional. File size in bytes"]
62833    fn rhai_get_file_size(&mut self) -> Option<i64> {
62834        self.file_size.as_ref().copied()
62835    }
62836}
62837impl TraitChatMemberOwner for ChatMemberOwner {
62838    #[allow(rustdoc::invalid_html_tags)]
62839    #[doc = "Information about the user"]
62840    #[allow(clippy::needless_lifetimes)]
62841    fn get_user<'a>(&'a self) -> &'a User {
62842        &self.user
62843    }
62844    #[allow(rustdoc::invalid_html_tags)]
62845    #[doc = "Information about the user"]
62846    #[allow(clippy::needless_lifetimes)]
62847    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
62848        self.user = BoxWrapper(Unbox(user));
62849        self
62850    }
62851    #[allow(rustdoc::invalid_html_tags)]
62852    #[doc = "True, if the user's presence in the chat is hidden"]
62853    #[allow(clippy::needless_lifetimes)]
62854    fn get_is_anonymous<'a>(&'a self) -> bool {
62855        self.is_anonymous
62856    }
62857    #[allow(rustdoc::invalid_html_tags)]
62858    #[doc = "True, if the user's presence in the chat is hidden"]
62859    #[allow(clippy::needless_lifetimes)]
62860    fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self {
62861        self.is_anonymous = is_anonymous;
62862        self
62863    }
62864    #[allow(rustdoc::invalid_html_tags)]
62865    #[doc = "Optional. Custom title for this user"]
62866    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
62867    fn get_custom_title<'a>(&'a self) -> Option<&'a str> {
62868        self.custom_title.as_ref().map(|v| v.as_str())
62869    }
62870    #[allow(rustdoc::invalid_html_tags)]
62871    #[doc = "Optional. Custom title for this user"]
62872    #[allow(clippy::needless_lifetimes)]
62873    fn set_custom_title<'a>(&'a mut self, custom_title: Option<String>) -> &'a mut Self {
62874        self.custom_title = custom_title;
62875        self
62876    }
62877}
62878impl TraitChatMemberAdministrator for ChatMemberAdministrator {
62879    #[allow(rustdoc::invalid_html_tags)]
62880    #[doc = "Information about the user"]
62881    #[allow(clippy::needless_lifetimes)]
62882    fn get_user<'a>(&'a self) -> &'a User {
62883        &self.user
62884    }
62885    #[allow(rustdoc::invalid_html_tags)]
62886    #[doc = "Information about the user"]
62887    #[allow(clippy::needless_lifetimes)]
62888    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
62889        self.user = BoxWrapper(Unbox(user));
62890        self
62891    }
62892    #[allow(rustdoc::invalid_html_tags)]
62893    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
62894    #[allow(clippy::needless_lifetimes)]
62895    fn get_can_be_edited<'a>(&'a self) -> bool {
62896        self.can_be_edited
62897    }
62898    #[allow(rustdoc::invalid_html_tags)]
62899    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
62900    #[allow(clippy::needless_lifetimes)]
62901    fn set_can_be_edited<'a>(&'a mut self, can_be_edited: bool) -> &'a mut Self {
62902        self.can_be_edited = can_be_edited;
62903        self
62904    }
62905    #[allow(rustdoc::invalid_html_tags)]
62906    #[doc = "True, if the user's presence in the chat is hidden"]
62907    #[allow(clippy::needless_lifetimes)]
62908    fn get_is_anonymous<'a>(&'a self) -> bool {
62909        self.is_anonymous
62910    }
62911    #[allow(rustdoc::invalid_html_tags)]
62912    #[doc = "True, if the user's presence in the chat is hidden"]
62913    #[allow(clippy::needless_lifetimes)]
62914    fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self {
62915        self.is_anonymous = is_anonymous;
62916        self
62917    }
62918    #[allow(rustdoc::invalid_html_tags)]
62919    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
62920    #[allow(clippy::needless_lifetimes)]
62921    fn get_can_manage_chat<'a>(&'a self) -> bool {
62922        self.can_manage_chat
62923    }
62924    #[allow(rustdoc::invalid_html_tags)]
62925    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
62926    #[allow(clippy::needless_lifetimes)]
62927    fn set_can_manage_chat<'a>(&'a mut self, can_manage_chat: bool) -> &'a mut Self {
62928        self.can_manage_chat = can_manage_chat;
62929        self
62930    }
62931    #[allow(rustdoc::invalid_html_tags)]
62932    #[doc = "True, if the administrator can delete messages of other users"]
62933    #[allow(clippy::needless_lifetimes)]
62934    fn get_can_delete_messages<'a>(&'a self) -> bool {
62935        self.can_delete_messages
62936    }
62937    #[allow(rustdoc::invalid_html_tags)]
62938    #[doc = "True, if the administrator can delete messages of other users"]
62939    #[allow(clippy::needless_lifetimes)]
62940    fn set_can_delete_messages<'a>(&'a mut self, can_delete_messages: bool) -> &'a mut Self {
62941        self.can_delete_messages = can_delete_messages;
62942        self
62943    }
62944    #[allow(rustdoc::invalid_html_tags)]
62945    #[doc = "True, if the administrator can manage video chats"]
62946    #[allow(clippy::needless_lifetimes)]
62947    fn get_can_manage_video_chats<'a>(&'a self) -> bool {
62948        self.can_manage_video_chats
62949    }
62950    #[allow(rustdoc::invalid_html_tags)]
62951    #[doc = "True, if the administrator can manage video chats"]
62952    #[allow(clippy::needless_lifetimes)]
62953    fn set_can_manage_video_chats<'a>(&'a mut self, can_manage_video_chats: bool) -> &'a mut Self {
62954        self.can_manage_video_chats = can_manage_video_chats;
62955        self
62956    }
62957    #[allow(rustdoc::invalid_html_tags)]
62958    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
62959    #[allow(clippy::needless_lifetimes)]
62960    fn get_can_restrict_members<'a>(&'a self) -> bool {
62961        self.can_restrict_members
62962    }
62963    #[allow(rustdoc::invalid_html_tags)]
62964    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
62965    #[allow(clippy::needless_lifetimes)]
62966    fn set_can_restrict_members<'a>(&'a mut self, can_restrict_members: bool) -> &'a mut Self {
62967        self.can_restrict_members = can_restrict_members;
62968        self
62969    }
62970    #[allow(rustdoc::invalid_html_tags)]
62971    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
62972    #[allow(clippy::needless_lifetimes)]
62973    fn get_can_promote_members<'a>(&'a self) -> bool {
62974        self.can_promote_members
62975    }
62976    #[allow(rustdoc::invalid_html_tags)]
62977    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
62978    #[allow(clippy::needless_lifetimes)]
62979    fn set_can_promote_members<'a>(&'a mut self, can_promote_members: bool) -> &'a mut Self {
62980        self.can_promote_members = can_promote_members;
62981        self
62982    }
62983    #[allow(rustdoc::invalid_html_tags)]
62984    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
62985    #[allow(clippy::needless_lifetimes)]
62986    fn get_can_change_info<'a>(&'a self) -> bool {
62987        self.can_change_info
62988    }
62989    #[allow(rustdoc::invalid_html_tags)]
62990    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
62991    #[allow(clippy::needless_lifetimes)]
62992    fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self {
62993        self.can_change_info = can_change_info;
62994        self
62995    }
62996    #[allow(rustdoc::invalid_html_tags)]
62997    #[doc = "True, if the user is allowed to invite new users to the chat"]
62998    #[allow(clippy::needless_lifetimes)]
62999    fn get_can_invite_users<'a>(&'a self) -> bool {
63000        self.can_invite_users
63001    }
63002    #[allow(rustdoc::invalid_html_tags)]
63003    #[doc = "True, if the user is allowed to invite new users to the chat"]
63004    #[allow(clippy::needless_lifetimes)]
63005    fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self {
63006        self.can_invite_users = can_invite_users;
63007        self
63008    }
63009    #[allow(rustdoc::invalid_html_tags)]
63010    #[doc = "True, if the administrator can post stories to the chat"]
63011    #[allow(clippy::needless_lifetimes)]
63012    fn get_can_post_stories<'a>(&'a self) -> bool {
63013        self.can_post_stories
63014    }
63015    #[allow(rustdoc::invalid_html_tags)]
63016    #[doc = "True, if the administrator can post stories to the chat"]
63017    #[allow(clippy::needless_lifetimes)]
63018    fn set_can_post_stories<'a>(&'a mut self, can_post_stories: bool) -> &'a mut Self {
63019        self.can_post_stories = can_post_stories;
63020        self
63021    }
63022    #[allow(rustdoc::invalid_html_tags)]
63023    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
63024    #[allow(clippy::needless_lifetimes)]
63025    fn get_can_edit_stories<'a>(&'a self) -> bool {
63026        self.can_edit_stories
63027    }
63028    #[allow(rustdoc::invalid_html_tags)]
63029    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
63030    #[allow(clippy::needless_lifetimes)]
63031    fn set_can_edit_stories<'a>(&'a mut self, can_edit_stories: bool) -> &'a mut Self {
63032        self.can_edit_stories = can_edit_stories;
63033        self
63034    }
63035    #[allow(rustdoc::invalid_html_tags)]
63036    #[doc = "True, if the administrator can delete stories posted by other users"]
63037    #[allow(clippy::needless_lifetimes)]
63038    fn get_can_delete_stories<'a>(&'a self) -> bool {
63039        self.can_delete_stories
63040    }
63041    #[allow(rustdoc::invalid_html_tags)]
63042    #[doc = "True, if the administrator can delete stories posted by other users"]
63043    #[allow(clippy::needless_lifetimes)]
63044    fn set_can_delete_stories<'a>(&'a mut self, can_delete_stories: bool) -> &'a mut Self {
63045        self.can_delete_stories = can_delete_stories;
63046        self
63047    }
63048    #[allow(rustdoc::invalid_html_tags)]
63049    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
63050    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63051    fn get_can_post_messages<'a>(&'a self) -> Option<bool> {
63052        self.can_post_messages.as_ref().map(|v| *v)
63053    }
63054    #[allow(rustdoc::invalid_html_tags)]
63055    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
63056    #[allow(clippy::needless_lifetimes)]
63057    fn set_can_post_messages<'a>(&'a mut self, can_post_messages: Option<bool>) -> &'a mut Self {
63058        self.can_post_messages = can_post_messages;
63059        self
63060    }
63061    #[allow(rustdoc::invalid_html_tags)]
63062    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
63063    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63064    fn get_can_edit_messages<'a>(&'a self) -> Option<bool> {
63065        self.can_edit_messages.as_ref().map(|v| *v)
63066    }
63067    #[allow(rustdoc::invalid_html_tags)]
63068    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
63069    #[allow(clippy::needless_lifetimes)]
63070    fn set_can_edit_messages<'a>(&'a mut self, can_edit_messages: Option<bool>) -> &'a mut Self {
63071        self.can_edit_messages = can_edit_messages;
63072        self
63073    }
63074    #[allow(rustdoc::invalid_html_tags)]
63075    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
63076    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63077    fn get_can_pin_messages<'a>(&'a self) -> Option<bool> {
63078        self.can_pin_messages.as_ref().map(|v| *v)
63079    }
63080    #[allow(rustdoc::invalid_html_tags)]
63081    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
63082    #[allow(clippy::needless_lifetimes)]
63083    fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: Option<bool>) -> &'a mut Self {
63084        self.can_pin_messages = can_pin_messages;
63085        self
63086    }
63087    #[allow(rustdoc::invalid_html_tags)]
63088    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
63089    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63090    fn get_can_manage_topics<'a>(&'a self) -> Option<bool> {
63091        self.can_manage_topics.as_ref().map(|v| *v)
63092    }
63093    #[allow(rustdoc::invalid_html_tags)]
63094    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
63095    #[allow(clippy::needless_lifetimes)]
63096    fn set_can_manage_topics<'a>(&'a mut self, can_manage_topics: Option<bool>) -> &'a mut Self {
63097        self.can_manage_topics = can_manage_topics;
63098        self
63099    }
63100    #[allow(rustdoc::invalid_html_tags)]
63101    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
63102    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63103    fn get_can_manage_direct_messages<'a>(&'a self) -> Option<bool> {
63104        self.can_manage_direct_messages.as_ref().map(|v| *v)
63105    }
63106    #[allow(rustdoc::invalid_html_tags)]
63107    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
63108    #[allow(clippy::needless_lifetimes)]
63109    fn set_can_manage_direct_messages<'a>(
63110        &'a mut self,
63111        can_manage_direct_messages: Option<bool>,
63112    ) -> &'a mut Self {
63113        self.can_manage_direct_messages = can_manage_direct_messages;
63114        self
63115    }
63116    #[allow(rustdoc::invalid_html_tags)]
63117    #[doc = "Optional. Custom title for this user"]
63118    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63119    fn get_custom_title<'a>(&'a self) -> Option<&'a str> {
63120        self.custom_title.as_ref().map(|v| v.as_str())
63121    }
63122    #[allow(rustdoc::invalid_html_tags)]
63123    #[doc = "Optional. Custom title for this user"]
63124    #[allow(clippy::needless_lifetimes)]
63125    fn set_custom_title<'a>(&'a mut self, custom_title: Option<String>) -> &'a mut Self {
63126        self.custom_title = custom_title;
63127        self
63128    }
63129}
63130impl TraitChatMemberMember for ChatMemberMember {
63131    #[allow(rustdoc::invalid_html_tags)]
63132    #[doc = "Information about the user"]
63133    #[allow(clippy::needless_lifetimes)]
63134    fn get_user<'a>(&'a self) -> &'a User {
63135        &self.user
63136    }
63137    #[allow(rustdoc::invalid_html_tags)]
63138    #[doc = "Information about the user"]
63139    #[allow(clippy::needless_lifetimes)]
63140    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
63141        self.user = BoxWrapper(Unbox(user));
63142        self
63143    }
63144    #[allow(rustdoc::invalid_html_tags)]
63145    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
63146    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63147    fn get_until_date<'a>(&'a self) -> Option<i64> {
63148        self.until_date.as_ref().map(|v| *v)
63149    }
63150    #[allow(rustdoc::invalid_html_tags)]
63151    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
63152    #[allow(clippy::needless_lifetimes)]
63153    fn set_until_date<'a>(&'a mut self, until_date: Option<i64>) -> &'a mut Self {
63154        self.until_date = until_date;
63155        self
63156    }
63157}
63158impl TraitChatMemberRestricted for ChatMemberRestricted {
63159    #[allow(rustdoc::invalid_html_tags)]
63160    #[doc = "Information about the user"]
63161    #[allow(clippy::needless_lifetimes)]
63162    fn get_user<'a>(&'a self) -> &'a User {
63163        &self.user
63164    }
63165    #[allow(rustdoc::invalid_html_tags)]
63166    #[doc = "Information about the user"]
63167    #[allow(clippy::needless_lifetimes)]
63168    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
63169        self.user = BoxWrapper(Unbox(user));
63170        self
63171    }
63172    #[allow(rustdoc::invalid_html_tags)]
63173    #[doc = "True, if the user is a member of the chat at the moment of the request"]
63174    #[allow(clippy::needless_lifetimes)]
63175    fn get_is_member<'a>(&'a self) -> bool {
63176        self.is_member
63177    }
63178    #[allow(rustdoc::invalid_html_tags)]
63179    #[doc = "True, if the user is a member of the chat at the moment of the request"]
63180    #[allow(clippy::needless_lifetimes)]
63181    fn set_is_member<'a>(&'a mut self, is_member: bool) -> &'a mut Self {
63182        self.is_member = is_member;
63183        self
63184    }
63185    #[allow(rustdoc::invalid_html_tags)]
63186    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
63187    #[allow(clippy::needless_lifetimes)]
63188    fn get_can_send_messages<'a>(&'a self) -> bool {
63189        self.can_send_messages
63190    }
63191    #[allow(rustdoc::invalid_html_tags)]
63192    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
63193    #[allow(clippy::needless_lifetimes)]
63194    fn set_can_send_messages<'a>(&'a mut self, can_send_messages: bool) -> &'a mut Self {
63195        self.can_send_messages = can_send_messages;
63196        self
63197    }
63198    #[allow(rustdoc::invalid_html_tags)]
63199    #[doc = "True, if the user is allowed to send audios"]
63200    #[allow(clippy::needless_lifetimes)]
63201    fn get_can_send_audios<'a>(&'a self) -> bool {
63202        self.can_send_audios
63203    }
63204    #[allow(rustdoc::invalid_html_tags)]
63205    #[doc = "True, if the user is allowed to send audios"]
63206    #[allow(clippy::needless_lifetimes)]
63207    fn set_can_send_audios<'a>(&'a mut self, can_send_audios: bool) -> &'a mut Self {
63208        self.can_send_audios = can_send_audios;
63209        self
63210    }
63211    #[allow(rustdoc::invalid_html_tags)]
63212    #[doc = "True, if the user is allowed to send documents"]
63213    #[allow(clippy::needless_lifetimes)]
63214    fn get_can_send_documents<'a>(&'a self) -> bool {
63215        self.can_send_documents
63216    }
63217    #[allow(rustdoc::invalid_html_tags)]
63218    #[doc = "True, if the user is allowed to send documents"]
63219    #[allow(clippy::needless_lifetimes)]
63220    fn set_can_send_documents<'a>(&'a mut self, can_send_documents: bool) -> &'a mut Self {
63221        self.can_send_documents = can_send_documents;
63222        self
63223    }
63224    #[allow(rustdoc::invalid_html_tags)]
63225    #[doc = "True, if the user is allowed to send photos"]
63226    #[allow(clippy::needless_lifetimes)]
63227    fn get_can_send_photos<'a>(&'a self) -> bool {
63228        self.can_send_photos
63229    }
63230    #[allow(rustdoc::invalid_html_tags)]
63231    #[doc = "True, if the user is allowed to send photos"]
63232    #[allow(clippy::needless_lifetimes)]
63233    fn set_can_send_photos<'a>(&'a mut self, can_send_photos: bool) -> &'a mut Self {
63234        self.can_send_photos = can_send_photos;
63235        self
63236    }
63237    #[allow(rustdoc::invalid_html_tags)]
63238    #[doc = "True, if the user is allowed to send videos"]
63239    #[allow(clippy::needless_lifetimes)]
63240    fn get_can_send_videos<'a>(&'a self) -> bool {
63241        self.can_send_videos
63242    }
63243    #[allow(rustdoc::invalid_html_tags)]
63244    #[doc = "True, if the user is allowed to send videos"]
63245    #[allow(clippy::needless_lifetimes)]
63246    fn set_can_send_videos<'a>(&'a mut self, can_send_videos: bool) -> &'a mut Self {
63247        self.can_send_videos = can_send_videos;
63248        self
63249    }
63250    #[allow(rustdoc::invalid_html_tags)]
63251    #[doc = "True, if the user is allowed to send video notes"]
63252    #[allow(clippy::needless_lifetimes)]
63253    fn get_can_send_video_notes<'a>(&'a self) -> bool {
63254        self.can_send_video_notes
63255    }
63256    #[allow(rustdoc::invalid_html_tags)]
63257    #[doc = "True, if the user is allowed to send video notes"]
63258    #[allow(clippy::needless_lifetimes)]
63259    fn set_can_send_video_notes<'a>(&'a mut self, can_send_video_notes: bool) -> &'a mut Self {
63260        self.can_send_video_notes = can_send_video_notes;
63261        self
63262    }
63263    #[allow(rustdoc::invalid_html_tags)]
63264    #[doc = "True, if the user is allowed to send voice notes"]
63265    #[allow(clippy::needless_lifetimes)]
63266    fn get_can_send_voice_notes<'a>(&'a self) -> bool {
63267        self.can_send_voice_notes
63268    }
63269    #[allow(rustdoc::invalid_html_tags)]
63270    #[doc = "True, if the user is allowed to send voice notes"]
63271    #[allow(clippy::needless_lifetimes)]
63272    fn set_can_send_voice_notes<'a>(&'a mut self, can_send_voice_notes: bool) -> &'a mut Self {
63273        self.can_send_voice_notes = can_send_voice_notes;
63274        self
63275    }
63276    #[allow(rustdoc::invalid_html_tags)]
63277    #[doc = "True, if the user is allowed to send polls and checklists"]
63278    #[allow(clippy::needless_lifetimes)]
63279    fn get_can_send_polls<'a>(&'a self) -> bool {
63280        self.can_send_polls
63281    }
63282    #[allow(rustdoc::invalid_html_tags)]
63283    #[doc = "True, if the user is allowed to send polls and checklists"]
63284    #[allow(clippy::needless_lifetimes)]
63285    fn set_can_send_polls<'a>(&'a mut self, can_send_polls: bool) -> &'a mut Self {
63286        self.can_send_polls = can_send_polls;
63287        self
63288    }
63289    #[allow(rustdoc::invalid_html_tags)]
63290    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
63291    #[allow(clippy::needless_lifetimes)]
63292    fn get_can_send_other_messages<'a>(&'a self) -> bool {
63293        self.can_send_other_messages
63294    }
63295    #[allow(rustdoc::invalid_html_tags)]
63296    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
63297    #[allow(clippy::needless_lifetimes)]
63298    fn set_can_send_other_messages<'a>(
63299        &'a mut self,
63300        can_send_other_messages: bool,
63301    ) -> &'a mut Self {
63302        self.can_send_other_messages = can_send_other_messages;
63303        self
63304    }
63305    #[allow(rustdoc::invalid_html_tags)]
63306    #[doc = "True, if the user is allowed to add web page previews to their messages"]
63307    #[allow(clippy::needless_lifetimes)]
63308    fn get_can_add_web_page_previews<'a>(&'a self) -> bool {
63309        self.can_add_web_page_previews
63310    }
63311    #[allow(rustdoc::invalid_html_tags)]
63312    #[doc = "True, if the user is allowed to add web page previews to their messages"]
63313    #[allow(clippy::needless_lifetimes)]
63314    fn set_can_add_web_page_previews<'a>(
63315        &'a mut self,
63316        can_add_web_page_previews: bool,
63317    ) -> &'a mut Self {
63318        self.can_add_web_page_previews = can_add_web_page_previews;
63319        self
63320    }
63321    #[allow(rustdoc::invalid_html_tags)]
63322    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
63323    #[allow(clippy::needless_lifetimes)]
63324    fn get_can_change_info<'a>(&'a self) -> bool {
63325        self.can_change_info
63326    }
63327    #[allow(rustdoc::invalid_html_tags)]
63328    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
63329    #[allow(clippy::needless_lifetimes)]
63330    fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self {
63331        self.can_change_info = can_change_info;
63332        self
63333    }
63334    #[allow(rustdoc::invalid_html_tags)]
63335    #[doc = "True, if the user is allowed to invite new users to the chat"]
63336    #[allow(clippy::needless_lifetimes)]
63337    fn get_can_invite_users<'a>(&'a self) -> bool {
63338        self.can_invite_users
63339    }
63340    #[allow(rustdoc::invalid_html_tags)]
63341    #[doc = "True, if the user is allowed to invite new users to the chat"]
63342    #[allow(clippy::needless_lifetimes)]
63343    fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self {
63344        self.can_invite_users = can_invite_users;
63345        self
63346    }
63347    #[allow(rustdoc::invalid_html_tags)]
63348    #[doc = "True, if the user is allowed to pin messages"]
63349    #[allow(clippy::needless_lifetimes)]
63350    fn get_can_pin_messages<'a>(&'a self) -> bool {
63351        self.can_pin_messages
63352    }
63353    #[allow(rustdoc::invalid_html_tags)]
63354    #[doc = "True, if the user is allowed to pin messages"]
63355    #[allow(clippy::needless_lifetimes)]
63356    fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: bool) -> &'a mut Self {
63357        self.can_pin_messages = can_pin_messages;
63358        self
63359    }
63360    #[allow(rustdoc::invalid_html_tags)]
63361    #[doc = "True, if the user is allowed to create forum topics"]
63362    #[allow(clippy::needless_lifetimes)]
63363    fn get_can_manage_topics<'a>(&'a self) -> bool {
63364        self.can_manage_topics
63365    }
63366    #[allow(rustdoc::invalid_html_tags)]
63367    #[doc = "True, if the user is allowed to create forum topics"]
63368    #[allow(clippy::needless_lifetimes)]
63369    fn set_can_manage_topics<'a>(&'a mut self, can_manage_topics: bool) -> &'a mut Self {
63370        self.can_manage_topics = can_manage_topics;
63371        self
63372    }
63373    #[allow(rustdoc::invalid_html_tags)]
63374    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
63375    #[allow(clippy::needless_lifetimes)]
63376    fn get_until_date<'a>(&'a self) -> i64 {
63377        self.until_date
63378    }
63379    #[allow(rustdoc::invalid_html_tags)]
63380    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
63381    #[allow(clippy::needless_lifetimes)]
63382    fn set_until_date<'a>(&'a mut self, until_date: i64) -> &'a mut Self {
63383        self.until_date = until_date;
63384        self
63385    }
63386}
63387impl TraitChatMemberLeft for ChatMemberLeft {
63388    #[allow(rustdoc::invalid_html_tags)]
63389    #[doc = "Information about the user"]
63390    #[allow(clippy::needless_lifetimes)]
63391    fn get_user<'a>(&'a self) -> &'a User {
63392        &self.user
63393    }
63394    #[allow(rustdoc::invalid_html_tags)]
63395    #[doc = "Information about the user"]
63396    #[allow(clippy::needless_lifetimes)]
63397    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
63398        self.user = BoxWrapper(Unbox(user));
63399        self
63400    }
63401}
63402impl TraitChatMemberBanned for ChatMemberBanned {
63403    #[allow(rustdoc::invalid_html_tags)]
63404    #[doc = "Information about the user"]
63405    #[allow(clippy::needless_lifetimes)]
63406    fn get_user<'a>(&'a self) -> &'a User {
63407        &self.user
63408    }
63409    #[allow(rustdoc::invalid_html_tags)]
63410    #[doc = "Information about the user"]
63411    #[allow(clippy::needless_lifetimes)]
63412    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
63413        self.user = BoxWrapper(Unbox(user));
63414        self
63415    }
63416    #[allow(rustdoc::invalid_html_tags)]
63417    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
63418    #[allow(clippy::needless_lifetimes)]
63419    fn get_until_date<'a>(&'a self) -> i64 {
63420        self.until_date
63421    }
63422    #[allow(rustdoc::invalid_html_tags)]
63423    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
63424    #[allow(clippy::needless_lifetimes)]
63425    fn set_until_date<'a>(&'a mut self, until_date: i64) -> &'a mut Self {
63426        self.until_date = until_date;
63427        self
63428    }
63429}
63430#[allow(dead_code)]
63431impl ChatBoostSourceGiftCode {
63432    #[allow(clippy::too_many_arguments)]
63433    pub fn new<A: Into<User>>(source: String, user: A) -> Self {
63434        Self {
63435            source,
63436            user: BoxWrapper::new_unbox(user.into()),
63437        }
63438    }
63439    #[allow(rustdoc::invalid_html_tags)]
63440    #[doc = "Source of the boost, always \"gift_code\""]
63441    #[allow(clippy::needless_lifetimes)]
63442    pub fn get_source<'a>(&'a self) -> &'a str {
63443        self.source.as_str()
63444    }
63445    #[allow(rustdoc::invalid_html_tags)]
63446    #[doc = "Source of the boost, always \"gift_code\""]
63447    #[allow(clippy::needless_lifetimes)]
63448    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
63449        self.source = source;
63450        self
63451    }
63452    #[allow(rustdoc::invalid_html_tags)]
63453    #[doc = "Source of the boost, always \"gift_code\""]
63454    fn rhai_get_source(&mut self) -> String {
63455        self.source.clone()
63456    }
63457    #[allow(rustdoc::invalid_html_tags)]
63458    #[doc = "User for which the gift code was created"]
63459    #[allow(clippy::needless_lifetimes)]
63460    pub fn get_user<'a>(&'a self) -> &'a User {
63461        &self.user
63462    }
63463    #[allow(rustdoc::invalid_html_tags)]
63464    #[doc = "User for which the gift code was created"]
63465    #[allow(clippy::needless_lifetimes)]
63466    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
63467        self.user = BoxWrapper(Unbox(user));
63468        self
63469    }
63470    #[allow(rustdoc::invalid_html_tags)]
63471    #[doc = "User for which the gift code was created"]
63472    fn rhai_get_user(&mut self) -> User {
63473        self.user.clone().into()
63474    }
63475}
63476#[allow(dead_code)]
63477impl PollOption {
63478    #[allow(clippy::too_many_arguments)]
63479    pub fn new(text: String, voter_count: i64) -> Self {
63480        Self {
63481            text,
63482            voter_count,
63483            text_entities: None,
63484        }
63485    }
63486    #[allow(rustdoc::invalid_html_tags)]
63487    #[doc = "Option text, 1-100 characters"]
63488    #[allow(clippy::needless_lifetimes)]
63489    pub fn get_text<'a>(&'a self) -> &'a str {
63490        self.text.as_str()
63491    }
63492    #[allow(rustdoc::invalid_html_tags)]
63493    #[doc = "Option text, 1-100 characters"]
63494    #[allow(clippy::needless_lifetimes)]
63495    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
63496        self.text = text;
63497        self
63498    }
63499    #[allow(rustdoc::invalid_html_tags)]
63500    #[doc = "Option text, 1-100 characters"]
63501    fn rhai_get_text(&mut self) -> String {
63502        self.text.clone()
63503    }
63504    #[allow(rustdoc::invalid_html_tags)]
63505    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
63506    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63507    pub fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
63508        self.text_entities.as_ref()
63509    }
63510    #[allow(rustdoc::invalid_html_tags)]
63511    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
63512    #[allow(clippy::needless_lifetimes)]
63513    pub fn set_text_entities<'a>(
63514        &'a mut self,
63515        text_entities: Option<Vec<MessageEntity>>,
63516    ) -> &'a mut Self {
63517        self.text_entities = text_entities;
63518        self
63519    }
63520    #[allow(rustdoc::invalid_html_tags)]
63521    #[doc = "Optional. Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts"]
63522    fn rhai_get_text_entities(&mut self) -> Option<Vec<MessageEntity>> {
63523        self.text_entities.as_ref().cloned()
63524    }
63525    #[allow(rustdoc::invalid_html_tags)]
63526    #[doc = "Number of users that voted for this option"]
63527    #[allow(clippy::needless_lifetimes)]
63528    pub fn get_voter_count<'a>(&'a self) -> i64 {
63529        self.voter_count
63530    }
63531    #[allow(rustdoc::invalid_html_tags)]
63532    #[doc = "Number of users that voted for this option"]
63533    #[allow(clippy::needless_lifetimes)]
63534    pub fn set_voter_count<'a>(&'a mut self, voter_count: i64) -> &'a mut Self {
63535        self.voter_count = voter_count;
63536        self
63537    }
63538    #[allow(rustdoc::invalid_html_tags)]
63539    #[doc = "Number of users that voted for this option"]
63540    fn rhai_get_voter_count(&mut self) -> i64 {
63541        self.voter_count
63542    }
63543}
63544impl TraitStoryAreaTypeLocation for StoryAreaTypeLocation {
63545    #[allow(rustdoc::invalid_html_tags)]
63546    #[doc = "Type of the area, always \"location\""]
63547    #[allow(clippy::needless_lifetimes)]
63548    fn get_tg_type<'a>(&'a self) -> &'a str {
63549        self.tg_type.as_str()
63550    }
63551    #[allow(rustdoc::invalid_html_tags)]
63552    #[doc = "Type of the area, always \"location\""]
63553    #[allow(clippy::needless_lifetimes)]
63554    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
63555        self.tg_type = tg_type;
63556        self
63557    }
63558    #[allow(rustdoc::invalid_html_tags)]
63559    #[doc = "Location latitude in degrees"]
63560    #[allow(clippy::needless_lifetimes)]
63561    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
63562        self.latitude
63563    }
63564    #[allow(rustdoc::invalid_html_tags)]
63565    #[doc = "Location latitude in degrees"]
63566    #[allow(clippy::needless_lifetimes)]
63567    fn set_latitude<'a>(
63568        &'a mut self,
63569        latitude: ::ordered_float::OrderedFloat<f64>,
63570    ) -> &'a mut Self {
63571        self.latitude = latitude;
63572        self
63573    }
63574    #[allow(rustdoc::invalid_html_tags)]
63575    #[doc = "Location longitude in degrees"]
63576    #[allow(clippy::needless_lifetimes)]
63577    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
63578        self.longitude
63579    }
63580    #[allow(rustdoc::invalid_html_tags)]
63581    #[doc = "Location longitude in degrees"]
63582    #[allow(clippy::needless_lifetimes)]
63583    fn set_longitude<'a>(
63584        &'a mut self,
63585        longitude: ::ordered_float::OrderedFloat<f64>,
63586    ) -> &'a mut Self {
63587        self.longitude = longitude;
63588        self
63589    }
63590    #[allow(rustdoc::invalid_html_tags)]
63591    #[doc = "Optional. Address of the location"]
63592    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63593    fn get_address<'a>(&'a self) -> Option<&'a LocationAddress> {
63594        self.address.as_ref().map(|v| v.inner_ref())
63595    }
63596    #[allow(rustdoc::invalid_html_tags)]
63597    #[doc = "Optional. Address of the location"]
63598    #[allow(clippy::needless_lifetimes)]
63599    fn set_address<'a>(&'a mut self, address: Option<LocationAddress>) -> &'a mut Self {
63600        self.address = address.map(|address| BoxWrapper(Unbox(address)));
63601        self
63602    }
63603}
63604impl TraitStoryAreaTypeSuggestedReaction for StoryAreaTypeSuggestedReaction {
63605    #[allow(rustdoc::invalid_html_tags)]
63606    #[doc = "Type of the area, always \"suggested_reaction\""]
63607    #[allow(clippy::needless_lifetimes)]
63608    fn get_tg_type<'a>(&'a self) -> &'a str {
63609        self.tg_type.as_str()
63610    }
63611    #[allow(rustdoc::invalid_html_tags)]
63612    #[doc = "Type of the area, always \"suggested_reaction\""]
63613    #[allow(clippy::needless_lifetimes)]
63614    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
63615        self.tg_type = tg_type;
63616        self
63617    }
63618    #[allow(rustdoc::invalid_html_tags)]
63619    #[doc = "Type of the reaction"]
63620    #[allow(clippy::needless_lifetimes)]
63621    fn get_reaction_type<'a>(&'a self) -> &'a ReactionType {
63622        &self.reaction_type
63623    }
63624    #[allow(rustdoc::invalid_html_tags)]
63625    #[doc = "Type of the reaction"]
63626    #[allow(clippy::needless_lifetimes)]
63627    fn set_reaction_type<'a>(&'a mut self, reaction_type: ReactionType) -> &'a mut Self {
63628        self.reaction_type = BoxWrapper(Unbox(reaction_type));
63629        self
63630    }
63631    #[allow(rustdoc::invalid_html_tags)]
63632    #[doc = "Optional. Pass True if the reaction area has a dark background"]
63633    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63634    fn get_is_dark<'a>(&'a self) -> Option<bool> {
63635        self.is_dark.as_ref().map(|v| *v)
63636    }
63637    #[allow(rustdoc::invalid_html_tags)]
63638    #[doc = "Optional. Pass True if the reaction area has a dark background"]
63639    #[allow(clippy::needless_lifetimes)]
63640    fn set_is_dark<'a>(&'a mut self, is_dark: Option<bool>) -> &'a mut Self {
63641        self.is_dark = is_dark;
63642        self
63643    }
63644    #[allow(rustdoc::invalid_html_tags)]
63645    #[doc = "Optional. Pass True if reaction area corner is flipped"]
63646    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63647    fn get_is_flipped<'a>(&'a self) -> Option<bool> {
63648        self.is_flipped.as_ref().map(|v| *v)
63649    }
63650    #[allow(rustdoc::invalid_html_tags)]
63651    #[doc = "Optional. Pass True if reaction area corner is flipped"]
63652    #[allow(clippy::needless_lifetimes)]
63653    fn set_is_flipped<'a>(&'a mut self, is_flipped: Option<bool>) -> &'a mut Self {
63654        self.is_flipped = is_flipped;
63655        self
63656    }
63657}
63658impl TraitStoryAreaTypeLink for StoryAreaTypeLink {
63659    #[allow(rustdoc::invalid_html_tags)]
63660    #[doc = "Type of the area, always \"link\""]
63661    #[allow(clippy::needless_lifetimes)]
63662    fn get_tg_type<'a>(&'a self) -> &'a str {
63663        self.tg_type.as_str()
63664    }
63665    #[allow(rustdoc::invalid_html_tags)]
63666    #[doc = "Type of the area, always \"link\""]
63667    #[allow(clippy::needless_lifetimes)]
63668    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
63669        self.tg_type = tg_type;
63670        self
63671    }
63672    #[allow(rustdoc::invalid_html_tags)]
63673    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
63674    #[allow(clippy::needless_lifetimes)]
63675    fn get_url<'a>(&'a self) -> &'a str {
63676        self.url.as_str()
63677    }
63678    #[allow(rustdoc::invalid_html_tags)]
63679    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
63680    #[allow(clippy::needless_lifetimes)]
63681    fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self {
63682        self.url = url;
63683        self
63684    }
63685}
63686impl TraitStoryAreaTypeWeather for StoryAreaTypeWeather {
63687    #[allow(rustdoc::invalid_html_tags)]
63688    #[doc = "Type of the area, always \"weather\""]
63689    #[allow(clippy::needless_lifetimes)]
63690    fn get_tg_type<'a>(&'a self) -> &'a str {
63691        self.tg_type.as_str()
63692    }
63693    #[allow(rustdoc::invalid_html_tags)]
63694    #[doc = "Type of the area, always \"weather\""]
63695    #[allow(clippy::needless_lifetimes)]
63696    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
63697        self.tg_type = tg_type;
63698        self
63699    }
63700    #[allow(rustdoc::invalid_html_tags)]
63701    #[doc = "Temperature, in degree Celsius"]
63702    #[allow(clippy::needless_lifetimes)]
63703    fn get_temperature<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
63704        self.temperature
63705    }
63706    #[allow(rustdoc::invalid_html_tags)]
63707    #[doc = "Temperature, in degree Celsius"]
63708    #[allow(clippy::needless_lifetimes)]
63709    fn set_temperature<'a>(
63710        &'a mut self,
63711        temperature: ::ordered_float::OrderedFloat<f64>,
63712    ) -> &'a mut Self {
63713        self.temperature = temperature;
63714        self
63715    }
63716    #[allow(rustdoc::invalid_html_tags)]
63717    #[doc = "Emoji representing the weather"]
63718    #[allow(clippy::needless_lifetimes)]
63719    fn get_emoji<'a>(&'a self) -> &'a str {
63720        self.emoji.as_str()
63721    }
63722    #[allow(rustdoc::invalid_html_tags)]
63723    #[doc = "Emoji representing the weather"]
63724    #[allow(clippy::needless_lifetimes)]
63725    fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self {
63726        self.emoji = emoji;
63727        self
63728    }
63729    #[allow(rustdoc::invalid_html_tags)]
63730    #[doc = "A color of the area background in the ARGB format"]
63731    #[allow(clippy::needless_lifetimes)]
63732    fn get_background_color<'a>(&'a self) -> i64 {
63733        self.background_color
63734    }
63735    #[allow(rustdoc::invalid_html_tags)]
63736    #[doc = "A color of the area background in the ARGB format"]
63737    #[allow(clippy::needless_lifetimes)]
63738    fn set_background_color<'a>(&'a mut self, background_color: i64) -> &'a mut Self {
63739        self.background_color = background_color;
63740        self
63741    }
63742}
63743impl TraitStoryAreaTypeUniqueGift for StoryAreaTypeUniqueGift {
63744    #[allow(rustdoc::invalid_html_tags)]
63745    #[doc = "Type of the area, always \"unique_gift\""]
63746    #[allow(clippy::needless_lifetimes)]
63747    fn get_tg_type<'a>(&'a self) -> &'a str {
63748        self.tg_type.as_str()
63749    }
63750    #[allow(rustdoc::invalid_html_tags)]
63751    #[doc = "Type of the area, always \"unique_gift\""]
63752    #[allow(clippy::needless_lifetimes)]
63753    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
63754        self.tg_type = tg_type;
63755        self
63756    }
63757    #[allow(rustdoc::invalid_html_tags)]
63758    #[doc = "Unique name of the gift"]
63759    #[allow(clippy::needless_lifetimes)]
63760    fn get_name<'a>(&'a self) -> &'a str {
63761        self.name.as_str()
63762    }
63763    #[allow(rustdoc::invalid_html_tags)]
63764    #[doc = "Unique name of the gift"]
63765    #[allow(clippy::needless_lifetimes)]
63766    fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
63767        self.name = name;
63768        self
63769    }
63770}
63771#[allow(dead_code)]
63772impl InlineQuery {
63773    #[allow(clippy::too_many_arguments)]
63774    pub fn new<A: Into<User>>(id: String, from: A, query: String, offset: String) -> Self {
63775        Self {
63776            id,
63777            from: BoxWrapper::new_unbox(from.into()),
63778            query,
63779            offset,
63780            chat_type: None,
63781            location: None,
63782        }
63783    }
63784    #[allow(rustdoc::invalid_html_tags)]
63785    #[doc = "Unique identifier for this query"]
63786    #[allow(clippy::needless_lifetimes)]
63787    pub fn get_id<'a>(&'a self) -> &'a str {
63788        self.id.as_str()
63789    }
63790    #[allow(rustdoc::invalid_html_tags)]
63791    #[doc = "Unique identifier for this query"]
63792    #[allow(clippy::needless_lifetimes)]
63793    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
63794        self.id = id;
63795        self
63796    }
63797    #[allow(rustdoc::invalid_html_tags)]
63798    #[doc = "Unique identifier for this query"]
63799    fn rhai_get_id(&mut self) -> String {
63800        self.id.clone()
63801    }
63802    #[allow(rustdoc::invalid_html_tags)]
63803    #[doc = "Sender"]
63804    #[allow(clippy::needless_lifetimes)]
63805    pub fn get_from<'a>(&'a self) -> &'a User {
63806        &self.from
63807    }
63808    #[allow(rustdoc::invalid_html_tags)]
63809    #[doc = "Sender"]
63810    #[allow(clippy::needless_lifetimes)]
63811    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
63812        self.from = BoxWrapper(Unbox(from));
63813        self
63814    }
63815    #[allow(rustdoc::invalid_html_tags)]
63816    #[doc = "Sender"]
63817    fn rhai_get_from(&mut self) -> User {
63818        self.from.clone().into()
63819    }
63820    #[allow(rustdoc::invalid_html_tags)]
63821    #[doc = "Text of the query (up to 256 characters)"]
63822    #[allow(clippy::needless_lifetimes)]
63823    pub fn get_query<'a>(&'a self) -> &'a str {
63824        self.query.as_str()
63825    }
63826    #[allow(rustdoc::invalid_html_tags)]
63827    #[doc = "Text of the query (up to 256 characters)"]
63828    #[allow(clippy::needless_lifetimes)]
63829    pub fn set_query<'a>(&'a mut self, query: String) -> &'a mut Self {
63830        self.query = query;
63831        self
63832    }
63833    #[allow(rustdoc::invalid_html_tags)]
63834    #[doc = "Text of the query (up to 256 characters)"]
63835    fn rhai_get_query(&mut self) -> String {
63836        self.query.clone()
63837    }
63838    #[allow(rustdoc::invalid_html_tags)]
63839    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
63840    #[allow(clippy::needless_lifetimes)]
63841    pub fn get_offset<'a>(&'a self) -> &'a str {
63842        self.offset.as_str()
63843    }
63844    #[allow(rustdoc::invalid_html_tags)]
63845    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
63846    #[allow(clippy::needless_lifetimes)]
63847    pub fn set_offset<'a>(&'a mut self, offset: String) -> &'a mut Self {
63848        self.offset = offset;
63849        self
63850    }
63851    #[allow(rustdoc::invalid_html_tags)]
63852    #[doc = "Offset of the results to be returned, can be controlled by the bot"]
63853    fn rhai_get_offset(&mut self) -> String {
63854        self.offset.clone()
63855    }
63856    #[allow(rustdoc::invalid_html_tags)]
63857    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
63858    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63859    pub fn get_chat_type<'a>(&'a self) -> Option<&'a str> {
63860        self.chat_type.as_ref().map(|v| v.as_str())
63861    }
63862    #[allow(rustdoc::invalid_html_tags)]
63863    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
63864    #[allow(clippy::needless_lifetimes)]
63865    pub fn set_chat_type<'a>(&'a mut self, chat_type: Option<String>) -> &'a mut Self {
63866        self.chat_type = chat_type;
63867        self
63868    }
63869    #[allow(rustdoc::invalid_html_tags)]
63870    #[doc = "Optional. Type of the chat from which the inline query was sent. Can be either \"sender\" for a private chat with the inline query sender, \"private\", \"group\", \"supergroup\", or \"channel\". The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat"]
63871    fn rhai_get_chat_type(&mut self) -> Option<String> {
63872        self.chat_type.as_ref().cloned()
63873    }
63874    #[allow(rustdoc::invalid_html_tags)]
63875    #[doc = "Optional. Sender location, only for bots that request user location"]
63876    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63877    pub fn get_location<'a>(&'a self) -> Option<&'a Location> {
63878        self.location.as_ref().map(|v| v.inner_ref())
63879    }
63880    #[allow(rustdoc::invalid_html_tags)]
63881    #[doc = "Optional. Sender location, only for bots that request user location"]
63882    #[allow(clippy::needless_lifetimes)]
63883    pub fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self {
63884        self.location = location.map(|location| BoxWrapper(Unbox(location)));
63885        self
63886    }
63887    #[allow(rustdoc::invalid_html_tags)]
63888    #[doc = "Optional. Sender location, only for bots that request user location"]
63889    fn rhai_get_location(&mut self) -> Option<Location> {
63890        self.location.as_ref().map(|v| v.clone().into())
63891    }
63892}
63893#[allow(dead_code)]
63894impl TransactionPartnerUser {
63895    #[allow(clippy::too_many_arguments)]
63896    pub fn new<A: Into<User>>(transaction_type: String, user: A) -> Self {
63897        Self {
63898            tg_type: "TransactionPartnerUser".to_owned(),
63899            transaction_type,
63900            user: BoxWrapper::new_unbox(user.into()),
63901            affiliate: None,
63902            invoice_payload: None,
63903            subscription_period: None,
63904            paid_media: None,
63905            paid_media_payload: None,
63906            gift: None,
63907            premium_subscription_duration: None,
63908        }
63909    }
63910    #[allow(rustdoc::invalid_html_tags)]
63911    #[doc = "Type of the transaction partner, always \"user\""]
63912    #[allow(clippy::needless_lifetimes)]
63913    pub fn get_tg_type<'a>(&'a self) -> &'a str {
63914        self.tg_type.as_str()
63915    }
63916    #[allow(rustdoc::invalid_html_tags)]
63917    #[doc = "Type of the transaction partner, always \"user\""]
63918    #[allow(clippy::needless_lifetimes)]
63919    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
63920        self.tg_type = tg_type;
63921        self
63922    }
63923    #[allow(rustdoc::invalid_html_tags)]
63924    #[doc = "Type of the transaction partner, always \"user\""]
63925    fn rhai_get_tg_type(&mut self) -> String {
63926        self.tg_type.clone()
63927    }
63928    #[allow(rustdoc::invalid_html_tags)]
63929    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
63930    #[allow(clippy::needless_lifetimes)]
63931    pub fn get_transaction_type<'a>(&'a self) -> &'a str {
63932        self.transaction_type.as_str()
63933    }
63934    #[allow(rustdoc::invalid_html_tags)]
63935    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
63936    #[allow(clippy::needless_lifetimes)]
63937    pub fn set_transaction_type<'a>(&'a mut self, transaction_type: String) -> &'a mut Self {
63938        self.transaction_type = transaction_type;
63939        self
63940    }
63941    #[allow(rustdoc::invalid_html_tags)]
63942    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
63943    fn rhai_get_transaction_type(&mut self) -> String {
63944        self.transaction_type.clone()
63945    }
63946    #[allow(rustdoc::invalid_html_tags)]
63947    #[doc = "Information about the user"]
63948    #[allow(clippy::needless_lifetimes)]
63949    pub fn get_user<'a>(&'a self) -> &'a User {
63950        &self.user
63951    }
63952    #[allow(rustdoc::invalid_html_tags)]
63953    #[doc = "Information about the user"]
63954    #[allow(clippy::needless_lifetimes)]
63955    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
63956        self.user = BoxWrapper(Unbox(user));
63957        self
63958    }
63959    #[allow(rustdoc::invalid_html_tags)]
63960    #[doc = "Information about the user"]
63961    fn rhai_get_user(&mut self) -> User {
63962        self.user.clone().into()
63963    }
63964    #[allow(rustdoc::invalid_html_tags)]
63965    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
63966    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63967    pub fn get_affiliate<'a>(&'a self) -> Option<&'a AffiliateInfo> {
63968        self.affiliate.as_ref().map(|v| v.inner_ref())
63969    }
63970    #[allow(rustdoc::invalid_html_tags)]
63971    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
63972    #[allow(clippy::needless_lifetimes)]
63973    pub fn set_affiliate<'a>(&'a mut self, affiliate: Option<AffiliateInfo>) -> &'a mut Self {
63974        self.affiliate = affiliate.map(|affiliate| BoxWrapper(Unbox(affiliate)));
63975        self
63976    }
63977    #[allow(rustdoc::invalid_html_tags)]
63978    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
63979    fn rhai_get_affiliate(&mut self) -> Option<AffiliateInfo> {
63980        self.affiliate.as_ref().map(|v| v.clone().into())
63981    }
63982    #[allow(rustdoc::invalid_html_tags)]
63983    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
63984    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
63985    pub fn get_invoice_payload<'a>(&'a self) -> Option<&'a str> {
63986        self.invoice_payload.as_ref().map(|v| v.as_str())
63987    }
63988    #[allow(rustdoc::invalid_html_tags)]
63989    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
63990    #[allow(clippy::needless_lifetimes)]
63991    pub fn set_invoice_payload<'a>(&'a mut self, invoice_payload: Option<String>) -> &'a mut Self {
63992        self.invoice_payload = invoice_payload;
63993        self
63994    }
63995    #[allow(rustdoc::invalid_html_tags)]
63996    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
63997    fn rhai_get_invoice_payload(&mut self) -> Option<String> {
63998        self.invoice_payload.as_ref().cloned()
63999    }
64000    #[allow(rustdoc::invalid_html_tags)]
64001    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
64002    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64003    pub fn get_subscription_period<'a>(&'a self) -> Option<i64> {
64004        self.subscription_period.as_ref().map(|v| *v)
64005    }
64006    #[allow(rustdoc::invalid_html_tags)]
64007    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
64008    #[allow(clippy::needless_lifetimes)]
64009    pub fn set_subscription_period<'a>(
64010        &'a mut self,
64011        subscription_period: Option<i64>,
64012    ) -> &'a mut Self {
64013        self.subscription_period = subscription_period;
64014        self
64015    }
64016    #[allow(rustdoc::invalid_html_tags)]
64017    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
64018    fn rhai_get_subscription_period(&mut self) -> Option<i64> {
64019        self.subscription_period.as_ref().copied()
64020    }
64021    #[allow(rustdoc::invalid_html_tags)]
64022    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
64023    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64024    pub fn get_paid_media<'a>(&'a self) -> Option<&'a Vec<PaidMedia>> {
64025        self.paid_media.as_ref()
64026    }
64027    #[allow(rustdoc::invalid_html_tags)]
64028    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
64029    #[allow(clippy::needless_lifetimes)]
64030    pub fn set_paid_media<'a>(&'a mut self, paid_media: Option<Vec<PaidMedia>>) -> &'a mut Self {
64031        self.paid_media = paid_media;
64032        self
64033    }
64034    #[allow(rustdoc::invalid_html_tags)]
64035    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
64036    fn rhai_get_paid_media(&mut self) -> Option<Vec<PaidMedia>> {
64037        self.paid_media.as_ref().cloned()
64038    }
64039    #[allow(rustdoc::invalid_html_tags)]
64040    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
64041    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64042    pub fn get_paid_media_payload<'a>(&'a self) -> Option<&'a str> {
64043        self.paid_media_payload.as_ref().map(|v| v.as_str())
64044    }
64045    #[allow(rustdoc::invalid_html_tags)]
64046    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
64047    #[allow(clippy::needless_lifetimes)]
64048    pub fn set_paid_media_payload<'a>(
64049        &'a mut self,
64050        paid_media_payload: Option<String>,
64051    ) -> &'a mut Self {
64052        self.paid_media_payload = paid_media_payload;
64053        self
64054    }
64055    #[allow(rustdoc::invalid_html_tags)]
64056    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
64057    fn rhai_get_paid_media_payload(&mut self) -> Option<String> {
64058        self.paid_media_payload.as_ref().cloned()
64059    }
64060    #[allow(rustdoc::invalid_html_tags)]
64061    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
64062    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64063    pub fn get_gift<'a>(&'a self) -> Option<&'a Gift> {
64064        self.gift.as_ref().map(|v| v.inner_ref())
64065    }
64066    #[allow(rustdoc::invalid_html_tags)]
64067    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
64068    #[allow(clippy::needless_lifetimes)]
64069    pub fn set_gift<'a>(&'a mut self, gift: Option<Gift>) -> &'a mut Self {
64070        self.gift = gift.map(|gift| BoxWrapper(Unbox(gift)));
64071        self
64072    }
64073    #[allow(rustdoc::invalid_html_tags)]
64074    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
64075    fn rhai_get_gift(&mut self) -> Option<Gift> {
64076        self.gift.as_ref().map(|v| v.clone().into())
64077    }
64078    #[allow(rustdoc::invalid_html_tags)]
64079    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
64080    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64081    pub fn get_premium_subscription_duration<'a>(&'a self) -> Option<i64> {
64082        self.premium_subscription_duration.as_ref().map(|v| *v)
64083    }
64084    #[allow(rustdoc::invalid_html_tags)]
64085    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
64086    #[allow(clippy::needless_lifetimes)]
64087    pub fn set_premium_subscription_duration<'a>(
64088        &'a mut self,
64089        premium_subscription_duration: Option<i64>,
64090    ) -> &'a mut Self {
64091        self.premium_subscription_duration = premium_subscription_duration;
64092        self
64093    }
64094    #[allow(rustdoc::invalid_html_tags)]
64095    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
64096    fn rhai_get_premium_subscription_duration(&mut self) -> Option<i64> {
64097        self.premium_subscription_duration.as_ref().copied()
64098    }
64099}
64100#[allow(dead_code)]
64101impl InputMediaPhoto {
64102    #[allow(clippy::too_many_arguments)]
64103    pub fn new(media: Option<InputFile>) -> Self {
64104        Self {
64105            tg_type: "photo".to_owned(),
64106            media,
64107            caption: None,
64108            parse_mode: None,
64109            caption_entities: None,
64110            show_caption_above_media: None,
64111            has_spoiler: None,
64112        }
64113    }
64114    #[allow(rustdoc::invalid_html_tags)]
64115    #[doc = "Type of the result, must be photo"]
64116    #[allow(clippy::needless_lifetimes)]
64117    pub fn get_tg_type<'a>(&'a self) -> &'a str {
64118        self.tg_type.as_str()
64119    }
64120    #[allow(rustdoc::invalid_html_tags)]
64121    #[doc = "Type of the result, must be photo"]
64122    #[allow(clippy::needless_lifetimes)]
64123    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
64124        self.tg_type = tg_type;
64125        self
64126    }
64127    #[allow(rustdoc::invalid_html_tags)]
64128    #[doc = "Type of the result, must be photo"]
64129    fn rhai_get_tg_type(&mut self) -> String {
64130        self.tg_type.clone()
64131    }
64132    #[allow(rustdoc::invalid_html_tags)]
64133    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
64134    #[allow(clippy::needless_lifetimes)]
64135    pub fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
64136        &self.media
64137    }
64138    #[allow(rustdoc::invalid_html_tags)]
64139    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
64140    #[allow(clippy::needless_lifetimes)]
64141    pub fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
64142        self.media = media;
64143        self
64144    }
64145    #[allow(rustdoc::invalid_html_tags)]
64146    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
64147    fn rhai_get_media(&mut self) -> Option<InputFile> {
64148        self.media.clone()
64149    }
64150    #[allow(rustdoc::invalid_html_tags)]
64151    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
64152    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64153    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
64154        self.caption.as_ref().map(|v| v.as_str())
64155    }
64156    #[allow(rustdoc::invalid_html_tags)]
64157    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
64158    #[allow(clippy::needless_lifetimes)]
64159    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
64160        self.caption = caption;
64161        self
64162    }
64163    #[allow(rustdoc::invalid_html_tags)]
64164    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
64165    fn rhai_get_caption(&mut self) -> Option<String> {
64166        self.caption.as_ref().cloned()
64167    }
64168    #[allow(rustdoc::invalid_html_tags)]
64169    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
64170    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64171    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
64172        self.parse_mode.as_ref().map(|v| v.as_str())
64173    }
64174    #[allow(rustdoc::invalid_html_tags)]
64175    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
64176    #[allow(clippy::needless_lifetimes)]
64177    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
64178        self.parse_mode = parse_mode;
64179        self
64180    }
64181    #[allow(rustdoc::invalid_html_tags)]
64182    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
64183    fn rhai_get_parse_mode(&mut self) -> Option<String> {
64184        self.parse_mode.as_ref().cloned()
64185    }
64186    #[allow(rustdoc::invalid_html_tags)]
64187    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
64188    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64189    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
64190        self.caption_entities.as_ref()
64191    }
64192    #[allow(rustdoc::invalid_html_tags)]
64193    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
64194    #[allow(clippy::needless_lifetimes)]
64195    pub fn set_caption_entities<'a>(
64196        &'a mut self,
64197        caption_entities: Option<Vec<MessageEntity>>,
64198    ) -> &'a mut Self {
64199        self.caption_entities = caption_entities;
64200        self
64201    }
64202    #[allow(rustdoc::invalid_html_tags)]
64203    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
64204    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
64205        self.caption_entities.as_ref().cloned()
64206    }
64207    #[allow(rustdoc::invalid_html_tags)]
64208    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
64209    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64210    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
64211        self.show_caption_above_media.as_ref().map(|v| *v)
64212    }
64213    #[allow(rustdoc::invalid_html_tags)]
64214    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
64215    #[allow(clippy::needless_lifetimes)]
64216    pub fn set_show_caption_above_media<'a>(
64217        &'a mut self,
64218        show_caption_above_media: Option<bool>,
64219    ) -> &'a mut Self {
64220        self.show_caption_above_media = show_caption_above_media;
64221        self
64222    }
64223    #[allow(rustdoc::invalid_html_tags)]
64224    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
64225    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
64226        self.show_caption_above_media.as_ref().copied()
64227    }
64228    #[allow(rustdoc::invalid_html_tags)]
64229    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
64230    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64231    pub fn get_has_spoiler<'a>(&'a self) -> Option<bool> {
64232        self.has_spoiler.as_ref().map(|v| *v)
64233    }
64234    #[allow(rustdoc::invalid_html_tags)]
64235    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
64236    #[allow(clippy::needless_lifetimes)]
64237    pub fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self {
64238        self.has_spoiler = has_spoiler;
64239        self
64240    }
64241    #[allow(rustdoc::invalid_html_tags)]
64242    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
64243    fn rhai_get_has_spoiler(&mut self) -> Option<bool> {
64244        self.has_spoiler.as_ref().copied()
64245    }
64246    fn convert_form(self, data: Form) -> Result<(Form, String)> {
64247        match self.media {
64248            Some(InputFile::Bytes(FileBytes {
64249                name,
64250                bytes: Some(bytes),
64251            })) => {
64252                let attach = format!("attach://{}", name);
64253                let form = data.part(name, Part::bytes(bytes));
64254                Ok((form, attach))
64255            }
64256            Some(InputFile::String(name)) => Ok((data, name)),
64257            _ => Err(anyhow!("cry")),
64258        }
64259    }
64260}
64261#[allow(dead_code)]
64262impl VideoChatScheduled {
64263    #[allow(clippy::too_many_arguments)]
64264    pub fn new(start_date: i64) -> Self {
64265        Self { start_date }
64266    }
64267    #[allow(rustdoc::invalid_html_tags)]
64268    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
64269    #[allow(clippy::needless_lifetimes)]
64270    pub fn get_start_date<'a>(&'a self) -> i64 {
64271        self.start_date
64272    }
64273    #[allow(rustdoc::invalid_html_tags)]
64274    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
64275    #[allow(clippy::needless_lifetimes)]
64276    pub fn set_start_date<'a>(&'a mut self, start_date: i64) -> &'a mut Self {
64277        self.start_date = start_date;
64278        self
64279    }
64280    #[allow(rustdoc::invalid_html_tags)]
64281    #[doc = "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator"]
64282    fn rhai_get_start_date(&mut self) -> i64 {
64283        self.start_date
64284    }
64285}
64286#[allow(dead_code)]
64287impl ForumTopicCreated {
64288    #[allow(clippy::too_many_arguments)]
64289    pub fn new(name: String, icon_color: i64) -> Self {
64290        Self {
64291            name,
64292            icon_color,
64293            icon_custom_emoji_id: None,
64294        }
64295    }
64296    #[allow(rustdoc::invalid_html_tags)]
64297    #[doc = "Name of the topic"]
64298    #[allow(clippy::needless_lifetimes)]
64299    pub fn get_name<'a>(&'a self) -> &'a str {
64300        self.name.as_str()
64301    }
64302    #[allow(rustdoc::invalid_html_tags)]
64303    #[doc = "Name of the topic"]
64304    #[allow(clippy::needless_lifetimes)]
64305    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
64306        self.name = name;
64307        self
64308    }
64309    #[allow(rustdoc::invalid_html_tags)]
64310    #[doc = "Name of the topic"]
64311    fn rhai_get_name(&mut self) -> String {
64312        self.name.clone()
64313    }
64314    #[allow(rustdoc::invalid_html_tags)]
64315    #[doc = "Color of the topic icon in RGB format"]
64316    #[allow(clippy::needless_lifetimes)]
64317    pub fn get_icon_color<'a>(&'a self) -> i64 {
64318        self.icon_color
64319    }
64320    #[allow(rustdoc::invalid_html_tags)]
64321    #[doc = "Color of the topic icon in RGB format"]
64322    #[allow(clippy::needless_lifetimes)]
64323    pub fn set_icon_color<'a>(&'a mut self, icon_color: i64) -> &'a mut Self {
64324        self.icon_color = icon_color;
64325        self
64326    }
64327    #[allow(rustdoc::invalid_html_tags)]
64328    #[doc = "Color of the topic icon in RGB format"]
64329    fn rhai_get_icon_color(&mut self) -> i64 {
64330        self.icon_color
64331    }
64332    #[allow(rustdoc::invalid_html_tags)]
64333    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
64334    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64335    pub fn get_icon_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
64336        self.icon_custom_emoji_id.as_ref().map(|v| v.as_str())
64337    }
64338    #[allow(rustdoc::invalid_html_tags)]
64339    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
64340    #[allow(clippy::needless_lifetimes)]
64341    pub fn set_icon_custom_emoji_id<'a>(
64342        &'a mut self,
64343        icon_custom_emoji_id: Option<String>,
64344    ) -> &'a mut Self {
64345        self.icon_custom_emoji_id = icon_custom_emoji_id;
64346        self
64347    }
64348    #[allow(rustdoc::invalid_html_tags)]
64349    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
64350    fn rhai_get_icon_custom_emoji_id(&mut self) -> Option<String> {
64351        self.icon_custom_emoji_id.as_ref().cloned()
64352    }
64353}
64354#[allow(dead_code)]
64355impl InlineKeyboardButton {
64356    #[allow(clippy::too_many_arguments)]
64357    pub fn new(text: String) -> Self {
64358        Self {
64359            text,
64360            url: None,
64361            callback_data: None,
64362            web_app: None,
64363            login_url: None,
64364            switch_inline_query: None,
64365            switch_inline_query_current_chat: None,
64366            switch_inline_query_chosen_chat: None,
64367            copy_text: None,
64368            callback_game: None,
64369            pay: None,
64370        }
64371    }
64372    #[allow(rustdoc::invalid_html_tags)]
64373    #[doc = "Label text on the button"]
64374    #[allow(clippy::needless_lifetimes)]
64375    pub fn get_text<'a>(&'a self) -> &'a str {
64376        self.text.as_str()
64377    }
64378    #[allow(rustdoc::invalid_html_tags)]
64379    #[doc = "Label text on the button"]
64380    #[allow(clippy::needless_lifetimes)]
64381    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
64382        self.text = text;
64383        self
64384    }
64385    #[allow(rustdoc::invalid_html_tags)]
64386    #[doc = "Label text on the button"]
64387    fn rhai_get_text(&mut self) -> String {
64388        self.text.clone()
64389    }
64390    #[allow(rustdoc::invalid_html_tags)]
64391    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
64392    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64393    pub fn get_url<'a>(&'a self) -> Option<&'a str> {
64394        self.url.as_ref().map(|v| v.as_str())
64395    }
64396    #[allow(rustdoc::invalid_html_tags)]
64397    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
64398    #[allow(clippy::needless_lifetimes)]
64399    pub fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self {
64400        self.url = url;
64401        self
64402    }
64403    #[allow(rustdoc::invalid_html_tags)]
64404    #[doc = "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings."]
64405    fn rhai_get_url(&mut self) -> Option<String> {
64406        self.url.as_ref().cloned()
64407    }
64408    #[allow(rustdoc::invalid_html_tags)]
64409    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
64410    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64411    pub fn get_callback_data<'a>(&'a self) -> Option<&'a str> {
64412        self.callback_data.as_ref().map(|v| v.as_str())
64413    }
64414    #[allow(rustdoc::invalid_html_tags)]
64415    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
64416    #[allow(clippy::needless_lifetimes)]
64417    pub fn set_callback_data<'a>(&'a mut self, callback_data: Option<String>) -> &'a mut Self {
64418        self.callback_data = callback_data;
64419        self
64420    }
64421    #[allow(rustdoc::invalid_html_tags)]
64422    #[doc = "Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes"]
64423    fn rhai_get_callback_data(&mut self) -> Option<String> {
64424        self.callback_data.as_ref().cloned()
64425    }
64426    #[allow(rustdoc::invalid_html_tags)]
64427    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
64428    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64429    pub fn get_web_app<'a>(&'a self) -> Option<&'a WebAppInfo> {
64430        self.web_app.as_ref().map(|v| v.inner_ref())
64431    }
64432    #[allow(rustdoc::invalid_html_tags)]
64433    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
64434    #[allow(clippy::needless_lifetimes)]
64435    pub fn set_web_app<'a>(&'a mut self, web_app: Option<WebAppInfo>) -> &'a mut Self {
64436        self.web_app = web_app.map(|web_app| BoxWrapper(Unbox(web_app)));
64437        self
64438    }
64439    #[allow(rustdoc::invalid_html_tags)]
64440    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account."]
64441    fn rhai_get_web_app(&mut self) -> Option<WebAppInfo> {
64442        self.web_app.as_ref().map(|v| v.clone().into())
64443    }
64444    #[allow(rustdoc::invalid_html_tags)]
64445    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
64446    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64447    pub fn get_login_url<'a>(&'a self) -> Option<&'a LoginUrl> {
64448        self.login_url.as_ref().map(|v| v.inner_ref())
64449    }
64450    #[allow(rustdoc::invalid_html_tags)]
64451    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
64452    #[allow(clippy::needless_lifetimes)]
64453    pub fn set_login_url<'a>(&'a mut self, login_url: Option<LoginUrl>) -> &'a mut Self {
64454        self.login_url = login_url.map(|login_url| BoxWrapper(Unbox(login_url)));
64455        self
64456    }
64457    #[allow(rustdoc::invalid_html_tags)]
64458    #[doc = "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget."]
64459    fn rhai_get_login_url(&mut self) -> Option<LoginUrl> {
64460        self.login_url.as_ref().map(|v| v.clone().into())
64461    }
64462    #[allow(rustdoc::invalid_html_tags)]
64463    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64464    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64465    pub fn get_switch_inline_query<'a>(&'a self) -> Option<&'a str> {
64466        self.switch_inline_query.as_ref().map(|v| v.as_str())
64467    }
64468    #[allow(rustdoc::invalid_html_tags)]
64469    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64470    #[allow(clippy::needless_lifetimes)]
64471    pub fn set_switch_inline_query<'a>(
64472        &'a mut self,
64473        switch_inline_query: Option<String>,
64474    ) -> &'a mut Self {
64475        self.switch_inline_query = switch_inline_query;
64476        self
64477    }
64478    #[allow(rustdoc::invalid_html_tags)]
64479    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64480    fn rhai_get_switch_inline_query(&mut self) -> Option<String> {
64481        self.switch_inline_query.as_ref().cloned()
64482    }
64483    #[allow(rustdoc::invalid_html_tags)]
64484    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64485    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64486    pub fn get_switch_inline_query_current_chat<'a>(&'a self) -> Option<&'a str> {
64487        self.switch_inline_query_current_chat
64488            .as_ref()
64489            .map(|v| v.as_str())
64490    }
64491    #[allow(rustdoc::invalid_html_tags)]
64492    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64493    #[allow(clippy::needless_lifetimes)]
64494    pub fn set_switch_inline_query_current_chat<'a>(
64495        &'a mut self,
64496        switch_inline_query_current_chat: Option<String>,
64497    ) -> &'a mut Self {
64498        self.switch_inline_query_current_chat = switch_inline_query_current_chat;
64499        self
64500    }
64501    #[allow(rustdoc::invalid_html_tags)]
64502    #[doc = "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64503    fn rhai_get_switch_inline_query_current_chat(&mut self) -> Option<String> {
64504        self.switch_inline_query_current_chat.as_ref().cloned()
64505    }
64506    #[allow(rustdoc::invalid_html_tags)]
64507    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64508    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64509    pub fn get_switch_inline_query_chosen_chat<'a>(
64510        &'a self,
64511    ) -> Option<&'a SwitchInlineQueryChosenChat> {
64512        self.switch_inline_query_chosen_chat
64513            .as_ref()
64514            .map(|v| v.inner_ref())
64515    }
64516    #[allow(rustdoc::invalid_html_tags)]
64517    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64518    #[allow(clippy::needless_lifetimes)]
64519    pub fn set_switch_inline_query_chosen_chat<'a>(
64520        &'a mut self,
64521        switch_inline_query_chosen_chat: Option<SwitchInlineQueryChosenChat>,
64522    ) -> &'a mut Self {
64523        self.switch_inline_query_chosen_chat =
64524            switch_inline_query_chosen_chat.map(|switch_inline_query_chosen_chat| {
64525                BoxWrapper(Unbox(switch_inline_query_chosen_chat))
64526            });
64527        self
64528    }
64529    #[allow(rustdoc::invalid_html_tags)]
64530    #[doc = "Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account."]
64531    fn rhai_get_switch_inline_query_chosen_chat(&mut self) -> Option<SwitchInlineQueryChosenChat> {
64532        self.switch_inline_query_chosen_chat
64533            .as_ref()
64534            .map(|v| v.clone().into())
64535    }
64536    #[allow(rustdoc::invalid_html_tags)]
64537    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
64538    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64539    pub fn get_copy_text<'a>(&'a self) -> Option<&'a CopyTextButton> {
64540        self.copy_text.as_ref().map(|v| v.inner_ref())
64541    }
64542    #[allow(rustdoc::invalid_html_tags)]
64543    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
64544    #[allow(clippy::needless_lifetimes)]
64545    pub fn set_copy_text<'a>(&'a mut self, copy_text: Option<CopyTextButton>) -> &'a mut Self {
64546        self.copy_text = copy_text.map(|copy_text| BoxWrapper(Unbox(copy_text)));
64547        self
64548    }
64549    #[allow(rustdoc::invalid_html_tags)]
64550    #[doc = "Optional. Description of the button that copies the specified text to the clipboard."]
64551    fn rhai_get_copy_text(&mut self) -> Option<CopyTextButton> {
64552        self.copy_text.as_ref().map(|v| v.clone().into())
64553    }
64554    #[allow(rustdoc::invalid_html_tags)]
64555    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
64556    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64557    pub fn get_callback_game<'a>(&'a self) -> Option<&'a CallbackGame> {
64558        self.callback_game.as_ref().map(|v| v.inner_ref())
64559    }
64560    #[allow(rustdoc::invalid_html_tags)]
64561    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
64562    #[allow(clippy::needless_lifetimes)]
64563    pub fn set_callback_game<'a>(
64564        &'a mut self,
64565        callback_game: Option<CallbackGame>,
64566    ) -> &'a mut Self {
64567        self.callback_game = callback_game.map(|callback_game| BoxWrapper(Unbox(callback_game)));
64568        self
64569    }
64570    #[allow(rustdoc::invalid_html_tags)]
64571    #[doc = "Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row."]
64572    fn rhai_get_callback_game(&mut self) -> Option<CallbackGame> {
64573        self.callback_game.as_ref().map(|v| v.clone().into())
64574    }
64575    #[allow(rustdoc::invalid_html_tags)]
64576    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
64577    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64578    pub fn get_pay<'a>(&'a self) -> Option<bool> {
64579        self.pay.as_ref().map(|v| *v)
64580    }
64581    #[allow(rustdoc::invalid_html_tags)]
64582    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
64583    #[allow(clippy::needless_lifetimes)]
64584    pub fn set_pay<'a>(&'a mut self, pay: Option<bool>) -> &'a mut Self {
64585        self.pay = pay;
64586        self
64587    }
64588    #[allow(rustdoc::invalid_html_tags)]
64589    #[doc = "Optional. Specify True, to send a Pay button. Substrings \"⭐\" and \"XTR\" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages."]
64590    fn rhai_get_pay(&mut self) -> Option<bool> {
64591        self.pay.as_ref().copied()
64592    }
64593}
64594#[allow(dead_code)]
64595impl PaidMediaVideo {
64596    #[allow(clippy::too_many_arguments)]
64597    pub fn new<A: Into<Video>>(video: A) -> Self {
64598        Self {
64599            tg_type: "PaidMediaVideo".to_owned(),
64600            video: BoxWrapper::new_unbox(video.into()),
64601        }
64602    }
64603    #[allow(rustdoc::invalid_html_tags)]
64604    #[doc = "Type of the paid media, always \"video\""]
64605    #[allow(clippy::needless_lifetimes)]
64606    pub fn get_tg_type<'a>(&'a self) -> &'a str {
64607        self.tg_type.as_str()
64608    }
64609    #[allow(rustdoc::invalid_html_tags)]
64610    #[doc = "Type of the paid media, always \"video\""]
64611    #[allow(clippy::needless_lifetimes)]
64612    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
64613        self.tg_type = tg_type;
64614        self
64615    }
64616    #[allow(rustdoc::invalid_html_tags)]
64617    #[doc = "Type of the paid media, always \"video\""]
64618    fn rhai_get_tg_type(&mut self) -> String {
64619        self.tg_type.clone()
64620    }
64621    #[allow(rustdoc::invalid_html_tags)]
64622    #[doc = "The video"]
64623    #[allow(clippy::needless_lifetimes)]
64624    pub fn get_video<'a>(&'a self) -> &'a Video {
64625        &self.video
64626    }
64627    #[allow(rustdoc::invalid_html_tags)]
64628    #[doc = "The video"]
64629    #[allow(clippy::needless_lifetimes)]
64630    pub fn set_video<'a>(&'a mut self, video: Video) -> &'a mut Self {
64631        self.video = BoxWrapper(Unbox(video));
64632        self
64633    }
64634    #[allow(rustdoc::invalid_html_tags)]
64635    #[doc = "The video"]
64636    fn rhai_get_video(&mut self) -> Video {
64637        self.video.clone().into()
64638    }
64639}
64640#[allow(dead_code)]
64641impl ChatJoinRequest {
64642    #[allow(clippy::too_many_arguments)]
64643    pub fn new<A: Into<Chat>, B: Into<User>>(
64644        chat: A,
64645        from: B,
64646        user_chat_id: i64,
64647        date: i64,
64648    ) -> Self {
64649        Self {
64650            chat: BoxWrapper::new_unbox(chat.into()),
64651            from: BoxWrapper::new_unbox(from.into()),
64652            user_chat_id,
64653            date,
64654            bio: None,
64655            invite_link: None,
64656        }
64657    }
64658    #[allow(rustdoc::invalid_html_tags)]
64659    #[doc = "Chat to which the request was sent"]
64660    #[allow(clippy::needless_lifetimes)]
64661    pub fn get_chat<'a>(&'a self) -> &'a Chat {
64662        &self.chat
64663    }
64664    #[allow(rustdoc::invalid_html_tags)]
64665    #[doc = "Chat to which the request was sent"]
64666    #[allow(clippy::needless_lifetimes)]
64667    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
64668        self.chat = BoxWrapper(Unbox(chat));
64669        self
64670    }
64671    #[allow(rustdoc::invalid_html_tags)]
64672    #[doc = "Chat to which the request was sent"]
64673    fn rhai_get_chat(&mut self) -> Chat {
64674        self.chat.clone().into()
64675    }
64676    #[allow(rustdoc::invalid_html_tags)]
64677    #[doc = "User that sent the join request"]
64678    #[allow(clippy::needless_lifetimes)]
64679    pub fn get_from<'a>(&'a self) -> &'a User {
64680        &self.from
64681    }
64682    #[allow(rustdoc::invalid_html_tags)]
64683    #[doc = "User that sent the join request"]
64684    #[allow(clippy::needless_lifetimes)]
64685    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
64686        self.from = BoxWrapper(Unbox(from));
64687        self
64688    }
64689    #[allow(rustdoc::invalid_html_tags)]
64690    #[doc = "User that sent the join request"]
64691    fn rhai_get_from(&mut self) -> User {
64692        self.from.clone().into()
64693    }
64694    #[allow(rustdoc::invalid_html_tags)]
64695    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
64696    #[allow(clippy::needless_lifetimes)]
64697    pub fn get_user_chat_id<'a>(&'a self) -> i64 {
64698        self.user_chat_id
64699    }
64700    #[allow(rustdoc::invalid_html_tags)]
64701    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
64702    #[allow(clippy::needless_lifetimes)]
64703    pub fn set_user_chat_id<'a>(&'a mut self, user_chat_id: i64) -> &'a mut Self {
64704        self.user_chat_id = user_chat_id;
64705        self
64706    }
64707    #[allow(rustdoc::invalid_html_tags)]
64708    #[doc = "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user."]
64709    fn rhai_get_user_chat_id(&mut self) -> i64 {
64710        self.user_chat_id
64711    }
64712    #[allow(rustdoc::invalid_html_tags)]
64713    #[doc = "Date the request was sent in Unix time"]
64714    #[allow(clippy::needless_lifetimes)]
64715    pub fn get_date<'a>(&'a self) -> i64 {
64716        self.date
64717    }
64718    #[allow(rustdoc::invalid_html_tags)]
64719    #[doc = "Date the request was sent in Unix time"]
64720    #[allow(clippy::needless_lifetimes)]
64721    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
64722        self.date = date;
64723        self
64724    }
64725    #[allow(rustdoc::invalid_html_tags)]
64726    #[doc = "Date the request was sent in Unix time"]
64727    fn rhai_get_date(&mut self) -> i64 {
64728        self.date
64729    }
64730    #[allow(rustdoc::invalid_html_tags)]
64731    #[doc = "Optional. Bio of the user."]
64732    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64733    pub fn get_bio<'a>(&'a self) -> Option<&'a str> {
64734        self.bio.as_ref().map(|v| v.as_str())
64735    }
64736    #[allow(rustdoc::invalid_html_tags)]
64737    #[doc = "Optional. Bio of the user."]
64738    #[allow(clippy::needless_lifetimes)]
64739    pub fn set_bio<'a>(&'a mut self, bio: Option<String>) -> &'a mut Self {
64740        self.bio = bio;
64741        self
64742    }
64743    #[allow(rustdoc::invalid_html_tags)]
64744    #[doc = "Optional. Bio of the user."]
64745    fn rhai_get_bio(&mut self) -> Option<String> {
64746        self.bio.as_ref().cloned()
64747    }
64748    #[allow(rustdoc::invalid_html_tags)]
64749    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
64750    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64751    pub fn get_invite_link<'a>(&'a self) -> Option<&'a ChatInviteLink> {
64752        self.invite_link.as_ref().map(|v| v.inner_ref())
64753    }
64754    #[allow(rustdoc::invalid_html_tags)]
64755    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
64756    #[allow(clippy::needless_lifetimes)]
64757    pub fn set_invite_link<'a>(&'a mut self, invite_link: Option<ChatInviteLink>) -> &'a mut Self {
64758        self.invite_link = invite_link.map(|invite_link| BoxWrapper(Unbox(invite_link)));
64759        self
64760    }
64761    #[allow(rustdoc::invalid_html_tags)]
64762    #[doc = "Optional. Chat invite link that was used by the user to send the join request"]
64763    fn rhai_get_invite_link(&mut self) -> Option<ChatInviteLink> {
64764        self.invite_link.as_ref().map(|v| v.clone().into())
64765    }
64766}
64767#[allow(dead_code)]
64768impl StoryAreaPosition {
64769    #[allow(clippy::too_many_arguments)]
64770    pub fn new(
64771        x_percentage: ::ordered_float::OrderedFloat<f64>,
64772        y_percentage: ::ordered_float::OrderedFloat<f64>,
64773        width_percentage: ::ordered_float::OrderedFloat<f64>,
64774        height_percentage: ::ordered_float::OrderedFloat<f64>,
64775        rotation_angle: ::ordered_float::OrderedFloat<f64>,
64776        corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
64777    ) -> Self {
64778        Self {
64779            x_percentage,
64780            y_percentage,
64781            width_percentage,
64782            height_percentage,
64783            rotation_angle,
64784            corner_radius_percentage,
64785        }
64786    }
64787    #[allow(rustdoc::invalid_html_tags)]
64788    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
64789    #[allow(clippy::needless_lifetimes)]
64790    pub fn get_x_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
64791        self.x_percentage
64792    }
64793    #[allow(rustdoc::invalid_html_tags)]
64794    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
64795    #[allow(clippy::needless_lifetimes)]
64796    pub fn set_x_percentage<'a>(
64797        &'a mut self,
64798        x_percentage: ::ordered_float::OrderedFloat<f64>,
64799    ) -> &'a mut Self {
64800        self.x_percentage = x_percentage;
64801        self
64802    }
64803    #[allow(rustdoc::invalid_html_tags)]
64804    #[doc = "The abscissa of the area's center, as a percentage of the media width"]
64805    fn rhai_get_x_percentage(&mut self) -> ::ordered_float::OrderedFloat<f64> {
64806        self.x_percentage
64807    }
64808    #[allow(rustdoc::invalid_html_tags)]
64809    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
64810    #[allow(clippy::needless_lifetimes)]
64811    pub fn get_y_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
64812        self.y_percentage
64813    }
64814    #[allow(rustdoc::invalid_html_tags)]
64815    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
64816    #[allow(clippy::needless_lifetimes)]
64817    pub fn set_y_percentage<'a>(
64818        &'a mut self,
64819        y_percentage: ::ordered_float::OrderedFloat<f64>,
64820    ) -> &'a mut Self {
64821        self.y_percentage = y_percentage;
64822        self
64823    }
64824    #[allow(rustdoc::invalid_html_tags)]
64825    #[doc = "The ordinate of the area's center, as a percentage of the media height"]
64826    fn rhai_get_y_percentage(&mut self) -> ::ordered_float::OrderedFloat<f64> {
64827        self.y_percentage
64828    }
64829    #[allow(rustdoc::invalid_html_tags)]
64830    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
64831    #[allow(clippy::needless_lifetimes)]
64832    pub fn get_width_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
64833        self.width_percentage
64834    }
64835    #[allow(rustdoc::invalid_html_tags)]
64836    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
64837    #[allow(clippy::needless_lifetimes)]
64838    pub fn set_width_percentage<'a>(
64839        &'a mut self,
64840        width_percentage: ::ordered_float::OrderedFloat<f64>,
64841    ) -> &'a mut Self {
64842        self.width_percentage = width_percentage;
64843        self
64844    }
64845    #[allow(rustdoc::invalid_html_tags)]
64846    #[doc = "The width of the area's rectangle, as a percentage of the media width"]
64847    fn rhai_get_width_percentage(&mut self) -> ::ordered_float::OrderedFloat<f64> {
64848        self.width_percentage
64849    }
64850    #[allow(rustdoc::invalid_html_tags)]
64851    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
64852    #[allow(clippy::needless_lifetimes)]
64853    pub fn get_height_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
64854        self.height_percentage
64855    }
64856    #[allow(rustdoc::invalid_html_tags)]
64857    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
64858    #[allow(clippy::needless_lifetimes)]
64859    pub fn set_height_percentage<'a>(
64860        &'a mut self,
64861        height_percentage: ::ordered_float::OrderedFloat<f64>,
64862    ) -> &'a mut Self {
64863        self.height_percentage = height_percentage;
64864        self
64865    }
64866    #[allow(rustdoc::invalid_html_tags)]
64867    #[doc = "The height of the area's rectangle, as a percentage of the media height"]
64868    fn rhai_get_height_percentage(&mut self) -> ::ordered_float::OrderedFloat<f64> {
64869        self.height_percentage
64870    }
64871    #[allow(rustdoc::invalid_html_tags)]
64872    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
64873    #[allow(clippy::needless_lifetimes)]
64874    pub fn get_rotation_angle<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
64875        self.rotation_angle
64876    }
64877    #[allow(rustdoc::invalid_html_tags)]
64878    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
64879    #[allow(clippy::needless_lifetimes)]
64880    pub fn set_rotation_angle<'a>(
64881        &'a mut self,
64882        rotation_angle: ::ordered_float::OrderedFloat<f64>,
64883    ) -> &'a mut Self {
64884        self.rotation_angle = rotation_angle;
64885        self
64886    }
64887    #[allow(rustdoc::invalid_html_tags)]
64888    #[doc = "The clockwise rotation angle of the rectangle, in degrees; 0-360"]
64889    fn rhai_get_rotation_angle(&mut self) -> ::ordered_float::OrderedFloat<f64> {
64890        self.rotation_angle
64891    }
64892    #[allow(rustdoc::invalid_html_tags)]
64893    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
64894    #[allow(clippy::needless_lifetimes)]
64895    pub fn get_corner_radius_percentage<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
64896        self.corner_radius_percentage
64897    }
64898    #[allow(rustdoc::invalid_html_tags)]
64899    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
64900    #[allow(clippy::needless_lifetimes)]
64901    pub fn set_corner_radius_percentage<'a>(
64902        &'a mut self,
64903        corner_radius_percentage: ::ordered_float::OrderedFloat<f64>,
64904    ) -> &'a mut Self {
64905        self.corner_radius_percentage = corner_radius_percentage;
64906        self
64907    }
64908    #[allow(rustdoc::invalid_html_tags)]
64909    #[doc = "The radius of the rectangle corner rounding, as a percentage of the media width"]
64910    fn rhai_get_corner_radius_percentage(&mut self) -> ::ordered_float::OrderedFloat<f64> {
64911        self.corner_radius_percentage
64912    }
64913}
64914#[allow(dead_code)]
64915impl BotCommand {
64916    #[allow(clippy::too_many_arguments)]
64917    pub fn new(command: String, description: String) -> Self {
64918        Self {
64919            command,
64920            description,
64921        }
64922    }
64923    #[allow(rustdoc::invalid_html_tags)]
64924    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
64925    #[allow(clippy::needless_lifetimes)]
64926    pub fn get_command<'a>(&'a self) -> &'a str {
64927        self.command.as_str()
64928    }
64929    #[allow(rustdoc::invalid_html_tags)]
64930    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
64931    #[allow(clippy::needless_lifetimes)]
64932    pub fn set_command<'a>(&'a mut self, command: String) -> &'a mut Self {
64933        self.command = command;
64934        self
64935    }
64936    #[allow(rustdoc::invalid_html_tags)]
64937    #[doc = "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores."]
64938    fn rhai_get_command(&mut self) -> String {
64939        self.command.clone()
64940    }
64941    #[allow(rustdoc::invalid_html_tags)]
64942    #[doc = "Description of the command; 1-256 characters."]
64943    #[allow(clippy::needless_lifetimes)]
64944    pub fn get_description<'a>(&'a self) -> &'a str {
64945        self.description.as_str()
64946    }
64947    #[allow(rustdoc::invalid_html_tags)]
64948    #[doc = "Description of the command; 1-256 characters."]
64949    #[allow(clippy::needless_lifetimes)]
64950    pub fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self {
64951        self.description = description;
64952        self
64953    }
64954    #[allow(rustdoc::invalid_html_tags)]
64955    #[doc = "Description of the command; 1-256 characters."]
64956    fn rhai_get_description(&mut self) -> String {
64957        self.description.clone()
64958    }
64959}
64960#[allow(dead_code)]
64961impl SuggestedPostPaid {
64962    #[allow(clippy::too_many_arguments)]
64963    pub fn new(currency: String) -> Self {
64964        Self {
64965            currency,
64966            suggested_post_message: None,
64967            amount: None,
64968            star_amount: None,
64969        }
64970    }
64971    #[allow(rustdoc::invalid_html_tags)]
64972    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
64973    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
64974    pub fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message> {
64975        self.suggested_post_message.as_ref().map(|v| v.inner_ref())
64976    }
64977    #[allow(rustdoc::invalid_html_tags)]
64978    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
64979    #[allow(clippy::needless_lifetimes)]
64980    pub fn set_suggested_post_message<'a>(
64981        &'a mut self,
64982        suggested_post_message: Option<Message>,
64983    ) -> &'a mut Self {
64984        self.suggested_post_message = suggested_post_message
64985            .map(|suggested_post_message| BoxWrapper(Box::new(suggested_post_message)));
64986        self
64987    }
64988    #[allow(rustdoc::invalid_html_tags)]
64989    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
64990    fn rhai_get_suggested_post_message(&mut self) -> Option<Message> {
64991        self.suggested_post_message
64992            .as_ref()
64993            .map(|v| v.clone().into())
64994    }
64995    #[allow(rustdoc::invalid_html_tags)]
64996    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
64997    #[allow(clippy::needless_lifetimes)]
64998    pub fn get_currency<'a>(&'a self) -> &'a str {
64999        self.currency.as_str()
65000    }
65001    #[allow(rustdoc::invalid_html_tags)]
65002    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
65003    #[allow(clippy::needless_lifetimes)]
65004    pub fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
65005        self.currency = currency;
65006        self
65007    }
65008    #[allow(rustdoc::invalid_html_tags)]
65009    #[doc = "Currency in which the payment was made. Currently, one of \"XTR\" for Telegram Stars or \"TON\" for toncoins"]
65010    fn rhai_get_currency(&mut self) -> String {
65011        self.currency.clone()
65012    }
65013    #[allow(rustdoc::invalid_html_tags)]
65014    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
65015    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65016    pub fn get_amount<'a>(&'a self) -> Option<i64> {
65017        self.amount.as_ref().map(|v| *v)
65018    }
65019    #[allow(rustdoc::invalid_html_tags)]
65020    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
65021    #[allow(clippy::needless_lifetimes)]
65022    pub fn set_amount<'a>(&'a mut self, amount: Option<i64>) -> &'a mut Self {
65023        self.amount = amount;
65024        self
65025    }
65026    #[allow(rustdoc::invalid_html_tags)]
65027    #[doc = "Optional. The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only"]
65028    fn rhai_get_amount(&mut self) -> Option<i64> {
65029        self.amount.as_ref().copied()
65030    }
65031    #[allow(rustdoc::invalid_html_tags)]
65032    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
65033    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65034    pub fn get_star_amount<'a>(&'a self) -> Option<&'a StarAmount> {
65035        self.star_amount.as_ref().map(|v| v.inner_ref())
65036    }
65037    #[allow(rustdoc::invalid_html_tags)]
65038    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
65039    #[allow(clippy::needless_lifetimes)]
65040    pub fn set_star_amount<'a>(&'a mut self, star_amount: Option<StarAmount>) -> &'a mut Self {
65041        self.star_amount = star_amount.map(|star_amount| BoxWrapper(Unbox(star_amount)));
65042        self
65043    }
65044    #[allow(rustdoc::invalid_html_tags)]
65045    #[doc = "Optional. The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only"]
65046    fn rhai_get_star_amount(&mut self) -> Option<StarAmount> {
65047        self.star_amount.as_ref().map(|v| v.clone().into())
65048    }
65049}
65050#[allow(dead_code)]
65051impl Contact {
65052    #[allow(clippy::too_many_arguments)]
65053    pub fn new(phone_number: String, first_name: String) -> Self {
65054        Self {
65055            phone_number,
65056            first_name,
65057            last_name: None,
65058            user_id: None,
65059            vcard: None,
65060        }
65061    }
65062    #[allow(rustdoc::invalid_html_tags)]
65063    #[doc = "Contact's phone number"]
65064    #[allow(clippy::needless_lifetimes)]
65065    pub fn get_phone_number<'a>(&'a self) -> &'a str {
65066        self.phone_number.as_str()
65067    }
65068    #[allow(rustdoc::invalid_html_tags)]
65069    #[doc = "Contact's phone number"]
65070    #[allow(clippy::needless_lifetimes)]
65071    pub fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self {
65072        self.phone_number = phone_number;
65073        self
65074    }
65075    #[allow(rustdoc::invalid_html_tags)]
65076    #[doc = "Contact's phone number"]
65077    fn rhai_get_phone_number(&mut self) -> String {
65078        self.phone_number.clone()
65079    }
65080    #[allow(rustdoc::invalid_html_tags)]
65081    #[doc = "Contact's first name"]
65082    #[allow(clippy::needless_lifetimes)]
65083    pub fn get_first_name<'a>(&'a self) -> &'a str {
65084        self.first_name.as_str()
65085    }
65086    #[allow(rustdoc::invalid_html_tags)]
65087    #[doc = "Contact's first name"]
65088    #[allow(clippy::needless_lifetimes)]
65089    pub fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self {
65090        self.first_name = first_name;
65091        self
65092    }
65093    #[allow(rustdoc::invalid_html_tags)]
65094    #[doc = "Contact's first name"]
65095    fn rhai_get_first_name(&mut self) -> String {
65096        self.first_name.clone()
65097    }
65098    #[allow(rustdoc::invalid_html_tags)]
65099    #[doc = "Optional. Contact's last name"]
65100    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65101    pub fn get_last_name<'a>(&'a self) -> Option<&'a str> {
65102        self.last_name.as_ref().map(|v| v.as_str())
65103    }
65104    #[allow(rustdoc::invalid_html_tags)]
65105    #[doc = "Optional. Contact's last name"]
65106    #[allow(clippy::needless_lifetimes)]
65107    pub fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
65108        self.last_name = last_name;
65109        self
65110    }
65111    #[allow(rustdoc::invalid_html_tags)]
65112    #[doc = "Optional. Contact's last name"]
65113    fn rhai_get_last_name(&mut self) -> Option<String> {
65114        self.last_name.as_ref().cloned()
65115    }
65116    #[allow(rustdoc::invalid_html_tags)]
65117    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
65118    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65119    pub fn get_user_id<'a>(&'a self) -> Option<i64> {
65120        self.user_id.as_ref().map(|v| *v)
65121    }
65122    #[allow(rustdoc::invalid_html_tags)]
65123    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
65124    #[allow(clippy::needless_lifetimes)]
65125    pub fn set_user_id<'a>(&'a mut self, user_id: Option<i64>) -> &'a mut Self {
65126        self.user_id = user_id;
65127        self
65128    }
65129    #[allow(rustdoc::invalid_html_tags)]
65130    #[doc = "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
65131    fn rhai_get_user_id(&mut self) -> Option<i64> {
65132        self.user_id.as_ref().copied()
65133    }
65134    #[allow(rustdoc::invalid_html_tags)]
65135    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
65136    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65137    pub fn get_vcard<'a>(&'a self) -> Option<&'a str> {
65138        self.vcard.as_ref().map(|v| v.as_str())
65139    }
65140    #[allow(rustdoc::invalid_html_tags)]
65141    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
65142    #[allow(clippy::needless_lifetimes)]
65143    pub fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self {
65144        self.vcard = vcard;
65145        self
65146    }
65147    #[allow(rustdoc::invalid_html_tags)]
65148    #[doc = "Optional. Additional data about the contact in the form of a vCard"]
65149    fn rhai_get_vcard(&mut self) -> Option<String> {
65150        self.vcard.as_ref().cloned()
65151    }
65152}
65153#[allow(dead_code)]
65154impl ChatBoostSourceGiveaway {
65155    #[allow(clippy::too_many_arguments)]
65156    pub fn new(source: String, giveaway_message_id: i64) -> Self {
65157        Self {
65158            source,
65159            giveaway_message_id,
65160            user: None,
65161            prize_star_count: None,
65162            is_unclaimed: None,
65163        }
65164    }
65165    #[allow(rustdoc::invalid_html_tags)]
65166    #[doc = "Source of the boost, always \"giveaway\""]
65167    #[allow(clippy::needless_lifetimes)]
65168    pub fn get_source<'a>(&'a self) -> &'a str {
65169        self.source.as_str()
65170    }
65171    #[allow(rustdoc::invalid_html_tags)]
65172    #[doc = "Source of the boost, always \"giveaway\""]
65173    #[allow(clippy::needless_lifetimes)]
65174    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
65175        self.source = source;
65176        self
65177    }
65178    #[allow(rustdoc::invalid_html_tags)]
65179    #[doc = "Source of the boost, always \"giveaway\""]
65180    fn rhai_get_source(&mut self) -> String {
65181        self.source.clone()
65182    }
65183    #[allow(rustdoc::invalid_html_tags)]
65184    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
65185    #[allow(clippy::needless_lifetimes)]
65186    pub fn get_giveaway_message_id<'a>(&'a self) -> i64 {
65187        self.giveaway_message_id
65188    }
65189    #[allow(rustdoc::invalid_html_tags)]
65190    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
65191    #[allow(clippy::needless_lifetimes)]
65192    pub fn set_giveaway_message_id<'a>(&'a mut self, giveaway_message_id: i64) -> &'a mut Self {
65193        self.giveaway_message_id = giveaway_message_id;
65194        self
65195    }
65196    #[allow(rustdoc::invalid_html_tags)]
65197    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
65198    fn rhai_get_giveaway_message_id(&mut self) -> i64 {
65199        self.giveaway_message_id
65200    }
65201    #[allow(rustdoc::invalid_html_tags)]
65202    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
65203    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65204    pub fn get_user<'a>(&'a self) -> Option<&'a User> {
65205        self.user.as_ref().map(|v| v.inner_ref())
65206    }
65207    #[allow(rustdoc::invalid_html_tags)]
65208    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
65209    #[allow(clippy::needless_lifetimes)]
65210    pub fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self {
65211        self.user = user.map(|user| BoxWrapper(Unbox(user)));
65212        self
65213    }
65214    #[allow(rustdoc::invalid_html_tags)]
65215    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
65216    fn rhai_get_user(&mut self) -> Option<User> {
65217        self.user.as_ref().map(|v| v.clone().into())
65218    }
65219    #[allow(rustdoc::invalid_html_tags)]
65220    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
65221    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65222    pub fn get_prize_star_count<'a>(&'a self) -> Option<i64> {
65223        self.prize_star_count.as_ref().map(|v| *v)
65224    }
65225    #[allow(rustdoc::invalid_html_tags)]
65226    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
65227    #[allow(clippy::needless_lifetimes)]
65228    pub fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self {
65229        self.prize_star_count = prize_star_count;
65230        self
65231    }
65232    #[allow(rustdoc::invalid_html_tags)]
65233    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
65234    fn rhai_get_prize_star_count(&mut self) -> Option<i64> {
65235        self.prize_star_count.as_ref().copied()
65236    }
65237    #[allow(rustdoc::invalid_html_tags)]
65238    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
65239    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65240    pub fn get_is_unclaimed<'a>(&'a self) -> Option<bool> {
65241        self.is_unclaimed.as_ref().map(|v| *v)
65242    }
65243    #[allow(rustdoc::invalid_html_tags)]
65244    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
65245    #[allow(clippy::needless_lifetimes)]
65246    pub fn set_is_unclaimed<'a>(&'a mut self, is_unclaimed: Option<bool>) -> &'a mut Self {
65247        self.is_unclaimed = is_unclaimed;
65248        self
65249    }
65250    #[allow(rustdoc::invalid_html_tags)]
65251    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
65252    fn rhai_get_is_unclaimed(&mut self) -> Option<bool> {
65253        self.is_unclaimed.as_ref().copied()
65254    }
65255}
65256#[allow(dead_code)]
65257impl BotName {
65258    #[allow(clippy::too_many_arguments)]
65259    pub fn new(name: String) -> Self {
65260        Self { name }
65261    }
65262    #[allow(rustdoc::invalid_html_tags)]
65263    #[doc = "The bot's name"]
65264    #[allow(clippy::needless_lifetimes)]
65265    pub fn get_name<'a>(&'a self) -> &'a str {
65266        self.name.as_str()
65267    }
65268    #[allow(rustdoc::invalid_html_tags)]
65269    #[doc = "The bot's name"]
65270    #[allow(clippy::needless_lifetimes)]
65271    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
65272        self.name = name;
65273        self
65274    }
65275    #[allow(rustdoc::invalid_html_tags)]
65276    #[doc = "The bot's name"]
65277    fn rhai_get_name(&mut self) -> String {
65278        self.name.clone()
65279    }
65280}
65281#[allow(dead_code)]
65282impl SuggestedPostDeclined {
65283    #[allow(clippy::too_many_arguments)]
65284    pub fn new() -> Self {
65285        Self {
65286            suggested_post_message: None,
65287            comment: None,
65288        }
65289    }
65290    #[allow(rustdoc::invalid_html_tags)]
65291    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
65292    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65293    pub fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message> {
65294        self.suggested_post_message.as_ref().map(|v| v.inner_ref())
65295    }
65296    #[allow(rustdoc::invalid_html_tags)]
65297    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
65298    #[allow(clippy::needless_lifetimes)]
65299    pub fn set_suggested_post_message<'a>(
65300        &'a mut self,
65301        suggested_post_message: Option<Message>,
65302    ) -> &'a mut Self {
65303        self.suggested_post_message = suggested_post_message
65304            .map(|suggested_post_message| BoxWrapper(Box::new(suggested_post_message)));
65305        self
65306    }
65307    #[allow(rustdoc::invalid_html_tags)]
65308    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
65309    fn rhai_get_suggested_post_message(&mut self) -> Option<Message> {
65310        self.suggested_post_message
65311            .as_ref()
65312            .map(|v| v.clone().into())
65313    }
65314    #[allow(rustdoc::invalid_html_tags)]
65315    #[doc = "Optional. Comment with which the post was declined"]
65316    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65317    pub fn get_comment<'a>(&'a self) -> Option<&'a str> {
65318        self.comment.as_ref().map(|v| v.as_str())
65319    }
65320    #[allow(rustdoc::invalid_html_tags)]
65321    #[doc = "Optional. Comment with which the post was declined"]
65322    #[allow(clippy::needless_lifetimes)]
65323    pub fn set_comment<'a>(&'a mut self, comment: Option<String>) -> &'a mut Self {
65324        self.comment = comment;
65325        self
65326    }
65327    #[allow(rustdoc::invalid_html_tags)]
65328    #[doc = "Optional. Comment with which the post was declined"]
65329    fn rhai_get_comment(&mut self) -> Option<String> {
65330        self.comment.as_ref().cloned()
65331    }
65332}
65333#[allow(dead_code)]
65334impl BusinessOpeningHoursInterval {
65335    #[allow(clippy::too_many_arguments)]
65336    pub fn new(opening_minute: i64, closing_minute: i64) -> Self {
65337        Self {
65338            opening_minute,
65339            closing_minute,
65340        }
65341    }
65342    #[allow(rustdoc::invalid_html_tags)]
65343    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
65344    #[allow(clippy::needless_lifetimes)]
65345    pub fn get_opening_minute<'a>(&'a self) -> i64 {
65346        self.opening_minute
65347    }
65348    #[allow(rustdoc::invalid_html_tags)]
65349    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
65350    #[allow(clippy::needless_lifetimes)]
65351    pub fn set_opening_minute<'a>(&'a mut self, opening_minute: i64) -> &'a mut Self {
65352        self.opening_minute = opening_minute;
65353        self
65354    }
65355    #[allow(rustdoc::invalid_html_tags)]
65356    #[doc = "The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"]
65357    fn rhai_get_opening_minute(&mut self) -> i64 {
65358        self.opening_minute
65359    }
65360    #[allow(rustdoc::invalid_html_tags)]
65361    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
65362    #[allow(clippy::needless_lifetimes)]
65363    pub fn get_closing_minute<'a>(&'a self) -> i64 {
65364        self.closing_minute
65365    }
65366    #[allow(rustdoc::invalid_html_tags)]
65367    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
65368    #[allow(clippy::needless_lifetimes)]
65369    pub fn set_closing_minute<'a>(&'a mut self, closing_minute: i64) -> &'a mut Self {
65370        self.closing_minute = closing_minute;
65371        self
65372    }
65373    #[allow(rustdoc::invalid_html_tags)]
65374    #[doc = "The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"]
65375    fn rhai_get_closing_minute(&mut self) -> i64 {
65376        self.closing_minute
65377    }
65378}
65379#[allow(dead_code)]
65380impl Dice {
65381    #[allow(clippy::too_many_arguments)]
65382    pub fn new(emoji: String, value: i64) -> Self {
65383        Self { emoji, value }
65384    }
65385    #[allow(rustdoc::invalid_html_tags)]
65386    #[doc = "Emoji on which the dice throw animation is based"]
65387    #[allow(clippy::needless_lifetimes)]
65388    pub fn get_emoji<'a>(&'a self) -> &'a str {
65389        self.emoji.as_str()
65390    }
65391    #[allow(rustdoc::invalid_html_tags)]
65392    #[doc = "Emoji on which the dice throw animation is based"]
65393    #[allow(clippy::needless_lifetimes)]
65394    pub fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self {
65395        self.emoji = emoji;
65396        self
65397    }
65398    #[allow(rustdoc::invalid_html_tags)]
65399    #[doc = "Emoji on which the dice throw animation is based"]
65400    fn rhai_get_emoji(&mut self) -> String {
65401        self.emoji.clone()
65402    }
65403    #[allow(rustdoc::invalid_html_tags)]
65404    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
65405    #[allow(clippy::needless_lifetimes)]
65406    pub fn get_value<'a>(&'a self) -> i64 {
65407        self.value
65408    }
65409    #[allow(rustdoc::invalid_html_tags)]
65410    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
65411    #[allow(clippy::needless_lifetimes)]
65412    pub fn set_value<'a>(&'a mut self, value: i64) -> &'a mut Self {
65413        self.value = value;
65414        self
65415    }
65416    #[allow(rustdoc::invalid_html_tags)]
65417    #[doc = "Value of the dice, 1-6 for \"🎲\", \"🎯\" and \"🎳\" base emoji, 1-5 for \"🏀\" and \"⚽\" base emoji, 1-64 for \"🎰\" base emoji"]
65418    fn rhai_get_value(&mut self) -> i64 {
65419        self.value
65420    }
65421}
65422#[allow(dead_code)]
65423impl InlineQueryResultArticle {
65424    #[allow(clippy::too_many_arguments)]
65425    pub fn new<A: Into<InputMessageContent>>(
65426        id: String,
65427        title: String,
65428        input_message_content: A,
65429    ) -> Self {
65430        Self {
65431            tg_type: "article".to_owned(),
65432            id,
65433            title,
65434            input_message_content: BoxWrapper::new_unbox(input_message_content.into()),
65435            reply_markup: None,
65436            url: None,
65437            description: None,
65438            thumbnail_url: None,
65439            thumbnail_width: None,
65440            thumbnail_height: None,
65441        }
65442    }
65443    #[allow(rustdoc::invalid_html_tags)]
65444    #[doc = "Type of the result, must be article"]
65445    #[allow(clippy::needless_lifetimes)]
65446    pub fn get_tg_type<'a>(&'a self) -> &'a str {
65447        self.tg_type.as_str()
65448    }
65449    #[allow(rustdoc::invalid_html_tags)]
65450    #[doc = "Type of the result, must be article"]
65451    #[allow(clippy::needless_lifetimes)]
65452    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
65453        self.tg_type = tg_type;
65454        self
65455    }
65456    #[allow(rustdoc::invalid_html_tags)]
65457    #[doc = "Type of the result, must be article"]
65458    fn rhai_get_tg_type(&mut self) -> String {
65459        self.tg_type.clone()
65460    }
65461    #[allow(rustdoc::invalid_html_tags)]
65462    #[doc = "Unique identifier for this result, 1-64 Bytes"]
65463    #[allow(clippy::needless_lifetimes)]
65464    pub fn get_id<'a>(&'a self) -> &'a str {
65465        self.id.as_str()
65466    }
65467    #[allow(rustdoc::invalid_html_tags)]
65468    #[doc = "Unique identifier for this result, 1-64 Bytes"]
65469    #[allow(clippy::needless_lifetimes)]
65470    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
65471        self.id = id;
65472        self
65473    }
65474    #[allow(rustdoc::invalid_html_tags)]
65475    #[doc = "Unique identifier for this result, 1-64 Bytes"]
65476    fn rhai_get_id(&mut self) -> String {
65477        self.id.clone()
65478    }
65479    #[allow(rustdoc::invalid_html_tags)]
65480    #[doc = "Title of the result"]
65481    #[allow(clippy::needless_lifetimes)]
65482    pub fn get_title<'a>(&'a self) -> &'a str {
65483        self.title.as_str()
65484    }
65485    #[allow(rustdoc::invalid_html_tags)]
65486    #[doc = "Title of the result"]
65487    #[allow(clippy::needless_lifetimes)]
65488    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
65489        self.title = title;
65490        self
65491    }
65492    #[allow(rustdoc::invalid_html_tags)]
65493    #[doc = "Title of the result"]
65494    fn rhai_get_title(&mut self) -> String {
65495        self.title.clone()
65496    }
65497    #[allow(rustdoc::invalid_html_tags)]
65498    #[doc = "Content of the message to be sent"]
65499    #[allow(clippy::needless_lifetimes)]
65500    pub fn get_input_message_content<'a>(&'a self) -> &'a InputMessageContent {
65501        &self.input_message_content
65502    }
65503    #[allow(rustdoc::invalid_html_tags)]
65504    #[doc = "Content of the message to be sent"]
65505    #[allow(clippy::needless_lifetimes)]
65506    pub fn set_input_message_content<'a>(
65507        &'a mut self,
65508        input_message_content: InputMessageContent,
65509    ) -> &'a mut Self {
65510        self.input_message_content = BoxWrapper(Unbox(input_message_content));
65511        self
65512    }
65513    #[allow(rustdoc::invalid_html_tags)]
65514    #[doc = "Content of the message to be sent"]
65515    fn rhai_get_input_message_content(&mut self) -> InputMessageContent {
65516        self.input_message_content.clone().into()
65517    }
65518    #[allow(rustdoc::invalid_html_tags)]
65519    #[doc = "Optional. Inline keyboard attached to the message"]
65520    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65521    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
65522        self.reply_markup.as_ref().map(|v| v.inner_ref())
65523    }
65524    #[allow(rustdoc::invalid_html_tags)]
65525    #[doc = "Optional. Inline keyboard attached to the message"]
65526    #[allow(clippy::needless_lifetimes)]
65527    pub fn set_reply_markup<'a>(
65528        &'a mut self,
65529        reply_markup: Option<InlineKeyboardMarkup>,
65530    ) -> &'a mut Self {
65531        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
65532        self
65533    }
65534    #[allow(rustdoc::invalid_html_tags)]
65535    #[doc = "Optional. Inline keyboard attached to the message"]
65536    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
65537        self.reply_markup.as_ref().map(|v| v.clone().into())
65538    }
65539    #[allow(rustdoc::invalid_html_tags)]
65540    #[doc = "Optional. URL of the result"]
65541    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65542    pub fn get_url<'a>(&'a self) -> Option<&'a str> {
65543        self.url.as_ref().map(|v| v.as_str())
65544    }
65545    #[allow(rustdoc::invalid_html_tags)]
65546    #[doc = "Optional. URL of the result"]
65547    #[allow(clippy::needless_lifetimes)]
65548    pub fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self {
65549        self.url = url;
65550        self
65551    }
65552    #[allow(rustdoc::invalid_html_tags)]
65553    #[doc = "Optional. URL of the result"]
65554    fn rhai_get_url(&mut self) -> Option<String> {
65555        self.url.as_ref().cloned()
65556    }
65557    #[allow(rustdoc::invalid_html_tags)]
65558    #[doc = "Optional. Short description of the result"]
65559    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65560    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
65561        self.description.as_ref().map(|v| v.as_str())
65562    }
65563    #[allow(rustdoc::invalid_html_tags)]
65564    #[doc = "Optional. Short description of the result"]
65565    #[allow(clippy::needless_lifetimes)]
65566    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
65567        self.description = description;
65568        self
65569    }
65570    #[allow(rustdoc::invalid_html_tags)]
65571    #[doc = "Optional. Short description of the result"]
65572    fn rhai_get_description(&mut self) -> Option<String> {
65573        self.description.as_ref().cloned()
65574    }
65575    #[allow(rustdoc::invalid_html_tags)]
65576    #[doc = "Optional. Url of the thumbnail for the result"]
65577    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65578    pub fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
65579        self.thumbnail_url.as_ref().map(|v| v.as_str())
65580    }
65581    #[allow(rustdoc::invalid_html_tags)]
65582    #[doc = "Optional. Url of the thumbnail for the result"]
65583    #[allow(clippy::needless_lifetimes)]
65584    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
65585        self.thumbnail_url = thumbnail_url;
65586        self
65587    }
65588    #[allow(rustdoc::invalid_html_tags)]
65589    #[doc = "Optional. Url of the thumbnail for the result"]
65590    fn rhai_get_thumbnail_url(&mut self) -> Option<String> {
65591        self.thumbnail_url.as_ref().cloned()
65592    }
65593    #[allow(rustdoc::invalid_html_tags)]
65594    #[doc = "Optional. Thumbnail width"]
65595    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65596    pub fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
65597        self.thumbnail_width.as_ref().map(|v| *v)
65598    }
65599    #[allow(rustdoc::invalid_html_tags)]
65600    #[doc = "Optional. Thumbnail width"]
65601    #[allow(clippy::needless_lifetimes)]
65602    pub fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
65603        self.thumbnail_width = thumbnail_width;
65604        self
65605    }
65606    #[allow(rustdoc::invalid_html_tags)]
65607    #[doc = "Optional. Thumbnail width"]
65608    fn rhai_get_thumbnail_width(&mut self) -> Option<i64> {
65609        self.thumbnail_width.as_ref().copied()
65610    }
65611    #[allow(rustdoc::invalid_html_tags)]
65612    #[doc = "Optional. Thumbnail height"]
65613    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65614    pub fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
65615        self.thumbnail_height.as_ref().map(|v| *v)
65616    }
65617    #[allow(rustdoc::invalid_html_tags)]
65618    #[doc = "Optional. Thumbnail height"]
65619    #[allow(clippy::needless_lifetimes)]
65620    pub fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
65621        self.thumbnail_height = thumbnail_height;
65622        self
65623    }
65624    #[allow(rustdoc::invalid_html_tags)]
65625    #[doc = "Optional. Thumbnail height"]
65626    fn rhai_get_thumbnail_height(&mut self) -> Option<i64> {
65627        self.thumbnail_height.as_ref().copied()
65628    }
65629}
65630#[allow(dead_code)]
65631impl InputLocationMessageContent {
65632    #[allow(clippy::too_many_arguments)]
65633    pub fn new(
65634        latitude: ::ordered_float::OrderedFloat<f64>,
65635        longitude: ::ordered_float::OrderedFloat<f64>,
65636    ) -> Self {
65637        Self {
65638            latitude,
65639            longitude,
65640            horizontal_accuracy: None,
65641            live_period: None,
65642            heading: None,
65643            proximity_alert_radius: None,
65644        }
65645    }
65646    #[allow(rustdoc::invalid_html_tags)]
65647    #[doc = "Latitude of the location in degrees"]
65648    #[allow(clippy::needless_lifetimes)]
65649    pub fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
65650        self.latitude
65651    }
65652    #[allow(rustdoc::invalid_html_tags)]
65653    #[doc = "Latitude of the location in degrees"]
65654    #[allow(clippy::needless_lifetimes)]
65655    pub fn set_latitude<'a>(
65656        &'a mut self,
65657        latitude: ::ordered_float::OrderedFloat<f64>,
65658    ) -> &'a mut Self {
65659        self.latitude = latitude;
65660        self
65661    }
65662    #[allow(rustdoc::invalid_html_tags)]
65663    #[doc = "Latitude of the location in degrees"]
65664    fn rhai_get_latitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
65665        self.latitude
65666    }
65667    #[allow(rustdoc::invalid_html_tags)]
65668    #[doc = "Longitude of the location in degrees"]
65669    #[allow(clippy::needless_lifetimes)]
65670    pub fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
65671        self.longitude
65672    }
65673    #[allow(rustdoc::invalid_html_tags)]
65674    #[doc = "Longitude of the location in degrees"]
65675    #[allow(clippy::needless_lifetimes)]
65676    pub fn set_longitude<'a>(
65677        &'a mut self,
65678        longitude: ::ordered_float::OrderedFloat<f64>,
65679    ) -> &'a mut Self {
65680        self.longitude = longitude;
65681        self
65682    }
65683    #[allow(rustdoc::invalid_html_tags)]
65684    #[doc = "Longitude of the location in degrees"]
65685    fn rhai_get_longitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
65686        self.longitude
65687    }
65688    #[allow(rustdoc::invalid_html_tags)]
65689    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
65690    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65691    pub fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
65692        self.horizontal_accuracy.as_ref().map(|v| *v)
65693    }
65694    #[allow(rustdoc::invalid_html_tags)]
65695    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
65696    #[allow(clippy::needless_lifetimes)]
65697    pub fn set_horizontal_accuracy<'a>(
65698        &'a mut self,
65699        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
65700    ) -> &'a mut Self {
65701        self.horizontal_accuracy = horizontal_accuracy;
65702        self
65703    }
65704    #[allow(rustdoc::invalid_html_tags)]
65705    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
65706    fn rhai_get_horizontal_accuracy(&mut self) -> Option<::ordered_float::OrderedFloat<f64>> {
65707        self.horizontal_accuracy.as_ref().copied()
65708    }
65709    #[allow(rustdoc::invalid_html_tags)]
65710    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
65711    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65712    pub fn get_live_period<'a>(&'a self) -> Option<i64> {
65713        self.live_period.as_ref().map(|v| *v)
65714    }
65715    #[allow(rustdoc::invalid_html_tags)]
65716    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
65717    #[allow(clippy::needless_lifetimes)]
65718    pub fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self {
65719        self.live_period = live_period;
65720        self
65721    }
65722    #[allow(rustdoc::invalid_html_tags)]
65723    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
65724    fn rhai_get_live_period(&mut self) -> Option<i64> {
65725        self.live_period.as_ref().copied()
65726    }
65727    #[allow(rustdoc::invalid_html_tags)]
65728    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
65729    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65730    pub fn get_heading<'a>(&'a self) -> Option<i64> {
65731        self.heading.as_ref().map(|v| *v)
65732    }
65733    #[allow(rustdoc::invalid_html_tags)]
65734    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
65735    #[allow(clippy::needless_lifetimes)]
65736    pub fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self {
65737        self.heading = heading;
65738        self
65739    }
65740    #[allow(rustdoc::invalid_html_tags)]
65741    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
65742    fn rhai_get_heading(&mut self) -> Option<i64> {
65743        self.heading.as_ref().copied()
65744    }
65745    #[allow(rustdoc::invalid_html_tags)]
65746    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
65747    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65748    pub fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64> {
65749        self.proximity_alert_radius.as_ref().map(|v| *v)
65750    }
65751    #[allow(rustdoc::invalid_html_tags)]
65752    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
65753    #[allow(clippy::needless_lifetimes)]
65754    pub fn set_proximity_alert_radius<'a>(
65755        &'a mut self,
65756        proximity_alert_radius: Option<i64>,
65757    ) -> &'a mut Self {
65758        self.proximity_alert_radius = proximity_alert_radius;
65759        self
65760    }
65761    #[allow(rustdoc::invalid_html_tags)]
65762    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
65763    fn rhai_get_proximity_alert_radius(&mut self) -> Option<i64> {
65764        self.proximity_alert_radius.as_ref().copied()
65765    }
65766}
65767#[allow(dead_code)]
65768impl InlineQueryResultCachedSticker {
65769    #[allow(clippy::too_many_arguments)]
65770    pub fn new(id: String, sticker_file_id: String) -> Self {
65771        Self {
65772            tg_type: "sticker".to_owned(),
65773            id,
65774            sticker_file_id,
65775            reply_markup: None,
65776            input_message_content: None,
65777        }
65778    }
65779    #[allow(rustdoc::invalid_html_tags)]
65780    #[doc = "Type of the result, must be sticker"]
65781    #[allow(clippy::needless_lifetimes)]
65782    pub fn get_tg_type<'a>(&'a self) -> &'a str {
65783        self.tg_type.as_str()
65784    }
65785    #[allow(rustdoc::invalid_html_tags)]
65786    #[doc = "Type of the result, must be sticker"]
65787    #[allow(clippy::needless_lifetimes)]
65788    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
65789        self.tg_type = tg_type;
65790        self
65791    }
65792    #[allow(rustdoc::invalid_html_tags)]
65793    #[doc = "Type of the result, must be sticker"]
65794    fn rhai_get_tg_type(&mut self) -> String {
65795        self.tg_type.clone()
65796    }
65797    #[allow(rustdoc::invalid_html_tags)]
65798    #[doc = "Unique identifier for this result, 1-64 bytes"]
65799    #[allow(clippy::needless_lifetimes)]
65800    pub fn get_id<'a>(&'a self) -> &'a str {
65801        self.id.as_str()
65802    }
65803    #[allow(rustdoc::invalid_html_tags)]
65804    #[doc = "Unique identifier for this result, 1-64 bytes"]
65805    #[allow(clippy::needless_lifetimes)]
65806    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
65807        self.id = id;
65808        self
65809    }
65810    #[allow(rustdoc::invalid_html_tags)]
65811    #[doc = "Unique identifier for this result, 1-64 bytes"]
65812    fn rhai_get_id(&mut self) -> String {
65813        self.id.clone()
65814    }
65815    #[allow(rustdoc::invalid_html_tags)]
65816    #[doc = "A valid file identifier of the sticker"]
65817    #[allow(clippy::needless_lifetimes)]
65818    pub fn get_sticker_file_id<'a>(&'a self) -> &'a str {
65819        self.sticker_file_id.as_str()
65820    }
65821    #[allow(rustdoc::invalid_html_tags)]
65822    #[doc = "A valid file identifier of the sticker"]
65823    #[allow(clippy::needless_lifetimes)]
65824    pub fn set_sticker_file_id<'a>(&'a mut self, sticker_file_id: String) -> &'a mut Self {
65825        self.sticker_file_id = sticker_file_id;
65826        self
65827    }
65828    #[allow(rustdoc::invalid_html_tags)]
65829    #[doc = "A valid file identifier of the sticker"]
65830    fn rhai_get_sticker_file_id(&mut self) -> String {
65831        self.sticker_file_id.clone()
65832    }
65833    #[allow(rustdoc::invalid_html_tags)]
65834    #[doc = "Optional. Inline keyboard attached to the message"]
65835    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65836    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
65837        self.reply_markup.as_ref().map(|v| v.inner_ref())
65838    }
65839    #[allow(rustdoc::invalid_html_tags)]
65840    #[doc = "Optional. Inline keyboard attached to the message"]
65841    #[allow(clippy::needless_lifetimes)]
65842    pub fn set_reply_markup<'a>(
65843        &'a mut self,
65844        reply_markup: Option<InlineKeyboardMarkup>,
65845    ) -> &'a mut Self {
65846        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
65847        self
65848    }
65849    #[allow(rustdoc::invalid_html_tags)]
65850    #[doc = "Optional. Inline keyboard attached to the message"]
65851    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
65852        self.reply_markup.as_ref().map(|v| v.clone().into())
65853    }
65854    #[allow(rustdoc::invalid_html_tags)]
65855    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
65856    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65857    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
65858        self.input_message_content.as_ref().map(|v| v.inner_ref())
65859    }
65860    #[allow(rustdoc::invalid_html_tags)]
65861    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
65862    #[allow(clippy::needless_lifetimes)]
65863    pub fn set_input_message_content<'a>(
65864        &'a mut self,
65865        input_message_content: Option<InputMessageContent>,
65866    ) -> &'a mut Self {
65867        self.input_message_content = input_message_content
65868            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
65869        self
65870    }
65871    #[allow(rustdoc::invalid_html_tags)]
65872    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
65873    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
65874        self.input_message_content
65875            .as_ref()
65876            .map(|v| v.clone().into())
65877    }
65878}
65879#[allow(dead_code)]
65880impl InputPaidMediaVideo {
65881    #[allow(clippy::too_many_arguments)]
65882    pub fn new(media: String) -> Self {
65883        Self {
65884            tg_type: "video".to_owned(),
65885            media,
65886            thumbnail: None,
65887            cover: None,
65888            start_timestamp: None,
65889            width: None,
65890            height: None,
65891            duration: None,
65892            supports_streaming: None,
65893        }
65894    }
65895    #[allow(rustdoc::invalid_html_tags)]
65896    #[doc = "Type of the media, must be video"]
65897    #[allow(clippy::needless_lifetimes)]
65898    pub fn get_tg_type<'a>(&'a self) -> &'a str {
65899        self.tg_type.as_str()
65900    }
65901    #[allow(rustdoc::invalid_html_tags)]
65902    #[doc = "Type of the media, must be video"]
65903    #[allow(clippy::needless_lifetimes)]
65904    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
65905        self.tg_type = tg_type;
65906        self
65907    }
65908    #[allow(rustdoc::invalid_html_tags)]
65909    #[doc = "Type of the media, must be video"]
65910    fn rhai_get_tg_type(&mut self) -> String {
65911        self.tg_type.clone()
65912    }
65913    #[allow(rustdoc::invalid_html_tags)]
65914    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65915    #[allow(clippy::needless_lifetimes)]
65916    pub fn get_media<'a>(&'a self) -> &'a String {
65917        &self.media
65918    }
65919    #[allow(rustdoc::invalid_html_tags)]
65920    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65921    #[allow(clippy::needless_lifetimes)]
65922    pub fn set_media<'a>(&'a mut self, media: String) -> &'a mut Self {
65923        self.media = media;
65924        self
65925    }
65926    #[allow(rustdoc::invalid_html_tags)]
65927    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65928    fn rhai_get_media(&mut self) -> String {
65929        self.media.clone()
65930    }
65931    #[allow(rustdoc::invalid_html_tags)]
65932    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65933    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65934    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
65935        self.thumbnail.as_ref().map(|v| v.as_str())
65936    }
65937    #[allow(rustdoc::invalid_html_tags)]
65938    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65939    #[allow(clippy::needless_lifetimes)]
65940    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
65941        self.thumbnail = thumbnail;
65942        self
65943    }
65944    #[allow(rustdoc::invalid_html_tags)]
65945    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65946    fn rhai_get_thumbnail(&mut self) -> Option<String> {
65947        self.thumbnail.as_ref().cloned()
65948    }
65949    #[allow(rustdoc::invalid_html_tags)]
65950    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65951    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65952    pub fn get_cover<'a>(&'a self) -> Option<&'a str> {
65953        self.cover.as_ref().map(|v| v.as_str())
65954    }
65955    #[allow(rustdoc::invalid_html_tags)]
65956    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65957    #[allow(clippy::needless_lifetimes)]
65958    pub fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self {
65959        self.cover = cover;
65960        self
65961    }
65962    #[allow(rustdoc::invalid_html_tags)]
65963    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
65964    fn rhai_get_cover(&mut self) -> Option<String> {
65965        self.cover.as_ref().cloned()
65966    }
65967    #[allow(rustdoc::invalid_html_tags)]
65968    #[doc = "Optional. Start timestamp for the video in the message"]
65969    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65970    pub fn get_start_timestamp<'a>(&'a self) -> Option<i64> {
65971        self.start_timestamp.as_ref().map(|v| *v)
65972    }
65973    #[allow(rustdoc::invalid_html_tags)]
65974    #[doc = "Optional. Start timestamp for the video in the message"]
65975    #[allow(clippy::needless_lifetimes)]
65976    pub fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self {
65977        self.start_timestamp = start_timestamp;
65978        self
65979    }
65980    #[allow(rustdoc::invalid_html_tags)]
65981    #[doc = "Optional. Start timestamp for the video in the message"]
65982    fn rhai_get_start_timestamp(&mut self) -> Option<i64> {
65983        self.start_timestamp.as_ref().copied()
65984    }
65985    #[allow(rustdoc::invalid_html_tags)]
65986    #[doc = "Optional. Video width"]
65987    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
65988    pub fn get_width<'a>(&'a self) -> Option<i64> {
65989        self.width.as_ref().map(|v| *v)
65990    }
65991    #[allow(rustdoc::invalid_html_tags)]
65992    #[doc = "Optional. Video width"]
65993    #[allow(clippy::needless_lifetimes)]
65994    pub fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
65995        self.width = width;
65996        self
65997    }
65998    #[allow(rustdoc::invalid_html_tags)]
65999    #[doc = "Optional. Video width"]
66000    fn rhai_get_width(&mut self) -> Option<i64> {
66001        self.width.as_ref().copied()
66002    }
66003    #[allow(rustdoc::invalid_html_tags)]
66004    #[doc = "Optional. Video height"]
66005    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66006    pub fn get_height<'a>(&'a self) -> Option<i64> {
66007        self.height.as_ref().map(|v| *v)
66008    }
66009    #[allow(rustdoc::invalid_html_tags)]
66010    #[doc = "Optional. Video height"]
66011    #[allow(clippy::needless_lifetimes)]
66012    pub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
66013        self.height = height;
66014        self
66015    }
66016    #[allow(rustdoc::invalid_html_tags)]
66017    #[doc = "Optional. Video height"]
66018    fn rhai_get_height(&mut self) -> Option<i64> {
66019        self.height.as_ref().copied()
66020    }
66021    #[allow(rustdoc::invalid_html_tags)]
66022    #[doc = "Optional. Video duration in seconds"]
66023    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66024    pub fn get_duration<'a>(&'a self) -> Option<i64> {
66025        self.duration.as_ref().map(|v| *v)
66026    }
66027    #[allow(rustdoc::invalid_html_tags)]
66028    #[doc = "Optional. Video duration in seconds"]
66029    #[allow(clippy::needless_lifetimes)]
66030    pub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
66031        self.duration = duration;
66032        self
66033    }
66034    #[allow(rustdoc::invalid_html_tags)]
66035    #[doc = "Optional. Video duration in seconds"]
66036    fn rhai_get_duration(&mut self) -> Option<i64> {
66037        self.duration.as_ref().copied()
66038    }
66039    #[allow(rustdoc::invalid_html_tags)]
66040    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
66041    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66042    pub fn get_supports_streaming<'a>(&'a self) -> Option<bool> {
66043        self.supports_streaming.as_ref().map(|v| *v)
66044    }
66045    #[allow(rustdoc::invalid_html_tags)]
66046    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
66047    #[allow(clippy::needless_lifetimes)]
66048    pub fn set_supports_streaming<'a>(
66049        &'a mut self,
66050        supports_streaming: Option<bool>,
66051    ) -> &'a mut Self {
66052        self.supports_streaming = supports_streaming;
66053        self
66054    }
66055    #[allow(rustdoc::invalid_html_tags)]
66056    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
66057    fn rhai_get_supports_streaming(&mut self) -> Option<bool> {
66058        self.supports_streaming.as_ref().copied()
66059    }
66060}
66061#[allow(dead_code)]
66062impl Gift {
66063    #[allow(clippy::too_many_arguments)]
66064    pub fn new<A: Into<Sticker>>(id: String, sticker: A, star_count: i64) -> Self {
66065        Self {
66066            id,
66067            sticker: BoxWrapper::new_unbox(sticker.into()),
66068            star_count,
66069            upgrade_star_count: None,
66070            total_count: None,
66071            remaining_count: None,
66072            publisher_chat: None,
66073        }
66074    }
66075    #[allow(rustdoc::invalid_html_tags)]
66076    #[doc = "Unique identifier of the gift"]
66077    #[allow(clippy::needless_lifetimes)]
66078    pub fn get_id<'a>(&'a self) -> &'a str {
66079        self.id.as_str()
66080    }
66081    #[allow(rustdoc::invalid_html_tags)]
66082    #[doc = "Unique identifier of the gift"]
66083    #[allow(clippy::needless_lifetimes)]
66084    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
66085        self.id = id;
66086        self
66087    }
66088    #[allow(rustdoc::invalid_html_tags)]
66089    #[doc = "Unique identifier of the gift"]
66090    fn rhai_get_id(&mut self) -> String {
66091        self.id.clone()
66092    }
66093    #[allow(rustdoc::invalid_html_tags)]
66094    #[doc = "The sticker that represents the gift"]
66095    #[allow(clippy::needless_lifetimes)]
66096    pub fn get_sticker<'a>(&'a self) -> &'a Sticker {
66097        &self.sticker
66098    }
66099    #[allow(rustdoc::invalid_html_tags)]
66100    #[doc = "The sticker that represents the gift"]
66101    #[allow(clippy::needless_lifetimes)]
66102    pub fn set_sticker<'a>(&'a mut self, sticker: Sticker) -> &'a mut Self {
66103        self.sticker = BoxWrapper(Unbox(sticker));
66104        self
66105    }
66106    #[allow(rustdoc::invalid_html_tags)]
66107    #[doc = "The sticker that represents the gift"]
66108    fn rhai_get_sticker(&mut self) -> Sticker {
66109        self.sticker.clone().into()
66110    }
66111    #[allow(rustdoc::invalid_html_tags)]
66112    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
66113    #[allow(clippy::needless_lifetimes)]
66114    pub fn get_star_count<'a>(&'a self) -> i64 {
66115        self.star_count
66116    }
66117    #[allow(rustdoc::invalid_html_tags)]
66118    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
66119    #[allow(clippy::needless_lifetimes)]
66120    pub fn set_star_count<'a>(&'a mut self, star_count: i64) -> &'a mut Self {
66121        self.star_count = star_count;
66122        self
66123    }
66124    #[allow(rustdoc::invalid_html_tags)]
66125    #[doc = "The number of Telegram Stars that must be paid to send the sticker"]
66126    fn rhai_get_star_count(&mut self) -> i64 {
66127        self.star_count
66128    }
66129    #[allow(rustdoc::invalid_html_tags)]
66130    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
66131    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66132    pub fn get_upgrade_star_count<'a>(&'a self) -> Option<i64> {
66133        self.upgrade_star_count.as_ref().map(|v| *v)
66134    }
66135    #[allow(rustdoc::invalid_html_tags)]
66136    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
66137    #[allow(clippy::needless_lifetimes)]
66138    pub fn set_upgrade_star_count<'a>(
66139        &'a mut self,
66140        upgrade_star_count: Option<i64>,
66141    ) -> &'a mut Self {
66142        self.upgrade_star_count = upgrade_star_count;
66143        self
66144    }
66145    #[allow(rustdoc::invalid_html_tags)]
66146    #[doc = "Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one"]
66147    fn rhai_get_upgrade_star_count(&mut self) -> Option<i64> {
66148        self.upgrade_star_count.as_ref().copied()
66149    }
66150    #[allow(rustdoc::invalid_html_tags)]
66151    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
66152    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66153    pub fn get_total_count<'a>(&'a self) -> Option<i64> {
66154        self.total_count.as_ref().map(|v| *v)
66155    }
66156    #[allow(rustdoc::invalid_html_tags)]
66157    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
66158    #[allow(clippy::needless_lifetimes)]
66159    pub fn set_total_count<'a>(&'a mut self, total_count: Option<i64>) -> &'a mut Self {
66160        self.total_count = total_count;
66161        self
66162    }
66163    #[allow(rustdoc::invalid_html_tags)]
66164    #[doc = "Optional. The total number of the gifts of this type that can be sent; for limited gifts only"]
66165    fn rhai_get_total_count(&mut self) -> Option<i64> {
66166        self.total_count.as_ref().copied()
66167    }
66168    #[allow(rustdoc::invalid_html_tags)]
66169    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
66170    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66171    pub fn get_remaining_count<'a>(&'a self) -> Option<i64> {
66172        self.remaining_count.as_ref().map(|v| *v)
66173    }
66174    #[allow(rustdoc::invalid_html_tags)]
66175    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
66176    #[allow(clippy::needless_lifetimes)]
66177    pub fn set_remaining_count<'a>(&'a mut self, remaining_count: Option<i64>) -> &'a mut Self {
66178        self.remaining_count = remaining_count;
66179        self
66180    }
66181    #[allow(rustdoc::invalid_html_tags)]
66182    #[doc = "Optional. The number of remaining gifts of this type that can be sent; for limited gifts only"]
66183    fn rhai_get_remaining_count(&mut self) -> Option<i64> {
66184        self.remaining_count.as_ref().copied()
66185    }
66186    #[allow(rustdoc::invalid_html_tags)]
66187    #[doc = "Optional. Information about the chat that published the gift"]
66188    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66189    pub fn get_publisher_chat<'a>(&'a self) -> Option<&'a Chat> {
66190        self.publisher_chat.as_ref().map(|v| v.inner_ref())
66191    }
66192    #[allow(rustdoc::invalid_html_tags)]
66193    #[doc = "Optional. Information about the chat that published the gift"]
66194    #[allow(clippy::needless_lifetimes)]
66195    pub fn set_publisher_chat<'a>(&'a mut self, publisher_chat: Option<Chat>) -> &'a mut Self {
66196        self.publisher_chat =
66197            publisher_chat.map(|publisher_chat| BoxWrapper(Unbox(publisher_chat)));
66198        self
66199    }
66200    #[allow(rustdoc::invalid_html_tags)]
66201    #[doc = "Optional. Information about the chat that published the gift"]
66202    fn rhai_get_publisher_chat(&mut self) -> Option<Chat> {
66203        self.publisher_chat.as_ref().map(|v| v.clone().into())
66204    }
66205}
66206#[allow(dead_code)]
66207impl MessageOriginUser {
66208    #[allow(clippy::too_many_arguments)]
66209    pub fn new<A: Into<User>>(date: i64, sender_user: A) -> Self {
66210        Self {
66211            tg_type: "MessageOriginUser".to_owned(),
66212            date,
66213            sender_user: BoxWrapper::new_unbox(sender_user.into()),
66214        }
66215    }
66216    #[allow(rustdoc::invalid_html_tags)]
66217    #[doc = "Type of the message origin, always \"user\""]
66218    #[allow(clippy::needless_lifetimes)]
66219    pub fn get_tg_type<'a>(&'a self) -> &'a str {
66220        self.tg_type.as_str()
66221    }
66222    #[allow(rustdoc::invalid_html_tags)]
66223    #[doc = "Type of the message origin, always \"user\""]
66224    #[allow(clippy::needless_lifetimes)]
66225    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
66226        self.tg_type = tg_type;
66227        self
66228    }
66229    #[allow(rustdoc::invalid_html_tags)]
66230    #[doc = "Type of the message origin, always \"user\""]
66231    fn rhai_get_tg_type(&mut self) -> String {
66232        self.tg_type.clone()
66233    }
66234    #[allow(rustdoc::invalid_html_tags)]
66235    #[doc = "Date the message was sent originally in Unix time"]
66236    #[allow(clippy::needless_lifetimes)]
66237    pub fn get_date<'a>(&'a self) -> i64 {
66238        self.date
66239    }
66240    #[allow(rustdoc::invalid_html_tags)]
66241    #[doc = "Date the message was sent originally in Unix time"]
66242    #[allow(clippy::needless_lifetimes)]
66243    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
66244        self.date = date;
66245        self
66246    }
66247    #[allow(rustdoc::invalid_html_tags)]
66248    #[doc = "Date the message was sent originally in Unix time"]
66249    fn rhai_get_date(&mut self) -> i64 {
66250        self.date
66251    }
66252    #[allow(rustdoc::invalid_html_tags)]
66253    #[doc = "User that sent the message originally"]
66254    #[allow(clippy::needless_lifetimes)]
66255    pub fn get_sender_user<'a>(&'a self) -> &'a User {
66256        &self.sender_user
66257    }
66258    #[allow(rustdoc::invalid_html_tags)]
66259    #[doc = "User that sent the message originally"]
66260    #[allow(clippy::needless_lifetimes)]
66261    pub fn set_sender_user<'a>(&'a mut self, sender_user: User) -> &'a mut Self {
66262        self.sender_user = BoxWrapper(Unbox(sender_user));
66263        self
66264    }
66265    #[allow(rustdoc::invalid_html_tags)]
66266    #[doc = "User that sent the message originally"]
66267    fn rhai_get_sender_user(&mut self) -> User {
66268        self.sender_user.clone().into()
66269    }
66270}
66271#[allow(dead_code)]
66272impl KeyboardButton {
66273    #[allow(clippy::too_many_arguments)]
66274    pub fn new(text: String) -> Self {
66275        Self {
66276            text,
66277            request_users: None,
66278            request_chat: None,
66279            request_contact: None,
66280            request_location: None,
66281            request_poll: None,
66282            web_app: None,
66283        }
66284    }
66285    #[allow(rustdoc::invalid_html_tags)]
66286    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
66287    #[allow(clippy::needless_lifetimes)]
66288    pub fn get_text<'a>(&'a self) -> &'a str {
66289        self.text.as_str()
66290    }
66291    #[allow(rustdoc::invalid_html_tags)]
66292    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
66293    #[allow(clippy::needless_lifetimes)]
66294    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
66295        self.text = text;
66296        self
66297    }
66298    #[allow(rustdoc::invalid_html_tags)]
66299    #[doc = "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"]
66300    fn rhai_get_text(&mut self) -> String {
66301        self.text.clone()
66302    }
66303    #[allow(rustdoc::invalid_html_tags)]
66304    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
66305    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66306    pub fn get_request_users<'a>(&'a self) -> Option<&'a KeyboardButtonRequestUsers> {
66307        self.request_users.as_ref().map(|v| v.inner_ref())
66308    }
66309    #[allow(rustdoc::invalid_html_tags)]
66310    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
66311    #[allow(clippy::needless_lifetimes)]
66312    pub fn set_request_users<'a>(
66313        &'a mut self,
66314        request_users: Option<KeyboardButtonRequestUsers>,
66315    ) -> &'a mut Self {
66316        self.request_users = request_users.map(|request_users| BoxWrapper(Unbox(request_users)));
66317        self
66318    }
66319    #[allow(rustdoc::invalid_html_tags)]
66320    #[doc = "Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \"users_shared\" service message. Available in private chats only."]
66321    fn rhai_get_request_users(&mut self) -> Option<KeyboardButtonRequestUsers> {
66322        self.request_users.as_ref().map(|v| v.clone().into())
66323    }
66324    #[allow(rustdoc::invalid_html_tags)]
66325    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
66326    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66327    pub fn get_request_chat<'a>(&'a self) -> Option<&'a KeyboardButtonRequestChat> {
66328        self.request_chat.as_ref().map(|v| v.inner_ref())
66329    }
66330    #[allow(rustdoc::invalid_html_tags)]
66331    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
66332    #[allow(clippy::needless_lifetimes)]
66333    pub fn set_request_chat<'a>(
66334        &'a mut self,
66335        request_chat: Option<KeyboardButtonRequestChat>,
66336    ) -> &'a mut Self {
66337        self.request_chat = request_chat.map(|request_chat| BoxWrapper(Unbox(request_chat)));
66338        self
66339    }
66340    #[allow(rustdoc::invalid_html_tags)]
66341    #[doc = "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a \"chat_shared\" service message. Available in private chats only."]
66342    fn rhai_get_request_chat(&mut self) -> Option<KeyboardButtonRequestChat> {
66343        self.request_chat.as_ref().map(|v| v.clone().into())
66344    }
66345    #[allow(rustdoc::invalid_html_tags)]
66346    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
66347    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66348    pub fn get_request_contact<'a>(&'a self) -> Option<bool> {
66349        self.request_contact.as_ref().map(|v| *v)
66350    }
66351    #[allow(rustdoc::invalid_html_tags)]
66352    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
66353    #[allow(clippy::needless_lifetimes)]
66354    pub fn set_request_contact<'a>(&'a mut self, request_contact: Option<bool>) -> &'a mut Self {
66355        self.request_contact = request_contact;
66356        self
66357    }
66358    #[allow(rustdoc::invalid_html_tags)]
66359    #[doc = "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."]
66360    fn rhai_get_request_contact(&mut self) -> Option<bool> {
66361        self.request_contact.as_ref().copied()
66362    }
66363    #[allow(rustdoc::invalid_html_tags)]
66364    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
66365    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66366    pub fn get_request_location<'a>(&'a self) -> Option<bool> {
66367        self.request_location.as_ref().map(|v| *v)
66368    }
66369    #[allow(rustdoc::invalid_html_tags)]
66370    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
66371    #[allow(clippy::needless_lifetimes)]
66372    pub fn set_request_location<'a>(&'a mut self, request_location: Option<bool>) -> &'a mut Self {
66373        self.request_location = request_location;
66374        self
66375    }
66376    #[allow(rustdoc::invalid_html_tags)]
66377    #[doc = "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only."]
66378    fn rhai_get_request_location(&mut self) -> Option<bool> {
66379        self.request_location.as_ref().copied()
66380    }
66381    #[allow(rustdoc::invalid_html_tags)]
66382    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
66383    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66384    pub fn get_request_poll<'a>(&'a self) -> Option<&'a KeyboardButtonPollType> {
66385        self.request_poll.as_ref().map(|v| v.inner_ref())
66386    }
66387    #[allow(rustdoc::invalid_html_tags)]
66388    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
66389    #[allow(clippy::needless_lifetimes)]
66390    pub fn set_request_poll<'a>(
66391        &'a mut self,
66392        request_poll: Option<KeyboardButtonPollType>,
66393    ) -> &'a mut Self {
66394        self.request_poll = request_poll.map(|request_poll| BoxWrapper(Unbox(request_poll)));
66395        self
66396    }
66397    #[allow(rustdoc::invalid_html_tags)]
66398    #[doc = "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only."]
66399    fn rhai_get_request_poll(&mut self) -> Option<KeyboardButtonPollType> {
66400        self.request_poll.as_ref().map(|v| v.clone().into())
66401    }
66402    #[allow(rustdoc::invalid_html_tags)]
66403    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
66404    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66405    pub fn get_web_app<'a>(&'a self) -> Option<&'a WebAppInfo> {
66406        self.web_app.as_ref().map(|v| v.inner_ref())
66407    }
66408    #[allow(rustdoc::invalid_html_tags)]
66409    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
66410    #[allow(clippy::needless_lifetimes)]
66411    pub fn set_web_app<'a>(&'a mut self, web_app: Option<WebAppInfo>) -> &'a mut Self {
66412        self.web_app = web_app.map(|web_app| BoxWrapper(Unbox(web_app)));
66413        self
66414    }
66415    #[allow(rustdoc::invalid_html_tags)]
66416    #[doc = "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a \"web_app_data\" service message. Available in private chats only."]
66417    fn rhai_get_web_app(&mut self) -> Option<WebAppInfo> {
66418        self.web_app.as_ref().map(|v| v.clone().into())
66419    }
66420}
66421#[allow(dead_code)]
66422impl InlineQueryResultCachedMpeg4Gif {
66423    #[allow(clippy::too_many_arguments)]
66424    pub fn new(id: String, mpeg_4_file_id: String) -> Self {
66425        Self {
66426            tg_type: "mpeg4_gif".to_owned(),
66427            id,
66428            mpeg_4_file_id,
66429            title: None,
66430            caption: None,
66431            parse_mode: None,
66432            caption_entities: None,
66433            show_caption_above_media: None,
66434            reply_markup: None,
66435            input_message_content: None,
66436        }
66437    }
66438    #[allow(rustdoc::invalid_html_tags)]
66439    #[doc = "Type of the result, must be mpeg4_gif"]
66440    #[allow(clippy::needless_lifetimes)]
66441    pub fn get_tg_type<'a>(&'a self) -> &'a str {
66442        self.tg_type.as_str()
66443    }
66444    #[allow(rustdoc::invalid_html_tags)]
66445    #[doc = "Type of the result, must be mpeg4_gif"]
66446    #[allow(clippy::needless_lifetimes)]
66447    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
66448        self.tg_type = tg_type;
66449        self
66450    }
66451    #[allow(rustdoc::invalid_html_tags)]
66452    #[doc = "Type of the result, must be mpeg4_gif"]
66453    fn rhai_get_tg_type(&mut self) -> String {
66454        self.tg_type.clone()
66455    }
66456    #[allow(rustdoc::invalid_html_tags)]
66457    #[doc = "Unique identifier for this result, 1-64 bytes"]
66458    #[allow(clippy::needless_lifetimes)]
66459    pub fn get_id<'a>(&'a self) -> &'a str {
66460        self.id.as_str()
66461    }
66462    #[allow(rustdoc::invalid_html_tags)]
66463    #[doc = "Unique identifier for this result, 1-64 bytes"]
66464    #[allow(clippy::needless_lifetimes)]
66465    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
66466        self.id = id;
66467        self
66468    }
66469    #[allow(rustdoc::invalid_html_tags)]
66470    #[doc = "Unique identifier for this result, 1-64 bytes"]
66471    fn rhai_get_id(&mut self) -> String {
66472        self.id.clone()
66473    }
66474    #[allow(rustdoc::invalid_html_tags)]
66475    #[doc = "A valid file identifier for the MPEG4 file"]
66476    #[allow(clippy::needless_lifetimes)]
66477    pub fn get_mpeg_4_file_id<'a>(&'a self) -> &'a str {
66478        self.mpeg_4_file_id.as_str()
66479    }
66480    #[allow(rustdoc::invalid_html_tags)]
66481    #[doc = "A valid file identifier for the MPEG4 file"]
66482    #[allow(clippy::needless_lifetimes)]
66483    pub fn set_mpeg_4_file_id<'a>(&'a mut self, mpeg_4_file_id: String) -> &'a mut Self {
66484        self.mpeg_4_file_id = mpeg_4_file_id;
66485        self
66486    }
66487    #[allow(rustdoc::invalid_html_tags)]
66488    #[doc = "A valid file identifier for the MPEG4 file"]
66489    fn rhai_get_mpeg_4_file_id(&mut self) -> String {
66490        self.mpeg_4_file_id.clone()
66491    }
66492    #[allow(rustdoc::invalid_html_tags)]
66493    #[doc = "Optional. Title for the result"]
66494    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66495    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
66496        self.title.as_ref().map(|v| v.as_str())
66497    }
66498    #[allow(rustdoc::invalid_html_tags)]
66499    #[doc = "Optional. Title for the result"]
66500    #[allow(clippy::needless_lifetimes)]
66501    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
66502        self.title = title;
66503        self
66504    }
66505    #[allow(rustdoc::invalid_html_tags)]
66506    #[doc = "Optional. Title for the result"]
66507    fn rhai_get_title(&mut self) -> Option<String> {
66508        self.title.as_ref().cloned()
66509    }
66510    #[allow(rustdoc::invalid_html_tags)]
66511    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
66512    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66513    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
66514        self.caption.as_ref().map(|v| v.as_str())
66515    }
66516    #[allow(rustdoc::invalid_html_tags)]
66517    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
66518    #[allow(clippy::needless_lifetimes)]
66519    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
66520        self.caption = caption;
66521        self
66522    }
66523    #[allow(rustdoc::invalid_html_tags)]
66524    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
66525    fn rhai_get_caption(&mut self) -> Option<String> {
66526        self.caption.as_ref().cloned()
66527    }
66528    #[allow(rustdoc::invalid_html_tags)]
66529    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
66530    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66531    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
66532        self.parse_mode.as_ref().map(|v| v.as_str())
66533    }
66534    #[allow(rustdoc::invalid_html_tags)]
66535    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
66536    #[allow(clippy::needless_lifetimes)]
66537    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
66538        self.parse_mode = parse_mode;
66539        self
66540    }
66541    #[allow(rustdoc::invalid_html_tags)]
66542    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
66543    fn rhai_get_parse_mode(&mut self) -> Option<String> {
66544        self.parse_mode.as_ref().cloned()
66545    }
66546    #[allow(rustdoc::invalid_html_tags)]
66547    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
66548    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66549    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
66550        self.caption_entities.as_ref()
66551    }
66552    #[allow(rustdoc::invalid_html_tags)]
66553    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
66554    #[allow(clippy::needless_lifetimes)]
66555    pub fn set_caption_entities<'a>(
66556        &'a mut self,
66557        caption_entities: Option<Vec<MessageEntity>>,
66558    ) -> &'a mut Self {
66559        self.caption_entities = caption_entities;
66560        self
66561    }
66562    #[allow(rustdoc::invalid_html_tags)]
66563    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
66564    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
66565        self.caption_entities.as_ref().cloned()
66566    }
66567    #[allow(rustdoc::invalid_html_tags)]
66568    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
66569    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66570    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
66571        self.show_caption_above_media.as_ref().map(|v| *v)
66572    }
66573    #[allow(rustdoc::invalid_html_tags)]
66574    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
66575    #[allow(clippy::needless_lifetimes)]
66576    pub fn set_show_caption_above_media<'a>(
66577        &'a mut self,
66578        show_caption_above_media: Option<bool>,
66579    ) -> &'a mut Self {
66580        self.show_caption_above_media = show_caption_above_media;
66581        self
66582    }
66583    #[allow(rustdoc::invalid_html_tags)]
66584    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
66585    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
66586        self.show_caption_above_media.as_ref().copied()
66587    }
66588    #[allow(rustdoc::invalid_html_tags)]
66589    #[doc = "Optional. Inline keyboard attached to the message"]
66590    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66591    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
66592        self.reply_markup.as_ref().map(|v| v.inner_ref())
66593    }
66594    #[allow(rustdoc::invalid_html_tags)]
66595    #[doc = "Optional. Inline keyboard attached to the message"]
66596    #[allow(clippy::needless_lifetimes)]
66597    pub fn set_reply_markup<'a>(
66598        &'a mut self,
66599        reply_markup: Option<InlineKeyboardMarkup>,
66600    ) -> &'a mut Self {
66601        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
66602        self
66603    }
66604    #[allow(rustdoc::invalid_html_tags)]
66605    #[doc = "Optional. Inline keyboard attached to the message"]
66606    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
66607        self.reply_markup.as_ref().map(|v| v.clone().into())
66608    }
66609    #[allow(rustdoc::invalid_html_tags)]
66610    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
66611    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66612    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
66613        self.input_message_content.as_ref().map(|v| v.inner_ref())
66614    }
66615    #[allow(rustdoc::invalid_html_tags)]
66616    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
66617    #[allow(clippy::needless_lifetimes)]
66618    pub fn set_input_message_content<'a>(
66619        &'a mut self,
66620        input_message_content: Option<InputMessageContent>,
66621    ) -> &'a mut Self {
66622        self.input_message_content = input_message_content
66623            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
66624        self
66625    }
66626    #[allow(rustdoc::invalid_html_tags)]
66627    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
66628    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
66629        self.input_message_content
66630            .as_ref()
66631            .map(|v| v.clone().into())
66632    }
66633}
66634#[allow(dead_code)]
66635impl InputInvoiceMessageContent {
66636    #[allow(clippy::too_many_arguments)]
66637    pub fn new(
66638        title: String,
66639        description: String,
66640        payload: String,
66641        currency: String,
66642        prices: Vec<LabeledPrice>,
66643    ) -> Self {
66644        Self {
66645            title,
66646            description,
66647            payload,
66648            currency,
66649            prices,
66650            provider_token: None,
66651            max_tip_amount: None,
66652            suggested_tip_amounts: None,
66653            provider_data: None,
66654            photo_url: None,
66655            photo_size: None,
66656            photo_width: None,
66657            photo_height: None,
66658            need_name: None,
66659            need_phone_number: None,
66660            need_email: None,
66661            need_shipping_address: None,
66662            send_phone_number_to_provider: None,
66663            send_email_to_provider: None,
66664            is_flexible: None,
66665        }
66666    }
66667    #[allow(rustdoc::invalid_html_tags)]
66668    #[doc = "Product name, 1-32 characters"]
66669    #[allow(clippy::needless_lifetimes)]
66670    pub fn get_title<'a>(&'a self) -> &'a str {
66671        self.title.as_str()
66672    }
66673    #[allow(rustdoc::invalid_html_tags)]
66674    #[doc = "Product name, 1-32 characters"]
66675    #[allow(clippy::needless_lifetimes)]
66676    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
66677        self.title = title;
66678        self
66679    }
66680    #[allow(rustdoc::invalid_html_tags)]
66681    #[doc = "Product name, 1-32 characters"]
66682    fn rhai_get_title(&mut self) -> String {
66683        self.title.clone()
66684    }
66685    #[allow(rustdoc::invalid_html_tags)]
66686    #[doc = "Product description, 1-255 characters"]
66687    #[allow(clippy::needless_lifetimes)]
66688    pub fn get_description<'a>(&'a self) -> &'a str {
66689        self.description.as_str()
66690    }
66691    #[allow(rustdoc::invalid_html_tags)]
66692    #[doc = "Product description, 1-255 characters"]
66693    #[allow(clippy::needless_lifetimes)]
66694    pub fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self {
66695        self.description = description;
66696        self
66697    }
66698    #[allow(rustdoc::invalid_html_tags)]
66699    #[doc = "Product description, 1-255 characters"]
66700    fn rhai_get_description(&mut self) -> String {
66701        self.description.clone()
66702    }
66703    #[allow(rustdoc::invalid_html_tags)]
66704    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
66705    #[allow(clippy::needless_lifetimes)]
66706    pub fn get_payload<'a>(&'a self) -> &'a str {
66707        self.payload.as_str()
66708    }
66709    #[allow(rustdoc::invalid_html_tags)]
66710    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
66711    #[allow(clippy::needless_lifetimes)]
66712    pub fn set_payload<'a>(&'a mut self, payload: String) -> &'a mut Self {
66713        self.payload = payload;
66714        self
66715    }
66716    #[allow(rustdoc::invalid_html_tags)]
66717    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
66718    fn rhai_get_payload(&mut self) -> String {
66719        self.payload.clone()
66720    }
66721    #[allow(rustdoc::invalid_html_tags)]
66722    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
66723    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66724    pub fn get_provider_token<'a>(&'a self) -> Option<&'a str> {
66725        self.provider_token.as_ref().map(|v| v.as_str())
66726    }
66727    #[allow(rustdoc::invalid_html_tags)]
66728    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
66729    #[allow(clippy::needless_lifetimes)]
66730    pub fn set_provider_token<'a>(&'a mut self, provider_token: Option<String>) -> &'a mut Self {
66731        self.provider_token = provider_token;
66732        self
66733    }
66734    #[allow(rustdoc::invalid_html_tags)]
66735    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
66736    fn rhai_get_provider_token(&mut self) -> Option<String> {
66737        self.provider_token.as_ref().cloned()
66738    }
66739    #[allow(rustdoc::invalid_html_tags)]
66740    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
66741    #[allow(clippy::needless_lifetimes)]
66742    pub fn get_currency<'a>(&'a self) -> &'a str {
66743        self.currency.as_str()
66744    }
66745    #[allow(rustdoc::invalid_html_tags)]
66746    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
66747    #[allow(clippy::needless_lifetimes)]
66748    pub fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
66749        self.currency = currency;
66750        self
66751    }
66752    #[allow(rustdoc::invalid_html_tags)]
66753    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
66754    fn rhai_get_currency(&mut self) -> String {
66755        self.currency.clone()
66756    }
66757    #[allow(rustdoc::invalid_html_tags)]
66758    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
66759    #[allow(clippy::needless_lifetimes)]
66760    pub fn get_prices<'a>(&'a self) -> &'a Vec<LabeledPrice> {
66761        &self.prices
66762    }
66763    #[allow(rustdoc::invalid_html_tags)]
66764    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
66765    #[allow(clippy::needless_lifetimes)]
66766    pub fn set_prices<'a>(&'a mut self, prices: Vec<LabeledPrice>) -> &'a mut Self {
66767        self.prices = prices;
66768        self
66769    }
66770    #[allow(rustdoc::invalid_html_tags)]
66771    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
66772    fn rhai_get_prices(&mut self) -> Vec<LabeledPrice> {
66773        self.prices.clone()
66774    }
66775    #[allow(rustdoc::invalid_html_tags)]
66776    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
66777    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66778    pub fn get_max_tip_amount<'a>(&'a self) -> Option<i64> {
66779        self.max_tip_amount.as_ref().map(|v| *v)
66780    }
66781    #[allow(rustdoc::invalid_html_tags)]
66782    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
66783    #[allow(clippy::needless_lifetimes)]
66784    pub fn set_max_tip_amount<'a>(&'a mut self, max_tip_amount: Option<i64>) -> &'a mut Self {
66785        self.max_tip_amount = max_tip_amount;
66786        self
66787    }
66788    #[allow(rustdoc::invalid_html_tags)]
66789    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
66790    fn rhai_get_max_tip_amount(&mut self) -> Option<i64> {
66791        self.max_tip_amount.as_ref().copied()
66792    }
66793    #[allow(rustdoc::invalid_html_tags)]
66794    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
66795    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66796    pub fn get_suggested_tip_amounts<'a>(&'a self) -> Option<&'a Vec<i64>> {
66797        self.suggested_tip_amounts.as_ref()
66798    }
66799    #[allow(rustdoc::invalid_html_tags)]
66800    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
66801    #[allow(clippy::needless_lifetimes)]
66802    pub fn set_suggested_tip_amounts<'a>(
66803        &'a mut self,
66804        suggested_tip_amounts: Option<Vec<i64>>,
66805    ) -> &'a mut Self {
66806        self.suggested_tip_amounts = suggested_tip_amounts;
66807        self
66808    }
66809    #[allow(rustdoc::invalid_html_tags)]
66810    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
66811    fn rhai_get_suggested_tip_amounts(&mut self) -> Option<Vec<i64>> {
66812        self.suggested_tip_amounts.as_ref().cloned()
66813    }
66814    #[allow(rustdoc::invalid_html_tags)]
66815    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
66816    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66817    pub fn get_provider_data<'a>(&'a self) -> Option<&'a str> {
66818        self.provider_data.as_ref().map(|v| v.as_str())
66819    }
66820    #[allow(rustdoc::invalid_html_tags)]
66821    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
66822    #[allow(clippy::needless_lifetimes)]
66823    pub fn set_provider_data<'a>(&'a mut self, provider_data: Option<String>) -> &'a mut Self {
66824        self.provider_data = provider_data;
66825        self
66826    }
66827    #[allow(rustdoc::invalid_html_tags)]
66828    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
66829    fn rhai_get_provider_data(&mut self) -> Option<String> {
66830        self.provider_data.as_ref().cloned()
66831    }
66832    #[allow(rustdoc::invalid_html_tags)]
66833    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
66834    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66835    pub fn get_photo_url<'a>(&'a self) -> Option<&'a str> {
66836        self.photo_url.as_ref().map(|v| v.as_str())
66837    }
66838    #[allow(rustdoc::invalid_html_tags)]
66839    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
66840    #[allow(clippy::needless_lifetimes)]
66841    pub fn set_photo_url<'a>(&'a mut self, photo_url: Option<String>) -> &'a mut Self {
66842        self.photo_url = photo_url;
66843        self
66844    }
66845    #[allow(rustdoc::invalid_html_tags)]
66846    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
66847    fn rhai_get_photo_url(&mut self) -> Option<String> {
66848        self.photo_url.as_ref().cloned()
66849    }
66850    #[allow(rustdoc::invalid_html_tags)]
66851    #[doc = "Optional. Photo size in bytes"]
66852    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66853    pub fn get_photo_size<'a>(&'a self) -> Option<i64> {
66854        self.photo_size.as_ref().map(|v| *v)
66855    }
66856    #[allow(rustdoc::invalid_html_tags)]
66857    #[doc = "Optional. Photo size in bytes"]
66858    #[allow(clippy::needless_lifetimes)]
66859    pub fn set_photo_size<'a>(&'a mut self, photo_size: Option<i64>) -> &'a mut Self {
66860        self.photo_size = photo_size;
66861        self
66862    }
66863    #[allow(rustdoc::invalid_html_tags)]
66864    #[doc = "Optional. Photo size in bytes"]
66865    fn rhai_get_photo_size(&mut self) -> Option<i64> {
66866        self.photo_size.as_ref().copied()
66867    }
66868    #[allow(rustdoc::invalid_html_tags)]
66869    #[doc = "Optional. Photo width"]
66870    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66871    pub fn get_photo_width<'a>(&'a self) -> Option<i64> {
66872        self.photo_width.as_ref().map(|v| *v)
66873    }
66874    #[allow(rustdoc::invalid_html_tags)]
66875    #[doc = "Optional. Photo width"]
66876    #[allow(clippy::needless_lifetimes)]
66877    pub fn set_photo_width<'a>(&'a mut self, photo_width: Option<i64>) -> &'a mut Self {
66878        self.photo_width = photo_width;
66879        self
66880    }
66881    #[allow(rustdoc::invalid_html_tags)]
66882    #[doc = "Optional. Photo width"]
66883    fn rhai_get_photo_width(&mut self) -> Option<i64> {
66884        self.photo_width.as_ref().copied()
66885    }
66886    #[allow(rustdoc::invalid_html_tags)]
66887    #[doc = "Optional. Photo height"]
66888    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66889    pub fn get_photo_height<'a>(&'a self) -> Option<i64> {
66890        self.photo_height.as_ref().map(|v| *v)
66891    }
66892    #[allow(rustdoc::invalid_html_tags)]
66893    #[doc = "Optional. Photo height"]
66894    #[allow(clippy::needless_lifetimes)]
66895    pub fn set_photo_height<'a>(&'a mut self, photo_height: Option<i64>) -> &'a mut Self {
66896        self.photo_height = photo_height;
66897        self
66898    }
66899    #[allow(rustdoc::invalid_html_tags)]
66900    #[doc = "Optional. Photo height"]
66901    fn rhai_get_photo_height(&mut self) -> Option<i64> {
66902        self.photo_height.as_ref().copied()
66903    }
66904    #[allow(rustdoc::invalid_html_tags)]
66905    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
66906    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66907    pub fn get_need_name<'a>(&'a self) -> Option<bool> {
66908        self.need_name.as_ref().map(|v| *v)
66909    }
66910    #[allow(rustdoc::invalid_html_tags)]
66911    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
66912    #[allow(clippy::needless_lifetimes)]
66913    pub fn set_need_name<'a>(&'a mut self, need_name: Option<bool>) -> &'a mut Self {
66914        self.need_name = need_name;
66915        self
66916    }
66917    #[allow(rustdoc::invalid_html_tags)]
66918    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
66919    fn rhai_get_need_name(&mut self) -> Option<bool> {
66920        self.need_name.as_ref().copied()
66921    }
66922    #[allow(rustdoc::invalid_html_tags)]
66923    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
66924    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66925    pub fn get_need_phone_number<'a>(&'a self) -> Option<bool> {
66926        self.need_phone_number.as_ref().map(|v| *v)
66927    }
66928    #[allow(rustdoc::invalid_html_tags)]
66929    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
66930    #[allow(clippy::needless_lifetimes)]
66931    pub fn set_need_phone_number<'a>(
66932        &'a mut self,
66933        need_phone_number: Option<bool>,
66934    ) -> &'a mut Self {
66935        self.need_phone_number = need_phone_number;
66936        self
66937    }
66938    #[allow(rustdoc::invalid_html_tags)]
66939    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
66940    fn rhai_get_need_phone_number(&mut self) -> Option<bool> {
66941        self.need_phone_number.as_ref().copied()
66942    }
66943    #[allow(rustdoc::invalid_html_tags)]
66944    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
66945    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66946    pub fn get_need_email<'a>(&'a self) -> Option<bool> {
66947        self.need_email.as_ref().map(|v| *v)
66948    }
66949    #[allow(rustdoc::invalid_html_tags)]
66950    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
66951    #[allow(clippy::needless_lifetimes)]
66952    pub fn set_need_email<'a>(&'a mut self, need_email: Option<bool>) -> &'a mut Self {
66953        self.need_email = need_email;
66954        self
66955    }
66956    #[allow(rustdoc::invalid_html_tags)]
66957    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
66958    fn rhai_get_need_email(&mut self) -> Option<bool> {
66959        self.need_email.as_ref().copied()
66960    }
66961    #[allow(rustdoc::invalid_html_tags)]
66962    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
66963    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66964    pub fn get_need_shipping_address<'a>(&'a self) -> Option<bool> {
66965        self.need_shipping_address.as_ref().map(|v| *v)
66966    }
66967    #[allow(rustdoc::invalid_html_tags)]
66968    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
66969    #[allow(clippy::needless_lifetimes)]
66970    pub fn set_need_shipping_address<'a>(
66971        &'a mut self,
66972        need_shipping_address: Option<bool>,
66973    ) -> &'a mut Self {
66974        self.need_shipping_address = need_shipping_address;
66975        self
66976    }
66977    #[allow(rustdoc::invalid_html_tags)]
66978    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
66979    fn rhai_get_need_shipping_address(&mut self) -> Option<bool> {
66980        self.need_shipping_address.as_ref().copied()
66981    }
66982    #[allow(rustdoc::invalid_html_tags)]
66983    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
66984    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
66985    pub fn get_send_phone_number_to_provider<'a>(&'a self) -> Option<bool> {
66986        self.send_phone_number_to_provider.as_ref().map(|v| *v)
66987    }
66988    #[allow(rustdoc::invalid_html_tags)]
66989    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
66990    #[allow(clippy::needless_lifetimes)]
66991    pub fn set_send_phone_number_to_provider<'a>(
66992        &'a mut self,
66993        send_phone_number_to_provider: Option<bool>,
66994    ) -> &'a mut Self {
66995        self.send_phone_number_to_provider = send_phone_number_to_provider;
66996        self
66997    }
66998    #[allow(rustdoc::invalid_html_tags)]
66999    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
67000    fn rhai_get_send_phone_number_to_provider(&mut self) -> Option<bool> {
67001        self.send_phone_number_to_provider.as_ref().copied()
67002    }
67003    #[allow(rustdoc::invalid_html_tags)]
67004    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
67005    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67006    pub fn get_send_email_to_provider<'a>(&'a self) -> Option<bool> {
67007        self.send_email_to_provider.as_ref().map(|v| *v)
67008    }
67009    #[allow(rustdoc::invalid_html_tags)]
67010    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
67011    #[allow(clippy::needless_lifetimes)]
67012    pub fn set_send_email_to_provider<'a>(
67013        &'a mut self,
67014        send_email_to_provider: Option<bool>,
67015    ) -> &'a mut Self {
67016        self.send_email_to_provider = send_email_to_provider;
67017        self
67018    }
67019    #[allow(rustdoc::invalid_html_tags)]
67020    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
67021    fn rhai_get_send_email_to_provider(&mut self) -> Option<bool> {
67022        self.send_email_to_provider.as_ref().copied()
67023    }
67024    #[allow(rustdoc::invalid_html_tags)]
67025    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
67026    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67027    pub fn get_is_flexible<'a>(&'a self) -> Option<bool> {
67028        self.is_flexible.as_ref().map(|v| *v)
67029    }
67030    #[allow(rustdoc::invalid_html_tags)]
67031    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
67032    #[allow(clippy::needless_lifetimes)]
67033    pub fn set_is_flexible<'a>(&'a mut self, is_flexible: Option<bool>) -> &'a mut Self {
67034        self.is_flexible = is_flexible;
67035        self
67036    }
67037    #[allow(rustdoc::invalid_html_tags)]
67038    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
67039    fn rhai_get_is_flexible(&mut self) -> Option<bool> {
67040        self.is_flexible.as_ref().copied()
67041    }
67042}
67043#[allow(dead_code)]
67044impl BusinessBotRights {
67045    #[allow(clippy::too_many_arguments)]
67046    pub fn new() -> Self {
67047        Self {
67048            can_reply: None,
67049            can_read_messages: None,
67050            can_delete_sent_messages: None,
67051            can_delete_all_messages: None,
67052            can_edit_name: None,
67053            can_edit_bio: None,
67054            can_edit_profile_photo: None,
67055            can_edit_username: None,
67056            can_change_gift_settings: None,
67057            can_view_gifts_and_stars: None,
67058            can_convert_gifts_to_stars: None,
67059            can_transfer_and_upgrade_gifts: None,
67060            can_transfer_stars: None,
67061            can_manage_stories: None,
67062        }
67063    }
67064    #[allow(rustdoc::invalid_html_tags)]
67065    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
67066    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67067    pub fn get_can_reply<'a>(&'a self) -> Option<bool> {
67068        self.can_reply.as_ref().map(|v| *v)
67069    }
67070    #[allow(rustdoc::invalid_html_tags)]
67071    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
67072    #[allow(clippy::needless_lifetimes)]
67073    pub fn set_can_reply<'a>(&'a mut self, can_reply: Option<bool>) -> &'a mut Self {
67074        self.can_reply = can_reply;
67075        self
67076    }
67077    #[allow(rustdoc::invalid_html_tags)]
67078    #[doc = "Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours"]
67079    fn rhai_get_can_reply(&mut self) -> Option<bool> {
67080        self.can_reply.as_ref().copied()
67081    }
67082    #[allow(rustdoc::invalid_html_tags)]
67083    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
67084    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67085    pub fn get_can_read_messages<'a>(&'a self) -> Option<bool> {
67086        self.can_read_messages.as_ref().map(|v| *v)
67087    }
67088    #[allow(rustdoc::invalid_html_tags)]
67089    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
67090    #[allow(clippy::needless_lifetimes)]
67091    pub fn set_can_read_messages<'a>(
67092        &'a mut self,
67093        can_read_messages: Option<bool>,
67094    ) -> &'a mut Self {
67095        self.can_read_messages = can_read_messages;
67096        self
67097    }
67098    #[allow(rustdoc::invalid_html_tags)]
67099    #[doc = "Optional. True, if the bot can mark incoming private messages as read"]
67100    fn rhai_get_can_read_messages(&mut self) -> Option<bool> {
67101        self.can_read_messages.as_ref().copied()
67102    }
67103    #[allow(rustdoc::invalid_html_tags)]
67104    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
67105    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67106    pub fn get_can_delete_sent_messages<'a>(&'a self) -> Option<bool> {
67107        self.can_delete_sent_messages.as_ref().map(|v| *v)
67108    }
67109    #[allow(rustdoc::invalid_html_tags)]
67110    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
67111    #[allow(clippy::needless_lifetimes)]
67112    pub fn set_can_delete_sent_messages<'a>(
67113        &'a mut self,
67114        can_delete_sent_messages: Option<bool>,
67115    ) -> &'a mut Self {
67116        self.can_delete_sent_messages = can_delete_sent_messages;
67117        self
67118    }
67119    #[allow(rustdoc::invalid_html_tags)]
67120    #[doc = "Optional. True, if the bot can delete messages sent by the bot"]
67121    fn rhai_get_can_delete_sent_messages(&mut self) -> Option<bool> {
67122        self.can_delete_sent_messages.as_ref().copied()
67123    }
67124    #[allow(rustdoc::invalid_html_tags)]
67125    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
67126    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67127    pub fn get_can_delete_all_messages<'a>(&'a self) -> Option<bool> {
67128        self.can_delete_all_messages.as_ref().map(|v| *v)
67129    }
67130    #[allow(rustdoc::invalid_html_tags)]
67131    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
67132    #[allow(clippy::needless_lifetimes)]
67133    pub fn set_can_delete_all_messages<'a>(
67134        &'a mut self,
67135        can_delete_all_messages: Option<bool>,
67136    ) -> &'a mut Self {
67137        self.can_delete_all_messages = can_delete_all_messages;
67138        self
67139    }
67140    #[allow(rustdoc::invalid_html_tags)]
67141    #[doc = "Optional. True, if the bot can delete all private messages in managed chats"]
67142    fn rhai_get_can_delete_all_messages(&mut self) -> Option<bool> {
67143        self.can_delete_all_messages.as_ref().copied()
67144    }
67145    #[allow(rustdoc::invalid_html_tags)]
67146    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
67147    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67148    pub fn get_can_edit_name<'a>(&'a self) -> Option<bool> {
67149        self.can_edit_name.as_ref().map(|v| *v)
67150    }
67151    #[allow(rustdoc::invalid_html_tags)]
67152    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
67153    #[allow(clippy::needless_lifetimes)]
67154    pub fn set_can_edit_name<'a>(&'a mut self, can_edit_name: Option<bool>) -> &'a mut Self {
67155        self.can_edit_name = can_edit_name;
67156        self
67157    }
67158    #[allow(rustdoc::invalid_html_tags)]
67159    #[doc = "Optional. True, if the bot can edit the first and last name of the business account"]
67160    fn rhai_get_can_edit_name(&mut self) -> Option<bool> {
67161        self.can_edit_name.as_ref().copied()
67162    }
67163    #[allow(rustdoc::invalid_html_tags)]
67164    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
67165    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67166    pub fn get_can_edit_bio<'a>(&'a self) -> Option<bool> {
67167        self.can_edit_bio.as_ref().map(|v| *v)
67168    }
67169    #[allow(rustdoc::invalid_html_tags)]
67170    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
67171    #[allow(clippy::needless_lifetimes)]
67172    pub fn set_can_edit_bio<'a>(&'a mut self, can_edit_bio: Option<bool>) -> &'a mut Self {
67173        self.can_edit_bio = can_edit_bio;
67174        self
67175    }
67176    #[allow(rustdoc::invalid_html_tags)]
67177    #[doc = "Optional. True, if the bot can edit the bio of the business account"]
67178    fn rhai_get_can_edit_bio(&mut self) -> Option<bool> {
67179        self.can_edit_bio.as_ref().copied()
67180    }
67181    #[allow(rustdoc::invalid_html_tags)]
67182    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
67183    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67184    pub fn get_can_edit_profile_photo<'a>(&'a self) -> Option<bool> {
67185        self.can_edit_profile_photo.as_ref().map(|v| *v)
67186    }
67187    #[allow(rustdoc::invalid_html_tags)]
67188    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
67189    #[allow(clippy::needless_lifetimes)]
67190    pub fn set_can_edit_profile_photo<'a>(
67191        &'a mut self,
67192        can_edit_profile_photo: Option<bool>,
67193    ) -> &'a mut Self {
67194        self.can_edit_profile_photo = can_edit_profile_photo;
67195        self
67196    }
67197    #[allow(rustdoc::invalid_html_tags)]
67198    #[doc = "Optional. True, if the bot can edit the profile photo of the business account"]
67199    fn rhai_get_can_edit_profile_photo(&mut self) -> Option<bool> {
67200        self.can_edit_profile_photo.as_ref().copied()
67201    }
67202    #[allow(rustdoc::invalid_html_tags)]
67203    #[doc = "Optional. True, if the bot can edit the username of the business account"]
67204    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67205    pub fn get_can_edit_username<'a>(&'a self) -> Option<bool> {
67206        self.can_edit_username.as_ref().map(|v| *v)
67207    }
67208    #[allow(rustdoc::invalid_html_tags)]
67209    #[doc = "Optional. True, if the bot can edit the username of the business account"]
67210    #[allow(clippy::needless_lifetimes)]
67211    pub fn set_can_edit_username<'a>(
67212        &'a mut self,
67213        can_edit_username: Option<bool>,
67214    ) -> &'a mut Self {
67215        self.can_edit_username = can_edit_username;
67216        self
67217    }
67218    #[allow(rustdoc::invalid_html_tags)]
67219    #[doc = "Optional. True, if the bot can edit the username of the business account"]
67220    fn rhai_get_can_edit_username(&mut self) -> Option<bool> {
67221        self.can_edit_username.as_ref().copied()
67222    }
67223    #[allow(rustdoc::invalid_html_tags)]
67224    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
67225    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67226    pub fn get_can_change_gift_settings<'a>(&'a self) -> Option<bool> {
67227        self.can_change_gift_settings.as_ref().map(|v| *v)
67228    }
67229    #[allow(rustdoc::invalid_html_tags)]
67230    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
67231    #[allow(clippy::needless_lifetimes)]
67232    pub fn set_can_change_gift_settings<'a>(
67233        &'a mut self,
67234        can_change_gift_settings: Option<bool>,
67235    ) -> &'a mut Self {
67236        self.can_change_gift_settings = can_change_gift_settings;
67237        self
67238    }
67239    #[allow(rustdoc::invalid_html_tags)]
67240    #[doc = "Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account"]
67241    fn rhai_get_can_change_gift_settings(&mut self) -> Option<bool> {
67242        self.can_change_gift_settings.as_ref().copied()
67243    }
67244    #[allow(rustdoc::invalid_html_tags)]
67245    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
67246    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67247    pub fn get_can_view_gifts_and_stars<'a>(&'a self) -> Option<bool> {
67248        self.can_view_gifts_and_stars.as_ref().map(|v| *v)
67249    }
67250    #[allow(rustdoc::invalid_html_tags)]
67251    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
67252    #[allow(clippy::needless_lifetimes)]
67253    pub fn set_can_view_gifts_and_stars<'a>(
67254        &'a mut self,
67255        can_view_gifts_and_stars: Option<bool>,
67256    ) -> &'a mut Self {
67257        self.can_view_gifts_and_stars = can_view_gifts_and_stars;
67258        self
67259    }
67260    #[allow(rustdoc::invalid_html_tags)]
67261    #[doc = "Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account"]
67262    fn rhai_get_can_view_gifts_and_stars(&mut self) -> Option<bool> {
67263        self.can_view_gifts_and_stars.as_ref().copied()
67264    }
67265    #[allow(rustdoc::invalid_html_tags)]
67266    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
67267    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67268    pub fn get_can_convert_gifts_to_stars<'a>(&'a self) -> Option<bool> {
67269        self.can_convert_gifts_to_stars.as_ref().map(|v| *v)
67270    }
67271    #[allow(rustdoc::invalid_html_tags)]
67272    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
67273    #[allow(clippy::needless_lifetimes)]
67274    pub fn set_can_convert_gifts_to_stars<'a>(
67275        &'a mut self,
67276        can_convert_gifts_to_stars: Option<bool>,
67277    ) -> &'a mut Self {
67278        self.can_convert_gifts_to_stars = can_convert_gifts_to_stars;
67279        self
67280    }
67281    #[allow(rustdoc::invalid_html_tags)]
67282    #[doc = "Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars"]
67283    fn rhai_get_can_convert_gifts_to_stars(&mut self) -> Option<bool> {
67284        self.can_convert_gifts_to_stars.as_ref().copied()
67285    }
67286    #[allow(rustdoc::invalid_html_tags)]
67287    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
67288    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67289    pub fn get_can_transfer_and_upgrade_gifts<'a>(&'a self) -> Option<bool> {
67290        self.can_transfer_and_upgrade_gifts.as_ref().map(|v| *v)
67291    }
67292    #[allow(rustdoc::invalid_html_tags)]
67293    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
67294    #[allow(clippy::needless_lifetimes)]
67295    pub fn set_can_transfer_and_upgrade_gifts<'a>(
67296        &'a mut self,
67297        can_transfer_and_upgrade_gifts: Option<bool>,
67298    ) -> &'a mut Self {
67299        self.can_transfer_and_upgrade_gifts = can_transfer_and_upgrade_gifts;
67300        self
67301    }
67302    #[allow(rustdoc::invalid_html_tags)]
67303    #[doc = "Optional. True, if the bot can transfer and upgrade gifts owned by the business account"]
67304    fn rhai_get_can_transfer_and_upgrade_gifts(&mut self) -> Option<bool> {
67305        self.can_transfer_and_upgrade_gifts.as_ref().copied()
67306    }
67307    #[allow(rustdoc::invalid_html_tags)]
67308    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
67309    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67310    pub fn get_can_transfer_stars<'a>(&'a self) -> Option<bool> {
67311        self.can_transfer_stars.as_ref().map(|v| *v)
67312    }
67313    #[allow(rustdoc::invalid_html_tags)]
67314    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
67315    #[allow(clippy::needless_lifetimes)]
67316    pub fn set_can_transfer_stars<'a>(
67317        &'a mut self,
67318        can_transfer_stars: Option<bool>,
67319    ) -> &'a mut Self {
67320        self.can_transfer_stars = can_transfer_stars;
67321        self
67322    }
67323    #[allow(rustdoc::invalid_html_tags)]
67324    #[doc = "Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts"]
67325    fn rhai_get_can_transfer_stars(&mut self) -> Option<bool> {
67326        self.can_transfer_stars.as_ref().copied()
67327    }
67328    #[allow(rustdoc::invalid_html_tags)]
67329    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
67330    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67331    pub fn get_can_manage_stories<'a>(&'a self) -> Option<bool> {
67332        self.can_manage_stories.as_ref().map(|v| *v)
67333    }
67334    #[allow(rustdoc::invalid_html_tags)]
67335    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
67336    #[allow(clippy::needless_lifetimes)]
67337    pub fn set_can_manage_stories<'a>(
67338        &'a mut self,
67339        can_manage_stories: Option<bool>,
67340    ) -> &'a mut Self {
67341        self.can_manage_stories = can_manage_stories;
67342        self
67343    }
67344    #[allow(rustdoc::invalid_html_tags)]
67345    #[doc = "Optional. True, if the bot can post, edit and delete stories on behalf of the business account"]
67346    fn rhai_get_can_manage_stories(&mut self) -> Option<bool> {
67347        self.can_manage_stories.as_ref().copied()
67348    }
67349}
67350#[allow(dead_code)]
67351impl InputStoryContentPhoto {
67352    #[allow(clippy::too_many_arguments)]
67353    pub fn new(photo: String) -> Self {
67354        Self {
67355            tg_type: "photo".to_owned(),
67356            photo,
67357        }
67358    }
67359    #[allow(rustdoc::invalid_html_tags)]
67360    #[doc = "Type of the content, must be photo"]
67361    #[allow(clippy::needless_lifetimes)]
67362    pub fn get_tg_type<'a>(&'a self) -> &'a str {
67363        self.tg_type.as_str()
67364    }
67365    #[allow(rustdoc::invalid_html_tags)]
67366    #[doc = "Type of the content, must be photo"]
67367    #[allow(clippy::needless_lifetimes)]
67368    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
67369        self.tg_type = tg_type;
67370        self
67371    }
67372    #[allow(rustdoc::invalid_html_tags)]
67373    #[doc = "Type of the content, must be photo"]
67374    fn rhai_get_tg_type(&mut self) -> String {
67375        self.tg_type.clone()
67376    }
67377    #[allow(rustdoc::invalid_html_tags)]
67378    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
67379    #[allow(clippy::needless_lifetimes)]
67380    pub fn get_photo<'a>(&'a self) -> &'a str {
67381        self.photo.as_str()
67382    }
67383    #[allow(rustdoc::invalid_html_tags)]
67384    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
67385    #[allow(clippy::needless_lifetimes)]
67386    pub fn set_photo<'a>(&'a mut self, photo: String) -> &'a mut Self {
67387        self.photo = photo;
67388        self
67389    }
67390    #[allow(rustdoc::invalid_html_tags)]
67391    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
67392    fn rhai_get_photo(&mut self) -> String {
67393        self.photo.clone()
67394    }
67395}
67396#[allow(dead_code)]
67397impl InputVenueMessageContent {
67398    #[allow(clippy::too_many_arguments)]
67399    pub fn new(
67400        latitude: ::ordered_float::OrderedFloat<f64>,
67401        longitude: ::ordered_float::OrderedFloat<f64>,
67402        title: String,
67403        address: String,
67404    ) -> Self {
67405        Self {
67406            latitude,
67407            longitude,
67408            title,
67409            address,
67410            foursquare_id: None,
67411            foursquare_type: None,
67412            google_place_id: None,
67413            google_place_type: None,
67414        }
67415    }
67416    #[allow(rustdoc::invalid_html_tags)]
67417    #[doc = "Latitude of the venue in degrees"]
67418    #[allow(clippy::needless_lifetimes)]
67419    pub fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
67420        self.latitude
67421    }
67422    #[allow(rustdoc::invalid_html_tags)]
67423    #[doc = "Latitude of the venue in degrees"]
67424    #[allow(clippy::needless_lifetimes)]
67425    pub fn set_latitude<'a>(
67426        &'a mut self,
67427        latitude: ::ordered_float::OrderedFloat<f64>,
67428    ) -> &'a mut Self {
67429        self.latitude = latitude;
67430        self
67431    }
67432    #[allow(rustdoc::invalid_html_tags)]
67433    #[doc = "Latitude of the venue in degrees"]
67434    fn rhai_get_latitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
67435        self.latitude
67436    }
67437    #[allow(rustdoc::invalid_html_tags)]
67438    #[doc = "Longitude of the venue in degrees"]
67439    #[allow(clippy::needless_lifetimes)]
67440    pub fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
67441        self.longitude
67442    }
67443    #[allow(rustdoc::invalid_html_tags)]
67444    #[doc = "Longitude of the venue in degrees"]
67445    #[allow(clippy::needless_lifetimes)]
67446    pub fn set_longitude<'a>(
67447        &'a mut self,
67448        longitude: ::ordered_float::OrderedFloat<f64>,
67449    ) -> &'a mut Self {
67450        self.longitude = longitude;
67451        self
67452    }
67453    #[allow(rustdoc::invalid_html_tags)]
67454    #[doc = "Longitude of the venue in degrees"]
67455    fn rhai_get_longitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
67456        self.longitude
67457    }
67458    #[allow(rustdoc::invalid_html_tags)]
67459    #[doc = "Name of the venue"]
67460    #[allow(clippy::needless_lifetimes)]
67461    pub fn get_title<'a>(&'a self) -> &'a str {
67462        self.title.as_str()
67463    }
67464    #[allow(rustdoc::invalid_html_tags)]
67465    #[doc = "Name of the venue"]
67466    #[allow(clippy::needless_lifetimes)]
67467    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
67468        self.title = title;
67469        self
67470    }
67471    #[allow(rustdoc::invalid_html_tags)]
67472    #[doc = "Name of the venue"]
67473    fn rhai_get_title(&mut self) -> String {
67474        self.title.clone()
67475    }
67476    #[allow(rustdoc::invalid_html_tags)]
67477    #[doc = "Address of the venue"]
67478    #[allow(clippy::needless_lifetimes)]
67479    pub fn get_address<'a>(&'a self) -> &'a str {
67480        self.address.as_str()
67481    }
67482    #[allow(rustdoc::invalid_html_tags)]
67483    #[doc = "Address of the venue"]
67484    #[allow(clippy::needless_lifetimes)]
67485    pub fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self {
67486        self.address = address;
67487        self
67488    }
67489    #[allow(rustdoc::invalid_html_tags)]
67490    #[doc = "Address of the venue"]
67491    fn rhai_get_address(&mut self) -> String {
67492        self.address.clone()
67493    }
67494    #[allow(rustdoc::invalid_html_tags)]
67495    #[doc = "Optional. Foursquare identifier of the venue, if known"]
67496    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67497    pub fn get_foursquare_id<'a>(&'a self) -> Option<&'a str> {
67498        self.foursquare_id.as_ref().map(|v| v.as_str())
67499    }
67500    #[allow(rustdoc::invalid_html_tags)]
67501    #[doc = "Optional. Foursquare identifier of the venue, if known"]
67502    #[allow(clippy::needless_lifetimes)]
67503    pub fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self {
67504        self.foursquare_id = foursquare_id;
67505        self
67506    }
67507    #[allow(rustdoc::invalid_html_tags)]
67508    #[doc = "Optional. Foursquare identifier of the venue, if known"]
67509    fn rhai_get_foursquare_id(&mut self) -> Option<String> {
67510        self.foursquare_id.as_ref().cloned()
67511    }
67512    #[allow(rustdoc::invalid_html_tags)]
67513    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
67514    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67515    pub fn get_foursquare_type<'a>(&'a self) -> Option<&'a str> {
67516        self.foursquare_type.as_ref().map(|v| v.as_str())
67517    }
67518    #[allow(rustdoc::invalid_html_tags)]
67519    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
67520    #[allow(clippy::needless_lifetimes)]
67521    pub fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self {
67522        self.foursquare_type = foursquare_type;
67523        self
67524    }
67525    #[allow(rustdoc::invalid_html_tags)]
67526    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
67527    fn rhai_get_foursquare_type(&mut self) -> Option<String> {
67528        self.foursquare_type.as_ref().cloned()
67529    }
67530    #[allow(rustdoc::invalid_html_tags)]
67531    #[doc = "Optional. Google Places identifier of the venue"]
67532    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67533    pub fn get_google_place_id<'a>(&'a self) -> Option<&'a str> {
67534        self.google_place_id.as_ref().map(|v| v.as_str())
67535    }
67536    #[allow(rustdoc::invalid_html_tags)]
67537    #[doc = "Optional. Google Places identifier of the venue"]
67538    #[allow(clippy::needless_lifetimes)]
67539    pub fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self {
67540        self.google_place_id = google_place_id;
67541        self
67542    }
67543    #[allow(rustdoc::invalid_html_tags)]
67544    #[doc = "Optional. Google Places identifier of the venue"]
67545    fn rhai_get_google_place_id(&mut self) -> Option<String> {
67546        self.google_place_id.as_ref().cloned()
67547    }
67548    #[allow(rustdoc::invalid_html_tags)]
67549    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
67550    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67551    pub fn get_google_place_type<'a>(&'a self) -> Option<&'a str> {
67552        self.google_place_type.as_ref().map(|v| v.as_str())
67553    }
67554    #[allow(rustdoc::invalid_html_tags)]
67555    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
67556    #[allow(clippy::needless_lifetimes)]
67557    pub fn set_google_place_type<'a>(
67558        &'a mut self,
67559        google_place_type: Option<String>,
67560    ) -> &'a mut Self {
67561        self.google_place_type = google_place_type;
67562        self
67563    }
67564    #[allow(rustdoc::invalid_html_tags)]
67565    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
67566    fn rhai_get_google_place_type(&mut self) -> Option<String> {
67567        self.google_place_type.as_ref().cloned()
67568    }
67569}
67570#[allow(dead_code)]
67571impl UniqueGiftSymbol {
67572    #[allow(clippy::too_many_arguments)]
67573    pub fn new<A: Into<Sticker>>(name: String, sticker: A, rarity_per_mille: i64) -> Self {
67574        Self {
67575            name,
67576            sticker: BoxWrapper::new_unbox(sticker.into()),
67577            rarity_per_mille,
67578        }
67579    }
67580    #[allow(rustdoc::invalid_html_tags)]
67581    #[doc = "Name of the symbol"]
67582    #[allow(clippy::needless_lifetimes)]
67583    pub fn get_name<'a>(&'a self) -> &'a str {
67584        self.name.as_str()
67585    }
67586    #[allow(rustdoc::invalid_html_tags)]
67587    #[doc = "Name of the symbol"]
67588    #[allow(clippy::needless_lifetimes)]
67589    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
67590        self.name = name;
67591        self
67592    }
67593    #[allow(rustdoc::invalid_html_tags)]
67594    #[doc = "Name of the symbol"]
67595    fn rhai_get_name(&mut self) -> String {
67596        self.name.clone()
67597    }
67598    #[allow(rustdoc::invalid_html_tags)]
67599    #[doc = "The sticker that represents the unique gift"]
67600    #[allow(clippy::needless_lifetimes)]
67601    pub fn get_sticker<'a>(&'a self) -> &'a Sticker {
67602        &self.sticker
67603    }
67604    #[allow(rustdoc::invalid_html_tags)]
67605    #[doc = "The sticker that represents the unique gift"]
67606    #[allow(clippy::needless_lifetimes)]
67607    pub fn set_sticker<'a>(&'a mut self, sticker: Sticker) -> &'a mut Self {
67608        self.sticker = BoxWrapper(Unbox(sticker));
67609        self
67610    }
67611    #[allow(rustdoc::invalid_html_tags)]
67612    #[doc = "The sticker that represents the unique gift"]
67613    fn rhai_get_sticker(&mut self) -> Sticker {
67614        self.sticker.clone().into()
67615    }
67616    #[allow(rustdoc::invalid_html_tags)]
67617    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
67618    #[allow(clippy::needless_lifetimes)]
67619    pub fn get_rarity_per_mille<'a>(&'a self) -> i64 {
67620        self.rarity_per_mille
67621    }
67622    #[allow(rustdoc::invalid_html_tags)]
67623    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
67624    #[allow(clippy::needless_lifetimes)]
67625    pub fn set_rarity_per_mille<'a>(&'a mut self, rarity_per_mille: i64) -> &'a mut Self {
67626        self.rarity_per_mille = rarity_per_mille;
67627        self
67628    }
67629    #[allow(rustdoc::invalid_html_tags)]
67630    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
67631    fn rhai_get_rarity_per_mille(&mut self) -> i64 {
67632        self.rarity_per_mille
67633    }
67634}
67635#[allow(dead_code)]
67636impl InputChecklistTask {
67637    #[allow(clippy::too_many_arguments)]
67638    pub fn new(id: i64, text: String) -> Self {
67639        Self {
67640            id,
67641            text,
67642            parse_mode: None,
67643            text_entities: None,
67644        }
67645    }
67646    #[allow(rustdoc::invalid_html_tags)]
67647    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
67648    #[allow(clippy::needless_lifetimes)]
67649    pub fn get_id<'a>(&'a self) -> i64 {
67650        self.id
67651    }
67652    #[allow(rustdoc::invalid_html_tags)]
67653    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
67654    #[allow(clippy::needless_lifetimes)]
67655    pub fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self {
67656        self.id = id;
67657        self
67658    }
67659    #[allow(rustdoc::invalid_html_tags)]
67660    #[doc = "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist"]
67661    fn rhai_get_id(&mut self) -> i64 {
67662        self.id
67663    }
67664    #[allow(rustdoc::invalid_html_tags)]
67665    #[doc = "Text of the task; 1-100 characters after entities parsing"]
67666    #[allow(clippy::needless_lifetimes)]
67667    pub fn get_text<'a>(&'a self) -> &'a str {
67668        self.text.as_str()
67669    }
67670    #[allow(rustdoc::invalid_html_tags)]
67671    #[doc = "Text of the task; 1-100 characters after entities parsing"]
67672    #[allow(clippy::needless_lifetimes)]
67673    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
67674        self.text = text;
67675        self
67676    }
67677    #[allow(rustdoc::invalid_html_tags)]
67678    #[doc = "Text of the task; 1-100 characters after entities parsing"]
67679    fn rhai_get_text(&mut self) -> String {
67680        self.text.clone()
67681    }
67682    #[allow(rustdoc::invalid_html_tags)]
67683    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
67684    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67685    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
67686        self.parse_mode.as_ref().map(|v| v.as_str())
67687    }
67688    #[allow(rustdoc::invalid_html_tags)]
67689    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
67690    #[allow(clippy::needless_lifetimes)]
67691    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
67692        self.parse_mode = parse_mode;
67693        self
67694    }
67695    #[allow(rustdoc::invalid_html_tags)]
67696    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details."]
67697    fn rhai_get_parse_mode(&mut self) -> Option<String> {
67698        self.parse_mode.as_ref().cloned()
67699    }
67700    #[allow(rustdoc::invalid_html_tags)]
67701    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
67702    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67703    pub fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
67704        self.text_entities.as_ref()
67705    }
67706    #[allow(rustdoc::invalid_html_tags)]
67707    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
67708    #[allow(clippy::needless_lifetimes)]
67709    pub fn set_text_entities<'a>(
67710        &'a mut self,
67711        text_entities: Option<Vec<MessageEntity>>,
67712    ) -> &'a mut Self {
67713        self.text_entities = text_entities;
67714        self
67715    }
67716    #[allow(rustdoc::invalid_html_tags)]
67717    #[doc = "Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
67718    fn rhai_get_text_entities(&mut self) -> Option<Vec<MessageEntity>> {
67719        self.text_entities.as_ref().cloned()
67720    }
67721}
67722#[allow(dead_code)]
67723impl PaidMessagePriceChanged {
67724    #[allow(clippy::too_many_arguments)]
67725    pub fn new(paid_message_star_count: i64) -> Self {
67726        Self {
67727            paid_message_star_count,
67728        }
67729    }
67730    #[allow(rustdoc::invalid_html_tags)]
67731    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
67732    #[allow(clippy::needless_lifetimes)]
67733    pub fn get_paid_message_star_count<'a>(&'a self) -> i64 {
67734        self.paid_message_star_count
67735    }
67736    #[allow(rustdoc::invalid_html_tags)]
67737    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
67738    #[allow(clippy::needless_lifetimes)]
67739    pub fn set_paid_message_star_count<'a>(
67740        &'a mut self,
67741        paid_message_star_count: i64,
67742    ) -> &'a mut Self {
67743        self.paid_message_star_count = paid_message_star_count;
67744        self
67745    }
67746    #[allow(rustdoc::invalid_html_tags)]
67747    #[doc = "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message"]
67748    fn rhai_get_paid_message_star_count(&mut self) -> i64 {
67749        self.paid_message_star_count
67750    }
67751}
67752impl TraitTransactionPartnerUser for TransactionPartnerUser {
67753    #[allow(rustdoc::invalid_html_tags)]
67754    #[doc = "Type of the transaction partner, always \"user\""]
67755    #[allow(clippy::needless_lifetimes)]
67756    fn get_tg_type<'a>(&'a self) -> &'a str {
67757        self.tg_type.as_str()
67758    }
67759    #[allow(rustdoc::invalid_html_tags)]
67760    #[doc = "Type of the transaction partner, always \"user\""]
67761    #[allow(clippy::needless_lifetimes)]
67762    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
67763        self.tg_type = tg_type;
67764        self
67765    }
67766    #[allow(rustdoc::invalid_html_tags)]
67767    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
67768    #[allow(clippy::needless_lifetimes)]
67769    fn get_transaction_type<'a>(&'a self) -> &'a str {
67770        self.transaction_type.as_str()
67771    }
67772    #[allow(rustdoc::invalid_html_tags)]
67773    #[doc = "Type of the transaction, currently one of \"invoice_payment\" for payments via invoices, \"paid_media_payment\" for payments for paid media, \"gift_purchase\" for gifts sent by the bot, \"premium_purchase\" for Telegram Premium subscriptions gifted by the bot, \"business_account_transfer\" for direct transfers from managed business accounts"]
67774    #[allow(clippy::needless_lifetimes)]
67775    fn set_transaction_type<'a>(&'a mut self, transaction_type: String) -> &'a mut Self {
67776        self.transaction_type = transaction_type;
67777        self
67778    }
67779    #[allow(rustdoc::invalid_html_tags)]
67780    #[doc = "Information about the user"]
67781    #[allow(clippy::needless_lifetimes)]
67782    fn get_user<'a>(&'a self) -> &'a User {
67783        &self.user
67784    }
67785    #[allow(rustdoc::invalid_html_tags)]
67786    #[doc = "Information about the user"]
67787    #[allow(clippy::needless_lifetimes)]
67788    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
67789        self.user = BoxWrapper(Unbox(user));
67790        self
67791    }
67792    #[allow(rustdoc::invalid_html_tags)]
67793    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
67794    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67795    fn get_affiliate<'a>(&'a self) -> Option<&'a AffiliateInfo> {
67796        self.affiliate.as_ref().map(|v| v.inner_ref())
67797    }
67798    #[allow(rustdoc::invalid_html_tags)]
67799    #[doc = "Optional. Information about the affiliate that received a commission via this transaction. Can be available only for \"invoice_payment\" and \"paid_media_payment\" transactions."]
67800    #[allow(clippy::needless_lifetimes)]
67801    fn set_affiliate<'a>(&'a mut self, affiliate: Option<AffiliateInfo>) -> &'a mut Self {
67802        self.affiliate = affiliate.map(|affiliate| BoxWrapper(Unbox(affiliate)));
67803        self
67804    }
67805    #[allow(rustdoc::invalid_html_tags)]
67806    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
67807    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67808    fn get_invoice_payload<'a>(&'a self) -> Option<&'a str> {
67809        self.invoice_payload.as_ref().map(|v| v.as_str())
67810    }
67811    #[allow(rustdoc::invalid_html_tags)]
67812    #[doc = "Optional. Bot-specified invoice payload. Can be available only for \"invoice_payment\" transactions."]
67813    #[allow(clippy::needless_lifetimes)]
67814    fn set_invoice_payload<'a>(&'a mut self, invoice_payload: Option<String>) -> &'a mut Self {
67815        self.invoice_payload = invoice_payload;
67816        self
67817    }
67818    #[allow(rustdoc::invalid_html_tags)]
67819    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
67820    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67821    fn get_subscription_period<'a>(&'a self) -> Option<i64> {
67822        self.subscription_period.as_ref().map(|v| *v)
67823    }
67824    #[allow(rustdoc::invalid_html_tags)]
67825    #[doc = "Optional. The duration of the paid subscription. Can be available only for \"invoice_payment\" transactions."]
67826    #[allow(clippy::needless_lifetimes)]
67827    fn set_subscription_period<'a>(&'a mut self, subscription_period: Option<i64>) -> &'a mut Self {
67828        self.subscription_period = subscription_period;
67829        self
67830    }
67831    #[allow(rustdoc::invalid_html_tags)]
67832    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
67833    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67834    fn get_paid_media<'a>(&'a self) -> Option<&'a Vec<PaidMedia>> {
67835        self.paid_media.as_ref()
67836    }
67837    #[allow(rustdoc::invalid_html_tags)]
67838    #[doc = "Optional. Information about the paid media bought by the user; for \"paid_media_payment\" transactions only"]
67839    #[allow(clippy::needless_lifetimes)]
67840    fn set_paid_media<'a>(&'a mut self, paid_media: Option<Vec<PaidMedia>>) -> &'a mut Self {
67841        self.paid_media = paid_media;
67842        self
67843    }
67844    #[allow(rustdoc::invalid_html_tags)]
67845    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
67846    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67847    fn get_paid_media_payload<'a>(&'a self) -> Option<&'a str> {
67848        self.paid_media_payload.as_ref().map(|v| v.as_str())
67849    }
67850    #[allow(rustdoc::invalid_html_tags)]
67851    #[doc = "Optional. Bot-specified paid media payload. Can be available only for \"paid_media_payment\" transactions."]
67852    #[allow(clippy::needless_lifetimes)]
67853    fn set_paid_media_payload<'a>(
67854        &'a mut self,
67855        paid_media_payload: Option<String>,
67856    ) -> &'a mut Self {
67857        self.paid_media_payload = paid_media_payload;
67858        self
67859    }
67860    #[allow(rustdoc::invalid_html_tags)]
67861    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
67862    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67863    fn get_gift<'a>(&'a self) -> Option<&'a Gift> {
67864        self.gift.as_ref().map(|v| v.inner_ref())
67865    }
67866    #[allow(rustdoc::invalid_html_tags)]
67867    #[doc = "Optional. The gift sent to the user by the bot; for \"gift_purchase\" transactions only"]
67868    #[allow(clippy::needless_lifetimes)]
67869    fn set_gift<'a>(&'a mut self, gift: Option<Gift>) -> &'a mut Self {
67870        self.gift = gift.map(|gift| BoxWrapper(Unbox(gift)));
67871        self
67872    }
67873    #[allow(rustdoc::invalid_html_tags)]
67874    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
67875    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67876    fn get_premium_subscription_duration<'a>(&'a self) -> Option<i64> {
67877        self.premium_subscription_duration.as_ref().map(|v| *v)
67878    }
67879    #[allow(rustdoc::invalid_html_tags)]
67880    #[doc = "Optional. Number of months the gifted Telegram Premium subscription will be active for; for \"premium_purchase\" transactions only"]
67881    #[allow(clippy::needless_lifetimes)]
67882    fn set_premium_subscription_duration<'a>(
67883        &'a mut self,
67884        premium_subscription_duration: Option<i64>,
67885    ) -> &'a mut Self {
67886        self.premium_subscription_duration = premium_subscription_duration;
67887        self
67888    }
67889}
67890impl TraitTransactionPartnerChat for TransactionPartnerChat {
67891    #[allow(rustdoc::invalid_html_tags)]
67892    #[doc = "Type of the transaction partner, always \"chat\""]
67893    #[allow(clippy::needless_lifetimes)]
67894    fn get_tg_type<'a>(&'a self) -> &'a str {
67895        self.tg_type.as_str()
67896    }
67897    #[allow(rustdoc::invalid_html_tags)]
67898    #[doc = "Type of the transaction partner, always \"chat\""]
67899    #[allow(clippy::needless_lifetimes)]
67900    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
67901        self.tg_type = tg_type;
67902        self
67903    }
67904    #[allow(rustdoc::invalid_html_tags)]
67905    #[doc = "Information about the chat"]
67906    #[allow(clippy::needless_lifetimes)]
67907    fn get_chat<'a>(&'a self) -> &'a Chat {
67908        &self.chat
67909    }
67910    #[allow(rustdoc::invalid_html_tags)]
67911    #[doc = "Information about the chat"]
67912    #[allow(clippy::needless_lifetimes)]
67913    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
67914        self.chat = BoxWrapper(Unbox(chat));
67915        self
67916    }
67917    #[allow(rustdoc::invalid_html_tags)]
67918    #[doc = "Optional. The gift sent to the chat by the bot"]
67919    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67920    fn get_gift<'a>(&'a self) -> Option<&'a Gift> {
67921        self.gift.as_ref().map(|v| v.inner_ref())
67922    }
67923    #[allow(rustdoc::invalid_html_tags)]
67924    #[doc = "Optional. The gift sent to the chat by the bot"]
67925    #[allow(clippy::needless_lifetimes)]
67926    fn set_gift<'a>(&'a mut self, gift: Option<Gift>) -> &'a mut Self {
67927        self.gift = gift.map(|gift| BoxWrapper(Unbox(gift)));
67928        self
67929    }
67930}
67931impl TraitTransactionPartnerAffiliateProgram for TransactionPartnerAffiliateProgram {
67932    #[allow(rustdoc::invalid_html_tags)]
67933    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
67934    #[allow(clippy::needless_lifetimes)]
67935    fn get_tg_type<'a>(&'a self) -> &'a str {
67936        self.tg_type.as_str()
67937    }
67938    #[allow(rustdoc::invalid_html_tags)]
67939    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
67940    #[allow(clippy::needless_lifetimes)]
67941    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
67942        self.tg_type = tg_type;
67943        self
67944    }
67945    #[allow(rustdoc::invalid_html_tags)]
67946    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
67947    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67948    fn get_sponsor_user<'a>(&'a self) -> Option<&'a User> {
67949        self.sponsor_user.as_ref().map(|v| v.inner_ref())
67950    }
67951    #[allow(rustdoc::invalid_html_tags)]
67952    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
67953    #[allow(clippy::needless_lifetimes)]
67954    fn set_sponsor_user<'a>(&'a mut self, sponsor_user: Option<User>) -> &'a mut Self {
67955        self.sponsor_user = sponsor_user.map(|sponsor_user| BoxWrapper(Unbox(sponsor_user)));
67956        self
67957    }
67958    #[allow(rustdoc::invalid_html_tags)]
67959    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
67960    #[allow(clippy::needless_lifetimes)]
67961    fn get_commission_per_mille<'a>(&'a self) -> i64 {
67962        self.commission_per_mille
67963    }
67964    #[allow(rustdoc::invalid_html_tags)]
67965    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
67966    #[allow(clippy::needless_lifetimes)]
67967    fn set_commission_per_mille<'a>(&'a mut self, commission_per_mille: i64) -> &'a mut Self {
67968        self.commission_per_mille = commission_per_mille;
67969        self
67970    }
67971}
67972impl TraitTransactionPartnerFragment for TransactionPartnerFragment {
67973    #[allow(rustdoc::invalid_html_tags)]
67974    #[doc = "Type of the transaction partner, always \"fragment\""]
67975    #[allow(clippy::needless_lifetimes)]
67976    fn get_tg_type<'a>(&'a self) -> &'a str {
67977        self.tg_type.as_str()
67978    }
67979    #[allow(rustdoc::invalid_html_tags)]
67980    #[doc = "Type of the transaction partner, always \"fragment\""]
67981    #[allow(clippy::needless_lifetimes)]
67982    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
67983        self.tg_type = tg_type;
67984        self
67985    }
67986    #[allow(rustdoc::invalid_html_tags)]
67987    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
67988    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
67989    fn get_withdrawal_state<'a>(&'a self) -> Option<&'a RevenueWithdrawalState> {
67990        self.withdrawal_state.as_ref().map(|v| v.inner_ref())
67991    }
67992    #[allow(rustdoc::invalid_html_tags)]
67993    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
67994    #[allow(clippy::needless_lifetimes)]
67995    fn set_withdrawal_state<'a>(
67996        &'a mut self,
67997        withdrawal_state: Option<RevenueWithdrawalState>,
67998    ) -> &'a mut Self {
67999        self.withdrawal_state =
68000            withdrawal_state.map(|withdrawal_state| BoxWrapper(Unbox(withdrawal_state)));
68001        self
68002    }
68003}
68004impl TraitTransactionPartnerTelegramAds for TransactionPartnerTelegramAds {
68005    #[allow(rustdoc::invalid_html_tags)]
68006    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
68007    #[allow(clippy::needless_lifetimes)]
68008    fn get_tg_type<'a>(&'a self) -> &'a str {
68009        self.tg_type.as_str()
68010    }
68011    #[allow(rustdoc::invalid_html_tags)]
68012    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
68013    #[allow(clippy::needless_lifetimes)]
68014    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
68015        self.tg_type = tg_type;
68016        self
68017    }
68018}
68019impl TraitTransactionPartnerTelegramApi for TransactionPartnerTelegramApi {
68020    #[allow(rustdoc::invalid_html_tags)]
68021    #[doc = "Type of the transaction partner, always \"telegram_api\""]
68022    #[allow(clippy::needless_lifetimes)]
68023    fn get_tg_type<'a>(&'a self) -> &'a str {
68024        self.tg_type.as_str()
68025    }
68026    #[allow(rustdoc::invalid_html_tags)]
68027    #[doc = "Type of the transaction partner, always \"telegram_api\""]
68028    #[allow(clippy::needless_lifetimes)]
68029    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
68030        self.tg_type = tg_type;
68031        self
68032    }
68033    #[allow(rustdoc::invalid_html_tags)]
68034    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
68035    #[allow(clippy::needless_lifetimes)]
68036    fn get_request_count<'a>(&'a self) -> i64 {
68037        self.request_count
68038    }
68039    #[allow(rustdoc::invalid_html_tags)]
68040    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
68041    #[allow(clippy::needless_lifetimes)]
68042    fn set_request_count<'a>(&'a mut self, request_count: i64) -> &'a mut Self {
68043        self.request_count = request_count;
68044        self
68045    }
68046}
68047impl TraitTransactionPartnerOther for TransactionPartnerOther {
68048    #[allow(rustdoc::invalid_html_tags)]
68049    #[doc = "Type of the transaction partner, always \"other\""]
68050    #[allow(clippy::needless_lifetimes)]
68051    fn get_tg_type<'a>(&'a self) -> &'a str {
68052        self.tg_type.as_str()
68053    }
68054    #[allow(rustdoc::invalid_html_tags)]
68055    #[doc = "Type of the transaction partner, always \"other\""]
68056    #[allow(clippy::needless_lifetimes)]
68057    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
68058        self.tg_type = tg_type;
68059        self
68060    }
68061}
68062#[allow(dead_code)]
68063impl MessageReactionCountUpdated {
68064    #[allow(clippy::too_many_arguments)]
68065    pub fn new<A: Into<Chat>>(
68066        chat: A,
68067        message_id: i64,
68068        date: i64,
68069        reactions: Vec<ReactionCount>,
68070    ) -> Self {
68071        Self {
68072            chat: BoxWrapper::new_unbox(chat.into()),
68073            message_id,
68074            date,
68075            reactions,
68076        }
68077    }
68078    #[allow(rustdoc::invalid_html_tags)]
68079    #[doc = "The chat containing the message"]
68080    #[allow(clippy::needless_lifetimes)]
68081    pub fn get_chat<'a>(&'a self) -> &'a Chat {
68082        &self.chat
68083    }
68084    #[allow(rustdoc::invalid_html_tags)]
68085    #[doc = "The chat containing the message"]
68086    #[allow(clippy::needless_lifetimes)]
68087    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
68088        self.chat = BoxWrapper(Unbox(chat));
68089        self
68090    }
68091    #[allow(rustdoc::invalid_html_tags)]
68092    #[doc = "The chat containing the message"]
68093    fn rhai_get_chat(&mut self) -> Chat {
68094        self.chat.clone().into()
68095    }
68096    #[allow(rustdoc::invalid_html_tags)]
68097    #[doc = "Unique message identifier inside the chat"]
68098    #[allow(clippy::needless_lifetimes)]
68099    pub fn get_message_id<'a>(&'a self) -> i64 {
68100        self.message_id
68101    }
68102    #[allow(rustdoc::invalid_html_tags)]
68103    #[doc = "Unique message identifier inside the chat"]
68104    #[allow(clippy::needless_lifetimes)]
68105    pub fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
68106        self.message_id = message_id;
68107        self
68108    }
68109    #[allow(rustdoc::invalid_html_tags)]
68110    #[doc = "Unique message identifier inside the chat"]
68111    fn rhai_get_message_id(&mut self) -> i64 {
68112        self.message_id
68113    }
68114    #[allow(rustdoc::invalid_html_tags)]
68115    #[doc = "Date of the change in Unix time"]
68116    #[allow(clippy::needless_lifetimes)]
68117    pub fn get_date<'a>(&'a self) -> i64 {
68118        self.date
68119    }
68120    #[allow(rustdoc::invalid_html_tags)]
68121    #[doc = "Date of the change in Unix time"]
68122    #[allow(clippy::needless_lifetimes)]
68123    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
68124        self.date = date;
68125        self
68126    }
68127    #[allow(rustdoc::invalid_html_tags)]
68128    #[doc = "Date of the change in Unix time"]
68129    fn rhai_get_date(&mut self) -> i64 {
68130        self.date
68131    }
68132    #[allow(rustdoc::invalid_html_tags)]
68133    #[doc = "List of reactions that are present on the message"]
68134    #[allow(clippy::needless_lifetimes)]
68135    pub fn get_reactions<'a>(&'a self) -> &'a Vec<ReactionCount> {
68136        &self.reactions
68137    }
68138    #[allow(rustdoc::invalid_html_tags)]
68139    #[doc = "List of reactions that are present on the message"]
68140    #[allow(clippy::needless_lifetimes)]
68141    pub fn set_reactions<'a>(&'a mut self, reactions: Vec<ReactionCount>) -> &'a mut Self {
68142        self.reactions = reactions;
68143        self
68144    }
68145    #[allow(rustdoc::invalid_html_tags)]
68146    #[doc = "List of reactions that are present on the message"]
68147    fn rhai_get_reactions(&mut self) -> Vec<ReactionCount> {
68148        self.reactions.clone()
68149    }
68150}
68151#[allow(dead_code)]
68152impl Location {
68153    #[allow(clippy::too_many_arguments)]
68154    pub fn new(
68155        latitude: ::ordered_float::OrderedFloat<f64>,
68156        longitude: ::ordered_float::OrderedFloat<f64>,
68157    ) -> Self {
68158        Self {
68159            latitude,
68160            longitude,
68161            horizontal_accuracy: None,
68162            live_period: None,
68163            heading: None,
68164            proximity_alert_radius: None,
68165        }
68166    }
68167    #[allow(rustdoc::invalid_html_tags)]
68168    #[doc = "Latitude as defined by the sender"]
68169    #[allow(clippy::needless_lifetimes)]
68170    pub fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
68171        self.latitude
68172    }
68173    #[allow(rustdoc::invalid_html_tags)]
68174    #[doc = "Latitude as defined by the sender"]
68175    #[allow(clippy::needless_lifetimes)]
68176    pub fn set_latitude<'a>(
68177        &'a mut self,
68178        latitude: ::ordered_float::OrderedFloat<f64>,
68179    ) -> &'a mut Self {
68180        self.latitude = latitude;
68181        self
68182    }
68183    #[allow(rustdoc::invalid_html_tags)]
68184    #[doc = "Latitude as defined by the sender"]
68185    fn rhai_get_latitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
68186        self.latitude
68187    }
68188    #[allow(rustdoc::invalid_html_tags)]
68189    #[doc = "Longitude as defined by the sender"]
68190    #[allow(clippy::needless_lifetimes)]
68191    pub fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
68192        self.longitude
68193    }
68194    #[allow(rustdoc::invalid_html_tags)]
68195    #[doc = "Longitude as defined by the sender"]
68196    #[allow(clippy::needless_lifetimes)]
68197    pub fn set_longitude<'a>(
68198        &'a mut self,
68199        longitude: ::ordered_float::OrderedFloat<f64>,
68200    ) -> &'a mut Self {
68201        self.longitude = longitude;
68202        self
68203    }
68204    #[allow(rustdoc::invalid_html_tags)]
68205    #[doc = "Longitude as defined by the sender"]
68206    fn rhai_get_longitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
68207        self.longitude
68208    }
68209    #[allow(rustdoc::invalid_html_tags)]
68210    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
68211    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68212    pub fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
68213        self.horizontal_accuracy.as_ref().map(|v| *v)
68214    }
68215    #[allow(rustdoc::invalid_html_tags)]
68216    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
68217    #[allow(clippy::needless_lifetimes)]
68218    pub fn set_horizontal_accuracy<'a>(
68219        &'a mut self,
68220        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
68221    ) -> &'a mut Self {
68222        self.horizontal_accuracy = horizontal_accuracy;
68223        self
68224    }
68225    #[allow(rustdoc::invalid_html_tags)]
68226    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
68227    fn rhai_get_horizontal_accuracy(&mut self) -> Option<::ordered_float::OrderedFloat<f64>> {
68228        self.horizontal_accuracy.as_ref().copied()
68229    }
68230    #[allow(rustdoc::invalid_html_tags)]
68231    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
68232    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68233    pub fn get_live_period<'a>(&'a self) -> Option<i64> {
68234        self.live_period.as_ref().map(|v| *v)
68235    }
68236    #[allow(rustdoc::invalid_html_tags)]
68237    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
68238    #[allow(clippy::needless_lifetimes)]
68239    pub fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self {
68240        self.live_period = live_period;
68241        self
68242    }
68243    #[allow(rustdoc::invalid_html_tags)]
68244    #[doc = "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only."]
68245    fn rhai_get_live_period(&mut self) -> Option<i64> {
68246        self.live_period.as_ref().copied()
68247    }
68248    #[allow(rustdoc::invalid_html_tags)]
68249    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
68250    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68251    pub fn get_heading<'a>(&'a self) -> Option<i64> {
68252        self.heading.as_ref().map(|v| *v)
68253    }
68254    #[allow(rustdoc::invalid_html_tags)]
68255    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
68256    #[allow(clippy::needless_lifetimes)]
68257    pub fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self {
68258        self.heading = heading;
68259        self
68260    }
68261    #[allow(rustdoc::invalid_html_tags)]
68262    #[doc = "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only."]
68263    fn rhai_get_heading(&mut self) -> Option<i64> {
68264        self.heading.as_ref().copied()
68265    }
68266    #[allow(rustdoc::invalid_html_tags)]
68267    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
68268    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68269    pub fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64> {
68270        self.proximity_alert_radius.as_ref().map(|v| *v)
68271    }
68272    #[allow(rustdoc::invalid_html_tags)]
68273    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
68274    #[allow(clippy::needless_lifetimes)]
68275    pub fn set_proximity_alert_radius<'a>(
68276        &'a mut self,
68277        proximity_alert_radius: Option<i64>,
68278    ) -> &'a mut Self {
68279        self.proximity_alert_radius = proximity_alert_radius;
68280        self
68281    }
68282    #[allow(rustdoc::invalid_html_tags)]
68283    #[doc = "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only."]
68284    fn rhai_get_proximity_alert_radius(&mut self) -> Option<i64> {
68285        self.proximity_alert_radius.as_ref().copied()
68286    }
68287}
68288#[allow(dead_code)]
68289impl GameHighScore {
68290    #[allow(clippy::too_many_arguments)]
68291    pub fn new<A: Into<User>>(position: i64, user: A, score: i64) -> Self {
68292        Self {
68293            position,
68294            user: BoxWrapper::new_unbox(user.into()),
68295            score,
68296        }
68297    }
68298    #[allow(rustdoc::invalid_html_tags)]
68299    #[doc = "Position in high score table for the game"]
68300    #[allow(clippy::needless_lifetimes)]
68301    pub fn get_position<'a>(&'a self) -> i64 {
68302        self.position
68303    }
68304    #[allow(rustdoc::invalid_html_tags)]
68305    #[doc = "Position in high score table for the game"]
68306    #[allow(clippy::needless_lifetimes)]
68307    pub fn set_position<'a>(&'a mut self, position: i64) -> &'a mut Self {
68308        self.position = position;
68309        self
68310    }
68311    #[allow(rustdoc::invalid_html_tags)]
68312    #[doc = "Position in high score table for the game"]
68313    fn rhai_get_position(&mut self) -> i64 {
68314        self.position
68315    }
68316    #[allow(rustdoc::invalid_html_tags)]
68317    #[doc = "User"]
68318    #[allow(clippy::needless_lifetimes)]
68319    pub fn get_user<'a>(&'a self) -> &'a User {
68320        &self.user
68321    }
68322    #[allow(rustdoc::invalid_html_tags)]
68323    #[doc = "User"]
68324    #[allow(clippy::needless_lifetimes)]
68325    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
68326        self.user = BoxWrapper(Unbox(user));
68327        self
68328    }
68329    #[allow(rustdoc::invalid_html_tags)]
68330    #[doc = "User"]
68331    fn rhai_get_user(&mut self) -> User {
68332        self.user.clone().into()
68333    }
68334    #[allow(rustdoc::invalid_html_tags)]
68335    #[doc = "Score"]
68336    #[allow(clippy::needless_lifetimes)]
68337    pub fn get_score<'a>(&'a self) -> i64 {
68338        self.score
68339    }
68340    #[allow(rustdoc::invalid_html_tags)]
68341    #[doc = "Score"]
68342    #[allow(clippy::needless_lifetimes)]
68343    pub fn set_score<'a>(&'a mut self, score: i64) -> &'a mut Self {
68344        self.score = score;
68345        self
68346    }
68347    #[allow(rustdoc::invalid_html_tags)]
68348    #[doc = "Score"]
68349    fn rhai_get_score(&mut self) -> i64 {
68350        self.score
68351    }
68352}
68353#[allow(dead_code)]
68354impl MessageReactionUpdated {
68355    #[allow(clippy::too_many_arguments)]
68356    pub fn new<A: Into<Chat>>(
68357        chat: A,
68358        message_id: i64,
68359        date: i64,
68360        old_reaction: Vec<ReactionType>,
68361        new_reaction: Vec<ReactionType>,
68362    ) -> Self {
68363        Self {
68364            chat: BoxWrapper::new_unbox(chat.into()),
68365            message_id,
68366            date,
68367            old_reaction,
68368            new_reaction,
68369            user: None,
68370            actor_chat: None,
68371        }
68372    }
68373    #[allow(rustdoc::invalid_html_tags)]
68374    #[doc = "The chat containing the message the user reacted to"]
68375    #[allow(clippy::needless_lifetimes)]
68376    pub fn get_chat<'a>(&'a self) -> &'a Chat {
68377        &self.chat
68378    }
68379    #[allow(rustdoc::invalid_html_tags)]
68380    #[doc = "The chat containing the message the user reacted to"]
68381    #[allow(clippy::needless_lifetimes)]
68382    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
68383        self.chat = BoxWrapper(Unbox(chat));
68384        self
68385    }
68386    #[allow(rustdoc::invalid_html_tags)]
68387    #[doc = "The chat containing the message the user reacted to"]
68388    fn rhai_get_chat(&mut self) -> Chat {
68389        self.chat.clone().into()
68390    }
68391    #[allow(rustdoc::invalid_html_tags)]
68392    #[doc = "Unique identifier of the message inside the chat"]
68393    #[allow(clippy::needless_lifetimes)]
68394    pub fn get_message_id<'a>(&'a self) -> i64 {
68395        self.message_id
68396    }
68397    #[allow(rustdoc::invalid_html_tags)]
68398    #[doc = "Unique identifier of the message inside the chat"]
68399    #[allow(clippy::needless_lifetimes)]
68400    pub fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
68401        self.message_id = message_id;
68402        self
68403    }
68404    #[allow(rustdoc::invalid_html_tags)]
68405    #[doc = "Unique identifier of the message inside the chat"]
68406    fn rhai_get_message_id(&mut self) -> i64 {
68407        self.message_id
68408    }
68409    #[allow(rustdoc::invalid_html_tags)]
68410    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
68411    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68412    pub fn get_user<'a>(&'a self) -> Option<&'a User> {
68413        self.user.as_ref().map(|v| v.inner_ref())
68414    }
68415    #[allow(rustdoc::invalid_html_tags)]
68416    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
68417    #[allow(clippy::needless_lifetimes)]
68418    pub fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self {
68419        self.user = user.map(|user| BoxWrapper(Unbox(user)));
68420        self
68421    }
68422    #[allow(rustdoc::invalid_html_tags)]
68423    #[doc = "Optional. The user that changed the reaction, if the user isn't anonymous"]
68424    fn rhai_get_user(&mut self) -> Option<User> {
68425        self.user.as_ref().map(|v| v.clone().into())
68426    }
68427    #[allow(rustdoc::invalid_html_tags)]
68428    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
68429    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68430    pub fn get_actor_chat<'a>(&'a self) -> Option<&'a Chat> {
68431        self.actor_chat.as_ref().map(|v| v.inner_ref())
68432    }
68433    #[allow(rustdoc::invalid_html_tags)]
68434    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
68435    #[allow(clippy::needless_lifetimes)]
68436    pub fn set_actor_chat<'a>(&'a mut self, actor_chat: Option<Chat>) -> &'a mut Self {
68437        self.actor_chat = actor_chat.map(|actor_chat| BoxWrapper(Unbox(actor_chat)));
68438        self
68439    }
68440    #[allow(rustdoc::invalid_html_tags)]
68441    #[doc = "Optional. The chat on behalf of which the reaction was changed, if the user is anonymous"]
68442    fn rhai_get_actor_chat(&mut self) -> Option<Chat> {
68443        self.actor_chat.as_ref().map(|v| v.clone().into())
68444    }
68445    #[allow(rustdoc::invalid_html_tags)]
68446    #[doc = "Date of the change in Unix time"]
68447    #[allow(clippy::needless_lifetimes)]
68448    pub fn get_date<'a>(&'a self) -> i64 {
68449        self.date
68450    }
68451    #[allow(rustdoc::invalid_html_tags)]
68452    #[doc = "Date of the change in Unix time"]
68453    #[allow(clippy::needless_lifetimes)]
68454    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
68455        self.date = date;
68456        self
68457    }
68458    #[allow(rustdoc::invalid_html_tags)]
68459    #[doc = "Date of the change in Unix time"]
68460    fn rhai_get_date(&mut self) -> i64 {
68461        self.date
68462    }
68463    #[allow(rustdoc::invalid_html_tags)]
68464    #[doc = "Previous list of reaction types that were set by the user"]
68465    #[allow(clippy::needless_lifetimes)]
68466    pub fn get_old_reaction<'a>(&'a self) -> &'a Vec<ReactionType> {
68467        &self.old_reaction
68468    }
68469    #[allow(rustdoc::invalid_html_tags)]
68470    #[doc = "Previous list of reaction types that were set by the user"]
68471    #[allow(clippy::needless_lifetimes)]
68472    pub fn set_old_reaction<'a>(&'a mut self, old_reaction: Vec<ReactionType>) -> &'a mut Self {
68473        self.old_reaction = old_reaction;
68474        self
68475    }
68476    #[allow(rustdoc::invalid_html_tags)]
68477    #[doc = "Previous list of reaction types that were set by the user"]
68478    fn rhai_get_old_reaction(&mut self) -> Vec<ReactionType> {
68479        self.old_reaction.clone()
68480    }
68481    #[allow(rustdoc::invalid_html_tags)]
68482    #[doc = "New list of reaction types that have been set by the user"]
68483    #[allow(clippy::needless_lifetimes)]
68484    pub fn get_new_reaction<'a>(&'a self) -> &'a Vec<ReactionType> {
68485        &self.new_reaction
68486    }
68487    #[allow(rustdoc::invalid_html_tags)]
68488    #[doc = "New list of reaction types that have been set by the user"]
68489    #[allow(clippy::needless_lifetimes)]
68490    pub fn set_new_reaction<'a>(&'a mut self, new_reaction: Vec<ReactionType>) -> &'a mut Self {
68491        self.new_reaction = new_reaction;
68492        self
68493    }
68494    #[allow(rustdoc::invalid_html_tags)]
68495    #[doc = "New list of reaction types that have been set by the user"]
68496    fn rhai_get_new_reaction(&mut self) -> Vec<ReactionType> {
68497        self.new_reaction.clone()
68498    }
68499}
68500#[allow(dead_code)]
68501impl SuccessfulPayment {
68502    #[allow(clippy::too_many_arguments)]
68503    pub fn new(
68504        currency: String,
68505        total_amount: i64,
68506        invoice_payload: String,
68507        telegram_payment_charge_id: String,
68508        provider_payment_charge_id: String,
68509    ) -> Self {
68510        Self {
68511            currency,
68512            total_amount,
68513            invoice_payload,
68514            telegram_payment_charge_id,
68515            provider_payment_charge_id,
68516            subscription_expiration_date: None,
68517            is_recurring: None,
68518            is_first_recurring: None,
68519            shipping_option_id: None,
68520            order_info: None,
68521        }
68522    }
68523    #[allow(rustdoc::invalid_html_tags)]
68524    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
68525    #[allow(clippy::needless_lifetimes)]
68526    pub fn get_currency<'a>(&'a self) -> &'a str {
68527        self.currency.as_str()
68528    }
68529    #[allow(rustdoc::invalid_html_tags)]
68530    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
68531    #[allow(clippy::needless_lifetimes)]
68532    pub fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
68533        self.currency = currency;
68534        self
68535    }
68536    #[allow(rustdoc::invalid_html_tags)]
68537    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
68538    fn rhai_get_currency(&mut self) -> String {
68539        self.currency.clone()
68540    }
68541    #[allow(rustdoc::invalid_html_tags)]
68542    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
68543    #[allow(clippy::needless_lifetimes)]
68544    pub fn get_total_amount<'a>(&'a self) -> i64 {
68545        self.total_amount
68546    }
68547    #[allow(rustdoc::invalid_html_tags)]
68548    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
68549    #[allow(clippy::needless_lifetimes)]
68550    pub fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self {
68551        self.total_amount = total_amount;
68552        self
68553    }
68554    #[allow(rustdoc::invalid_html_tags)]
68555    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
68556    fn rhai_get_total_amount(&mut self) -> i64 {
68557        self.total_amount
68558    }
68559    #[allow(rustdoc::invalid_html_tags)]
68560    #[doc = "Bot-specified invoice payload"]
68561    #[allow(clippy::needless_lifetimes)]
68562    pub fn get_invoice_payload<'a>(&'a self) -> &'a str {
68563        self.invoice_payload.as_str()
68564    }
68565    #[allow(rustdoc::invalid_html_tags)]
68566    #[doc = "Bot-specified invoice payload"]
68567    #[allow(clippy::needless_lifetimes)]
68568    pub fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self {
68569        self.invoice_payload = invoice_payload;
68570        self
68571    }
68572    #[allow(rustdoc::invalid_html_tags)]
68573    #[doc = "Bot-specified invoice payload"]
68574    fn rhai_get_invoice_payload(&mut self) -> String {
68575        self.invoice_payload.clone()
68576    }
68577    #[allow(rustdoc::invalid_html_tags)]
68578    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
68579    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68580    pub fn get_subscription_expiration_date<'a>(&'a self) -> Option<i64> {
68581        self.subscription_expiration_date.as_ref().map(|v| *v)
68582    }
68583    #[allow(rustdoc::invalid_html_tags)]
68584    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
68585    #[allow(clippy::needless_lifetimes)]
68586    pub fn set_subscription_expiration_date<'a>(
68587        &'a mut self,
68588        subscription_expiration_date: Option<i64>,
68589    ) -> &'a mut Self {
68590        self.subscription_expiration_date = subscription_expiration_date;
68591        self
68592    }
68593    #[allow(rustdoc::invalid_html_tags)]
68594    #[doc = "Optional. Expiration date of the subscription, in Unix time; for recurring payments only"]
68595    fn rhai_get_subscription_expiration_date(&mut self) -> Option<i64> {
68596        self.subscription_expiration_date.as_ref().copied()
68597    }
68598    #[allow(rustdoc::invalid_html_tags)]
68599    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
68600    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68601    pub fn get_is_recurring<'a>(&'a self) -> Option<bool> {
68602        self.is_recurring.as_ref().map(|v| *v)
68603    }
68604    #[allow(rustdoc::invalid_html_tags)]
68605    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
68606    #[allow(clippy::needless_lifetimes)]
68607    pub fn set_is_recurring<'a>(&'a mut self, is_recurring: Option<bool>) -> &'a mut Self {
68608        self.is_recurring = is_recurring;
68609        self
68610    }
68611    #[allow(rustdoc::invalid_html_tags)]
68612    #[doc = "Optional. True, if the payment is a recurring payment for a subscription"]
68613    fn rhai_get_is_recurring(&mut self) -> Option<bool> {
68614        self.is_recurring.as_ref().copied()
68615    }
68616    #[allow(rustdoc::invalid_html_tags)]
68617    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
68618    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68619    pub fn get_is_first_recurring<'a>(&'a self) -> Option<bool> {
68620        self.is_first_recurring.as_ref().map(|v| *v)
68621    }
68622    #[allow(rustdoc::invalid_html_tags)]
68623    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
68624    #[allow(clippy::needless_lifetimes)]
68625    pub fn set_is_first_recurring<'a>(
68626        &'a mut self,
68627        is_first_recurring: Option<bool>,
68628    ) -> &'a mut Self {
68629        self.is_first_recurring = is_first_recurring;
68630        self
68631    }
68632    #[allow(rustdoc::invalid_html_tags)]
68633    #[doc = "Optional. True, if the payment is the first payment for a subscription"]
68634    fn rhai_get_is_first_recurring(&mut self) -> Option<bool> {
68635        self.is_first_recurring.as_ref().copied()
68636    }
68637    #[allow(rustdoc::invalid_html_tags)]
68638    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
68639    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68640    pub fn get_shipping_option_id<'a>(&'a self) -> Option<&'a str> {
68641        self.shipping_option_id.as_ref().map(|v| v.as_str())
68642    }
68643    #[allow(rustdoc::invalid_html_tags)]
68644    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
68645    #[allow(clippy::needless_lifetimes)]
68646    pub fn set_shipping_option_id<'a>(
68647        &'a mut self,
68648        shipping_option_id: Option<String>,
68649    ) -> &'a mut Self {
68650        self.shipping_option_id = shipping_option_id;
68651        self
68652    }
68653    #[allow(rustdoc::invalid_html_tags)]
68654    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
68655    fn rhai_get_shipping_option_id(&mut self) -> Option<String> {
68656        self.shipping_option_id.as_ref().cloned()
68657    }
68658    #[allow(rustdoc::invalid_html_tags)]
68659    #[doc = "Optional. Order information provided by the user"]
68660    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68661    pub fn get_order_info<'a>(&'a self) -> Option<&'a OrderInfo> {
68662        self.order_info.as_ref().map(|v| v.inner_ref())
68663    }
68664    #[allow(rustdoc::invalid_html_tags)]
68665    #[doc = "Optional. Order information provided by the user"]
68666    #[allow(clippy::needless_lifetimes)]
68667    pub fn set_order_info<'a>(&'a mut self, order_info: Option<OrderInfo>) -> &'a mut Self {
68668        self.order_info = order_info.map(|order_info| BoxWrapper(Box::new(order_info)));
68669        self
68670    }
68671    #[allow(rustdoc::invalid_html_tags)]
68672    #[doc = "Optional. Order information provided by the user"]
68673    fn rhai_get_order_info(&mut self) -> Option<OrderInfo> {
68674        self.order_info.as_ref().map(|v| v.clone().into())
68675    }
68676    #[allow(rustdoc::invalid_html_tags)]
68677    #[doc = "Telegram payment identifier"]
68678    #[allow(clippy::needless_lifetimes)]
68679    pub fn get_telegram_payment_charge_id<'a>(&'a self) -> &'a str {
68680        self.telegram_payment_charge_id.as_str()
68681    }
68682    #[allow(rustdoc::invalid_html_tags)]
68683    #[doc = "Telegram payment identifier"]
68684    #[allow(clippy::needless_lifetimes)]
68685    pub fn set_telegram_payment_charge_id<'a>(
68686        &'a mut self,
68687        telegram_payment_charge_id: String,
68688    ) -> &'a mut Self {
68689        self.telegram_payment_charge_id = telegram_payment_charge_id;
68690        self
68691    }
68692    #[allow(rustdoc::invalid_html_tags)]
68693    #[doc = "Telegram payment identifier"]
68694    fn rhai_get_telegram_payment_charge_id(&mut self) -> String {
68695        self.telegram_payment_charge_id.clone()
68696    }
68697    #[allow(rustdoc::invalid_html_tags)]
68698    #[doc = "Provider payment identifier"]
68699    #[allow(clippy::needless_lifetimes)]
68700    pub fn get_provider_payment_charge_id<'a>(&'a self) -> &'a str {
68701        self.provider_payment_charge_id.as_str()
68702    }
68703    #[allow(rustdoc::invalid_html_tags)]
68704    #[doc = "Provider payment identifier"]
68705    #[allow(clippy::needless_lifetimes)]
68706    pub fn set_provider_payment_charge_id<'a>(
68707        &'a mut self,
68708        provider_payment_charge_id: String,
68709    ) -> &'a mut Self {
68710        self.provider_payment_charge_id = provider_payment_charge_id;
68711        self
68712    }
68713    #[allow(rustdoc::invalid_html_tags)]
68714    #[doc = "Provider payment identifier"]
68715    fn rhai_get_provider_payment_charge_id(&mut self) -> String {
68716        self.provider_payment_charge_id.clone()
68717    }
68718}
68719#[allow(dead_code)]
68720impl InlineQueryResultDocument {
68721    #[allow(clippy::too_many_arguments)]
68722    pub fn new(id: String, title: String, document_url: String, mime_type: String) -> Self {
68723        Self {
68724            tg_type: "document".to_owned(),
68725            id,
68726            title,
68727            document_url,
68728            mime_type,
68729            caption: None,
68730            parse_mode: None,
68731            caption_entities: None,
68732            description: None,
68733            reply_markup: None,
68734            input_message_content: None,
68735            thumbnail_url: None,
68736            thumbnail_width: None,
68737            thumbnail_height: None,
68738        }
68739    }
68740    #[allow(rustdoc::invalid_html_tags)]
68741    #[doc = "Type of the result, must be document"]
68742    #[allow(clippy::needless_lifetimes)]
68743    pub fn get_tg_type<'a>(&'a self) -> &'a str {
68744        self.tg_type.as_str()
68745    }
68746    #[allow(rustdoc::invalid_html_tags)]
68747    #[doc = "Type of the result, must be document"]
68748    #[allow(clippy::needless_lifetimes)]
68749    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
68750        self.tg_type = tg_type;
68751        self
68752    }
68753    #[allow(rustdoc::invalid_html_tags)]
68754    #[doc = "Type of the result, must be document"]
68755    fn rhai_get_tg_type(&mut self) -> String {
68756        self.tg_type.clone()
68757    }
68758    #[allow(rustdoc::invalid_html_tags)]
68759    #[doc = "Unique identifier for this result, 1-64 bytes"]
68760    #[allow(clippy::needless_lifetimes)]
68761    pub fn get_id<'a>(&'a self) -> &'a str {
68762        self.id.as_str()
68763    }
68764    #[allow(rustdoc::invalid_html_tags)]
68765    #[doc = "Unique identifier for this result, 1-64 bytes"]
68766    #[allow(clippy::needless_lifetimes)]
68767    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
68768        self.id = id;
68769        self
68770    }
68771    #[allow(rustdoc::invalid_html_tags)]
68772    #[doc = "Unique identifier for this result, 1-64 bytes"]
68773    fn rhai_get_id(&mut self) -> String {
68774        self.id.clone()
68775    }
68776    #[allow(rustdoc::invalid_html_tags)]
68777    #[doc = "Title for the result"]
68778    #[allow(clippy::needless_lifetimes)]
68779    pub fn get_title<'a>(&'a self) -> &'a str {
68780        self.title.as_str()
68781    }
68782    #[allow(rustdoc::invalid_html_tags)]
68783    #[doc = "Title for the result"]
68784    #[allow(clippy::needless_lifetimes)]
68785    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
68786        self.title = title;
68787        self
68788    }
68789    #[allow(rustdoc::invalid_html_tags)]
68790    #[doc = "Title for the result"]
68791    fn rhai_get_title(&mut self) -> String {
68792        self.title.clone()
68793    }
68794    #[allow(rustdoc::invalid_html_tags)]
68795    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
68796    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68797    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
68798        self.caption.as_ref().map(|v| v.as_str())
68799    }
68800    #[allow(rustdoc::invalid_html_tags)]
68801    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
68802    #[allow(clippy::needless_lifetimes)]
68803    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
68804        self.caption = caption;
68805        self
68806    }
68807    #[allow(rustdoc::invalid_html_tags)]
68808    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
68809    fn rhai_get_caption(&mut self) -> Option<String> {
68810        self.caption.as_ref().cloned()
68811    }
68812    #[allow(rustdoc::invalid_html_tags)]
68813    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
68814    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68815    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
68816        self.parse_mode.as_ref().map(|v| v.as_str())
68817    }
68818    #[allow(rustdoc::invalid_html_tags)]
68819    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
68820    #[allow(clippy::needless_lifetimes)]
68821    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
68822        self.parse_mode = parse_mode;
68823        self
68824    }
68825    #[allow(rustdoc::invalid_html_tags)]
68826    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
68827    fn rhai_get_parse_mode(&mut self) -> Option<String> {
68828        self.parse_mode.as_ref().cloned()
68829    }
68830    #[allow(rustdoc::invalid_html_tags)]
68831    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
68832    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68833    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
68834        self.caption_entities.as_ref()
68835    }
68836    #[allow(rustdoc::invalid_html_tags)]
68837    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
68838    #[allow(clippy::needless_lifetimes)]
68839    pub fn set_caption_entities<'a>(
68840        &'a mut self,
68841        caption_entities: Option<Vec<MessageEntity>>,
68842    ) -> &'a mut Self {
68843        self.caption_entities = caption_entities;
68844        self
68845    }
68846    #[allow(rustdoc::invalid_html_tags)]
68847    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
68848    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
68849        self.caption_entities.as_ref().cloned()
68850    }
68851    #[allow(rustdoc::invalid_html_tags)]
68852    #[doc = "A valid URL for the file"]
68853    #[allow(clippy::needless_lifetimes)]
68854    pub fn get_document_url<'a>(&'a self) -> &'a str {
68855        self.document_url.as_str()
68856    }
68857    #[allow(rustdoc::invalid_html_tags)]
68858    #[doc = "A valid URL for the file"]
68859    #[allow(clippy::needless_lifetimes)]
68860    pub fn set_document_url<'a>(&'a mut self, document_url: String) -> &'a mut Self {
68861        self.document_url = document_url;
68862        self
68863    }
68864    #[allow(rustdoc::invalid_html_tags)]
68865    #[doc = "A valid URL for the file"]
68866    fn rhai_get_document_url(&mut self) -> String {
68867        self.document_url.clone()
68868    }
68869    #[allow(rustdoc::invalid_html_tags)]
68870    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
68871    #[allow(clippy::needless_lifetimes)]
68872    pub fn get_mime_type<'a>(&'a self) -> &'a str {
68873        self.mime_type.as_str()
68874    }
68875    #[allow(rustdoc::invalid_html_tags)]
68876    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
68877    #[allow(clippy::needless_lifetimes)]
68878    pub fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self {
68879        self.mime_type = mime_type;
68880        self
68881    }
68882    #[allow(rustdoc::invalid_html_tags)]
68883    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
68884    fn rhai_get_mime_type(&mut self) -> String {
68885        self.mime_type.clone()
68886    }
68887    #[allow(rustdoc::invalid_html_tags)]
68888    #[doc = "Optional. Short description of the result"]
68889    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68890    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
68891        self.description.as_ref().map(|v| v.as_str())
68892    }
68893    #[allow(rustdoc::invalid_html_tags)]
68894    #[doc = "Optional. Short description of the result"]
68895    #[allow(clippy::needless_lifetimes)]
68896    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
68897        self.description = description;
68898        self
68899    }
68900    #[allow(rustdoc::invalid_html_tags)]
68901    #[doc = "Optional. Short description of the result"]
68902    fn rhai_get_description(&mut self) -> Option<String> {
68903        self.description.as_ref().cloned()
68904    }
68905    #[allow(rustdoc::invalid_html_tags)]
68906    #[doc = "Optional. Inline keyboard attached to the message"]
68907    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68908    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
68909        self.reply_markup.as_ref().map(|v| v.inner_ref())
68910    }
68911    #[allow(rustdoc::invalid_html_tags)]
68912    #[doc = "Optional. Inline keyboard attached to the message"]
68913    #[allow(clippy::needless_lifetimes)]
68914    pub fn set_reply_markup<'a>(
68915        &'a mut self,
68916        reply_markup: Option<InlineKeyboardMarkup>,
68917    ) -> &'a mut Self {
68918        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
68919        self
68920    }
68921    #[allow(rustdoc::invalid_html_tags)]
68922    #[doc = "Optional. Inline keyboard attached to the message"]
68923    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
68924        self.reply_markup.as_ref().map(|v| v.clone().into())
68925    }
68926    #[allow(rustdoc::invalid_html_tags)]
68927    #[doc = "Optional. Content of the message to be sent instead of the file"]
68928    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68929    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
68930        self.input_message_content.as_ref().map(|v| v.inner_ref())
68931    }
68932    #[allow(rustdoc::invalid_html_tags)]
68933    #[doc = "Optional. Content of the message to be sent instead of the file"]
68934    #[allow(clippy::needless_lifetimes)]
68935    pub fn set_input_message_content<'a>(
68936        &'a mut self,
68937        input_message_content: Option<InputMessageContent>,
68938    ) -> &'a mut Self {
68939        self.input_message_content = input_message_content
68940            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
68941        self
68942    }
68943    #[allow(rustdoc::invalid_html_tags)]
68944    #[doc = "Optional. Content of the message to be sent instead of the file"]
68945    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
68946        self.input_message_content
68947            .as_ref()
68948            .map(|v| v.clone().into())
68949    }
68950    #[allow(rustdoc::invalid_html_tags)]
68951    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
68952    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68953    pub fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
68954        self.thumbnail_url.as_ref().map(|v| v.as_str())
68955    }
68956    #[allow(rustdoc::invalid_html_tags)]
68957    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
68958    #[allow(clippy::needless_lifetimes)]
68959    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
68960        self.thumbnail_url = thumbnail_url;
68961        self
68962    }
68963    #[allow(rustdoc::invalid_html_tags)]
68964    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
68965    fn rhai_get_thumbnail_url(&mut self) -> Option<String> {
68966        self.thumbnail_url.as_ref().cloned()
68967    }
68968    #[allow(rustdoc::invalid_html_tags)]
68969    #[doc = "Optional. Thumbnail width"]
68970    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68971    pub fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
68972        self.thumbnail_width.as_ref().map(|v| *v)
68973    }
68974    #[allow(rustdoc::invalid_html_tags)]
68975    #[doc = "Optional. Thumbnail width"]
68976    #[allow(clippy::needless_lifetimes)]
68977    pub fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
68978        self.thumbnail_width = thumbnail_width;
68979        self
68980    }
68981    #[allow(rustdoc::invalid_html_tags)]
68982    #[doc = "Optional. Thumbnail width"]
68983    fn rhai_get_thumbnail_width(&mut self) -> Option<i64> {
68984        self.thumbnail_width.as_ref().copied()
68985    }
68986    #[allow(rustdoc::invalid_html_tags)]
68987    #[doc = "Optional. Thumbnail height"]
68988    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
68989    pub fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
68990        self.thumbnail_height.as_ref().map(|v| *v)
68991    }
68992    #[allow(rustdoc::invalid_html_tags)]
68993    #[doc = "Optional. Thumbnail height"]
68994    #[allow(clippy::needless_lifetimes)]
68995    pub fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
68996        self.thumbnail_height = thumbnail_height;
68997        self
68998    }
68999    #[allow(rustdoc::invalid_html_tags)]
69000    #[doc = "Optional. Thumbnail height"]
69001    fn rhai_get_thumbnail_height(&mut self) -> Option<i64> {
69002        self.thumbnail_height.as_ref().copied()
69003    }
69004}
69005#[allow(dead_code)]
69006impl SuggestedPostApproved {
69007    #[allow(clippy::too_many_arguments)]
69008    pub fn new(send_date: i64) -> Self {
69009        Self {
69010            send_date,
69011            suggested_post_message: None,
69012            price: None,
69013        }
69014    }
69015    #[allow(rustdoc::invalid_html_tags)]
69016    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
69017    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69018    pub fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message> {
69019        self.suggested_post_message.as_ref().map(|v| v.inner_ref())
69020    }
69021    #[allow(rustdoc::invalid_html_tags)]
69022    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
69023    #[allow(clippy::needless_lifetimes)]
69024    pub fn set_suggested_post_message<'a>(
69025        &'a mut self,
69026        suggested_post_message: Option<Message>,
69027    ) -> &'a mut Self {
69028        self.suggested_post_message = suggested_post_message
69029            .map(|suggested_post_message| BoxWrapper(Box::new(suggested_post_message)));
69030        self
69031    }
69032    #[allow(rustdoc::invalid_html_tags)]
69033    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
69034    fn rhai_get_suggested_post_message(&mut self) -> Option<Message> {
69035        self.suggested_post_message
69036            .as_ref()
69037            .map(|v| v.clone().into())
69038    }
69039    #[allow(rustdoc::invalid_html_tags)]
69040    #[doc = "Optional. Amount paid for the post"]
69041    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69042    pub fn get_price<'a>(&'a self) -> Option<&'a SuggestedPostPrice> {
69043        self.price.as_ref().map(|v| v.inner_ref())
69044    }
69045    #[allow(rustdoc::invalid_html_tags)]
69046    #[doc = "Optional. Amount paid for the post"]
69047    #[allow(clippy::needless_lifetimes)]
69048    pub fn set_price<'a>(&'a mut self, price: Option<SuggestedPostPrice>) -> &'a mut Self {
69049        self.price = price.map(|price| BoxWrapper(Unbox(price)));
69050        self
69051    }
69052    #[allow(rustdoc::invalid_html_tags)]
69053    #[doc = "Optional. Amount paid for the post"]
69054    fn rhai_get_price(&mut self) -> Option<SuggestedPostPrice> {
69055        self.price.as_ref().map(|v| v.clone().into())
69056    }
69057    #[allow(rustdoc::invalid_html_tags)]
69058    #[doc = "Date when the post will be published"]
69059    #[allow(clippy::needless_lifetimes)]
69060    pub fn get_send_date<'a>(&'a self) -> i64 {
69061        self.send_date
69062    }
69063    #[allow(rustdoc::invalid_html_tags)]
69064    #[doc = "Date when the post will be published"]
69065    #[allow(clippy::needless_lifetimes)]
69066    pub fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self {
69067        self.send_date = send_date;
69068        self
69069    }
69070    #[allow(rustdoc::invalid_html_tags)]
69071    #[doc = "Date when the post will be published"]
69072    fn rhai_get_send_date(&mut self) -> i64 {
69073        self.send_date
69074    }
69075}
69076impl TraitMenuButtonCommands for MenuButtonCommands {
69077    #[allow(rustdoc::invalid_html_tags)]
69078    #[doc = "Type of the button, must be commands"]
69079    #[allow(clippy::needless_lifetimes)]
69080    fn get_tg_type<'a>(&'a self) -> &'a str {
69081        self.tg_type.as_str()
69082    }
69083    #[allow(rustdoc::invalid_html_tags)]
69084    #[doc = "Type of the button, must be commands"]
69085    #[allow(clippy::needless_lifetimes)]
69086    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69087        self.tg_type = tg_type;
69088        self
69089    }
69090}
69091impl TraitMenuButtonWebApp for MenuButtonWebApp {
69092    #[allow(rustdoc::invalid_html_tags)]
69093    #[doc = "Type of the button, must be web_app"]
69094    #[allow(clippy::needless_lifetimes)]
69095    fn get_tg_type<'a>(&'a self) -> &'a str {
69096        self.tg_type.as_str()
69097    }
69098    #[allow(rustdoc::invalid_html_tags)]
69099    #[doc = "Type of the button, must be web_app"]
69100    #[allow(clippy::needless_lifetimes)]
69101    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69102        self.tg_type = tg_type;
69103        self
69104    }
69105    #[allow(rustdoc::invalid_html_tags)]
69106    #[doc = "Text on the button"]
69107    #[allow(clippy::needless_lifetimes)]
69108    fn get_text<'a>(&'a self) -> &'a str {
69109        self.text.as_str()
69110    }
69111    #[allow(rustdoc::invalid_html_tags)]
69112    #[doc = "Text on the button"]
69113    #[allow(clippy::needless_lifetimes)]
69114    fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
69115        self.text = text;
69116        self
69117    }
69118    #[allow(rustdoc::invalid_html_tags)]
69119    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
69120    #[allow(clippy::needless_lifetimes)]
69121    fn get_web_app<'a>(&'a self) -> &'a WebAppInfo {
69122        &self.web_app
69123    }
69124    #[allow(rustdoc::invalid_html_tags)]
69125    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
69126    #[allow(clippy::needless_lifetimes)]
69127    fn set_web_app<'a>(&'a mut self, web_app: WebAppInfo) -> &'a mut Self {
69128        self.web_app = BoxWrapper(Unbox(web_app));
69129        self
69130    }
69131}
69132impl TraitMenuButtonDefault for MenuButtonDefault {
69133    #[allow(rustdoc::invalid_html_tags)]
69134    #[doc = "Type of the button, must be default"]
69135    #[allow(clippy::needless_lifetimes)]
69136    fn get_tg_type<'a>(&'a self) -> &'a str {
69137        self.tg_type.as_str()
69138    }
69139    #[allow(rustdoc::invalid_html_tags)]
69140    #[doc = "Type of the button, must be default"]
69141    #[allow(clippy::needless_lifetimes)]
69142    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69143        self.tg_type = tg_type;
69144        self
69145    }
69146}
69147#[allow(dead_code)]
69148impl User {
69149    #[allow(clippy::too_many_arguments)]
69150    pub fn new(id: i64, is_bot: bool, first_name: String) -> Self {
69151        Self {
69152            id,
69153            is_bot,
69154            first_name,
69155            last_name: None,
69156            username: None,
69157            language_code: None,
69158            is_premium: None,
69159            added_to_attachment_menu: None,
69160            can_join_groups: None,
69161            can_read_all_group_messages: None,
69162            supports_inline_queries: None,
69163            can_connect_to_business: None,
69164            has_main_web_app: None,
69165        }
69166    }
69167    #[allow(rustdoc::invalid_html_tags)]
69168    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
69169    #[allow(clippy::needless_lifetimes)]
69170    pub fn get_id<'a>(&'a self) -> i64 {
69171        self.id
69172    }
69173    #[allow(rustdoc::invalid_html_tags)]
69174    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
69175    #[allow(clippy::needless_lifetimes)]
69176    pub fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self {
69177        self.id = id;
69178        self
69179    }
69180    #[allow(rustdoc::invalid_html_tags)]
69181    #[doc = "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
69182    fn rhai_get_id(&mut self) -> i64 {
69183        self.id
69184    }
69185    #[allow(rustdoc::invalid_html_tags)]
69186    #[doc = "True, if this user is a bot"]
69187    #[allow(clippy::needless_lifetimes)]
69188    pub fn get_is_bot<'a>(&'a self) -> bool {
69189        self.is_bot
69190    }
69191    #[allow(rustdoc::invalid_html_tags)]
69192    #[doc = "True, if this user is a bot"]
69193    #[allow(clippy::needless_lifetimes)]
69194    pub fn set_is_bot<'a>(&'a mut self, is_bot: bool) -> &'a mut Self {
69195        self.is_bot = is_bot;
69196        self
69197    }
69198    #[allow(rustdoc::invalid_html_tags)]
69199    #[doc = "True, if this user is a bot"]
69200    fn rhai_get_is_bot(&mut self) -> bool {
69201        self.is_bot
69202    }
69203    #[allow(rustdoc::invalid_html_tags)]
69204    #[doc = "User's or bot's first name"]
69205    #[allow(clippy::needless_lifetimes)]
69206    pub fn get_first_name<'a>(&'a self) -> &'a str {
69207        self.first_name.as_str()
69208    }
69209    #[allow(rustdoc::invalid_html_tags)]
69210    #[doc = "User's or bot's first name"]
69211    #[allow(clippy::needless_lifetimes)]
69212    pub fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self {
69213        self.first_name = first_name;
69214        self
69215    }
69216    #[allow(rustdoc::invalid_html_tags)]
69217    #[doc = "User's or bot's first name"]
69218    fn rhai_get_first_name(&mut self) -> String {
69219        self.first_name.clone()
69220    }
69221    #[allow(rustdoc::invalid_html_tags)]
69222    #[doc = "Optional. User's or bot's last name"]
69223    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69224    pub fn get_last_name<'a>(&'a self) -> Option<&'a str> {
69225        self.last_name.as_ref().map(|v| v.as_str())
69226    }
69227    #[allow(rustdoc::invalid_html_tags)]
69228    #[doc = "Optional. User's or bot's last name"]
69229    #[allow(clippy::needless_lifetimes)]
69230    pub fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
69231        self.last_name = last_name;
69232        self
69233    }
69234    #[allow(rustdoc::invalid_html_tags)]
69235    #[doc = "Optional. User's or bot's last name"]
69236    fn rhai_get_last_name(&mut self) -> Option<String> {
69237        self.last_name.as_ref().cloned()
69238    }
69239    #[allow(rustdoc::invalid_html_tags)]
69240    #[doc = "Optional. User's or bot's username"]
69241    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69242    pub fn get_username<'a>(&'a self) -> Option<&'a str> {
69243        self.username.as_ref().map(|v| v.as_str())
69244    }
69245    #[allow(rustdoc::invalid_html_tags)]
69246    #[doc = "Optional. User's or bot's username"]
69247    #[allow(clippy::needless_lifetimes)]
69248    pub fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self {
69249        self.username = username;
69250        self
69251    }
69252    #[allow(rustdoc::invalid_html_tags)]
69253    #[doc = "Optional. User's or bot's username"]
69254    fn rhai_get_username(&mut self) -> Option<String> {
69255        self.username.as_ref().cloned()
69256    }
69257    #[allow(rustdoc::invalid_html_tags)]
69258    #[doc = "Optional. IETF language tag of the user's language"]
69259    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69260    pub fn get_language_code<'a>(&'a self) -> Option<&'a str> {
69261        self.language_code.as_ref().map(|v| v.as_str())
69262    }
69263    #[allow(rustdoc::invalid_html_tags)]
69264    #[doc = "Optional. IETF language tag of the user's language"]
69265    #[allow(clippy::needless_lifetimes)]
69266    pub fn set_language_code<'a>(&'a mut self, language_code: Option<String>) -> &'a mut Self {
69267        self.language_code = language_code;
69268        self
69269    }
69270    #[allow(rustdoc::invalid_html_tags)]
69271    #[doc = "Optional. IETF language tag of the user's language"]
69272    fn rhai_get_language_code(&mut self) -> Option<String> {
69273        self.language_code.as_ref().cloned()
69274    }
69275    #[allow(rustdoc::invalid_html_tags)]
69276    #[doc = "Optional. True, if this user is a Telegram Premium user"]
69277    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69278    pub fn get_is_premium<'a>(&'a self) -> Option<bool> {
69279        self.is_premium.as_ref().map(|v| *v)
69280    }
69281    #[allow(rustdoc::invalid_html_tags)]
69282    #[doc = "Optional. True, if this user is a Telegram Premium user"]
69283    #[allow(clippy::needless_lifetimes)]
69284    pub fn set_is_premium<'a>(&'a mut self, is_premium: Option<bool>) -> &'a mut Self {
69285        self.is_premium = is_premium;
69286        self
69287    }
69288    #[allow(rustdoc::invalid_html_tags)]
69289    #[doc = "Optional. True, if this user is a Telegram Premium user"]
69290    fn rhai_get_is_premium(&mut self) -> Option<bool> {
69291        self.is_premium.as_ref().copied()
69292    }
69293    #[allow(rustdoc::invalid_html_tags)]
69294    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
69295    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69296    pub fn get_added_to_attachment_menu<'a>(&'a self) -> Option<bool> {
69297        self.added_to_attachment_menu.as_ref().map(|v| *v)
69298    }
69299    #[allow(rustdoc::invalid_html_tags)]
69300    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
69301    #[allow(clippy::needless_lifetimes)]
69302    pub fn set_added_to_attachment_menu<'a>(
69303        &'a mut self,
69304        added_to_attachment_menu: Option<bool>,
69305    ) -> &'a mut Self {
69306        self.added_to_attachment_menu = added_to_attachment_menu;
69307        self
69308    }
69309    #[allow(rustdoc::invalid_html_tags)]
69310    #[doc = "Optional. True, if this user added the bot to the attachment menu"]
69311    fn rhai_get_added_to_attachment_menu(&mut self) -> Option<bool> {
69312        self.added_to_attachment_menu.as_ref().copied()
69313    }
69314    #[allow(rustdoc::invalid_html_tags)]
69315    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
69316    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69317    pub fn get_can_join_groups<'a>(&'a self) -> Option<bool> {
69318        self.can_join_groups.as_ref().map(|v| *v)
69319    }
69320    #[allow(rustdoc::invalid_html_tags)]
69321    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
69322    #[allow(clippy::needless_lifetimes)]
69323    pub fn set_can_join_groups<'a>(&'a mut self, can_join_groups: Option<bool>) -> &'a mut Self {
69324        self.can_join_groups = can_join_groups;
69325        self
69326    }
69327    #[allow(rustdoc::invalid_html_tags)]
69328    #[doc = "Optional. True, if the bot can be invited to groups. Returned only in getMe."]
69329    fn rhai_get_can_join_groups(&mut self) -> Option<bool> {
69330        self.can_join_groups.as_ref().copied()
69331    }
69332    #[allow(rustdoc::invalid_html_tags)]
69333    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
69334    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69335    pub fn get_can_read_all_group_messages<'a>(&'a self) -> Option<bool> {
69336        self.can_read_all_group_messages.as_ref().map(|v| *v)
69337    }
69338    #[allow(rustdoc::invalid_html_tags)]
69339    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
69340    #[allow(clippy::needless_lifetimes)]
69341    pub fn set_can_read_all_group_messages<'a>(
69342        &'a mut self,
69343        can_read_all_group_messages: Option<bool>,
69344    ) -> &'a mut Self {
69345        self.can_read_all_group_messages = can_read_all_group_messages;
69346        self
69347    }
69348    #[allow(rustdoc::invalid_html_tags)]
69349    #[doc = "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe."]
69350    fn rhai_get_can_read_all_group_messages(&mut self) -> Option<bool> {
69351        self.can_read_all_group_messages.as_ref().copied()
69352    }
69353    #[allow(rustdoc::invalid_html_tags)]
69354    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
69355    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69356    pub fn get_supports_inline_queries<'a>(&'a self) -> Option<bool> {
69357        self.supports_inline_queries.as_ref().map(|v| *v)
69358    }
69359    #[allow(rustdoc::invalid_html_tags)]
69360    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
69361    #[allow(clippy::needless_lifetimes)]
69362    pub fn set_supports_inline_queries<'a>(
69363        &'a mut self,
69364        supports_inline_queries: Option<bool>,
69365    ) -> &'a mut Self {
69366        self.supports_inline_queries = supports_inline_queries;
69367        self
69368    }
69369    #[allow(rustdoc::invalid_html_tags)]
69370    #[doc = "Optional. True, if the bot supports inline queries. Returned only in getMe."]
69371    fn rhai_get_supports_inline_queries(&mut self) -> Option<bool> {
69372        self.supports_inline_queries.as_ref().copied()
69373    }
69374    #[allow(rustdoc::invalid_html_tags)]
69375    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
69376    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69377    pub fn get_can_connect_to_business<'a>(&'a self) -> Option<bool> {
69378        self.can_connect_to_business.as_ref().map(|v| *v)
69379    }
69380    #[allow(rustdoc::invalid_html_tags)]
69381    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
69382    #[allow(clippy::needless_lifetimes)]
69383    pub fn set_can_connect_to_business<'a>(
69384        &'a mut self,
69385        can_connect_to_business: Option<bool>,
69386    ) -> &'a mut Self {
69387        self.can_connect_to_business = can_connect_to_business;
69388        self
69389    }
69390    #[allow(rustdoc::invalid_html_tags)]
69391    #[doc = "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe."]
69392    fn rhai_get_can_connect_to_business(&mut self) -> Option<bool> {
69393        self.can_connect_to_business.as_ref().copied()
69394    }
69395    #[allow(rustdoc::invalid_html_tags)]
69396    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
69397    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69398    pub fn get_has_main_web_app<'a>(&'a self) -> Option<bool> {
69399        self.has_main_web_app.as_ref().map(|v| *v)
69400    }
69401    #[allow(rustdoc::invalid_html_tags)]
69402    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
69403    #[allow(clippy::needless_lifetimes)]
69404    pub fn set_has_main_web_app<'a>(&'a mut self, has_main_web_app: Option<bool>) -> &'a mut Self {
69405        self.has_main_web_app = has_main_web_app;
69406        self
69407    }
69408    #[allow(rustdoc::invalid_html_tags)]
69409    #[doc = "Optional. True, if the bot has a main Web App. Returned only in getMe."]
69410    fn rhai_get_has_main_web_app(&mut self) -> Option<bool> {
69411        self.has_main_web_app.as_ref().copied()
69412    }
69413}
69414impl TraitRevenueWithdrawalStatePending for RevenueWithdrawalStatePending {
69415    #[allow(rustdoc::invalid_html_tags)]
69416    #[doc = "Type of the state, always \"pending\""]
69417    #[allow(clippy::needless_lifetimes)]
69418    fn get_tg_type<'a>(&'a self) -> &'a str {
69419        self.tg_type.as_str()
69420    }
69421    #[allow(rustdoc::invalid_html_tags)]
69422    #[doc = "Type of the state, always \"pending\""]
69423    #[allow(clippy::needless_lifetimes)]
69424    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69425        self.tg_type = tg_type;
69426        self
69427    }
69428}
69429impl TraitRevenueWithdrawalStateSucceeded for RevenueWithdrawalStateSucceeded {
69430    #[allow(rustdoc::invalid_html_tags)]
69431    #[doc = "Type of the state, always \"succeeded\""]
69432    #[allow(clippy::needless_lifetimes)]
69433    fn get_tg_type<'a>(&'a self) -> &'a str {
69434        self.tg_type.as_str()
69435    }
69436    #[allow(rustdoc::invalid_html_tags)]
69437    #[doc = "Type of the state, always \"succeeded\""]
69438    #[allow(clippy::needless_lifetimes)]
69439    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69440        self.tg_type = tg_type;
69441        self
69442    }
69443    #[allow(rustdoc::invalid_html_tags)]
69444    #[doc = "Date the withdrawal was completed in Unix time"]
69445    #[allow(clippy::needless_lifetimes)]
69446    fn get_date<'a>(&'a self) -> i64 {
69447        self.date
69448    }
69449    #[allow(rustdoc::invalid_html_tags)]
69450    #[doc = "Date the withdrawal was completed in Unix time"]
69451    #[allow(clippy::needless_lifetimes)]
69452    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
69453        self.date = date;
69454        self
69455    }
69456    #[allow(rustdoc::invalid_html_tags)]
69457    #[doc = "An HTTPS URL that can be used to see transaction details"]
69458    #[allow(clippy::needless_lifetimes)]
69459    fn get_url<'a>(&'a self) -> &'a str {
69460        self.url.as_str()
69461    }
69462    #[allow(rustdoc::invalid_html_tags)]
69463    #[doc = "An HTTPS URL that can be used to see transaction details"]
69464    #[allow(clippy::needless_lifetimes)]
69465    fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self {
69466        self.url = url;
69467        self
69468    }
69469}
69470impl TraitRevenueWithdrawalStateFailed for RevenueWithdrawalStateFailed {
69471    #[allow(rustdoc::invalid_html_tags)]
69472    #[doc = "Type of the state, always \"failed\""]
69473    #[allow(clippy::needless_lifetimes)]
69474    fn get_tg_type<'a>(&'a self) -> &'a str {
69475        self.tg_type.as_str()
69476    }
69477    #[allow(rustdoc::invalid_html_tags)]
69478    #[doc = "Type of the state, always \"failed\""]
69479    #[allow(clippy::needless_lifetimes)]
69480    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69481        self.tg_type = tg_type;
69482        self
69483    }
69484}
69485#[allow(dead_code)]
69486impl RevenueWithdrawalStatePending {
69487    #[allow(clippy::too_many_arguments)]
69488    pub fn new() -> Self {
69489        Self {
69490            tg_type: "RevenueWithdrawalStatePending".to_owned(),
69491        }
69492    }
69493    #[allow(rustdoc::invalid_html_tags)]
69494    #[doc = "Type of the state, always \"pending\""]
69495    #[allow(clippy::needless_lifetimes)]
69496    pub fn get_tg_type<'a>(&'a self) -> &'a str {
69497        self.tg_type.as_str()
69498    }
69499    #[allow(rustdoc::invalid_html_tags)]
69500    #[doc = "Type of the state, always \"pending\""]
69501    #[allow(clippy::needless_lifetimes)]
69502    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69503        self.tg_type = tg_type;
69504        self
69505    }
69506    #[allow(rustdoc::invalid_html_tags)]
69507    #[doc = "Type of the state, always \"pending\""]
69508    fn rhai_get_tg_type(&mut self) -> String {
69509        self.tg_type.clone()
69510    }
69511}
69512#[allow(dead_code)]
69513impl BotDescription {
69514    #[allow(clippy::too_many_arguments)]
69515    pub fn new(description: String) -> Self {
69516        Self { description }
69517    }
69518    #[allow(rustdoc::invalid_html_tags)]
69519    #[doc = "The bot's description"]
69520    #[allow(clippy::needless_lifetimes)]
69521    pub fn get_description<'a>(&'a self) -> &'a str {
69522        self.description.as_str()
69523    }
69524    #[allow(rustdoc::invalid_html_tags)]
69525    #[doc = "The bot's description"]
69526    #[allow(clippy::needless_lifetimes)]
69527    pub fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self {
69528        self.description = description;
69529        self
69530    }
69531    #[allow(rustdoc::invalid_html_tags)]
69532    #[doc = "The bot's description"]
69533    fn rhai_get_description(&mut self) -> String {
69534        self.description.clone()
69535    }
69536}
69537#[allow(dead_code)]
69538impl TransactionPartnerAffiliateProgram {
69539    #[allow(clippy::too_many_arguments)]
69540    pub fn new(commission_per_mille: i64) -> Self {
69541        Self {
69542            tg_type: "TransactionPartnerAffiliateProgram".to_owned(),
69543            commission_per_mille,
69544            sponsor_user: None,
69545        }
69546    }
69547    #[allow(rustdoc::invalid_html_tags)]
69548    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
69549    #[allow(clippy::needless_lifetimes)]
69550    pub fn get_tg_type<'a>(&'a self) -> &'a str {
69551        self.tg_type.as_str()
69552    }
69553    #[allow(rustdoc::invalid_html_tags)]
69554    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
69555    #[allow(clippy::needless_lifetimes)]
69556    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69557        self.tg_type = tg_type;
69558        self
69559    }
69560    #[allow(rustdoc::invalid_html_tags)]
69561    #[doc = "Type of the transaction partner, always \"affiliate_program\""]
69562    fn rhai_get_tg_type(&mut self) -> String {
69563        self.tg_type.clone()
69564    }
69565    #[allow(rustdoc::invalid_html_tags)]
69566    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
69567    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69568    pub fn get_sponsor_user<'a>(&'a self) -> Option<&'a User> {
69569        self.sponsor_user.as_ref().map(|v| v.inner_ref())
69570    }
69571    #[allow(rustdoc::invalid_html_tags)]
69572    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
69573    #[allow(clippy::needless_lifetimes)]
69574    pub fn set_sponsor_user<'a>(&'a mut self, sponsor_user: Option<User>) -> &'a mut Self {
69575        self.sponsor_user = sponsor_user.map(|sponsor_user| BoxWrapper(Unbox(sponsor_user)));
69576        self
69577    }
69578    #[allow(rustdoc::invalid_html_tags)]
69579    #[doc = "Optional. Information about the bot that sponsored the affiliate program"]
69580    fn rhai_get_sponsor_user(&mut self) -> Option<User> {
69581        self.sponsor_user.as_ref().map(|v| v.clone().into())
69582    }
69583    #[allow(rustdoc::invalid_html_tags)]
69584    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
69585    #[allow(clippy::needless_lifetimes)]
69586    pub fn get_commission_per_mille<'a>(&'a self) -> i64 {
69587        self.commission_per_mille
69588    }
69589    #[allow(rustdoc::invalid_html_tags)]
69590    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
69591    #[allow(clippy::needless_lifetimes)]
69592    pub fn set_commission_per_mille<'a>(&'a mut self, commission_per_mille: i64) -> &'a mut Self {
69593        self.commission_per_mille = commission_per_mille;
69594        self
69595    }
69596    #[allow(rustdoc::invalid_html_tags)]
69597    #[doc = "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users"]
69598    fn rhai_get_commission_per_mille(&mut self) -> i64 {
69599        self.commission_per_mille
69600    }
69601}
69602#[allow(dead_code)]
69603impl InlineQueryResultCachedVideo {
69604    #[allow(clippy::too_many_arguments)]
69605    pub fn new(id: String, video_file_id: String, title: String) -> Self {
69606        Self {
69607            tg_type: "video".to_owned(),
69608            id,
69609            video_file_id,
69610            title,
69611            description: None,
69612            caption: None,
69613            parse_mode: None,
69614            caption_entities: None,
69615            show_caption_above_media: None,
69616            reply_markup: None,
69617            input_message_content: None,
69618        }
69619    }
69620    #[allow(rustdoc::invalid_html_tags)]
69621    #[doc = "Type of the result, must be video"]
69622    #[allow(clippy::needless_lifetimes)]
69623    pub fn get_tg_type<'a>(&'a self) -> &'a str {
69624        self.tg_type.as_str()
69625    }
69626    #[allow(rustdoc::invalid_html_tags)]
69627    #[doc = "Type of the result, must be video"]
69628    #[allow(clippy::needless_lifetimes)]
69629    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
69630        self.tg_type = tg_type;
69631        self
69632    }
69633    #[allow(rustdoc::invalid_html_tags)]
69634    #[doc = "Type of the result, must be video"]
69635    fn rhai_get_tg_type(&mut self) -> String {
69636        self.tg_type.clone()
69637    }
69638    #[allow(rustdoc::invalid_html_tags)]
69639    #[doc = "Unique identifier for this result, 1-64 bytes"]
69640    #[allow(clippy::needless_lifetimes)]
69641    pub fn get_id<'a>(&'a self) -> &'a str {
69642        self.id.as_str()
69643    }
69644    #[allow(rustdoc::invalid_html_tags)]
69645    #[doc = "Unique identifier for this result, 1-64 bytes"]
69646    #[allow(clippy::needless_lifetimes)]
69647    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
69648        self.id = id;
69649        self
69650    }
69651    #[allow(rustdoc::invalid_html_tags)]
69652    #[doc = "Unique identifier for this result, 1-64 bytes"]
69653    fn rhai_get_id(&mut self) -> String {
69654        self.id.clone()
69655    }
69656    #[allow(rustdoc::invalid_html_tags)]
69657    #[doc = "A valid file identifier for the video file"]
69658    #[allow(clippy::needless_lifetimes)]
69659    pub fn get_video_file_id<'a>(&'a self) -> &'a str {
69660        self.video_file_id.as_str()
69661    }
69662    #[allow(rustdoc::invalid_html_tags)]
69663    #[doc = "A valid file identifier for the video file"]
69664    #[allow(clippy::needless_lifetimes)]
69665    pub fn set_video_file_id<'a>(&'a mut self, video_file_id: String) -> &'a mut Self {
69666        self.video_file_id = video_file_id;
69667        self
69668    }
69669    #[allow(rustdoc::invalid_html_tags)]
69670    #[doc = "A valid file identifier for the video file"]
69671    fn rhai_get_video_file_id(&mut self) -> String {
69672        self.video_file_id.clone()
69673    }
69674    #[allow(rustdoc::invalid_html_tags)]
69675    #[doc = "Title for the result"]
69676    #[allow(clippy::needless_lifetimes)]
69677    pub fn get_title<'a>(&'a self) -> &'a str {
69678        self.title.as_str()
69679    }
69680    #[allow(rustdoc::invalid_html_tags)]
69681    #[doc = "Title for the result"]
69682    #[allow(clippy::needless_lifetimes)]
69683    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
69684        self.title = title;
69685        self
69686    }
69687    #[allow(rustdoc::invalid_html_tags)]
69688    #[doc = "Title for the result"]
69689    fn rhai_get_title(&mut self) -> String {
69690        self.title.clone()
69691    }
69692    #[allow(rustdoc::invalid_html_tags)]
69693    #[doc = "Optional. Short description of the result"]
69694    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69695    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
69696        self.description.as_ref().map(|v| v.as_str())
69697    }
69698    #[allow(rustdoc::invalid_html_tags)]
69699    #[doc = "Optional. Short description of the result"]
69700    #[allow(clippy::needless_lifetimes)]
69701    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
69702        self.description = description;
69703        self
69704    }
69705    #[allow(rustdoc::invalid_html_tags)]
69706    #[doc = "Optional. Short description of the result"]
69707    fn rhai_get_description(&mut self) -> Option<String> {
69708        self.description.as_ref().cloned()
69709    }
69710    #[allow(rustdoc::invalid_html_tags)]
69711    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
69712    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69713    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
69714        self.caption.as_ref().map(|v| v.as_str())
69715    }
69716    #[allow(rustdoc::invalid_html_tags)]
69717    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
69718    #[allow(clippy::needless_lifetimes)]
69719    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
69720        self.caption = caption;
69721        self
69722    }
69723    #[allow(rustdoc::invalid_html_tags)]
69724    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
69725    fn rhai_get_caption(&mut self) -> Option<String> {
69726        self.caption.as_ref().cloned()
69727    }
69728    #[allow(rustdoc::invalid_html_tags)]
69729    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
69730    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69731    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
69732        self.parse_mode.as_ref().map(|v| v.as_str())
69733    }
69734    #[allow(rustdoc::invalid_html_tags)]
69735    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
69736    #[allow(clippy::needless_lifetimes)]
69737    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
69738        self.parse_mode = parse_mode;
69739        self
69740    }
69741    #[allow(rustdoc::invalid_html_tags)]
69742    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
69743    fn rhai_get_parse_mode(&mut self) -> Option<String> {
69744        self.parse_mode.as_ref().cloned()
69745    }
69746    #[allow(rustdoc::invalid_html_tags)]
69747    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
69748    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69749    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
69750        self.caption_entities.as_ref()
69751    }
69752    #[allow(rustdoc::invalid_html_tags)]
69753    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
69754    #[allow(clippy::needless_lifetimes)]
69755    pub fn set_caption_entities<'a>(
69756        &'a mut self,
69757        caption_entities: Option<Vec<MessageEntity>>,
69758    ) -> &'a mut Self {
69759        self.caption_entities = caption_entities;
69760        self
69761    }
69762    #[allow(rustdoc::invalid_html_tags)]
69763    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
69764    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
69765        self.caption_entities.as_ref().cloned()
69766    }
69767    #[allow(rustdoc::invalid_html_tags)]
69768    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
69769    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69770    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
69771        self.show_caption_above_media.as_ref().map(|v| *v)
69772    }
69773    #[allow(rustdoc::invalid_html_tags)]
69774    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
69775    #[allow(clippy::needless_lifetimes)]
69776    pub fn set_show_caption_above_media<'a>(
69777        &'a mut self,
69778        show_caption_above_media: Option<bool>,
69779    ) -> &'a mut Self {
69780        self.show_caption_above_media = show_caption_above_media;
69781        self
69782    }
69783    #[allow(rustdoc::invalid_html_tags)]
69784    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
69785    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
69786        self.show_caption_above_media.as_ref().copied()
69787    }
69788    #[allow(rustdoc::invalid_html_tags)]
69789    #[doc = "Optional. Inline keyboard attached to the message"]
69790    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69791    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
69792        self.reply_markup.as_ref().map(|v| v.inner_ref())
69793    }
69794    #[allow(rustdoc::invalid_html_tags)]
69795    #[doc = "Optional. Inline keyboard attached to the message"]
69796    #[allow(clippy::needless_lifetimes)]
69797    pub fn set_reply_markup<'a>(
69798        &'a mut self,
69799        reply_markup: Option<InlineKeyboardMarkup>,
69800    ) -> &'a mut Self {
69801        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
69802        self
69803    }
69804    #[allow(rustdoc::invalid_html_tags)]
69805    #[doc = "Optional. Inline keyboard attached to the message"]
69806    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
69807        self.reply_markup.as_ref().map(|v| v.clone().into())
69808    }
69809    #[allow(rustdoc::invalid_html_tags)]
69810    #[doc = "Optional. Content of the message to be sent instead of the video"]
69811    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69812    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
69813        self.input_message_content.as_ref().map(|v| v.inner_ref())
69814    }
69815    #[allow(rustdoc::invalid_html_tags)]
69816    #[doc = "Optional. Content of the message to be sent instead of the video"]
69817    #[allow(clippy::needless_lifetimes)]
69818    pub fn set_input_message_content<'a>(
69819        &'a mut self,
69820        input_message_content: Option<InputMessageContent>,
69821    ) -> &'a mut Self {
69822        self.input_message_content = input_message_content
69823            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
69824        self
69825    }
69826    #[allow(rustdoc::invalid_html_tags)]
69827    #[doc = "Optional. Content of the message to be sent instead of the video"]
69828    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
69829        self.input_message_content
69830            .as_ref()
69831            .map(|v| v.clone().into())
69832    }
69833}
69834#[allow(dead_code)]
69835impl BusinessConnection {
69836    #[allow(clippy::too_many_arguments)]
69837    pub fn new<A: Into<User>>(
69838        id: String,
69839        user: A,
69840        user_chat_id: i64,
69841        date: i64,
69842        is_enabled: bool,
69843    ) -> Self {
69844        Self {
69845            id,
69846            user: BoxWrapper::new_unbox(user.into()),
69847            user_chat_id,
69848            date,
69849            is_enabled,
69850            rights: None,
69851        }
69852    }
69853    #[allow(rustdoc::invalid_html_tags)]
69854    #[doc = "Unique identifier of the business connection"]
69855    #[allow(clippy::needless_lifetimes)]
69856    pub fn get_id<'a>(&'a self) -> &'a str {
69857        self.id.as_str()
69858    }
69859    #[allow(rustdoc::invalid_html_tags)]
69860    #[doc = "Unique identifier of the business connection"]
69861    #[allow(clippy::needless_lifetimes)]
69862    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
69863        self.id = id;
69864        self
69865    }
69866    #[allow(rustdoc::invalid_html_tags)]
69867    #[doc = "Unique identifier of the business connection"]
69868    fn rhai_get_id(&mut self) -> String {
69869        self.id.clone()
69870    }
69871    #[allow(rustdoc::invalid_html_tags)]
69872    #[doc = "Business account user that created the business connection"]
69873    #[allow(clippy::needless_lifetimes)]
69874    pub fn get_user<'a>(&'a self) -> &'a User {
69875        &self.user
69876    }
69877    #[allow(rustdoc::invalid_html_tags)]
69878    #[doc = "Business account user that created the business connection"]
69879    #[allow(clippy::needless_lifetimes)]
69880    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
69881        self.user = BoxWrapper(Unbox(user));
69882        self
69883    }
69884    #[allow(rustdoc::invalid_html_tags)]
69885    #[doc = "Business account user that created the business connection"]
69886    fn rhai_get_user(&mut self) -> User {
69887        self.user.clone().into()
69888    }
69889    #[allow(rustdoc::invalid_html_tags)]
69890    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
69891    #[allow(clippy::needless_lifetimes)]
69892    pub fn get_user_chat_id<'a>(&'a self) -> i64 {
69893        self.user_chat_id
69894    }
69895    #[allow(rustdoc::invalid_html_tags)]
69896    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
69897    #[allow(clippy::needless_lifetimes)]
69898    pub fn set_user_chat_id<'a>(&'a mut self, user_chat_id: i64) -> &'a mut Self {
69899        self.user_chat_id = user_chat_id;
69900        self
69901    }
69902    #[allow(rustdoc::invalid_html_tags)]
69903    #[doc = "Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
69904    fn rhai_get_user_chat_id(&mut self) -> i64 {
69905        self.user_chat_id
69906    }
69907    #[allow(rustdoc::invalid_html_tags)]
69908    #[doc = "Date the connection was established in Unix time"]
69909    #[allow(clippy::needless_lifetimes)]
69910    pub fn get_date<'a>(&'a self) -> i64 {
69911        self.date
69912    }
69913    #[allow(rustdoc::invalid_html_tags)]
69914    #[doc = "Date the connection was established in Unix time"]
69915    #[allow(clippy::needless_lifetimes)]
69916    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
69917        self.date = date;
69918        self
69919    }
69920    #[allow(rustdoc::invalid_html_tags)]
69921    #[doc = "Date the connection was established in Unix time"]
69922    fn rhai_get_date(&mut self) -> i64 {
69923        self.date
69924    }
69925    #[allow(rustdoc::invalid_html_tags)]
69926    #[doc = "Optional. Rights of the business bot"]
69927    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
69928    pub fn get_rights<'a>(&'a self) -> Option<&'a BusinessBotRights> {
69929        self.rights.as_ref().map(|v| v.inner_ref())
69930    }
69931    #[allow(rustdoc::invalid_html_tags)]
69932    #[doc = "Optional. Rights of the business bot"]
69933    #[allow(clippy::needless_lifetimes)]
69934    pub fn set_rights<'a>(&'a mut self, rights: Option<BusinessBotRights>) -> &'a mut Self {
69935        self.rights = rights.map(|rights| BoxWrapper(Unbox(rights)));
69936        self
69937    }
69938    #[allow(rustdoc::invalid_html_tags)]
69939    #[doc = "Optional. Rights of the business bot"]
69940    fn rhai_get_rights(&mut self) -> Option<BusinessBotRights> {
69941        self.rights.as_ref().map(|v| v.clone().into())
69942    }
69943    #[allow(rustdoc::invalid_html_tags)]
69944    #[doc = "True, if the connection is active"]
69945    #[allow(clippy::needless_lifetimes)]
69946    pub fn get_is_enabled<'a>(&'a self) -> bool {
69947        self.is_enabled
69948    }
69949    #[allow(rustdoc::invalid_html_tags)]
69950    #[doc = "True, if the connection is active"]
69951    #[allow(clippy::needless_lifetimes)]
69952    pub fn set_is_enabled<'a>(&'a mut self, is_enabled: bool) -> &'a mut Self {
69953        self.is_enabled = is_enabled;
69954        self
69955    }
69956    #[allow(rustdoc::invalid_html_tags)]
69957    #[doc = "True, if the connection is active"]
69958    fn rhai_get_is_enabled(&mut self) -> bool {
69959        self.is_enabled
69960    }
69961}
69962#[allow(dead_code)]
69963impl UserProfilePhotos {
69964    #[allow(clippy::too_many_arguments)]
69965    pub fn new(total_count: i64, photos: Vec<Vec<PhotoSize>>) -> Self {
69966        Self {
69967            total_count,
69968            photos,
69969        }
69970    }
69971    #[allow(rustdoc::invalid_html_tags)]
69972    #[doc = "Total number of profile pictures the target user has"]
69973    #[allow(clippy::needless_lifetimes)]
69974    pub fn get_total_count<'a>(&'a self) -> i64 {
69975        self.total_count
69976    }
69977    #[allow(rustdoc::invalid_html_tags)]
69978    #[doc = "Total number of profile pictures the target user has"]
69979    #[allow(clippy::needless_lifetimes)]
69980    pub fn set_total_count<'a>(&'a mut self, total_count: i64) -> &'a mut Self {
69981        self.total_count = total_count;
69982        self
69983    }
69984    #[allow(rustdoc::invalid_html_tags)]
69985    #[doc = "Total number of profile pictures the target user has"]
69986    fn rhai_get_total_count(&mut self) -> i64 {
69987        self.total_count
69988    }
69989    #[allow(rustdoc::invalid_html_tags)]
69990    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
69991    #[allow(clippy::needless_lifetimes)]
69992    pub fn get_photos<'a>(&'a self) -> &'a Vec<Vec<PhotoSize>> {
69993        &self.photos
69994    }
69995    #[allow(rustdoc::invalid_html_tags)]
69996    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
69997    #[allow(clippy::needless_lifetimes)]
69998    pub fn set_photos<'a>(&'a mut self, photos: Vec<Vec<PhotoSize>>) -> &'a mut Self {
69999        self.photos = photos;
70000        self
70001    }
70002    #[allow(rustdoc::invalid_html_tags)]
70003    #[doc = "Requested profile pictures (in up to 4 sizes each)"]
70004    fn rhai_get_photos(&mut self) -> Vec<Vec<PhotoSize>> {
70005        self.photos.clone()
70006    }
70007}
70008#[allow(dead_code)]
70009impl ReactionTypePaid {
70010    #[allow(clippy::too_many_arguments)]
70011    pub fn new() -> Self {
70012        Self {
70013            tg_type: "ReactionTypePaid".to_owned(),
70014        }
70015    }
70016    #[allow(rustdoc::invalid_html_tags)]
70017    #[doc = "Type of the reaction, always \"paid\""]
70018    #[allow(clippy::needless_lifetimes)]
70019    pub fn get_tg_type<'a>(&'a self) -> &'a str {
70020        self.tg_type.as_str()
70021    }
70022    #[allow(rustdoc::invalid_html_tags)]
70023    #[doc = "Type of the reaction, always \"paid\""]
70024    #[allow(clippy::needless_lifetimes)]
70025    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
70026        self.tg_type = tg_type;
70027        self
70028    }
70029    #[allow(rustdoc::invalid_html_tags)]
70030    #[doc = "Type of the reaction, always \"paid\""]
70031    fn rhai_get_tg_type(&mut self) -> String {
70032        self.tg_type.clone()
70033    }
70034}
70035#[allow(dead_code)]
70036impl ChatMemberBanned {
70037    #[allow(clippy::too_many_arguments)]
70038    pub fn new<A: Into<User>>(user: A, until_date: i64) -> Self {
70039        Self {
70040            user: BoxWrapper::new_unbox(user.into()),
70041            until_date,
70042        }
70043    }
70044    #[allow(rustdoc::invalid_html_tags)]
70045    #[doc = "Information about the user"]
70046    #[allow(clippy::needless_lifetimes)]
70047    pub fn get_user<'a>(&'a self) -> &'a User {
70048        &self.user
70049    }
70050    #[allow(rustdoc::invalid_html_tags)]
70051    #[doc = "Information about the user"]
70052    #[allow(clippy::needless_lifetimes)]
70053    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
70054        self.user = BoxWrapper(Unbox(user));
70055        self
70056    }
70057    #[allow(rustdoc::invalid_html_tags)]
70058    #[doc = "Information about the user"]
70059    fn rhai_get_user(&mut self) -> User {
70060        self.user.clone().into()
70061    }
70062    #[allow(rustdoc::invalid_html_tags)]
70063    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
70064    #[allow(clippy::needless_lifetimes)]
70065    pub fn get_until_date<'a>(&'a self) -> i64 {
70066        self.until_date
70067    }
70068    #[allow(rustdoc::invalid_html_tags)]
70069    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
70070    #[allow(clippy::needless_lifetimes)]
70071    pub fn set_until_date<'a>(&'a mut self, until_date: i64) -> &'a mut Self {
70072        self.until_date = until_date;
70073        self
70074    }
70075    #[allow(rustdoc::invalid_html_tags)]
70076    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"]
70077    fn rhai_get_until_date(&mut self) -> i64 {
70078        self.until_date
70079    }
70080}
70081#[allow(dead_code)]
70082impl UsersShared {
70083    #[allow(clippy::too_many_arguments)]
70084    pub fn new(request_id: i64, users: Vec<SharedUser>) -> Self {
70085        Self { request_id, users }
70086    }
70087    #[allow(rustdoc::invalid_html_tags)]
70088    #[doc = "Identifier of the request"]
70089    #[allow(clippy::needless_lifetimes)]
70090    pub fn get_request_id<'a>(&'a self) -> i64 {
70091        self.request_id
70092    }
70093    #[allow(rustdoc::invalid_html_tags)]
70094    #[doc = "Identifier of the request"]
70095    #[allow(clippy::needless_lifetimes)]
70096    pub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self {
70097        self.request_id = request_id;
70098        self
70099    }
70100    #[allow(rustdoc::invalid_html_tags)]
70101    #[doc = "Identifier of the request"]
70102    fn rhai_get_request_id(&mut self) -> i64 {
70103        self.request_id
70104    }
70105    #[allow(rustdoc::invalid_html_tags)]
70106    #[doc = "Information about users shared with the bot."]
70107    #[allow(clippy::needless_lifetimes)]
70108    pub fn get_users<'a>(&'a self) -> &'a Vec<SharedUser> {
70109        &self.users
70110    }
70111    #[allow(rustdoc::invalid_html_tags)]
70112    #[doc = "Information about users shared with the bot."]
70113    #[allow(clippy::needless_lifetimes)]
70114    pub fn set_users<'a>(&'a mut self, users: Vec<SharedUser>) -> &'a mut Self {
70115        self.users = users;
70116        self
70117    }
70118    #[allow(rustdoc::invalid_html_tags)]
70119    #[doc = "Information about users shared with the bot."]
70120    fn rhai_get_users(&mut self) -> Vec<SharedUser> {
70121        self.users.clone()
70122    }
70123}
70124#[allow(dead_code)]
70125impl InlineQueryResultMpeg4Gif {
70126    #[allow(clippy::too_many_arguments)]
70127    pub fn new(id: String, mpeg_4_url: String, thumbnail_url: String) -> Self {
70128        Self {
70129            tg_type: "mpeg4_gif".to_owned(),
70130            id,
70131            mpeg_4_url,
70132            thumbnail_url,
70133            mpeg_4_width: None,
70134            mpeg_4_height: None,
70135            mpeg_4_duration: None,
70136            thumbnail_mime_type: None,
70137            title: None,
70138            caption: None,
70139            parse_mode: None,
70140            caption_entities: None,
70141            show_caption_above_media: None,
70142            reply_markup: None,
70143            input_message_content: None,
70144        }
70145    }
70146    #[allow(rustdoc::invalid_html_tags)]
70147    #[doc = "Type of the result, must be mpeg4_gif"]
70148    #[allow(clippy::needless_lifetimes)]
70149    pub fn get_tg_type<'a>(&'a self) -> &'a str {
70150        self.tg_type.as_str()
70151    }
70152    #[allow(rustdoc::invalid_html_tags)]
70153    #[doc = "Type of the result, must be mpeg4_gif"]
70154    #[allow(clippy::needless_lifetimes)]
70155    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
70156        self.tg_type = tg_type;
70157        self
70158    }
70159    #[allow(rustdoc::invalid_html_tags)]
70160    #[doc = "Type of the result, must be mpeg4_gif"]
70161    fn rhai_get_tg_type(&mut self) -> String {
70162        self.tg_type.clone()
70163    }
70164    #[allow(rustdoc::invalid_html_tags)]
70165    #[doc = "Unique identifier for this result, 1-64 bytes"]
70166    #[allow(clippy::needless_lifetimes)]
70167    pub fn get_id<'a>(&'a self) -> &'a str {
70168        self.id.as_str()
70169    }
70170    #[allow(rustdoc::invalid_html_tags)]
70171    #[doc = "Unique identifier for this result, 1-64 bytes"]
70172    #[allow(clippy::needless_lifetimes)]
70173    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
70174        self.id = id;
70175        self
70176    }
70177    #[allow(rustdoc::invalid_html_tags)]
70178    #[doc = "Unique identifier for this result, 1-64 bytes"]
70179    fn rhai_get_id(&mut self) -> String {
70180        self.id.clone()
70181    }
70182    #[allow(rustdoc::invalid_html_tags)]
70183    #[doc = "A valid URL for the MPEG4 file"]
70184    #[allow(clippy::needless_lifetimes)]
70185    pub fn get_mpeg_4_url<'a>(&'a self) -> &'a str {
70186        self.mpeg_4_url.as_str()
70187    }
70188    #[allow(rustdoc::invalid_html_tags)]
70189    #[doc = "A valid URL for the MPEG4 file"]
70190    #[allow(clippy::needless_lifetimes)]
70191    pub fn set_mpeg_4_url<'a>(&'a mut self, mpeg_4_url: String) -> &'a mut Self {
70192        self.mpeg_4_url = mpeg_4_url;
70193        self
70194    }
70195    #[allow(rustdoc::invalid_html_tags)]
70196    #[doc = "A valid URL for the MPEG4 file"]
70197    fn rhai_get_mpeg_4_url(&mut self) -> String {
70198        self.mpeg_4_url.clone()
70199    }
70200    #[allow(rustdoc::invalid_html_tags)]
70201    #[doc = "Optional. Video width"]
70202    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70203    pub fn get_mpeg_4_width<'a>(&'a self) -> Option<i64> {
70204        self.mpeg_4_width.as_ref().map(|v| *v)
70205    }
70206    #[allow(rustdoc::invalid_html_tags)]
70207    #[doc = "Optional. Video width"]
70208    #[allow(clippy::needless_lifetimes)]
70209    pub fn set_mpeg_4_width<'a>(&'a mut self, mpeg_4_width: Option<i64>) -> &'a mut Self {
70210        self.mpeg_4_width = mpeg_4_width;
70211        self
70212    }
70213    #[allow(rustdoc::invalid_html_tags)]
70214    #[doc = "Optional. Video width"]
70215    fn rhai_get_mpeg_4_width(&mut self) -> Option<i64> {
70216        self.mpeg_4_width.as_ref().copied()
70217    }
70218    #[allow(rustdoc::invalid_html_tags)]
70219    #[doc = "Optional. Video height"]
70220    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70221    pub fn get_mpeg_4_height<'a>(&'a self) -> Option<i64> {
70222        self.mpeg_4_height.as_ref().map(|v| *v)
70223    }
70224    #[allow(rustdoc::invalid_html_tags)]
70225    #[doc = "Optional. Video height"]
70226    #[allow(clippy::needless_lifetimes)]
70227    pub fn set_mpeg_4_height<'a>(&'a mut self, mpeg_4_height: Option<i64>) -> &'a mut Self {
70228        self.mpeg_4_height = mpeg_4_height;
70229        self
70230    }
70231    #[allow(rustdoc::invalid_html_tags)]
70232    #[doc = "Optional. Video height"]
70233    fn rhai_get_mpeg_4_height(&mut self) -> Option<i64> {
70234        self.mpeg_4_height.as_ref().copied()
70235    }
70236    #[allow(rustdoc::invalid_html_tags)]
70237    #[doc = "Optional. Video duration in seconds"]
70238    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70239    pub fn get_mpeg_4_duration<'a>(&'a self) -> Option<i64> {
70240        self.mpeg_4_duration.as_ref().map(|v| *v)
70241    }
70242    #[allow(rustdoc::invalid_html_tags)]
70243    #[doc = "Optional. Video duration in seconds"]
70244    #[allow(clippy::needless_lifetimes)]
70245    pub fn set_mpeg_4_duration<'a>(&'a mut self, mpeg_4_duration: Option<i64>) -> &'a mut Self {
70246        self.mpeg_4_duration = mpeg_4_duration;
70247        self
70248    }
70249    #[allow(rustdoc::invalid_html_tags)]
70250    #[doc = "Optional. Video duration in seconds"]
70251    fn rhai_get_mpeg_4_duration(&mut self) -> Option<i64> {
70252        self.mpeg_4_duration.as_ref().copied()
70253    }
70254    #[allow(rustdoc::invalid_html_tags)]
70255    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
70256    #[allow(clippy::needless_lifetimes)]
70257    pub fn get_thumbnail_url<'a>(&'a self) -> &'a str {
70258        self.thumbnail_url.as_str()
70259    }
70260    #[allow(rustdoc::invalid_html_tags)]
70261    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
70262    #[allow(clippy::needless_lifetimes)]
70263    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
70264        self.thumbnail_url = thumbnail_url;
70265        self
70266    }
70267    #[allow(rustdoc::invalid_html_tags)]
70268    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
70269    fn rhai_get_thumbnail_url(&mut self) -> String {
70270        self.thumbnail_url.clone()
70271    }
70272    #[allow(rustdoc::invalid_html_tags)]
70273    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
70274    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70275    pub fn get_thumbnail_mime_type<'a>(&'a self) -> Option<&'a str> {
70276        self.thumbnail_mime_type.as_ref().map(|v| v.as_str())
70277    }
70278    #[allow(rustdoc::invalid_html_tags)]
70279    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
70280    #[allow(clippy::needless_lifetimes)]
70281    pub fn set_thumbnail_mime_type<'a>(
70282        &'a mut self,
70283        thumbnail_mime_type: Option<String>,
70284    ) -> &'a mut Self {
70285        self.thumbnail_mime_type = thumbnail_mime_type;
70286        self
70287    }
70288    #[allow(rustdoc::invalid_html_tags)]
70289    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
70290    fn rhai_get_thumbnail_mime_type(&mut self) -> Option<String> {
70291        self.thumbnail_mime_type.as_ref().cloned()
70292    }
70293    #[allow(rustdoc::invalid_html_tags)]
70294    #[doc = "Optional. Title for the result"]
70295    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70296    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
70297        self.title.as_ref().map(|v| v.as_str())
70298    }
70299    #[allow(rustdoc::invalid_html_tags)]
70300    #[doc = "Optional. Title for the result"]
70301    #[allow(clippy::needless_lifetimes)]
70302    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
70303        self.title = title;
70304        self
70305    }
70306    #[allow(rustdoc::invalid_html_tags)]
70307    #[doc = "Optional. Title for the result"]
70308    fn rhai_get_title(&mut self) -> Option<String> {
70309        self.title.as_ref().cloned()
70310    }
70311    #[allow(rustdoc::invalid_html_tags)]
70312    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
70313    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70314    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
70315        self.caption.as_ref().map(|v| v.as_str())
70316    }
70317    #[allow(rustdoc::invalid_html_tags)]
70318    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
70319    #[allow(clippy::needless_lifetimes)]
70320    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
70321        self.caption = caption;
70322        self
70323    }
70324    #[allow(rustdoc::invalid_html_tags)]
70325    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
70326    fn rhai_get_caption(&mut self) -> Option<String> {
70327        self.caption.as_ref().cloned()
70328    }
70329    #[allow(rustdoc::invalid_html_tags)]
70330    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
70331    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70332    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
70333        self.parse_mode.as_ref().map(|v| v.as_str())
70334    }
70335    #[allow(rustdoc::invalid_html_tags)]
70336    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
70337    #[allow(clippy::needless_lifetimes)]
70338    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
70339        self.parse_mode = parse_mode;
70340        self
70341    }
70342    #[allow(rustdoc::invalid_html_tags)]
70343    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
70344    fn rhai_get_parse_mode(&mut self) -> Option<String> {
70345        self.parse_mode.as_ref().cloned()
70346    }
70347    #[allow(rustdoc::invalid_html_tags)]
70348    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
70349    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70350    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
70351        self.caption_entities.as_ref()
70352    }
70353    #[allow(rustdoc::invalid_html_tags)]
70354    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
70355    #[allow(clippy::needless_lifetimes)]
70356    pub fn set_caption_entities<'a>(
70357        &'a mut self,
70358        caption_entities: Option<Vec<MessageEntity>>,
70359    ) -> &'a mut Self {
70360        self.caption_entities = caption_entities;
70361        self
70362    }
70363    #[allow(rustdoc::invalid_html_tags)]
70364    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
70365    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
70366        self.caption_entities.as_ref().cloned()
70367    }
70368    #[allow(rustdoc::invalid_html_tags)]
70369    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
70370    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70371    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
70372        self.show_caption_above_media.as_ref().map(|v| *v)
70373    }
70374    #[allow(rustdoc::invalid_html_tags)]
70375    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
70376    #[allow(clippy::needless_lifetimes)]
70377    pub fn set_show_caption_above_media<'a>(
70378        &'a mut self,
70379        show_caption_above_media: Option<bool>,
70380    ) -> &'a mut Self {
70381        self.show_caption_above_media = show_caption_above_media;
70382        self
70383    }
70384    #[allow(rustdoc::invalid_html_tags)]
70385    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
70386    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
70387        self.show_caption_above_media.as_ref().copied()
70388    }
70389    #[allow(rustdoc::invalid_html_tags)]
70390    #[doc = "Optional. Inline keyboard attached to the message"]
70391    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70392    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
70393        self.reply_markup.as_ref().map(|v| v.inner_ref())
70394    }
70395    #[allow(rustdoc::invalid_html_tags)]
70396    #[doc = "Optional. Inline keyboard attached to the message"]
70397    #[allow(clippy::needless_lifetimes)]
70398    pub fn set_reply_markup<'a>(
70399        &'a mut self,
70400        reply_markup: Option<InlineKeyboardMarkup>,
70401    ) -> &'a mut Self {
70402        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
70403        self
70404    }
70405    #[allow(rustdoc::invalid_html_tags)]
70406    #[doc = "Optional. Inline keyboard attached to the message"]
70407    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
70408        self.reply_markup.as_ref().map(|v| v.clone().into())
70409    }
70410    #[allow(rustdoc::invalid_html_tags)]
70411    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
70412    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70413    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
70414        self.input_message_content.as_ref().map(|v| v.inner_ref())
70415    }
70416    #[allow(rustdoc::invalid_html_tags)]
70417    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
70418    #[allow(clippy::needless_lifetimes)]
70419    pub fn set_input_message_content<'a>(
70420        &'a mut self,
70421        input_message_content: Option<InputMessageContent>,
70422    ) -> &'a mut Self {
70423        self.input_message_content = input_message_content
70424            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
70425        self
70426    }
70427    #[allow(rustdoc::invalid_html_tags)]
70428    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
70429    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
70430        self.input_message_content
70431            .as_ref()
70432            .map(|v| v.clone().into())
70433    }
70434}
70435#[allow(dead_code)]
70436impl ChecklistTask {
70437    #[allow(clippy::too_many_arguments)]
70438    pub fn new(id: i64, text: String) -> Self {
70439        Self {
70440            id,
70441            text,
70442            text_entities: None,
70443            completed_by_user: None,
70444            completion_date: None,
70445        }
70446    }
70447    #[allow(rustdoc::invalid_html_tags)]
70448    #[doc = "Unique identifier of the task"]
70449    #[allow(clippy::needless_lifetimes)]
70450    pub fn get_id<'a>(&'a self) -> i64 {
70451        self.id
70452    }
70453    #[allow(rustdoc::invalid_html_tags)]
70454    #[doc = "Unique identifier of the task"]
70455    #[allow(clippy::needless_lifetimes)]
70456    pub fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self {
70457        self.id = id;
70458        self
70459    }
70460    #[allow(rustdoc::invalid_html_tags)]
70461    #[doc = "Unique identifier of the task"]
70462    fn rhai_get_id(&mut self) -> i64 {
70463        self.id
70464    }
70465    #[allow(rustdoc::invalid_html_tags)]
70466    #[doc = "Text of the task"]
70467    #[allow(clippy::needless_lifetimes)]
70468    pub fn get_text<'a>(&'a self) -> &'a str {
70469        self.text.as_str()
70470    }
70471    #[allow(rustdoc::invalid_html_tags)]
70472    #[doc = "Text of the task"]
70473    #[allow(clippy::needless_lifetimes)]
70474    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
70475        self.text = text;
70476        self
70477    }
70478    #[allow(rustdoc::invalid_html_tags)]
70479    #[doc = "Text of the task"]
70480    fn rhai_get_text(&mut self) -> String {
70481        self.text.clone()
70482    }
70483    #[allow(rustdoc::invalid_html_tags)]
70484    #[doc = "Optional. Special entities that appear in the task text"]
70485    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70486    pub fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
70487        self.text_entities.as_ref()
70488    }
70489    #[allow(rustdoc::invalid_html_tags)]
70490    #[doc = "Optional. Special entities that appear in the task text"]
70491    #[allow(clippy::needless_lifetimes)]
70492    pub fn set_text_entities<'a>(
70493        &'a mut self,
70494        text_entities: Option<Vec<MessageEntity>>,
70495    ) -> &'a mut Self {
70496        self.text_entities = text_entities;
70497        self
70498    }
70499    #[allow(rustdoc::invalid_html_tags)]
70500    #[doc = "Optional. Special entities that appear in the task text"]
70501    fn rhai_get_text_entities(&mut self) -> Option<Vec<MessageEntity>> {
70502        self.text_entities.as_ref().cloned()
70503    }
70504    #[allow(rustdoc::invalid_html_tags)]
70505    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
70506    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70507    pub fn get_completed_by_user<'a>(&'a self) -> Option<&'a User> {
70508        self.completed_by_user.as_ref().map(|v| v.inner_ref())
70509    }
70510    #[allow(rustdoc::invalid_html_tags)]
70511    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
70512    #[allow(clippy::needless_lifetimes)]
70513    pub fn set_completed_by_user<'a>(
70514        &'a mut self,
70515        completed_by_user: Option<User>,
70516    ) -> &'a mut Self {
70517        self.completed_by_user =
70518            completed_by_user.map(|completed_by_user| BoxWrapper(Unbox(completed_by_user)));
70519        self
70520    }
70521    #[allow(rustdoc::invalid_html_tags)]
70522    #[doc = "Optional. User that completed the task; omitted if the task wasn't completed"]
70523    fn rhai_get_completed_by_user(&mut self) -> Option<User> {
70524        self.completed_by_user.as_ref().map(|v| v.clone().into())
70525    }
70526    #[allow(rustdoc::invalid_html_tags)]
70527    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
70528    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70529    pub fn get_completion_date<'a>(&'a self) -> Option<i64> {
70530        self.completion_date.as_ref().map(|v| *v)
70531    }
70532    #[allow(rustdoc::invalid_html_tags)]
70533    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
70534    #[allow(clippy::needless_lifetimes)]
70535    pub fn set_completion_date<'a>(&'a mut self, completion_date: Option<i64>) -> &'a mut Self {
70536        self.completion_date = completion_date;
70537        self
70538    }
70539    #[allow(rustdoc::invalid_html_tags)]
70540    #[doc = "Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed"]
70541    fn rhai_get_completion_date(&mut self) -> Option<i64> {
70542        self.completion_date.as_ref().copied()
70543    }
70544}
70545#[allow(dead_code)]
70546impl Checklist {
70547    #[allow(clippy::too_many_arguments)]
70548    pub fn new(title: String, tasks: Vec<ChecklistTask>) -> Self {
70549        Self {
70550            title,
70551            tasks,
70552            title_entities: None,
70553            others_can_add_tasks: None,
70554            others_can_mark_tasks_as_done: None,
70555        }
70556    }
70557    #[allow(rustdoc::invalid_html_tags)]
70558    #[doc = "Title of the checklist"]
70559    #[allow(clippy::needless_lifetimes)]
70560    pub fn get_title<'a>(&'a self) -> &'a str {
70561        self.title.as_str()
70562    }
70563    #[allow(rustdoc::invalid_html_tags)]
70564    #[doc = "Title of the checklist"]
70565    #[allow(clippy::needless_lifetimes)]
70566    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
70567        self.title = title;
70568        self
70569    }
70570    #[allow(rustdoc::invalid_html_tags)]
70571    #[doc = "Title of the checklist"]
70572    fn rhai_get_title(&mut self) -> String {
70573        self.title.clone()
70574    }
70575    #[allow(rustdoc::invalid_html_tags)]
70576    #[doc = "Optional. Special entities that appear in the checklist title"]
70577    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70578    pub fn get_title_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
70579        self.title_entities.as_ref()
70580    }
70581    #[allow(rustdoc::invalid_html_tags)]
70582    #[doc = "Optional. Special entities that appear in the checklist title"]
70583    #[allow(clippy::needless_lifetimes)]
70584    pub fn set_title_entities<'a>(
70585        &'a mut self,
70586        title_entities: Option<Vec<MessageEntity>>,
70587    ) -> &'a mut Self {
70588        self.title_entities = title_entities;
70589        self
70590    }
70591    #[allow(rustdoc::invalid_html_tags)]
70592    #[doc = "Optional. Special entities that appear in the checklist title"]
70593    fn rhai_get_title_entities(&mut self) -> Option<Vec<MessageEntity>> {
70594        self.title_entities.as_ref().cloned()
70595    }
70596    #[allow(rustdoc::invalid_html_tags)]
70597    #[doc = "List of tasks in the checklist"]
70598    #[allow(clippy::needless_lifetimes)]
70599    pub fn get_tasks<'a>(&'a self) -> &'a Vec<ChecklistTask> {
70600        &self.tasks
70601    }
70602    #[allow(rustdoc::invalid_html_tags)]
70603    #[doc = "List of tasks in the checklist"]
70604    #[allow(clippy::needless_lifetimes)]
70605    pub fn set_tasks<'a>(&'a mut self, tasks: Vec<ChecklistTask>) -> &'a mut Self {
70606        self.tasks = tasks;
70607        self
70608    }
70609    #[allow(rustdoc::invalid_html_tags)]
70610    #[doc = "List of tasks in the checklist"]
70611    fn rhai_get_tasks(&mut self) -> Vec<ChecklistTask> {
70612        self.tasks.clone()
70613    }
70614    #[allow(rustdoc::invalid_html_tags)]
70615    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
70616    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70617    pub fn get_others_can_add_tasks<'a>(&'a self) -> Option<bool> {
70618        self.others_can_add_tasks.as_ref().map(|v| *v)
70619    }
70620    #[allow(rustdoc::invalid_html_tags)]
70621    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
70622    #[allow(clippy::needless_lifetimes)]
70623    pub fn set_others_can_add_tasks<'a>(
70624        &'a mut self,
70625        others_can_add_tasks: Option<bool>,
70626    ) -> &'a mut Self {
70627        self.others_can_add_tasks = others_can_add_tasks;
70628        self
70629    }
70630    #[allow(rustdoc::invalid_html_tags)]
70631    #[doc = "Optional. True, if users other than the creator of the list can add tasks to the list"]
70632    fn rhai_get_others_can_add_tasks(&mut self) -> Option<bool> {
70633        self.others_can_add_tasks.as_ref().copied()
70634    }
70635    #[allow(rustdoc::invalid_html_tags)]
70636    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
70637    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70638    pub fn get_others_can_mark_tasks_as_done<'a>(&'a self) -> Option<bool> {
70639        self.others_can_mark_tasks_as_done.as_ref().map(|v| *v)
70640    }
70641    #[allow(rustdoc::invalid_html_tags)]
70642    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
70643    #[allow(clippy::needless_lifetimes)]
70644    pub fn set_others_can_mark_tasks_as_done<'a>(
70645        &'a mut self,
70646        others_can_mark_tasks_as_done: Option<bool>,
70647    ) -> &'a mut Self {
70648        self.others_can_mark_tasks_as_done = others_can_mark_tasks_as_done;
70649        self
70650    }
70651    #[allow(rustdoc::invalid_html_tags)]
70652    #[doc = "Optional. True, if users other than the creator of the list can mark tasks as done or not done"]
70653    fn rhai_get_others_can_mark_tasks_as_done(&mut self) -> Option<bool> {
70654        self.others_can_mark_tasks_as_done.as_ref().copied()
70655    }
70656}
70657#[allow(dead_code)]
70658impl BackgroundFillFreeformGradient {
70659    #[allow(clippy::too_many_arguments)]
70660    pub fn new(colors: Vec<i64>) -> Self {
70661        Self {
70662            tg_type: "BackgroundFillFreeformGradient".to_owned(),
70663            colors,
70664        }
70665    }
70666    #[allow(rustdoc::invalid_html_tags)]
70667    #[doc = "Type of the background fill, always \"freeform_gradient\""]
70668    #[allow(clippy::needless_lifetimes)]
70669    pub fn get_tg_type<'a>(&'a self) -> &'a str {
70670        self.tg_type.as_str()
70671    }
70672    #[allow(rustdoc::invalid_html_tags)]
70673    #[doc = "Type of the background fill, always \"freeform_gradient\""]
70674    #[allow(clippy::needless_lifetimes)]
70675    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
70676        self.tg_type = tg_type;
70677        self
70678    }
70679    #[allow(rustdoc::invalid_html_tags)]
70680    #[doc = "Type of the background fill, always \"freeform_gradient\""]
70681    fn rhai_get_tg_type(&mut self) -> String {
70682        self.tg_type.clone()
70683    }
70684    #[allow(rustdoc::invalid_html_tags)]
70685    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
70686    #[allow(clippy::needless_lifetimes)]
70687    pub fn get_colors<'a>(&'a self) -> &'a Vec<i64> {
70688        &self.colors
70689    }
70690    #[allow(rustdoc::invalid_html_tags)]
70691    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
70692    #[allow(clippy::needless_lifetimes)]
70693    pub fn set_colors<'a>(&'a mut self, colors: Vec<i64>) -> &'a mut Self {
70694        self.colors = colors;
70695        self
70696    }
70697    #[allow(rustdoc::invalid_html_tags)]
70698    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
70699    fn rhai_get_colors(&mut self) -> Vec<i64> {
70700        self.colors.clone()
70701    }
70702}
70703#[allow(dead_code)]
70704impl OwnedGiftUnique {
70705    #[allow(clippy::too_many_arguments)]
70706    pub fn new<A: Into<UniqueGift>>(gift: A, send_date: i64) -> Self {
70707        Self {
70708            tg_type: "OwnedGiftUnique".to_owned(),
70709            gift: BoxWrapper::new_unbox(gift.into()),
70710            send_date,
70711            owned_gift_id: None,
70712            sender_user: None,
70713            is_saved: None,
70714            can_be_transferred: None,
70715            transfer_star_count: None,
70716            next_transfer_date: None,
70717        }
70718    }
70719    #[allow(rustdoc::invalid_html_tags)]
70720    #[doc = "Type of the gift, always \"unique\""]
70721    #[allow(clippy::needless_lifetimes)]
70722    pub fn get_tg_type<'a>(&'a self) -> &'a str {
70723        self.tg_type.as_str()
70724    }
70725    #[allow(rustdoc::invalid_html_tags)]
70726    #[doc = "Type of the gift, always \"unique\""]
70727    #[allow(clippy::needless_lifetimes)]
70728    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
70729        self.tg_type = tg_type;
70730        self
70731    }
70732    #[allow(rustdoc::invalid_html_tags)]
70733    #[doc = "Type of the gift, always \"unique\""]
70734    fn rhai_get_tg_type(&mut self) -> String {
70735        self.tg_type.clone()
70736    }
70737    #[allow(rustdoc::invalid_html_tags)]
70738    #[doc = "Information about the unique gift"]
70739    #[allow(clippy::needless_lifetimes)]
70740    pub fn get_gift<'a>(&'a self) -> &'a UniqueGift {
70741        &self.gift
70742    }
70743    #[allow(rustdoc::invalid_html_tags)]
70744    #[doc = "Information about the unique gift"]
70745    #[allow(clippy::needless_lifetimes)]
70746    pub fn set_gift<'a>(&'a mut self, gift: UniqueGift) -> &'a mut Self {
70747        self.gift = BoxWrapper(Unbox(gift));
70748        self
70749    }
70750    #[allow(rustdoc::invalid_html_tags)]
70751    #[doc = "Information about the unique gift"]
70752    fn rhai_get_gift(&mut self) -> UniqueGift {
70753        self.gift.clone().into()
70754    }
70755    #[allow(rustdoc::invalid_html_tags)]
70756    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
70757    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70758    pub fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str> {
70759        self.owned_gift_id.as_ref().map(|v| v.as_str())
70760    }
70761    #[allow(rustdoc::invalid_html_tags)]
70762    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
70763    #[allow(clippy::needless_lifetimes)]
70764    pub fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self {
70765        self.owned_gift_id = owned_gift_id;
70766        self
70767    }
70768    #[allow(rustdoc::invalid_html_tags)]
70769    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
70770    fn rhai_get_owned_gift_id(&mut self) -> Option<String> {
70771        self.owned_gift_id.as_ref().cloned()
70772    }
70773    #[allow(rustdoc::invalid_html_tags)]
70774    #[doc = "Optional. Sender of the gift if it is a known user"]
70775    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70776    pub fn get_sender_user<'a>(&'a self) -> Option<&'a User> {
70777        self.sender_user.as_ref().map(|v| v.inner_ref())
70778    }
70779    #[allow(rustdoc::invalid_html_tags)]
70780    #[doc = "Optional. Sender of the gift if it is a known user"]
70781    #[allow(clippy::needless_lifetimes)]
70782    pub fn set_sender_user<'a>(&'a mut self, sender_user: Option<User>) -> &'a mut Self {
70783        self.sender_user = sender_user.map(|sender_user| BoxWrapper(Unbox(sender_user)));
70784        self
70785    }
70786    #[allow(rustdoc::invalid_html_tags)]
70787    #[doc = "Optional. Sender of the gift if it is a known user"]
70788    fn rhai_get_sender_user(&mut self) -> Option<User> {
70789        self.sender_user.as_ref().map(|v| v.clone().into())
70790    }
70791    #[allow(rustdoc::invalid_html_tags)]
70792    #[doc = "Date the gift was sent in Unix time"]
70793    #[allow(clippy::needless_lifetimes)]
70794    pub fn get_send_date<'a>(&'a self) -> i64 {
70795        self.send_date
70796    }
70797    #[allow(rustdoc::invalid_html_tags)]
70798    #[doc = "Date the gift was sent in Unix time"]
70799    #[allow(clippy::needless_lifetimes)]
70800    pub fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self {
70801        self.send_date = send_date;
70802        self
70803    }
70804    #[allow(rustdoc::invalid_html_tags)]
70805    #[doc = "Date the gift was sent in Unix time"]
70806    fn rhai_get_send_date(&mut self) -> i64 {
70807        self.send_date
70808    }
70809    #[allow(rustdoc::invalid_html_tags)]
70810    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
70811    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70812    pub fn get_is_saved<'a>(&'a self) -> Option<bool> {
70813        self.is_saved.as_ref().map(|v| *v)
70814    }
70815    #[allow(rustdoc::invalid_html_tags)]
70816    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
70817    #[allow(clippy::needless_lifetimes)]
70818    pub fn set_is_saved<'a>(&'a mut self, is_saved: Option<bool>) -> &'a mut Self {
70819        self.is_saved = is_saved;
70820        self
70821    }
70822    #[allow(rustdoc::invalid_html_tags)]
70823    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
70824    fn rhai_get_is_saved(&mut self) -> Option<bool> {
70825        self.is_saved.as_ref().copied()
70826    }
70827    #[allow(rustdoc::invalid_html_tags)]
70828    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
70829    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70830    pub fn get_can_be_transferred<'a>(&'a self) -> Option<bool> {
70831        self.can_be_transferred.as_ref().map(|v| *v)
70832    }
70833    #[allow(rustdoc::invalid_html_tags)]
70834    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
70835    #[allow(clippy::needless_lifetimes)]
70836    pub fn set_can_be_transferred<'a>(
70837        &'a mut self,
70838        can_be_transferred: Option<bool>,
70839    ) -> &'a mut Self {
70840        self.can_be_transferred = can_be_transferred;
70841        self
70842    }
70843    #[allow(rustdoc::invalid_html_tags)]
70844    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
70845    fn rhai_get_can_be_transferred(&mut self) -> Option<bool> {
70846        self.can_be_transferred.as_ref().copied()
70847    }
70848    #[allow(rustdoc::invalid_html_tags)]
70849    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
70850    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70851    pub fn get_transfer_star_count<'a>(&'a self) -> Option<i64> {
70852        self.transfer_star_count.as_ref().map(|v| *v)
70853    }
70854    #[allow(rustdoc::invalid_html_tags)]
70855    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
70856    #[allow(clippy::needless_lifetimes)]
70857    pub fn set_transfer_star_count<'a>(
70858        &'a mut self,
70859        transfer_star_count: Option<i64>,
70860    ) -> &'a mut Self {
70861        self.transfer_star_count = transfer_star_count;
70862        self
70863    }
70864    #[allow(rustdoc::invalid_html_tags)]
70865    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
70866    fn rhai_get_transfer_star_count(&mut self) -> Option<i64> {
70867        self.transfer_star_count.as_ref().copied()
70868    }
70869    #[allow(rustdoc::invalid_html_tags)]
70870    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
70871    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70872    pub fn get_next_transfer_date<'a>(&'a self) -> Option<i64> {
70873        self.next_transfer_date.as_ref().map(|v| *v)
70874    }
70875    #[allow(rustdoc::invalid_html_tags)]
70876    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
70877    #[allow(clippy::needless_lifetimes)]
70878    pub fn set_next_transfer_date<'a>(
70879        &'a mut self,
70880        next_transfer_date: Option<i64>,
70881    ) -> &'a mut Self {
70882        self.next_transfer_date = next_transfer_date;
70883        self
70884    }
70885    #[allow(rustdoc::invalid_html_tags)]
70886    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
70887    fn rhai_get_next_transfer_date(&mut self) -> Option<i64> {
70888        self.next_transfer_date.as_ref().copied()
70889    }
70890}
70891#[allow(dead_code)]
70892impl PaidMediaPreview {
70893    #[allow(clippy::too_many_arguments)]
70894    pub fn new() -> Self {
70895        Self {
70896            tg_type: "PaidMediaPreview".to_owned(),
70897            width: None,
70898            height: None,
70899            duration: None,
70900        }
70901    }
70902    #[allow(rustdoc::invalid_html_tags)]
70903    #[doc = "Type of the paid media, always \"preview\""]
70904    #[allow(clippy::needless_lifetimes)]
70905    pub fn get_tg_type<'a>(&'a self) -> &'a str {
70906        self.tg_type.as_str()
70907    }
70908    #[allow(rustdoc::invalid_html_tags)]
70909    #[doc = "Type of the paid media, always \"preview\""]
70910    #[allow(clippy::needless_lifetimes)]
70911    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
70912        self.tg_type = tg_type;
70913        self
70914    }
70915    #[allow(rustdoc::invalid_html_tags)]
70916    #[doc = "Type of the paid media, always \"preview\""]
70917    fn rhai_get_tg_type(&mut self) -> String {
70918        self.tg_type.clone()
70919    }
70920    #[allow(rustdoc::invalid_html_tags)]
70921    #[doc = "Optional. Media width as defined by the sender"]
70922    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70923    pub fn get_width<'a>(&'a self) -> Option<i64> {
70924        self.width.as_ref().map(|v| *v)
70925    }
70926    #[allow(rustdoc::invalid_html_tags)]
70927    #[doc = "Optional. Media width as defined by the sender"]
70928    #[allow(clippy::needless_lifetimes)]
70929    pub fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
70930        self.width = width;
70931        self
70932    }
70933    #[allow(rustdoc::invalid_html_tags)]
70934    #[doc = "Optional. Media width as defined by the sender"]
70935    fn rhai_get_width(&mut self) -> Option<i64> {
70936        self.width.as_ref().copied()
70937    }
70938    #[allow(rustdoc::invalid_html_tags)]
70939    #[doc = "Optional. Media height as defined by the sender"]
70940    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70941    pub fn get_height<'a>(&'a self) -> Option<i64> {
70942        self.height.as_ref().map(|v| *v)
70943    }
70944    #[allow(rustdoc::invalid_html_tags)]
70945    #[doc = "Optional. Media height as defined by the sender"]
70946    #[allow(clippy::needless_lifetimes)]
70947    pub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
70948        self.height = height;
70949        self
70950    }
70951    #[allow(rustdoc::invalid_html_tags)]
70952    #[doc = "Optional. Media height as defined by the sender"]
70953    fn rhai_get_height(&mut self) -> Option<i64> {
70954        self.height.as_ref().copied()
70955    }
70956    #[allow(rustdoc::invalid_html_tags)]
70957    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
70958    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
70959    pub fn get_duration<'a>(&'a self) -> Option<i64> {
70960        self.duration.as_ref().map(|v| *v)
70961    }
70962    #[allow(rustdoc::invalid_html_tags)]
70963    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
70964    #[allow(clippy::needless_lifetimes)]
70965    pub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
70966        self.duration = duration;
70967        self
70968    }
70969    #[allow(rustdoc::invalid_html_tags)]
70970    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
70971    fn rhai_get_duration(&mut self) -> Option<i64> {
70972        self.duration.as_ref().copied()
70973    }
70974}
70975#[allow(dead_code)]
70976impl InputTextMessageContent {
70977    #[allow(clippy::too_many_arguments)]
70978    pub fn new(message_text: String) -> Self {
70979        Self {
70980            message_text,
70981            parse_mode: None,
70982            entities: None,
70983            link_preview_options: None,
70984        }
70985    }
70986    #[allow(rustdoc::invalid_html_tags)]
70987    #[doc = "Text of the message to be sent, 1-4096 characters"]
70988    #[allow(clippy::needless_lifetimes)]
70989    pub fn get_message_text<'a>(&'a self) -> &'a str {
70990        self.message_text.as_str()
70991    }
70992    #[allow(rustdoc::invalid_html_tags)]
70993    #[doc = "Text of the message to be sent, 1-4096 characters"]
70994    #[allow(clippy::needless_lifetimes)]
70995    pub fn set_message_text<'a>(&'a mut self, message_text: String) -> &'a mut Self {
70996        self.message_text = message_text;
70997        self
70998    }
70999    #[allow(rustdoc::invalid_html_tags)]
71000    #[doc = "Text of the message to be sent, 1-4096 characters"]
71001    fn rhai_get_message_text(&mut self) -> String {
71002        self.message_text.clone()
71003    }
71004    #[allow(rustdoc::invalid_html_tags)]
71005    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
71006    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71007    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
71008        self.parse_mode.as_ref().map(|v| v.as_str())
71009    }
71010    #[allow(rustdoc::invalid_html_tags)]
71011    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
71012    #[allow(clippy::needless_lifetimes)]
71013    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
71014        self.parse_mode = parse_mode;
71015        self
71016    }
71017    #[allow(rustdoc::invalid_html_tags)]
71018    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
71019    fn rhai_get_parse_mode(&mut self) -> Option<String> {
71020        self.parse_mode.as_ref().cloned()
71021    }
71022    #[allow(rustdoc::invalid_html_tags)]
71023    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
71024    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71025    pub fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
71026        self.entities.as_ref()
71027    }
71028    #[allow(rustdoc::invalid_html_tags)]
71029    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
71030    #[allow(clippy::needless_lifetimes)]
71031    pub fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
71032        self.entities = entities;
71033        self
71034    }
71035    #[allow(rustdoc::invalid_html_tags)]
71036    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
71037    fn rhai_get_entities(&mut self) -> Option<Vec<MessageEntity>> {
71038        self.entities.as_ref().cloned()
71039    }
71040    #[allow(rustdoc::invalid_html_tags)]
71041    #[doc = "Optional. Link preview generation options for the message"]
71042    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71043    pub fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions> {
71044        self.link_preview_options.as_ref().map(|v| v.inner_ref())
71045    }
71046    #[allow(rustdoc::invalid_html_tags)]
71047    #[doc = "Optional. Link preview generation options for the message"]
71048    #[allow(clippy::needless_lifetimes)]
71049    pub fn set_link_preview_options<'a>(
71050        &'a mut self,
71051        link_preview_options: Option<LinkPreviewOptions>,
71052    ) -> &'a mut Self {
71053        self.link_preview_options = link_preview_options
71054            .map(|link_preview_options| BoxWrapper(Unbox(link_preview_options)));
71055        self
71056    }
71057    #[allow(rustdoc::invalid_html_tags)]
71058    #[doc = "Optional. Link preview generation options for the message"]
71059    fn rhai_get_link_preview_options(&mut self) -> Option<LinkPreviewOptions> {
71060        self.link_preview_options.as_ref().map(|v| v.clone().into())
71061    }
71062}
71063#[allow(dead_code)]
71064impl BotCommandScopeAllPrivateChats {
71065    #[allow(clippy::too_many_arguments)]
71066    pub fn new() -> Self {
71067        Self {
71068            tg_type: "all_private_chats".to_owned(),
71069        }
71070    }
71071    #[allow(rustdoc::invalid_html_tags)]
71072    #[doc = "Scope type, must be all_private_chats"]
71073    #[allow(clippy::needless_lifetimes)]
71074    pub fn get_tg_type<'a>(&'a self) -> &'a str {
71075        self.tg_type.as_str()
71076    }
71077    #[allow(rustdoc::invalid_html_tags)]
71078    #[doc = "Scope type, must be all_private_chats"]
71079    #[allow(clippy::needless_lifetimes)]
71080    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71081        self.tg_type = tg_type;
71082        self
71083    }
71084    #[allow(rustdoc::invalid_html_tags)]
71085    #[doc = "Scope type, must be all_private_chats"]
71086    fn rhai_get_tg_type(&mut self) -> String {
71087        self.tg_type.clone()
71088    }
71089}
71090impl TraitInlineQueryResultCachedAudio for InlineQueryResultCachedAudio {
71091    #[allow(rustdoc::invalid_html_tags)]
71092    #[doc = "Type of the result, must be audio"]
71093    #[allow(clippy::needless_lifetimes)]
71094    fn get_tg_type<'a>(&'a self) -> &'a str {
71095        self.tg_type.as_str()
71096    }
71097    #[allow(rustdoc::invalid_html_tags)]
71098    #[doc = "Type of the result, must be audio"]
71099    #[allow(clippy::needless_lifetimes)]
71100    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71101        self.tg_type = tg_type;
71102        self
71103    }
71104    #[allow(rustdoc::invalid_html_tags)]
71105    #[doc = "Unique identifier for this result, 1-64 bytes"]
71106    #[allow(clippy::needless_lifetimes)]
71107    fn get_id<'a>(&'a self) -> &'a str {
71108        self.id.as_str()
71109    }
71110    #[allow(rustdoc::invalid_html_tags)]
71111    #[doc = "Unique identifier for this result, 1-64 bytes"]
71112    #[allow(clippy::needless_lifetimes)]
71113    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
71114        self.id = id;
71115        self
71116    }
71117    #[allow(rustdoc::invalid_html_tags)]
71118    #[doc = "A valid file identifier for the audio file"]
71119    #[allow(clippy::needless_lifetimes)]
71120    fn get_audio_file_id<'a>(&'a self) -> &'a str {
71121        self.audio_file_id.as_str()
71122    }
71123    #[allow(rustdoc::invalid_html_tags)]
71124    #[doc = "A valid file identifier for the audio file"]
71125    #[allow(clippy::needless_lifetimes)]
71126    fn set_audio_file_id<'a>(&'a mut self, audio_file_id: String) -> &'a mut Self {
71127        self.audio_file_id = audio_file_id;
71128        self
71129    }
71130    #[allow(rustdoc::invalid_html_tags)]
71131    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
71132    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71133    fn get_caption<'a>(&'a self) -> Option<&'a str> {
71134        self.caption.as_ref().map(|v| v.as_str())
71135    }
71136    #[allow(rustdoc::invalid_html_tags)]
71137    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
71138    #[allow(clippy::needless_lifetimes)]
71139    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
71140        self.caption = caption;
71141        self
71142    }
71143    #[allow(rustdoc::invalid_html_tags)]
71144    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
71145    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71146    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
71147        self.parse_mode.as_ref().map(|v| v.as_str())
71148    }
71149    #[allow(rustdoc::invalid_html_tags)]
71150    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
71151    #[allow(clippy::needless_lifetimes)]
71152    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
71153        self.parse_mode = parse_mode;
71154        self
71155    }
71156    #[allow(rustdoc::invalid_html_tags)]
71157    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71158    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71159    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
71160        self.caption_entities.as_ref()
71161    }
71162    #[allow(rustdoc::invalid_html_tags)]
71163    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71164    #[allow(clippy::needless_lifetimes)]
71165    fn set_caption_entities<'a>(
71166        &'a mut self,
71167        caption_entities: Option<Vec<MessageEntity>>,
71168    ) -> &'a mut Self {
71169        self.caption_entities = caption_entities;
71170        self
71171    }
71172    #[allow(rustdoc::invalid_html_tags)]
71173    #[doc = "Optional. Inline keyboard attached to the message"]
71174    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71175    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
71176        self.reply_markup.as_ref().map(|v| v.inner_ref())
71177    }
71178    #[allow(rustdoc::invalid_html_tags)]
71179    #[doc = "Optional. Inline keyboard attached to the message"]
71180    #[allow(clippy::needless_lifetimes)]
71181    fn set_reply_markup<'a>(
71182        &'a mut self,
71183        reply_markup: Option<InlineKeyboardMarkup>,
71184    ) -> &'a mut Self {
71185        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
71186        self
71187    }
71188    #[allow(rustdoc::invalid_html_tags)]
71189    #[doc = "Optional. Content of the message to be sent instead of the audio"]
71190    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71191    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
71192        self.input_message_content.as_ref().map(|v| v.inner_ref())
71193    }
71194    #[allow(rustdoc::invalid_html_tags)]
71195    #[doc = "Optional. Content of the message to be sent instead of the audio"]
71196    #[allow(clippy::needless_lifetimes)]
71197    fn set_input_message_content<'a>(
71198        &'a mut self,
71199        input_message_content: Option<InputMessageContent>,
71200    ) -> &'a mut Self {
71201        self.input_message_content = input_message_content
71202            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
71203        self
71204    }
71205}
71206impl TraitInlineQueryResultCachedDocument for InlineQueryResultCachedDocument {
71207    #[allow(rustdoc::invalid_html_tags)]
71208    #[doc = "Type of the result, must be document"]
71209    #[allow(clippy::needless_lifetimes)]
71210    fn get_tg_type<'a>(&'a self) -> &'a str {
71211        self.tg_type.as_str()
71212    }
71213    #[allow(rustdoc::invalid_html_tags)]
71214    #[doc = "Type of the result, must be document"]
71215    #[allow(clippy::needless_lifetimes)]
71216    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71217        self.tg_type = tg_type;
71218        self
71219    }
71220    #[allow(rustdoc::invalid_html_tags)]
71221    #[doc = "Unique identifier for this result, 1-64 bytes"]
71222    #[allow(clippy::needless_lifetimes)]
71223    fn get_id<'a>(&'a self) -> &'a str {
71224        self.id.as_str()
71225    }
71226    #[allow(rustdoc::invalid_html_tags)]
71227    #[doc = "Unique identifier for this result, 1-64 bytes"]
71228    #[allow(clippy::needless_lifetimes)]
71229    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
71230        self.id = id;
71231        self
71232    }
71233    #[allow(rustdoc::invalid_html_tags)]
71234    #[doc = "Title for the result"]
71235    #[allow(clippy::needless_lifetimes)]
71236    fn get_title<'a>(&'a self) -> &'a str {
71237        self.title.as_str()
71238    }
71239    #[allow(rustdoc::invalid_html_tags)]
71240    #[doc = "Title for the result"]
71241    #[allow(clippy::needless_lifetimes)]
71242    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
71243        self.title = title;
71244        self
71245    }
71246    #[allow(rustdoc::invalid_html_tags)]
71247    #[doc = "A valid file identifier for the file"]
71248    #[allow(clippy::needless_lifetimes)]
71249    fn get_document_file_id<'a>(&'a self) -> &'a str {
71250        self.document_file_id.as_str()
71251    }
71252    #[allow(rustdoc::invalid_html_tags)]
71253    #[doc = "A valid file identifier for the file"]
71254    #[allow(clippy::needless_lifetimes)]
71255    fn set_document_file_id<'a>(&'a mut self, document_file_id: String) -> &'a mut Self {
71256        self.document_file_id = document_file_id;
71257        self
71258    }
71259    #[allow(rustdoc::invalid_html_tags)]
71260    #[doc = "Optional. Short description of the result"]
71261    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71262    fn get_description<'a>(&'a self) -> Option<&'a str> {
71263        self.description.as_ref().map(|v| v.as_str())
71264    }
71265    #[allow(rustdoc::invalid_html_tags)]
71266    #[doc = "Optional. Short description of the result"]
71267    #[allow(clippy::needless_lifetimes)]
71268    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
71269        self.description = description;
71270        self
71271    }
71272    #[allow(rustdoc::invalid_html_tags)]
71273    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
71274    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71275    fn get_caption<'a>(&'a self) -> Option<&'a str> {
71276        self.caption.as_ref().map(|v| v.as_str())
71277    }
71278    #[allow(rustdoc::invalid_html_tags)]
71279    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
71280    #[allow(clippy::needless_lifetimes)]
71281    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
71282        self.caption = caption;
71283        self
71284    }
71285    #[allow(rustdoc::invalid_html_tags)]
71286    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
71287    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71288    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
71289        self.parse_mode.as_ref().map(|v| v.as_str())
71290    }
71291    #[allow(rustdoc::invalid_html_tags)]
71292    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
71293    #[allow(clippy::needless_lifetimes)]
71294    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
71295        self.parse_mode = parse_mode;
71296        self
71297    }
71298    #[allow(rustdoc::invalid_html_tags)]
71299    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71300    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71301    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
71302        self.caption_entities.as_ref()
71303    }
71304    #[allow(rustdoc::invalid_html_tags)]
71305    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71306    #[allow(clippy::needless_lifetimes)]
71307    fn set_caption_entities<'a>(
71308        &'a mut self,
71309        caption_entities: Option<Vec<MessageEntity>>,
71310    ) -> &'a mut Self {
71311        self.caption_entities = caption_entities;
71312        self
71313    }
71314    #[allow(rustdoc::invalid_html_tags)]
71315    #[doc = "Optional. Inline keyboard attached to the message"]
71316    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71317    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
71318        self.reply_markup.as_ref().map(|v| v.inner_ref())
71319    }
71320    #[allow(rustdoc::invalid_html_tags)]
71321    #[doc = "Optional. Inline keyboard attached to the message"]
71322    #[allow(clippy::needless_lifetimes)]
71323    fn set_reply_markup<'a>(
71324        &'a mut self,
71325        reply_markup: Option<InlineKeyboardMarkup>,
71326    ) -> &'a mut Self {
71327        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
71328        self
71329    }
71330    #[allow(rustdoc::invalid_html_tags)]
71331    #[doc = "Optional. Content of the message to be sent instead of the file"]
71332    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71333    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
71334        self.input_message_content.as_ref().map(|v| v.inner_ref())
71335    }
71336    #[allow(rustdoc::invalid_html_tags)]
71337    #[doc = "Optional. Content of the message to be sent instead of the file"]
71338    #[allow(clippy::needless_lifetimes)]
71339    fn set_input_message_content<'a>(
71340        &'a mut self,
71341        input_message_content: Option<InputMessageContent>,
71342    ) -> &'a mut Self {
71343        self.input_message_content = input_message_content
71344            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
71345        self
71346    }
71347}
71348impl TraitInlineQueryResultCachedGif for InlineQueryResultCachedGif {
71349    #[allow(rustdoc::invalid_html_tags)]
71350    #[doc = "Type of the result, must be gif"]
71351    #[allow(clippy::needless_lifetimes)]
71352    fn get_tg_type<'a>(&'a self) -> &'a str {
71353        self.tg_type.as_str()
71354    }
71355    #[allow(rustdoc::invalid_html_tags)]
71356    #[doc = "Type of the result, must be gif"]
71357    #[allow(clippy::needless_lifetimes)]
71358    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71359        self.tg_type = tg_type;
71360        self
71361    }
71362    #[allow(rustdoc::invalid_html_tags)]
71363    #[doc = "Unique identifier for this result, 1-64 bytes"]
71364    #[allow(clippy::needless_lifetimes)]
71365    fn get_id<'a>(&'a self) -> &'a str {
71366        self.id.as_str()
71367    }
71368    #[allow(rustdoc::invalid_html_tags)]
71369    #[doc = "Unique identifier for this result, 1-64 bytes"]
71370    #[allow(clippy::needless_lifetimes)]
71371    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
71372        self.id = id;
71373        self
71374    }
71375    #[allow(rustdoc::invalid_html_tags)]
71376    #[doc = "A valid file identifier for the GIF file"]
71377    #[allow(clippy::needless_lifetimes)]
71378    fn get_gif_file_id<'a>(&'a self) -> &'a str {
71379        self.gif_file_id.as_str()
71380    }
71381    #[allow(rustdoc::invalid_html_tags)]
71382    #[doc = "A valid file identifier for the GIF file"]
71383    #[allow(clippy::needless_lifetimes)]
71384    fn set_gif_file_id<'a>(&'a mut self, gif_file_id: String) -> &'a mut Self {
71385        self.gif_file_id = gif_file_id;
71386        self
71387    }
71388    #[allow(rustdoc::invalid_html_tags)]
71389    #[doc = "Optional. Title for the result"]
71390    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71391    fn get_title<'a>(&'a self) -> Option<&'a str> {
71392        self.title.as_ref().map(|v| v.as_str())
71393    }
71394    #[allow(rustdoc::invalid_html_tags)]
71395    #[doc = "Optional. Title for the result"]
71396    #[allow(clippy::needless_lifetimes)]
71397    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
71398        self.title = title;
71399        self
71400    }
71401    #[allow(rustdoc::invalid_html_tags)]
71402    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
71403    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71404    fn get_caption<'a>(&'a self) -> Option<&'a str> {
71405        self.caption.as_ref().map(|v| v.as_str())
71406    }
71407    #[allow(rustdoc::invalid_html_tags)]
71408    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
71409    #[allow(clippy::needless_lifetimes)]
71410    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
71411        self.caption = caption;
71412        self
71413    }
71414    #[allow(rustdoc::invalid_html_tags)]
71415    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
71416    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71417    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
71418        self.parse_mode.as_ref().map(|v| v.as_str())
71419    }
71420    #[allow(rustdoc::invalid_html_tags)]
71421    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
71422    #[allow(clippy::needless_lifetimes)]
71423    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
71424        self.parse_mode = parse_mode;
71425        self
71426    }
71427    #[allow(rustdoc::invalid_html_tags)]
71428    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71429    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71430    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
71431        self.caption_entities.as_ref()
71432    }
71433    #[allow(rustdoc::invalid_html_tags)]
71434    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71435    #[allow(clippy::needless_lifetimes)]
71436    fn set_caption_entities<'a>(
71437        &'a mut self,
71438        caption_entities: Option<Vec<MessageEntity>>,
71439    ) -> &'a mut Self {
71440        self.caption_entities = caption_entities;
71441        self
71442    }
71443    #[allow(rustdoc::invalid_html_tags)]
71444    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71445    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71446    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
71447        self.show_caption_above_media.as_ref().map(|v| *v)
71448    }
71449    #[allow(rustdoc::invalid_html_tags)]
71450    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71451    #[allow(clippy::needless_lifetimes)]
71452    fn set_show_caption_above_media<'a>(
71453        &'a mut self,
71454        show_caption_above_media: Option<bool>,
71455    ) -> &'a mut Self {
71456        self.show_caption_above_media = show_caption_above_media;
71457        self
71458    }
71459    #[allow(rustdoc::invalid_html_tags)]
71460    #[doc = "Optional. Inline keyboard attached to the message"]
71461    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71462    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
71463        self.reply_markup.as_ref().map(|v| v.inner_ref())
71464    }
71465    #[allow(rustdoc::invalid_html_tags)]
71466    #[doc = "Optional. Inline keyboard attached to the message"]
71467    #[allow(clippy::needless_lifetimes)]
71468    fn set_reply_markup<'a>(
71469        &'a mut self,
71470        reply_markup: Option<InlineKeyboardMarkup>,
71471    ) -> &'a mut Self {
71472        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
71473        self
71474    }
71475    #[allow(rustdoc::invalid_html_tags)]
71476    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
71477    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71478    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
71479        self.input_message_content.as_ref().map(|v| v.inner_ref())
71480    }
71481    #[allow(rustdoc::invalid_html_tags)]
71482    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
71483    #[allow(clippy::needless_lifetimes)]
71484    fn set_input_message_content<'a>(
71485        &'a mut self,
71486        input_message_content: Option<InputMessageContent>,
71487    ) -> &'a mut Self {
71488        self.input_message_content = input_message_content
71489            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
71490        self
71491    }
71492}
71493impl TraitInlineQueryResultCachedMpeg4Gif for InlineQueryResultCachedMpeg4Gif {
71494    #[allow(rustdoc::invalid_html_tags)]
71495    #[doc = "Type of the result, must be mpeg4_gif"]
71496    #[allow(clippy::needless_lifetimes)]
71497    fn get_tg_type<'a>(&'a self) -> &'a str {
71498        self.tg_type.as_str()
71499    }
71500    #[allow(rustdoc::invalid_html_tags)]
71501    #[doc = "Type of the result, must be mpeg4_gif"]
71502    #[allow(clippy::needless_lifetimes)]
71503    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71504        self.tg_type = tg_type;
71505        self
71506    }
71507    #[allow(rustdoc::invalid_html_tags)]
71508    #[doc = "Unique identifier for this result, 1-64 bytes"]
71509    #[allow(clippy::needless_lifetimes)]
71510    fn get_id<'a>(&'a self) -> &'a str {
71511        self.id.as_str()
71512    }
71513    #[allow(rustdoc::invalid_html_tags)]
71514    #[doc = "Unique identifier for this result, 1-64 bytes"]
71515    #[allow(clippy::needless_lifetimes)]
71516    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
71517        self.id = id;
71518        self
71519    }
71520    #[allow(rustdoc::invalid_html_tags)]
71521    #[doc = "A valid file identifier for the MPEG4 file"]
71522    #[allow(clippy::needless_lifetimes)]
71523    fn get_mpeg_4_file_id<'a>(&'a self) -> &'a str {
71524        self.mpeg_4_file_id.as_str()
71525    }
71526    #[allow(rustdoc::invalid_html_tags)]
71527    #[doc = "A valid file identifier for the MPEG4 file"]
71528    #[allow(clippy::needless_lifetimes)]
71529    fn set_mpeg_4_file_id<'a>(&'a mut self, mpeg_4_file_id: String) -> &'a mut Self {
71530        self.mpeg_4_file_id = mpeg_4_file_id;
71531        self
71532    }
71533    #[allow(rustdoc::invalid_html_tags)]
71534    #[doc = "Optional. Title for the result"]
71535    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71536    fn get_title<'a>(&'a self) -> Option<&'a str> {
71537        self.title.as_ref().map(|v| v.as_str())
71538    }
71539    #[allow(rustdoc::invalid_html_tags)]
71540    #[doc = "Optional. Title for the result"]
71541    #[allow(clippy::needless_lifetimes)]
71542    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
71543        self.title = title;
71544        self
71545    }
71546    #[allow(rustdoc::invalid_html_tags)]
71547    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
71548    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71549    fn get_caption<'a>(&'a self) -> Option<&'a str> {
71550        self.caption.as_ref().map(|v| v.as_str())
71551    }
71552    #[allow(rustdoc::invalid_html_tags)]
71553    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
71554    #[allow(clippy::needless_lifetimes)]
71555    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
71556        self.caption = caption;
71557        self
71558    }
71559    #[allow(rustdoc::invalid_html_tags)]
71560    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
71561    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71562    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
71563        self.parse_mode.as_ref().map(|v| v.as_str())
71564    }
71565    #[allow(rustdoc::invalid_html_tags)]
71566    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
71567    #[allow(clippy::needless_lifetimes)]
71568    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
71569        self.parse_mode = parse_mode;
71570        self
71571    }
71572    #[allow(rustdoc::invalid_html_tags)]
71573    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71574    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71575    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
71576        self.caption_entities.as_ref()
71577    }
71578    #[allow(rustdoc::invalid_html_tags)]
71579    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71580    #[allow(clippy::needless_lifetimes)]
71581    fn set_caption_entities<'a>(
71582        &'a mut self,
71583        caption_entities: Option<Vec<MessageEntity>>,
71584    ) -> &'a mut Self {
71585        self.caption_entities = caption_entities;
71586        self
71587    }
71588    #[allow(rustdoc::invalid_html_tags)]
71589    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71590    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71591    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
71592        self.show_caption_above_media.as_ref().map(|v| *v)
71593    }
71594    #[allow(rustdoc::invalid_html_tags)]
71595    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71596    #[allow(clippy::needless_lifetimes)]
71597    fn set_show_caption_above_media<'a>(
71598        &'a mut self,
71599        show_caption_above_media: Option<bool>,
71600    ) -> &'a mut Self {
71601        self.show_caption_above_media = show_caption_above_media;
71602        self
71603    }
71604    #[allow(rustdoc::invalid_html_tags)]
71605    #[doc = "Optional. Inline keyboard attached to the message"]
71606    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71607    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
71608        self.reply_markup.as_ref().map(|v| v.inner_ref())
71609    }
71610    #[allow(rustdoc::invalid_html_tags)]
71611    #[doc = "Optional. Inline keyboard attached to the message"]
71612    #[allow(clippy::needless_lifetimes)]
71613    fn set_reply_markup<'a>(
71614        &'a mut self,
71615        reply_markup: Option<InlineKeyboardMarkup>,
71616    ) -> &'a mut Self {
71617        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
71618        self
71619    }
71620    #[allow(rustdoc::invalid_html_tags)]
71621    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
71622    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71623    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
71624        self.input_message_content.as_ref().map(|v| v.inner_ref())
71625    }
71626    #[allow(rustdoc::invalid_html_tags)]
71627    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
71628    #[allow(clippy::needless_lifetimes)]
71629    fn set_input_message_content<'a>(
71630        &'a mut self,
71631        input_message_content: Option<InputMessageContent>,
71632    ) -> &'a mut Self {
71633        self.input_message_content = input_message_content
71634            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
71635        self
71636    }
71637}
71638impl TraitInlineQueryResultCachedPhoto for InlineQueryResultCachedPhoto {
71639    #[allow(rustdoc::invalid_html_tags)]
71640    #[doc = "Type of the result, must be photo"]
71641    #[allow(clippy::needless_lifetimes)]
71642    fn get_tg_type<'a>(&'a self) -> &'a str {
71643        self.tg_type.as_str()
71644    }
71645    #[allow(rustdoc::invalid_html_tags)]
71646    #[doc = "Type of the result, must be photo"]
71647    #[allow(clippy::needless_lifetimes)]
71648    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71649        self.tg_type = tg_type;
71650        self
71651    }
71652    #[allow(rustdoc::invalid_html_tags)]
71653    #[doc = "Unique identifier for this result, 1-64 bytes"]
71654    #[allow(clippy::needless_lifetimes)]
71655    fn get_id<'a>(&'a self) -> &'a str {
71656        self.id.as_str()
71657    }
71658    #[allow(rustdoc::invalid_html_tags)]
71659    #[doc = "Unique identifier for this result, 1-64 bytes"]
71660    #[allow(clippy::needless_lifetimes)]
71661    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
71662        self.id = id;
71663        self
71664    }
71665    #[allow(rustdoc::invalid_html_tags)]
71666    #[doc = "A valid file identifier of the photo"]
71667    #[allow(clippy::needless_lifetimes)]
71668    fn get_photo_file_id<'a>(&'a self) -> &'a str {
71669        self.photo_file_id.as_str()
71670    }
71671    #[allow(rustdoc::invalid_html_tags)]
71672    #[doc = "A valid file identifier of the photo"]
71673    #[allow(clippy::needless_lifetimes)]
71674    fn set_photo_file_id<'a>(&'a mut self, photo_file_id: String) -> &'a mut Self {
71675        self.photo_file_id = photo_file_id;
71676        self
71677    }
71678    #[allow(rustdoc::invalid_html_tags)]
71679    #[doc = "Optional. Title for the result"]
71680    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71681    fn get_title<'a>(&'a self) -> Option<&'a str> {
71682        self.title.as_ref().map(|v| v.as_str())
71683    }
71684    #[allow(rustdoc::invalid_html_tags)]
71685    #[doc = "Optional. Title for the result"]
71686    #[allow(clippy::needless_lifetimes)]
71687    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
71688        self.title = title;
71689        self
71690    }
71691    #[allow(rustdoc::invalid_html_tags)]
71692    #[doc = "Optional. Short description of the result"]
71693    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71694    fn get_description<'a>(&'a self) -> Option<&'a str> {
71695        self.description.as_ref().map(|v| v.as_str())
71696    }
71697    #[allow(rustdoc::invalid_html_tags)]
71698    #[doc = "Optional. Short description of the result"]
71699    #[allow(clippy::needless_lifetimes)]
71700    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
71701        self.description = description;
71702        self
71703    }
71704    #[allow(rustdoc::invalid_html_tags)]
71705    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
71706    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71707    fn get_caption<'a>(&'a self) -> Option<&'a str> {
71708        self.caption.as_ref().map(|v| v.as_str())
71709    }
71710    #[allow(rustdoc::invalid_html_tags)]
71711    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
71712    #[allow(clippy::needless_lifetimes)]
71713    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
71714        self.caption = caption;
71715        self
71716    }
71717    #[allow(rustdoc::invalid_html_tags)]
71718    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
71719    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71720    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
71721        self.parse_mode.as_ref().map(|v| v.as_str())
71722    }
71723    #[allow(rustdoc::invalid_html_tags)]
71724    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
71725    #[allow(clippy::needless_lifetimes)]
71726    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
71727        self.parse_mode = parse_mode;
71728        self
71729    }
71730    #[allow(rustdoc::invalid_html_tags)]
71731    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71732    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71733    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
71734        self.caption_entities.as_ref()
71735    }
71736    #[allow(rustdoc::invalid_html_tags)]
71737    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71738    #[allow(clippy::needless_lifetimes)]
71739    fn set_caption_entities<'a>(
71740        &'a mut self,
71741        caption_entities: Option<Vec<MessageEntity>>,
71742    ) -> &'a mut Self {
71743        self.caption_entities = caption_entities;
71744        self
71745    }
71746    #[allow(rustdoc::invalid_html_tags)]
71747    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71748    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71749    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
71750        self.show_caption_above_media.as_ref().map(|v| *v)
71751    }
71752    #[allow(rustdoc::invalid_html_tags)]
71753    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71754    #[allow(clippy::needless_lifetimes)]
71755    fn set_show_caption_above_media<'a>(
71756        &'a mut self,
71757        show_caption_above_media: Option<bool>,
71758    ) -> &'a mut Self {
71759        self.show_caption_above_media = show_caption_above_media;
71760        self
71761    }
71762    #[allow(rustdoc::invalid_html_tags)]
71763    #[doc = "Optional. Inline keyboard attached to the message"]
71764    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71765    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
71766        self.reply_markup.as_ref().map(|v| v.inner_ref())
71767    }
71768    #[allow(rustdoc::invalid_html_tags)]
71769    #[doc = "Optional. Inline keyboard attached to the message"]
71770    #[allow(clippy::needless_lifetimes)]
71771    fn set_reply_markup<'a>(
71772        &'a mut self,
71773        reply_markup: Option<InlineKeyboardMarkup>,
71774    ) -> &'a mut Self {
71775        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
71776        self
71777    }
71778    #[allow(rustdoc::invalid_html_tags)]
71779    #[doc = "Optional. Content of the message to be sent instead of the photo"]
71780    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71781    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
71782        self.input_message_content.as_ref().map(|v| v.inner_ref())
71783    }
71784    #[allow(rustdoc::invalid_html_tags)]
71785    #[doc = "Optional. Content of the message to be sent instead of the photo"]
71786    #[allow(clippy::needless_lifetimes)]
71787    fn set_input_message_content<'a>(
71788        &'a mut self,
71789        input_message_content: Option<InputMessageContent>,
71790    ) -> &'a mut Self {
71791        self.input_message_content = input_message_content
71792            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
71793        self
71794    }
71795}
71796impl TraitInlineQueryResultCachedSticker for InlineQueryResultCachedSticker {
71797    #[allow(rustdoc::invalid_html_tags)]
71798    #[doc = "Type of the result, must be sticker"]
71799    #[allow(clippy::needless_lifetimes)]
71800    fn get_tg_type<'a>(&'a self) -> &'a str {
71801        self.tg_type.as_str()
71802    }
71803    #[allow(rustdoc::invalid_html_tags)]
71804    #[doc = "Type of the result, must be sticker"]
71805    #[allow(clippy::needless_lifetimes)]
71806    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71807        self.tg_type = tg_type;
71808        self
71809    }
71810    #[allow(rustdoc::invalid_html_tags)]
71811    #[doc = "Unique identifier for this result, 1-64 bytes"]
71812    #[allow(clippy::needless_lifetimes)]
71813    fn get_id<'a>(&'a self) -> &'a str {
71814        self.id.as_str()
71815    }
71816    #[allow(rustdoc::invalid_html_tags)]
71817    #[doc = "Unique identifier for this result, 1-64 bytes"]
71818    #[allow(clippy::needless_lifetimes)]
71819    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
71820        self.id = id;
71821        self
71822    }
71823    #[allow(rustdoc::invalid_html_tags)]
71824    #[doc = "A valid file identifier of the sticker"]
71825    #[allow(clippy::needless_lifetimes)]
71826    fn get_sticker_file_id<'a>(&'a self) -> &'a str {
71827        self.sticker_file_id.as_str()
71828    }
71829    #[allow(rustdoc::invalid_html_tags)]
71830    #[doc = "A valid file identifier of the sticker"]
71831    #[allow(clippy::needless_lifetimes)]
71832    fn set_sticker_file_id<'a>(&'a mut self, sticker_file_id: String) -> &'a mut Self {
71833        self.sticker_file_id = sticker_file_id;
71834        self
71835    }
71836    #[allow(rustdoc::invalid_html_tags)]
71837    #[doc = "Optional. Inline keyboard attached to the message"]
71838    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71839    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
71840        self.reply_markup.as_ref().map(|v| v.inner_ref())
71841    }
71842    #[allow(rustdoc::invalid_html_tags)]
71843    #[doc = "Optional. Inline keyboard attached to the message"]
71844    #[allow(clippy::needless_lifetimes)]
71845    fn set_reply_markup<'a>(
71846        &'a mut self,
71847        reply_markup: Option<InlineKeyboardMarkup>,
71848    ) -> &'a mut Self {
71849        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
71850        self
71851    }
71852    #[allow(rustdoc::invalid_html_tags)]
71853    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
71854    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71855    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
71856        self.input_message_content.as_ref().map(|v| v.inner_ref())
71857    }
71858    #[allow(rustdoc::invalid_html_tags)]
71859    #[doc = "Optional. Content of the message to be sent instead of the sticker"]
71860    #[allow(clippy::needless_lifetimes)]
71861    fn set_input_message_content<'a>(
71862        &'a mut self,
71863        input_message_content: Option<InputMessageContent>,
71864    ) -> &'a mut Self {
71865        self.input_message_content = input_message_content
71866            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
71867        self
71868    }
71869}
71870impl TraitInlineQueryResultCachedVideo for InlineQueryResultCachedVideo {
71871    #[allow(rustdoc::invalid_html_tags)]
71872    #[doc = "Type of the result, must be video"]
71873    #[allow(clippy::needless_lifetimes)]
71874    fn get_tg_type<'a>(&'a self) -> &'a str {
71875        self.tg_type.as_str()
71876    }
71877    #[allow(rustdoc::invalid_html_tags)]
71878    #[doc = "Type of the result, must be video"]
71879    #[allow(clippy::needless_lifetimes)]
71880    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
71881        self.tg_type = tg_type;
71882        self
71883    }
71884    #[allow(rustdoc::invalid_html_tags)]
71885    #[doc = "Unique identifier for this result, 1-64 bytes"]
71886    #[allow(clippy::needless_lifetimes)]
71887    fn get_id<'a>(&'a self) -> &'a str {
71888        self.id.as_str()
71889    }
71890    #[allow(rustdoc::invalid_html_tags)]
71891    #[doc = "Unique identifier for this result, 1-64 bytes"]
71892    #[allow(clippy::needless_lifetimes)]
71893    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
71894        self.id = id;
71895        self
71896    }
71897    #[allow(rustdoc::invalid_html_tags)]
71898    #[doc = "A valid file identifier for the video file"]
71899    #[allow(clippy::needless_lifetimes)]
71900    fn get_video_file_id<'a>(&'a self) -> &'a str {
71901        self.video_file_id.as_str()
71902    }
71903    #[allow(rustdoc::invalid_html_tags)]
71904    #[doc = "A valid file identifier for the video file"]
71905    #[allow(clippy::needless_lifetimes)]
71906    fn set_video_file_id<'a>(&'a mut self, video_file_id: String) -> &'a mut Self {
71907        self.video_file_id = video_file_id;
71908        self
71909    }
71910    #[allow(rustdoc::invalid_html_tags)]
71911    #[doc = "Title for the result"]
71912    #[allow(clippy::needless_lifetimes)]
71913    fn get_title<'a>(&'a self) -> &'a str {
71914        self.title.as_str()
71915    }
71916    #[allow(rustdoc::invalid_html_tags)]
71917    #[doc = "Title for the result"]
71918    #[allow(clippy::needless_lifetimes)]
71919    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
71920        self.title = title;
71921        self
71922    }
71923    #[allow(rustdoc::invalid_html_tags)]
71924    #[doc = "Optional. Short description of the result"]
71925    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71926    fn get_description<'a>(&'a self) -> Option<&'a str> {
71927        self.description.as_ref().map(|v| v.as_str())
71928    }
71929    #[allow(rustdoc::invalid_html_tags)]
71930    #[doc = "Optional. Short description of the result"]
71931    #[allow(clippy::needless_lifetimes)]
71932    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
71933        self.description = description;
71934        self
71935    }
71936    #[allow(rustdoc::invalid_html_tags)]
71937    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
71938    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71939    fn get_caption<'a>(&'a self) -> Option<&'a str> {
71940        self.caption.as_ref().map(|v| v.as_str())
71941    }
71942    #[allow(rustdoc::invalid_html_tags)]
71943    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
71944    #[allow(clippy::needless_lifetimes)]
71945    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
71946        self.caption = caption;
71947        self
71948    }
71949    #[allow(rustdoc::invalid_html_tags)]
71950    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
71951    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71952    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
71953        self.parse_mode.as_ref().map(|v| v.as_str())
71954    }
71955    #[allow(rustdoc::invalid_html_tags)]
71956    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
71957    #[allow(clippy::needless_lifetimes)]
71958    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
71959        self.parse_mode = parse_mode;
71960        self
71961    }
71962    #[allow(rustdoc::invalid_html_tags)]
71963    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71964    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71965    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
71966        self.caption_entities.as_ref()
71967    }
71968    #[allow(rustdoc::invalid_html_tags)]
71969    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
71970    #[allow(clippy::needless_lifetimes)]
71971    fn set_caption_entities<'a>(
71972        &'a mut self,
71973        caption_entities: Option<Vec<MessageEntity>>,
71974    ) -> &'a mut Self {
71975        self.caption_entities = caption_entities;
71976        self
71977    }
71978    #[allow(rustdoc::invalid_html_tags)]
71979    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71980    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71981    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
71982        self.show_caption_above_media.as_ref().map(|v| *v)
71983    }
71984    #[allow(rustdoc::invalid_html_tags)]
71985    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
71986    #[allow(clippy::needless_lifetimes)]
71987    fn set_show_caption_above_media<'a>(
71988        &'a mut self,
71989        show_caption_above_media: Option<bool>,
71990    ) -> &'a mut Self {
71991        self.show_caption_above_media = show_caption_above_media;
71992        self
71993    }
71994    #[allow(rustdoc::invalid_html_tags)]
71995    #[doc = "Optional. Inline keyboard attached to the message"]
71996    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
71997    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
71998        self.reply_markup.as_ref().map(|v| v.inner_ref())
71999    }
72000    #[allow(rustdoc::invalid_html_tags)]
72001    #[doc = "Optional. Inline keyboard attached to the message"]
72002    #[allow(clippy::needless_lifetimes)]
72003    fn set_reply_markup<'a>(
72004        &'a mut self,
72005        reply_markup: Option<InlineKeyboardMarkup>,
72006    ) -> &'a mut Self {
72007        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
72008        self
72009    }
72010    #[allow(rustdoc::invalid_html_tags)]
72011    #[doc = "Optional. Content of the message to be sent instead of the video"]
72012    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72013    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
72014        self.input_message_content.as_ref().map(|v| v.inner_ref())
72015    }
72016    #[allow(rustdoc::invalid_html_tags)]
72017    #[doc = "Optional. Content of the message to be sent instead of the video"]
72018    #[allow(clippy::needless_lifetimes)]
72019    fn set_input_message_content<'a>(
72020        &'a mut self,
72021        input_message_content: Option<InputMessageContent>,
72022    ) -> &'a mut Self {
72023        self.input_message_content = input_message_content
72024            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
72025        self
72026    }
72027}
72028impl TraitInlineQueryResultCachedVoice for InlineQueryResultCachedVoice {
72029    #[allow(rustdoc::invalid_html_tags)]
72030    #[doc = "Type of the result, must be voice"]
72031    #[allow(clippy::needless_lifetimes)]
72032    fn get_tg_type<'a>(&'a self) -> &'a str {
72033        self.tg_type.as_str()
72034    }
72035    #[allow(rustdoc::invalid_html_tags)]
72036    #[doc = "Type of the result, must be voice"]
72037    #[allow(clippy::needless_lifetimes)]
72038    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
72039        self.tg_type = tg_type;
72040        self
72041    }
72042    #[allow(rustdoc::invalid_html_tags)]
72043    #[doc = "Unique identifier for this result, 1-64 bytes"]
72044    #[allow(clippy::needless_lifetimes)]
72045    fn get_id<'a>(&'a self) -> &'a str {
72046        self.id.as_str()
72047    }
72048    #[allow(rustdoc::invalid_html_tags)]
72049    #[doc = "Unique identifier for this result, 1-64 bytes"]
72050    #[allow(clippy::needless_lifetimes)]
72051    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
72052        self.id = id;
72053        self
72054    }
72055    #[allow(rustdoc::invalid_html_tags)]
72056    #[doc = "A valid file identifier for the voice message"]
72057    #[allow(clippy::needless_lifetimes)]
72058    fn get_voice_file_id<'a>(&'a self) -> &'a str {
72059        self.voice_file_id.as_str()
72060    }
72061    #[allow(rustdoc::invalid_html_tags)]
72062    #[doc = "A valid file identifier for the voice message"]
72063    #[allow(clippy::needless_lifetimes)]
72064    fn set_voice_file_id<'a>(&'a mut self, voice_file_id: String) -> &'a mut Self {
72065        self.voice_file_id = voice_file_id;
72066        self
72067    }
72068    #[allow(rustdoc::invalid_html_tags)]
72069    #[doc = "Voice message title"]
72070    #[allow(clippy::needless_lifetimes)]
72071    fn get_title<'a>(&'a self) -> &'a str {
72072        self.title.as_str()
72073    }
72074    #[allow(rustdoc::invalid_html_tags)]
72075    #[doc = "Voice message title"]
72076    #[allow(clippy::needless_lifetimes)]
72077    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
72078        self.title = title;
72079        self
72080    }
72081    #[allow(rustdoc::invalid_html_tags)]
72082    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
72083    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72084    fn get_caption<'a>(&'a self) -> Option<&'a str> {
72085        self.caption.as_ref().map(|v| v.as_str())
72086    }
72087    #[allow(rustdoc::invalid_html_tags)]
72088    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
72089    #[allow(clippy::needless_lifetimes)]
72090    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
72091        self.caption = caption;
72092        self
72093    }
72094    #[allow(rustdoc::invalid_html_tags)]
72095    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
72096    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72097    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
72098        self.parse_mode.as_ref().map(|v| v.as_str())
72099    }
72100    #[allow(rustdoc::invalid_html_tags)]
72101    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
72102    #[allow(clippy::needless_lifetimes)]
72103    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
72104        self.parse_mode = parse_mode;
72105        self
72106    }
72107    #[allow(rustdoc::invalid_html_tags)]
72108    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
72109    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72110    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
72111        self.caption_entities.as_ref()
72112    }
72113    #[allow(rustdoc::invalid_html_tags)]
72114    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
72115    #[allow(clippy::needless_lifetimes)]
72116    fn set_caption_entities<'a>(
72117        &'a mut self,
72118        caption_entities: Option<Vec<MessageEntity>>,
72119    ) -> &'a mut Self {
72120        self.caption_entities = caption_entities;
72121        self
72122    }
72123    #[allow(rustdoc::invalid_html_tags)]
72124    #[doc = "Optional. Inline keyboard attached to the message"]
72125    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72126    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
72127        self.reply_markup.as_ref().map(|v| v.inner_ref())
72128    }
72129    #[allow(rustdoc::invalid_html_tags)]
72130    #[doc = "Optional. Inline keyboard attached to the message"]
72131    #[allow(clippy::needless_lifetimes)]
72132    fn set_reply_markup<'a>(
72133        &'a mut self,
72134        reply_markup: Option<InlineKeyboardMarkup>,
72135    ) -> &'a mut Self {
72136        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
72137        self
72138    }
72139    #[allow(rustdoc::invalid_html_tags)]
72140    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
72141    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72142    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
72143        self.input_message_content.as_ref().map(|v| v.inner_ref())
72144    }
72145    #[allow(rustdoc::invalid_html_tags)]
72146    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
72147    #[allow(clippy::needless_lifetimes)]
72148    fn set_input_message_content<'a>(
72149        &'a mut self,
72150        input_message_content: Option<InputMessageContent>,
72151    ) -> &'a mut Self {
72152        self.input_message_content = input_message_content
72153            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
72154        self
72155    }
72156}
72157impl TraitInlineQueryResultArticle for InlineQueryResultArticle {
72158    #[allow(rustdoc::invalid_html_tags)]
72159    #[doc = "Type of the result, must be article"]
72160    #[allow(clippy::needless_lifetimes)]
72161    fn get_tg_type<'a>(&'a self) -> &'a str {
72162        self.tg_type.as_str()
72163    }
72164    #[allow(rustdoc::invalid_html_tags)]
72165    #[doc = "Type of the result, must be article"]
72166    #[allow(clippy::needless_lifetimes)]
72167    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
72168        self.tg_type = tg_type;
72169        self
72170    }
72171    #[allow(rustdoc::invalid_html_tags)]
72172    #[doc = "Unique identifier for this result, 1-64 Bytes"]
72173    #[allow(clippy::needless_lifetimes)]
72174    fn get_id<'a>(&'a self) -> &'a str {
72175        self.id.as_str()
72176    }
72177    #[allow(rustdoc::invalid_html_tags)]
72178    #[doc = "Unique identifier for this result, 1-64 Bytes"]
72179    #[allow(clippy::needless_lifetimes)]
72180    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
72181        self.id = id;
72182        self
72183    }
72184    #[allow(rustdoc::invalid_html_tags)]
72185    #[doc = "Title of the result"]
72186    #[allow(clippy::needless_lifetimes)]
72187    fn get_title<'a>(&'a self) -> &'a str {
72188        self.title.as_str()
72189    }
72190    #[allow(rustdoc::invalid_html_tags)]
72191    #[doc = "Title of the result"]
72192    #[allow(clippy::needless_lifetimes)]
72193    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
72194        self.title = title;
72195        self
72196    }
72197    #[allow(rustdoc::invalid_html_tags)]
72198    #[doc = "Content of the message to be sent"]
72199    #[allow(clippy::needless_lifetimes)]
72200    fn get_input_message_content<'a>(&'a self) -> &'a InputMessageContent {
72201        &self.input_message_content
72202    }
72203    #[allow(rustdoc::invalid_html_tags)]
72204    #[doc = "Content of the message to be sent"]
72205    #[allow(clippy::needless_lifetimes)]
72206    fn set_input_message_content<'a>(
72207        &'a mut self,
72208        input_message_content: InputMessageContent,
72209    ) -> &'a mut Self {
72210        self.input_message_content = BoxWrapper(Unbox(input_message_content));
72211        self
72212    }
72213    #[allow(rustdoc::invalid_html_tags)]
72214    #[doc = "Optional. Inline keyboard attached to the message"]
72215    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72216    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
72217        self.reply_markup.as_ref().map(|v| v.inner_ref())
72218    }
72219    #[allow(rustdoc::invalid_html_tags)]
72220    #[doc = "Optional. Inline keyboard attached to the message"]
72221    #[allow(clippy::needless_lifetimes)]
72222    fn set_reply_markup<'a>(
72223        &'a mut self,
72224        reply_markup: Option<InlineKeyboardMarkup>,
72225    ) -> &'a mut Self {
72226        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
72227        self
72228    }
72229    #[allow(rustdoc::invalid_html_tags)]
72230    #[doc = "Optional. URL of the result"]
72231    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72232    fn get_url<'a>(&'a self) -> Option<&'a str> {
72233        self.url.as_ref().map(|v| v.as_str())
72234    }
72235    #[allow(rustdoc::invalid_html_tags)]
72236    #[doc = "Optional. URL of the result"]
72237    #[allow(clippy::needless_lifetimes)]
72238    fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self {
72239        self.url = url;
72240        self
72241    }
72242    #[allow(rustdoc::invalid_html_tags)]
72243    #[doc = "Optional. Short description of the result"]
72244    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72245    fn get_description<'a>(&'a self) -> Option<&'a str> {
72246        self.description.as_ref().map(|v| v.as_str())
72247    }
72248    #[allow(rustdoc::invalid_html_tags)]
72249    #[doc = "Optional. Short description of the result"]
72250    #[allow(clippy::needless_lifetimes)]
72251    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
72252        self.description = description;
72253        self
72254    }
72255    #[allow(rustdoc::invalid_html_tags)]
72256    #[doc = "Optional. Url of the thumbnail for the result"]
72257    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72258    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
72259        self.thumbnail_url.as_ref().map(|v| v.as_str())
72260    }
72261    #[allow(rustdoc::invalid_html_tags)]
72262    #[doc = "Optional. Url of the thumbnail for the result"]
72263    #[allow(clippy::needless_lifetimes)]
72264    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
72265        self.thumbnail_url = thumbnail_url;
72266        self
72267    }
72268    #[allow(rustdoc::invalid_html_tags)]
72269    #[doc = "Optional. Thumbnail width"]
72270    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72271    fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
72272        self.thumbnail_width.as_ref().map(|v| *v)
72273    }
72274    #[allow(rustdoc::invalid_html_tags)]
72275    #[doc = "Optional. Thumbnail width"]
72276    #[allow(clippy::needless_lifetimes)]
72277    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
72278        self.thumbnail_width = thumbnail_width;
72279        self
72280    }
72281    #[allow(rustdoc::invalid_html_tags)]
72282    #[doc = "Optional. Thumbnail height"]
72283    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72284    fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
72285        self.thumbnail_height.as_ref().map(|v| *v)
72286    }
72287    #[allow(rustdoc::invalid_html_tags)]
72288    #[doc = "Optional. Thumbnail height"]
72289    #[allow(clippy::needless_lifetimes)]
72290    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
72291        self.thumbnail_height = thumbnail_height;
72292        self
72293    }
72294}
72295impl TraitInlineQueryResultAudio for InlineQueryResultAudio {
72296    #[allow(rustdoc::invalid_html_tags)]
72297    #[doc = "Type of the result, must be audio"]
72298    #[allow(clippy::needless_lifetimes)]
72299    fn get_tg_type<'a>(&'a self) -> &'a str {
72300        self.tg_type.as_str()
72301    }
72302    #[allow(rustdoc::invalid_html_tags)]
72303    #[doc = "Type of the result, must be audio"]
72304    #[allow(clippy::needless_lifetimes)]
72305    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
72306        self.tg_type = tg_type;
72307        self
72308    }
72309    #[allow(rustdoc::invalid_html_tags)]
72310    #[doc = "Unique identifier for this result, 1-64 bytes"]
72311    #[allow(clippy::needless_lifetimes)]
72312    fn get_id<'a>(&'a self) -> &'a str {
72313        self.id.as_str()
72314    }
72315    #[allow(rustdoc::invalid_html_tags)]
72316    #[doc = "Unique identifier for this result, 1-64 bytes"]
72317    #[allow(clippy::needless_lifetimes)]
72318    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
72319        self.id = id;
72320        self
72321    }
72322    #[allow(rustdoc::invalid_html_tags)]
72323    #[doc = "A valid URL for the audio file"]
72324    #[allow(clippy::needless_lifetimes)]
72325    fn get_audio_url<'a>(&'a self) -> &'a str {
72326        self.audio_url.as_str()
72327    }
72328    #[allow(rustdoc::invalid_html_tags)]
72329    #[doc = "A valid URL for the audio file"]
72330    #[allow(clippy::needless_lifetimes)]
72331    fn set_audio_url<'a>(&'a mut self, audio_url: String) -> &'a mut Self {
72332        self.audio_url = audio_url;
72333        self
72334    }
72335    #[allow(rustdoc::invalid_html_tags)]
72336    #[doc = "Title"]
72337    #[allow(clippy::needless_lifetimes)]
72338    fn get_title<'a>(&'a self) -> &'a str {
72339        self.title.as_str()
72340    }
72341    #[allow(rustdoc::invalid_html_tags)]
72342    #[doc = "Title"]
72343    #[allow(clippy::needless_lifetimes)]
72344    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
72345        self.title = title;
72346        self
72347    }
72348    #[allow(rustdoc::invalid_html_tags)]
72349    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
72350    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72351    fn get_caption<'a>(&'a self) -> Option<&'a str> {
72352        self.caption.as_ref().map(|v| v.as_str())
72353    }
72354    #[allow(rustdoc::invalid_html_tags)]
72355    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
72356    #[allow(clippy::needless_lifetimes)]
72357    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
72358        self.caption = caption;
72359        self
72360    }
72361    #[allow(rustdoc::invalid_html_tags)]
72362    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
72363    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72364    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
72365        self.parse_mode.as_ref().map(|v| v.as_str())
72366    }
72367    #[allow(rustdoc::invalid_html_tags)]
72368    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
72369    #[allow(clippy::needless_lifetimes)]
72370    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
72371        self.parse_mode = parse_mode;
72372        self
72373    }
72374    #[allow(rustdoc::invalid_html_tags)]
72375    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
72376    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72377    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
72378        self.caption_entities.as_ref()
72379    }
72380    #[allow(rustdoc::invalid_html_tags)]
72381    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
72382    #[allow(clippy::needless_lifetimes)]
72383    fn set_caption_entities<'a>(
72384        &'a mut self,
72385        caption_entities: Option<Vec<MessageEntity>>,
72386    ) -> &'a mut Self {
72387        self.caption_entities = caption_entities;
72388        self
72389    }
72390    #[allow(rustdoc::invalid_html_tags)]
72391    #[doc = "Optional. Performer"]
72392    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72393    fn get_performer<'a>(&'a self) -> Option<&'a str> {
72394        self.performer.as_ref().map(|v| v.as_str())
72395    }
72396    #[allow(rustdoc::invalid_html_tags)]
72397    #[doc = "Optional. Performer"]
72398    #[allow(clippy::needless_lifetimes)]
72399    fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self {
72400        self.performer = performer;
72401        self
72402    }
72403    #[allow(rustdoc::invalid_html_tags)]
72404    #[doc = "Optional. Audio duration in seconds"]
72405    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72406    fn get_audio_duration<'a>(&'a self) -> Option<i64> {
72407        self.audio_duration.as_ref().map(|v| *v)
72408    }
72409    #[allow(rustdoc::invalid_html_tags)]
72410    #[doc = "Optional. Audio duration in seconds"]
72411    #[allow(clippy::needless_lifetimes)]
72412    fn set_audio_duration<'a>(&'a mut self, audio_duration: Option<i64>) -> &'a mut Self {
72413        self.audio_duration = audio_duration;
72414        self
72415    }
72416    #[allow(rustdoc::invalid_html_tags)]
72417    #[doc = "Optional. Inline keyboard attached to the message"]
72418    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72419    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
72420        self.reply_markup.as_ref().map(|v| v.inner_ref())
72421    }
72422    #[allow(rustdoc::invalid_html_tags)]
72423    #[doc = "Optional. Inline keyboard attached to the message"]
72424    #[allow(clippy::needless_lifetimes)]
72425    fn set_reply_markup<'a>(
72426        &'a mut self,
72427        reply_markup: Option<InlineKeyboardMarkup>,
72428    ) -> &'a mut Self {
72429        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
72430        self
72431    }
72432    #[allow(rustdoc::invalid_html_tags)]
72433    #[doc = "Optional. Content of the message to be sent instead of the audio"]
72434    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72435    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
72436        self.input_message_content.as_ref().map(|v| v.inner_ref())
72437    }
72438    #[allow(rustdoc::invalid_html_tags)]
72439    #[doc = "Optional. Content of the message to be sent instead of the audio"]
72440    #[allow(clippy::needless_lifetimes)]
72441    fn set_input_message_content<'a>(
72442        &'a mut self,
72443        input_message_content: Option<InputMessageContent>,
72444    ) -> &'a mut Self {
72445        self.input_message_content = input_message_content
72446            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
72447        self
72448    }
72449}
72450impl TraitInlineQueryResultContact for InlineQueryResultContact {
72451    #[allow(rustdoc::invalid_html_tags)]
72452    #[doc = "Type of the result, must be contact"]
72453    #[allow(clippy::needless_lifetimes)]
72454    fn get_tg_type<'a>(&'a self) -> &'a str {
72455        self.tg_type.as_str()
72456    }
72457    #[allow(rustdoc::invalid_html_tags)]
72458    #[doc = "Type of the result, must be contact"]
72459    #[allow(clippy::needless_lifetimes)]
72460    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
72461        self.tg_type = tg_type;
72462        self
72463    }
72464    #[allow(rustdoc::invalid_html_tags)]
72465    #[doc = "Unique identifier for this result, 1-64 Bytes"]
72466    #[allow(clippy::needless_lifetimes)]
72467    fn get_id<'a>(&'a self) -> &'a str {
72468        self.id.as_str()
72469    }
72470    #[allow(rustdoc::invalid_html_tags)]
72471    #[doc = "Unique identifier for this result, 1-64 Bytes"]
72472    #[allow(clippy::needless_lifetimes)]
72473    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
72474        self.id = id;
72475        self
72476    }
72477    #[allow(rustdoc::invalid_html_tags)]
72478    #[doc = "Contact's phone number"]
72479    #[allow(clippy::needless_lifetimes)]
72480    fn get_phone_number<'a>(&'a self) -> &'a str {
72481        self.phone_number.as_str()
72482    }
72483    #[allow(rustdoc::invalid_html_tags)]
72484    #[doc = "Contact's phone number"]
72485    #[allow(clippy::needless_lifetimes)]
72486    fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self {
72487        self.phone_number = phone_number;
72488        self
72489    }
72490    #[allow(rustdoc::invalid_html_tags)]
72491    #[doc = "Contact's first name"]
72492    #[allow(clippy::needless_lifetimes)]
72493    fn get_first_name<'a>(&'a self) -> &'a str {
72494        self.first_name.as_str()
72495    }
72496    #[allow(rustdoc::invalid_html_tags)]
72497    #[doc = "Contact's first name"]
72498    #[allow(clippy::needless_lifetimes)]
72499    fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self {
72500        self.first_name = first_name;
72501        self
72502    }
72503    #[allow(rustdoc::invalid_html_tags)]
72504    #[doc = "Optional. Contact's last name"]
72505    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72506    fn get_last_name<'a>(&'a self) -> Option<&'a str> {
72507        self.last_name.as_ref().map(|v| v.as_str())
72508    }
72509    #[allow(rustdoc::invalid_html_tags)]
72510    #[doc = "Optional. Contact's last name"]
72511    #[allow(clippy::needless_lifetimes)]
72512    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
72513        self.last_name = last_name;
72514        self
72515    }
72516    #[allow(rustdoc::invalid_html_tags)]
72517    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
72518    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72519    fn get_vcard<'a>(&'a self) -> Option<&'a str> {
72520        self.vcard.as_ref().map(|v| v.as_str())
72521    }
72522    #[allow(rustdoc::invalid_html_tags)]
72523    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
72524    #[allow(clippy::needless_lifetimes)]
72525    fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self {
72526        self.vcard = vcard;
72527        self
72528    }
72529    #[allow(rustdoc::invalid_html_tags)]
72530    #[doc = "Optional. Inline keyboard attached to the message"]
72531    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72532    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
72533        self.reply_markup.as_ref().map(|v| v.inner_ref())
72534    }
72535    #[allow(rustdoc::invalid_html_tags)]
72536    #[doc = "Optional. Inline keyboard attached to the message"]
72537    #[allow(clippy::needless_lifetimes)]
72538    fn set_reply_markup<'a>(
72539        &'a mut self,
72540        reply_markup: Option<InlineKeyboardMarkup>,
72541    ) -> &'a mut Self {
72542        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
72543        self
72544    }
72545    #[allow(rustdoc::invalid_html_tags)]
72546    #[doc = "Optional. Content of the message to be sent instead of the contact"]
72547    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72548    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
72549        self.input_message_content.as_ref().map(|v| v.inner_ref())
72550    }
72551    #[allow(rustdoc::invalid_html_tags)]
72552    #[doc = "Optional. Content of the message to be sent instead of the contact"]
72553    #[allow(clippy::needless_lifetimes)]
72554    fn set_input_message_content<'a>(
72555        &'a mut self,
72556        input_message_content: Option<InputMessageContent>,
72557    ) -> &'a mut Self {
72558        self.input_message_content = input_message_content
72559            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
72560        self
72561    }
72562    #[allow(rustdoc::invalid_html_tags)]
72563    #[doc = "Optional. Url of the thumbnail for the result"]
72564    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72565    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
72566        self.thumbnail_url.as_ref().map(|v| v.as_str())
72567    }
72568    #[allow(rustdoc::invalid_html_tags)]
72569    #[doc = "Optional. Url of the thumbnail for the result"]
72570    #[allow(clippy::needless_lifetimes)]
72571    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
72572        self.thumbnail_url = thumbnail_url;
72573        self
72574    }
72575    #[allow(rustdoc::invalid_html_tags)]
72576    #[doc = "Optional. Thumbnail width"]
72577    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72578    fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
72579        self.thumbnail_width.as_ref().map(|v| *v)
72580    }
72581    #[allow(rustdoc::invalid_html_tags)]
72582    #[doc = "Optional. Thumbnail width"]
72583    #[allow(clippy::needless_lifetimes)]
72584    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
72585        self.thumbnail_width = thumbnail_width;
72586        self
72587    }
72588    #[allow(rustdoc::invalid_html_tags)]
72589    #[doc = "Optional. Thumbnail height"]
72590    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72591    fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
72592        self.thumbnail_height.as_ref().map(|v| *v)
72593    }
72594    #[allow(rustdoc::invalid_html_tags)]
72595    #[doc = "Optional. Thumbnail height"]
72596    #[allow(clippy::needless_lifetimes)]
72597    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
72598        self.thumbnail_height = thumbnail_height;
72599        self
72600    }
72601}
72602impl TraitInlineQueryResultGame for InlineQueryResultGame {
72603    #[allow(rustdoc::invalid_html_tags)]
72604    #[doc = "Type of the result, must be game"]
72605    #[allow(clippy::needless_lifetimes)]
72606    fn get_tg_type<'a>(&'a self) -> &'a str {
72607        self.tg_type.as_str()
72608    }
72609    #[allow(rustdoc::invalid_html_tags)]
72610    #[doc = "Type of the result, must be game"]
72611    #[allow(clippy::needless_lifetimes)]
72612    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
72613        self.tg_type = tg_type;
72614        self
72615    }
72616    #[allow(rustdoc::invalid_html_tags)]
72617    #[doc = "Unique identifier for this result, 1-64 bytes"]
72618    #[allow(clippy::needless_lifetimes)]
72619    fn get_id<'a>(&'a self) -> &'a str {
72620        self.id.as_str()
72621    }
72622    #[allow(rustdoc::invalid_html_tags)]
72623    #[doc = "Unique identifier for this result, 1-64 bytes"]
72624    #[allow(clippy::needless_lifetimes)]
72625    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
72626        self.id = id;
72627        self
72628    }
72629    #[allow(rustdoc::invalid_html_tags)]
72630    #[doc = "Short name of the game"]
72631    #[allow(clippy::needless_lifetimes)]
72632    fn get_game_short_name<'a>(&'a self) -> &'a str {
72633        self.game_short_name.as_str()
72634    }
72635    #[allow(rustdoc::invalid_html_tags)]
72636    #[doc = "Short name of the game"]
72637    #[allow(clippy::needless_lifetimes)]
72638    fn set_game_short_name<'a>(&'a mut self, game_short_name: String) -> &'a mut Self {
72639        self.game_short_name = game_short_name;
72640        self
72641    }
72642    #[allow(rustdoc::invalid_html_tags)]
72643    #[doc = "Optional. Inline keyboard attached to the message"]
72644    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72645    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
72646        self.reply_markup.as_ref().map(|v| v.inner_ref())
72647    }
72648    #[allow(rustdoc::invalid_html_tags)]
72649    #[doc = "Optional. Inline keyboard attached to the message"]
72650    #[allow(clippy::needless_lifetimes)]
72651    fn set_reply_markup<'a>(
72652        &'a mut self,
72653        reply_markup: Option<InlineKeyboardMarkup>,
72654    ) -> &'a mut Self {
72655        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
72656        self
72657    }
72658}
72659impl TraitInlineQueryResultDocument for InlineQueryResultDocument {
72660    #[allow(rustdoc::invalid_html_tags)]
72661    #[doc = "Type of the result, must be document"]
72662    #[allow(clippy::needless_lifetimes)]
72663    fn get_tg_type<'a>(&'a self) -> &'a str {
72664        self.tg_type.as_str()
72665    }
72666    #[allow(rustdoc::invalid_html_tags)]
72667    #[doc = "Type of the result, must be document"]
72668    #[allow(clippy::needless_lifetimes)]
72669    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
72670        self.tg_type = tg_type;
72671        self
72672    }
72673    #[allow(rustdoc::invalid_html_tags)]
72674    #[doc = "Unique identifier for this result, 1-64 bytes"]
72675    #[allow(clippy::needless_lifetimes)]
72676    fn get_id<'a>(&'a self) -> &'a str {
72677        self.id.as_str()
72678    }
72679    #[allow(rustdoc::invalid_html_tags)]
72680    #[doc = "Unique identifier for this result, 1-64 bytes"]
72681    #[allow(clippy::needless_lifetimes)]
72682    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
72683        self.id = id;
72684        self
72685    }
72686    #[allow(rustdoc::invalid_html_tags)]
72687    #[doc = "Title for the result"]
72688    #[allow(clippy::needless_lifetimes)]
72689    fn get_title<'a>(&'a self) -> &'a str {
72690        self.title.as_str()
72691    }
72692    #[allow(rustdoc::invalid_html_tags)]
72693    #[doc = "Title for the result"]
72694    #[allow(clippy::needless_lifetimes)]
72695    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
72696        self.title = title;
72697        self
72698    }
72699    #[allow(rustdoc::invalid_html_tags)]
72700    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
72701    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72702    fn get_caption<'a>(&'a self) -> Option<&'a str> {
72703        self.caption.as_ref().map(|v| v.as_str())
72704    }
72705    #[allow(rustdoc::invalid_html_tags)]
72706    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
72707    #[allow(clippy::needless_lifetimes)]
72708    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
72709        self.caption = caption;
72710        self
72711    }
72712    #[allow(rustdoc::invalid_html_tags)]
72713    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
72714    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72715    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
72716        self.parse_mode.as_ref().map(|v| v.as_str())
72717    }
72718    #[allow(rustdoc::invalid_html_tags)]
72719    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
72720    #[allow(clippy::needless_lifetimes)]
72721    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
72722        self.parse_mode = parse_mode;
72723        self
72724    }
72725    #[allow(rustdoc::invalid_html_tags)]
72726    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
72727    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72728    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
72729        self.caption_entities.as_ref()
72730    }
72731    #[allow(rustdoc::invalid_html_tags)]
72732    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
72733    #[allow(clippy::needless_lifetimes)]
72734    fn set_caption_entities<'a>(
72735        &'a mut self,
72736        caption_entities: Option<Vec<MessageEntity>>,
72737    ) -> &'a mut Self {
72738        self.caption_entities = caption_entities;
72739        self
72740    }
72741    #[allow(rustdoc::invalid_html_tags)]
72742    #[doc = "A valid URL for the file"]
72743    #[allow(clippy::needless_lifetimes)]
72744    fn get_document_url<'a>(&'a self) -> &'a str {
72745        self.document_url.as_str()
72746    }
72747    #[allow(rustdoc::invalid_html_tags)]
72748    #[doc = "A valid URL for the file"]
72749    #[allow(clippy::needless_lifetimes)]
72750    fn set_document_url<'a>(&'a mut self, document_url: String) -> &'a mut Self {
72751        self.document_url = document_url;
72752        self
72753    }
72754    #[allow(rustdoc::invalid_html_tags)]
72755    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
72756    #[allow(clippy::needless_lifetimes)]
72757    fn get_mime_type<'a>(&'a self) -> &'a str {
72758        self.mime_type.as_str()
72759    }
72760    #[allow(rustdoc::invalid_html_tags)]
72761    #[doc = "MIME type of the content of the file, either \"application/pdf\" or \"application/zip\""]
72762    #[allow(clippy::needless_lifetimes)]
72763    fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self {
72764        self.mime_type = mime_type;
72765        self
72766    }
72767    #[allow(rustdoc::invalid_html_tags)]
72768    #[doc = "Optional. Short description of the result"]
72769    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72770    fn get_description<'a>(&'a self) -> Option<&'a str> {
72771        self.description.as_ref().map(|v| v.as_str())
72772    }
72773    #[allow(rustdoc::invalid_html_tags)]
72774    #[doc = "Optional. Short description of the result"]
72775    #[allow(clippy::needless_lifetimes)]
72776    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
72777        self.description = description;
72778        self
72779    }
72780    #[allow(rustdoc::invalid_html_tags)]
72781    #[doc = "Optional. Inline keyboard attached to the message"]
72782    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72783    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
72784        self.reply_markup.as_ref().map(|v| v.inner_ref())
72785    }
72786    #[allow(rustdoc::invalid_html_tags)]
72787    #[doc = "Optional. Inline keyboard attached to the message"]
72788    #[allow(clippy::needless_lifetimes)]
72789    fn set_reply_markup<'a>(
72790        &'a mut self,
72791        reply_markup: Option<InlineKeyboardMarkup>,
72792    ) -> &'a mut Self {
72793        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
72794        self
72795    }
72796    #[allow(rustdoc::invalid_html_tags)]
72797    #[doc = "Optional. Content of the message to be sent instead of the file"]
72798    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72799    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
72800        self.input_message_content.as_ref().map(|v| v.inner_ref())
72801    }
72802    #[allow(rustdoc::invalid_html_tags)]
72803    #[doc = "Optional. Content of the message to be sent instead of the file"]
72804    #[allow(clippy::needless_lifetimes)]
72805    fn set_input_message_content<'a>(
72806        &'a mut self,
72807        input_message_content: Option<InputMessageContent>,
72808    ) -> &'a mut Self {
72809        self.input_message_content = input_message_content
72810            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
72811        self
72812    }
72813    #[allow(rustdoc::invalid_html_tags)]
72814    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
72815    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72816    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
72817        self.thumbnail_url.as_ref().map(|v| v.as_str())
72818    }
72819    #[allow(rustdoc::invalid_html_tags)]
72820    #[doc = "Optional. URL of the thumbnail (JPEG only) for the file"]
72821    #[allow(clippy::needless_lifetimes)]
72822    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
72823        self.thumbnail_url = thumbnail_url;
72824        self
72825    }
72826    #[allow(rustdoc::invalid_html_tags)]
72827    #[doc = "Optional. Thumbnail width"]
72828    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72829    fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
72830        self.thumbnail_width.as_ref().map(|v| *v)
72831    }
72832    #[allow(rustdoc::invalid_html_tags)]
72833    #[doc = "Optional. Thumbnail width"]
72834    #[allow(clippy::needless_lifetimes)]
72835    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
72836        self.thumbnail_width = thumbnail_width;
72837        self
72838    }
72839    #[allow(rustdoc::invalid_html_tags)]
72840    #[doc = "Optional. Thumbnail height"]
72841    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72842    fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
72843        self.thumbnail_height.as_ref().map(|v| *v)
72844    }
72845    #[allow(rustdoc::invalid_html_tags)]
72846    #[doc = "Optional. Thumbnail height"]
72847    #[allow(clippy::needless_lifetimes)]
72848    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
72849        self.thumbnail_height = thumbnail_height;
72850        self
72851    }
72852}
72853impl TraitInlineQueryResultGif for InlineQueryResultGif {
72854    #[allow(rustdoc::invalid_html_tags)]
72855    #[doc = "Type of the result, must be gif"]
72856    #[allow(clippy::needless_lifetimes)]
72857    fn get_tg_type<'a>(&'a self) -> &'a str {
72858        self.tg_type.as_str()
72859    }
72860    #[allow(rustdoc::invalid_html_tags)]
72861    #[doc = "Type of the result, must be gif"]
72862    #[allow(clippy::needless_lifetimes)]
72863    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
72864        self.tg_type = tg_type;
72865        self
72866    }
72867    #[allow(rustdoc::invalid_html_tags)]
72868    #[doc = "Unique identifier for this result, 1-64 bytes"]
72869    #[allow(clippy::needless_lifetimes)]
72870    fn get_id<'a>(&'a self) -> &'a str {
72871        self.id.as_str()
72872    }
72873    #[allow(rustdoc::invalid_html_tags)]
72874    #[doc = "Unique identifier for this result, 1-64 bytes"]
72875    #[allow(clippy::needless_lifetimes)]
72876    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
72877        self.id = id;
72878        self
72879    }
72880    #[allow(rustdoc::invalid_html_tags)]
72881    #[doc = "A valid URL for the GIF file"]
72882    #[allow(clippy::needless_lifetimes)]
72883    fn get_gif_url<'a>(&'a self) -> &'a str {
72884        self.gif_url.as_str()
72885    }
72886    #[allow(rustdoc::invalid_html_tags)]
72887    #[doc = "A valid URL for the GIF file"]
72888    #[allow(clippy::needless_lifetimes)]
72889    fn set_gif_url<'a>(&'a mut self, gif_url: String) -> &'a mut Self {
72890        self.gif_url = gif_url;
72891        self
72892    }
72893    #[allow(rustdoc::invalid_html_tags)]
72894    #[doc = "Optional. Width of the GIF"]
72895    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72896    fn get_gif_width<'a>(&'a self) -> Option<i64> {
72897        self.gif_width.as_ref().map(|v| *v)
72898    }
72899    #[allow(rustdoc::invalid_html_tags)]
72900    #[doc = "Optional. Width of the GIF"]
72901    #[allow(clippy::needless_lifetimes)]
72902    fn set_gif_width<'a>(&'a mut self, gif_width: Option<i64>) -> &'a mut Self {
72903        self.gif_width = gif_width;
72904        self
72905    }
72906    #[allow(rustdoc::invalid_html_tags)]
72907    #[doc = "Optional. Height of the GIF"]
72908    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72909    fn get_gif_height<'a>(&'a self) -> Option<i64> {
72910        self.gif_height.as_ref().map(|v| *v)
72911    }
72912    #[allow(rustdoc::invalid_html_tags)]
72913    #[doc = "Optional. Height of the GIF"]
72914    #[allow(clippy::needless_lifetimes)]
72915    fn set_gif_height<'a>(&'a mut self, gif_height: Option<i64>) -> &'a mut Self {
72916        self.gif_height = gif_height;
72917        self
72918    }
72919    #[allow(rustdoc::invalid_html_tags)]
72920    #[doc = "Optional. Duration of the GIF in seconds"]
72921    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72922    fn get_gif_duration<'a>(&'a self) -> Option<i64> {
72923        self.gif_duration.as_ref().map(|v| *v)
72924    }
72925    #[allow(rustdoc::invalid_html_tags)]
72926    #[doc = "Optional. Duration of the GIF in seconds"]
72927    #[allow(clippy::needless_lifetimes)]
72928    fn set_gif_duration<'a>(&'a mut self, gif_duration: Option<i64>) -> &'a mut Self {
72929        self.gif_duration = gif_duration;
72930        self
72931    }
72932    #[allow(rustdoc::invalid_html_tags)]
72933    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
72934    #[allow(clippy::needless_lifetimes)]
72935    fn get_thumbnail_url<'a>(&'a self) -> &'a str {
72936        self.thumbnail_url.as_str()
72937    }
72938    #[allow(rustdoc::invalid_html_tags)]
72939    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
72940    #[allow(clippy::needless_lifetimes)]
72941    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
72942        self.thumbnail_url = thumbnail_url;
72943        self
72944    }
72945    #[allow(rustdoc::invalid_html_tags)]
72946    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
72947    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72948    fn get_thumbnail_mime_type<'a>(&'a self) -> Option<&'a str> {
72949        self.thumbnail_mime_type.as_ref().map(|v| v.as_str())
72950    }
72951    #[allow(rustdoc::invalid_html_tags)]
72952    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
72953    #[allow(clippy::needless_lifetimes)]
72954    fn set_thumbnail_mime_type<'a>(
72955        &'a mut self,
72956        thumbnail_mime_type: Option<String>,
72957    ) -> &'a mut Self {
72958        self.thumbnail_mime_type = thumbnail_mime_type;
72959        self
72960    }
72961    #[allow(rustdoc::invalid_html_tags)]
72962    #[doc = "Optional. Title for the result"]
72963    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72964    fn get_title<'a>(&'a self) -> Option<&'a str> {
72965        self.title.as_ref().map(|v| v.as_str())
72966    }
72967    #[allow(rustdoc::invalid_html_tags)]
72968    #[doc = "Optional. Title for the result"]
72969    #[allow(clippy::needless_lifetimes)]
72970    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
72971        self.title = title;
72972        self
72973    }
72974    #[allow(rustdoc::invalid_html_tags)]
72975    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
72976    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72977    fn get_caption<'a>(&'a self) -> Option<&'a str> {
72978        self.caption.as_ref().map(|v| v.as_str())
72979    }
72980    #[allow(rustdoc::invalid_html_tags)]
72981    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
72982    #[allow(clippy::needless_lifetimes)]
72983    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
72984        self.caption = caption;
72985        self
72986    }
72987    #[allow(rustdoc::invalid_html_tags)]
72988    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
72989    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
72990    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
72991        self.parse_mode.as_ref().map(|v| v.as_str())
72992    }
72993    #[allow(rustdoc::invalid_html_tags)]
72994    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
72995    #[allow(clippy::needless_lifetimes)]
72996    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
72997        self.parse_mode = parse_mode;
72998        self
72999    }
73000    #[allow(rustdoc::invalid_html_tags)]
73001    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
73002    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73003    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
73004        self.caption_entities.as_ref()
73005    }
73006    #[allow(rustdoc::invalid_html_tags)]
73007    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
73008    #[allow(clippy::needless_lifetimes)]
73009    fn set_caption_entities<'a>(
73010        &'a mut self,
73011        caption_entities: Option<Vec<MessageEntity>>,
73012    ) -> &'a mut Self {
73013        self.caption_entities = caption_entities;
73014        self
73015    }
73016    #[allow(rustdoc::invalid_html_tags)]
73017    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
73018    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73019    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
73020        self.show_caption_above_media.as_ref().map(|v| *v)
73021    }
73022    #[allow(rustdoc::invalid_html_tags)]
73023    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
73024    #[allow(clippy::needless_lifetimes)]
73025    fn set_show_caption_above_media<'a>(
73026        &'a mut self,
73027        show_caption_above_media: Option<bool>,
73028    ) -> &'a mut Self {
73029        self.show_caption_above_media = show_caption_above_media;
73030        self
73031    }
73032    #[allow(rustdoc::invalid_html_tags)]
73033    #[doc = "Optional. Inline keyboard attached to the message"]
73034    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73035    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
73036        self.reply_markup.as_ref().map(|v| v.inner_ref())
73037    }
73038    #[allow(rustdoc::invalid_html_tags)]
73039    #[doc = "Optional. Inline keyboard attached to the message"]
73040    #[allow(clippy::needless_lifetimes)]
73041    fn set_reply_markup<'a>(
73042        &'a mut self,
73043        reply_markup: Option<InlineKeyboardMarkup>,
73044    ) -> &'a mut Self {
73045        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
73046        self
73047    }
73048    #[allow(rustdoc::invalid_html_tags)]
73049    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
73050    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73051    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
73052        self.input_message_content.as_ref().map(|v| v.inner_ref())
73053    }
73054    #[allow(rustdoc::invalid_html_tags)]
73055    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
73056    #[allow(clippy::needless_lifetimes)]
73057    fn set_input_message_content<'a>(
73058        &'a mut self,
73059        input_message_content: Option<InputMessageContent>,
73060    ) -> &'a mut Self {
73061        self.input_message_content = input_message_content
73062            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
73063        self
73064    }
73065}
73066impl TraitInlineQueryResultLocation for InlineQueryResultLocation {
73067    #[allow(rustdoc::invalid_html_tags)]
73068    #[doc = "Type of the result, must be location"]
73069    #[allow(clippy::needless_lifetimes)]
73070    fn get_tg_type<'a>(&'a self) -> &'a str {
73071        self.tg_type.as_str()
73072    }
73073    #[allow(rustdoc::invalid_html_tags)]
73074    #[doc = "Type of the result, must be location"]
73075    #[allow(clippy::needless_lifetimes)]
73076    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
73077        self.tg_type = tg_type;
73078        self
73079    }
73080    #[allow(rustdoc::invalid_html_tags)]
73081    #[doc = "Unique identifier for this result, 1-64 Bytes"]
73082    #[allow(clippy::needless_lifetimes)]
73083    fn get_id<'a>(&'a self) -> &'a str {
73084        self.id.as_str()
73085    }
73086    #[allow(rustdoc::invalid_html_tags)]
73087    #[doc = "Unique identifier for this result, 1-64 Bytes"]
73088    #[allow(clippy::needless_lifetimes)]
73089    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
73090        self.id = id;
73091        self
73092    }
73093    #[allow(rustdoc::invalid_html_tags)]
73094    #[doc = "Location latitude in degrees"]
73095    #[allow(clippy::needless_lifetimes)]
73096    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
73097        self.latitude
73098    }
73099    #[allow(rustdoc::invalid_html_tags)]
73100    #[doc = "Location latitude in degrees"]
73101    #[allow(clippy::needless_lifetimes)]
73102    fn set_latitude<'a>(
73103        &'a mut self,
73104        latitude: ::ordered_float::OrderedFloat<f64>,
73105    ) -> &'a mut Self {
73106        self.latitude = latitude;
73107        self
73108    }
73109    #[allow(rustdoc::invalid_html_tags)]
73110    #[doc = "Location longitude in degrees"]
73111    #[allow(clippy::needless_lifetimes)]
73112    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
73113        self.longitude
73114    }
73115    #[allow(rustdoc::invalid_html_tags)]
73116    #[doc = "Location longitude in degrees"]
73117    #[allow(clippy::needless_lifetimes)]
73118    fn set_longitude<'a>(
73119        &'a mut self,
73120        longitude: ::ordered_float::OrderedFloat<f64>,
73121    ) -> &'a mut Self {
73122        self.longitude = longitude;
73123        self
73124    }
73125    #[allow(rustdoc::invalid_html_tags)]
73126    #[doc = "Location title"]
73127    #[allow(clippy::needless_lifetimes)]
73128    fn get_title<'a>(&'a self) -> &'a str {
73129        self.title.as_str()
73130    }
73131    #[allow(rustdoc::invalid_html_tags)]
73132    #[doc = "Location title"]
73133    #[allow(clippy::needless_lifetimes)]
73134    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
73135        self.title = title;
73136        self
73137    }
73138    #[allow(rustdoc::invalid_html_tags)]
73139    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
73140    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73141    fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
73142        self.horizontal_accuracy.as_ref().map(|v| *v)
73143    }
73144    #[allow(rustdoc::invalid_html_tags)]
73145    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
73146    #[allow(clippy::needless_lifetimes)]
73147    fn set_horizontal_accuracy<'a>(
73148        &'a mut self,
73149        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
73150    ) -> &'a mut Self {
73151        self.horizontal_accuracy = horizontal_accuracy;
73152        self
73153    }
73154    #[allow(rustdoc::invalid_html_tags)]
73155    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
73156    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73157    fn get_live_period<'a>(&'a self) -> Option<i64> {
73158        self.live_period.as_ref().map(|v| *v)
73159    }
73160    #[allow(rustdoc::invalid_html_tags)]
73161    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
73162    #[allow(clippy::needless_lifetimes)]
73163    fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self {
73164        self.live_period = live_period;
73165        self
73166    }
73167    #[allow(rustdoc::invalid_html_tags)]
73168    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
73169    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73170    fn get_heading<'a>(&'a self) -> Option<i64> {
73171        self.heading.as_ref().map(|v| *v)
73172    }
73173    #[allow(rustdoc::invalid_html_tags)]
73174    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
73175    #[allow(clippy::needless_lifetimes)]
73176    fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self {
73177        self.heading = heading;
73178        self
73179    }
73180    #[allow(rustdoc::invalid_html_tags)]
73181    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
73182    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73183    fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64> {
73184        self.proximity_alert_radius.as_ref().map(|v| *v)
73185    }
73186    #[allow(rustdoc::invalid_html_tags)]
73187    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
73188    #[allow(clippy::needless_lifetimes)]
73189    fn set_proximity_alert_radius<'a>(
73190        &'a mut self,
73191        proximity_alert_radius: Option<i64>,
73192    ) -> &'a mut Self {
73193        self.proximity_alert_radius = proximity_alert_radius;
73194        self
73195    }
73196    #[allow(rustdoc::invalid_html_tags)]
73197    #[doc = "Optional. Inline keyboard attached to the message"]
73198    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73199    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
73200        self.reply_markup.as_ref().map(|v| v.inner_ref())
73201    }
73202    #[allow(rustdoc::invalid_html_tags)]
73203    #[doc = "Optional. Inline keyboard attached to the message"]
73204    #[allow(clippy::needless_lifetimes)]
73205    fn set_reply_markup<'a>(
73206        &'a mut self,
73207        reply_markup: Option<InlineKeyboardMarkup>,
73208    ) -> &'a mut Self {
73209        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
73210        self
73211    }
73212    #[allow(rustdoc::invalid_html_tags)]
73213    #[doc = "Optional. Content of the message to be sent instead of the location"]
73214    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73215    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
73216        self.input_message_content.as_ref().map(|v| v.inner_ref())
73217    }
73218    #[allow(rustdoc::invalid_html_tags)]
73219    #[doc = "Optional. Content of the message to be sent instead of the location"]
73220    #[allow(clippy::needless_lifetimes)]
73221    fn set_input_message_content<'a>(
73222        &'a mut self,
73223        input_message_content: Option<InputMessageContent>,
73224    ) -> &'a mut Self {
73225        self.input_message_content = input_message_content
73226            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
73227        self
73228    }
73229    #[allow(rustdoc::invalid_html_tags)]
73230    #[doc = "Optional. Url of the thumbnail for the result"]
73231    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73232    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
73233        self.thumbnail_url.as_ref().map(|v| v.as_str())
73234    }
73235    #[allow(rustdoc::invalid_html_tags)]
73236    #[doc = "Optional. Url of the thumbnail for the result"]
73237    #[allow(clippy::needless_lifetimes)]
73238    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
73239        self.thumbnail_url = thumbnail_url;
73240        self
73241    }
73242    #[allow(rustdoc::invalid_html_tags)]
73243    #[doc = "Optional. Thumbnail width"]
73244    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73245    fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
73246        self.thumbnail_width.as_ref().map(|v| *v)
73247    }
73248    #[allow(rustdoc::invalid_html_tags)]
73249    #[doc = "Optional. Thumbnail width"]
73250    #[allow(clippy::needless_lifetimes)]
73251    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
73252        self.thumbnail_width = thumbnail_width;
73253        self
73254    }
73255    #[allow(rustdoc::invalid_html_tags)]
73256    #[doc = "Optional. Thumbnail height"]
73257    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73258    fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
73259        self.thumbnail_height.as_ref().map(|v| *v)
73260    }
73261    #[allow(rustdoc::invalid_html_tags)]
73262    #[doc = "Optional. Thumbnail height"]
73263    #[allow(clippy::needless_lifetimes)]
73264    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
73265        self.thumbnail_height = thumbnail_height;
73266        self
73267    }
73268}
73269impl TraitInlineQueryResultMpeg4Gif for InlineQueryResultMpeg4Gif {
73270    #[allow(rustdoc::invalid_html_tags)]
73271    #[doc = "Type of the result, must be mpeg4_gif"]
73272    #[allow(clippy::needless_lifetimes)]
73273    fn get_tg_type<'a>(&'a self) -> &'a str {
73274        self.tg_type.as_str()
73275    }
73276    #[allow(rustdoc::invalid_html_tags)]
73277    #[doc = "Type of the result, must be mpeg4_gif"]
73278    #[allow(clippy::needless_lifetimes)]
73279    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
73280        self.tg_type = tg_type;
73281        self
73282    }
73283    #[allow(rustdoc::invalid_html_tags)]
73284    #[doc = "Unique identifier for this result, 1-64 bytes"]
73285    #[allow(clippy::needless_lifetimes)]
73286    fn get_id<'a>(&'a self) -> &'a str {
73287        self.id.as_str()
73288    }
73289    #[allow(rustdoc::invalid_html_tags)]
73290    #[doc = "Unique identifier for this result, 1-64 bytes"]
73291    #[allow(clippy::needless_lifetimes)]
73292    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
73293        self.id = id;
73294        self
73295    }
73296    #[allow(rustdoc::invalid_html_tags)]
73297    #[doc = "A valid URL for the MPEG4 file"]
73298    #[allow(clippy::needless_lifetimes)]
73299    fn get_mpeg_4_url<'a>(&'a self) -> &'a str {
73300        self.mpeg_4_url.as_str()
73301    }
73302    #[allow(rustdoc::invalid_html_tags)]
73303    #[doc = "A valid URL for the MPEG4 file"]
73304    #[allow(clippy::needless_lifetimes)]
73305    fn set_mpeg_4_url<'a>(&'a mut self, mpeg_4_url: String) -> &'a mut Self {
73306        self.mpeg_4_url = mpeg_4_url;
73307        self
73308    }
73309    #[allow(rustdoc::invalid_html_tags)]
73310    #[doc = "Optional. Video width"]
73311    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73312    fn get_mpeg_4_width<'a>(&'a self) -> Option<i64> {
73313        self.mpeg_4_width.as_ref().map(|v| *v)
73314    }
73315    #[allow(rustdoc::invalid_html_tags)]
73316    #[doc = "Optional. Video width"]
73317    #[allow(clippy::needless_lifetimes)]
73318    fn set_mpeg_4_width<'a>(&'a mut self, mpeg_4_width: Option<i64>) -> &'a mut Self {
73319        self.mpeg_4_width = mpeg_4_width;
73320        self
73321    }
73322    #[allow(rustdoc::invalid_html_tags)]
73323    #[doc = "Optional. Video height"]
73324    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73325    fn get_mpeg_4_height<'a>(&'a self) -> Option<i64> {
73326        self.mpeg_4_height.as_ref().map(|v| *v)
73327    }
73328    #[allow(rustdoc::invalid_html_tags)]
73329    #[doc = "Optional. Video height"]
73330    #[allow(clippy::needless_lifetimes)]
73331    fn set_mpeg_4_height<'a>(&'a mut self, mpeg_4_height: Option<i64>) -> &'a mut Self {
73332        self.mpeg_4_height = mpeg_4_height;
73333        self
73334    }
73335    #[allow(rustdoc::invalid_html_tags)]
73336    #[doc = "Optional. Video duration in seconds"]
73337    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73338    fn get_mpeg_4_duration<'a>(&'a self) -> Option<i64> {
73339        self.mpeg_4_duration.as_ref().map(|v| *v)
73340    }
73341    #[allow(rustdoc::invalid_html_tags)]
73342    #[doc = "Optional. Video duration in seconds"]
73343    #[allow(clippy::needless_lifetimes)]
73344    fn set_mpeg_4_duration<'a>(&'a mut self, mpeg_4_duration: Option<i64>) -> &'a mut Self {
73345        self.mpeg_4_duration = mpeg_4_duration;
73346        self
73347    }
73348    #[allow(rustdoc::invalid_html_tags)]
73349    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
73350    #[allow(clippy::needless_lifetimes)]
73351    fn get_thumbnail_url<'a>(&'a self) -> &'a str {
73352        self.thumbnail_url.as_str()
73353    }
73354    #[allow(rustdoc::invalid_html_tags)]
73355    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
73356    #[allow(clippy::needless_lifetimes)]
73357    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
73358        self.thumbnail_url = thumbnail_url;
73359        self
73360    }
73361    #[allow(rustdoc::invalid_html_tags)]
73362    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
73363    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73364    fn get_thumbnail_mime_type<'a>(&'a self) -> Option<&'a str> {
73365        self.thumbnail_mime_type.as_ref().map(|v| v.as_str())
73366    }
73367    #[allow(rustdoc::invalid_html_tags)]
73368    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
73369    #[allow(clippy::needless_lifetimes)]
73370    fn set_thumbnail_mime_type<'a>(
73371        &'a mut self,
73372        thumbnail_mime_type: Option<String>,
73373    ) -> &'a mut Self {
73374        self.thumbnail_mime_type = thumbnail_mime_type;
73375        self
73376    }
73377    #[allow(rustdoc::invalid_html_tags)]
73378    #[doc = "Optional. Title for the result"]
73379    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73380    fn get_title<'a>(&'a self) -> Option<&'a str> {
73381        self.title.as_ref().map(|v| v.as_str())
73382    }
73383    #[allow(rustdoc::invalid_html_tags)]
73384    #[doc = "Optional. Title for the result"]
73385    #[allow(clippy::needless_lifetimes)]
73386    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
73387        self.title = title;
73388        self
73389    }
73390    #[allow(rustdoc::invalid_html_tags)]
73391    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
73392    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73393    fn get_caption<'a>(&'a self) -> Option<&'a str> {
73394        self.caption.as_ref().map(|v| v.as_str())
73395    }
73396    #[allow(rustdoc::invalid_html_tags)]
73397    #[doc = "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing"]
73398    #[allow(clippy::needless_lifetimes)]
73399    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
73400        self.caption = caption;
73401        self
73402    }
73403    #[allow(rustdoc::invalid_html_tags)]
73404    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
73405    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73406    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
73407        self.parse_mode.as_ref().map(|v| v.as_str())
73408    }
73409    #[allow(rustdoc::invalid_html_tags)]
73410    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
73411    #[allow(clippy::needless_lifetimes)]
73412    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
73413        self.parse_mode = parse_mode;
73414        self
73415    }
73416    #[allow(rustdoc::invalid_html_tags)]
73417    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
73418    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73419    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
73420        self.caption_entities.as_ref()
73421    }
73422    #[allow(rustdoc::invalid_html_tags)]
73423    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
73424    #[allow(clippy::needless_lifetimes)]
73425    fn set_caption_entities<'a>(
73426        &'a mut self,
73427        caption_entities: Option<Vec<MessageEntity>>,
73428    ) -> &'a mut Self {
73429        self.caption_entities = caption_entities;
73430        self
73431    }
73432    #[allow(rustdoc::invalid_html_tags)]
73433    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
73434    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73435    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
73436        self.show_caption_above_media.as_ref().map(|v| *v)
73437    }
73438    #[allow(rustdoc::invalid_html_tags)]
73439    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
73440    #[allow(clippy::needless_lifetimes)]
73441    fn set_show_caption_above_media<'a>(
73442        &'a mut self,
73443        show_caption_above_media: Option<bool>,
73444    ) -> &'a mut Self {
73445        self.show_caption_above_media = show_caption_above_media;
73446        self
73447    }
73448    #[allow(rustdoc::invalid_html_tags)]
73449    #[doc = "Optional. Inline keyboard attached to the message"]
73450    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73451    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
73452        self.reply_markup.as_ref().map(|v| v.inner_ref())
73453    }
73454    #[allow(rustdoc::invalid_html_tags)]
73455    #[doc = "Optional. Inline keyboard attached to the message"]
73456    #[allow(clippy::needless_lifetimes)]
73457    fn set_reply_markup<'a>(
73458        &'a mut self,
73459        reply_markup: Option<InlineKeyboardMarkup>,
73460    ) -> &'a mut Self {
73461        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
73462        self
73463    }
73464    #[allow(rustdoc::invalid_html_tags)]
73465    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
73466    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73467    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
73468        self.input_message_content.as_ref().map(|v| v.inner_ref())
73469    }
73470    #[allow(rustdoc::invalid_html_tags)]
73471    #[doc = "Optional. Content of the message to be sent instead of the video animation"]
73472    #[allow(clippy::needless_lifetimes)]
73473    fn set_input_message_content<'a>(
73474        &'a mut self,
73475        input_message_content: Option<InputMessageContent>,
73476    ) -> &'a mut Self {
73477        self.input_message_content = input_message_content
73478            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
73479        self
73480    }
73481}
73482impl TraitInlineQueryResultPhoto for InlineQueryResultPhoto {
73483    #[allow(rustdoc::invalid_html_tags)]
73484    #[doc = "Type of the result, must be photo"]
73485    #[allow(clippy::needless_lifetimes)]
73486    fn get_tg_type<'a>(&'a self) -> &'a str {
73487        self.tg_type.as_str()
73488    }
73489    #[allow(rustdoc::invalid_html_tags)]
73490    #[doc = "Type of the result, must be photo"]
73491    #[allow(clippy::needless_lifetimes)]
73492    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
73493        self.tg_type = tg_type;
73494        self
73495    }
73496    #[allow(rustdoc::invalid_html_tags)]
73497    #[doc = "Unique identifier for this result, 1-64 bytes"]
73498    #[allow(clippy::needless_lifetimes)]
73499    fn get_id<'a>(&'a self) -> &'a str {
73500        self.id.as_str()
73501    }
73502    #[allow(rustdoc::invalid_html_tags)]
73503    #[doc = "Unique identifier for this result, 1-64 bytes"]
73504    #[allow(clippy::needless_lifetimes)]
73505    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
73506        self.id = id;
73507        self
73508    }
73509    #[allow(rustdoc::invalid_html_tags)]
73510    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
73511    #[allow(clippy::needless_lifetimes)]
73512    fn get_photo_url<'a>(&'a self) -> &'a str {
73513        self.photo_url.as_str()
73514    }
73515    #[allow(rustdoc::invalid_html_tags)]
73516    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
73517    #[allow(clippy::needless_lifetimes)]
73518    fn set_photo_url<'a>(&'a mut self, photo_url: String) -> &'a mut Self {
73519        self.photo_url = photo_url;
73520        self
73521    }
73522    #[allow(rustdoc::invalid_html_tags)]
73523    #[doc = "URL of the thumbnail for the photo"]
73524    #[allow(clippy::needless_lifetimes)]
73525    fn get_thumbnail_url<'a>(&'a self) -> &'a str {
73526        self.thumbnail_url.as_str()
73527    }
73528    #[allow(rustdoc::invalid_html_tags)]
73529    #[doc = "URL of the thumbnail for the photo"]
73530    #[allow(clippy::needless_lifetimes)]
73531    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
73532        self.thumbnail_url = thumbnail_url;
73533        self
73534    }
73535    #[allow(rustdoc::invalid_html_tags)]
73536    #[doc = "Optional. Width of the photo"]
73537    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73538    fn get_photo_width<'a>(&'a self) -> Option<i64> {
73539        self.photo_width.as_ref().map(|v| *v)
73540    }
73541    #[allow(rustdoc::invalid_html_tags)]
73542    #[doc = "Optional. Width of the photo"]
73543    #[allow(clippy::needless_lifetimes)]
73544    fn set_photo_width<'a>(&'a mut self, photo_width: Option<i64>) -> &'a mut Self {
73545        self.photo_width = photo_width;
73546        self
73547    }
73548    #[allow(rustdoc::invalid_html_tags)]
73549    #[doc = "Optional. Height of the photo"]
73550    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73551    fn get_photo_height<'a>(&'a self) -> Option<i64> {
73552        self.photo_height.as_ref().map(|v| *v)
73553    }
73554    #[allow(rustdoc::invalid_html_tags)]
73555    #[doc = "Optional. Height of the photo"]
73556    #[allow(clippy::needless_lifetimes)]
73557    fn set_photo_height<'a>(&'a mut self, photo_height: Option<i64>) -> &'a mut Self {
73558        self.photo_height = photo_height;
73559        self
73560    }
73561    #[allow(rustdoc::invalid_html_tags)]
73562    #[doc = "Optional. Title for the result"]
73563    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73564    fn get_title<'a>(&'a self) -> Option<&'a str> {
73565        self.title.as_ref().map(|v| v.as_str())
73566    }
73567    #[allow(rustdoc::invalid_html_tags)]
73568    #[doc = "Optional. Title for the result"]
73569    #[allow(clippy::needless_lifetimes)]
73570    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
73571        self.title = title;
73572        self
73573    }
73574    #[allow(rustdoc::invalid_html_tags)]
73575    #[doc = "Optional. Short description of the result"]
73576    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73577    fn get_description<'a>(&'a self) -> Option<&'a str> {
73578        self.description.as_ref().map(|v| v.as_str())
73579    }
73580    #[allow(rustdoc::invalid_html_tags)]
73581    #[doc = "Optional. Short description of the result"]
73582    #[allow(clippy::needless_lifetimes)]
73583    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
73584        self.description = description;
73585        self
73586    }
73587    #[allow(rustdoc::invalid_html_tags)]
73588    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
73589    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73590    fn get_caption<'a>(&'a self) -> Option<&'a str> {
73591        self.caption.as_ref().map(|v| v.as_str())
73592    }
73593    #[allow(rustdoc::invalid_html_tags)]
73594    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
73595    #[allow(clippy::needless_lifetimes)]
73596    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
73597        self.caption = caption;
73598        self
73599    }
73600    #[allow(rustdoc::invalid_html_tags)]
73601    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
73602    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73603    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
73604        self.parse_mode.as_ref().map(|v| v.as_str())
73605    }
73606    #[allow(rustdoc::invalid_html_tags)]
73607    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
73608    #[allow(clippy::needless_lifetimes)]
73609    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
73610        self.parse_mode = parse_mode;
73611        self
73612    }
73613    #[allow(rustdoc::invalid_html_tags)]
73614    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
73615    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73616    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
73617        self.caption_entities.as_ref()
73618    }
73619    #[allow(rustdoc::invalid_html_tags)]
73620    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
73621    #[allow(clippy::needless_lifetimes)]
73622    fn set_caption_entities<'a>(
73623        &'a mut self,
73624        caption_entities: Option<Vec<MessageEntity>>,
73625    ) -> &'a mut Self {
73626        self.caption_entities = caption_entities;
73627        self
73628    }
73629    #[allow(rustdoc::invalid_html_tags)]
73630    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
73631    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73632    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
73633        self.show_caption_above_media.as_ref().map(|v| *v)
73634    }
73635    #[allow(rustdoc::invalid_html_tags)]
73636    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
73637    #[allow(clippy::needless_lifetimes)]
73638    fn set_show_caption_above_media<'a>(
73639        &'a mut self,
73640        show_caption_above_media: Option<bool>,
73641    ) -> &'a mut Self {
73642        self.show_caption_above_media = show_caption_above_media;
73643        self
73644    }
73645    #[allow(rustdoc::invalid_html_tags)]
73646    #[doc = "Optional. Inline keyboard attached to the message"]
73647    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73648    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
73649        self.reply_markup.as_ref().map(|v| v.inner_ref())
73650    }
73651    #[allow(rustdoc::invalid_html_tags)]
73652    #[doc = "Optional. Inline keyboard attached to the message"]
73653    #[allow(clippy::needless_lifetimes)]
73654    fn set_reply_markup<'a>(
73655        &'a mut self,
73656        reply_markup: Option<InlineKeyboardMarkup>,
73657    ) -> &'a mut Self {
73658        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
73659        self
73660    }
73661    #[allow(rustdoc::invalid_html_tags)]
73662    #[doc = "Optional. Content of the message to be sent instead of the photo"]
73663    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73664    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
73665        self.input_message_content.as_ref().map(|v| v.inner_ref())
73666    }
73667    #[allow(rustdoc::invalid_html_tags)]
73668    #[doc = "Optional. Content of the message to be sent instead of the photo"]
73669    #[allow(clippy::needless_lifetimes)]
73670    fn set_input_message_content<'a>(
73671        &'a mut self,
73672        input_message_content: Option<InputMessageContent>,
73673    ) -> &'a mut Self {
73674        self.input_message_content = input_message_content
73675            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
73676        self
73677    }
73678}
73679impl TraitInlineQueryResultVenue for InlineQueryResultVenue {
73680    #[allow(rustdoc::invalid_html_tags)]
73681    #[doc = "Type of the result, must be venue"]
73682    #[allow(clippy::needless_lifetimes)]
73683    fn get_tg_type<'a>(&'a self) -> &'a str {
73684        self.tg_type.as_str()
73685    }
73686    #[allow(rustdoc::invalid_html_tags)]
73687    #[doc = "Type of the result, must be venue"]
73688    #[allow(clippy::needless_lifetimes)]
73689    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
73690        self.tg_type = tg_type;
73691        self
73692    }
73693    #[allow(rustdoc::invalid_html_tags)]
73694    #[doc = "Unique identifier for this result, 1-64 Bytes"]
73695    #[allow(clippy::needless_lifetimes)]
73696    fn get_id<'a>(&'a self) -> &'a str {
73697        self.id.as_str()
73698    }
73699    #[allow(rustdoc::invalid_html_tags)]
73700    #[doc = "Unique identifier for this result, 1-64 Bytes"]
73701    #[allow(clippy::needless_lifetimes)]
73702    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
73703        self.id = id;
73704        self
73705    }
73706    #[allow(rustdoc::invalid_html_tags)]
73707    #[doc = "Latitude of the venue location in degrees"]
73708    #[allow(clippy::needless_lifetimes)]
73709    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
73710        self.latitude
73711    }
73712    #[allow(rustdoc::invalid_html_tags)]
73713    #[doc = "Latitude of the venue location in degrees"]
73714    #[allow(clippy::needless_lifetimes)]
73715    fn set_latitude<'a>(
73716        &'a mut self,
73717        latitude: ::ordered_float::OrderedFloat<f64>,
73718    ) -> &'a mut Self {
73719        self.latitude = latitude;
73720        self
73721    }
73722    #[allow(rustdoc::invalid_html_tags)]
73723    #[doc = "Longitude of the venue location in degrees"]
73724    #[allow(clippy::needless_lifetimes)]
73725    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
73726        self.longitude
73727    }
73728    #[allow(rustdoc::invalid_html_tags)]
73729    #[doc = "Longitude of the venue location in degrees"]
73730    #[allow(clippy::needless_lifetimes)]
73731    fn set_longitude<'a>(
73732        &'a mut self,
73733        longitude: ::ordered_float::OrderedFloat<f64>,
73734    ) -> &'a mut Self {
73735        self.longitude = longitude;
73736        self
73737    }
73738    #[allow(rustdoc::invalid_html_tags)]
73739    #[doc = "Title of the venue"]
73740    #[allow(clippy::needless_lifetimes)]
73741    fn get_title<'a>(&'a self) -> &'a str {
73742        self.title.as_str()
73743    }
73744    #[allow(rustdoc::invalid_html_tags)]
73745    #[doc = "Title of the venue"]
73746    #[allow(clippy::needless_lifetimes)]
73747    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
73748        self.title = title;
73749        self
73750    }
73751    #[allow(rustdoc::invalid_html_tags)]
73752    #[doc = "Address of the venue"]
73753    #[allow(clippy::needless_lifetimes)]
73754    fn get_address<'a>(&'a self) -> &'a str {
73755        self.address.as_str()
73756    }
73757    #[allow(rustdoc::invalid_html_tags)]
73758    #[doc = "Address of the venue"]
73759    #[allow(clippy::needless_lifetimes)]
73760    fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self {
73761        self.address = address;
73762        self
73763    }
73764    #[allow(rustdoc::invalid_html_tags)]
73765    #[doc = "Optional. Foursquare identifier of the venue if known"]
73766    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73767    fn get_foursquare_id<'a>(&'a self) -> Option<&'a str> {
73768        self.foursquare_id.as_ref().map(|v| v.as_str())
73769    }
73770    #[allow(rustdoc::invalid_html_tags)]
73771    #[doc = "Optional. Foursquare identifier of the venue if known"]
73772    #[allow(clippy::needless_lifetimes)]
73773    fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self {
73774        self.foursquare_id = foursquare_id;
73775        self
73776    }
73777    #[allow(rustdoc::invalid_html_tags)]
73778    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
73779    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73780    fn get_foursquare_type<'a>(&'a self) -> Option<&'a str> {
73781        self.foursquare_type.as_ref().map(|v| v.as_str())
73782    }
73783    #[allow(rustdoc::invalid_html_tags)]
73784    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
73785    #[allow(clippy::needless_lifetimes)]
73786    fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self {
73787        self.foursquare_type = foursquare_type;
73788        self
73789    }
73790    #[allow(rustdoc::invalid_html_tags)]
73791    #[doc = "Optional. Google Places identifier of the venue"]
73792    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73793    fn get_google_place_id<'a>(&'a self) -> Option<&'a str> {
73794        self.google_place_id.as_ref().map(|v| v.as_str())
73795    }
73796    #[allow(rustdoc::invalid_html_tags)]
73797    #[doc = "Optional. Google Places identifier of the venue"]
73798    #[allow(clippy::needless_lifetimes)]
73799    fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self {
73800        self.google_place_id = google_place_id;
73801        self
73802    }
73803    #[allow(rustdoc::invalid_html_tags)]
73804    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
73805    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73806    fn get_google_place_type<'a>(&'a self) -> Option<&'a str> {
73807        self.google_place_type.as_ref().map(|v| v.as_str())
73808    }
73809    #[allow(rustdoc::invalid_html_tags)]
73810    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
73811    #[allow(clippy::needless_lifetimes)]
73812    fn set_google_place_type<'a>(&'a mut self, google_place_type: Option<String>) -> &'a mut Self {
73813        self.google_place_type = google_place_type;
73814        self
73815    }
73816    #[allow(rustdoc::invalid_html_tags)]
73817    #[doc = "Optional. Inline keyboard attached to the message"]
73818    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73819    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
73820        self.reply_markup.as_ref().map(|v| v.inner_ref())
73821    }
73822    #[allow(rustdoc::invalid_html_tags)]
73823    #[doc = "Optional. Inline keyboard attached to the message"]
73824    #[allow(clippy::needless_lifetimes)]
73825    fn set_reply_markup<'a>(
73826        &'a mut self,
73827        reply_markup: Option<InlineKeyboardMarkup>,
73828    ) -> &'a mut Self {
73829        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
73830        self
73831    }
73832    #[allow(rustdoc::invalid_html_tags)]
73833    #[doc = "Optional. Content of the message to be sent instead of the venue"]
73834    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73835    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
73836        self.input_message_content.as_ref().map(|v| v.inner_ref())
73837    }
73838    #[allow(rustdoc::invalid_html_tags)]
73839    #[doc = "Optional. Content of the message to be sent instead of the venue"]
73840    #[allow(clippy::needless_lifetimes)]
73841    fn set_input_message_content<'a>(
73842        &'a mut self,
73843        input_message_content: Option<InputMessageContent>,
73844    ) -> &'a mut Self {
73845        self.input_message_content = input_message_content
73846            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
73847        self
73848    }
73849    #[allow(rustdoc::invalid_html_tags)]
73850    #[doc = "Optional. Url of the thumbnail for the result"]
73851    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73852    fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
73853        self.thumbnail_url.as_ref().map(|v| v.as_str())
73854    }
73855    #[allow(rustdoc::invalid_html_tags)]
73856    #[doc = "Optional. Url of the thumbnail for the result"]
73857    #[allow(clippy::needless_lifetimes)]
73858    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
73859        self.thumbnail_url = thumbnail_url;
73860        self
73861    }
73862    #[allow(rustdoc::invalid_html_tags)]
73863    #[doc = "Optional. Thumbnail width"]
73864    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73865    fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
73866        self.thumbnail_width.as_ref().map(|v| *v)
73867    }
73868    #[allow(rustdoc::invalid_html_tags)]
73869    #[doc = "Optional. Thumbnail width"]
73870    #[allow(clippy::needless_lifetimes)]
73871    fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
73872        self.thumbnail_width = thumbnail_width;
73873        self
73874    }
73875    #[allow(rustdoc::invalid_html_tags)]
73876    #[doc = "Optional. Thumbnail height"]
73877    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73878    fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
73879        self.thumbnail_height.as_ref().map(|v| *v)
73880    }
73881    #[allow(rustdoc::invalid_html_tags)]
73882    #[doc = "Optional. Thumbnail height"]
73883    #[allow(clippy::needless_lifetimes)]
73884    fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
73885        self.thumbnail_height = thumbnail_height;
73886        self
73887    }
73888}
73889impl TraitInlineQueryResultVideo for InlineQueryResultVideo {
73890    #[allow(rustdoc::invalid_html_tags)]
73891    #[doc = "Type of the result, must be video"]
73892    #[allow(clippy::needless_lifetimes)]
73893    fn get_tg_type<'a>(&'a self) -> &'a str {
73894        self.tg_type.as_str()
73895    }
73896    #[allow(rustdoc::invalid_html_tags)]
73897    #[doc = "Type of the result, must be video"]
73898    #[allow(clippy::needless_lifetimes)]
73899    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
73900        self.tg_type = tg_type;
73901        self
73902    }
73903    #[allow(rustdoc::invalid_html_tags)]
73904    #[doc = "Unique identifier for this result, 1-64 bytes"]
73905    #[allow(clippy::needless_lifetimes)]
73906    fn get_id<'a>(&'a self) -> &'a str {
73907        self.id.as_str()
73908    }
73909    #[allow(rustdoc::invalid_html_tags)]
73910    #[doc = "Unique identifier for this result, 1-64 bytes"]
73911    #[allow(clippy::needless_lifetimes)]
73912    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
73913        self.id = id;
73914        self
73915    }
73916    #[allow(rustdoc::invalid_html_tags)]
73917    #[doc = "A valid URL for the embedded video player or video file"]
73918    #[allow(clippy::needless_lifetimes)]
73919    fn get_video_url<'a>(&'a self) -> &'a str {
73920        self.video_url.as_str()
73921    }
73922    #[allow(rustdoc::invalid_html_tags)]
73923    #[doc = "A valid URL for the embedded video player or video file"]
73924    #[allow(clippy::needless_lifetimes)]
73925    fn set_video_url<'a>(&'a mut self, video_url: String) -> &'a mut Self {
73926        self.video_url = video_url;
73927        self
73928    }
73929    #[allow(rustdoc::invalid_html_tags)]
73930    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
73931    #[allow(clippy::needless_lifetimes)]
73932    fn get_mime_type<'a>(&'a self) -> &'a str {
73933        self.mime_type.as_str()
73934    }
73935    #[allow(rustdoc::invalid_html_tags)]
73936    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
73937    #[allow(clippy::needless_lifetimes)]
73938    fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self {
73939        self.mime_type = mime_type;
73940        self
73941    }
73942    #[allow(rustdoc::invalid_html_tags)]
73943    #[doc = "URL of the thumbnail (JPEG only) for the video"]
73944    #[allow(clippy::needless_lifetimes)]
73945    fn get_thumbnail_url<'a>(&'a self) -> &'a str {
73946        self.thumbnail_url.as_str()
73947    }
73948    #[allow(rustdoc::invalid_html_tags)]
73949    #[doc = "URL of the thumbnail (JPEG only) for the video"]
73950    #[allow(clippy::needless_lifetimes)]
73951    fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
73952        self.thumbnail_url = thumbnail_url;
73953        self
73954    }
73955    #[allow(rustdoc::invalid_html_tags)]
73956    #[doc = "Title for the result"]
73957    #[allow(clippy::needless_lifetimes)]
73958    fn get_title<'a>(&'a self) -> &'a str {
73959        self.title.as_str()
73960    }
73961    #[allow(rustdoc::invalid_html_tags)]
73962    #[doc = "Title for the result"]
73963    #[allow(clippy::needless_lifetimes)]
73964    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
73965        self.title = title;
73966        self
73967    }
73968    #[allow(rustdoc::invalid_html_tags)]
73969    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
73970    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73971    fn get_caption<'a>(&'a self) -> Option<&'a str> {
73972        self.caption.as_ref().map(|v| v.as_str())
73973    }
73974    #[allow(rustdoc::invalid_html_tags)]
73975    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
73976    #[allow(clippy::needless_lifetimes)]
73977    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
73978        self.caption = caption;
73979        self
73980    }
73981    #[allow(rustdoc::invalid_html_tags)]
73982    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
73983    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73984    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
73985        self.parse_mode.as_ref().map(|v| v.as_str())
73986    }
73987    #[allow(rustdoc::invalid_html_tags)]
73988    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
73989    #[allow(clippy::needless_lifetimes)]
73990    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
73991        self.parse_mode = parse_mode;
73992        self
73993    }
73994    #[allow(rustdoc::invalid_html_tags)]
73995    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
73996    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
73997    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
73998        self.caption_entities.as_ref()
73999    }
74000    #[allow(rustdoc::invalid_html_tags)]
74001    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
74002    #[allow(clippy::needless_lifetimes)]
74003    fn set_caption_entities<'a>(
74004        &'a mut self,
74005        caption_entities: Option<Vec<MessageEntity>>,
74006    ) -> &'a mut Self {
74007        self.caption_entities = caption_entities;
74008        self
74009    }
74010    #[allow(rustdoc::invalid_html_tags)]
74011    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
74012    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74013    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
74014        self.show_caption_above_media.as_ref().map(|v| *v)
74015    }
74016    #[allow(rustdoc::invalid_html_tags)]
74017    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
74018    #[allow(clippy::needless_lifetimes)]
74019    fn set_show_caption_above_media<'a>(
74020        &'a mut self,
74021        show_caption_above_media: Option<bool>,
74022    ) -> &'a mut Self {
74023        self.show_caption_above_media = show_caption_above_media;
74024        self
74025    }
74026    #[allow(rustdoc::invalid_html_tags)]
74027    #[doc = "Optional. Video width"]
74028    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74029    fn get_video_width<'a>(&'a self) -> Option<i64> {
74030        self.video_width.as_ref().map(|v| *v)
74031    }
74032    #[allow(rustdoc::invalid_html_tags)]
74033    #[doc = "Optional. Video width"]
74034    #[allow(clippy::needless_lifetimes)]
74035    fn set_video_width<'a>(&'a mut self, video_width: Option<i64>) -> &'a mut Self {
74036        self.video_width = video_width;
74037        self
74038    }
74039    #[allow(rustdoc::invalid_html_tags)]
74040    #[doc = "Optional. Video height"]
74041    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74042    fn get_video_height<'a>(&'a self) -> Option<i64> {
74043        self.video_height.as_ref().map(|v| *v)
74044    }
74045    #[allow(rustdoc::invalid_html_tags)]
74046    #[doc = "Optional. Video height"]
74047    #[allow(clippy::needless_lifetimes)]
74048    fn set_video_height<'a>(&'a mut self, video_height: Option<i64>) -> &'a mut Self {
74049        self.video_height = video_height;
74050        self
74051    }
74052    #[allow(rustdoc::invalid_html_tags)]
74053    #[doc = "Optional. Video duration in seconds"]
74054    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74055    fn get_video_duration<'a>(&'a self) -> Option<i64> {
74056        self.video_duration.as_ref().map(|v| *v)
74057    }
74058    #[allow(rustdoc::invalid_html_tags)]
74059    #[doc = "Optional. Video duration in seconds"]
74060    #[allow(clippy::needless_lifetimes)]
74061    fn set_video_duration<'a>(&'a mut self, video_duration: Option<i64>) -> &'a mut Self {
74062        self.video_duration = video_duration;
74063        self
74064    }
74065    #[allow(rustdoc::invalid_html_tags)]
74066    #[doc = "Optional. Short description of the result"]
74067    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74068    fn get_description<'a>(&'a self) -> Option<&'a str> {
74069        self.description.as_ref().map(|v| v.as_str())
74070    }
74071    #[allow(rustdoc::invalid_html_tags)]
74072    #[doc = "Optional. Short description of the result"]
74073    #[allow(clippy::needless_lifetimes)]
74074    fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
74075        self.description = description;
74076        self
74077    }
74078    #[allow(rustdoc::invalid_html_tags)]
74079    #[doc = "Optional. Inline keyboard attached to the message"]
74080    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74081    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
74082        self.reply_markup.as_ref().map(|v| v.inner_ref())
74083    }
74084    #[allow(rustdoc::invalid_html_tags)]
74085    #[doc = "Optional. Inline keyboard attached to the message"]
74086    #[allow(clippy::needless_lifetimes)]
74087    fn set_reply_markup<'a>(
74088        &'a mut self,
74089        reply_markup: Option<InlineKeyboardMarkup>,
74090    ) -> &'a mut Self {
74091        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
74092        self
74093    }
74094    #[allow(rustdoc::invalid_html_tags)]
74095    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
74096    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74097    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
74098        self.input_message_content.as_ref().map(|v| v.inner_ref())
74099    }
74100    #[allow(rustdoc::invalid_html_tags)]
74101    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
74102    #[allow(clippy::needless_lifetimes)]
74103    fn set_input_message_content<'a>(
74104        &'a mut self,
74105        input_message_content: Option<InputMessageContent>,
74106    ) -> &'a mut Self {
74107        self.input_message_content = input_message_content
74108            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
74109        self
74110    }
74111}
74112impl TraitInlineQueryResultVoice for InlineQueryResultVoice {
74113    #[allow(rustdoc::invalid_html_tags)]
74114    #[doc = "Type of the result, must be voice"]
74115    #[allow(clippy::needless_lifetimes)]
74116    fn get_tg_type<'a>(&'a self) -> &'a str {
74117        self.tg_type.as_str()
74118    }
74119    #[allow(rustdoc::invalid_html_tags)]
74120    #[doc = "Type of the result, must be voice"]
74121    #[allow(clippy::needless_lifetimes)]
74122    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
74123        self.tg_type = tg_type;
74124        self
74125    }
74126    #[allow(rustdoc::invalid_html_tags)]
74127    #[doc = "Unique identifier for this result, 1-64 bytes"]
74128    #[allow(clippy::needless_lifetimes)]
74129    fn get_id<'a>(&'a self) -> &'a str {
74130        self.id.as_str()
74131    }
74132    #[allow(rustdoc::invalid_html_tags)]
74133    #[doc = "Unique identifier for this result, 1-64 bytes"]
74134    #[allow(clippy::needless_lifetimes)]
74135    fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
74136        self.id = id;
74137        self
74138    }
74139    #[allow(rustdoc::invalid_html_tags)]
74140    #[doc = "A valid URL for the voice recording"]
74141    #[allow(clippy::needless_lifetimes)]
74142    fn get_voice_url<'a>(&'a self) -> &'a str {
74143        self.voice_url.as_str()
74144    }
74145    #[allow(rustdoc::invalid_html_tags)]
74146    #[doc = "A valid URL for the voice recording"]
74147    #[allow(clippy::needless_lifetimes)]
74148    fn set_voice_url<'a>(&'a mut self, voice_url: String) -> &'a mut Self {
74149        self.voice_url = voice_url;
74150        self
74151    }
74152    #[allow(rustdoc::invalid_html_tags)]
74153    #[doc = "Recording title"]
74154    #[allow(clippy::needless_lifetimes)]
74155    fn get_title<'a>(&'a self) -> &'a str {
74156        self.title.as_str()
74157    }
74158    #[allow(rustdoc::invalid_html_tags)]
74159    #[doc = "Recording title"]
74160    #[allow(clippy::needless_lifetimes)]
74161    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
74162        self.title = title;
74163        self
74164    }
74165    #[allow(rustdoc::invalid_html_tags)]
74166    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
74167    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74168    fn get_caption<'a>(&'a self) -> Option<&'a str> {
74169        self.caption.as_ref().map(|v| v.as_str())
74170    }
74171    #[allow(rustdoc::invalid_html_tags)]
74172    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
74173    #[allow(clippy::needless_lifetimes)]
74174    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
74175        self.caption = caption;
74176        self
74177    }
74178    #[allow(rustdoc::invalid_html_tags)]
74179    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
74180    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74181    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
74182        self.parse_mode.as_ref().map(|v| v.as_str())
74183    }
74184    #[allow(rustdoc::invalid_html_tags)]
74185    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
74186    #[allow(clippy::needless_lifetimes)]
74187    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
74188        self.parse_mode = parse_mode;
74189        self
74190    }
74191    #[allow(rustdoc::invalid_html_tags)]
74192    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
74193    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74194    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
74195        self.caption_entities.as_ref()
74196    }
74197    #[allow(rustdoc::invalid_html_tags)]
74198    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
74199    #[allow(clippy::needless_lifetimes)]
74200    fn set_caption_entities<'a>(
74201        &'a mut self,
74202        caption_entities: Option<Vec<MessageEntity>>,
74203    ) -> &'a mut Self {
74204        self.caption_entities = caption_entities;
74205        self
74206    }
74207    #[allow(rustdoc::invalid_html_tags)]
74208    #[doc = "Optional. Recording duration in seconds"]
74209    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74210    fn get_voice_duration<'a>(&'a self) -> Option<i64> {
74211        self.voice_duration.as_ref().map(|v| *v)
74212    }
74213    #[allow(rustdoc::invalid_html_tags)]
74214    #[doc = "Optional. Recording duration in seconds"]
74215    #[allow(clippy::needless_lifetimes)]
74216    fn set_voice_duration<'a>(&'a mut self, voice_duration: Option<i64>) -> &'a mut Self {
74217        self.voice_duration = voice_duration;
74218        self
74219    }
74220    #[allow(rustdoc::invalid_html_tags)]
74221    #[doc = "Optional. Inline keyboard attached to the message"]
74222    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74223    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
74224        self.reply_markup.as_ref().map(|v| v.inner_ref())
74225    }
74226    #[allow(rustdoc::invalid_html_tags)]
74227    #[doc = "Optional. Inline keyboard attached to the message"]
74228    #[allow(clippy::needless_lifetimes)]
74229    fn set_reply_markup<'a>(
74230        &'a mut self,
74231        reply_markup: Option<InlineKeyboardMarkup>,
74232    ) -> &'a mut Self {
74233        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
74234        self
74235    }
74236    #[allow(rustdoc::invalid_html_tags)]
74237    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
74238    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74239    fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
74240        self.input_message_content.as_ref().map(|v| v.inner_ref())
74241    }
74242    #[allow(rustdoc::invalid_html_tags)]
74243    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
74244    #[allow(clippy::needless_lifetimes)]
74245    fn set_input_message_content<'a>(
74246        &'a mut self,
74247        input_message_content: Option<InputMessageContent>,
74248    ) -> &'a mut Self {
74249        self.input_message_content = input_message_content
74250            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
74251        self
74252    }
74253}
74254#[allow(dead_code)]
74255impl Voice {
74256    #[allow(clippy::too_many_arguments)]
74257    pub fn new(file_id: String, file_unique_id: String, duration: i64) -> Self {
74258        Self {
74259            file_id,
74260            file_unique_id,
74261            duration,
74262            mime_type: None,
74263            file_size: None,
74264        }
74265    }
74266    #[allow(rustdoc::invalid_html_tags)]
74267    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
74268    #[allow(clippy::needless_lifetimes)]
74269    pub fn get_file_id<'a>(&'a self) -> &'a str {
74270        self.file_id.as_str()
74271    }
74272    #[allow(rustdoc::invalid_html_tags)]
74273    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
74274    #[allow(clippy::needless_lifetimes)]
74275    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
74276        self.file_id = file_id;
74277        self
74278    }
74279    #[allow(rustdoc::invalid_html_tags)]
74280    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
74281    fn rhai_get_file_id(&mut self) -> String {
74282        self.file_id.clone()
74283    }
74284    #[allow(rustdoc::invalid_html_tags)]
74285    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
74286    #[allow(clippy::needless_lifetimes)]
74287    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
74288        self.file_unique_id.as_str()
74289    }
74290    #[allow(rustdoc::invalid_html_tags)]
74291    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
74292    #[allow(clippy::needless_lifetimes)]
74293    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
74294        self.file_unique_id = file_unique_id;
74295        self
74296    }
74297    #[allow(rustdoc::invalid_html_tags)]
74298    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
74299    fn rhai_get_file_unique_id(&mut self) -> String {
74300        self.file_unique_id.clone()
74301    }
74302    #[allow(rustdoc::invalid_html_tags)]
74303    #[doc = "Duration of the audio in seconds as defined by the sender"]
74304    #[allow(clippy::needless_lifetimes)]
74305    pub fn get_duration<'a>(&'a self) -> i64 {
74306        self.duration
74307    }
74308    #[allow(rustdoc::invalid_html_tags)]
74309    #[doc = "Duration of the audio in seconds as defined by the sender"]
74310    #[allow(clippy::needless_lifetimes)]
74311    pub fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self {
74312        self.duration = duration;
74313        self
74314    }
74315    #[allow(rustdoc::invalid_html_tags)]
74316    #[doc = "Duration of the audio in seconds as defined by the sender"]
74317    fn rhai_get_duration(&mut self) -> i64 {
74318        self.duration
74319    }
74320    #[allow(rustdoc::invalid_html_tags)]
74321    #[doc = "Optional. MIME type of the file as defined by the sender"]
74322    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74323    pub fn get_mime_type<'a>(&'a self) -> Option<&'a str> {
74324        self.mime_type.as_ref().map(|v| v.as_str())
74325    }
74326    #[allow(rustdoc::invalid_html_tags)]
74327    #[doc = "Optional. MIME type of the file as defined by the sender"]
74328    #[allow(clippy::needless_lifetimes)]
74329    pub fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self {
74330        self.mime_type = mime_type;
74331        self
74332    }
74333    #[allow(rustdoc::invalid_html_tags)]
74334    #[doc = "Optional. MIME type of the file as defined by the sender"]
74335    fn rhai_get_mime_type(&mut self) -> Option<String> {
74336        self.mime_type.as_ref().cloned()
74337    }
74338    #[allow(rustdoc::invalid_html_tags)]
74339    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
74340    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74341    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
74342        self.file_size.as_ref().map(|v| *v)
74343    }
74344    #[allow(rustdoc::invalid_html_tags)]
74345    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
74346    #[allow(clippy::needless_lifetimes)]
74347    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
74348        self.file_size = file_size;
74349        self
74350    }
74351    #[allow(rustdoc::invalid_html_tags)]
74352    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
74353    fn rhai_get_file_size(&mut self) -> Option<i64> {
74354        self.file_size.as_ref().copied()
74355    }
74356}
74357#[allow(dead_code)]
74358impl KeyboardButtonRequestUsers {
74359    #[allow(clippy::too_many_arguments)]
74360    pub fn new(request_id: i64) -> Self {
74361        Self {
74362            request_id,
74363            user_is_bot: None,
74364            user_is_premium: None,
74365            max_quantity: None,
74366            request_name: None,
74367            request_username: None,
74368            request_photo: None,
74369        }
74370    }
74371    #[allow(rustdoc::invalid_html_tags)]
74372    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
74373    #[allow(clippy::needless_lifetimes)]
74374    pub fn get_request_id<'a>(&'a self) -> i64 {
74375        self.request_id
74376    }
74377    #[allow(rustdoc::invalid_html_tags)]
74378    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
74379    #[allow(clippy::needless_lifetimes)]
74380    pub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self {
74381        self.request_id = request_id;
74382        self
74383    }
74384    #[allow(rustdoc::invalid_html_tags)]
74385    #[doc = "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message"]
74386    fn rhai_get_request_id(&mut self) -> i64 {
74387        self.request_id
74388    }
74389    #[allow(rustdoc::invalid_html_tags)]
74390    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
74391    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74392    pub fn get_user_is_bot<'a>(&'a self) -> Option<bool> {
74393        self.user_is_bot.as_ref().map(|v| *v)
74394    }
74395    #[allow(rustdoc::invalid_html_tags)]
74396    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
74397    #[allow(clippy::needless_lifetimes)]
74398    pub fn set_user_is_bot<'a>(&'a mut self, user_is_bot: Option<bool>) -> &'a mut Self {
74399        self.user_is_bot = user_is_bot;
74400        self
74401    }
74402    #[allow(rustdoc::invalid_html_tags)]
74403    #[doc = "Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied."]
74404    fn rhai_get_user_is_bot(&mut self) -> Option<bool> {
74405        self.user_is_bot.as_ref().copied()
74406    }
74407    #[allow(rustdoc::invalid_html_tags)]
74408    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
74409    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74410    pub fn get_user_is_premium<'a>(&'a self) -> Option<bool> {
74411        self.user_is_premium.as_ref().map(|v| *v)
74412    }
74413    #[allow(rustdoc::invalid_html_tags)]
74414    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
74415    #[allow(clippy::needless_lifetimes)]
74416    pub fn set_user_is_premium<'a>(&'a mut self, user_is_premium: Option<bool>) -> &'a mut Self {
74417        self.user_is_premium = user_is_premium;
74418        self
74419    }
74420    #[allow(rustdoc::invalid_html_tags)]
74421    #[doc = "Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied."]
74422    fn rhai_get_user_is_premium(&mut self) -> Option<bool> {
74423        self.user_is_premium.as_ref().copied()
74424    }
74425    #[allow(rustdoc::invalid_html_tags)]
74426    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
74427    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74428    pub fn get_max_quantity<'a>(&'a self) -> Option<i64> {
74429        self.max_quantity.as_ref().map(|v| *v)
74430    }
74431    #[allow(rustdoc::invalid_html_tags)]
74432    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
74433    #[allow(clippy::needless_lifetimes)]
74434    pub fn set_max_quantity<'a>(&'a mut self, max_quantity: Option<i64>) -> &'a mut Self {
74435        self.max_quantity = max_quantity;
74436        self
74437    }
74438    #[allow(rustdoc::invalid_html_tags)]
74439    #[doc = "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."]
74440    fn rhai_get_max_quantity(&mut self) -> Option<i64> {
74441        self.max_quantity.as_ref().copied()
74442    }
74443    #[allow(rustdoc::invalid_html_tags)]
74444    #[doc = "Optional. Pass True to request the users' first and last names"]
74445    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74446    pub fn get_request_name<'a>(&'a self) -> Option<bool> {
74447        self.request_name.as_ref().map(|v| *v)
74448    }
74449    #[allow(rustdoc::invalid_html_tags)]
74450    #[doc = "Optional. Pass True to request the users' first and last names"]
74451    #[allow(clippy::needless_lifetimes)]
74452    pub fn set_request_name<'a>(&'a mut self, request_name: Option<bool>) -> &'a mut Self {
74453        self.request_name = request_name;
74454        self
74455    }
74456    #[allow(rustdoc::invalid_html_tags)]
74457    #[doc = "Optional. Pass True to request the users' first and last names"]
74458    fn rhai_get_request_name(&mut self) -> Option<bool> {
74459        self.request_name.as_ref().copied()
74460    }
74461    #[allow(rustdoc::invalid_html_tags)]
74462    #[doc = "Optional. Pass True to request the users' usernames"]
74463    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74464    pub fn get_request_username<'a>(&'a self) -> Option<bool> {
74465        self.request_username.as_ref().map(|v| *v)
74466    }
74467    #[allow(rustdoc::invalid_html_tags)]
74468    #[doc = "Optional. Pass True to request the users' usernames"]
74469    #[allow(clippy::needless_lifetimes)]
74470    pub fn set_request_username<'a>(&'a mut self, request_username: Option<bool>) -> &'a mut Self {
74471        self.request_username = request_username;
74472        self
74473    }
74474    #[allow(rustdoc::invalid_html_tags)]
74475    #[doc = "Optional. Pass True to request the users' usernames"]
74476    fn rhai_get_request_username(&mut self) -> Option<bool> {
74477        self.request_username.as_ref().copied()
74478    }
74479    #[allow(rustdoc::invalid_html_tags)]
74480    #[doc = "Optional. Pass True to request the users' photos"]
74481    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74482    pub fn get_request_photo<'a>(&'a self) -> Option<bool> {
74483        self.request_photo.as_ref().map(|v| *v)
74484    }
74485    #[allow(rustdoc::invalid_html_tags)]
74486    #[doc = "Optional. Pass True to request the users' photos"]
74487    #[allow(clippy::needless_lifetimes)]
74488    pub fn set_request_photo<'a>(&'a mut self, request_photo: Option<bool>) -> &'a mut Self {
74489        self.request_photo = request_photo;
74490        self
74491    }
74492    #[allow(rustdoc::invalid_html_tags)]
74493    #[doc = "Optional. Pass True to request the users' photos"]
74494    fn rhai_get_request_photo(&mut self) -> Option<bool> {
74495        self.request_photo.as_ref().copied()
74496    }
74497}
74498#[allow(dead_code)]
74499impl InlineQueryResultLocation {
74500    #[allow(clippy::too_many_arguments)]
74501    pub fn new(
74502        id: String,
74503        latitude: ::ordered_float::OrderedFloat<f64>,
74504        longitude: ::ordered_float::OrderedFloat<f64>,
74505        title: String,
74506    ) -> Self {
74507        Self {
74508            tg_type: "location".to_owned(),
74509            id,
74510            latitude,
74511            longitude,
74512            title,
74513            horizontal_accuracy: None,
74514            live_period: None,
74515            heading: None,
74516            proximity_alert_radius: None,
74517            reply_markup: None,
74518            input_message_content: None,
74519            thumbnail_url: None,
74520            thumbnail_width: None,
74521            thumbnail_height: None,
74522        }
74523    }
74524    #[allow(rustdoc::invalid_html_tags)]
74525    #[doc = "Type of the result, must be location"]
74526    #[allow(clippy::needless_lifetimes)]
74527    pub fn get_tg_type<'a>(&'a self) -> &'a str {
74528        self.tg_type.as_str()
74529    }
74530    #[allow(rustdoc::invalid_html_tags)]
74531    #[doc = "Type of the result, must be location"]
74532    #[allow(clippy::needless_lifetimes)]
74533    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
74534        self.tg_type = tg_type;
74535        self
74536    }
74537    #[allow(rustdoc::invalid_html_tags)]
74538    #[doc = "Type of the result, must be location"]
74539    fn rhai_get_tg_type(&mut self) -> String {
74540        self.tg_type.clone()
74541    }
74542    #[allow(rustdoc::invalid_html_tags)]
74543    #[doc = "Unique identifier for this result, 1-64 Bytes"]
74544    #[allow(clippy::needless_lifetimes)]
74545    pub fn get_id<'a>(&'a self) -> &'a str {
74546        self.id.as_str()
74547    }
74548    #[allow(rustdoc::invalid_html_tags)]
74549    #[doc = "Unique identifier for this result, 1-64 Bytes"]
74550    #[allow(clippy::needless_lifetimes)]
74551    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
74552        self.id = id;
74553        self
74554    }
74555    #[allow(rustdoc::invalid_html_tags)]
74556    #[doc = "Unique identifier for this result, 1-64 Bytes"]
74557    fn rhai_get_id(&mut self) -> String {
74558        self.id.clone()
74559    }
74560    #[allow(rustdoc::invalid_html_tags)]
74561    #[doc = "Location latitude in degrees"]
74562    #[allow(clippy::needless_lifetimes)]
74563    pub fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
74564        self.latitude
74565    }
74566    #[allow(rustdoc::invalid_html_tags)]
74567    #[doc = "Location latitude in degrees"]
74568    #[allow(clippy::needless_lifetimes)]
74569    pub fn set_latitude<'a>(
74570        &'a mut self,
74571        latitude: ::ordered_float::OrderedFloat<f64>,
74572    ) -> &'a mut Self {
74573        self.latitude = latitude;
74574        self
74575    }
74576    #[allow(rustdoc::invalid_html_tags)]
74577    #[doc = "Location latitude in degrees"]
74578    fn rhai_get_latitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
74579        self.latitude
74580    }
74581    #[allow(rustdoc::invalid_html_tags)]
74582    #[doc = "Location longitude in degrees"]
74583    #[allow(clippy::needless_lifetimes)]
74584    pub fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
74585        self.longitude
74586    }
74587    #[allow(rustdoc::invalid_html_tags)]
74588    #[doc = "Location longitude in degrees"]
74589    #[allow(clippy::needless_lifetimes)]
74590    pub fn set_longitude<'a>(
74591        &'a mut self,
74592        longitude: ::ordered_float::OrderedFloat<f64>,
74593    ) -> &'a mut Self {
74594        self.longitude = longitude;
74595        self
74596    }
74597    #[allow(rustdoc::invalid_html_tags)]
74598    #[doc = "Location longitude in degrees"]
74599    fn rhai_get_longitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
74600        self.longitude
74601    }
74602    #[allow(rustdoc::invalid_html_tags)]
74603    #[doc = "Location title"]
74604    #[allow(clippy::needless_lifetimes)]
74605    pub fn get_title<'a>(&'a self) -> &'a str {
74606        self.title.as_str()
74607    }
74608    #[allow(rustdoc::invalid_html_tags)]
74609    #[doc = "Location title"]
74610    #[allow(clippy::needless_lifetimes)]
74611    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
74612        self.title = title;
74613        self
74614    }
74615    #[allow(rustdoc::invalid_html_tags)]
74616    #[doc = "Location title"]
74617    fn rhai_get_title(&mut self) -> String {
74618        self.title.clone()
74619    }
74620    #[allow(rustdoc::invalid_html_tags)]
74621    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
74622    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74623    pub fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
74624        self.horizontal_accuracy.as_ref().map(|v| *v)
74625    }
74626    #[allow(rustdoc::invalid_html_tags)]
74627    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
74628    #[allow(clippy::needless_lifetimes)]
74629    pub fn set_horizontal_accuracy<'a>(
74630        &'a mut self,
74631        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
74632    ) -> &'a mut Self {
74633        self.horizontal_accuracy = horizontal_accuracy;
74634        self
74635    }
74636    #[allow(rustdoc::invalid_html_tags)]
74637    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
74638    fn rhai_get_horizontal_accuracy(&mut self) -> Option<::ordered_float::OrderedFloat<f64>> {
74639        self.horizontal_accuracy.as_ref().copied()
74640    }
74641    #[allow(rustdoc::invalid_html_tags)]
74642    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
74643    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74644    pub fn get_live_period<'a>(&'a self) -> Option<i64> {
74645        self.live_period.as_ref().map(|v| *v)
74646    }
74647    #[allow(rustdoc::invalid_html_tags)]
74648    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
74649    #[allow(clippy::needless_lifetimes)]
74650    pub fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self {
74651        self.live_period = live_period;
74652        self
74653    }
74654    #[allow(rustdoc::invalid_html_tags)]
74655    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
74656    fn rhai_get_live_period(&mut self) -> Option<i64> {
74657        self.live_period.as_ref().copied()
74658    }
74659    #[allow(rustdoc::invalid_html_tags)]
74660    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
74661    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74662    pub fn get_heading<'a>(&'a self) -> Option<i64> {
74663        self.heading.as_ref().map(|v| *v)
74664    }
74665    #[allow(rustdoc::invalid_html_tags)]
74666    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
74667    #[allow(clippy::needless_lifetimes)]
74668    pub fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self {
74669        self.heading = heading;
74670        self
74671    }
74672    #[allow(rustdoc::invalid_html_tags)]
74673    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
74674    fn rhai_get_heading(&mut self) -> Option<i64> {
74675        self.heading.as_ref().copied()
74676    }
74677    #[allow(rustdoc::invalid_html_tags)]
74678    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
74679    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74680    pub fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64> {
74681        self.proximity_alert_radius.as_ref().map(|v| *v)
74682    }
74683    #[allow(rustdoc::invalid_html_tags)]
74684    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
74685    #[allow(clippy::needless_lifetimes)]
74686    pub fn set_proximity_alert_radius<'a>(
74687        &'a mut self,
74688        proximity_alert_radius: Option<i64>,
74689    ) -> &'a mut Self {
74690        self.proximity_alert_radius = proximity_alert_radius;
74691        self
74692    }
74693    #[allow(rustdoc::invalid_html_tags)]
74694    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
74695    fn rhai_get_proximity_alert_radius(&mut self) -> Option<i64> {
74696        self.proximity_alert_radius.as_ref().copied()
74697    }
74698    #[allow(rustdoc::invalid_html_tags)]
74699    #[doc = "Optional. Inline keyboard attached to the message"]
74700    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74701    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
74702        self.reply_markup.as_ref().map(|v| v.inner_ref())
74703    }
74704    #[allow(rustdoc::invalid_html_tags)]
74705    #[doc = "Optional. Inline keyboard attached to the message"]
74706    #[allow(clippy::needless_lifetimes)]
74707    pub fn set_reply_markup<'a>(
74708        &'a mut self,
74709        reply_markup: Option<InlineKeyboardMarkup>,
74710    ) -> &'a mut Self {
74711        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
74712        self
74713    }
74714    #[allow(rustdoc::invalid_html_tags)]
74715    #[doc = "Optional. Inline keyboard attached to the message"]
74716    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
74717        self.reply_markup.as_ref().map(|v| v.clone().into())
74718    }
74719    #[allow(rustdoc::invalid_html_tags)]
74720    #[doc = "Optional. Content of the message to be sent instead of the location"]
74721    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74722    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
74723        self.input_message_content.as_ref().map(|v| v.inner_ref())
74724    }
74725    #[allow(rustdoc::invalid_html_tags)]
74726    #[doc = "Optional. Content of the message to be sent instead of the location"]
74727    #[allow(clippy::needless_lifetimes)]
74728    pub fn set_input_message_content<'a>(
74729        &'a mut self,
74730        input_message_content: Option<InputMessageContent>,
74731    ) -> &'a mut Self {
74732        self.input_message_content = input_message_content
74733            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
74734        self
74735    }
74736    #[allow(rustdoc::invalid_html_tags)]
74737    #[doc = "Optional. Content of the message to be sent instead of the location"]
74738    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
74739        self.input_message_content
74740            .as_ref()
74741            .map(|v| v.clone().into())
74742    }
74743    #[allow(rustdoc::invalid_html_tags)]
74744    #[doc = "Optional. Url of the thumbnail for the result"]
74745    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74746    pub fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
74747        self.thumbnail_url.as_ref().map(|v| v.as_str())
74748    }
74749    #[allow(rustdoc::invalid_html_tags)]
74750    #[doc = "Optional. Url of the thumbnail for the result"]
74751    #[allow(clippy::needless_lifetimes)]
74752    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
74753        self.thumbnail_url = thumbnail_url;
74754        self
74755    }
74756    #[allow(rustdoc::invalid_html_tags)]
74757    #[doc = "Optional. Url of the thumbnail for the result"]
74758    fn rhai_get_thumbnail_url(&mut self) -> Option<String> {
74759        self.thumbnail_url.as_ref().cloned()
74760    }
74761    #[allow(rustdoc::invalid_html_tags)]
74762    #[doc = "Optional. Thumbnail width"]
74763    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74764    pub fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
74765        self.thumbnail_width.as_ref().map(|v| *v)
74766    }
74767    #[allow(rustdoc::invalid_html_tags)]
74768    #[doc = "Optional. Thumbnail width"]
74769    #[allow(clippy::needless_lifetimes)]
74770    pub fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
74771        self.thumbnail_width = thumbnail_width;
74772        self
74773    }
74774    #[allow(rustdoc::invalid_html_tags)]
74775    #[doc = "Optional. Thumbnail width"]
74776    fn rhai_get_thumbnail_width(&mut self) -> Option<i64> {
74777        self.thumbnail_width.as_ref().copied()
74778    }
74779    #[allow(rustdoc::invalid_html_tags)]
74780    #[doc = "Optional. Thumbnail height"]
74781    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74782    pub fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
74783        self.thumbnail_height.as_ref().map(|v| *v)
74784    }
74785    #[allow(rustdoc::invalid_html_tags)]
74786    #[doc = "Optional. Thumbnail height"]
74787    #[allow(clippy::needless_lifetimes)]
74788    pub fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
74789        self.thumbnail_height = thumbnail_height;
74790        self
74791    }
74792    #[allow(rustdoc::invalid_html_tags)]
74793    #[doc = "Optional. Thumbnail height"]
74794    fn rhai_get_thumbnail_height(&mut self) -> Option<i64> {
74795        self.thumbnail_height.as_ref().copied()
74796    }
74797}
74798#[allow(dead_code)]
74799impl KeyboardButtonPollType {
74800    #[allow(clippy::too_many_arguments)]
74801    pub fn new() -> Self {
74802        Self {
74803            tg_type: Some("KeyboardButtonPollType".to_owned()),
74804        }
74805    }
74806    #[allow(rustdoc::invalid_html_tags)]
74807    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
74808    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74809    pub fn get_tg_type<'a>(&'a self) -> Option<&'a str> {
74810        self.tg_type.as_ref().map(|v| v.as_str())
74811    }
74812    #[allow(rustdoc::invalid_html_tags)]
74813    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
74814    #[allow(clippy::needless_lifetimes)]
74815    pub fn set_tg_type<'a>(&'a mut self, tg_type: Option<String>) -> &'a mut Self {
74816        self.tg_type = tg_type;
74817        self
74818    }
74819    #[allow(rustdoc::invalid_html_tags)]
74820    #[doc = "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type."]
74821    fn rhai_get_tg_type(&mut self) -> Option<String> {
74822        self.tg_type.as_ref().cloned()
74823    }
74824}
74825#[allow(dead_code)]
74826impl WebAppData {
74827    #[allow(clippy::too_many_arguments)]
74828    pub fn new(data: String, button_text: String) -> Self {
74829        Self { data, button_text }
74830    }
74831    #[allow(rustdoc::invalid_html_tags)]
74832    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
74833    #[allow(clippy::needless_lifetimes)]
74834    pub fn get_data<'a>(&'a self) -> &'a str {
74835        self.data.as_str()
74836    }
74837    #[allow(rustdoc::invalid_html_tags)]
74838    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
74839    #[allow(clippy::needless_lifetimes)]
74840    pub fn set_data<'a>(&'a mut self, data: String) -> &'a mut Self {
74841        self.data = data;
74842        self
74843    }
74844    #[allow(rustdoc::invalid_html_tags)]
74845    #[doc = "The data. Be aware that a bad client can send arbitrary data in this field."]
74846    fn rhai_get_data(&mut self) -> String {
74847        self.data.clone()
74848    }
74849    #[allow(rustdoc::invalid_html_tags)]
74850    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
74851    #[allow(clippy::needless_lifetimes)]
74852    pub fn get_button_text<'a>(&'a self) -> &'a str {
74853        self.button_text.as_str()
74854    }
74855    #[allow(rustdoc::invalid_html_tags)]
74856    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
74857    #[allow(clippy::needless_lifetimes)]
74858    pub fn set_button_text<'a>(&'a mut self, button_text: String) -> &'a mut Self {
74859        self.button_text = button_text;
74860        self
74861    }
74862    #[allow(rustdoc::invalid_html_tags)]
74863    #[doc = "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field."]
74864    fn rhai_get_button_text(&mut self) -> String {
74865        self.button_text.clone()
74866    }
74867}
74868#[allow(dead_code)]
74869impl ForumTopicReopened {}
74870#[allow(dead_code)]
74871impl InlineQueryResultCachedDocument {
74872    #[allow(clippy::too_many_arguments)]
74873    pub fn new(id: String, title: String, document_file_id: String) -> Self {
74874        Self {
74875            tg_type: "document".to_owned(),
74876            id,
74877            title,
74878            document_file_id,
74879            description: None,
74880            caption: None,
74881            parse_mode: None,
74882            caption_entities: None,
74883            reply_markup: None,
74884            input_message_content: None,
74885        }
74886    }
74887    #[allow(rustdoc::invalid_html_tags)]
74888    #[doc = "Type of the result, must be document"]
74889    #[allow(clippy::needless_lifetimes)]
74890    pub fn get_tg_type<'a>(&'a self) -> &'a str {
74891        self.tg_type.as_str()
74892    }
74893    #[allow(rustdoc::invalid_html_tags)]
74894    #[doc = "Type of the result, must be document"]
74895    #[allow(clippy::needless_lifetimes)]
74896    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
74897        self.tg_type = tg_type;
74898        self
74899    }
74900    #[allow(rustdoc::invalid_html_tags)]
74901    #[doc = "Type of the result, must be document"]
74902    fn rhai_get_tg_type(&mut self) -> String {
74903        self.tg_type.clone()
74904    }
74905    #[allow(rustdoc::invalid_html_tags)]
74906    #[doc = "Unique identifier for this result, 1-64 bytes"]
74907    #[allow(clippy::needless_lifetimes)]
74908    pub fn get_id<'a>(&'a self) -> &'a str {
74909        self.id.as_str()
74910    }
74911    #[allow(rustdoc::invalid_html_tags)]
74912    #[doc = "Unique identifier for this result, 1-64 bytes"]
74913    #[allow(clippy::needless_lifetimes)]
74914    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
74915        self.id = id;
74916        self
74917    }
74918    #[allow(rustdoc::invalid_html_tags)]
74919    #[doc = "Unique identifier for this result, 1-64 bytes"]
74920    fn rhai_get_id(&mut self) -> String {
74921        self.id.clone()
74922    }
74923    #[allow(rustdoc::invalid_html_tags)]
74924    #[doc = "Title for the result"]
74925    #[allow(clippy::needless_lifetimes)]
74926    pub fn get_title<'a>(&'a self) -> &'a str {
74927        self.title.as_str()
74928    }
74929    #[allow(rustdoc::invalid_html_tags)]
74930    #[doc = "Title for the result"]
74931    #[allow(clippy::needless_lifetimes)]
74932    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
74933        self.title = title;
74934        self
74935    }
74936    #[allow(rustdoc::invalid_html_tags)]
74937    #[doc = "Title for the result"]
74938    fn rhai_get_title(&mut self) -> String {
74939        self.title.clone()
74940    }
74941    #[allow(rustdoc::invalid_html_tags)]
74942    #[doc = "A valid file identifier for the file"]
74943    #[allow(clippy::needless_lifetimes)]
74944    pub fn get_document_file_id<'a>(&'a self) -> &'a str {
74945        self.document_file_id.as_str()
74946    }
74947    #[allow(rustdoc::invalid_html_tags)]
74948    #[doc = "A valid file identifier for the file"]
74949    #[allow(clippy::needless_lifetimes)]
74950    pub fn set_document_file_id<'a>(&'a mut self, document_file_id: String) -> &'a mut Self {
74951        self.document_file_id = document_file_id;
74952        self
74953    }
74954    #[allow(rustdoc::invalid_html_tags)]
74955    #[doc = "A valid file identifier for the file"]
74956    fn rhai_get_document_file_id(&mut self) -> String {
74957        self.document_file_id.clone()
74958    }
74959    #[allow(rustdoc::invalid_html_tags)]
74960    #[doc = "Optional. Short description of the result"]
74961    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74962    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
74963        self.description.as_ref().map(|v| v.as_str())
74964    }
74965    #[allow(rustdoc::invalid_html_tags)]
74966    #[doc = "Optional. Short description of the result"]
74967    #[allow(clippy::needless_lifetimes)]
74968    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
74969        self.description = description;
74970        self
74971    }
74972    #[allow(rustdoc::invalid_html_tags)]
74973    #[doc = "Optional. Short description of the result"]
74974    fn rhai_get_description(&mut self) -> Option<String> {
74975        self.description.as_ref().cloned()
74976    }
74977    #[allow(rustdoc::invalid_html_tags)]
74978    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
74979    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74980    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
74981        self.caption.as_ref().map(|v| v.as_str())
74982    }
74983    #[allow(rustdoc::invalid_html_tags)]
74984    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
74985    #[allow(clippy::needless_lifetimes)]
74986    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
74987        self.caption = caption;
74988        self
74989    }
74990    #[allow(rustdoc::invalid_html_tags)]
74991    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
74992    fn rhai_get_caption(&mut self) -> Option<String> {
74993        self.caption.as_ref().cloned()
74994    }
74995    #[allow(rustdoc::invalid_html_tags)]
74996    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
74997    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
74998    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
74999        self.parse_mode.as_ref().map(|v| v.as_str())
75000    }
75001    #[allow(rustdoc::invalid_html_tags)]
75002    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
75003    #[allow(clippy::needless_lifetimes)]
75004    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
75005        self.parse_mode = parse_mode;
75006        self
75007    }
75008    #[allow(rustdoc::invalid_html_tags)]
75009    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
75010    fn rhai_get_parse_mode(&mut self) -> Option<String> {
75011        self.parse_mode.as_ref().cloned()
75012    }
75013    #[allow(rustdoc::invalid_html_tags)]
75014    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
75015    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75016    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
75017        self.caption_entities.as_ref()
75018    }
75019    #[allow(rustdoc::invalid_html_tags)]
75020    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
75021    #[allow(clippy::needless_lifetimes)]
75022    pub fn set_caption_entities<'a>(
75023        &'a mut self,
75024        caption_entities: Option<Vec<MessageEntity>>,
75025    ) -> &'a mut Self {
75026        self.caption_entities = caption_entities;
75027        self
75028    }
75029    #[allow(rustdoc::invalid_html_tags)]
75030    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
75031    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
75032        self.caption_entities.as_ref().cloned()
75033    }
75034    #[allow(rustdoc::invalid_html_tags)]
75035    #[doc = "Optional. Inline keyboard attached to the message"]
75036    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75037    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
75038        self.reply_markup.as_ref().map(|v| v.inner_ref())
75039    }
75040    #[allow(rustdoc::invalid_html_tags)]
75041    #[doc = "Optional. Inline keyboard attached to the message"]
75042    #[allow(clippy::needless_lifetimes)]
75043    pub fn set_reply_markup<'a>(
75044        &'a mut self,
75045        reply_markup: Option<InlineKeyboardMarkup>,
75046    ) -> &'a mut Self {
75047        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
75048        self
75049    }
75050    #[allow(rustdoc::invalid_html_tags)]
75051    #[doc = "Optional. Inline keyboard attached to the message"]
75052    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
75053        self.reply_markup.as_ref().map(|v| v.clone().into())
75054    }
75055    #[allow(rustdoc::invalid_html_tags)]
75056    #[doc = "Optional. Content of the message to be sent instead of the file"]
75057    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75058    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
75059        self.input_message_content.as_ref().map(|v| v.inner_ref())
75060    }
75061    #[allow(rustdoc::invalid_html_tags)]
75062    #[doc = "Optional. Content of the message to be sent instead of the file"]
75063    #[allow(clippy::needless_lifetimes)]
75064    pub fn set_input_message_content<'a>(
75065        &'a mut self,
75066        input_message_content: Option<InputMessageContent>,
75067    ) -> &'a mut Self {
75068        self.input_message_content = input_message_content
75069            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
75070        self
75071    }
75072    #[allow(rustdoc::invalid_html_tags)]
75073    #[doc = "Optional. Content of the message to be sent instead of the file"]
75074    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
75075        self.input_message_content
75076            .as_ref()
75077            .map(|v| v.clone().into())
75078    }
75079}
75080#[allow(dead_code)]
75081impl InlineQueryResultVoice {
75082    #[allow(clippy::too_many_arguments)]
75083    pub fn new(id: String, voice_url: String, title: String) -> Self {
75084        Self {
75085            tg_type: "voice".to_owned(),
75086            id,
75087            voice_url,
75088            title,
75089            caption: None,
75090            parse_mode: None,
75091            caption_entities: None,
75092            voice_duration: None,
75093            reply_markup: None,
75094            input_message_content: None,
75095        }
75096    }
75097    #[allow(rustdoc::invalid_html_tags)]
75098    #[doc = "Type of the result, must be voice"]
75099    #[allow(clippy::needless_lifetimes)]
75100    pub fn get_tg_type<'a>(&'a self) -> &'a str {
75101        self.tg_type.as_str()
75102    }
75103    #[allow(rustdoc::invalid_html_tags)]
75104    #[doc = "Type of the result, must be voice"]
75105    #[allow(clippy::needless_lifetimes)]
75106    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
75107        self.tg_type = tg_type;
75108        self
75109    }
75110    #[allow(rustdoc::invalid_html_tags)]
75111    #[doc = "Type of the result, must be voice"]
75112    fn rhai_get_tg_type(&mut self) -> String {
75113        self.tg_type.clone()
75114    }
75115    #[allow(rustdoc::invalid_html_tags)]
75116    #[doc = "Unique identifier for this result, 1-64 bytes"]
75117    #[allow(clippy::needless_lifetimes)]
75118    pub fn get_id<'a>(&'a self) -> &'a str {
75119        self.id.as_str()
75120    }
75121    #[allow(rustdoc::invalid_html_tags)]
75122    #[doc = "Unique identifier for this result, 1-64 bytes"]
75123    #[allow(clippy::needless_lifetimes)]
75124    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
75125        self.id = id;
75126        self
75127    }
75128    #[allow(rustdoc::invalid_html_tags)]
75129    #[doc = "Unique identifier for this result, 1-64 bytes"]
75130    fn rhai_get_id(&mut self) -> String {
75131        self.id.clone()
75132    }
75133    #[allow(rustdoc::invalid_html_tags)]
75134    #[doc = "A valid URL for the voice recording"]
75135    #[allow(clippy::needless_lifetimes)]
75136    pub fn get_voice_url<'a>(&'a self) -> &'a str {
75137        self.voice_url.as_str()
75138    }
75139    #[allow(rustdoc::invalid_html_tags)]
75140    #[doc = "A valid URL for the voice recording"]
75141    #[allow(clippy::needless_lifetimes)]
75142    pub fn set_voice_url<'a>(&'a mut self, voice_url: String) -> &'a mut Self {
75143        self.voice_url = voice_url;
75144        self
75145    }
75146    #[allow(rustdoc::invalid_html_tags)]
75147    #[doc = "A valid URL for the voice recording"]
75148    fn rhai_get_voice_url(&mut self) -> String {
75149        self.voice_url.clone()
75150    }
75151    #[allow(rustdoc::invalid_html_tags)]
75152    #[doc = "Recording title"]
75153    #[allow(clippy::needless_lifetimes)]
75154    pub fn get_title<'a>(&'a self) -> &'a str {
75155        self.title.as_str()
75156    }
75157    #[allow(rustdoc::invalid_html_tags)]
75158    #[doc = "Recording title"]
75159    #[allow(clippy::needless_lifetimes)]
75160    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
75161        self.title = title;
75162        self
75163    }
75164    #[allow(rustdoc::invalid_html_tags)]
75165    #[doc = "Recording title"]
75166    fn rhai_get_title(&mut self) -> String {
75167        self.title.clone()
75168    }
75169    #[allow(rustdoc::invalid_html_tags)]
75170    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
75171    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75172    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
75173        self.caption.as_ref().map(|v| v.as_str())
75174    }
75175    #[allow(rustdoc::invalid_html_tags)]
75176    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
75177    #[allow(clippy::needless_lifetimes)]
75178    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
75179        self.caption = caption;
75180        self
75181    }
75182    #[allow(rustdoc::invalid_html_tags)]
75183    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
75184    fn rhai_get_caption(&mut self) -> Option<String> {
75185        self.caption.as_ref().cloned()
75186    }
75187    #[allow(rustdoc::invalid_html_tags)]
75188    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
75189    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75190    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
75191        self.parse_mode.as_ref().map(|v| v.as_str())
75192    }
75193    #[allow(rustdoc::invalid_html_tags)]
75194    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
75195    #[allow(clippy::needless_lifetimes)]
75196    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
75197        self.parse_mode = parse_mode;
75198        self
75199    }
75200    #[allow(rustdoc::invalid_html_tags)]
75201    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
75202    fn rhai_get_parse_mode(&mut self) -> Option<String> {
75203        self.parse_mode.as_ref().cloned()
75204    }
75205    #[allow(rustdoc::invalid_html_tags)]
75206    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
75207    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75208    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
75209        self.caption_entities.as_ref()
75210    }
75211    #[allow(rustdoc::invalid_html_tags)]
75212    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
75213    #[allow(clippy::needless_lifetimes)]
75214    pub fn set_caption_entities<'a>(
75215        &'a mut self,
75216        caption_entities: Option<Vec<MessageEntity>>,
75217    ) -> &'a mut Self {
75218        self.caption_entities = caption_entities;
75219        self
75220    }
75221    #[allow(rustdoc::invalid_html_tags)]
75222    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
75223    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
75224        self.caption_entities.as_ref().cloned()
75225    }
75226    #[allow(rustdoc::invalid_html_tags)]
75227    #[doc = "Optional. Recording duration in seconds"]
75228    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75229    pub fn get_voice_duration<'a>(&'a self) -> Option<i64> {
75230        self.voice_duration.as_ref().map(|v| *v)
75231    }
75232    #[allow(rustdoc::invalid_html_tags)]
75233    #[doc = "Optional. Recording duration in seconds"]
75234    #[allow(clippy::needless_lifetimes)]
75235    pub fn set_voice_duration<'a>(&'a mut self, voice_duration: Option<i64>) -> &'a mut Self {
75236        self.voice_duration = voice_duration;
75237        self
75238    }
75239    #[allow(rustdoc::invalid_html_tags)]
75240    #[doc = "Optional. Recording duration in seconds"]
75241    fn rhai_get_voice_duration(&mut self) -> Option<i64> {
75242        self.voice_duration.as_ref().copied()
75243    }
75244    #[allow(rustdoc::invalid_html_tags)]
75245    #[doc = "Optional. Inline keyboard attached to the message"]
75246    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75247    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
75248        self.reply_markup.as_ref().map(|v| v.inner_ref())
75249    }
75250    #[allow(rustdoc::invalid_html_tags)]
75251    #[doc = "Optional. Inline keyboard attached to the message"]
75252    #[allow(clippy::needless_lifetimes)]
75253    pub fn set_reply_markup<'a>(
75254        &'a mut self,
75255        reply_markup: Option<InlineKeyboardMarkup>,
75256    ) -> &'a mut Self {
75257        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
75258        self
75259    }
75260    #[allow(rustdoc::invalid_html_tags)]
75261    #[doc = "Optional. Inline keyboard attached to the message"]
75262    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
75263        self.reply_markup.as_ref().map(|v| v.clone().into())
75264    }
75265    #[allow(rustdoc::invalid_html_tags)]
75266    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
75267    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75268    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
75269        self.input_message_content.as_ref().map(|v| v.inner_ref())
75270    }
75271    #[allow(rustdoc::invalid_html_tags)]
75272    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
75273    #[allow(clippy::needless_lifetimes)]
75274    pub fn set_input_message_content<'a>(
75275        &'a mut self,
75276        input_message_content: Option<InputMessageContent>,
75277    ) -> &'a mut Self {
75278        self.input_message_content = input_message_content
75279            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
75280        self
75281    }
75282    #[allow(rustdoc::invalid_html_tags)]
75283    #[doc = "Optional. Content of the message to be sent instead of the voice recording"]
75284    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
75285        self.input_message_content
75286            .as_ref()
75287            .map(|v| v.clone().into())
75288    }
75289}
75290#[allow(dead_code)]
75291impl UniqueGiftBackdrop {
75292    #[allow(clippy::too_many_arguments)]
75293    pub fn new<A: Into<UniqueGiftBackdropColors>>(
75294        name: String,
75295        colors: A,
75296        rarity_per_mille: i64,
75297    ) -> Self {
75298        Self {
75299            name,
75300            colors: BoxWrapper::new_unbox(colors.into()),
75301            rarity_per_mille,
75302        }
75303    }
75304    #[allow(rustdoc::invalid_html_tags)]
75305    #[doc = "Name of the backdrop"]
75306    #[allow(clippy::needless_lifetimes)]
75307    pub fn get_name<'a>(&'a self) -> &'a str {
75308        self.name.as_str()
75309    }
75310    #[allow(rustdoc::invalid_html_tags)]
75311    #[doc = "Name of the backdrop"]
75312    #[allow(clippy::needless_lifetimes)]
75313    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
75314        self.name = name;
75315        self
75316    }
75317    #[allow(rustdoc::invalid_html_tags)]
75318    #[doc = "Name of the backdrop"]
75319    fn rhai_get_name(&mut self) -> String {
75320        self.name.clone()
75321    }
75322    #[allow(rustdoc::invalid_html_tags)]
75323    #[doc = "Colors of the backdrop"]
75324    #[allow(clippy::needless_lifetimes)]
75325    pub fn get_colors<'a>(&'a self) -> &'a UniqueGiftBackdropColors {
75326        &self.colors
75327    }
75328    #[allow(rustdoc::invalid_html_tags)]
75329    #[doc = "Colors of the backdrop"]
75330    #[allow(clippy::needless_lifetimes)]
75331    pub fn set_colors<'a>(&'a mut self, colors: UniqueGiftBackdropColors) -> &'a mut Self {
75332        self.colors = BoxWrapper(Unbox(colors));
75333        self
75334    }
75335    #[allow(rustdoc::invalid_html_tags)]
75336    #[doc = "Colors of the backdrop"]
75337    fn rhai_get_colors(&mut self) -> UniqueGiftBackdropColors {
75338        self.colors.clone().into()
75339    }
75340    #[allow(rustdoc::invalid_html_tags)]
75341    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
75342    #[allow(clippy::needless_lifetimes)]
75343    pub fn get_rarity_per_mille<'a>(&'a self) -> i64 {
75344        self.rarity_per_mille
75345    }
75346    #[allow(rustdoc::invalid_html_tags)]
75347    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
75348    #[allow(clippy::needless_lifetimes)]
75349    pub fn set_rarity_per_mille<'a>(&'a mut self, rarity_per_mille: i64) -> &'a mut Self {
75350        self.rarity_per_mille = rarity_per_mille;
75351        self
75352    }
75353    #[allow(rustdoc::invalid_html_tags)]
75354    #[doc = "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded"]
75355    fn rhai_get_rarity_per_mille(&mut self) -> i64 {
75356        self.rarity_per_mille
75357    }
75358}
75359#[allow(dead_code)]
75360impl StoryAreaTypeWeather {
75361    #[allow(clippy::too_many_arguments)]
75362    pub fn new(
75363        temperature: ::ordered_float::OrderedFloat<f64>,
75364        emoji: String,
75365        background_color: i64,
75366    ) -> Self {
75367        Self {
75368            tg_type: "StoryAreaTypeWeather".to_owned(),
75369            temperature,
75370            emoji,
75371            background_color,
75372        }
75373    }
75374    #[allow(rustdoc::invalid_html_tags)]
75375    #[doc = "Type of the area, always \"weather\""]
75376    #[allow(clippy::needless_lifetimes)]
75377    pub fn get_tg_type<'a>(&'a self) -> &'a str {
75378        self.tg_type.as_str()
75379    }
75380    #[allow(rustdoc::invalid_html_tags)]
75381    #[doc = "Type of the area, always \"weather\""]
75382    #[allow(clippy::needless_lifetimes)]
75383    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
75384        self.tg_type = tg_type;
75385        self
75386    }
75387    #[allow(rustdoc::invalid_html_tags)]
75388    #[doc = "Type of the area, always \"weather\""]
75389    fn rhai_get_tg_type(&mut self) -> String {
75390        self.tg_type.clone()
75391    }
75392    #[allow(rustdoc::invalid_html_tags)]
75393    #[doc = "Temperature, in degree Celsius"]
75394    #[allow(clippy::needless_lifetimes)]
75395    pub fn get_temperature<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
75396        self.temperature
75397    }
75398    #[allow(rustdoc::invalid_html_tags)]
75399    #[doc = "Temperature, in degree Celsius"]
75400    #[allow(clippy::needless_lifetimes)]
75401    pub fn set_temperature<'a>(
75402        &'a mut self,
75403        temperature: ::ordered_float::OrderedFloat<f64>,
75404    ) -> &'a mut Self {
75405        self.temperature = temperature;
75406        self
75407    }
75408    #[allow(rustdoc::invalid_html_tags)]
75409    #[doc = "Temperature, in degree Celsius"]
75410    fn rhai_get_temperature(&mut self) -> ::ordered_float::OrderedFloat<f64> {
75411        self.temperature
75412    }
75413    #[allow(rustdoc::invalid_html_tags)]
75414    #[doc = "Emoji representing the weather"]
75415    #[allow(clippy::needless_lifetimes)]
75416    pub fn get_emoji<'a>(&'a self) -> &'a str {
75417        self.emoji.as_str()
75418    }
75419    #[allow(rustdoc::invalid_html_tags)]
75420    #[doc = "Emoji representing the weather"]
75421    #[allow(clippy::needless_lifetimes)]
75422    pub fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self {
75423        self.emoji = emoji;
75424        self
75425    }
75426    #[allow(rustdoc::invalid_html_tags)]
75427    #[doc = "Emoji representing the weather"]
75428    fn rhai_get_emoji(&mut self) -> String {
75429        self.emoji.clone()
75430    }
75431    #[allow(rustdoc::invalid_html_tags)]
75432    #[doc = "A color of the area background in the ARGB format"]
75433    #[allow(clippy::needless_lifetimes)]
75434    pub fn get_background_color<'a>(&'a self) -> i64 {
75435        self.background_color
75436    }
75437    #[allow(rustdoc::invalid_html_tags)]
75438    #[doc = "A color of the area background in the ARGB format"]
75439    #[allow(clippy::needless_lifetimes)]
75440    pub fn set_background_color<'a>(&'a mut self, background_color: i64) -> &'a mut Self {
75441        self.background_color = background_color;
75442        self
75443    }
75444    #[allow(rustdoc::invalid_html_tags)]
75445    #[doc = "A color of the area background in the ARGB format"]
75446    fn rhai_get_background_color(&mut self) -> i64 {
75447        self.background_color
75448    }
75449}
75450#[allow(dead_code)]
75451impl UniqueGiftModel {
75452    #[allow(clippy::too_many_arguments)]
75453    pub fn new<A: Into<Sticker>>(name: String, sticker: A, rarity_per_mille: i64) -> Self {
75454        Self {
75455            name,
75456            sticker: BoxWrapper::new_unbox(sticker.into()),
75457            rarity_per_mille,
75458        }
75459    }
75460    #[allow(rustdoc::invalid_html_tags)]
75461    #[doc = "Name of the model"]
75462    #[allow(clippy::needless_lifetimes)]
75463    pub fn get_name<'a>(&'a self) -> &'a str {
75464        self.name.as_str()
75465    }
75466    #[allow(rustdoc::invalid_html_tags)]
75467    #[doc = "Name of the model"]
75468    #[allow(clippy::needless_lifetimes)]
75469    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
75470        self.name = name;
75471        self
75472    }
75473    #[allow(rustdoc::invalid_html_tags)]
75474    #[doc = "Name of the model"]
75475    fn rhai_get_name(&mut self) -> String {
75476        self.name.clone()
75477    }
75478    #[allow(rustdoc::invalid_html_tags)]
75479    #[doc = "The sticker that represents the unique gift"]
75480    #[allow(clippy::needless_lifetimes)]
75481    pub fn get_sticker<'a>(&'a self) -> &'a Sticker {
75482        &self.sticker
75483    }
75484    #[allow(rustdoc::invalid_html_tags)]
75485    #[doc = "The sticker that represents the unique gift"]
75486    #[allow(clippy::needless_lifetimes)]
75487    pub fn set_sticker<'a>(&'a mut self, sticker: Sticker) -> &'a mut Self {
75488        self.sticker = BoxWrapper(Unbox(sticker));
75489        self
75490    }
75491    #[allow(rustdoc::invalid_html_tags)]
75492    #[doc = "The sticker that represents the unique gift"]
75493    fn rhai_get_sticker(&mut self) -> Sticker {
75494        self.sticker.clone().into()
75495    }
75496    #[allow(rustdoc::invalid_html_tags)]
75497    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
75498    #[allow(clippy::needless_lifetimes)]
75499    pub fn get_rarity_per_mille<'a>(&'a self) -> i64 {
75500        self.rarity_per_mille
75501    }
75502    #[allow(rustdoc::invalid_html_tags)]
75503    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
75504    #[allow(clippy::needless_lifetimes)]
75505    pub fn set_rarity_per_mille<'a>(&'a mut self, rarity_per_mille: i64) -> &'a mut Self {
75506        self.rarity_per_mille = rarity_per_mille;
75507        self
75508    }
75509    #[allow(rustdoc::invalid_html_tags)]
75510    #[doc = "The number of unique gifts that receive this model for every 1000 gifts upgraded"]
75511    fn rhai_get_rarity_per_mille(&mut self) -> i64 {
75512        self.rarity_per_mille
75513    }
75514}
75515#[allow(dead_code)]
75516impl ForceReply {
75517    #[allow(clippy::too_many_arguments)]
75518    pub fn new(force_reply: bool) -> Self {
75519        Self {
75520            force_reply,
75521            input_field_placeholder: None,
75522            selective: None,
75523        }
75524    }
75525    #[allow(rustdoc::invalid_html_tags)]
75526    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
75527    #[allow(clippy::needless_lifetimes)]
75528    pub fn get_force_reply<'a>(&'a self) -> bool {
75529        self.force_reply
75530    }
75531    #[allow(rustdoc::invalid_html_tags)]
75532    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
75533    #[allow(clippy::needless_lifetimes)]
75534    pub fn set_force_reply<'a>(&'a mut self, force_reply: bool) -> &'a mut Self {
75535        self.force_reply = force_reply;
75536        self
75537    }
75538    #[allow(rustdoc::invalid_html_tags)]
75539    #[doc = "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'"]
75540    fn rhai_get_force_reply(&mut self) -> bool {
75541        self.force_reply
75542    }
75543    #[allow(rustdoc::invalid_html_tags)]
75544    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
75545    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75546    pub fn get_input_field_placeholder<'a>(&'a self) -> Option<&'a str> {
75547        self.input_field_placeholder.as_ref().map(|v| v.as_str())
75548    }
75549    #[allow(rustdoc::invalid_html_tags)]
75550    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
75551    #[allow(clippy::needless_lifetimes)]
75552    pub fn set_input_field_placeholder<'a>(
75553        &'a mut self,
75554        input_field_placeholder: Option<String>,
75555    ) -> &'a mut Self {
75556        self.input_field_placeholder = input_field_placeholder;
75557        self
75558    }
75559    #[allow(rustdoc::invalid_html_tags)]
75560    #[doc = "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters"]
75561    fn rhai_get_input_field_placeholder(&mut self) -> Option<String> {
75562        self.input_field_placeholder.as_ref().cloned()
75563    }
75564    #[allow(rustdoc::invalid_html_tags)]
75565    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
75566    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75567    pub fn get_selective<'a>(&'a self) -> Option<bool> {
75568        self.selective.as_ref().map(|v| *v)
75569    }
75570    #[allow(rustdoc::invalid_html_tags)]
75571    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
75572    #[allow(clippy::needless_lifetimes)]
75573    pub fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self {
75574        self.selective = selective;
75575        self
75576    }
75577    #[allow(rustdoc::invalid_html_tags)]
75578    #[doc = "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message."]
75579    fn rhai_get_selective(&mut self) -> Option<bool> {
75580        self.selective.as_ref().copied()
75581    }
75582}
75583#[allow(dead_code)]
75584impl StarTransaction {
75585    #[allow(clippy::too_many_arguments)]
75586    pub fn new(id: String, amount: i64, date: i64) -> Self {
75587        Self {
75588            id,
75589            amount,
75590            date,
75591            nanostar_amount: None,
75592            source: None,
75593            receiver: None,
75594        }
75595    }
75596    #[allow(rustdoc::invalid_html_tags)]
75597    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
75598    #[allow(clippy::needless_lifetimes)]
75599    pub fn get_id<'a>(&'a self) -> &'a str {
75600        self.id.as_str()
75601    }
75602    #[allow(rustdoc::invalid_html_tags)]
75603    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
75604    #[allow(clippy::needless_lifetimes)]
75605    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
75606        self.id = id;
75607        self
75608    }
75609    #[allow(rustdoc::invalid_html_tags)]
75610    #[doc = "Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users."]
75611    fn rhai_get_id(&mut self) -> String {
75612        self.id.clone()
75613    }
75614    #[allow(rustdoc::invalid_html_tags)]
75615    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
75616    #[allow(clippy::needless_lifetimes)]
75617    pub fn get_amount<'a>(&'a self) -> i64 {
75618        self.amount
75619    }
75620    #[allow(rustdoc::invalid_html_tags)]
75621    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
75622    #[allow(clippy::needless_lifetimes)]
75623    pub fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self {
75624        self.amount = amount;
75625        self
75626    }
75627    #[allow(rustdoc::invalid_html_tags)]
75628    #[doc = "Integer amount of Telegram Stars transferred by the transaction"]
75629    fn rhai_get_amount(&mut self) -> i64 {
75630        self.amount
75631    }
75632    #[allow(rustdoc::invalid_html_tags)]
75633    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
75634    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75635    pub fn get_nanostar_amount<'a>(&'a self) -> Option<i64> {
75636        self.nanostar_amount.as_ref().map(|v| *v)
75637    }
75638    #[allow(rustdoc::invalid_html_tags)]
75639    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
75640    #[allow(clippy::needless_lifetimes)]
75641    pub fn set_nanostar_amount<'a>(&'a mut self, nanostar_amount: Option<i64>) -> &'a mut Self {
75642        self.nanostar_amount = nanostar_amount;
75643        self
75644    }
75645    #[allow(rustdoc::invalid_html_tags)]
75646    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999"]
75647    fn rhai_get_nanostar_amount(&mut self) -> Option<i64> {
75648        self.nanostar_amount.as_ref().copied()
75649    }
75650    #[allow(rustdoc::invalid_html_tags)]
75651    #[doc = "Date the transaction was created in Unix time"]
75652    #[allow(clippy::needless_lifetimes)]
75653    pub fn get_date<'a>(&'a self) -> i64 {
75654        self.date
75655    }
75656    #[allow(rustdoc::invalid_html_tags)]
75657    #[doc = "Date the transaction was created in Unix time"]
75658    #[allow(clippy::needless_lifetimes)]
75659    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
75660        self.date = date;
75661        self
75662    }
75663    #[allow(rustdoc::invalid_html_tags)]
75664    #[doc = "Date the transaction was created in Unix time"]
75665    fn rhai_get_date(&mut self) -> i64 {
75666        self.date
75667    }
75668    #[allow(rustdoc::invalid_html_tags)]
75669    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
75670    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75671    pub fn get_source<'a>(&'a self) -> Option<&'a TransactionPartner> {
75672        self.source.as_ref().map(|v| v.inner_ref())
75673    }
75674    #[allow(rustdoc::invalid_html_tags)]
75675    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
75676    #[allow(clippy::needless_lifetimes)]
75677    pub fn set_source<'a>(&'a mut self, source: Option<TransactionPartner>) -> &'a mut Self {
75678        self.source = source.map(|source| BoxWrapper(Unbox(source)));
75679        self
75680    }
75681    #[allow(rustdoc::invalid_html_tags)]
75682    #[doc = "Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions"]
75683    fn rhai_get_source(&mut self) -> Option<TransactionPartner> {
75684        self.source.as_ref().map(|v| v.clone().into())
75685    }
75686    #[allow(rustdoc::invalid_html_tags)]
75687    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
75688    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
75689    pub fn get_receiver<'a>(&'a self) -> Option<&'a TransactionPartner> {
75690        self.receiver.as_ref().map(|v| v.inner_ref())
75691    }
75692    #[allow(rustdoc::invalid_html_tags)]
75693    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
75694    #[allow(clippy::needless_lifetimes)]
75695    pub fn set_receiver<'a>(&'a mut self, receiver: Option<TransactionPartner>) -> &'a mut Self {
75696        self.receiver = receiver.map(|receiver| BoxWrapper(Unbox(receiver)));
75697        self
75698    }
75699    #[allow(rustdoc::invalid_html_tags)]
75700    #[doc = "Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions"]
75701    fn rhai_get_receiver(&mut self) -> Option<TransactionPartner> {
75702        self.receiver.as_ref().map(|v| v.clone().into())
75703    }
75704}
75705#[allow(dead_code)]
75706impl PassportElementErrorDataField {
75707    #[allow(clippy::too_many_arguments)]
75708    pub fn new(source: String, field_name: String, data_hash: String, message: String) -> Self {
75709        Self {
75710            tg_type: "PassportElementErrorDataField".to_owned(),
75711            source,
75712            field_name,
75713            data_hash,
75714            message,
75715        }
75716    }
75717    #[allow(rustdoc::invalid_html_tags)]
75718    #[doc = "Error source, must be data"]
75719    #[allow(clippy::needless_lifetimes)]
75720    pub fn get_source<'a>(&'a self) -> &'a str {
75721        self.source.as_str()
75722    }
75723    #[allow(rustdoc::invalid_html_tags)]
75724    #[doc = "Error source, must be data"]
75725    #[allow(clippy::needless_lifetimes)]
75726    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
75727        self.source = source;
75728        self
75729    }
75730    #[allow(rustdoc::invalid_html_tags)]
75731    #[doc = "Error source, must be data"]
75732    fn rhai_get_source(&mut self) -> String {
75733        self.source.clone()
75734    }
75735    #[allow(rustdoc::invalid_html_tags)]
75736    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
75737    #[allow(clippy::needless_lifetimes)]
75738    pub fn get_tg_type<'a>(&'a self) -> &'a str {
75739        self.tg_type.as_str()
75740    }
75741    #[allow(rustdoc::invalid_html_tags)]
75742    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
75743    #[allow(clippy::needless_lifetimes)]
75744    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
75745        self.tg_type = tg_type;
75746        self
75747    }
75748    #[allow(rustdoc::invalid_html_tags)]
75749    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
75750    fn rhai_get_tg_type(&mut self) -> String {
75751        self.tg_type.clone()
75752    }
75753    #[allow(rustdoc::invalid_html_tags)]
75754    #[doc = "Name of the data field which has the error"]
75755    #[allow(clippy::needless_lifetimes)]
75756    pub fn get_field_name<'a>(&'a self) -> &'a str {
75757        self.field_name.as_str()
75758    }
75759    #[allow(rustdoc::invalid_html_tags)]
75760    #[doc = "Name of the data field which has the error"]
75761    #[allow(clippy::needless_lifetimes)]
75762    pub fn set_field_name<'a>(&'a mut self, field_name: String) -> &'a mut Self {
75763        self.field_name = field_name;
75764        self
75765    }
75766    #[allow(rustdoc::invalid_html_tags)]
75767    #[doc = "Name of the data field which has the error"]
75768    fn rhai_get_field_name(&mut self) -> String {
75769        self.field_name.clone()
75770    }
75771    #[allow(rustdoc::invalid_html_tags)]
75772    #[doc = "Base64-encoded data hash"]
75773    #[allow(clippy::needless_lifetimes)]
75774    pub fn get_data_hash<'a>(&'a self) -> &'a str {
75775        self.data_hash.as_str()
75776    }
75777    #[allow(rustdoc::invalid_html_tags)]
75778    #[doc = "Base64-encoded data hash"]
75779    #[allow(clippy::needless_lifetimes)]
75780    pub fn set_data_hash<'a>(&'a mut self, data_hash: String) -> &'a mut Self {
75781        self.data_hash = data_hash;
75782        self
75783    }
75784    #[allow(rustdoc::invalid_html_tags)]
75785    #[doc = "Base64-encoded data hash"]
75786    fn rhai_get_data_hash(&mut self) -> String {
75787        self.data_hash.clone()
75788    }
75789    #[allow(rustdoc::invalid_html_tags)]
75790    #[doc = "Error message"]
75791    #[allow(clippy::needless_lifetimes)]
75792    pub fn get_message<'a>(&'a self) -> &'a str {
75793        self.message.as_str()
75794    }
75795    #[allow(rustdoc::invalid_html_tags)]
75796    #[doc = "Error message"]
75797    #[allow(clippy::needless_lifetimes)]
75798    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
75799        self.message = message;
75800        self
75801    }
75802    #[allow(rustdoc::invalid_html_tags)]
75803    #[doc = "Error message"]
75804    fn rhai_get_message(&mut self) -> String {
75805        self.message.clone()
75806    }
75807}
75808#[allow(dead_code)]
75809impl ChatBoost {
75810    #[allow(clippy::too_many_arguments)]
75811    pub fn new<A: Into<ChatBoostSource>>(
75812        boost_id: String,
75813        add_date: i64,
75814        expiration_date: i64,
75815        source: A,
75816    ) -> Self {
75817        Self {
75818            boost_id,
75819            add_date,
75820            expiration_date,
75821            source: BoxWrapper::new_unbox(source.into()),
75822        }
75823    }
75824    #[allow(rustdoc::invalid_html_tags)]
75825    #[doc = "Unique identifier of the boost"]
75826    #[allow(clippy::needless_lifetimes)]
75827    pub fn get_boost_id<'a>(&'a self) -> &'a str {
75828        self.boost_id.as_str()
75829    }
75830    #[allow(rustdoc::invalid_html_tags)]
75831    #[doc = "Unique identifier of the boost"]
75832    #[allow(clippy::needless_lifetimes)]
75833    pub fn set_boost_id<'a>(&'a mut self, boost_id: String) -> &'a mut Self {
75834        self.boost_id = boost_id;
75835        self
75836    }
75837    #[allow(rustdoc::invalid_html_tags)]
75838    #[doc = "Unique identifier of the boost"]
75839    fn rhai_get_boost_id(&mut self) -> String {
75840        self.boost_id.clone()
75841    }
75842    #[allow(rustdoc::invalid_html_tags)]
75843    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
75844    #[allow(clippy::needless_lifetimes)]
75845    pub fn get_add_date<'a>(&'a self) -> i64 {
75846        self.add_date
75847    }
75848    #[allow(rustdoc::invalid_html_tags)]
75849    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
75850    #[allow(clippy::needless_lifetimes)]
75851    pub fn set_add_date<'a>(&'a mut self, add_date: i64) -> &'a mut Self {
75852        self.add_date = add_date;
75853        self
75854    }
75855    #[allow(rustdoc::invalid_html_tags)]
75856    #[doc = "Point in time (Unix timestamp) when the chat was boosted"]
75857    fn rhai_get_add_date(&mut self) -> i64 {
75858        self.add_date
75859    }
75860    #[allow(rustdoc::invalid_html_tags)]
75861    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
75862    #[allow(clippy::needless_lifetimes)]
75863    pub fn get_expiration_date<'a>(&'a self) -> i64 {
75864        self.expiration_date
75865    }
75866    #[allow(rustdoc::invalid_html_tags)]
75867    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
75868    #[allow(clippy::needless_lifetimes)]
75869    pub fn set_expiration_date<'a>(&'a mut self, expiration_date: i64) -> &'a mut Self {
75870        self.expiration_date = expiration_date;
75871        self
75872    }
75873    #[allow(rustdoc::invalid_html_tags)]
75874    #[doc = "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged"]
75875    fn rhai_get_expiration_date(&mut self) -> i64 {
75876        self.expiration_date
75877    }
75878    #[allow(rustdoc::invalid_html_tags)]
75879    #[doc = "Source of the added boost"]
75880    #[allow(clippy::needless_lifetimes)]
75881    pub fn get_source<'a>(&'a self) -> &'a ChatBoostSource {
75882        &self.source
75883    }
75884    #[allow(rustdoc::invalid_html_tags)]
75885    #[doc = "Source of the added boost"]
75886    #[allow(clippy::needless_lifetimes)]
75887    pub fn set_source<'a>(&'a mut self, source: ChatBoostSource) -> &'a mut Self {
75888        self.source = BoxWrapper(Unbox(source));
75889        self
75890    }
75891    #[allow(rustdoc::invalid_html_tags)]
75892    #[doc = "Source of the added boost"]
75893    fn rhai_get_source(&mut self) -> ChatBoostSource {
75894        self.source.clone().into()
75895    }
75896}
75897#[allow(dead_code)]
75898impl ShippingOption {
75899    #[allow(clippy::too_many_arguments)]
75900    pub fn new(id: String, title: String, prices: Vec<LabeledPrice>) -> Self {
75901        Self { id, title, prices }
75902    }
75903    #[allow(rustdoc::invalid_html_tags)]
75904    #[doc = "Shipping option identifier"]
75905    #[allow(clippy::needless_lifetimes)]
75906    pub fn get_id<'a>(&'a self) -> &'a str {
75907        self.id.as_str()
75908    }
75909    #[allow(rustdoc::invalid_html_tags)]
75910    #[doc = "Shipping option identifier"]
75911    #[allow(clippy::needless_lifetimes)]
75912    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
75913        self.id = id;
75914        self
75915    }
75916    #[allow(rustdoc::invalid_html_tags)]
75917    #[doc = "Shipping option identifier"]
75918    fn rhai_get_id(&mut self) -> String {
75919        self.id.clone()
75920    }
75921    #[allow(rustdoc::invalid_html_tags)]
75922    #[doc = "Option title"]
75923    #[allow(clippy::needless_lifetimes)]
75924    pub fn get_title<'a>(&'a self) -> &'a str {
75925        self.title.as_str()
75926    }
75927    #[allow(rustdoc::invalid_html_tags)]
75928    #[doc = "Option title"]
75929    #[allow(clippy::needless_lifetimes)]
75930    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
75931        self.title = title;
75932        self
75933    }
75934    #[allow(rustdoc::invalid_html_tags)]
75935    #[doc = "Option title"]
75936    fn rhai_get_title(&mut self) -> String {
75937        self.title.clone()
75938    }
75939    #[allow(rustdoc::invalid_html_tags)]
75940    #[doc = "List of price portions"]
75941    #[allow(clippy::needless_lifetimes)]
75942    pub fn get_prices<'a>(&'a self) -> &'a Vec<LabeledPrice> {
75943        &self.prices
75944    }
75945    #[allow(rustdoc::invalid_html_tags)]
75946    #[doc = "List of price portions"]
75947    #[allow(clippy::needless_lifetimes)]
75948    pub fn set_prices<'a>(&'a mut self, prices: Vec<LabeledPrice>) -> &'a mut Self {
75949        self.prices = prices;
75950        self
75951    }
75952    #[allow(rustdoc::invalid_html_tags)]
75953    #[doc = "List of price portions"]
75954    fn rhai_get_prices(&mut self) -> Vec<LabeledPrice> {
75955        self.prices.clone()
75956    }
75957}
75958#[allow(dead_code)]
75959impl PassportElementErrorFrontSide {
75960    #[allow(clippy::too_many_arguments)]
75961    pub fn new(source: String, file_hash: String, message: String) -> Self {
75962        Self {
75963            tg_type: "PassportElementErrorFrontSide".to_owned(),
75964            source,
75965            file_hash,
75966            message,
75967        }
75968    }
75969    #[allow(rustdoc::invalid_html_tags)]
75970    #[doc = "Error source, must be front_side"]
75971    #[allow(clippy::needless_lifetimes)]
75972    pub fn get_source<'a>(&'a self) -> &'a str {
75973        self.source.as_str()
75974    }
75975    #[allow(rustdoc::invalid_html_tags)]
75976    #[doc = "Error source, must be front_side"]
75977    #[allow(clippy::needless_lifetimes)]
75978    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
75979        self.source = source;
75980        self
75981    }
75982    #[allow(rustdoc::invalid_html_tags)]
75983    #[doc = "Error source, must be front_side"]
75984    fn rhai_get_source(&mut self) -> String {
75985        self.source.clone()
75986    }
75987    #[allow(rustdoc::invalid_html_tags)]
75988    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
75989    #[allow(clippy::needless_lifetimes)]
75990    pub fn get_tg_type<'a>(&'a self) -> &'a str {
75991        self.tg_type.as_str()
75992    }
75993    #[allow(rustdoc::invalid_html_tags)]
75994    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
75995    #[allow(clippy::needless_lifetimes)]
75996    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
75997        self.tg_type = tg_type;
75998        self
75999    }
76000    #[allow(rustdoc::invalid_html_tags)]
76001    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
76002    fn rhai_get_tg_type(&mut self) -> String {
76003        self.tg_type.clone()
76004    }
76005    #[allow(rustdoc::invalid_html_tags)]
76006    #[doc = "Base64-encoded hash of the file with the front side of the document"]
76007    #[allow(clippy::needless_lifetimes)]
76008    pub fn get_file_hash<'a>(&'a self) -> &'a str {
76009        self.file_hash.as_str()
76010    }
76011    #[allow(rustdoc::invalid_html_tags)]
76012    #[doc = "Base64-encoded hash of the file with the front side of the document"]
76013    #[allow(clippy::needless_lifetimes)]
76014    pub fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
76015        self.file_hash = file_hash;
76016        self
76017    }
76018    #[allow(rustdoc::invalid_html_tags)]
76019    #[doc = "Base64-encoded hash of the file with the front side of the document"]
76020    fn rhai_get_file_hash(&mut self) -> String {
76021        self.file_hash.clone()
76022    }
76023    #[allow(rustdoc::invalid_html_tags)]
76024    #[doc = "Error message"]
76025    #[allow(clippy::needless_lifetimes)]
76026    pub fn get_message<'a>(&'a self) -> &'a str {
76027        self.message.as_str()
76028    }
76029    #[allow(rustdoc::invalid_html_tags)]
76030    #[doc = "Error message"]
76031    #[allow(clippy::needless_lifetimes)]
76032    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
76033        self.message = message;
76034        self
76035    }
76036    #[allow(rustdoc::invalid_html_tags)]
76037    #[doc = "Error message"]
76038    fn rhai_get_message(&mut self) -> String {
76039        self.message.clone()
76040    }
76041}
76042#[allow(dead_code)]
76043impl BusinessOpeningHours {
76044    #[allow(clippy::too_many_arguments)]
76045    pub fn new(time_zone_name: String, opening_hours: Vec<BusinessOpeningHoursInterval>) -> Self {
76046        Self {
76047            time_zone_name,
76048            opening_hours,
76049        }
76050    }
76051    #[allow(rustdoc::invalid_html_tags)]
76052    #[doc = "Unique name of the time zone for which the opening hours are defined"]
76053    #[allow(clippy::needless_lifetimes)]
76054    pub fn get_time_zone_name<'a>(&'a self) -> &'a str {
76055        self.time_zone_name.as_str()
76056    }
76057    #[allow(rustdoc::invalid_html_tags)]
76058    #[doc = "Unique name of the time zone for which the opening hours are defined"]
76059    #[allow(clippy::needless_lifetimes)]
76060    pub fn set_time_zone_name<'a>(&'a mut self, time_zone_name: String) -> &'a mut Self {
76061        self.time_zone_name = time_zone_name;
76062        self
76063    }
76064    #[allow(rustdoc::invalid_html_tags)]
76065    #[doc = "Unique name of the time zone for which the opening hours are defined"]
76066    fn rhai_get_time_zone_name(&mut self) -> String {
76067        self.time_zone_name.clone()
76068    }
76069    #[allow(rustdoc::invalid_html_tags)]
76070    #[doc = "List of time intervals describing business opening hours"]
76071    #[allow(clippy::needless_lifetimes)]
76072    pub fn get_opening_hours<'a>(&'a self) -> &'a Vec<BusinessOpeningHoursInterval> {
76073        &self.opening_hours
76074    }
76075    #[allow(rustdoc::invalid_html_tags)]
76076    #[doc = "List of time intervals describing business opening hours"]
76077    #[allow(clippy::needless_lifetimes)]
76078    pub fn set_opening_hours<'a>(
76079        &'a mut self,
76080        opening_hours: Vec<BusinessOpeningHoursInterval>,
76081    ) -> &'a mut Self {
76082        self.opening_hours = opening_hours;
76083        self
76084    }
76085    #[allow(rustdoc::invalid_html_tags)]
76086    #[doc = "List of time intervals describing business opening hours"]
76087    fn rhai_get_opening_hours(&mut self) -> Vec<BusinessOpeningHoursInterval> {
76088        self.opening_hours.clone()
76089    }
76090}
76091impl TraitReactionTypeEmoji for ReactionTypeEmoji {
76092    #[allow(rustdoc::invalid_html_tags)]
76093    #[doc = "Type of the reaction, always \"emoji\""]
76094    #[allow(clippy::needless_lifetimes)]
76095    fn get_tg_type<'a>(&'a self) -> &'a str {
76096        self.tg_type.as_str()
76097    }
76098    #[allow(rustdoc::invalid_html_tags)]
76099    #[doc = "Type of the reaction, always \"emoji\""]
76100    #[allow(clippy::needless_lifetimes)]
76101    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76102        self.tg_type = tg_type;
76103        self
76104    }
76105    #[allow(rustdoc::invalid_html_tags)]
76106    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
76107    #[allow(clippy::needless_lifetimes)]
76108    fn get_emoji<'a>(&'a self) -> &'a str {
76109        self.emoji.as_str()
76110    }
76111    #[allow(rustdoc::invalid_html_tags)]
76112    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
76113    #[allow(clippy::needless_lifetimes)]
76114    fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self {
76115        self.emoji = emoji;
76116        self
76117    }
76118}
76119impl TraitReactionTypeCustomEmoji for ReactionTypeCustomEmoji {
76120    #[allow(rustdoc::invalid_html_tags)]
76121    #[doc = "Type of the reaction, always \"custom_emoji\""]
76122    #[allow(clippy::needless_lifetimes)]
76123    fn get_tg_type<'a>(&'a self) -> &'a str {
76124        self.tg_type.as_str()
76125    }
76126    #[allow(rustdoc::invalid_html_tags)]
76127    #[doc = "Type of the reaction, always \"custom_emoji\""]
76128    #[allow(clippy::needless_lifetimes)]
76129    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76130        self.tg_type = tg_type;
76131        self
76132    }
76133    #[allow(rustdoc::invalid_html_tags)]
76134    #[doc = "Custom emoji identifier"]
76135    #[allow(clippy::needless_lifetimes)]
76136    fn get_custom_emoji_id<'a>(&'a self) -> &'a str {
76137        self.custom_emoji_id.as_str()
76138    }
76139    #[allow(rustdoc::invalid_html_tags)]
76140    #[doc = "Custom emoji identifier"]
76141    #[allow(clippy::needless_lifetimes)]
76142    fn set_custom_emoji_id<'a>(&'a mut self, custom_emoji_id: String) -> &'a mut Self {
76143        self.custom_emoji_id = custom_emoji_id;
76144        self
76145    }
76146}
76147impl TraitReactionTypePaid for ReactionTypePaid {
76148    #[allow(rustdoc::invalid_html_tags)]
76149    #[doc = "Type of the reaction, always \"paid\""]
76150    #[allow(clippy::needless_lifetimes)]
76151    fn get_tg_type<'a>(&'a self) -> &'a str {
76152        self.tg_type.as_str()
76153    }
76154    #[allow(rustdoc::invalid_html_tags)]
76155    #[doc = "Type of the reaction, always \"paid\""]
76156    #[allow(clippy::needless_lifetimes)]
76157    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76158        self.tg_type = tg_type;
76159        self
76160    }
76161}
76162#[allow(dead_code)]
76163impl Story {
76164    #[allow(clippy::too_many_arguments)]
76165    pub fn new<A: Into<Chat>>(chat: A, id: i64) -> Self {
76166        Self {
76167            chat: BoxWrapper::new_unbox(chat.into()),
76168            id,
76169        }
76170    }
76171    #[allow(rustdoc::invalid_html_tags)]
76172    #[doc = "Chat that posted the story"]
76173    #[allow(clippy::needless_lifetimes)]
76174    pub fn get_chat<'a>(&'a self) -> &'a Chat {
76175        &self.chat
76176    }
76177    #[allow(rustdoc::invalid_html_tags)]
76178    #[doc = "Chat that posted the story"]
76179    #[allow(clippy::needless_lifetimes)]
76180    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
76181        self.chat = BoxWrapper(Unbox(chat));
76182        self
76183    }
76184    #[allow(rustdoc::invalid_html_tags)]
76185    #[doc = "Chat that posted the story"]
76186    fn rhai_get_chat(&mut self) -> Chat {
76187        self.chat.clone().into()
76188    }
76189    #[allow(rustdoc::invalid_html_tags)]
76190    #[doc = "Unique identifier for the story in the chat"]
76191    #[allow(clippy::needless_lifetimes)]
76192    pub fn get_id<'a>(&'a self) -> i64 {
76193        self.id
76194    }
76195    #[allow(rustdoc::invalid_html_tags)]
76196    #[doc = "Unique identifier for the story in the chat"]
76197    #[allow(clippy::needless_lifetimes)]
76198    pub fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self {
76199        self.id = id;
76200        self
76201    }
76202    #[allow(rustdoc::invalid_html_tags)]
76203    #[doc = "Unique identifier for the story in the chat"]
76204    fn rhai_get_id(&mut self) -> i64 {
76205        self.id
76206    }
76207}
76208#[allow(dead_code)]
76209impl WebAppInfo {
76210    #[allow(clippy::too_many_arguments)]
76211    pub fn new(url: String) -> Self {
76212        Self { url }
76213    }
76214    #[allow(rustdoc::invalid_html_tags)]
76215    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
76216    #[allow(clippy::needless_lifetimes)]
76217    pub fn get_url<'a>(&'a self) -> &'a str {
76218        self.url.as_str()
76219    }
76220    #[allow(rustdoc::invalid_html_tags)]
76221    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
76222    #[allow(clippy::needless_lifetimes)]
76223    pub fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self {
76224        self.url = url;
76225        self
76226    }
76227    #[allow(rustdoc::invalid_html_tags)]
76228    #[doc = "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps"]
76229    fn rhai_get_url(&mut self) -> String {
76230        self.url.clone()
76231    }
76232}
76233#[allow(dead_code)]
76234impl BotCommandScopeChatMember {
76235    #[allow(clippy::too_many_arguments)]
76236    pub fn new(chat_id: ChatHandle, user_id: i64) -> Self {
76237        Self {
76238            tg_type: "chat_member".to_owned(),
76239            chat_id,
76240            user_id,
76241        }
76242    }
76243    #[allow(rustdoc::invalid_html_tags)]
76244    #[doc = "Scope type, must be chat_member"]
76245    #[allow(clippy::needless_lifetimes)]
76246    pub fn get_tg_type<'a>(&'a self) -> &'a str {
76247        self.tg_type.as_str()
76248    }
76249    #[allow(rustdoc::invalid_html_tags)]
76250    #[doc = "Scope type, must be chat_member"]
76251    #[allow(clippy::needless_lifetimes)]
76252    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76253        self.tg_type = tg_type;
76254        self
76255    }
76256    #[allow(rustdoc::invalid_html_tags)]
76257    #[doc = "Scope type, must be chat_member"]
76258    fn rhai_get_tg_type(&mut self) -> String {
76259        self.tg_type.clone()
76260    }
76261    #[allow(rustdoc::invalid_html_tags)]
76262    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
76263    #[allow(clippy::needless_lifetimes)]
76264    pub fn get_chat_id<'a>(&'a self) -> &'a ChatHandle {
76265        &self.chat_id
76266    }
76267    #[allow(rustdoc::invalid_html_tags)]
76268    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
76269    #[allow(clippy::needless_lifetimes)]
76270    pub fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self {
76271        self.chat_id = chat_id;
76272        self
76273    }
76274    #[allow(rustdoc::invalid_html_tags)]
76275    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
76276    fn rhai_get_chat_id(&mut self) -> ChatHandle {
76277        self.chat_id.clone()
76278    }
76279    #[allow(rustdoc::invalid_html_tags)]
76280    #[doc = "Unique identifier of the target user"]
76281    #[allow(clippy::needless_lifetimes)]
76282    pub fn get_user_id<'a>(&'a self) -> i64 {
76283        self.user_id
76284    }
76285    #[allow(rustdoc::invalid_html_tags)]
76286    #[doc = "Unique identifier of the target user"]
76287    #[allow(clippy::needless_lifetimes)]
76288    pub fn set_user_id<'a>(&'a mut self, user_id: i64) -> &'a mut Self {
76289        self.user_id = user_id;
76290        self
76291    }
76292    #[allow(rustdoc::invalid_html_tags)]
76293    #[doc = "Unique identifier of the target user"]
76294    fn rhai_get_user_id(&mut self) -> i64 {
76295        self.user_id
76296    }
76297}
76298#[allow(dead_code)]
76299impl ChatBackground {
76300    #[allow(clippy::too_many_arguments)]
76301    pub fn new(tg_type: BackgroundType) -> Self {
76302        Self { tg_type }
76303    }
76304    #[allow(rustdoc::invalid_html_tags)]
76305    #[doc = "Type of the background"]
76306    #[allow(clippy::needless_lifetimes)]
76307    pub fn get_tg_type<'a>(&'a self) -> &'a BackgroundType {
76308        &self.tg_type
76309    }
76310    #[allow(rustdoc::invalid_html_tags)]
76311    #[doc = "Type of the background"]
76312    #[allow(clippy::needless_lifetimes)]
76313    pub fn set_tg_type<'a>(&'a mut self, tg_type: BackgroundType) -> &'a mut Self {
76314        self.tg_type = tg_type;
76315        self
76316    }
76317    #[allow(rustdoc::invalid_html_tags)]
76318    #[doc = "Type of the background"]
76319    fn rhai_get_tg_type(&mut self) -> BackgroundType {
76320        self.tg_type.clone()
76321    }
76322}
76323#[allow(dead_code)]
76324impl PassportFile {
76325    #[allow(clippy::too_many_arguments)]
76326    pub fn new(file_id: String, file_unique_id: String, file_size: i64, file_date: i64) -> Self {
76327        Self {
76328            file_id,
76329            file_unique_id,
76330            file_size,
76331            file_date,
76332        }
76333    }
76334    #[allow(rustdoc::invalid_html_tags)]
76335    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
76336    #[allow(clippy::needless_lifetimes)]
76337    pub fn get_file_id<'a>(&'a self) -> &'a str {
76338        self.file_id.as_str()
76339    }
76340    #[allow(rustdoc::invalid_html_tags)]
76341    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
76342    #[allow(clippy::needless_lifetimes)]
76343    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
76344        self.file_id = file_id;
76345        self
76346    }
76347    #[allow(rustdoc::invalid_html_tags)]
76348    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
76349    fn rhai_get_file_id(&mut self) -> String {
76350        self.file_id.clone()
76351    }
76352    #[allow(rustdoc::invalid_html_tags)]
76353    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
76354    #[allow(clippy::needless_lifetimes)]
76355    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
76356        self.file_unique_id.as_str()
76357    }
76358    #[allow(rustdoc::invalid_html_tags)]
76359    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
76360    #[allow(clippy::needless_lifetimes)]
76361    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
76362        self.file_unique_id = file_unique_id;
76363        self
76364    }
76365    #[allow(rustdoc::invalid_html_tags)]
76366    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
76367    fn rhai_get_file_unique_id(&mut self) -> String {
76368        self.file_unique_id.clone()
76369    }
76370    #[allow(rustdoc::invalid_html_tags)]
76371    #[doc = "File size in bytes"]
76372    #[allow(clippy::needless_lifetimes)]
76373    pub fn get_file_size<'a>(&'a self) -> i64 {
76374        self.file_size
76375    }
76376    #[allow(rustdoc::invalid_html_tags)]
76377    #[doc = "File size in bytes"]
76378    #[allow(clippy::needless_lifetimes)]
76379    pub fn set_file_size<'a>(&'a mut self, file_size: i64) -> &'a mut Self {
76380        self.file_size = file_size;
76381        self
76382    }
76383    #[allow(rustdoc::invalid_html_tags)]
76384    #[doc = "File size in bytes"]
76385    fn rhai_get_file_size(&mut self) -> i64 {
76386        self.file_size
76387    }
76388    #[allow(rustdoc::invalid_html_tags)]
76389    #[doc = "Unix time when the file was uploaded"]
76390    #[allow(clippy::needless_lifetimes)]
76391    pub fn get_file_date<'a>(&'a self) -> i64 {
76392        self.file_date
76393    }
76394    #[allow(rustdoc::invalid_html_tags)]
76395    #[doc = "Unix time when the file was uploaded"]
76396    #[allow(clippy::needless_lifetimes)]
76397    pub fn set_file_date<'a>(&'a mut self, file_date: i64) -> &'a mut Self {
76398        self.file_date = file_date;
76399        self
76400    }
76401    #[allow(rustdoc::invalid_html_tags)]
76402    #[doc = "Unix time when the file was uploaded"]
76403    fn rhai_get_file_date(&mut self) -> i64 {
76404        self.file_date
76405    }
76406}
76407#[allow(dead_code)]
76408impl BotCommandScopeAllChatAdministrators {
76409    #[allow(clippy::too_many_arguments)]
76410    pub fn new() -> Self {
76411        Self {
76412            tg_type: "all_chat_administrators".to_owned(),
76413        }
76414    }
76415    #[allow(rustdoc::invalid_html_tags)]
76416    #[doc = "Scope type, must be all_chat_administrators"]
76417    #[allow(clippy::needless_lifetimes)]
76418    pub fn get_tg_type<'a>(&'a self) -> &'a str {
76419        self.tg_type.as_str()
76420    }
76421    #[allow(rustdoc::invalid_html_tags)]
76422    #[doc = "Scope type, must be all_chat_administrators"]
76423    #[allow(clippy::needless_lifetimes)]
76424    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76425        self.tg_type = tg_type;
76426        self
76427    }
76428    #[allow(rustdoc::invalid_html_tags)]
76429    #[doc = "Scope type, must be all_chat_administrators"]
76430    fn rhai_get_tg_type(&mut self) -> String {
76431        self.tg_type.clone()
76432    }
76433}
76434impl TraitInputMediaAnimation for InputMediaAnimation {
76435    #[allow(rustdoc::invalid_html_tags)]
76436    #[doc = "Type of the result, must be animation"]
76437    #[allow(clippy::needless_lifetimes)]
76438    fn get_tg_type<'a>(&'a self) -> &'a str {
76439        self.tg_type.as_str()
76440    }
76441    #[allow(rustdoc::invalid_html_tags)]
76442    #[doc = "Type of the result, must be animation"]
76443    #[allow(clippy::needless_lifetimes)]
76444    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76445        self.tg_type = tg_type;
76446        self
76447    }
76448    #[allow(rustdoc::invalid_html_tags)]
76449    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76450    #[allow(clippy::needless_lifetimes)]
76451    fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
76452        &self.media
76453    }
76454    #[allow(rustdoc::invalid_html_tags)]
76455    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76456    #[allow(clippy::needless_lifetimes)]
76457    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
76458        self.media = media;
76459        self
76460    }
76461    #[allow(rustdoc::invalid_html_tags)]
76462    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76463    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76464    fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
76465        self.thumbnail.as_ref().map(|v| v.as_str())
76466    }
76467    #[allow(rustdoc::invalid_html_tags)]
76468    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76469    #[allow(clippy::needless_lifetimes)]
76470    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
76471        self.thumbnail = thumbnail;
76472        self
76473    }
76474    #[allow(rustdoc::invalid_html_tags)]
76475    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
76476    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76477    fn get_caption<'a>(&'a self) -> Option<&'a str> {
76478        self.caption.as_ref().map(|v| v.as_str())
76479    }
76480    #[allow(rustdoc::invalid_html_tags)]
76481    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
76482    #[allow(clippy::needless_lifetimes)]
76483    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
76484        self.caption = caption;
76485        self
76486    }
76487    #[allow(rustdoc::invalid_html_tags)]
76488    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
76489    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76490    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
76491        self.parse_mode.as_ref().map(|v| v.as_str())
76492    }
76493    #[allow(rustdoc::invalid_html_tags)]
76494    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
76495    #[allow(clippy::needless_lifetimes)]
76496    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
76497        self.parse_mode = parse_mode;
76498        self
76499    }
76500    #[allow(rustdoc::invalid_html_tags)]
76501    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76502    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76503    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
76504        self.caption_entities.as_ref()
76505    }
76506    #[allow(rustdoc::invalid_html_tags)]
76507    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76508    #[allow(clippy::needless_lifetimes)]
76509    fn set_caption_entities<'a>(
76510        &'a mut self,
76511        caption_entities: Option<Vec<MessageEntity>>,
76512    ) -> &'a mut Self {
76513        self.caption_entities = caption_entities;
76514        self
76515    }
76516    #[allow(rustdoc::invalid_html_tags)]
76517    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
76518    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76519    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
76520        self.show_caption_above_media.as_ref().map(|v| *v)
76521    }
76522    #[allow(rustdoc::invalid_html_tags)]
76523    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
76524    #[allow(clippy::needless_lifetimes)]
76525    fn set_show_caption_above_media<'a>(
76526        &'a mut self,
76527        show_caption_above_media: Option<bool>,
76528    ) -> &'a mut Self {
76529        self.show_caption_above_media = show_caption_above_media;
76530        self
76531    }
76532    #[allow(rustdoc::invalid_html_tags)]
76533    #[doc = "Optional. Animation width"]
76534    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76535    fn get_width<'a>(&'a self) -> Option<i64> {
76536        self.width.as_ref().map(|v| *v)
76537    }
76538    #[allow(rustdoc::invalid_html_tags)]
76539    #[doc = "Optional. Animation width"]
76540    #[allow(clippy::needless_lifetimes)]
76541    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
76542        self.width = width;
76543        self
76544    }
76545    #[allow(rustdoc::invalid_html_tags)]
76546    #[doc = "Optional. Animation height"]
76547    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76548    fn get_height<'a>(&'a self) -> Option<i64> {
76549        self.height.as_ref().map(|v| *v)
76550    }
76551    #[allow(rustdoc::invalid_html_tags)]
76552    #[doc = "Optional. Animation height"]
76553    #[allow(clippy::needless_lifetimes)]
76554    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
76555        self.height = height;
76556        self
76557    }
76558    #[allow(rustdoc::invalid_html_tags)]
76559    #[doc = "Optional. Animation duration in seconds"]
76560    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76561    fn get_duration<'a>(&'a self) -> Option<i64> {
76562        self.duration.as_ref().map(|v| *v)
76563    }
76564    #[allow(rustdoc::invalid_html_tags)]
76565    #[doc = "Optional. Animation duration in seconds"]
76566    #[allow(clippy::needless_lifetimes)]
76567    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
76568        self.duration = duration;
76569        self
76570    }
76571    #[allow(rustdoc::invalid_html_tags)]
76572    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
76573    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76574    fn get_has_spoiler<'a>(&'a self) -> Option<bool> {
76575        self.has_spoiler.as_ref().map(|v| *v)
76576    }
76577    #[allow(rustdoc::invalid_html_tags)]
76578    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
76579    #[allow(clippy::needless_lifetimes)]
76580    fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self {
76581        self.has_spoiler = has_spoiler;
76582        self
76583    }
76584}
76585impl TraitInputMediaDocument for InputMediaDocument {
76586    #[allow(rustdoc::invalid_html_tags)]
76587    #[doc = "Type of the result, must be document"]
76588    #[allow(clippy::needless_lifetimes)]
76589    fn get_tg_type<'a>(&'a self) -> &'a str {
76590        self.tg_type.as_str()
76591    }
76592    #[allow(rustdoc::invalid_html_tags)]
76593    #[doc = "Type of the result, must be document"]
76594    #[allow(clippy::needless_lifetimes)]
76595    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76596        self.tg_type = tg_type;
76597        self
76598    }
76599    #[allow(rustdoc::invalid_html_tags)]
76600    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76601    #[allow(clippy::needless_lifetimes)]
76602    fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
76603        &self.media
76604    }
76605    #[allow(rustdoc::invalid_html_tags)]
76606    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76607    #[allow(clippy::needless_lifetimes)]
76608    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
76609        self.media = media;
76610        self
76611    }
76612    #[allow(rustdoc::invalid_html_tags)]
76613    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76614    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76615    fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
76616        self.thumbnail.as_ref().map(|v| v.as_str())
76617    }
76618    #[allow(rustdoc::invalid_html_tags)]
76619    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76620    #[allow(clippy::needless_lifetimes)]
76621    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
76622        self.thumbnail = thumbnail;
76623        self
76624    }
76625    #[allow(rustdoc::invalid_html_tags)]
76626    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
76627    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76628    fn get_caption<'a>(&'a self) -> Option<&'a str> {
76629        self.caption.as_ref().map(|v| v.as_str())
76630    }
76631    #[allow(rustdoc::invalid_html_tags)]
76632    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
76633    #[allow(clippy::needless_lifetimes)]
76634    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
76635        self.caption = caption;
76636        self
76637    }
76638    #[allow(rustdoc::invalid_html_tags)]
76639    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
76640    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76641    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
76642        self.parse_mode.as_ref().map(|v| v.as_str())
76643    }
76644    #[allow(rustdoc::invalid_html_tags)]
76645    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
76646    #[allow(clippy::needless_lifetimes)]
76647    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
76648        self.parse_mode = parse_mode;
76649        self
76650    }
76651    #[allow(rustdoc::invalid_html_tags)]
76652    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76653    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76654    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
76655        self.caption_entities.as_ref()
76656    }
76657    #[allow(rustdoc::invalid_html_tags)]
76658    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76659    #[allow(clippy::needless_lifetimes)]
76660    fn set_caption_entities<'a>(
76661        &'a mut self,
76662        caption_entities: Option<Vec<MessageEntity>>,
76663    ) -> &'a mut Self {
76664        self.caption_entities = caption_entities;
76665        self
76666    }
76667    #[allow(rustdoc::invalid_html_tags)]
76668    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
76669    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76670    fn get_disable_content_type_detection<'a>(&'a self) -> Option<bool> {
76671        self.disable_content_type_detection.as_ref().map(|v| *v)
76672    }
76673    #[allow(rustdoc::invalid_html_tags)]
76674    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
76675    #[allow(clippy::needless_lifetimes)]
76676    fn set_disable_content_type_detection<'a>(
76677        &'a mut self,
76678        disable_content_type_detection: Option<bool>,
76679    ) -> &'a mut Self {
76680        self.disable_content_type_detection = disable_content_type_detection;
76681        self
76682    }
76683}
76684impl TraitInputMediaAudio for InputMediaAudio {
76685    #[allow(rustdoc::invalid_html_tags)]
76686    #[doc = "Type of the result, must be audio"]
76687    #[allow(clippy::needless_lifetimes)]
76688    fn get_tg_type<'a>(&'a self) -> &'a str {
76689        self.tg_type.as_str()
76690    }
76691    #[allow(rustdoc::invalid_html_tags)]
76692    #[doc = "Type of the result, must be audio"]
76693    #[allow(clippy::needless_lifetimes)]
76694    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76695        self.tg_type = tg_type;
76696        self
76697    }
76698    #[allow(rustdoc::invalid_html_tags)]
76699    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76700    #[allow(clippy::needless_lifetimes)]
76701    fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
76702        &self.media
76703    }
76704    #[allow(rustdoc::invalid_html_tags)]
76705    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76706    #[allow(clippy::needless_lifetimes)]
76707    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
76708        self.media = media;
76709        self
76710    }
76711    #[allow(rustdoc::invalid_html_tags)]
76712    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76713    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76714    fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
76715        self.thumbnail.as_ref().map(|v| v.as_str())
76716    }
76717    #[allow(rustdoc::invalid_html_tags)]
76718    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76719    #[allow(clippy::needless_lifetimes)]
76720    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
76721        self.thumbnail = thumbnail;
76722        self
76723    }
76724    #[allow(rustdoc::invalid_html_tags)]
76725    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
76726    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76727    fn get_caption<'a>(&'a self) -> Option<&'a str> {
76728        self.caption.as_ref().map(|v| v.as_str())
76729    }
76730    #[allow(rustdoc::invalid_html_tags)]
76731    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
76732    #[allow(clippy::needless_lifetimes)]
76733    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
76734        self.caption = caption;
76735        self
76736    }
76737    #[allow(rustdoc::invalid_html_tags)]
76738    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
76739    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76740    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
76741        self.parse_mode.as_ref().map(|v| v.as_str())
76742    }
76743    #[allow(rustdoc::invalid_html_tags)]
76744    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
76745    #[allow(clippy::needless_lifetimes)]
76746    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
76747        self.parse_mode = parse_mode;
76748        self
76749    }
76750    #[allow(rustdoc::invalid_html_tags)]
76751    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76752    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76753    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
76754        self.caption_entities.as_ref()
76755    }
76756    #[allow(rustdoc::invalid_html_tags)]
76757    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76758    #[allow(clippy::needless_lifetimes)]
76759    fn set_caption_entities<'a>(
76760        &'a mut self,
76761        caption_entities: Option<Vec<MessageEntity>>,
76762    ) -> &'a mut Self {
76763        self.caption_entities = caption_entities;
76764        self
76765    }
76766    #[allow(rustdoc::invalid_html_tags)]
76767    #[doc = "Optional. Duration of the audio in seconds"]
76768    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76769    fn get_duration<'a>(&'a self) -> Option<i64> {
76770        self.duration.as_ref().map(|v| *v)
76771    }
76772    #[allow(rustdoc::invalid_html_tags)]
76773    #[doc = "Optional. Duration of the audio in seconds"]
76774    #[allow(clippy::needless_lifetimes)]
76775    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
76776        self.duration = duration;
76777        self
76778    }
76779    #[allow(rustdoc::invalid_html_tags)]
76780    #[doc = "Optional. Performer of the audio"]
76781    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76782    fn get_performer<'a>(&'a self) -> Option<&'a str> {
76783        self.performer.as_ref().map(|v| v.as_str())
76784    }
76785    #[allow(rustdoc::invalid_html_tags)]
76786    #[doc = "Optional. Performer of the audio"]
76787    #[allow(clippy::needless_lifetimes)]
76788    fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self {
76789        self.performer = performer;
76790        self
76791    }
76792    #[allow(rustdoc::invalid_html_tags)]
76793    #[doc = "Optional. Title of the audio"]
76794    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76795    fn get_title<'a>(&'a self) -> Option<&'a str> {
76796        self.title.as_ref().map(|v| v.as_str())
76797    }
76798    #[allow(rustdoc::invalid_html_tags)]
76799    #[doc = "Optional. Title of the audio"]
76800    #[allow(clippy::needless_lifetimes)]
76801    fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
76802        self.title = title;
76803        self
76804    }
76805}
76806impl TraitInputMediaPhoto for InputMediaPhoto {
76807    #[allow(rustdoc::invalid_html_tags)]
76808    #[doc = "Type of the result, must be photo"]
76809    #[allow(clippy::needless_lifetimes)]
76810    fn get_tg_type<'a>(&'a self) -> &'a str {
76811        self.tg_type.as_str()
76812    }
76813    #[allow(rustdoc::invalid_html_tags)]
76814    #[doc = "Type of the result, must be photo"]
76815    #[allow(clippy::needless_lifetimes)]
76816    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76817        self.tg_type = tg_type;
76818        self
76819    }
76820    #[allow(rustdoc::invalid_html_tags)]
76821    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76822    #[allow(clippy::needless_lifetimes)]
76823    fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
76824        &self.media
76825    }
76826    #[allow(rustdoc::invalid_html_tags)]
76827    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76828    #[allow(clippy::needless_lifetimes)]
76829    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
76830        self.media = media;
76831        self
76832    }
76833    #[allow(rustdoc::invalid_html_tags)]
76834    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
76835    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76836    fn get_caption<'a>(&'a self) -> Option<&'a str> {
76837        self.caption.as_ref().map(|v| v.as_str())
76838    }
76839    #[allow(rustdoc::invalid_html_tags)]
76840    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
76841    #[allow(clippy::needless_lifetimes)]
76842    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
76843        self.caption = caption;
76844        self
76845    }
76846    #[allow(rustdoc::invalid_html_tags)]
76847    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
76848    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76849    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
76850        self.parse_mode.as_ref().map(|v| v.as_str())
76851    }
76852    #[allow(rustdoc::invalid_html_tags)]
76853    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
76854    #[allow(clippy::needless_lifetimes)]
76855    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
76856        self.parse_mode = parse_mode;
76857        self
76858    }
76859    #[allow(rustdoc::invalid_html_tags)]
76860    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76861    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76862    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
76863        self.caption_entities.as_ref()
76864    }
76865    #[allow(rustdoc::invalid_html_tags)]
76866    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76867    #[allow(clippy::needless_lifetimes)]
76868    fn set_caption_entities<'a>(
76869        &'a mut self,
76870        caption_entities: Option<Vec<MessageEntity>>,
76871    ) -> &'a mut Self {
76872        self.caption_entities = caption_entities;
76873        self
76874    }
76875    #[allow(rustdoc::invalid_html_tags)]
76876    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
76877    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76878    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
76879        self.show_caption_above_media.as_ref().map(|v| *v)
76880    }
76881    #[allow(rustdoc::invalid_html_tags)]
76882    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
76883    #[allow(clippy::needless_lifetimes)]
76884    fn set_show_caption_above_media<'a>(
76885        &'a mut self,
76886        show_caption_above_media: Option<bool>,
76887    ) -> &'a mut Self {
76888        self.show_caption_above_media = show_caption_above_media;
76889        self
76890    }
76891    #[allow(rustdoc::invalid_html_tags)]
76892    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
76893    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76894    fn get_has_spoiler<'a>(&'a self) -> Option<bool> {
76895        self.has_spoiler.as_ref().map(|v| *v)
76896    }
76897    #[allow(rustdoc::invalid_html_tags)]
76898    #[doc = "Optional. Pass True if the photo needs to be covered with a spoiler animation"]
76899    #[allow(clippy::needless_lifetimes)]
76900    fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self {
76901        self.has_spoiler = has_spoiler;
76902        self
76903    }
76904}
76905impl TraitInputMediaVideo for InputMediaVideo {
76906    #[allow(rustdoc::invalid_html_tags)]
76907    #[doc = "Type of the result, must be video"]
76908    #[allow(clippy::needless_lifetimes)]
76909    fn get_tg_type<'a>(&'a self) -> &'a str {
76910        self.tg_type.as_str()
76911    }
76912    #[allow(rustdoc::invalid_html_tags)]
76913    #[doc = "Type of the result, must be video"]
76914    #[allow(clippy::needless_lifetimes)]
76915    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
76916        self.tg_type = tg_type;
76917        self
76918    }
76919    #[allow(rustdoc::invalid_html_tags)]
76920    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76921    #[allow(clippy::needless_lifetimes)]
76922    fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
76923        &self.media
76924    }
76925    #[allow(rustdoc::invalid_html_tags)]
76926    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76927    #[allow(clippy::needless_lifetimes)]
76928    fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
76929        self.media = media;
76930        self
76931    }
76932    #[allow(rustdoc::invalid_html_tags)]
76933    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76934    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76935    fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
76936        self.thumbnail.as_ref().map(|v| v.as_str())
76937    }
76938    #[allow(rustdoc::invalid_html_tags)]
76939    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76940    #[allow(clippy::needless_lifetimes)]
76941    fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
76942        self.thumbnail = thumbnail;
76943        self
76944    }
76945    #[allow(rustdoc::invalid_html_tags)]
76946    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76947    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76948    fn get_cover<'a>(&'a self) -> Option<&'a str> {
76949        self.cover.as_ref().map(|v| v.as_str())
76950    }
76951    #[allow(rustdoc::invalid_html_tags)]
76952    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
76953    #[allow(clippy::needless_lifetimes)]
76954    fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self {
76955        self.cover = cover;
76956        self
76957    }
76958    #[allow(rustdoc::invalid_html_tags)]
76959    #[doc = "Optional. Start timestamp for the video in the message"]
76960    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76961    fn get_start_timestamp<'a>(&'a self) -> Option<i64> {
76962        self.start_timestamp.as_ref().map(|v| *v)
76963    }
76964    #[allow(rustdoc::invalid_html_tags)]
76965    #[doc = "Optional. Start timestamp for the video in the message"]
76966    #[allow(clippy::needless_lifetimes)]
76967    fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self {
76968        self.start_timestamp = start_timestamp;
76969        self
76970    }
76971    #[allow(rustdoc::invalid_html_tags)]
76972    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
76973    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76974    fn get_caption<'a>(&'a self) -> Option<&'a str> {
76975        self.caption.as_ref().map(|v| v.as_str())
76976    }
76977    #[allow(rustdoc::invalid_html_tags)]
76978    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
76979    #[allow(clippy::needless_lifetimes)]
76980    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
76981        self.caption = caption;
76982        self
76983    }
76984    #[allow(rustdoc::invalid_html_tags)]
76985    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
76986    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
76987    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
76988        self.parse_mode.as_ref().map(|v| v.as_str())
76989    }
76990    #[allow(rustdoc::invalid_html_tags)]
76991    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
76992    #[allow(clippy::needless_lifetimes)]
76993    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
76994        self.parse_mode = parse_mode;
76995        self
76996    }
76997    #[allow(rustdoc::invalid_html_tags)]
76998    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
76999    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77000    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
77001        self.caption_entities.as_ref()
77002    }
77003    #[allow(rustdoc::invalid_html_tags)]
77004    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
77005    #[allow(clippy::needless_lifetimes)]
77006    fn set_caption_entities<'a>(
77007        &'a mut self,
77008        caption_entities: Option<Vec<MessageEntity>>,
77009    ) -> &'a mut Self {
77010        self.caption_entities = caption_entities;
77011        self
77012    }
77013    #[allow(rustdoc::invalid_html_tags)]
77014    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
77015    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77016    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
77017        self.show_caption_above_media.as_ref().map(|v| *v)
77018    }
77019    #[allow(rustdoc::invalid_html_tags)]
77020    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
77021    #[allow(clippy::needless_lifetimes)]
77022    fn set_show_caption_above_media<'a>(
77023        &'a mut self,
77024        show_caption_above_media: Option<bool>,
77025    ) -> &'a mut Self {
77026        self.show_caption_above_media = show_caption_above_media;
77027        self
77028    }
77029    #[allow(rustdoc::invalid_html_tags)]
77030    #[doc = "Optional. Video width"]
77031    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77032    fn get_width<'a>(&'a self) -> Option<i64> {
77033        self.width.as_ref().map(|v| *v)
77034    }
77035    #[allow(rustdoc::invalid_html_tags)]
77036    #[doc = "Optional. Video width"]
77037    #[allow(clippy::needless_lifetimes)]
77038    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
77039        self.width = width;
77040        self
77041    }
77042    #[allow(rustdoc::invalid_html_tags)]
77043    #[doc = "Optional. Video height"]
77044    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77045    fn get_height<'a>(&'a self) -> Option<i64> {
77046        self.height.as_ref().map(|v| *v)
77047    }
77048    #[allow(rustdoc::invalid_html_tags)]
77049    #[doc = "Optional. Video height"]
77050    #[allow(clippy::needless_lifetimes)]
77051    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
77052        self.height = height;
77053        self
77054    }
77055    #[allow(rustdoc::invalid_html_tags)]
77056    #[doc = "Optional. Video duration in seconds"]
77057    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77058    fn get_duration<'a>(&'a self) -> Option<i64> {
77059        self.duration.as_ref().map(|v| *v)
77060    }
77061    #[allow(rustdoc::invalid_html_tags)]
77062    #[doc = "Optional. Video duration in seconds"]
77063    #[allow(clippy::needless_lifetimes)]
77064    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
77065        self.duration = duration;
77066        self
77067    }
77068    #[allow(rustdoc::invalid_html_tags)]
77069    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
77070    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77071    fn get_supports_streaming<'a>(&'a self) -> Option<bool> {
77072        self.supports_streaming.as_ref().map(|v| *v)
77073    }
77074    #[allow(rustdoc::invalid_html_tags)]
77075    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
77076    #[allow(clippy::needless_lifetimes)]
77077    fn set_supports_streaming<'a>(&'a mut self, supports_streaming: Option<bool>) -> &'a mut Self {
77078        self.supports_streaming = supports_streaming;
77079        self
77080    }
77081    #[allow(rustdoc::invalid_html_tags)]
77082    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
77083    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77084    fn get_has_spoiler<'a>(&'a self) -> Option<bool> {
77085        self.has_spoiler.as_ref().map(|v| *v)
77086    }
77087    #[allow(rustdoc::invalid_html_tags)]
77088    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
77089    #[allow(clippy::needless_lifetimes)]
77090    fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self {
77091        self.has_spoiler = has_spoiler;
77092        self
77093    }
77094}
77095#[allow(dead_code)]
77096impl ExternalReplyInfo {
77097    #[allow(clippy::too_many_arguments)]
77098    pub fn new<A: Into<MessageOrigin>>(origin: A) -> Self {
77099        Self {
77100            origin: BoxWrapper::new_unbox(origin.into()),
77101            chat: None,
77102            message_id: None,
77103            link_preview_options: None,
77104            animation: None,
77105            audio: None,
77106            document: None,
77107            paid_media: None,
77108            photo: None,
77109            sticker: None,
77110            story: None,
77111            video: None,
77112            video_note: None,
77113            voice: None,
77114            has_media_spoiler: None,
77115            checklist: None,
77116            contact: None,
77117            dice: None,
77118            game: None,
77119            giveaway: None,
77120            giveaway_winners: None,
77121            invoice: None,
77122            location: None,
77123            poll: None,
77124            venue: None,
77125        }
77126    }
77127    #[allow(rustdoc::invalid_html_tags)]
77128    #[doc = "Origin of the message replied to by the given message"]
77129    #[allow(clippy::needless_lifetimes)]
77130    pub fn get_origin<'a>(&'a self) -> &'a MessageOrigin {
77131        &self.origin
77132    }
77133    #[allow(rustdoc::invalid_html_tags)]
77134    #[doc = "Origin of the message replied to by the given message"]
77135    #[allow(clippy::needless_lifetimes)]
77136    pub fn set_origin<'a>(&'a mut self, origin: MessageOrigin) -> &'a mut Self {
77137        self.origin = BoxWrapper(Unbox(origin));
77138        self
77139    }
77140    #[allow(rustdoc::invalid_html_tags)]
77141    #[doc = "Origin of the message replied to by the given message"]
77142    fn rhai_get_origin(&mut self) -> MessageOrigin {
77143        self.origin.clone().into()
77144    }
77145    #[allow(rustdoc::invalid_html_tags)]
77146    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
77147    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77148    pub fn get_chat<'a>(&'a self) -> Option<&'a Chat> {
77149        self.chat.as_ref().map(|v| v.inner_ref())
77150    }
77151    #[allow(rustdoc::invalid_html_tags)]
77152    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
77153    #[allow(clippy::needless_lifetimes)]
77154    pub fn set_chat<'a>(&'a mut self, chat: Option<Chat>) -> &'a mut Self {
77155        self.chat = chat.map(|chat| BoxWrapper(Unbox(chat)));
77156        self
77157    }
77158    #[allow(rustdoc::invalid_html_tags)]
77159    #[doc = "Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel."]
77160    fn rhai_get_chat(&mut self) -> Option<Chat> {
77161        self.chat.as_ref().map(|v| v.clone().into())
77162    }
77163    #[allow(rustdoc::invalid_html_tags)]
77164    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
77165    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77166    pub fn get_message_id<'a>(&'a self) -> Option<i64> {
77167        self.message_id.as_ref().map(|v| *v)
77168    }
77169    #[allow(rustdoc::invalid_html_tags)]
77170    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
77171    #[allow(clippy::needless_lifetimes)]
77172    pub fn set_message_id<'a>(&'a mut self, message_id: Option<i64>) -> &'a mut Self {
77173        self.message_id = message_id;
77174        self
77175    }
77176    #[allow(rustdoc::invalid_html_tags)]
77177    #[doc = "Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel."]
77178    fn rhai_get_message_id(&mut self) -> Option<i64> {
77179        self.message_id.as_ref().copied()
77180    }
77181    #[allow(rustdoc::invalid_html_tags)]
77182    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
77183    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77184    pub fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions> {
77185        self.link_preview_options.as_ref().map(|v| v.inner_ref())
77186    }
77187    #[allow(rustdoc::invalid_html_tags)]
77188    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
77189    #[allow(clippy::needless_lifetimes)]
77190    pub fn set_link_preview_options<'a>(
77191        &'a mut self,
77192        link_preview_options: Option<LinkPreviewOptions>,
77193    ) -> &'a mut Self {
77194        self.link_preview_options = link_preview_options
77195            .map(|link_preview_options| BoxWrapper(Unbox(link_preview_options)));
77196        self
77197    }
77198    #[allow(rustdoc::invalid_html_tags)]
77199    #[doc = "Optional. Options used for link preview generation for the original message, if it is a text message"]
77200    fn rhai_get_link_preview_options(&mut self) -> Option<LinkPreviewOptions> {
77201        self.link_preview_options.as_ref().map(|v| v.clone().into())
77202    }
77203    #[allow(rustdoc::invalid_html_tags)]
77204    #[doc = "Optional. Message is an animation, information about the animation"]
77205    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77206    pub fn get_animation<'a>(&'a self) -> Option<&'a Animation> {
77207        self.animation.as_ref().map(|v| v.inner_ref())
77208    }
77209    #[allow(rustdoc::invalid_html_tags)]
77210    #[doc = "Optional. Message is an animation, information about the animation"]
77211    #[allow(clippy::needless_lifetimes)]
77212    pub fn set_animation<'a>(&'a mut self, animation: Option<Animation>) -> &'a mut Self {
77213        self.animation = animation.map(|animation| BoxWrapper(Unbox(animation)));
77214        self
77215    }
77216    #[allow(rustdoc::invalid_html_tags)]
77217    #[doc = "Optional. Message is an animation, information about the animation"]
77218    fn rhai_get_animation(&mut self) -> Option<Animation> {
77219        self.animation.as_ref().map(|v| v.clone().into())
77220    }
77221    #[allow(rustdoc::invalid_html_tags)]
77222    #[doc = "Optional. Message is an audio file, information about the file"]
77223    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77224    pub fn get_audio<'a>(&'a self) -> Option<&'a Audio> {
77225        self.audio.as_ref().map(|v| v.inner_ref())
77226    }
77227    #[allow(rustdoc::invalid_html_tags)]
77228    #[doc = "Optional. Message is an audio file, information about the file"]
77229    #[allow(clippy::needless_lifetimes)]
77230    pub fn set_audio<'a>(&'a mut self, audio: Option<Audio>) -> &'a mut Self {
77231        self.audio = audio.map(|audio| BoxWrapper(Unbox(audio)));
77232        self
77233    }
77234    #[allow(rustdoc::invalid_html_tags)]
77235    #[doc = "Optional. Message is an audio file, information about the file"]
77236    fn rhai_get_audio(&mut self) -> Option<Audio> {
77237        self.audio.as_ref().map(|v| v.clone().into())
77238    }
77239    #[allow(rustdoc::invalid_html_tags)]
77240    #[doc = "Optional. Message is a general file, information about the file"]
77241    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77242    pub fn get_document<'a>(&'a self) -> Option<&'a Document> {
77243        self.document.as_ref().map(|v| v.inner_ref())
77244    }
77245    #[allow(rustdoc::invalid_html_tags)]
77246    #[doc = "Optional. Message is a general file, information about the file"]
77247    #[allow(clippy::needless_lifetimes)]
77248    pub fn set_document<'a>(&'a mut self, document: Option<Document>) -> &'a mut Self {
77249        self.document = document.map(|document| BoxWrapper(Unbox(document)));
77250        self
77251    }
77252    #[allow(rustdoc::invalid_html_tags)]
77253    #[doc = "Optional. Message is a general file, information about the file"]
77254    fn rhai_get_document(&mut self) -> Option<Document> {
77255        self.document.as_ref().map(|v| v.clone().into())
77256    }
77257    #[allow(rustdoc::invalid_html_tags)]
77258    #[doc = "Optional. Message contains paid media; information about the paid media"]
77259    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77260    pub fn get_paid_media<'a>(&'a self) -> Option<&'a PaidMediaInfo> {
77261        self.paid_media.as_ref().map(|v| v.inner_ref())
77262    }
77263    #[allow(rustdoc::invalid_html_tags)]
77264    #[doc = "Optional. Message contains paid media; information about the paid media"]
77265    #[allow(clippy::needless_lifetimes)]
77266    pub fn set_paid_media<'a>(&'a mut self, paid_media: Option<PaidMediaInfo>) -> &'a mut Self {
77267        self.paid_media = paid_media.map(|paid_media| BoxWrapper(Unbox(paid_media)));
77268        self
77269    }
77270    #[allow(rustdoc::invalid_html_tags)]
77271    #[doc = "Optional. Message contains paid media; information about the paid media"]
77272    fn rhai_get_paid_media(&mut self) -> Option<PaidMediaInfo> {
77273        self.paid_media.as_ref().map(|v| v.clone().into())
77274    }
77275    #[allow(rustdoc::invalid_html_tags)]
77276    #[doc = "Optional. Message is a photo, available sizes of the photo"]
77277    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77278    pub fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
77279        self.photo.as_ref()
77280    }
77281    #[allow(rustdoc::invalid_html_tags)]
77282    #[doc = "Optional. Message is a photo, available sizes of the photo"]
77283    #[allow(clippy::needless_lifetimes)]
77284    pub fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self {
77285        self.photo = photo;
77286        self
77287    }
77288    #[allow(rustdoc::invalid_html_tags)]
77289    #[doc = "Optional. Message is a photo, available sizes of the photo"]
77290    fn rhai_get_photo(&mut self) -> Option<Vec<PhotoSize>> {
77291        self.photo.as_ref().cloned()
77292    }
77293    #[allow(rustdoc::invalid_html_tags)]
77294    #[doc = "Optional. Message is a sticker, information about the sticker"]
77295    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77296    pub fn get_sticker<'a>(&'a self) -> Option<&'a Sticker> {
77297        self.sticker.as_ref().map(|v| v.inner_ref())
77298    }
77299    #[allow(rustdoc::invalid_html_tags)]
77300    #[doc = "Optional. Message is a sticker, information about the sticker"]
77301    #[allow(clippy::needless_lifetimes)]
77302    pub fn set_sticker<'a>(&'a mut self, sticker: Option<Sticker>) -> &'a mut Self {
77303        self.sticker = sticker.map(|sticker| BoxWrapper(Unbox(sticker)));
77304        self
77305    }
77306    #[allow(rustdoc::invalid_html_tags)]
77307    #[doc = "Optional. Message is a sticker, information about the sticker"]
77308    fn rhai_get_sticker(&mut self) -> Option<Sticker> {
77309        self.sticker.as_ref().map(|v| v.clone().into())
77310    }
77311    #[allow(rustdoc::invalid_html_tags)]
77312    #[doc = "Optional. Message is a forwarded story"]
77313    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77314    pub fn get_story<'a>(&'a self) -> Option<&'a Story> {
77315        self.story.as_ref().map(|v| v.inner_ref())
77316    }
77317    #[allow(rustdoc::invalid_html_tags)]
77318    #[doc = "Optional. Message is a forwarded story"]
77319    #[allow(clippy::needless_lifetimes)]
77320    pub fn set_story<'a>(&'a mut self, story: Option<Story>) -> &'a mut Self {
77321        self.story = story.map(|story| BoxWrapper(Unbox(story)));
77322        self
77323    }
77324    #[allow(rustdoc::invalid_html_tags)]
77325    #[doc = "Optional. Message is a forwarded story"]
77326    fn rhai_get_story(&mut self) -> Option<Story> {
77327        self.story.as_ref().map(|v| v.clone().into())
77328    }
77329    #[allow(rustdoc::invalid_html_tags)]
77330    #[doc = "Optional. Message is a video, information about the video"]
77331    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77332    pub fn get_video<'a>(&'a self) -> Option<&'a Video> {
77333        self.video.as_ref().map(|v| v.inner_ref())
77334    }
77335    #[allow(rustdoc::invalid_html_tags)]
77336    #[doc = "Optional. Message is a video, information about the video"]
77337    #[allow(clippy::needless_lifetimes)]
77338    pub fn set_video<'a>(&'a mut self, video: Option<Video>) -> &'a mut Self {
77339        self.video = video.map(|video| BoxWrapper(Unbox(video)));
77340        self
77341    }
77342    #[allow(rustdoc::invalid_html_tags)]
77343    #[doc = "Optional. Message is a video, information about the video"]
77344    fn rhai_get_video(&mut self) -> Option<Video> {
77345        self.video.as_ref().map(|v| v.clone().into())
77346    }
77347    #[allow(rustdoc::invalid_html_tags)]
77348    #[doc = "Optional. Message is a video note, information about the video message"]
77349    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77350    pub fn get_video_note<'a>(&'a self) -> Option<&'a VideoNote> {
77351        self.video_note.as_ref().map(|v| v.inner_ref())
77352    }
77353    #[allow(rustdoc::invalid_html_tags)]
77354    #[doc = "Optional. Message is a video note, information about the video message"]
77355    #[allow(clippy::needless_lifetimes)]
77356    pub fn set_video_note<'a>(&'a mut self, video_note: Option<VideoNote>) -> &'a mut Self {
77357        self.video_note = video_note.map(|video_note| BoxWrapper(Unbox(video_note)));
77358        self
77359    }
77360    #[allow(rustdoc::invalid_html_tags)]
77361    #[doc = "Optional. Message is a video note, information about the video message"]
77362    fn rhai_get_video_note(&mut self) -> Option<VideoNote> {
77363        self.video_note.as_ref().map(|v| v.clone().into())
77364    }
77365    #[allow(rustdoc::invalid_html_tags)]
77366    #[doc = "Optional. Message is a voice message, information about the file"]
77367    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77368    pub fn get_voice<'a>(&'a self) -> Option<&'a Voice> {
77369        self.voice.as_ref().map(|v| v.inner_ref())
77370    }
77371    #[allow(rustdoc::invalid_html_tags)]
77372    #[doc = "Optional. Message is a voice message, information about the file"]
77373    #[allow(clippy::needless_lifetimes)]
77374    pub fn set_voice<'a>(&'a mut self, voice: Option<Voice>) -> &'a mut Self {
77375        self.voice = voice.map(|voice| BoxWrapper(Unbox(voice)));
77376        self
77377    }
77378    #[allow(rustdoc::invalid_html_tags)]
77379    #[doc = "Optional. Message is a voice message, information about the file"]
77380    fn rhai_get_voice(&mut self) -> Option<Voice> {
77381        self.voice.as_ref().map(|v| v.clone().into())
77382    }
77383    #[allow(rustdoc::invalid_html_tags)]
77384    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
77385    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77386    pub fn get_has_media_spoiler<'a>(&'a self) -> Option<bool> {
77387        self.has_media_spoiler.as_ref().map(|v| *v)
77388    }
77389    #[allow(rustdoc::invalid_html_tags)]
77390    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
77391    #[allow(clippy::needless_lifetimes)]
77392    pub fn set_has_media_spoiler<'a>(
77393        &'a mut self,
77394        has_media_spoiler: Option<bool>,
77395    ) -> &'a mut Self {
77396        self.has_media_spoiler = has_media_spoiler;
77397        self
77398    }
77399    #[allow(rustdoc::invalid_html_tags)]
77400    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
77401    fn rhai_get_has_media_spoiler(&mut self) -> Option<bool> {
77402        self.has_media_spoiler.as_ref().copied()
77403    }
77404    #[allow(rustdoc::invalid_html_tags)]
77405    #[doc = "Optional. Message is a checklist"]
77406    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77407    pub fn get_checklist<'a>(&'a self) -> Option<&'a Checklist> {
77408        self.checklist.as_ref().map(|v| v.inner_ref())
77409    }
77410    #[allow(rustdoc::invalid_html_tags)]
77411    #[doc = "Optional. Message is a checklist"]
77412    #[allow(clippy::needless_lifetimes)]
77413    pub fn set_checklist<'a>(&'a mut self, checklist: Option<Checklist>) -> &'a mut Self {
77414        self.checklist = checklist.map(|checklist| BoxWrapper(Unbox(checklist)));
77415        self
77416    }
77417    #[allow(rustdoc::invalid_html_tags)]
77418    #[doc = "Optional. Message is a checklist"]
77419    fn rhai_get_checklist(&mut self) -> Option<Checklist> {
77420        self.checklist.as_ref().map(|v| v.clone().into())
77421    }
77422    #[allow(rustdoc::invalid_html_tags)]
77423    #[doc = "Optional. Message is a shared contact, information about the contact"]
77424    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77425    pub fn get_contact<'a>(&'a self) -> Option<&'a Contact> {
77426        self.contact.as_ref().map(|v| v.inner_ref())
77427    }
77428    #[allow(rustdoc::invalid_html_tags)]
77429    #[doc = "Optional. Message is a shared contact, information about the contact"]
77430    #[allow(clippy::needless_lifetimes)]
77431    pub fn set_contact<'a>(&'a mut self, contact: Option<Contact>) -> &'a mut Self {
77432        self.contact = contact.map(|contact| BoxWrapper(Unbox(contact)));
77433        self
77434    }
77435    #[allow(rustdoc::invalid_html_tags)]
77436    #[doc = "Optional. Message is a shared contact, information about the contact"]
77437    fn rhai_get_contact(&mut self) -> Option<Contact> {
77438        self.contact.as_ref().map(|v| v.clone().into())
77439    }
77440    #[allow(rustdoc::invalid_html_tags)]
77441    #[doc = "Optional. Message is a dice with random value"]
77442    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77443    pub fn get_dice<'a>(&'a self) -> Option<&'a Dice> {
77444        self.dice.as_ref().map(|v| v.inner_ref())
77445    }
77446    #[allow(rustdoc::invalid_html_tags)]
77447    #[doc = "Optional. Message is a dice with random value"]
77448    #[allow(clippy::needless_lifetimes)]
77449    pub fn set_dice<'a>(&'a mut self, dice: Option<Dice>) -> &'a mut Self {
77450        self.dice = dice.map(|dice| BoxWrapper(Unbox(dice)));
77451        self
77452    }
77453    #[allow(rustdoc::invalid_html_tags)]
77454    #[doc = "Optional. Message is a dice with random value"]
77455    fn rhai_get_dice(&mut self) -> Option<Dice> {
77456        self.dice.as_ref().map(|v| v.clone().into())
77457    }
77458    #[allow(rustdoc::invalid_html_tags)]
77459    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
77460    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77461    pub fn get_game<'a>(&'a self) -> Option<&'a Game> {
77462        self.game.as_ref().map(|v| v.inner_ref())
77463    }
77464    #[allow(rustdoc::invalid_html_tags)]
77465    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
77466    #[allow(clippy::needless_lifetimes)]
77467    pub fn set_game<'a>(&'a mut self, game: Option<Game>) -> &'a mut Self {
77468        self.game = game.map(|game| BoxWrapper(Unbox(game)));
77469        self
77470    }
77471    #[allow(rustdoc::invalid_html_tags)]
77472    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
77473    fn rhai_get_game(&mut self) -> Option<Game> {
77474        self.game.as_ref().map(|v| v.clone().into())
77475    }
77476    #[allow(rustdoc::invalid_html_tags)]
77477    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
77478    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77479    pub fn get_giveaway<'a>(&'a self) -> Option<&'a Giveaway> {
77480        self.giveaway.as_ref().map(|v| v.inner_ref())
77481    }
77482    #[allow(rustdoc::invalid_html_tags)]
77483    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
77484    #[allow(clippy::needless_lifetimes)]
77485    pub fn set_giveaway<'a>(&'a mut self, giveaway: Option<Giveaway>) -> &'a mut Self {
77486        self.giveaway = giveaway.map(|giveaway| BoxWrapper(Unbox(giveaway)));
77487        self
77488    }
77489    #[allow(rustdoc::invalid_html_tags)]
77490    #[doc = "Optional. Message is a scheduled giveaway, information about the giveaway"]
77491    fn rhai_get_giveaway(&mut self) -> Option<Giveaway> {
77492        self.giveaway.as_ref().map(|v| v.clone().into())
77493    }
77494    #[allow(rustdoc::invalid_html_tags)]
77495    #[doc = "Optional. A giveaway with public winners was completed"]
77496    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77497    pub fn get_giveaway_winners<'a>(&'a self) -> Option<&'a GiveawayWinners> {
77498        self.giveaway_winners.as_ref().map(|v| v.inner_ref())
77499    }
77500    #[allow(rustdoc::invalid_html_tags)]
77501    #[doc = "Optional. A giveaway with public winners was completed"]
77502    #[allow(clippy::needless_lifetimes)]
77503    pub fn set_giveaway_winners<'a>(
77504        &'a mut self,
77505        giveaway_winners: Option<GiveawayWinners>,
77506    ) -> &'a mut Self {
77507        self.giveaway_winners =
77508            giveaway_winners.map(|giveaway_winners| BoxWrapper(Unbox(giveaway_winners)));
77509        self
77510    }
77511    #[allow(rustdoc::invalid_html_tags)]
77512    #[doc = "Optional. A giveaway with public winners was completed"]
77513    fn rhai_get_giveaway_winners(&mut self) -> Option<GiveawayWinners> {
77514        self.giveaway_winners.as_ref().map(|v| v.clone().into())
77515    }
77516    #[allow(rustdoc::invalid_html_tags)]
77517    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
77518    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77519    pub fn get_invoice<'a>(&'a self) -> Option<&'a Invoice> {
77520        self.invoice.as_ref().map(|v| v.inner_ref())
77521    }
77522    #[allow(rustdoc::invalid_html_tags)]
77523    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
77524    #[allow(clippy::needless_lifetimes)]
77525    pub fn set_invoice<'a>(&'a mut self, invoice: Option<Invoice>) -> &'a mut Self {
77526        self.invoice = invoice.map(|invoice| BoxWrapper(Unbox(invoice)));
77527        self
77528    }
77529    #[allow(rustdoc::invalid_html_tags)]
77530    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
77531    fn rhai_get_invoice(&mut self) -> Option<Invoice> {
77532        self.invoice.as_ref().map(|v| v.clone().into())
77533    }
77534    #[allow(rustdoc::invalid_html_tags)]
77535    #[doc = "Optional. Message is a shared location, information about the location"]
77536    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77537    pub fn get_location<'a>(&'a self) -> Option<&'a Location> {
77538        self.location.as_ref().map(|v| v.inner_ref())
77539    }
77540    #[allow(rustdoc::invalid_html_tags)]
77541    #[doc = "Optional. Message is a shared location, information about the location"]
77542    #[allow(clippy::needless_lifetimes)]
77543    pub fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self {
77544        self.location = location.map(|location| BoxWrapper(Unbox(location)));
77545        self
77546    }
77547    #[allow(rustdoc::invalid_html_tags)]
77548    #[doc = "Optional. Message is a shared location, information about the location"]
77549    fn rhai_get_location(&mut self) -> Option<Location> {
77550        self.location.as_ref().map(|v| v.clone().into())
77551    }
77552    #[allow(rustdoc::invalid_html_tags)]
77553    #[doc = "Optional. Message is a native poll, information about the poll"]
77554    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77555    pub fn get_poll<'a>(&'a self) -> Option<&'a Poll> {
77556        self.poll.as_ref().map(|v| v.inner_ref())
77557    }
77558    #[allow(rustdoc::invalid_html_tags)]
77559    #[doc = "Optional. Message is a native poll, information about the poll"]
77560    #[allow(clippy::needless_lifetimes)]
77561    pub fn set_poll<'a>(&'a mut self, poll: Option<Poll>) -> &'a mut Self {
77562        self.poll = poll.map(|poll| BoxWrapper(Unbox(poll)));
77563        self
77564    }
77565    #[allow(rustdoc::invalid_html_tags)]
77566    #[doc = "Optional. Message is a native poll, information about the poll"]
77567    fn rhai_get_poll(&mut self) -> Option<Poll> {
77568        self.poll.as_ref().map(|v| v.clone().into())
77569    }
77570    #[allow(rustdoc::invalid_html_tags)]
77571    #[doc = "Optional. Message is a venue, information about the venue"]
77572    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77573    pub fn get_venue<'a>(&'a self) -> Option<&'a Venue> {
77574        self.venue.as_ref().map(|v| v.inner_ref())
77575    }
77576    #[allow(rustdoc::invalid_html_tags)]
77577    #[doc = "Optional. Message is a venue, information about the venue"]
77578    #[allow(clippy::needless_lifetimes)]
77579    pub fn set_venue<'a>(&'a mut self, venue: Option<Venue>) -> &'a mut Self {
77580        self.venue = venue.map(|venue| BoxWrapper(Unbox(venue)));
77581        self
77582    }
77583    #[allow(rustdoc::invalid_html_tags)]
77584    #[doc = "Optional. Message is a venue, information about the venue"]
77585    fn rhai_get_venue(&mut self) -> Option<Venue> {
77586        self.venue.as_ref().map(|v| v.clone().into())
77587    }
77588}
77589#[allow(dead_code)]
77590impl InlineQueryResultCachedGif {
77591    #[allow(clippy::too_many_arguments)]
77592    pub fn new(id: String, gif_file_id: String) -> Self {
77593        Self {
77594            tg_type: "gif".to_owned(),
77595            id,
77596            gif_file_id,
77597            title: None,
77598            caption: None,
77599            parse_mode: None,
77600            caption_entities: None,
77601            show_caption_above_media: None,
77602            reply_markup: None,
77603            input_message_content: None,
77604        }
77605    }
77606    #[allow(rustdoc::invalid_html_tags)]
77607    #[doc = "Type of the result, must be gif"]
77608    #[allow(clippy::needless_lifetimes)]
77609    pub fn get_tg_type<'a>(&'a self) -> &'a str {
77610        self.tg_type.as_str()
77611    }
77612    #[allow(rustdoc::invalid_html_tags)]
77613    #[doc = "Type of the result, must be gif"]
77614    #[allow(clippy::needless_lifetimes)]
77615    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
77616        self.tg_type = tg_type;
77617        self
77618    }
77619    #[allow(rustdoc::invalid_html_tags)]
77620    #[doc = "Type of the result, must be gif"]
77621    fn rhai_get_tg_type(&mut self) -> String {
77622        self.tg_type.clone()
77623    }
77624    #[allow(rustdoc::invalid_html_tags)]
77625    #[doc = "Unique identifier for this result, 1-64 bytes"]
77626    #[allow(clippy::needless_lifetimes)]
77627    pub fn get_id<'a>(&'a self) -> &'a str {
77628        self.id.as_str()
77629    }
77630    #[allow(rustdoc::invalid_html_tags)]
77631    #[doc = "Unique identifier for this result, 1-64 bytes"]
77632    #[allow(clippy::needless_lifetimes)]
77633    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
77634        self.id = id;
77635        self
77636    }
77637    #[allow(rustdoc::invalid_html_tags)]
77638    #[doc = "Unique identifier for this result, 1-64 bytes"]
77639    fn rhai_get_id(&mut self) -> String {
77640        self.id.clone()
77641    }
77642    #[allow(rustdoc::invalid_html_tags)]
77643    #[doc = "A valid file identifier for the GIF file"]
77644    #[allow(clippy::needless_lifetimes)]
77645    pub fn get_gif_file_id<'a>(&'a self) -> &'a str {
77646        self.gif_file_id.as_str()
77647    }
77648    #[allow(rustdoc::invalid_html_tags)]
77649    #[doc = "A valid file identifier for the GIF file"]
77650    #[allow(clippy::needless_lifetimes)]
77651    pub fn set_gif_file_id<'a>(&'a mut self, gif_file_id: String) -> &'a mut Self {
77652        self.gif_file_id = gif_file_id;
77653        self
77654    }
77655    #[allow(rustdoc::invalid_html_tags)]
77656    #[doc = "A valid file identifier for the GIF file"]
77657    fn rhai_get_gif_file_id(&mut self) -> String {
77658        self.gif_file_id.clone()
77659    }
77660    #[allow(rustdoc::invalid_html_tags)]
77661    #[doc = "Optional. Title for the result"]
77662    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77663    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
77664        self.title.as_ref().map(|v| v.as_str())
77665    }
77666    #[allow(rustdoc::invalid_html_tags)]
77667    #[doc = "Optional. Title for the result"]
77668    #[allow(clippy::needless_lifetimes)]
77669    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
77670        self.title = title;
77671        self
77672    }
77673    #[allow(rustdoc::invalid_html_tags)]
77674    #[doc = "Optional. Title for the result"]
77675    fn rhai_get_title(&mut self) -> Option<String> {
77676        self.title.as_ref().cloned()
77677    }
77678    #[allow(rustdoc::invalid_html_tags)]
77679    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
77680    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77681    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
77682        self.caption.as_ref().map(|v| v.as_str())
77683    }
77684    #[allow(rustdoc::invalid_html_tags)]
77685    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
77686    #[allow(clippy::needless_lifetimes)]
77687    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
77688        self.caption = caption;
77689        self
77690    }
77691    #[allow(rustdoc::invalid_html_tags)]
77692    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
77693    fn rhai_get_caption(&mut self) -> Option<String> {
77694        self.caption.as_ref().cloned()
77695    }
77696    #[allow(rustdoc::invalid_html_tags)]
77697    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
77698    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77699    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
77700        self.parse_mode.as_ref().map(|v| v.as_str())
77701    }
77702    #[allow(rustdoc::invalid_html_tags)]
77703    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
77704    #[allow(clippy::needless_lifetimes)]
77705    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
77706        self.parse_mode = parse_mode;
77707        self
77708    }
77709    #[allow(rustdoc::invalid_html_tags)]
77710    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
77711    fn rhai_get_parse_mode(&mut self) -> Option<String> {
77712        self.parse_mode.as_ref().cloned()
77713    }
77714    #[allow(rustdoc::invalid_html_tags)]
77715    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
77716    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77717    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
77718        self.caption_entities.as_ref()
77719    }
77720    #[allow(rustdoc::invalid_html_tags)]
77721    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
77722    #[allow(clippy::needless_lifetimes)]
77723    pub fn set_caption_entities<'a>(
77724        &'a mut self,
77725        caption_entities: Option<Vec<MessageEntity>>,
77726    ) -> &'a mut Self {
77727        self.caption_entities = caption_entities;
77728        self
77729    }
77730    #[allow(rustdoc::invalid_html_tags)]
77731    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
77732    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
77733        self.caption_entities.as_ref().cloned()
77734    }
77735    #[allow(rustdoc::invalid_html_tags)]
77736    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
77737    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77738    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
77739        self.show_caption_above_media.as_ref().map(|v| *v)
77740    }
77741    #[allow(rustdoc::invalid_html_tags)]
77742    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
77743    #[allow(clippy::needless_lifetimes)]
77744    pub fn set_show_caption_above_media<'a>(
77745        &'a mut self,
77746        show_caption_above_media: Option<bool>,
77747    ) -> &'a mut Self {
77748        self.show_caption_above_media = show_caption_above_media;
77749        self
77750    }
77751    #[allow(rustdoc::invalid_html_tags)]
77752    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
77753    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
77754        self.show_caption_above_media.as_ref().copied()
77755    }
77756    #[allow(rustdoc::invalid_html_tags)]
77757    #[doc = "Optional. Inline keyboard attached to the message"]
77758    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77759    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
77760        self.reply_markup.as_ref().map(|v| v.inner_ref())
77761    }
77762    #[allow(rustdoc::invalid_html_tags)]
77763    #[doc = "Optional. Inline keyboard attached to the message"]
77764    #[allow(clippy::needless_lifetimes)]
77765    pub fn set_reply_markup<'a>(
77766        &'a mut self,
77767        reply_markup: Option<InlineKeyboardMarkup>,
77768    ) -> &'a mut Self {
77769        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
77770        self
77771    }
77772    #[allow(rustdoc::invalid_html_tags)]
77773    #[doc = "Optional. Inline keyboard attached to the message"]
77774    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
77775        self.reply_markup.as_ref().map(|v| v.clone().into())
77776    }
77777    #[allow(rustdoc::invalid_html_tags)]
77778    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
77779    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77780    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
77781        self.input_message_content.as_ref().map(|v| v.inner_ref())
77782    }
77783    #[allow(rustdoc::invalid_html_tags)]
77784    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
77785    #[allow(clippy::needless_lifetimes)]
77786    pub fn set_input_message_content<'a>(
77787        &'a mut self,
77788        input_message_content: Option<InputMessageContent>,
77789    ) -> &'a mut Self {
77790        self.input_message_content = input_message_content
77791            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
77792        self
77793    }
77794    #[allow(rustdoc::invalid_html_tags)]
77795    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
77796    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
77797        self.input_message_content
77798            .as_ref()
77799            .map(|v| v.clone().into())
77800    }
77801}
77802#[allow(dead_code)]
77803impl WriteAccessAllowed {
77804    #[allow(clippy::too_many_arguments)]
77805    pub fn new() -> Self {
77806        Self {
77807            from_request: None,
77808            web_app_name: None,
77809            from_attachment_menu: None,
77810        }
77811    }
77812    #[allow(rustdoc::invalid_html_tags)]
77813    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
77814    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77815    pub fn get_from_request<'a>(&'a self) -> Option<bool> {
77816        self.from_request.as_ref().map(|v| *v)
77817    }
77818    #[allow(rustdoc::invalid_html_tags)]
77819    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
77820    #[allow(clippy::needless_lifetimes)]
77821    pub fn set_from_request<'a>(&'a mut self, from_request: Option<bool>) -> &'a mut Self {
77822        self.from_request = from_request;
77823        self
77824    }
77825    #[allow(rustdoc::invalid_html_tags)]
77826    #[doc = "Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess"]
77827    fn rhai_get_from_request(&mut self) -> Option<bool> {
77828        self.from_request.as_ref().copied()
77829    }
77830    #[allow(rustdoc::invalid_html_tags)]
77831    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
77832    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77833    pub fn get_web_app_name<'a>(&'a self) -> Option<&'a str> {
77834        self.web_app_name.as_ref().map(|v| v.as_str())
77835    }
77836    #[allow(rustdoc::invalid_html_tags)]
77837    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
77838    #[allow(clippy::needless_lifetimes)]
77839    pub fn set_web_app_name<'a>(&'a mut self, web_app_name: Option<String>) -> &'a mut Self {
77840        self.web_app_name = web_app_name;
77841        self
77842    }
77843    #[allow(rustdoc::invalid_html_tags)]
77844    #[doc = "Optional. Name of the Web App, if the access was granted when the Web App was launched from a link"]
77845    fn rhai_get_web_app_name(&mut self) -> Option<String> {
77846        self.web_app_name.as_ref().cloned()
77847    }
77848    #[allow(rustdoc::invalid_html_tags)]
77849    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
77850    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
77851    pub fn get_from_attachment_menu<'a>(&'a self) -> Option<bool> {
77852        self.from_attachment_menu.as_ref().map(|v| *v)
77853    }
77854    #[allow(rustdoc::invalid_html_tags)]
77855    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
77856    #[allow(clippy::needless_lifetimes)]
77857    pub fn set_from_attachment_menu<'a>(
77858        &'a mut self,
77859        from_attachment_menu: Option<bool>,
77860    ) -> &'a mut Self {
77861        self.from_attachment_menu = from_attachment_menu;
77862        self
77863    }
77864    #[allow(rustdoc::invalid_html_tags)]
77865    #[doc = "Optional. True, if the access was granted when the bot was added to the attachment or side menu"]
77866    fn rhai_get_from_attachment_menu(&mut self) -> Option<bool> {
77867        self.from_attachment_menu.as_ref().copied()
77868    }
77869}
77870#[allow(dead_code)]
77871impl TransactionPartnerTelegramApi {
77872    #[allow(clippy::too_many_arguments)]
77873    pub fn new(request_count: i64) -> Self {
77874        Self {
77875            tg_type: "TransactionPartnerTelegramApi".to_owned(),
77876            request_count,
77877        }
77878    }
77879    #[allow(rustdoc::invalid_html_tags)]
77880    #[doc = "Type of the transaction partner, always \"telegram_api\""]
77881    #[allow(clippy::needless_lifetimes)]
77882    pub fn get_tg_type<'a>(&'a self) -> &'a str {
77883        self.tg_type.as_str()
77884    }
77885    #[allow(rustdoc::invalid_html_tags)]
77886    #[doc = "Type of the transaction partner, always \"telegram_api\""]
77887    #[allow(clippy::needless_lifetimes)]
77888    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
77889        self.tg_type = tg_type;
77890        self
77891    }
77892    #[allow(rustdoc::invalid_html_tags)]
77893    #[doc = "Type of the transaction partner, always \"telegram_api\""]
77894    fn rhai_get_tg_type(&mut self) -> String {
77895        self.tg_type.clone()
77896    }
77897    #[allow(rustdoc::invalid_html_tags)]
77898    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
77899    #[allow(clippy::needless_lifetimes)]
77900    pub fn get_request_count<'a>(&'a self) -> i64 {
77901        self.request_count
77902    }
77903    #[allow(rustdoc::invalid_html_tags)]
77904    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
77905    #[allow(clippy::needless_lifetimes)]
77906    pub fn set_request_count<'a>(&'a mut self, request_count: i64) -> &'a mut Self {
77907        self.request_count = request_count;
77908        self
77909    }
77910    #[allow(rustdoc::invalid_html_tags)]
77911    #[doc = "The number of successful requests that exceeded regular limits and were therefore billed"]
77912    fn rhai_get_request_count(&mut self) -> i64 {
77913        self.request_count
77914    }
77915}
77916#[allow(dead_code)]
77917impl ProximityAlertTriggered {
77918    #[allow(clippy::too_many_arguments)]
77919    pub fn new<A: Into<User>, B: Into<User>>(traveler: A, watcher: B, distance: i64) -> Self {
77920        Self {
77921            traveler: BoxWrapper::new_unbox(traveler.into()),
77922            watcher: BoxWrapper::new_unbox(watcher.into()),
77923            distance,
77924        }
77925    }
77926    #[allow(rustdoc::invalid_html_tags)]
77927    #[doc = "User that triggered the alert"]
77928    #[allow(clippy::needless_lifetimes)]
77929    pub fn get_traveler<'a>(&'a self) -> &'a User {
77930        &self.traveler
77931    }
77932    #[allow(rustdoc::invalid_html_tags)]
77933    #[doc = "User that triggered the alert"]
77934    #[allow(clippy::needless_lifetimes)]
77935    pub fn set_traveler<'a>(&'a mut self, traveler: User) -> &'a mut Self {
77936        self.traveler = BoxWrapper(Unbox(traveler));
77937        self
77938    }
77939    #[allow(rustdoc::invalid_html_tags)]
77940    #[doc = "User that triggered the alert"]
77941    fn rhai_get_traveler(&mut self) -> User {
77942        self.traveler.clone().into()
77943    }
77944    #[allow(rustdoc::invalid_html_tags)]
77945    #[doc = "User that set the alert"]
77946    #[allow(clippy::needless_lifetimes)]
77947    pub fn get_watcher<'a>(&'a self) -> &'a User {
77948        &self.watcher
77949    }
77950    #[allow(rustdoc::invalid_html_tags)]
77951    #[doc = "User that set the alert"]
77952    #[allow(clippy::needless_lifetimes)]
77953    pub fn set_watcher<'a>(&'a mut self, watcher: User) -> &'a mut Self {
77954        self.watcher = BoxWrapper(Unbox(watcher));
77955        self
77956    }
77957    #[allow(rustdoc::invalid_html_tags)]
77958    #[doc = "User that set the alert"]
77959    fn rhai_get_watcher(&mut self) -> User {
77960        self.watcher.clone().into()
77961    }
77962    #[allow(rustdoc::invalid_html_tags)]
77963    #[doc = "The distance between the users"]
77964    #[allow(clippy::needless_lifetimes)]
77965    pub fn get_distance<'a>(&'a self) -> i64 {
77966        self.distance
77967    }
77968    #[allow(rustdoc::invalid_html_tags)]
77969    #[doc = "The distance between the users"]
77970    #[allow(clippy::needless_lifetimes)]
77971    pub fn set_distance<'a>(&'a mut self, distance: i64) -> &'a mut Self {
77972        self.distance = distance;
77973        self
77974    }
77975    #[allow(rustdoc::invalid_html_tags)]
77976    #[doc = "The distance between the users"]
77977    fn rhai_get_distance(&mut self) -> i64 {
77978        self.distance
77979    }
77980}
77981#[allow(dead_code)]
77982impl InlineQueryResultAudio {
77983    #[allow(clippy::too_many_arguments)]
77984    pub fn new(id: String, audio_url: String, title: String) -> Self {
77985        Self {
77986            tg_type: "audio".to_owned(),
77987            id,
77988            audio_url,
77989            title,
77990            caption: None,
77991            parse_mode: None,
77992            caption_entities: None,
77993            performer: None,
77994            audio_duration: None,
77995            reply_markup: None,
77996            input_message_content: None,
77997        }
77998    }
77999    #[allow(rustdoc::invalid_html_tags)]
78000    #[doc = "Type of the result, must be audio"]
78001    #[allow(clippy::needless_lifetimes)]
78002    pub fn get_tg_type<'a>(&'a self) -> &'a str {
78003        self.tg_type.as_str()
78004    }
78005    #[allow(rustdoc::invalid_html_tags)]
78006    #[doc = "Type of the result, must be audio"]
78007    #[allow(clippy::needless_lifetimes)]
78008    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
78009        self.tg_type = tg_type;
78010        self
78011    }
78012    #[allow(rustdoc::invalid_html_tags)]
78013    #[doc = "Type of the result, must be audio"]
78014    fn rhai_get_tg_type(&mut self) -> String {
78015        self.tg_type.clone()
78016    }
78017    #[allow(rustdoc::invalid_html_tags)]
78018    #[doc = "Unique identifier for this result, 1-64 bytes"]
78019    #[allow(clippy::needless_lifetimes)]
78020    pub fn get_id<'a>(&'a self) -> &'a str {
78021        self.id.as_str()
78022    }
78023    #[allow(rustdoc::invalid_html_tags)]
78024    #[doc = "Unique identifier for this result, 1-64 bytes"]
78025    #[allow(clippy::needless_lifetimes)]
78026    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
78027        self.id = id;
78028        self
78029    }
78030    #[allow(rustdoc::invalid_html_tags)]
78031    #[doc = "Unique identifier for this result, 1-64 bytes"]
78032    fn rhai_get_id(&mut self) -> String {
78033        self.id.clone()
78034    }
78035    #[allow(rustdoc::invalid_html_tags)]
78036    #[doc = "A valid URL for the audio file"]
78037    #[allow(clippy::needless_lifetimes)]
78038    pub fn get_audio_url<'a>(&'a self) -> &'a str {
78039        self.audio_url.as_str()
78040    }
78041    #[allow(rustdoc::invalid_html_tags)]
78042    #[doc = "A valid URL for the audio file"]
78043    #[allow(clippy::needless_lifetimes)]
78044    pub fn set_audio_url<'a>(&'a mut self, audio_url: String) -> &'a mut Self {
78045        self.audio_url = audio_url;
78046        self
78047    }
78048    #[allow(rustdoc::invalid_html_tags)]
78049    #[doc = "A valid URL for the audio file"]
78050    fn rhai_get_audio_url(&mut self) -> String {
78051        self.audio_url.clone()
78052    }
78053    #[allow(rustdoc::invalid_html_tags)]
78054    #[doc = "Title"]
78055    #[allow(clippy::needless_lifetimes)]
78056    pub fn get_title<'a>(&'a self) -> &'a str {
78057        self.title.as_str()
78058    }
78059    #[allow(rustdoc::invalid_html_tags)]
78060    #[doc = "Title"]
78061    #[allow(clippy::needless_lifetimes)]
78062    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
78063        self.title = title;
78064        self
78065    }
78066    #[allow(rustdoc::invalid_html_tags)]
78067    #[doc = "Title"]
78068    fn rhai_get_title(&mut self) -> String {
78069        self.title.clone()
78070    }
78071    #[allow(rustdoc::invalid_html_tags)]
78072    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
78073    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78074    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
78075        self.caption.as_ref().map(|v| v.as_str())
78076    }
78077    #[allow(rustdoc::invalid_html_tags)]
78078    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
78079    #[allow(clippy::needless_lifetimes)]
78080    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
78081        self.caption = caption;
78082        self
78083    }
78084    #[allow(rustdoc::invalid_html_tags)]
78085    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
78086    fn rhai_get_caption(&mut self) -> Option<String> {
78087        self.caption.as_ref().cloned()
78088    }
78089    #[allow(rustdoc::invalid_html_tags)]
78090    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
78091    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78092    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
78093        self.parse_mode.as_ref().map(|v| v.as_str())
78094    }
78095    #[allow(rustdoc::invalid_html_tags)]
78096    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
78097    #[allow(clippy::needless_lifetimes)]
78098    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
78099        self.parse_mode = parse_mode;
78100        self
78101    }
78102    #[allow(rustdoc::invalid_html_tags)]
78103    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
78104    fn rhai_get_parse_mode(&mut self) -> Option<String> {
78105        self.parse_mode.as_ref().cloned()
78106    }
78107    #[allow(rustdoc::invalid_html_tags)]
78108    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
78109    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78110    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
78111        self.caption_entities.as_ref()
78112    }
78113    #[allow(rustdoc::invalid_html_tags)]
78114    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
78115    #[allow(clippy::needless_lifetimes)]
78116    pub fn set_caption_entities<'a>(
78117        &'a mut self,
78118        caption_entities: Option<Vec<MessageEntity>>,
78119    ) -> &'a mut Self {
78120        self.caption_entities = caption_entities;
78121        self
78122    }
78123    #[allow(rustdoc::invalid_html_tags)]
78124    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
78125    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
78126        self.caption_entities.as_ref().cloned()
78127    }
78128    #[allow(rustdoc::invalid_html_tags)]
78129    #[doc = "Optional. Performer"]
78130    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78131    pub fn get_performer<'a>(&'a self) -> Option<&'a str> {
78132        self.performer.as_ref().map(|v| v.as_str())
78133    }
78134    #[allow(rustdoc::invalid_html_tags)]
78135    #[doc = "Optional. Performer"]
78136    #[allow(clippy::needless_lifetimes)]
78137    pub fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self {
78138        self.performer = performer;
78139        self
78140    }
78141    #[allow(rustdoc::invalid_html_tags)]
78142    #[doc = "Optional. Performer"]
78143    fn rhai_get_performer(&mut self) -> Option<String> {
78144        self.performer.as_ref().cloned()
78145    }
78146    #[allow(rustdoc::invalid_html_tags)]
78147    #[doc = "Optional. Audio duration in seconds"]
78148    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78149    pub fn get_audio_duration<'a>(&'a self) -> Option<i64> {
78150        self.audio_duration.as_ref().map(|v| *v)
78151    }
78152    #[allow(rustdoc::invalid_html_tags)]
78153    #[doc = "Optional. Audio duration in seconds"]
78154    #[allow(clippy::needless_lifetimes)]
78155    pub fn set_audio_duration<'a>(&'a mut self, audio_duration: Option<i64>) -> &'a mut Self {
78156        self.audio_duration = audio_duration;
78157        self
78158    }
78159    #[allow(rustdoc::invalid_html_tags)]
78160    #[doc = "Optional. Audio duration in seconds"]
78161    fn rhai_get_audio_duration(&mut self) -> Option<i64> {
78162        self.audio_duration.as_ref().copied()
78163    }
78164    #[allow(rustdoc::invalid_html_tags)]
78165    #[doc = "Optional. Inline keyboard attached to the message"]
78166    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78167    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
78168        self.reply_markup.as_ref().map(|v| v.inner_ref())
78169    }
78170    #[allow(rustdoc::invalid_html_tags)]
78171    #[doc = "Optional. Inline keyboard attached to the message"]
78172    #[allow(clippy::needless_lifetimes)]
78173    pub fn set_reply_markup<'a>(
78174        &'a mut self,
78175        reply_markup: Option<InlineKeyboardMarkup>,
78176    ) -> &'a mut Self {
78177        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
78178        self
78179    }
78180    #[allow(rustdoc::invalid_html_tags)]
78181    #[doc = "Optional. Inline keyboard attached to the message"]
78182    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
78183        self.reply_markup.as_ref().map(|v| v.clone().into())
78184    }
78185    #[allow(rustdoc::invalid_html_tags)]
78186    #[doc = "Optional. Content of the message to be sent instead of the audio"]
78187    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78188    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
78189        self.input_message_content.as_ref().map(|v| v.inner_ref())
78190    }
78191    #[allow(rustdoc::invalid_html_tags)]
78192    #[doc = "Optional. Content of the message to be sent instead of the audio"]
78193    #[allow(clippy::needless_lifetimes)]
78194    pub fn set_input_message_content<'a>(
78195        &'a mut self,
78196        input_message_content: Option<InputMessageContent>,
78197    ) -> &'a mut Self {
78198        self.input_message_content = input_message_content
78199            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
78200        self
78201    }
78202    #[allow(rustdoc::invalid_html_tags)]
78203    #[doc = "Optional. Content of the message to be sent instead of the audio"]
78204    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
78205        self.input_message_content
78206            .as_ref()
78207            .map(|v| v.clone().into())
78208    }
78209}
78210#[allow(dead_code)]
78211impl Message {
78212    #[allow(clippy::too_many_arguments)]
78213    pub fn new<A: Into<Chat>>(message_id: i64, date: i64, chat: A) -> Self {
78214        Self {
78215            message_id,
78216            date,
78217            chat: BoxWrapper::new_unbox(chat.into()),
78218            message_thread_id: None,
78219            direct_messages_topic: None,
78220            from: None,
78221            sender_chat: None,
78222            sender_boost_count: None,
78223            sender_business_bot: None,
78224            business_connection_id: None,
78225            forward_origin: None,
78226            is_topic_message: None,
78227            is_automatic_forward: None,
78228            reply_to_message: None,
78229            external_reply: None,
78230            quote: None,
78231            reply_to_story: None,
78232            reply_to_checklist_task_id: None,
78233            via_bot: None,
78234            edit_date: None,
78235            has_protected_content: None,
78236            is_from_offline: None,
78237            is_paid_post: None,
78238            media_group_id: None,
78239            author_signature: None,
78240            paid_star_count: None,
78241            text: None,
78242            entities: None,
78243            link_preview_options: None,
78244            suggested_post_info: None,
78245            effect_id: None,
78246            animation: None,
78247            audio: None,
78248            document: None,
78249            paid_media: None,
78250            photo: None,
78251            sticker: None,
78252            story: None,
78253            video: None,
78254            video_note: None,
78255            voice: None,
78256            caption: None,
78257            caption_entities: None,
78258            show_caption_above_media: None,
78259            has_media_spoiler: None,
78260            checklist: None,
78261            contact: None,
78262            dice: None,
78263            game: None,
78264            poll: None,
78265            venue: None,
78266            location: None,
78267            new_chat_members: None,
78268            left_chat_member: None,
78269            new_chat_title: None,
78270            new_chat_photo: None,
78271            delete_chat_photo: None,
78272            group_chat_created: None,
78273            supergroup_chat_created: None,
78274            channel_chat_created: None,
78275            message_auto_delete_timer_changed: None,
78276            migrate_to_chat_id: None,
78277            migrate_from_chat_id: None,
78278            pinned_message: None,
78279            invoice: None,
78280            successful_payment: None,
78281            refunded_payment: None,
78282            users_shared: None,
78283            chat_shared: None,
78284            gift: None,
78285            unique_gift: None,
78286            connected_website: None,
78287            write_access_allowed: None,
78288            passport_data: None,
78289            proximity_alert_triggered: None,
78290            boost_added: None,
78291            chat_background_set: None,
78292            checklist_tasks_done: None,
78293            checklist_tasks_added: None,
78294            direct_message_price_changed: None,
78295            forum_topic_created: None,
78296            forum_topic_edited: None,
78297            forum_topic_closed: None,
78298            forum_topic_reopened: None,
78299            general_forum_topic_hidden: None,
78300            general_forum_topic_unhidden: None,
78301            giveaway_created: None,
78302            giveaway: None,
78303            giveaway_winners: None,
78304            giveaway_completed: None,
78305            paid_message_price_changed: None,
78306            suggested_post_approved: None,
78307            suggested_post_approval_failed: None,
78308            suggested_post_declined: None,
78309            suggested_post_paid: None,
78310            suggested_post_refunded: None,
78311            video_chat_scheduled: None,
78312            video_chat_started: None,
78313            video_chat_ended: None,
78314            video_chat_participants_invited: None,
78315            web_app_data: None,
78316            reply_markup: None,
78317        }
78318    }
78319    #[allow(rustdoc::invalid_html_tags)]
78320    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
78321    #[allow(clippy::needless_lifetimes)]
78322    pub fn get_message_id<'a>(&'a self) -> i64 {
78323        self.message_id
78324    }
78325    #[allow(rustdoc::invalid_html_tags)]
78326    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
78327    #[allow(clippy::needless_lifetimes)]
78328    pub fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
78329        self.message_id = message_id;
78330        self
78331    }
78332    #[allow(rustdoc::invalid_html_tags)]
78333    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
78334    fn rhai_get_message_id(&mut self) -> i64 {
78335        self.message_id
78336    }
78337    #[allow(rustdoc::invalid_html_tags)]
78338    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
78339    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78340    pub fn get_message_thread_id<'a>(&'a self) -> Option<i64> {
78341        self.message_thread_id.as_ref().map(|v| *v)
78342    }
78343    #[allow(rustdoc::invalid_html_tags)]
78344    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
78345    #[allow(clippy::needless_lifetimes)]
78346    pub fn set_message_thread_id<'a>(&'a mut self, message_thread_id: Option<i64>) -> &'a mut Self {
78347        self.message_thread_id = message_thread_id;
78348        self
78349    }
78350    #[allow(rustdoc::invalid_html_tags)]
78351    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
78352    fn rhai_get_message_thread_id(&mut self) -> Option<i64> {
78353        self.message_thread_id.as_ref().copied()
78354    }
78355    #[allow(rustdoc::invalid_html_tags)]
78356    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
78357    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78358    pub fn get_direct_messages_topic<'a>(&'a self) -> Option<&'a DirectMessagesTopic> {
78359        self.direct_messages_topic.as_ref().map(|v| v.inner_ref())
78360    }
78361    #[allow(rustdoc::invalid_html_tags)]
78362    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
78363    #[allow(clippy::needless_lifetimes)]
78364    pub fn set_direct_messages_topic<'a>(
78365        &'a mut self,
78366        direct_messages_topic: Option<DirectMessagesTopic>,
78367    ) -> &'a mut Self {
78368        self.direct_messages_topic = direct_messages_topic
78369            .map(|direct_messages_topic| BoxWrapper(Unbox(direct_messages_topic)));
78370        self
78371    }
78372    #[allow(rustdoc::invalid_html_tags)]
78373    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
78374    fn rhai_get_direct_messages_topic(&mut self) -> Option<DirectMessagesTopic> {
78375        self.direct_messages_topic
78376            .as_ref()
78377            .map(|v| v.clone().into())
78378    }
78379    #[allow(rustdoc::invalid_html_tags)]
78380    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
78381    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78382    pub fn get_from<'a>(&'a self) -> Option<&'a User> {
78383        self.from.as_ref().map(|v| v.inner_ref())
78384    }
78385    #[allow(rustdoc::invalid_html_tags)]
78386    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
78387    #[allow(clippy::needless_lifetimes)]
78388    pub fn set_from<'a>(&'a mut self, from: Option<User>) -> &'a mut Self {
78389        self.from = from.map(|from| BoxWrapper(Unbox(from)));
78390        self
78391    }
78392    #[allow(rustdoc::invalid_html_tags)]
78393    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
78394    fn rhai_get_from(&mut self) -> Option<User> {
78395        self.from.as_ref().map(|v| v.clone().into())
78396    }
78397    #[allow(rustdoc::invalid_html_tags)]
78398    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
78399    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78400    pub fn get_sender_chat<'a>(&'a self) -> Option<&'a Chat> {
78401        self.sender_chat.as_ref().map(|v| v.inner_ref())
78402    }
78403    #[allow(rustdoc::invalid_html_tags)]
78404    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
78405    #[allow(clippy::needless_lifetimes)]
78406    pub fn set_sender_chat<'a>(&'a mut self, sender_chat: Option<Chat>) -> &'a mut Self {
78407        self.sender_chat = sender_chat.map(|sender_chat| BoxWrapper(Unbox(sender_chat)));
78408        self
78409    }
78410    #[allow(rustdoc::invalid_html_tags)]
78411    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
78412    fn rhai_get_sender_chat(&mut self) -> Option<Chat> {
78413        self.sender_chat.as_ref().map(|v| v.clone().into())
78414    }
78415    #[allow(rustdoc::invalid_html_tags)]
78416    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
78417    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78418    pub fn get_sender_boost_count<'a>(&'a self) -> Option<i64> {
78419        self.sender_boost_count.as_ref().map(|v| *v)
78420    }
78421    #[allow(rustdoc::invalid_html_tags)]
78422    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
78423    #[allow(clippy::needless_lifetimes)]
78424    pub fn set_sender_boost_count<'a>(
78425        &'a mut self,
78426        sender_boost_count: Option<i64>,
78427    ) -> &'a mut Self {
78428        self.sender_boost_count = sender_boost_count;
78429        self
78430    }
78431    #[allow(rustdoc::invalid_html_tags)]
78432    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
78433    fn rhai_get_sender_boost_count(&mut self) -> Option<i64> {
78434        self.sender_boost_count.as_ref().copied()
78435    }
78436    #[allow(rustdoc::invalid_html_tags)]
78437    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
78438    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78439    pub fn get_sender_business_bot<'a>(&'a self) -> Option<&'a User> {
78440        self.sender_business_bot.as_ref().map(|v| v.inner_ref())
78441    }
78442    #[allow(rustdoc::invalid_html_tags)]
78443    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
78444    #[allow(clippy::needless_lifetimes)]
78445    pub fn set_sender_business_bot<'a>(
78446        &'a mut self,
78447        sender_business_bot: Option<User>,
78448    ) -> &'a mut Self {
78449        self.sender_business_bot =
78450            sender_business_bot.map(|sender_business_bot| BoxWrapper(Unbox(sender_business_bot)));
78451        self
78452    }
78453    #[allow(rustdoc::invalid_html_tags)]
78454    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
78455    fn rhai_get_sender_business_bot(&mut self) -> Option<User> {
78456        self.sender_business_bot.as_ref().map(|v| v.clone().into())
78457    }
78458    #[allow(rustdoc::invalid_html_tags)]
78459    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
78460    #[allow(clippy::needless_lifetimes)]
78461    pub fn get_date<'a>(&'a self) -> i64 {
78462        self.date
78463    }
78464    #[allow(rustdoc::invalid_html_tags)]
78465    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
78466    #[allow(clippy::needless_lifetimes)]
78467    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
78468        self.date = date;
78469        self
78470    }
78471    #[allow(rustdoc::invalid_html_tags)]
78472    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
78473    fn rhai_get_date(&mut self) -> i64 {
78474        self.date
78475    }
78476    #[allow(rustdoc::invalid_html_tags)]
78477    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
78478    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78479    pub fn get_business_connection_id<'a>(&'a self) -> Option<&'a str> {
78480        self.business_connection_id.as_ref().map(|v| v.as_str())
78481    }
78482    #[allow(rustdoc::invalid_html_tags)]
78483    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
78484    #[allow(clippy::needless_lifetimes)]
78485    pub fn set_business_connection_id<'a>(
78486        &'a mut self,
78487        business_connection_id: Option<String>,
78488    ) -> &'a mut Self {
78489        self.business_connection_id = business_connection_id;
78490        self
78491    }
78492    #[allow(rustdoc::invalid_html_tags)]
78493    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
78494    fn rhai_get_business_connection_id(&mut self) -> Option<String> {
78495        self.business_connection_id.as_ref().cloned()
78496    }
78497    #[allow(rustdoc::invalid_html_tags)]
78498    #[doc = "Chat the message belongs to"]
78499    #[allow(clippy::needless_lifetimes)]
78500    pub fn get_chat<'a>(&'a self) -> &'a Chat {
78501        &self.chat
78502    }
78503    #[allow(rustdoc::invalid_html_tags)]
78504    #[doc = "Chat the message belongs to"]
78505    #[allow(clippy::needless_lifetimes)]
78506    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
78507        self.chat = BoxWrapper(Unbox(chat));
78508        self
78509    }
78510    #[allow(rustdoc::invalid_html_tags)]
78511    #[doc = "Chat the message belongs to"]
78512    fn rhai_get_chat(&mut self) -> Chat {
78513        self.chat.clone().into()
78514    }
78515    #[allow(rustdoc::invalid_html_tags)]
78516    #[doc = "Optional. Information about the original message for forwarded messages"]
78517    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78518    pub fn get_forward_origin<'a>(&'a self) -> Option<&'a MessageOrigin> {
78519        self.forward_origin.as_ref().map(|v| v.inner_ref())
78520    }
78521    #[allow(rustdoc::invalid_html_tags)]
78522    #[doc = "Optional. Information about the original message for forwarded messages"]
78523    #[allow(clippy::needless_lifetimes)]
78524    pub fn set_forward_origin<'a>(
78525        &'a mut self,
78526        forward_origin: Option<MessageOrigin>,
78527    ) -> &'a mut Self {
78528        self.forward_origin =
78529            forward_origin.map(|forward_origin| BoxWrapper(Unbox(forward_origin)));
78530        self
78531    }
78532    #[allow(rustdoc::invalid_html_tags)]
78533    #[doc = "Optional. Information about the original message for forwarded messages"]
78534    fn rhai_get_forward_origin(&mut self) -> Option<MessageOrigin> {
78535        self.forward_origin.as_ref().map(|v| v.clone().into())
78536    }
78537    #[allow(rustdoc::invalid_html_tags)]
78538    #[doc = "Optional. True, if the message is sent to a forum topic"]
78539    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78540    pub fn get_is_topic_message<'a>(&'a self) -> Option<bool> {
78541        self.is_topic_message.as_ref().map(|v| *v)
78542    }
78543    #[allow(rustdoc::invalid_html_tags)]
78544    #[doc = "Optional. True, if the message is sent to a forum topic"]
78545    #[allow(clippy::needless_lifetimes)]
78546    pub fn set_is_topic_message<'a>(&'a mut self, is_topic_message: Option<bool>) -> &'a mut Self {
78547        self.is_topic_message = is_topic_message;
78548        self
78549    }
78550    #[allow(rustdoc::invalid_html_tags)]
78551    #[doc = "Optional. True, if the message is sent to a forum topic"]
78552    fn rhai_get_is_topic_message(&mut self) -> Option<bool> {
78553        self.is_topic_message.as_ref().copied()
78554    }
78555    #[allow(rustdoc::invalid_html_tags)]
78556    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
78557    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78558    pub fn get_is_automatic_forward<'a>(&'a self) -> Option<bool> {
78559        self.is_automatic_forward.as_ref().map(|v| *v)
78560    }
78561    #[allow(rustdoc::invalid_html_tags)]
78562    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
78563    #[allow(clippy::needless_lifetimes)]
78564    pub fn set_is_automatic_forward<'a>(
78565        &'a mut self,
78566        is_automatic_forward: Option<bool>,
78567    ) -> &'a mut Self {
78568        self.is_automatic_forward = is_automatic_forward;
78569        self
78570    }
78571    #[allow(rustdoc::invalid_html_tags)]
78572    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
78573    fn rhai_get_is_automatic_forward(&mut self) -> Option<bool> {
78574        self.is_automatic_forward.as_ref().copied()
78575    }
78576    #[allow(rustdoc::invalid_html_tags)]
78577    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
78578    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78579    pub fn get_reply_to_message<'a>(&'a self) -> Option<&'a Message> {
78580        self.reply_to_message.as_ref().map(|v| v.inner_ref())
78581    }
78582    #[allow(rustdoc::invalid_html_tags)]
78583    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
78584    #[allow(clippy::needless_lifetimes)]
78585    pub fn set_reply_to_message<'a>(
78586        &'a mut self,
78587        reply_to_message: Option<Message>,
78588    ) -> &'a mut Self {
78589        self.reply_to_message =
78590            reply_to_message.map(|reply_to_message| BoxWrapper(Box::new(reply_to_message)));
78591        self
78592    }
78593    #[allow(rustdoc::invalid_html_tags)]
78594    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
78595    fn rhai_get_reply_to_message(&mut self) -> Option<Message> {
78596        self.reply_to_message.as_ref().map(|v| v.clone().into())
78597    }
78598    #[allow(rustdoc::invalid_html_tags)]
78599    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
78600    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78601    pub fn get_external_reply<'a>(&'a self) -> Option<&'a ExternalReplyInfo> {
78602        self.external_reply.as_ref().map(|v| v.inner_ref())
78603    }
78604    #[allow(rustdoc::invalid_html_tags)]
78605    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
78606    #[allow(clippy::needless_lifetimes)]
78607    pub fn set_external_reply<'a>(
78608        &'a mut self,
78609        external_reply: Option<ExternalReplyInfo>,
78610    ) -> &'a mut Self {
78611        self.external_reply =
78612            external_reply.map(|external_reply| BoxWrapper(Unbox(external_reply)));
78613        self
78614    }
78615    #[allow(rustdoc::invalid_html_tags)]
78616    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
78617    fn rhai_get_external_reply(&mut self) -> Option<ExternalReplyInfo> {
78618        self.external_reply.as_ref().map(|v| v.clone().into())
78619    }
78620    #[allow(rustdoc::invalid_html_tags)]
78621    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
78622    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78623    pub fn get_quote<'a>(&'a self) -> Option<&'a TextQuote> {
78624        self.quote.as_ref().map(|v| v.inner_ref())
78625    }
78626    #[allow(rustdoc::invalid_html_tags)]
78627    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
78628    #[allow(clippy::needless_lifetimes)]
78629    pub fn set_quote<'a>(&'a mut self, quote: Option<TextQuote>) -> &'a mut Self {
78630        self.quote = quote.map(|quote| BoxWrapper(Unbox(quote)));
78631        self
78632    }
78633    #[allow(rustdoc::invalid_html_tags)]
78634    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
78635    fn rhai_get_quote(&mut self) -> Option<TextQuote> {
78636        self.quote.as_ref().map(|v| v.clone().into())
78637    }
78638    #[allow(rustdoc::invalid_html_tags)]
78639    #[doc = "Optional. For replies to a story, the original story"]
78640    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78641    pub fn get_reply_to_story<'a>(&'a self) -> Option<&'a Story> {
78642        self.reply_to_story.as_ref().map(|v| v.inner_ref())
78643    }
78644    #[allow(rustdoc::invalid_html_tags)]
78645    #[doc = "Optional. For replies to a story, the original story"]
78646    #[allow(clippy::needless_lifetimes)]
78647    pub fn set_reply_to_story<'a>(&'a mut self, reply_to_story: Option<Story>) -> &'a mut Self {
78648        self.reply_to_story =
78649            reply_to_story.map(|reply_to_story| BoxWrapper(Unbox(reply_to_story)));
78650        self
78651    }
78652    #[allow(rustdoc::invalid_html_tags)]
78653    #[doc = "Optional. For replies to a story, the original story"]
78654    fn rhai_get_reply_to_story(&mut self) -> Option<Story> {
78655        self.reply_to_story.as_ref().map(|v| v.clone().into())
78656    }
78657    #[allow(rustdoc::invalid_html_tags)]
78658    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
78659    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78660    pub fn get_reply_to_checklist_task_id<'a>(&'a self) -> Option<i64> {
78661        self.reply_to_checklist_task_id.as_ref().map(|v| *v)
78662    }
78663    #[allow(rustdoc::invalid_html_tags)]
78664    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
78665    #[allow(clippy::needless_lifetimes)]
78666    pub fn set_reply_to_checklist_task_id<'a>(
78667        &'a mut self,
78668        reply_to_checklist_task_id: Option<i64>,
78669    ) -> &'a mut Self {
78670        self.reply_to_checklist_task_id = reply_to_checklist_task_id;
78671        self
78672    }
78673    #[allow(rustdoc::invalid_html_tags)]
78674    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
78675    fn rhai_get_reply_to_checklist_task_id(&mut self) -> Option<i64> {
78676        self.reply_to_checklist_task_id.as_ref().copied()
78677    }
78678    #[allow(rustdoc::invalid_html_tags)]
78679    #[doc = "Optional. Bot through which the message was sent"]
78680    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78681    pub fn get_via_bot<'a>(&'a self) -> Option<&'a User> {
78682        self.via_bot.as_ref().map(|v| v.inner_ref())
78683    }
78684    #[allow(rustdoc::invalid_html_tags)]
78685    #[doc = "Optional. Bot through which the message was sent"]
78686    #[allow(clippy::needless_lifetimes)]
78687    pub fn set_via_bot<'a>(&'a mut self, via_bot: Option<User>) -> &'a mut Self {
78688        self.via_bot = via_bot.map(|via_bot| BoxWrapper(Unbox(via_bot)));
78689        self
78690    }
78691    #[allow(rustdoc::invalid_html_tags)]
78692    #[doc = "Optional. Bot through which the message was sent"]
78693    fn rhai_get_via_bot(&mut self) -> Option<User> {
78694        self.via_bot.as_ref().map(|v| v.clone().into())
78695    }
78696    #[allow(rustdoc::invalid_html_tags)]
78697    #[doc = "Optional. Date the message was last edited in Unix time"]
78698    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78699    pub fn get_edit_date<'a>(&'a self) -> Option<i64> {
78700        self.edit_date.as_ref().map(|v| *v)
78701    }
78702    #[allow(rustdoc::invalid_html_tags)]
78703    #[doc = "Optional. Date the message was last edited in Unix time"]
78704    #[allow(clippy::needless_lifetimes)]
78705    pub fn set_edit_date<'a>(&'a mut self, edit_date: Option<i64>) -> &'a mut Self {
78706        self.edit_date = edit_date;
78707        self
78708    }
78709    #[allow(rustdoc::invalid_html_tags)]
78710    #[doc = "Optional. Date the message was last edited in Unix time"]
78711    fn rhai_get_edit_date(&mut self) -> Option<i64> {
78712        self.edit_date.as_ref().copied()
78713    }
78714    #[allow(rustdoc::invalid_html_tags)]
78715    #[doc = "Optional. True, if the message can't be forwarded"]
78716    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78717    pub fn get_has_protected_content<'a>(&'a self) -> Option<bool> {
78718        self.has_protected_content.as_ref().map(|v| *v)
78719    }
78720    #[allow(rustdoc::invalid_html_tags)]
78721    #[doc = "Optional. True, if the message can't be forwarded"]
78722    #[allow(clippy::needless_lifetimes)]
78723    pub fn set_has_protected_content<'a>(
78724        &'a mut self,
78725        has_protected_content: Option<bool>,
78726    ) -> &'a mut Self {
78727        self.has_protected_content = has_protected_content;
78728        self
78729    }
78730    #[allow(rustdoc::invalid_html_tags)]
78731    #[doc = "Optional. True, if the message can't be forwarded"]
78732    fn rhai_get_has_protected_content(&mut self) -> Option<bool> {
78733        self.has_protected_content.as_ref().copied()
78734    }
78735    #[allow(rustdoc::invalid_html_tags)]
78736    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
78737    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78738    pub fn get_is_from_offline<'a>(&'a self) -> Option<bool> {
78739        self.is_from_offline.as_ref().map(|v| *v)
78740    }
78741    #[allow(rustdoc::invalid_html_tags)]
78742    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
78743    #[allow(clippy::needless_lifetimes)]
78744    pub fn set_is_from_offline<'a>(&'a mut self, is_from_offline: Option<bool>) -> &'a mut Self {
78745        self.is_from_offline = is_from_offline;
78746        self
78747    }
78748    #[allow(rustdoc::invalid_html_tags)]
78749    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
78750    fn rhai_get_is_from_offline(&mut self) -> Option<bool> {
78751        self.is_from_offline.as_ref().copied()
78752    }
78753    #[allow(rustdoc::invalid_html_tags)]
78754    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
78755    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78756    pub fn get_is_paid_post<'a>(&'a self) -> Option<bool> {
78757        self.is_paid_post.as_ref().map(|v| *v)
78758    }
78759    #[allow(rustdoc::invalid_html_tags)]
78760    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
78761    #[allow(clippy::needless_lifetimes)]
78762    pub fn set_is_paid_post<'a>(&'a mut self, is_paid_post: Option<bool>) -> &'a mut Self {
78763        self.is_paid_post = is_paid_post;
78764        self
78765    }
78766    #[allow(rustdoc::invalid_html_tags)]
78767    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
78768    fn rhai_get_is_paid_post(&mut self) -> Option<bool> {
78769        self.is_paid_post.as_ref().copied()
78770    }
78771    #[allow(rustdoc::invalid_html_tags)]
78772    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
78773    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78774    pub fn get_media_group_id<'a>(&'a self) -> Option<&'a str> {
78775        self.media_group_id.as_ref().map(|v| v.as_str())
78776    }
78777    #[allow(rustdoc::invalid_html_tags)]
78778    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
78779    #[allow(clippy::needless_lifetimes)]
78780    pub fn set_media_group_id<'a>(&'a mut self, media_group_id: Option<String>) -> &'a mut Self {
78781        self.media_group_id = media_group_id;
78782        self
78783    }
78784    #[allow(rustdoc::invalid_html_tags)]
78785    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
78786    fn rhai_get_media_group_id(&mut self) -> Option<String> {
78787        self.media_group_id.as_ref().cloned()
78788    }
78789    #[allow(rustdoc::invalid_html_tags)]
78790    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
78791    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78792    pub fn get_author_signature<'a>(&'a self) -> Option<&'a str> {
78793        self.author_signature.as_ref().map(|v| v.as_str())
78794    }
78795    #[allow(rustdoc::invalid_html_tags)]
78796    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
78797    #[allow(clippy::needless_lifetimes)]
78798    pub fn set_author_signature<'a>(
78799        &'a mut self,
78800        author_signature: Option<String>,
78801    ) -> &'a mut Self {
78802        self.author_signature = author_signature;
78803        self
78804    }
78805    #[allow(rustdoc::invalid_html_tags)]
78806    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
78807    fn rhai_get_author_signature(&mut self) -> Option<String> {
78808        self.author_signature.as_ref().cloned()
78809    }
78810    #[allow(rustdoc::invalid_html_tags)]
78811    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
78812    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78813    pub fn get_paid_star_count<'a>(&'a self) -> Option<i64> {
78814        self.paid_star_count.as_ref().map(|v| *v)
78815    }
78816    #[allow(rustdoc::invalid_html_tags)]
78817    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
78818    #[allow(clippy::needless_lifetimes)]
78819    pub fn set_paid_star_count<'a>(&'a mut self, paid_star_count: Option<i64>) -> &'a mut Self {
78820        self.paid_star_count = paid_star_count;
78821        self
78822    }
78823    #[allow(rustdoc::invalid_html_tags)]
78824    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
78825    fn rhai_get_paid_star_count(&mut self) -> Option<i64> {
78826        self.paid_star_count.as_ref().copied()
78827    }
78828    #[allow(rustdoc::invalid_html_tags)]
78829    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
78830    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78831    pub fn get_text<'a>(&'a self) -> Option<&'a str> {
78832        self.text.as_ref().map(|v| v.as_str())
78833    }
78834    #[allow(rustdoc::invalid_html_tags)]
78835    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
78836    #[allow(clippy::needless_lifetimes)]
78837    pub fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self {
78838        self.text = text;
78839        self
78840    }
78841    #[allow(rustdoc::invalid_html_tags)]
78842    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
78843    fn rhai_get_text(&mut self) -> Option<String> {
78844        self.text.as_ref().cloned()
78845    }
78846    #[allow(rustdoc::invalid_html_tags)]
78847    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
78848    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78849    pub fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
78850        self.entities.as_ref()
78851    }
78852    #[allow(rustdoc::invalid_html_tags)]
78853    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
78854    #[allow(clippy::needless_lifetimes)]
78855    pub fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
78856        self.entities = entities;
78857        self
78858    }
78859    #[allow(rustdoc::invalid_html_tags)]
78860    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
78861    fn rhai_get_entities(&mut self) -> Option<Vec<MessageEntity>> {
78862        self.entities.as_ref().cloned()
78863    }
78864    #[allow(rustdoc::invalid_html_tags)]
78865    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
78866    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78867    pub fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions> {
78868        self.link_preview_options.as_ref().map(|v| v.inner_ref())
78869    }
78870    #[allow(rustdoc::invalid_html_tags)]
78871    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
78872    #[allow(clippy::needless_lifetimes)]
78873    pub fn set_link_preview_options<'a>(
78874        &'a mut self,
78875        link_preview_options: Option<LinkPreviewOptions>,
78876    ) -> &'a mut Self {
78877        self.link_preview_options = link_preview_options
78878            .map(|link_preview_options| BoxWrapper(Unbox(link_preview_options)));
78879        self
78880    }
78881    #[allow(rustdoc::invalid_html_tags)]
78882    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
78883    fn rhai_get_link_preview_options(&mut self) -> Option<LinkPreviewOptions> {
78884        self.link_preview_options.as_ref().map(|v| v.clone().into())
78885    }
78886    #[allow(rustdoc::invalid_html_tags)]
78887    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
78888    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78889    pub fn get_suggested_post_info<'a>(&'a self) -> Option<&'a SuggestedPostInfo> {
78890        self.suggested_post_info.as_ref().map(|v| v.inner_ref())
78891    }
78892    #[allow(rustdoc::invalid_html_tags)]
78893    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
78894    #[allow(clippy::needless_lifetimes)]
78895    pub fn set_suggested_post_info<'a>(
78896        &'a mut self,
78897        suggested_post_info: Option<SuggestedPostInfo>,
78898    ) -> &'a mut Self {
78899        self.suggested_post_info =
78900            suggested_post_info.map(|suggested_post_info| BoxWrapper(Unbox(suggested_post_info)));
78901        self
78902    }
78903    #[allow(rustdoc::invalid_html_tags)]
78904    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
78905    fn rhai_get_suggested_post_info(&mut self) -> Option<SuggestedPostInfo> {
78906        self.suggested_post_info.as_ref().map(|v| v.clone().into())
78907    }
78908    #[allow(rustdoc::invalid_html_tags)]
78909    #[doc = "Optional. Unique identifier of the message effect added to the message"]
78910    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78911    pub fn get_effect_id<'a>(&'a self) -> Option<&'a str> {
78912        self.effect_id.as_ref().map(|v| v.as_str())
78913    }
78914    #[allow(rustdoc::invalid_html_tags)]
78915    #[doc = "Optional. Unique identifier of the message effect added to the message"]
78916    #[allow(clippy::needless_lifetimes)]
78917    pub fn set_effect_id<'a>(&'a mut self, effect_id: Option<String>) -> &'a mut Self {
78918        self.effect_id = effect_id;
78919        self
78920    }
78921    #[allow(rustdoc::invalid_html_tags)]
78922    #[doc = "Optional. Unique identifier of the message effect added to the message"]
78923    fn rhai_get_effect_id(&mut self) -> Option<String> {
78924        self.effect_id.as_ref().cloned()
78925    }
78926    #[allow(rustdoc::invalid_html_tags)]
78927    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
78928    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78929    pub fn get_animation<'a>(&'a self) -> Option<&'a Animation> {
78930        self.animation.as_ref().map(|v| v.inner_ref())
78931    }
78932    #[allow(rustdoc::invalid_html_tags)]
78933    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
78934    #[allow(clippy::needless_lifetimes)]
78935    pub fn set_animation<'a>(&'a mut self, animation: Option<Animation>) -> &'a mut Self {
78936        self.animation = animation.map(|animation| BoxWrapper(Unbox(animation)));
78937        self
78938    }
78939    #[allow(rustdoc::invalid_html_tags)]
78940    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
78941    fn rhai_get_animation(&mut self) -> Option<Animation> {
78942        self.animation.as_ref().map(|v| v.clone().into())
78943    }
78944    #[allow(rustdoc::invalid_html_tags)]
78945    #[doc = "Optional. Message is an audio file, information about the file"]
78946    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78947    pub fn get_audio<'a>(&'a self) -> Option<&'a Audio> {
78948        self.audio.as_ref().map(|v| v.inner_ref())
78949    }
78950    #[allow(rustdoc::invalid_html_tags)]
78951    #[doc = "Optional. Message is an audio file, information about the file"]
78952    #[allow(clippy::needless_lifetimes)]
78953    pub fn set_audio<'a>(&'a mut self, audio: Option<Audio>) -> &'a mut Self {
78954        self.audio = audio.map(|audio| BoxWrapper(Unbox(audio)));
78955        self
78956    }
78957    #[allow(rustdoc::invalid_html_tags)]
78958    #[doc = "Optional. Message is an audio file, information about the file"]
78959    fn rhai_get_audio(&mut self) -> Option<Audio> {
78960        self.audio.as_ref().map(|v| v.clone().into())
78961    }
78962    #[allow(rustdoc::invalid_html_tags)]
78963    #[doc = "Optional. Message is a general file, information about the file"]
78964    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78965    pub fn get_document<'a>(&'a self) -> Option<&'a Document> {
78966        self.document.as_ref().map(|v| v.inner_ref())
78967    }
78968    #[allow(rustdoc::invalid_html_tags)]
78969    #[doc = "Optional. Message is a general file, information about the file"]
78970    #[allow(clippy::needless_lifetimes)]
78971    pub fn set_document<'a>(&'a mut self, document: Option<Document>) -> &'a mut Self {
78972        self.document = document.map(|document| BoxWrapper(Unbox(document)));
78973        self
78974    }
78975    #[allow(rustdoc::invalid_html_tags)]
78976    #[doc = "Optional. Message is a general file, information about the file"]
78977    fn rhai_get_document(&mut self) -> Option<Document> {
78978        self.document.as_ref().map(|v| v.clone().into())
78979    }
78980    #[allow(rustdoc::invalid_html_tags)]
78981    #[doc = "Optional. Message contains paid media; information about the paid media"]
78982    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
78983    pub fn get_paid_media<'a>(&'a self) -> Option<&'a PaidMediaInfo> {
78984        self.paid_media.as_ref().map(|v| v.inner_ref())
78985    }
78986    #[allow(rustdoc::invalid_html_tags)]
78987    #[doc = "Optional. Message contains paid media; information about the paid media"]
78988    #[allow(clippy::needless_lifetimes)]
78989    pub fn set_paid_media<'a>(&'a mut self, paid_media: Option<PaidMediaInfo>) -> &'a mut Self {
78990        self.paid_media = paid_media.map(|paid_media| BoxWrapper(Unbox(paid_media)));
78991        self
78992    }
78993    #[allow(rustdoc::invalid_html_tags)]
78994    #[doc = "Optional. Message contains paid media; information about the paid media"]
78995    fn rhai_get_paid_media(&mut self) -> Option<PaidMediaInfo> {
78996        self.paid_media.as_ref().map(|v| v.clone().into())
78997    }
78998    #[allow(rustdoc::invalid_html_tags)]
78999    #[doc = "Optional. Message is a photo, available sizes of the photo"]
79000    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79001    pub fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
79002        self.photo.as_ref()
79003    }
79004    #[allow(rustdoc::invalid_html_tags)]
79005    #[doc = "Optional. Message is a photo, available sizes of the photo"]
79006    #[allow(clippy::needless_lifetimes)]
79007    pub fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self {
79008        self.photo = photo;
79009        self
79010    }
79011    #[allow(rustdoc::invalid_html_tags)]
79012    #[doc = "Optional. Message is a photo, available sizes of the photo"]
79013    fn rhai_get_photo(&mut self) -> Option<Vec<PhotoSize>> {
79014        self.photo.as_ref().cloned()
79015    }
79016    #[allow(rustdoc::invalid_html_tags)]
79017    #[doc = "Optional. Message is a sticker, information about the sticker"]
79018    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79019    pub fn get_sticker<'a>(&'a self) -> Option<&'a Sticker> {
79020        self.sticker.as_ref().map(|v| v.inner_ref())
79021    }
79022    #[allow(rustdoc::invalid_html_tags)]
79023    #[doc = "Optional. Message is a sticker, information about the sticker"]
79024    #[allow(clippy::needless_lifetimes)]
79025    pub fn set_sticker<'a>(&'a mut self, sticker: Option<Sticker>) -> &'a mut Self {
79026        self.sticker = sticker.map(|sticker| BoxWrapper(Unbox(sticker)));
79027        self
79028    }
79029    #[allow(rustdoc::invalid_html_tags)]
79030    #[doc = "Optional. Message is a sticker, information about the sticker"]
79031    fn rhai_get_sticker(&mut self) -> Option<Sticker> {
79032        self.sticker.as_ref().map(|v| v.clone().into())
79033    }
79034    #[allow(rustdoc::invalid_html_tags)]
79035    #[doc = "Optional. Message is a forwarded story"]
79036    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79037    pub fn get_story<'a>(&'a self) -> Option<&'a Story> {
79038        self.story.as_ref().map(|v| v.inner_ref())
79039    }
79040    #[allow(rustdoc::invalid_html_tags)]
79041    #[doc = "Optional. Message is a forwarded story"]
79042    #[allow(clippy::needless_lifetimes)]
79043    pub fn set_story<'a>(&'a mut self, story: Option<Story>) -> &'a mut Self {
79044        self.story = story.map(|story| BoxWrapper(Unbox(story)));
79045        self
79046    }
79047    #[allow(rustdoc::invalid_html_tags)]
79048    #[doc = "Optional. Message is a forwarded story"]
79049    fn rhai_get_story(&mut self) -> Option<Story> {
79050        self.story.as_ref().map(|v| v.clone().into())
79051    }
79052    #[allow(rustdoc::invalid_html_tags)]
79053    #[doc = "Optional. Message is a video, information about the video"]
79054    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79055    pub fn get_video<'a>(&'a self) -> Option<&'a Video> {
79056        self.video.as_ref().map(|v| v.inner_ref())
79057    }
79058    #[allow(rustdoc::invalid_html_tags)]
79059    #[doc = "Optional. Message is a video, information about the video"]
79060    #[allow(clippy::needless_lifetimes)]
79061    pub fn set_video<'a>(&'a mut self, video: Option<Video>) -> &'a mut Self {
79062        self.video = video.map(|video| BoxWrapper(Unbox(video)));
79063        self
79064    }
79065    #[allow(rustdoc::invalid_html_tags)]
79066    #[doc = "Optional. Message is a video, information about the video"]
79067    fn rhai_get_video(&mut self) -> Option<Video> {
79068        self.video.as_ref().map(|v| v.clone().into())
79069    }
79070    #[allow(rustdoc::invalid_html_tags)]
79071    #[doc = "Optional. Message is a video note, information about the video message"]
79072    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79073    pub fn get_video_note<'a>(&'a self) -> Option<&'a VideoNote> {
79074        self.video_note.as_ref().map(|v| v.inner_ref())
79075    }
79076    #[allow(rustdoc::invalid_html_tags)]
79077    #[doc = "Optional. Message is a video note, information about the video message"]
79078    #[allow(clippy::needless_lifetimes)]
79079    pub fn set_video_note<'a>(&'a mut self, video_note: Option<VideoNote>) -> &'a mut Self {
79080        self.video_note = video_note.map(|video_note| BoxWrapper(Unbox(video_note)));
79081        self
79082    }
79083    #[allow(rustdoc::invalid_html_tags)]
79084    #[doc = "Optional. Message is a video note, information about the video message"]
79085    fn rhai_get_video_note(&mut self) -> Option<VideoNote> {
79086        self.video_note.as_ref().map(|v| v.clone().into())
79087    }
79088    #[allow(rustdoc::invalid_html_tags)]
79089    #[doc = "Optional. Message is a voice message, information about the file"]
79090    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79091    pub fn get_voice<'a>(&'a self) -> Option<&'a Voice> {
79092        self.voice.as_ref().map(|v| v.inner_ref())
79093    }
79094    #[allow(rustdoc::invalid_html_tags)]
79095    #[doc = "Optional. Message is a voice message, information about the file"]
79096    #[allow(clippy::needless_lifetimes)]
79097    pub fn set_voice<'a>(&'a mut self, voice: Option<Voice>) -> &'a mut Self {
79098        self.voice = voice.map(|voice| BoxWrapper(Unbox(voice)));
79099        self
79100    }
79101    #[allow(rustdoc::invalid_html_tags)]
79102    #[doc = "Optional. Message is a voice message, information about the file"]
79103    fn rhai_get_voice(&mut self) -> Option<Voice> {
79104        self.voice.as_ref().map(|v| v.clone().into())
79105    }
79106    #[allow(rustdoc::invalid_html_tags)]
79107    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
79108    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79109    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
79110        self.caption.as_ref().map(|v| v.as_str())
79111    }
79112    #[allow(rustdoc::invalid_html_tags)]
79113    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
79114    #[allow(clippy::needless_lifetimes)]
79115    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
79116        self.caption = caption;
79117        self
79118    }
79119    #[allow(rustdoc::invalid_html_tags)]
79120    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
79121    fn rhai_get_caption(&mut self) -> Option<String> {
79122        self.caption.as_ref().cloned()
79123    }
79124    #[allow(rustdoc::invalid_html_tags)]
79125    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
79126    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79127    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
79128        self.caption_entities.as_ref()
79129    }
79130    #[allow(rustdoc::invalid_html_tags)]
79131    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
79132    #[allow(clippy::needless_lifetimes)]
79133    pub fn set_caption_entities<'a>(
79134        &'a mut self,
79135        caption_entities: Option<Vec<MessageEntity>>,
79136    ) -> &'a mut Self {
79137        self.caption_entities = caption_entities;
79138        self
79139    }
79140    #[allow(rustdoc::invalid_html_tags)]
79141    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
79142    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
79143        self.caption_entities.as_ref().cloned()
79144    }
79145    #[allow(rustdoc::invalid_html_tags)]
79146    #[doc = "Optional. True, if the caption must be shown above the message media"]
79147    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79148    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
79149        self.show_caption_above_media.as_ref().map(|v| *v)
79150    }
79151    #[allow(rustdoc::invalid_html_tags)]
79152    #[doc = "Optional. True, if the caption must be shown above the message media"]
79153    #[allow(clippy::needless_lifetimes)]
79154    pub fn set_show_caption_above_media<'a>(
79155        &'a mut self,
79156        show_caption_above_media: Option<bool>,
79157    ) -> &'a mut Self {
79158        self.show_caption_above_media = show_caption_above_media;
79159        self
79160    }
79161    #[allow(rustdoc::invalid_html_tags)]
79162    #[doc = "Optional. True, if the caption must be shown above the message media"]
79163    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
79164        self.show_caption_above_media.as_ref().copied()
79165    }
79166    #[allow(rustdoc::invalid_html_tags)]
79167    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
79168    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79169    pub fn get_has_media_spoiler<'a>(&'a self) -> Option<bool> {
79170        self.has_media_spoiler.as_ref().map(|v| *v)
79171    }
79172    #[allow(rustdoc::invalid_html_tags)]
79173    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
79174    #[allow(clippy::needless_lifetimes)]
79175    pub fn set_has_media_spoiler<'a>(
79176        &'a mut self,
79177        has_media_spoiler: Option<bool>,
79178    ) -> &'a mut Self {
79179        self.has_media_spoiler = has_media_spoiler;
79180        self
79181    }
79182    #[allow(rustdoc::invalid_html_tags)]
79183    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
79184    fn rhai_get_has_media_spoiler(&mut self) -> Option<bool> {
79185        self.has_media_spoiler.as_ref().copied()
79186    }
79187    #[allow(rustdoc::invalid_html_tags)]
79188    #[doc = "Optional. Message is a checklist"]
79189    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79190    pub fn get_checklist<'a>(&'a self) -> Option<&'a Checklist> {
79191        self.checklist.as_ref().map(|v| v.inner_ref())
79192    }
79193    #[allow(rustdoc::invalid_html_tags)]
79194    #[doc = "Optional. Message is a checklist"]
79195    #[allow(clippy::needless_lifetimes)]
79196    pub fn set_checklist<'a>(&'a mut self, checklist: Option<Checklist>) -> &'a mut Self {
79197        self.checklist = checklist.map(|checklist| BoxWrapper(Unbox(checklist)));
79198        self
79199    }
79200    #[allow(rustdoc::invalid_html_tags)]
79201    #[doc = "Optional. Message is a checklist"]
79202    fn rhai_get_checklist(&mut self) -> Option<Checklist> {
79203        self.checklist.as_ref().map(|v| v.clone().into())
79204    }
79205    #[allow(rustdoc::invalid_html_tags)]
79206    #[doc = "Optional. Message is a shared contact, information about the contact"]
79207    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79208    pub fn get_contact<'a>(&'a self) -> Option<&'a Contact> {
79209        self.contact.as_ref().map(|v| v.inner_ref())
79210    }
79211    #[allow(rustdoc::invalid_html_tags)]
79212    #[doc = "Optional. Message is a shared contact, information about the contact"]
79213    #[allow(clippy::needless_lifetimes)]
79214    pub fn set_contact<'a>(&'a mut self, contact: Option<Contact>) -> &'a mut Self {
79215        self.contact = contact.map(|contact| BoxWrapper(Unbox(contact)));
79216        self
79217    }
79218    #[allow(rustdoc::invalid_html_tags)]
79219    #[doc = "Optional. Message is a shared contact, information about the contact"]
79220    fn rhai_get_contact(&mut self) -> Option<Contact> {
79221        self.contact.as_ref().map(|v| v.clone().into())
79222    }
79223    #[allow(rustdoc::invalid_html_tags)]
79224    #[doc = "Optional. Message is a dice with random value"]
79225    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79226    pub fn get_dice<'a>(&'a self) -> Option<&'a Dice> {
79227        self.dice.as_ref().map(|v| v.inner_ref())
79228    }
79229    #[allow(rustdoc::invalid_html_tags)]
79230    #[doc = "Optional. Message is a dice with random value"]
79231    #[allow(clippy::needless_lifetimes)]
79232    pub fn set_dice<'a>(&'a mut self, dice: Option<Dice>) -> &'a mut Self {
79233        self.dice = dice.map(|dice| BoxWrapper(Unbox(dice)));
79234        self
79235    }
79236    #[allow(rustdoc::invalid_html_tags)]
79237    #[doc = "Optional. Message is a dice with random value"]
79238    fn rhai_get_dice(&mut self) -> Option<Dice> {
79239        self.dice.as_ref().map(|v| v.clone().into())
79240    }
79241    #[allow(rustdoc::invalid_html_tags)]
79242    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
79243    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79244    pub fn get_game<'a>(&'a self) -> Option<&'a Game> {
79245        self.game.as_ref().map(|v| v.inner_ref())
79246    }
79247    #[allow(rustdoc::invalid_html_tags)]
79248    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
79249    #[allow(clippy::needless_lifetimes)]
79250    pub fn set_game<'a>(&'a mut self, game: Option<Game>) -> &'a mut Self {
79251        self.game = game.map(|game| BoxWrapper(Unbox(game)));
79252        self
79253    }
79254    #[allow(rustdoc::invalid_html_tags)]
79255    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
79256    fn rhai_get_game(&mut self) -> Option<Game> {
79257        self.game.as_ref().map(|v| v.clone().into())
79258    }
79259    #[allow(rustdoc::invalid_html_tags)]
79260    #[doc = "Optional. Message is a native poll, information about the poll"]
79261    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79262    pub fn get_poll<'a>(&'a self) -> Option<&'a Poll> {
79263        self.poll.as_ref().map(|v| v.inner_ref())
79264    }
79265    #[allow(rustdoc::invalid_html_tags)]
79266    #[doc = "Optional. Message is a native poll, information about the poll"]
79267    #[allow(clippy::needless_lifetimes)]
79268    pub fn set_poll<'a>(&'a mut self, poll: Option<Poll>) -> &'a mut Self {
79269        self.poll = poll.map(|poll| BoxWrapper(Unbox(poll)));
79270        self
79271    }
79272    #[allow(rustdoc::invalid_html_tags)]
79273    #[doc = "Optional. Message is a native poll, information about the poll"]
79274    fn rhai_get_poll(&mut self) -> Option<Poll> {
79275        self.poll.as_ref().map(|v| v.clone().into())
79276    }
79277    #[allow(rustdoc::invalid_html_tags)]
79278    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
79279    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79280    pub fn get_venue<'a>(&'a self) -> Option<&'a Venue> {
79281        self.venue.as_ref().map(|v| v.inner_ref())
79282    }
79283    #[allow(rustdoc::invalid_html_tags)]
79284    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
79285    #[allow(clippy::needless_lifetimes)]
79286    pub fn set_venue<'a>(&'a mut self, venue: Option<Venue>) -> &'a mut Self {
79287        self.venue = venue.map(|venue| BoxWrapper(Unbox(venue)));
79288        self
79289    }
79290    #[allow(rustdoc::invalid_html_tags)]
79291    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
79292    fn rhai_get_venue(&mut self) -> Option<Venue> {
79293        self.venue.as_ref().map(|v| v.clone().into())
79294    }
79295    #[allow(rustdoc::invalid_html_tags)]
79296    #[doc = "Optional. Message is a shared location, information about the location"]
79297    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79298    pub fn get_location<'a>(&'a self) -> Option<&'a Location> {
79299        self.location.as_ref().map(|v| v.inner_ref())
79300    }
79301    #[allow(rustdoc::invalid_html_tags)]
79302    #[doc = "Optional. Message is a shared location, information about the location"]
79303    #[allow(clippy::needless_lifetimes)]
79304    pub fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self {
79305        self.location = location.map(|location| BoxWrapper(Unbox(location)));
79306        self
79307    }
79308    #[allow(rustdoc::invalid_html_tags)]
79309    #[doc = "Optional. Message is a shared location, information about the location"]
79310    fn rhai_get_location(&mut self) -> Option<Location> {
79311        self.location.as_ref().map(|v| v.clone().into())
79312    }
79313    #[allow(rustdoc::invalid_html_tags)]
79314    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
79315    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79316    pub fn get_new_chat_members<'a>(&'a self) -> Option<&'a Vec<User>> {
79317        self.new_chat_members.as_ref()
79318    }
79319    #[allow(rustdoc::invalid_html_tags)]
79320    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
79321    #[allow(clippy::needless_lifetimes)]
79322    pub fn set_new_chat_members<'a>(
79323        &'a mut self,
79324        new_chat_members: Option<Vec<User>>,
79325    ) -> &'a mut Self {
79326        self.new_chat_members = new_chat_members;
79327        self
79328    }
79329    #[allow(rustdoc::invalid_html_tags)]
79330    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
79331    fn rhai_get_new_chat_members(&mut self) -> Option<Vec<User>> {
79332        self.new_chat_members.as_ref().cloned()
79333    }
79334    #[allow(rustdoc::invalid_html_tags)]
79335    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
79336    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79337    pub fn get_left_chat_member<'a>(&'a self) -> Option<&'a User> {
79338        self.left_chat_member.as_ref().map(|v| v.inner_ref())
79339    }
79340    #[allow(rustdoc::invalid_html_tags)]
79341    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
79342    #[allow(clippy::needless_lifetimes)]
79343    pub fn set_left_chat_member<'a>(&'a mut self, left_chat_member: Option<User>) -> &'a mut Self {
79344        self.left_chat_member =
79345            left_chat_member.map(|left_chat_member| BoxWrapper(Unbox(left_chat_member)));
79346        self
79347    }
79348    #[allow(rustdoc::invalid_html_tags)]
79349    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
79350    fn rhai_get_left_chat_member(&mut self) -> Option<User> {
79351        self.left_chat_member.as_ref().map(|v| v.clone().into())
79352    }
79353    #[allow(rustdoc::invalid_html_tags)]
79354    #[doc = "Optional. A chat title was changed to this value"]
79355    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79356    pub fn get_new_chat_title<'a>(&'a self) -> Option<&'a str> {
79357        self.new_chat_title.as_ref().map(|v| v.as_str())
79358    }
79359    #[allow(rustdoc::invalid_html_tags)]
79360    #[doc = "Optional. A chat title was changed to this value"]
79361    #[allow(clippy::needless_lifetimes)]
79362    pub fn set_new_chat_title<'a>(&'a mut self, new_chat_title: Option<String>) -> &'a mut Self {
79363        self.new_chat_title = new_chat_title;
79364        self
79365    }
79366    #[allow(rustdoc::invalid_html_tags)]
79367    #[doc = "Optional. A chat title was changed to this value"]
79368    fn rhai_get_new_chat_title(&mut self) -> Option<String> {
79369        self.new_chat_title.as_ref().cloned()
79370    }
79371    #[allow(rustdoc::invalid_html_tags)]
79372    #[doc = "Optional. A chat photo was change to this value"]
79373    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79374    pub fn get_new_chat_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
79375        self.new_chat_photo.as_ref()
79376    }
79377    #[allow(rustdoc::invalid_html_tags)]
79378    #[doc = "Optional. A chat photo was change to this value"]
79379    #[allow(clippy::needless_lifetimes)]
79380    pub fn set_new_chat_photo<'a>(
79381        &'a mut self,
79382        new_chat_photo: Option<Vec<PhotoSize>>,
79383    ) -> &'a mut Self {
79384        self.new_chat_photo = new_chat_photo;
79385        self
79386    }
79387    #[allow(rustdoc::invalid_html_tags)]
79388    #[doc = "Optional. A chat photo was change to this value"]
79389    fn rhai_get_new_chat_photo(&mut self) -> Option<Vec<PhotoSize>> {
79390        self.new_chat_photo.as_ref().cloned()
79391    }
79392    #[allow(rustdoc::invalid_html_tags)]
79393    #[doc = "Optional. Service message: the chat photo was deleted"]
79394    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79395    pub fn get_delete_chat_photo<'a>(&'a self) -> Option<bool> {
79396        self.delete_chat_photo.as_ref().map(|v| *v)
79397    }
79398    #[allow(rustdoc::invalid_html_tags)]
79399    #[doc = "Optional. Service message: the chat photo was deleted"]
79400    #[allow(clippy::needless_lifetimes)]
79401    pub fn set_delete_chat_photo<'a>(
79402        &'a mut self,
79403        delete_chat_photo: Option<bool>,
79404    ) -> &'a mut Self {
79405        self.delete_chat_photo = delete_chat_photo;
79406        self
79407    }
79408    #[allow(rustdoc::invalid_html_tags)]
79409    #[doc = "Optional. Service message: the chat photo was deleted"]
79410    fn rhai_get_delete_chat_photo(&mut self) -> Option<bool> {
79411        self.delete_chat_photo.as_ref().copied()
79412    }
79413    #[allow(rustdoc::invalid_html_tags)]
79414    #[doc = "Optional. Service message: the group has been created"]
79415    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79416    pub fn get_group_chat_created<'a>(&'a self) -> Option<bool> {
79417        self.group_chat_created.as_ref().map(|v| *v)
79418    }
79419    #[allow(rustdoc::invalid_html_tags)]
79420    #[doc = "Optional. Service message: the group has been created"]
79421    #[allow(clippy::needless_lifetimes)]
79422    pub fn set_group_chat_created<'a>(
79423        &'a mut self,
79424        group_chat_created: Option<bool>,
79425    ) -> &'a mut Self {
79426        self.group_chat_created = group_chat_created;
79427        self
79428    }
79429    #[allow(rustdoc::invalid_html_tags)]
79430    #[doc = "Optional. Service message: the group has been created"]
79431    fn rhai_get_group_chat_created(&mut self) -> Option<bool> {
79432        self.group_chat_created.as_ref().copied()
79433    }
79434    #[allow(rustdoc::invalid_html_tags)]
79435    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
79436    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79437    pub fn get_supergroup_chat_created<'a>(&'a self) -> Option<bool> {
79438        self.supergroup_chat_created.as_ref().map(|v| *v)
79439    }
79440    #[allow(rustdoc::invalid_html_tags)]
79441    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
79442    #[allow(clippy::needless_lifetimes)]
79443    pub fn set_supergroup_chat_created<'a>(
79444        &'a mut self,
79445        supergroup_chat_created: Option<bool>,
79446    ) -> &'a mut Self {
79447        self.supergroup_chat_created = supergroup_chat_created;
79448        self
79449    }
79450    #[allow(rustdoc::invalid_html_tags)]
79451    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
79452    fn rhai_get_supergroup_chat_created(&mut self) -> Option<bool> {
79453        self.supergroup_chat_created.as_ref().copied()
79454    }
79455    #[allow(rustdoc::invalid_html_tags)]
79456    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
79457    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79458    pub fn get_channel_chat_created<'a>(&'a self) -> Option<bool> {
79459        self.channel_chat_created.as_ref().map(|v| *v)
79460    }
79461    #[allow(rustdoc::invalid_html_tags)]
79462    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
79463    #[allow(clippy::needless_lifetimes)]
79464    pub fn set_channel_chat_created<'a>(
79465        &'a mut self,
79466        channel_chat_created: Option<bool>,
79467    ) -> &'a mut Self {
79468        self.channel_chat_created = channel_chat_created;
79469        self
79470    }
79471    #[allow(rustdoc::invalid_html_tags)]
79472    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
79473    fn rhai_get_channel_chat_created(&mut self) -> Option<bool> {
79474        self.channel_chat_created.as_ref().copied()
79475    }
79476    #[allow(rustdoc::invalid_html_tags)]
79477    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
79478    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79479    pub fn get_message_auto_delete_timer_changed<'a>(
79480        &'a self,
79481    ) -> Option<&'a MessageAutoDeleteTimerChanged> {
79482        self.message_auto_delete_timer_changed
79483            .as_ref()
79484            .map(|v| v.inner_ref())
79485    }
79486    #[allow(rustdoc::invalid_html_tags)]
79487    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
79488    #[allow(clippy::needless_lifetimes)]
79489    pub fn set_message_auto_delete_timer_changed<'a>(
79490        &'a mut self,
79491        message_auto_delete_timer_changed: Option<MessageAutoDeleteTimerChanged>,
79492    ) -> &'a mut Self {
79493        self.message_auto_delete_timer_changed =
79494            message_auto_delete_timer_changed.map(|message_auto_delete_timer_changed| {
79495                BoxWrapper(Unbox(message_auto_delete_timer_changed))
79496            });
79497        self
79498    }
79499    #[allow(rustdoc::invalid_html_tags)]
79500    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
79501    fn rhai_get_message_auto_delete_timer_changed(
79502        &mut self,
79503    ) -> Option<MessageAutoDeleteTimerChanged> {
79504        self.message_auto_delete_timer_changed
79505            .as_ref()
79506            .map(|v| v.clone().into())
79507    }
79508    #[allow(rustdoc::invalid_html_tags)]
79509    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
79510    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79511    pub fn get_migrate_to_chat_id<'a>(&'a self) -> Option<i64> {
79512        self.migrate_to_chat_id.as_ref().map(|v| *v)
79513    }
79514    #[allow(rustdoc::invalid_html_tags)]
79515    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
79516    #[allow(clippy::needless_lifetimes)]
79517    pub fn set_migrate_to_chat_id<'a>(
79518        &'a mut self,
79519        migrate_to_chat_id: Option<i64>,
79520    ) -> &'a mut Self {
79521        self.migrate_to_chat_id = migrate_to_chat_id;
79522        self
79523    }
79524    #[allow(rustdoc::invalid_html_tags)]
79525    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
79526    fn rhai_get_migrate_to_chat_id(&mut self) -> Option<i64> {
79527        self.migrate_to_chat_id.as_ref().copied()
79528    }
79529    #[allow(rustdoc::invalid_html_tags)]
79530    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
79531    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79532    pub fn get_migrate_from_chat_id<'a>(&'a self) -> Option<i64> {
79533        self.migrate_from_chat_id.as_ref().map(|v| *v)
79534    }
79535    #[allow(rustdoc::invalid_html_tags)]
79536    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
79537    #[allow(clippy::needless_lifetimes)]
79538    pub fn set_migrate_from_chat_id<'a>(
79539        &'a mut self,
79540        migrate_from_chat_id: Option<i64>,
79541    ) -> &'a mut Self {
79542        self.migrate_from_chat_id = migrate_from_chat_id;
79543        self
79544    }
79545    #[allow(rustdoc::invalid_html_tags)]
79546    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
79547    fn rhai_get_migrate_from_chat_id(&mut self) -> Option<i64> {
79548        self.migrate_from_chat_id.as_ref().copied()
79549    }
79550    #[allow(rustdoc::invalid_html_tags)]
79551    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
79552    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79553    pub fn get_pinned_message<'a>(&'a self) -> Option<&'a MaybeInaccessibleMessage> {
79554        self.pinned_message.as_ref().map(|v| v.inner_ref())
79555    }
79556    #[allow(rustdoc::invalid_html_tags)]
79557    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
79558    #[allow(clippy::needless_lifetimes)]
79559    pub fn set_pinned_message<'a>(
79560        &'a mut self,
79561        pinned_message: Option<MaybeInaccessibleMessage>,
79562    ) -> &'a mut Self {
79563        self.pinned_message =
79564            pinned_message.map(|pinned_message| BoxWrapper(Box::new(pinned_message)));
79565        self
79566    }
79567    #[allow(rustdoc::invalid_html_tags)]
79568    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
79569    fn rhai_get_pinned_message(&mut self) -> Option<MaybeInaccessibleMessage> {
79570        self.pinned_message.as_ref().map(|v| v.clone().into())
79571    }
79572    #[allow(rustdoc::invalid_html_tags)]
79573    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
79574    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79575    pub fn get_invoice<'a>(&'a self) -> Option<&'a Invoice> {
79576        self.invoice.as_ref().map(|v| v.inner_ref())
79577    }
79578    #[allow(rustdoc::invalid_html_tags)]
79579    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
79580    #[allow(clippy::needless_lifetimes)]
79581    pub fn set_invoice<'a>(&'a mut self, invoice: Option<Invoice>) -> &'a mut Self {
79582        self.invoice = invoice.map(|invoice| BoxWrapper(Unbox(invoice)));
79583        self
79584    }
79585    #[allow(rustdoc::invalid_html_tags)]
79586    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
79587    fn rhai_get_invoice(&mut self) -> Option<Invoice> {
79588        self.invoice.as_ref().map(|v| v.clone().into())
79589    }
79590    #[allow(rustdoc::invalid_html_tags)]
79591    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
79592    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79593    pub fn get_successful_payment<'a>(&'a self) -> Option<&'a SuccessfulPayment> {
79594        self.successful_payment.as_ref().map(|v| v.inner_ref())
79595    }
79596    #[allow(rustdoc::invalid_html_tags)]
79597    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
79598    #[allow(clippy::needless_lifetimes)]
79599    pub fn set_successful_payment<'a>(
79600        &'a mut self,
79601        successful_payment: Option<SuccessfulPayment>,
79602    ) -> &'a mut Self {
79603        self.successful_payment =
79604            successful_payment.map(|successful_payment| BoxWrapper(Unbox(successful_payment)));
79605        self
79606    }
79607    #[allow(rustdoc::invalid_html_tags)]
79608    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
79609    fn rhai_get_successful_payment(&mut self) -> Option<SuccessfulPayment> {
79610        self.successful_payment.as_ref().map(|v| v.clone().into())
79611    }
79612    #[allow(rustdoc::invalid_html_tags)]
79613    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
79614    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79615    pub fn get_refunded_payment<'a>(&'a self) -> Option<&'a RefundedPayment> {
79616        self.refunded_payment.as_ref().map(|v| v.inner_ref())
79617    }
79618    #[allow(rustdoc::invalid_html_tags)]
79619    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
79620    #[allow(clippy::needless_lifetimes)]
79621    pub fn set_refunded_payment<'a>(
79622        &'a mut self,
79623        refunded_payment: Option<RefundedPayment>,
79624    ) -> &'a mut Self {
79625        self.refunded_payment =
79626            refunded_payment.map(|refunded_payment| BoxWrapper(Unbox(refunded_payment)));
79627        self
79628    }
79629    #[allow(rustdoc::invalid_html_tags)]
79630    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
79631    fn rhai_get_refunded_payment(&mut self) -> Option<RefundedPayment> {
79632        self.refunded_payment.as_ref().map(|v| v.clone().into())
79633    }
79634    #[allow(rustdoc::invalid_html_tags)]
79635    #[doc = "Optional. Service message: users were shared with the bot"]
79636    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79637    pub fn get_users_shared<'a>(&'a self) -> Option<&'a UsersShared> {
79638        self.users_shared.as_ref().map(|v| v.inner_ref())
79639    }
79640    #[allow(rustdoc::invalid_html_tags)]
79641    #[doc = "Optional. Service message: users were shared with the bot"]
79642    #[allow(clippy::needless_lifetimes)]
79643    pub fn set_users_shared<'a>(&'a mut self, users_shared: Option<UsersShared>) -> &'a mut Self {
79644        self.users_shared = users_shared.map(|users_shared| BoxWrapper(Unbox(users_shared)));
79645        self
79646    }
79647    #[allow(rustdoc::invalid_html_tags)]
79648    #[doc = "Optional. Service message: users were shared with the bot"]
79649    fn rhai_get_users_shared(&mut self) -> Option<UsersShared> {
79650        self.users_shared.as_ref().map(|v| v.clone().into())
79651    }
79652    #[allow(rustdoc::invalid_html_tags)]
79653    #[doc = "Optional. Service message: a chat was shared with the bot"]
79654    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79655    pub fn get_chat_shared<'a>(&'a self) -> Option<&'a ChatShared> {
79656        self.chat_shared.as_ref().map(|v| v.inner_ref())
79657    }
79658    #[allow(rustdoc::invalid_html_tags)]
79659    #[doc = "Optional. Service message: a chat was shared with the bot"]
79660    #[allow(clippy::needless_lifetimes)]
79661    pub fn set_chat_shared<'a>(&'a mut self, chat_shared: Option<ChatShared>) -> &'a mut Self {
79662        self.chat_shared = chat_shared.map(|chat_shared| BoxWrapper(Unbox(chat_shared)));
79663        self
79664    }
79665    #[allow(rustdoc::invalid_html_tags)]
79666    #[doc = "Optional. Service message: a chat was shared with the bot"]
79667    fn rhai_get_chat_shared(&mut self) -> Option<ChatShared> {
79668        self.chat_shared.as_ref().map(|v| v.clone().into())
79669    }
79670    #[allow(rustdoc::invalid_html_tags)]
79671    #[doc = "Optional. Service message: a regular gift was sent or received"]
79672    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79673    pub fn get_gift<'a>(&'a self) -> Option<&'a GiftInfo> {
79674        self.gift.as_ref().map(|v| v.inner_ref())
79675    }
79676    #[allow(rustdoc::invalid_html_tags)]
79677    #[doc = "Optional. Service message: a regular gift was sent or received"]
79678    #[allow(clippy::needless_lifetimes)]
79679    pub fn set_gift<'a>(&'a mut self, gift: Option<GiftInfo>) -> &'a mut Self {
79680        self.gift = gift.map(|gift| BoxWrapper(Unbox(gift)));
79681        self
79682    }
79683    #[allow(rustdoc::invalid_html_tags)]
79684    #[doc = "Optional. Service message: a regular gift was sent or received"]
79685    fn rhai_get_gift(&mut self) -> Option<GiftInfo> {
79686        self.gift.as_ref().map(|v| v.clone().into())
79687    }
79688    #[allow(rustdoc::invalid_html_tags)]
79689    #[doc = "Optional. Service message: a unique gift was sent or received"]
79690    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79691    pub fn get_unique_gift<'a>(&'a self) -> Option<&'a UniqueGiftInfo> {
79692        self.unique_gift.as_ref().map(|v| v.inner_ref())
79693    }
79694    #[allow(rustdoc::invalid_html_tags)]
79695    #[doc = "Optional. Service message: a unique gift was sent or received"]
79696    #[allow(clippy::needless_lifetimes)]
79697    pub fn set_unique_gift<'a>(&'a mut self, unique_gift: Option<UniqueGiftInfo>) -> &'a mut Self {
79698        self.unique_gift = unique_gift.map(|unique_gift| BoxWrapper(Unbox(unique_gift)));
79699        self
79700    }
79701    #[allow(rustdoc::invalid_html_tags)]
79702    #[doc = "Optional. Service message: a unique gift was sent or received"]
79703    fn rhai_get_unique_gift(&mut self) -> Option<UniqueGiftInfo> {
79704        self.unique_gift.as_ref().map(|v| v.clone().into())
79705    }
79706    #[allow(rustdoc::invalid_html_tags)]
79707    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
79708    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79709    pub fn get_connected_website<'a>(&'a self) -> Option<&'a str> {
79710        self.connected_website.as_ref().map(|v| v.as_str())
79711    }
79712    #[allow(rustdoc::invalid_html_tags)]
79713    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
79714    #[allow(clippy::needless_lifetimes)]
79715    pub fn set_connected_website<'a>(
79716        &'a mut self,
79717        connected_website: Option<String>,
79718    ) -> &'a mut Self {
79719        self.connected_website = connected_website;
79720        self
79721    }
79722    #[allow(rustdoc::invalid_html_tags)]
79723    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
79724    fn rhai_get_connected_website(&mut self) -> Option<String> {
79725        self.connected_website.as_ref().cloned()
79726    }
79727    #[allow(rustdoc::invalid_html_tags)]
79728    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
79729    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79730    pub fn get_write_access_allowed<'a>(&'a self) -> Option<&'a WriteAccessAllowed> {
79731        self.write_access_allowed.as_ref().map(|v| v.inner_ref())
79732    }
79733    #[allow(rustdoc::invalid_html_tags)]
79734    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
79735    #[allow(clippy::needless_lifetimes)]
79736    pub fn set_write_access_allowed<'a>(
79737        &'a mut self,
79738        write_access_allowed: Option<WriteAccessAllowed>,
79739    ) -> &'a mut Self {
79740        self.write_access_allowed = write_access_allowed
79741            .map(|write_access_allowed| BoxWrapper(Unbox(write_access_allowed)));
79742        self
79743    }
79744    #[allow(rustdoc::invalid_html_tags)]
79745    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
79746    fn rhai_get_write_access_allowed(&mut self) -> Option<WriteAccessAllowed> {
79747        self.write_access_allowed.as_ref().map(|v| v.clone().into())
79748    }
79749    #[allow(rustdoc::invalid_html_tags)]
79750    #[doc = "Optional. Telegram Passport data"]
79751    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79752    pub fn get_passport_data<'a>(&'a self) -> Option<&'a PassportData> {
79753        self.passport_data.as_ref().map(|v| v.inner_ref())
79754    }
79755    #[allow(rustdoc::invalid_html_tags)]
79756    #[doc = "Optional. Telegram Passport data"]
79757    #[allow(clippy::needless_lifetimes)]
79758    pub fn set_passport_data<'a>(
79759        &'a mut self,
79760        passport_data: Option<PassportData>,
79761    ) -> &'a mut Self {
79762        self.passport_data = passport_data.map(|passport_data| BoxWrapper(Unbox(passport_data)));
79763        self
79764    }
79765    #[allow(rustdoc::invalid_html_tags)]
79766    #[doc = "Optional. Telegram Passport data"]
79767    fn rhai_get_passport_data(&mut self) -> Option<PassportData> {
79768        self.passport_data.as_ref().map(|v| v.clone().into())
79769    }
79770    #[allow(rustdoc::invalid_html_tags)]
79771    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
79772    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79773    pub fn get_proximity_alert_triggered<'a>(&'a self) -> Option<&'a ProximityAlertTriggered> {
79774        self.proximity_alert_triggered
79775            .as_ref()
79776            .map(|v| v.inner_ref())
79777    }
79778    #[allow(rustdoc::invalid_html_tags)]
79779    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
79780    #[allow(clippy::needless_lifetimes)]
79781    pub fn set_proximity_alert_triggered<'a>(
79782        &'a mut self,
79783        proximity_alert_triggered: Option<ProximityAlertTriggered>,
79784    ) -> &'a mut Self {
79785        self.proximity_alert_triggered = proximity_alert_triggered
79786            .map(|proximity_alert_triggered| BoxWrapper(Unbox(proximity_alert_triggered)));
79787        self
79788    }
79789    #[allow(rustdoc::invalid_html_tags)]
79790    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
79791    fn rhai_get_proximity_alert_triggered(&mut self) -> Option<ProximityAlertTriggered> {
79792        self.proximity_alert_triggered
79793            .as_ref()
79794            .map(|v| v.clone().into())
79795    }
79796    #[allow(rustdoc::invalid_html_tags)]
79797    #[doc = "Optional. Service message: user boosted the chat"]
79798    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79799    pub fn get_boost_added<'a>(&'a self) -> Option<&'a ChatBoostAdded> {
79800        self.boost_added.as_ref().map(|v| v.inner_ref())
79801    }
79802    #[allow(rustdoc::invalid_html_tags)]
79803    #[doc = "Optional. Service message: user boosted the chat"]
79804    #[allow(clippy::needless_lifetimes)]
79805    pub fn set_boost_added<'a>(&'a mut self, boost_added: Option<ChatBoostAdded>) -> &'a mut Self {
79806        self.boost_added = boost_added.map(|boost_added| BoxWrapper(Unbox(boost_added)));
79807        self
79808    }
79809    #[allow(rustdoc::invalid_html_tags)]
79810    #[doc = "Optional. Service message: user boosted the chat"]
79811    fn rhai_get_boost_added(&mut self) -> Option<ChatBoostAdded> {
79812        self.boost_added.as_ref().map(|v| v.clone().into())
79813    }
79814    #[allow(rustdoc::invalid_html_tags)]
79815    #[doc = "Optional. Service message: chat background set"]
79816    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79817    pub fn get_chat_background_set<'a>(&'a self) -> Option<&'a ChatBackground> {
79818        self.chat_background_set.as_ref().map(|v| v.inner_ref())
79819    }
79820    #[allow(rustdoc::invalid_html_tags)]
79821    #[doc = "Optional. Service message: chat background set"]
79822    #[allow(clippy::needless_lifetimes)]
79823    pub fn set_chat_background_set<'a>(
79824        &'a mut self,
79825        chat_background_set: Option<ChatBackground>,
79826    ) -> &'a mut Self {
79827        self.chat_background_set =
79828            chat_background_set.map(|chat_background_set| BoxWrapper(Unbox(chat_background_set)));
79829        self
79830    }
79831    #[allow(rustdoc::invalid_html_tags)]
79832    #[doc = "Optional. Service message: chat background set"]
79833    fn rhai_get_chat_background_set(&mut self) -> Option<ChatBackground> {
79834        self.chat_background_set.as_ref().map(|v| v.clone().into())
79835    }
79836    #[allow(rustdoc::invalid_html_tags)]
79837    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
79838    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79839    pub fn get_checklist_tasks_done<'a>(&'a self) -> Option<&'a ChecklistTasksDone> {
79840        self.checklist_tasks_done.as_ref().map(|v| v.inner_ref())
79841    }
79842    #[allow(rustdoc::invalid_html_tags)]
79843    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
79844    #[allow(clippy::needless_lifetimes)]
79845    pub fn set_checklist_tasks_done<'a>(
79846        &'a mut self,
79847        checklist_tasks_done: Option<ChecklistTasksDone>,
79848    ) -> &'a mut Self {
79849        self.checklist_tasks_done = checklist_tasks_done
79850            .map(|checklist_tasks_done| BoxWrapper(Box::new(checklist_tasks_done)));
79851        self
79852    }
79853    #[allow(rustdoc::invalid_html_tags)]
79854    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
79855    fn rhai_get_checklist_tasks_done(&mut self) -> Option<ChecklistTasksDone> {
79856        self.checklist_tasks_done.as_ref().map(|v| v.clone().into())
79857    }
79858    #[allow(rustdoc::invalid_html_tags)]
79859    #[doc = "Optional. Service message: tasks were added to a checklist"]
79860    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79861    pub fn get_checklist_tasks_added<'a>(&'a self) -> Option<&'a ChecklistTasksAdded> {
79862        self.checklist_tasks_added.as_ref().map(|v| v.inner_ref())
79863    }
79864    #[allow(rustdoc::invalid_html_tags)]
79865    #[doc = "Optional. Service message: tasks were added to a checklist"]
79866    #[allow(clippy::needless_lifetimes)]
79867    pub fn set_checklist_tasks_added<'a>(
79868        &'a mut self,
79869        checklist_tasks_added: Option<ChecklistTasksAdded>,
79870    ) -> &'a mut Self {
79871        self.checklist_tasks_added = checklist_tasks_added
79872            .map(|checklist_tasks_added| BoxWrapper(Box::new(checklist_tasks_added)));
79873        self
79874    }
79875    #[allow(rustdoc::invalid_html_tags)]
79876    #[doc = "Optional. Service message: tasks were added to a checklist"]
79877    fn rhai_get_checklist_tasks_added(&mut self) -> Option<ChecklistTasksAdded> {
79878        self.checklist_tasks_added
79879            .as_ref()
79880            .map(|v| v.clone().into())
79881    }
79882    #[allow(rustdoc::invalid_html_tags)]
79883    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
79884    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79885    pub fn get_direct_message_price_changed<'a>(&'a self) -> Option<&'a DirectMessagePriceChanged> {
79886        self.direct_message_price_changed
79887            .as_ref()
79888            .map(|v| v.inner_ref())
79889    }
79890    #[allow(rustdoc::invalid_html_tags)]
79891    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
79892    #[allow(clippy::needless_lifetimes)]
79893    pub fn set_direct_message_price_changed<'a>(
79894        &'a mut self,
79895        direct_message_price_changed: Option<DirectMessagePriceChanged>,
79896    ) -> &'a mut Self {
79897        self.direct_message_price_changed = direct_message_price_changed
79898            .map(|direct_message_price_changed| BoxWrapper(Unbox(direct_message_price_changed)));
79899        self
79900    }
79901    #[allow(rustdoc::invalid_html_tags)]
79902    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
79903    fn rhai_get_direct_message_price_changed(&mut self) -> Option<DirectMessagePriceChanged> {
79904        self.direct_message_price_changed
79905            .as_ref()
79906            .map(|v| v.clone().into())
79907    }
79908    #[allow(rustdoc::invalid_html_tags)]
79909    #[doc = "Optional. Service message: forum topic created"]
79910    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79911    pub fn get_forum_topic_created<'a>(&'a self) -> Option<&'a ForumTopicCreated> {
79912        self.forum_topic_created.as_ref().map(|v| v.inner_ref())
79913    }
79914    #[allow(rustdoc::invalid_html_tags)]
79915    #[doc = "Optional. Service message: forum topic created"]
79916    #[allow(clippy::needless_lifetimes)]
79917    pub fn set_forum_topic_created<'a>(
79918        &'a mut self,
79919        forum_topic_created: Option<ForumTopicCreated>,
79920    ) -> &'a mut Self {
79921        self.forum_topic_created =
79922            forum_topic_created.map(|forum_topic_created| BoxWrapper(Unbox(forum_topic_created)));
79923        self
79924    }
79925    #[allow(rustdoc::invalid_html_tags)]
79926    #[doc = "Optional. Service message: forum topic created"]
79927    fn rhai_get_forum_topic_created(&mut self) -> Option<ForumTopicCreated> {
79928        self.forum_topic_created.as_ref().map(|v| v.clone().into())
79929    }
79930    #[allow(rustdoc::invalid_html_tags)]
79931    #[doc = "Optional. Service message: forum topic edited"]
79932    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79933    pub fn get_forum_topic_edited<'a>(&'a self) -> Option<&'a ForumTopicEdited> {
79934        self.forum_topic_edited.as_ref().map(|v| v.inner_ref())
79935    }
79936    #[allow(rustdoc::invalid_html_tags)]
79937    #[doc = "Optional. Service message: forum topic edited"]
79938    #[allow(clippy::needless_lifetimes)]
79939    pub fn set_forum_topic_edited<'a>(
79940        &'a mut self,
79941        forum_topic_edited: Option<ForumTopicEdited>,
79942    ) -> &'a mut Self {
79943        self.forum_topic_edited =
79944            forum_topic_edited.map(|forum_topic_edited| BoxWrapper(Unbox(forum_topic_edited)));
79945        self
79946    }
79947    #[allow(rustdoc::invalid_html_tags)]
79948    #[doc = "Optional. Service message: forum topic edited"]
79949    fn rhai_get_forum_topic_edited(&mut self) -> Option<ForumTopicEdited> {
79950        self.forum_topic_edited.as_ref().map(|v| v.clone().into())
79951    }
79952    #[allow(rustdoc::invalid_html_tags)]
79953    #[doc = "Optional. Service message: forum topic closed"]
79954    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79955    pub fn get_forum_topic_closed<'a>(&'a self) -> Option<&'a ForumTopicClosed> {
79956        self.forum_topic_closed.as_ref().map(|v| v.inner_ref())
79957    }
79958    #[allow(rustdoc::invalid_html_tags)]
79959    #[doc = "Optional. Service message: forum topic closed"]
79960    #[allow(clippy::needless_lifetimes)]
79961    pub fn set_forum_topic_closed<'a>(
79962        &'a mut self,
79963        forum_topic_closed: Option<ForumTopicClosed>,
79964    ) -> &'a mut Self {
79965        self.forum_topic_closed =
79966            forum_topic_closed.map(|forum_topic_closed| BoxWrapper(Unbox(forum_topic_closed)));
79967        self
79968    }
79969    #[allow(rustdoc::invalid_html_tags)]
79970    #[doc = "Optional. Service message: forum topic closed"]
79971    fn rhai_get_forum_topic_closed(&mut self) -> Option<ForumTopicClosed> {
79972        self.forum_topic_closed.as_ref().map(|v| v.clone().into())
79973    }
79974    #[allow(rustdoc::invalid_html_tags)]
79975    #[doc = "Optional. Service message: forum topic reopened"]
79976    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79977    pub fn get_forum_topic_reopened<'a>(&'a self) -> Option<&'a ForumTopicReopened> {
79978        self.forum_topic_reopened.as_ref().map(|v| v.inner_ref())
79979    }
79980    #[allow(rustdoc::invalid_html_tags)]
79981    #[doc = "Optional. Service message: forum topic reopened"]
79982    #[allow(clippy::needless_lifetimes)]
79983    pub fn set_forum_topic_reopened<'a>(
79984        &'a mut self,
79985        forum_topic_reopened: Option<ForumTopicReopened>,
79986    ) -> &'a mut Self {
79987        self.forum_topic_reopened = forum_topic_reopened
79988            .map(|forum_topic_reopened| BoxWrapper(Unbox(forum_topic_reopened)));
79989        self
79990    }
79991    #[allow(rustdoc::invalid_html_tags)]
79992    #[doc = "Optional. Service message: forum topic reopened"]
79993    fn rhai_get_forum_topic_reopened(&mut self) -> Option<ForumTopicReopened> {
79994        self.forum_topic_reopened.as_ref().map(|v| v.clone().into())
79995    }
79996    #[allow(rustdoc::invalid_html_tags)]
79997    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
79998    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
79999    pub fn get_general_forum_topic_hidden<'a>(&'a self) -> Option<&'a GeneralForumTopicHidden> {
80000        self.general_forum_topic_hidden
80001            .as_ref()
80002            .map(|v| v.inner_ref())
80003    }
80004    #[allow(rustdoc::invalid_html_tags)]
80005    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
80006    #[allow(clippy::needless_lifetimes)]
80007    pub fn set_general_forum_topic_hidden<'a>(
80008        &'a mut self,
80009        general_forum_topic_hidden: Option<GeneralForumTopicHidden>,
80010    ) -> &'a mut Self {
80011        self.general_forum_topic_hidden = general_forum_topic_hidden
80012            .map(|general_forum_topic_hidden| BoxWrapper(Unbox(general_forum_topic_hidden)));
80013        self
80014    }
80015    #[allow(rustdoc::invalid_html_tags)]
80016    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
80017    fn rhai_get_general_forum_topic_hidden(&mut self) -> Option<GeneralForumTopicHidden> {
80018        self.general_forum_topic_hidden
80019            .as_ref()
80020            .map(|v| v.clone().into())
80021    }
80022    #[allow(rustdoc::invalid_html_tags)]
80023    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
80024    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80025    pub fn get_general_forum_topic_unhidden<'a>(&'a self) -> Option<&'a GeneralForumTopicUnhidden> {
80026        self.general_forum_topic_unhidden
80027            .as_ref()
80028            .map(|v| v.inner_ref())
80029    }
80030    #[allow(rustdoc::invalid_html_tags)]
80031    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
80032    #[allow(clippy::needless_lifetimes)]
80033    pub fn set_general_forum_topic_unhidden<'a>(
80034        &'a mut self,
80035        general_forum_topic_unhidden: Option<GeneralForumTopicUnhidden>,
80036    ) -> &'a mut Self {
80037        self.general_forum_topic_unhidden = general_forum_topic_unhidden
80038            .map(|general_forum_topic_unhidden| BoxWrapper(Unbox(general_forum_topic_unhidden)));
80039        self
80040    }
80041    #[allow(rustdoc::invalid_html_tags)]
80042    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
80043    fn rhai_get_general_forum_topic_unhidden(&mut self) -> Option<GeneralForumTopicUnhidden> {
80044        self.general_forum_topic_unhidden
80045            .as_ref()
80046            .map(|v| v.clone().into())
80047    }
80048    #[allow(rustdoc::invalid_html_tags)]
80049    #[doc = "Optional. Service message: a scheduled giveaway was created"]
80050    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80051    pub fn get_giveaway_created<'a>(&'a self) -> Option<&'a GiveawayCreated> {
80052        self.giveaway_created.as_ref().map(|v| v.inner_ref())
80053    }
80054    #[allow(rustdoc::invalid_html_tags)]
80055    #[doc = "Optional. Service message: a scheduled giveaway was created"]
80056    #[allow(clippy::needless_lifetimes)]
80057    pub fn set_giveaway_created<'a>(
80058        &'a mut self,
80059        giveaway_created: Option<GiveawayCreated>,
80060    ) -> &'a mut Self {
80061        self.giveaway_created =
80062            giveaway_created.map(|giveaway_created| BoxWrapper(Unbox(giveaway_created)));
80063        self
80064    }
80065    #[allow(rustdoc::invalid_html_tags)]
80066    #[doc = "Optional. Service message: a scheduled giveaway was created"]
80067    fn rhai_get_giveaway_created(&mut self) -> Option<GiveawayCreated> {
80068        self.giveaway_created.as_ref().map(|v| v.clone().into())
80069    }
80070    #[allow(rustdoc::invalid_html_tags)]
80071    #[doc = "Optional. The message is a scheduled giveaway message"]
80072    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80073    pub fn get_giveaway<'a>(&'a self) -> Option<&'a Giveaway> {
80074        self.giveaway.as_ref().map(|v| v.inner_ref())
80075    }
80076    #[allow(rustdoc::invalid_html_tags)]
80077    #[doc = "Optional. The message is a scheduled giveaway message"]
80078    #[allow(clippy::needless_lifetimes)]
80079    pub fn set_giveaway<'a>(&'a mut self, giveaway: Option<Giveaway>) -> &'a mut Self {
80080        self.giveaway = giveaway.map(|giveaway| BoxWrapper(Unbox(giveaway)));
80081        self
80082    }
80083    #[allow(rustdoc::invalid_html_tags)]
80084    #[doc = "Optional. The message is a scheduled giveaway message"]
80085    fn rhai_get_giveaway(&mut self) -> Option<Giveaway> {
80086        self.giveaway.as_ref().map(|v| v.clone().into())
80087    }
80088    #[allow(rustdoc::invalid_html_tags)]
80089    #[doc = "Optional. A giveaway with public winners was completed"]
80090    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80091    pub fn get_giveaway_winners<'a>(&'a self) -> Option<&'a GiveawayWinners> {
80092        self.giveaway_winners.as_ref().map(|v| v.inner_ref())
80093    }
80094    #[allow(rustdoc::invalid_html_tags)]
80095    #[doc = "Optional. A giveaway with public winners was completed"]
80096    #[allow(clippy::needless_lifetimes)]
80097    pub fn set_giveaway_winners<'a>(
80098        &'a mut self,
80099        giveaway_winners: Option<GiveawayWinners>,
80100    ) -> &'a mut Self {
80101        self.giveaway_winners =
80102            giveaway_winners.map(|giveaway_winners| BoxWrapper(Unbox(giveaway_winners)));
80103        self
80104    }
80105    #[allow(rustdoc::invalid_html_tags)]
80106    #[doc = "Optional. A giveaway with public winners was completed"]
80107    fn rhai_get_giveaway_winners(&mut self) -> Option<GiveawayWinners> {
80108        self.giveaway_winners.as_ref().map(|v| v.clone().into())
80109    }
80110    #[allow(rustdoc::invalid_html_tags)]
80111    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
80112    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80113    pub fn get_giveaway_completed<'a>(&'a self) -> Option<&'a GiveawayCompleted> {
80114        self.giveaway_completed.as_ref().map(|v| v.inner_ref())
80115    }
80116    #[allow(rustdoc::invalid_html_tags)]
80117    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
80118    #[allow(clippy::needless_lifetimes)]
80119    pub fn set_giveaway_completed<'a>(
80120        &'a mut self,
80121        giveaway_completed: Option<GiveawayCompleted>,
80122    ) -> &'a mut Self {
80123        self.giveaway_completed =
80124            giveaway_completed.map(|giveaway_completed| BoxWrapper(Box::new(giveaway_completed)));
80125        self
80126    }
80127    #[allow(rustdoc::invalid_html_tags)]
80128    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
80129    fn rhai_get_giveaway_completed(&mut self) -> Option<GiveawayCompleted> {
80130        self.giveaway_completed.as_ref().map(|v| v.clone().into())
80131    }
80132    #[allow(rustdoc::invalid_html_tags)]
80133    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
80134    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80135    pub fn get_paid_message_price_changed<'a>(&'a self) -> Option<&'a PaidMessagePriceChanged> {
80136        self.paid_message_price_changed
80137            .as_ref()
80138            .map(|v| v.inner_ref())
80139    }
80140    #[allow(rustdoc::invalid_html_tags)]
80141    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
80142    #[allow(clippy::needless_lifetimes)]
80143    pub fn set_paid_message_price_changed<'a>(
80144        &'a mut self,
80145        paid_message_price_changed: Option<PaidMessagePriceChanged>,
80146    ) -> &'a mut Self {
80147        self.paid_message_price_changed = paid_message_price_changed
80148            .map(|paid_message_price_changed| BoxWrapper(Unbox(paid_message_price_changed)));
80149        self
80150    }
80151    #[allow(rustdoc::invalid_html_tags)]
80152    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
80153    fn rhai_get_paid_message_price_changed(&mut self) -> Option<PaidMessagePriceChanged> {
80154        self.paid_message_price_changed
80155            .as_ref()
80156            .map(|v| v.clone().into())
80157    }
80158    #[allow(rustdoc::invalid_html_tags)]
80159    #[doc = "Optional. Service message: a suggested post was approved"]
80160    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80161    pub fn get_suggested_post_approved<'a>(&'a self) -> Option<&'a SuggestedPostApproved> {
80162        self.suggested_post_approved.as_ref().map(|v| v.inner_ref())
80163    }
80164    #[allow(rustdoc::invalid_html_tags)]
80165    #[doc = "Optional. Service message: a suggested post was approved"]
80166    #[allow(clippy::needless_lifetimes)]
80167    pub fn set_suggested_post_approved<'a>(
80168        &'a mut self,
80169        suggested_post_approved: Option<SuggestedPostApproved>,
80170    ) -> &'a mut Self {
80171        self.suggested_post_approved = suggested_post_approved
80172            .map(|suggested_post_approved| BoxWrapper(Unbox(suggested_post_approved)));
80173        self
80174    }
80175    #[allow(rustdoc::invalid_html_tags)]
80176    #[doc = "Optional. Service message: a suggested post was approved"]
80177    fn rhai_get_suggested_post_approved(&mut self) -> Option<SuggestedPostApproved> {
80178        self.suggested_post_approved
80179            .as_ref()
80180            .map(|v| v.clone().into())
80181    }
80182    #[allow(rustdoc::invalid_html_tags)]
80183    #[doc = "Optional. Service message: approval of a suggested post has failed"]
80184    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80185    pub fn get_suggested_post_approval_failed<'a>(
80186        &'a self,
80187    ) -> Option<&'a SuggestedPostApprovalFailed> {
80188        self.suggested_post_approval_failed
80189            .as_ref()
80190            .map(|v| v.inner_ref())
80191    }
80192    #[allow(rustdoc::invalid_html_tags)]
80193    #[doc = "Optional. Service message: approval of a suggested post has failed"]
80194    #[allow(clippy::needless_lifetimes)]
80195    pub fn set_suggested_post_approval_failed<'a>(
80196        &'a mut self,
80197        suggested_post_approval_failed: Option<SuggestedPostApprovalFailed>,
80198    ) -> &'a mut Self {
80199        self.suggested_post_approval_failed =
80200            suggested_post_approval_failed.map(|suggested_post_approval_failed| {
80201                BoxWrapper(Unbox(suggested_post_approval_failed))
80202            });
80203        self
80204    }
80205    #[allow(rustdoc::invalid_html_tags)]
80206    #[doc = "Optional. Service message: approval of a suggested post has failed"]
80207    fn rhai_get_suggested_post_approval_failed(&mut self) -> Option<SuggestedPostApprovalFailed> {
80208        self.suggested_post_approval_failed
80209            .as_ref()
80210            .map(|v| v.clone().into())
80211    }
80212    #[allow(rustdoc::invalid_html_tags)]
80213    #[doc = "Optional. Service message: a suggested post was declined"]
80214    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80215    pub fn get_suggested_post_declined<'a>(&'a self) -> Option<&'a SuggestedPostDeclined> {
80216        self.suggested_post_declined.as_ref().map(|v| v.inner_ref())
80217    }
80218    #[allow(rustdoc::invalid_html_tags)]
80219    #[doc = "Optional. Service message: a suggested post was declined"]
80220    #[allow(clippy::needless_lifetimes)]
80221    pub fn set_suggested_post_declined<'a>(
80222        &'a mut self,
80223        suggested_post_declined: Option<SuggestedPostDeclined>,
80224    ) -> &'a mut Self {
80225        self.suggested_post_declined = suggested_post_declined
80226            .map(|suggested_post_declined| BoxWrapper(Unbox(suggested_post_declined)));
80227        self
80228    }
80229    #[allow(rustdoc::invalid_html_tags)]
80230    #[doc = "Optional. Service message: a suggested post was declined"]
80231    fn rhai_get_suggested_post_declined(&mut self) -> Option<SuggestedPostDeclined> {
80232        self.suggested_post_declined
80233            .as_ref()
80234            .map(|v| v.clone().into())
80235    }
80236    #[allow(rustdoc::invalid_html_tags)]
80237    #[doc = "Optional. Service message: payment for a suggested post was received"]
80238    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80239    pub fn get_suggested_post_paid<'a>(&'a self) -> Option<&'a SuggestedPostPaid> {
80240        self.suggested_post_paid.as_ref().map(|v| v.inner_ref())
80241    }
80242    #[allow(rustdoc::invalid_html_tags)]
80243    #[doc = "Optional. Service message: payment for a suggested post was received"]
80244    #[allow(clippy::needless_lifetimes)]
80245    pub fn set_suggested_post_paid<'a>(
80246        &'a mut self,
80247        suggested_post_paid: Option<SuggestedPostPaid>,
80248    ) -> &'a mut Self {
80249        self.suggested_post_paid =
80250            suggested_post_paid.map(|suggested_post_paid| BoxWrapper(Unbox(suggested_post_paid)));
80251        self
80252    }
80253    #[allow(rustdoc::invalid_html_tags)]
80254    #[doc = "Optional. Service message: payment for a suggested post was received"]
80255    fn rhai_get_suggested_post_paid(&mut self) -> Option<SuggestedPostPaid> {
80256        self.suggested_post_paid.as_ref().map(|v| v.clone().into())
80257    }
80258    #[allow(rustdoc::invalid_html_tags)]
80259    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
80260    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80261    pub fn get_suggested_post_refunded<'a>(&'a self) -> Option<&'a SuggestedPostRefunded> {
80262        self.suggested_post_refunded.as_ref().map(|v| v.inner_ref())
80263    }
80264    #[allow(rustdoc::invalid_html_tags)]
80265    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
80266    #[allow(clippy::needless_lifetimes)]
80267    pub fn set_suggested_post_refunded<'a>(
80268        &'a mut self,
80269        suggested_post_refunded: Option<SuggestedPostRefunded>,
80270    ) -> &'a mut Self {
80271        self.suggested_post_refunded = suggested_post_refunded
80272            .map(|suggested_post_refunded| BoxWrapper(Unbox(suggested_post_refunded)));
80273        self
80274    }
80275    #[allow(rustdoc::invalid_html_tags)]
80276    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
80277    fn rhai_get_suggested_post_refunded(&mut self) -> Option<SuggestedPostRefunded> {
80278        self.suggested_post_refunded
80279            .as_ref()
80280            .map(|v| v.clone().into())
80281    }
80282    #[allow(rustdoc::invalid_html_tags)]
80283    #[doc = "Optional. Service message: video chat scheduled"]
80284    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80285    pub fn get_video_chat_scheduled<'a>(&'a self) -> Option<&'a VideoChatScheduled> {
80286        self.video_chat_scheduled.as_ref().map(|v| v.inner_ref())
80287    }
80288    #[allow(rustdoc::invalid_html_tags)]
80289    #[doc = "Optional. Service message: video chat scheduled"]
80290    #[allow(clippy::needless_lifetimes)]
80291    pub fn set_video_chat_scheduled<'a>(
80292        &'a mut self,
80293        video_chat_scheduled: Option<VideoChatScheduled>,
80294    ) -> &'a mut Self {
80295        self.video_chat_scheduled = video_chat_scheduled
80296            .map(|video_chat_scheduled| BoxWrapper(Unbox(video_chat_scheduled)));
80297        self
80298    }
80299    #[allow(rustdoc::invalid_html_tags)]
80300    #[doc = "Optional. Service message: video chat scheduled"]
80301    fn rhai_get_video_chat_scheduled(&mut self) -> Option<VideoChatScheduled> {
80302        self.video_chat_scheduled.as_ref().map(|v| v.clone().into())
80303    }
80304    #[allow(rustdoc::invalid_html_tags)]
80305    #[doc = "Optional. Service message: video chat started"]
80306    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80307    pub fn get_video_chat_started<'a>(&'a self) -> Option<&'a VideoChatStarted> {
80308        self.video_chat_started.as_ref().map(|v| v.inner_ref())
80309    }
80310    #[allow(rustdoc::invalid_html_tags)]
80311    #[doc = "Optional. Service message: video chat started"]
80312    #[allow(clippy::needless_lifetimes)]
80313    pub fn set_video_chat_started<'a>(
80314        &'a mut self,
80315        video_chat_started: Option<VideoChatStarted>,
80316    ) -> &'a mut Self {
80317        self.video_chat_started =
80318            video_chat_started.map(|video_chat_started| BoxWrapper(Unbox(video_chat_started)));
80319        self
80320    }
80321    #[allow(rustdoc::invalid_html_tags)]
80322    #[doc = "Optional. Service message: video chat started"]
80323    fn rhai_get_video_chat_started(&mut self) -> Option<VideoChatStarted> {
80324        self.video_chat_started.as_ref().map(|v| v.clone().into())
80325    }
80326    #[allow(rustdoc::invalid_html_tags)]
80327    #[doc = "Optional. Service message: video chat ended"]
80328    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80329    pub fn get_video_chat_ended<'a>(&'a self) -> Option<&'a VideoChatEnded> {
80330        self.video_chat_ended.as_ref().map(|v| v.inner_ref())
80331    }
80332    #[allow(rustdoc::invalid_html_tags)]
80333    #[doc = "Optional. Service message: video chat ended"]
80334    #[allow(clippy::needless_lifetimes)]
80335    pub fn set_video_chat_ended<'a>(
80336        &'a mut self,
80337        video_chat_ended: Option<VideoChatEnded>,
80338    ) -> &'a mut Self {
80339        self.video_chat_ended =
80340            video_chat_ended.map(|video_chat_ended| BoxWrapper(Unbox(video_chat_ended)));
80341        self
80342    }
80343    #[allow(rustdoc::invalid_html_tags)]
80344    #[doc = "Optional. Service message: video chat ended"]
80345    fn rhai_get_video_chat_ended(&mut self) -> Option<VideoChatEnded> {
80346        self.video_chat_ended.as_ref().map(|v| v.clone().into())
80347    }
80348    #[allow(rustdoc::invalid_html_tags)]
80349    #[doc = "Optional. Service message: new participants invited to a video chat"]
80350    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80351    pub fn get_video_chat_participants_invited<'a>(
80352        &'a self,
80353    ) -> Option<&'a VideoChatParticipantsInvited> {
80354        self.video_chat_participants_invited
80355            .as_ref()
80356            .map(|v| v.inner_ref())
80357    }
80358    #[allow(rustdoc::invalid_html_tags)]
80359    #[doc = "Optional. Service message: new participants invited to a video chat"]
80360    #[allow(clippy::needless_lifetimes)]
80361    pub fn set_video_chat_participants_invited<'a>(
80362        &'a mut self,
80363        video_chat_participants_invited: Option<VideoChatParticipantsInvited>,
80364    ) -> &'a mut Self {
80365        self.video_chat_participants_invited =
80366            video_chat_participants_invited.map(|video_chat_participants_invited| {
80367                BoxWrapper(Unbox(video_chat_participants_invited))
80368            });
80369        self
80370    }
80371    #[allow(rustdoc::invalid_html_tags)]
80372    #[doc = "Optional. Service message: new participants invited to a video chat"]
80373    fn rhai_get_video_chat_participants_invited(&mut self) -> Option<VideoChatParticipantsInvited> {
80374        self.video_chat_participants_invited
80375            .as_ref()
80376            .map(|v| v.clone().into())
80377    }
80378    #[allow(rustdoc::invalid_html_tags)]
80379    #[doc = "Optional. Service message: data sent by a Web App"]
80380    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80381    pub fn get_web_app_data<'a>(&'a self) -> Option<&'a WebAppData> {
80382        self.web_app_data.as_ref().map(|v| v.inner_ref())
80383    }
80384    #[allow(rustdoc::invalid_html_tags)]
80385    #[doc = "Optional. Service message: data sent by a Web App"]
80386    #[allow(clippy::needless_lifetimes)]
80387    pub fn set_web_app_data<'a>(&'a mut self, web_app_data: Option<WebAppData>) -> &'a mut Self {
80388        self.web_app_data = web_app_data.map(|web_app_data| BoxWrapper(Unbox(web_app_data)));
80389        self
80390    }
80391    #[allow(rustdoc::invalid_html_tags)]
80392    #[doc = "Optional. Service message: data sent by a Web App"]
80393    fn rhai_get_web_app_data(&mut self) -> Option<WebAppData> {
80394        self.web_app_data.as_ref().map(|v| v.clone().into())
80395    }
80396    #[allow(rustdoc::invalid_html_tags)]
80397    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
80398    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80399    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
80400        self.reply_markup.as_ref().map(|v| v.inner_ref())
80401    }
80402    #[allow(rustdoc::invalid_html_tags)]
80403    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
80404    #[allow(clippy::needless_lifetimes)]
80405    pub fn set_reply_markup<'a>(
80406        &'a mut self,
80407        reply_markup: Option<InlineKeyboardMarkup>,
80408    ) -> &'a mut Self {
80409        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
80410        self
80411    }
80412    #[allow(rustdoc::invalid_html_tags)]
80413    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
80414    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
80415        self.reply_markup.as_ref().map(|v| v.clone().into())
80416    }
80417}
80418#[allow(dead_code)]
80419impl ChatPhoto {
80420    #[allow(clippy::too_many_arguments)]
80421    pub fn new(
80422        small_file_id: String,
80423        small_file_unique_id: String,
80424        big_file_id: String,
80425        big_file_unique_id: String,
80426    ) -> Self {
80427        Self {
80428            small_file_id,
80429            small_file_unique_id,
80430            big_file_id,
80431            big_file_unique_id,
80432        }
80433    }
80434    #[allow(rustdoc::invalid_html_tags)]
80435    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
80436    #[allow(clippy::needless_lifetimes)]
80437    pub fn get_small_file_id<'a>(&'a self) -> &'a str {
80438        self.small_file_id.as_str()
80439    }
80440    #[allow(rustdoc::invalid_html_tags)]
80441    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
80442    #[allow(clippy::needless_lifetimes)]
80443    pub fn set_small_file_id<'a>(&'a mut self, small_file_id: String) -> &'a mut Self {
80444        self.small_file_id = small_file_id;
80445        self
80446    }
80447    #[allow(rustdoc::invalid_html_tags)]
80448    #[doc = "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
80449    fn rhai_get_small_file_id(&mut self) -> String {
80450        self.small_file_id.clone()
80451    }
80452    #[allow(rustdoc::invalid_html_tags)]
80453    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
80454    #[allow(clippy::needless_lifetimes)]
80455    pub fn get_small_file_unique_id<'a>(&'a self) -> &'a str {
80456        self.small_file_unique_id.as_str()
80457    }
80458    #[allow(rustdoc::invalid_html_tags)]
80459    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
80460    #[allow(clippy::needless_lifetimes)]
80461    pub fn set_small_file_unique_id<'a>(
80462        &'a mut self,
80463        small_file_unique_id: String,
80464    ) -> &'a mut Self {
80465        self.small_file_unique_id = small_file_unique_id;
80466        self
80467    }
80468    #[allow(rustdoc::invalid_html_tags)]
80469    #[doc = "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
80470    fn rhai_get_small_file_unique_id(&mut self) -> String {
80471        self.small_file_unique_id.clone()
80472    }
80473    #[allow(rustdoc::invalid_html_tags)]
80474    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
80475    #[allow(clippy::needless_lifetimes)]
80476    pub fn get_big_file_id<'a>(&'a self) -> &'a str {
80477        self.big_file_id.as_str()
80478    }
80479    #[allow(rustdoc::invalid_html_tags)]
80480    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
80481    #[allow(clippy::needless_lifetimes)]
80482    pub fn set_big_file_id<'a>(&'a mut self, big_file_id: String) -> &'a mut Self {
80483        self.big_file_id = big_file_id;
80484        self
80485    }
80486    #[allow(rustdoc::invalid_html_tags)]
80487    #[doc = "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed."]
80488    fn rhai_get_big_file_id(&mut self) -> String {
80489        self.big_file_id.clone()
80490    }
80491    #[allow(rustdoc::invalid_html_tags)]
80492    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
80493    #[allow(clippy::needless_lifetimes)]
80494    pub fn get_big_file_unique_id<'a>(&'a self) -> &'a str {
80495        self.big_file_unique_id.as_str()
80496    }
80497    #[allow(rustdoc::invalid_html_tags)]
80498    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
80499    #[allow(clippy::needless_lifetimes)]
80500    pub fn set_big_file_unique_id<'a>(&'a mut self, big_file_unique_id: String) -> &'a mut Self {
80501        self.big_file_unique_id = big_file_unique_id;
80502        self
80503    }
80504    #[allow(rustdoc::invalid_html_tags)]
80505    #[doc = "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
80506    fn rhai_get_big_file_unique_id(&mut self) -> String {
80507        self.big_file_unique_id.clone()
80508    }
80509}
80510#[allow(dead_code)]
80511impl InlineQueryResultGame {
80512    #[allow(clippy::too_many_arguments)]
80513    pub fn new(id: String, game_short_name: String) -> Self {
80514        Self {
80515            tg_type: "game".to_owned(),
80516            id,
80517            game_short_name,
80518            reply_markup: None,
80519        }
80520    }
80521    #[allow(rustdoc::invalid_html_tags)]
80522    #[doc = "Type of the result, must be game"]
80523    #[allow(clippy::needless_lifetimes)]
80524    pub fn get_tg_type<'a>(&'a self) -> &'a str {
80525        self.tg_type.as_str()
80526    }
80527    #[allow(rustdoc::invalid_html_tags)]
80528    #[doc = "Type of the result, must be game"]
80529    #[allow(clippy::needless_lifetimes)]
80530    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
80531        self.tg_type = tg_type;
80532        self
80533    }
80534    #[allow(rustdoc::invalid_html_tags)]
80535    #[doc = "Type of the result, must be game"]
80536    fn rhai_get_tg_type(&mut self) -> String {
80537        self.tg_type.clone()
80538    }
80539    #[allow(rustdoc::invalid_html_tags)]
80540    #[doc = "Unique identifier for this result, 1-64 bytes"]
80541    #[allow(clippy::needless_lifetimes)]
80542    pub fn get_id<'a>(&'a self) -> &'a str {
80543        self.id.as_str()
80544    }
80545    #[allow(rustdoc::invalid_html_tags)]
80546    #[doc = "Unique identifier for this result, 1-64 bytes"]
80547    #[allow(clippy::needless_lifetimes)]
80548    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
80549        self.id = id;
80550        self
80551    }
80552    #[allow(rustdoc::invalid_html_tags)]
80553    #[doc = "Unique identifier for this result, 1-64 bytes"]
80554    fn rhai_get_id(&mut self) -> String {
80555        self.id.clone()
80556    }
80557    #[allow(rustdoc::invalid_html_tags)]
80558    #[doc = "Short name of the game"]
80559    #[allow(clippy::needless_lifetimes)]
80560    pub fn get_game_short_name<'a>(&'a self) -> &'a str {
80561        self.game_short_name.as_str()
80562    }
80563    #[allow(rustdoc::invalid_html_tags)]
80564    #[doc = "Short name of the game"]
80565    #[allow(clippy::needless_lifetimes)]
80566    pub fn set_game_short_name<'a>(&'a mut self, game_short_name: String) -> &'a mut Self {
80567        self.game_short_name = game_short_name;
80568        self
80569    }
80570    #[allow(rustdoc::invalid_html_tags)]
80571    #[doc = "Short name of the game"]
80572    fn rhai_get_game_short_name(&mut self) -> String {
80573        self.game_short_name.clone()
80574    }
80575    #[allow(rustdoc::invalid_html_tags)]
80576    #[doc = "Optional. Inline keyboard attached to the message"]
80577    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80578    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
80579        self.reply_markup.as_ref().map(|v| v.inner_ref())
80580    }
80581    #[allow(rustdoc::invalid_html_tags)]
80582    #[doc = "Optional. Inline keyboard attached to the message"]
80583    #[allow(clippy::needless_lifetimes)]
80584    pub fn set_reply_markup<'a>(
80585        &'a mut self,
80586        reply_markup: Option<InlineKeyboardMarkup>,
80587    ) -> &'a mut Self {
80588        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
80589        self
80590    }
80591    #[allow(rustdoc::invalid_html_tags)]
80592    #[doc = "Optional. Inline keyboard attached to the message"]
80593    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
80594        self.reply_markup.as_ref().map(|v| v.clone().into())
80595    }
80596}
80597#[allow(dead_code)]
80598impl RevenueWithdrawalStateFailed {
80599    #[allow(clippy::too_many_arguments)]
80600    pub fn new() -> Self {
80601        Self {
80602            tg_type: "RevenueWithdrawalStateFailed".to_owned(),
80603        }
80604    }
80605    #[allow(rustdoc::invalid_html_tags)]
80606    #[doc = "Type of the state, always \"failed\""]
80607    #[allow(clippy::needless_lifetimes)]
80608    pub fn get_tg_type<'a>(&'a self) -> &'a str {
80609        self.tg_type.as_str()
80610    }
80611    #[allow(rustdoc::invalid_html_tags)]
80612    #[doc = "Type of the state, always \"failed\""]
80613    #[allow(clippy::needless_lifetimes)]
80614    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
80615        self.tg_type = tg_type;
80616        self
80617    }
80618    #[allow(rustdoc::invalid_html_tags)]
80619    #[doc = "Type of the state, always \"failed\""]
80620    fn rhai_get_tg_type(&mut self) -> String {
80621        self.tg_type.clone()
80622    }
80623}
80624#[allow(dead_code)]
80625impl MessageEntity {
80626    #[allow(clippy::too_many_arguments)]
80627    pub fn new(offset: i64, length: i64) -> Self {
80628        Self {
80629            tg_type: "MessageEntity".to_owned(),
80630            offset,
80631            length,
80632            url: None,
80633            user: None,
80634            language: None,
80635            custom_emoji_id: None,
80636        }
80637    }
80638    #[allow(rustdoc::invalid_html_tags)]
80639    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
80640    #[allow(clippy::needless_lifetimes)]
80641    pub fn get_tg_type<'a>(&'a self) -> &'a str {
80642        self.tg_type.as_str()
80643    }
80644    #[allow(rustdoc::invalid_html_tags)]
80645    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
80646    #[allow(clippy::needless_lifetimes)]
80647    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
80648        self.tg_type = tg_type;
80649        self
80650    }
80651    #[allow(rustdoc::invalid_html_tags)]
80652    #[doc = "Type of the entity. Currently, can be \"mention\" (@username), \"hashtag\" (#hashtag or #hashtag@chatusername), \"cashtag\" ($USD or $USD@chatusername), \"bot_command\" (/start@jobs_bot), \"url\" (https://telegram.org), \"email\" (do-not-reply@telegram.org), \"phone_number\" (+1-212-555-0123), \"bold\" (bold text), \"italic\" (italic text), \"underline\" (underlined text), \"strikethrough\" (strikethrough text), \"spoiler\" (spoiler message), \"blockquote\" (block quotation), \"expandable_blockquote\" (collapsed-by-default block quotation), \"code\" (monowidth string), \"pre\" (monowidth block), \"text_link\" (for clickable text URLs), \"text_mention\" (for users without usernames), \"custom_emoji\" (for inline custom emoji stickers)"]
80653    fn rhai_get_tg_type(&mut self) -> String {
80654        self.tg_type.clone()
80655    }
80656    #[allow(rustdoc::invalid_html_tags)]
80657    #[doc = "Offset in UTF-16 code units to the start of the entity"]
80658    #[allow(clippy::needless_lifetimes)]
80659    pub fn get_offset<'a>(&'a self) -> i64 {
80660        self.offset
80661    }
80662    #[allow(rustdoc::invalid_html_tags)]
80663    #[doc = "Offset in UTF-16 code units to the start of the entity"]
80664    #[allow(clippy::needless_lifetimes)]
80665    pub fn set_offset<'a>(&'a mut self, offset: i64) -> &'a mut Self {
80666        self.offset = offset;
80667        self
80668    }
80669    #[allow(rustdoc::invalid_html_tags)]
80670    #[doc = "Offset in UTF-16 code units to the start of the entity"]
80671    fn rhai_get_offset(&mut self) -> i64 {
80672        self.offset
80673    }
80674    #[allow(rustdoc::invalid_html_tags)]
80675    #[doc = "Length of the entity in UTF-16 code units"]
80676    #[allow(clippy::needless_lifetimes)]
80677    pub fn get_length<'a>(&'a self) -> i64 {
80678        self.length
80679    }
80680    #[allow(rustdoc::invalid_html_tags)]
80681    #[doc = "Length of the entity in UTF-16 code units"]
80682    #[allow(clippy::needless_lifetimes)]
80683    pub fn set_length<'a>(&'a mut self, length: i64) -> &'a mut Self {
80684        self.length = length;
80685        self
80686    }
80687    #[allow(rustdoc::invalid_html_tags)]
80688    #[doc = "Length of the entity in UTF-16 code units"]
80689    fn rhai_get_length(&mut self) -> i64 {
80690        self.length
80691    }
80692    #[allow(rustdoc::invalid_html_tags)]
80693    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
80694    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80695    pub fn get_url<'a>(&'a self) -> Option<&'a str> {
80696        self.url.as_ref().map(|v| v.as_str())
80697    }
80698    #[allow(rustdoc::invalid_html_tags)]
80699    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
80700    #[allow(clippy::needless_lifetimes)]
80701    pub fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self {
80702        self.url = url;
80703        self
80704    }
80705    #[allow(rustdoc::invalid_html_tags)]
80706    #[doc = "Optional. For \"text_link\" only, URL that will be opened after user taps on the text"]
80707    fn rhai_get_url(&mut self) -> Option<String> {
80708        self.url.as_ref().cloned()
80709    }
80710    #[allow(rustdoc::invalid_html_tags)]
80711    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
80712    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80713    pub fn get_user<'a>(&'a self) -> Option<&'a User> {
80714        self.user.as_ref().map(|v| v.inner_ref())
80715    }
80716    #[allow(rustdoc::invalid_html_tags)]
80717    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
80718    #[allow(clippy::needless_lifetimes)]
80719    pub fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self {
80720        self.user = user.map(|user| BoxWrapper(Unbox(user)));
80721        self
80722    }
80723    #[allow(rustdoc::invalid_html_tags)]
80724    #[doc = "Optional. For \"text_mention\" only, the mentioned user"]
80725    fn rhai_get_user(&mut self) -> Option<User> {
80726        self.user.as_ref().map(|v| v.clone().into())
80727    }
80728    #[allow(rustdoc::invalid_html_tags)]
80729    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
80730    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80731    pub fn get_language<'a>(&'a self) -> Option<&'a str> {
80732        self.language.as_ref().map(|v| v.as_str())
80733    }
80734    #[allow(rustdoc::invalid_html_tags)]
80735    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
80736    #[allow(clippy::needless_lifetimes)]
80737    pub fn set_language<'a>(&'a mut self, language: Option<String>) -> &'a mut Self {
80738        self.language = language;
80739        self
80740    }
80741    #[allow(rustdoc::invalid_html_tags)]
80742    #[doc = "Optional. For \"pre\" only, the programming language of the entity text"]
80743    fn rhai_get_language(&mut self) -> Option<String> {
80744        self.language.as_ref().cloned()
80745    }
80746    #[allow(rustdoc::invalid_html_tags)]
80747    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
80748    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80749    pub fn get_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
80750        self.custom_emoji_id.as_ref().map(|v| v.as_str())
80751    }
80752    #[allow(rustdoc::invalid_html_tags)]
80753    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
80754    #[allow(clippy::needless_lifetimes)]
80755    pub fn set_custom_emoji_id<'a>(&'a mut self, custom_emoji_id: Option<String>) -> &'a mut Self {
80756        self.custom_emoji_id = custom_emoji_id;
80757        self
80758    }
80759    #[allow(rustdoc::invalid_html_tags)]
80760    #[doc = "Optional. For \"custom_emoji\" only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker"]
80761    fn rhai_get_custom_emoji_id(&mut self) -> Option<String> {
80762        self.custom_emoji_id.as_ref().cloned()
80763    }
80764}
80765#[allow(dead_code)]
80766impl UniqueGiftBackdropColors {
80767    #[allow(clippy::too_many_arguments)]
80768    pub fn new(center_color: i64, edge_color: i64, symbol_color: i64, text_color: i64) -> Self {
80769        Self {
80770            center_color,
80771            edge_color,
80772            symbol_color,
80773            text_color,
80774        }
80775    }
80776    #[allow(rustdoc::invalid_html_tags)]
80777    #[doc = "The color in the center of the backdrop in RGB format"]
80778    #[allow(clippy::needless_lifetimes)]
80779    pub fn get_center_color<'a>(&'a self) -> i64 {
80780        self.center_color
80781    }
80782    #[allow(rustdoc::invalid_html_tags)]
80783    #[doc = "The color in the center of the backdrop in RGB format"]
80784    #[allow(clippy::needless_lifetimes)]
80785    pub fn set_center_color<'a>(&'a mut self, center_color: i64) -> &'a mut Self {
80786        self.center_color = center_color;
80787        self
80788    }
80789    #[allow(rustdoc::invalid_html_tags)]
80790    #[doc = "The color in the center of the backdrop in RGB format"]
80791    fn rhai_get_center_color(&mut self) -> i64 {
80792        self.center_color
80793    }
80794    #[allow(rustdoc::invalid_html_tags)]
80795    #[doc = "The color on the edges of the backdrop in RGB format"]
80796    #[allow(clippy::needless_lifetimes)]
80797    pub fn get_edge_color<'a>(&'a self) -> i64 {
80798        self.edge_color
80799    }
80800    #[allow(rustdoc::invalid_html_tags)]
80801    #[doc = "The color on the edges of the backdrop in RGB format"]
80802    #[allow(clippy::needless_lifetimes)]
80803    pub fn set_edge_color<'a>(&'a mut self, edge_color: i64) -> &'a mut Self {
80804        self.edge_color = edge_color;
80805        self
80806    }
80807    #[allow(rustdoc::invalid_html_tags)]
80808    #[doc = "The color on the edges of the backdrop in RGB format"]
80809    fn rhai_get_edge_color(&mut self) -> i64 {
80810        self.edge_color
80811    }
80812    #[allow(rustdoc::invalid_html_tags)]
80813    #[doc = "The color to be applied to the symbol in RGB format"]
80814    #[allow(clippy::needless_lifetimes)]
80815    pub fn get_symbol_color<'a>(&'a self) -> i64 {
80816        self.symbol_color
80817    }
80818    #[allow(rustdoc::invalid_html_tags)]
80819    #[doc = "The color to be applied to the symbol in RGB format"]
80820    #[allow(clippy::needless_lifetimes)]
80821    pub fn set_symbol_color<'a>(&'a mut self, symbol_color: i64) -> &'a mut Self {
80822        self.symbol_color = symbol_color;
80823        self
80824    }
80825    #[allow(rustdoc::invalid_html_tags)]
80826    #[doc = "The color to be applied to the symbol in RGB format"]
80827    fn rhai_get_symbol_color(&mut self) -> i64 {
80828        self.symbol_color
80829    }
80830    #[allow(rustdoc::invalid_html_tags)]
80831    #[doc = "The color for the text on the backdrop in RGB format"]
80832    #[allow(clippy::needless_lifetimes)]
80833    pub fn get_text_color<'a>(&'a self) -> i64 {
80834        self.text_color
80835    }
80836    #[allow(rustdoc::invalid_html_tags)]
80837    #[doc = "The color for the text on the backdrop in RGB format"]
80838    #[allow(clippy::needless_lifetimes)]
80839    pub fn set_text_color<'a>(&'a mut self, text_color: i64) -> &'a mut Self {
80840        self.text_color = text_color;
80841        self
80842    }
80843    #[allow(rustdoc::invalid_html_tags)]
80844    #[doc = "The color for the text on the backdrop in RGB format"]
80845    fn rhai_get_text_color(&mut self) -> i64 {
80846        self.text_color
80847    }
80848}
80849impl TraitInputStoryContentPhoto for InputStoryContentPhoto {
80850    #[allow(rustdoc::invalid_html_tags)]
80851    #[doc = "Type of the content, must be photo"]
80852    #[allow(clippy::needless_lifetimes)]
80853    fn get_tg_type<'a>(&'a self) -> &'a str {
80854        self.tg_type.as_str()
80855    }
80856    #[allow(rustdoc::invalid_html_tags)]
80857    #[doc = "Type of the content, must be photo"]
80858    #[allow(clippy::needless_lifetimes)]
80859    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
80860        self.tg_type = tg_type;
80861        self
80862    }
80863    #[allow(rustdoc::invalid_html_tags)]
80864    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
80865    #[allow(clippy::needless_lifetimes)]
80866    fn get_photo<'a>(&'a self) -> &'a str {
80867        self.photo.as_str()
80868    }
80869    #[allow(rustdoc::invalid_html_tags)]
80870    #[doc = "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
80871    #[allow(clippy::needless_lifetimes)]
80872    fn set_photo<'a>(&'a mut self, photo: String) -> &'a mut Self {
80873        self.photo = photo;
80874        self
80875    }
80876}
80877impl TraitInputStoryContentVideo for InputStoryContentVideo {
80878    #[allow(rustdoc::invalid_html_tags)]
80879    #[doc = "Type of the content, must be video"]
80880    #[allow(clippy::needless_lifetimes)]
80881    fn get_tg_type<'a>(&'a self) -> &'a str {
80882        self.tg_type.as_str()
80883    }
80884    #[allow(rustdoc::invalid_html_tags)]
80885    #[doc = "Type of the content, must be video"]
80886    #[allow(clippy::needless_lifetimes)]
80887    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
80888        self.tg_type = tg_type;
80889        self
80890    }
80891    #[allow(rustdoc::invalid_html_tags)]
80892    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
80893    #[allow(clippy::needless_lifetimes)]
80894    fn get_video<'a>(&'a self) -> &'a str {
80895        self.video.as_str()
80896    }
80897    #[allow(rustdoc::invalid_html_tags)]
80898    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
80899    #[allow(clippy::needless_lifetimes)]
80900    fn set_video<'a>(&'a mut self, video: String) -> &'a mut Self {
80901        self.video = video;
80902        self
80903    }
80904    #[allow(rustdoc::invalid_html_tags)]
80905    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
80906    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80907    fn get_duration<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
80908        self.duration.as_ref().map(|v| *v)
80909    }
80910    #[allow(rustdoc::invalid_html_tags)]
80911    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
80912    #[allow(clippy::needless_lifetimes)]
80913    fn set_duration<'a>(
80914        &'a mut self,
80915        duration: Option<::ordered_float::OrderedFloat<f64>>,
80916    ) -> &'a mut Self {
80917        self.duration = duration;
80918        self
80919    }
80920    #[allow(rustdoc::invalid_html_tags)]
80921    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
80922    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80923    fn get_cover_frame_timestamp<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
80924        self.cover_frame_timestamp.as_ref().map(|v| *v)
80925    }
80926    #[allow(rustdoc::invalid_html_tags)]
80927    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
80928    #[allow(clippy::needless_lifetimes)]
80929    fn set_cover_frame_timestamp<'a>(
80930        &'a mut self,
80931        cover_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
80932    ) -> &'a mut Self {
80933        self.cover_frame_timestamp = cover_frame_timestamp;
80934        self
80935    }
80936    #[allow(rustdoc::invalid_html_tags)]
80937    #[doc = "Optional. Pass True if the video has no sound"]
80938    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80939    fn get_is_animation<'a>(&'a self) -> Option<bool> {
80940        self.is_animation.as_ref().map(|v| *v)
80941    }
80942    #[allow(rustdoc::invalid_html_tags)]
80943    #[doc = "Optional. Pass True if the video has no sound"]
80944    #[allow(clippy::needless_lifetimes)]
80945    fn set_is_animation<'a>(&'a mut self, is_animation: Option<bool>) -> &'a mut Self {
80946        self.is_animation = is_animation;
80947        self
80948    }
80949}
80950#[allow(dead_code)]
80951impl SuggestedPostApprovalFailed {
80952    #[allow(clippy::too_many_arguments)]
80953    pub fn new<A: Into<SuggestedPostPrice>>(price: A) -> Self {
80954        Self {
80955            price: BoxWrapper::new_unbox(price.into()),
80956            suggested_post_message: None,
80957        }
80958    }
80959    #[allow(rustdoc::invalid_html_tags)]
80960    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
80961    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
80962    pub fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message> {
80963        self.suggested_post_message.as_ref().map(|v| v.inner_ref())
80964    }
80965    #[allow(rustdoc::invalid_html_tags)]
80966    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
80967    #[allow(clippy::needless_lifetimes)]
80968    pub fn set_suggested_post_message<'a>(
80969        &'a mut self,
80970        suggested_post_message: Option<Message>,
80971    ) -> &'a mut Self {
80972        self.suggested_post_message = suggested_post_message
80973            .map(|suggested_post_message| BoxWrapper(Box::new(suggested_post_message)));
80974        self
80975    }
80976    #[allow(rustdoc::invalid_html_tags)]
80977    #[doc = "Optional. Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
80978    fn rhai_get_suggested_post_message(&mut self) -> Option<Message> {
80979        self.suggested_post_message
80980            .as_ref()
80981            .map(|v| v.clone().into())
80982    }
80983    #[allow(rustdoc::invalid_html_tags)]
80984    #[doc = "Expected price of the post"]
80985    #[allow(clippy::needless_lifetimes)]
80986    pub fn get_price<'a>(&'a self) -> &'a SuggestedPostPrice {
80987        &self.price
80988    }
80989    #[allow(rustdoc::invalid_html_tags)]
80990    #[doc = "Expected price of the post"]
80991    #[allow(clippy::needless_lifetimes)]
80992    pub fn set_price<'a>(&'a mut self, price: SuggestedPostPrice) -> &'a mut Self {
80993        self.price = BoxWrapper(Unbox(price));
80994        self
80995    }
80996    #[allow(rustdoc::invalid_html_tags)]
80997    #[doc = "Expected price of the post"]
80998    fn rhai_get_price(&mut self) -> SuggestedPostPrice {
80999        self.price.clone().into()
81000    }
81001}
81002#[allow(dead_code)]
81003impl Document {
81004    #[allow(clippy::too_many_arguments)]
81005    pub fn new(file_id: String, file_unique_id: String) -> Self {
81006        Self {
81007            file_id,
81008            file_unique_id,
81009            thumbnail: None,
81010            file_name: None,
81011            mime_type: None,
81012            file_size: None,
81013        }
81014    }
81015    #[allow(rustdoc::invalid_html_tags)]
81016    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
81017    #[allow(clippy::needless_lifetimes)]
81018    pub fn get_file_id<'a>(&'a self) -> &'a str {
81019        self.file_id.as_str()
81020    }
81021    #[allow(rustdoc::invalid_html_tags)]
81022    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
81023    #[allow(clippy::needless_lifetimes)]
81024    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
81025        self.file_id = file_id;
81026        self
81027    }
81028    #[allow(rustdoc::invalid_html_tags)]
81029    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
81030    fn rhai_get_file_id(&mut self) -> String {
81031        self.file_id.clone()
81032    }
81033    #[allow(rustdoc::invalid_html_tags)]
81034    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
81035    #[allow(clippy::needless_lifetimes)]
81036    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
81037        self.file_unique_id.as_str()
81038    }
81039    #[allow(rustdoc::invalid_html_tags)]
81040    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
81041    #[allow(clippy::needless_lifetimes)]
81042    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
81043        self.file_unique_id = file_unique_id;
81044        self
81045    }
81046    #[allow(rustdoc::invalid_html_tags)]
81047    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
81048    fn rhai_get_file_unique_id(&mut self) -> String {
81049        self.file_unique_id.clone()
81050    }
81051    #[allow(rustdoc::invalid_html_tags)]
81052    #[doc = "Optional. Document thumbnail as defined by the sender"]
81053    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81054    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize> {
81055        self.thumbnail.as_ref().map(|v| v.inner_ref())
81056    }
81057    #[allow(rustdoc::invalid_html_tags)]
81058    #[doc = "Optional. Document thumbnail as defined by the sender"]
81059    #[allow(clippy::needless_lifetimes)]
81060    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self {
81061        self.thumbnail = thumbnail.map(|thumbnail| BoxWrapper(Unbox(thumbnail)));
81062        self
81063    }
81064    #[allow(rustdoc::invalid_html_tags)]
81065    #[doc = "Optional. Document thumbnail as defined by the sender"]
81066    fn rhai_get_thumbnail(&mut self) -> Option<PhotoSize> {
81067        self.thumbnail.as_ref().map(|v| v.clone().into())
81068    }
81069    #[allow(rustdoc::invalid_html_tags)]
81070    #[doc = "Optional. Original filename as defined by the sender"]
81071    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81072    pub fn get_file_name<'a>(&'a self) -> Option<&'a str> {
81073        self.file_name.as_ref().map(|v| v.as_str())
81074    }
81075    #[allow(rustdoc::invalid_html_tags)]
81076    #[doc = "Optional. Original filename as defined by the sender"]
81077    #[allow(clippy::needless_lifetimes)]
81078    pub fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self {
81079        self.file_name = file_name;
81080        self
81081    }
81082    #[allow(rustdoc::invalid_html_tags)]
81083    #[doc = "Optional. Original filename as defined by the sender"]
81084    fn rhai_get_file_name(&mut self) -> Option<String> {
81085        self.file_name.as_ref().cloned()
81086    }
81087    #[allow(rustdoc::invalid_html_tags)]
81088    #[doc = "Optional. MIME type of the file as defined by the sender"]
81089    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81090    pub fn get_mime_type<'a>(&'a self) -> Option<&'a str> {
81091        self.mime_type.as_ref().map(|v| v.as_str())
81092    }
81093    #[allow(rustdoc::invalid_html_tags)]
81094    #[doc = "Optional. MIME type of the file as defined by the sender"]
81095    #[allow(clippy::needless_lifetimes)]
81096    pub fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self {
81097        self.mime_type = mime_type;
81098        self
81099    }
81100    #[allow(rustdoc::invalid_html_tags)]
81101    #[doc = "Optional. MIME type of the file as defined by the sender"]
81102    fn rhai_get_mime_type(&mut self) -> Option<String> {
81103        self.mime_type.as_ref().cloned()
81104    }
81105    #[allow(rustdoc::invalid_html_tags)]
81106    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
81107    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81108    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
81109        self.file_size.as_ref().map(|v| *v)
81110    }
81111    #[allow(rustdoc::invalid_html_tags)]
81112    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
81113    #[allow(clippy::needless_lifetimes)]
81114    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
81115        self.file_size = file_size;
81116        self
81117    }
81118    #[allow(rustdoc::invalid_html_tags)]
81119    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
81120    fn rhai_get_file_size(&mut self) -> Option<i64> {
81121        self.file_size.as_ref().copied()
81122    }
81123}
81124#[allow(dead_code)]
81125impl SharedUser {
81126    #[allow(clippy::too_many_arguments)]
81127    pub fn new(user_id: i64) -> Self {
81128        Self {
81129            user_id,
81130            first_name: None,
81131            last_name: None,
81132            username: None,
81133            photo: None,
81134        }
81135    }
81136    #[allow(rustdoc::invalid_html_tags)]
81137    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
81138    #[allow(clippy::needless_lifetimes)]
81139    pub fn get_user_id<'a>(&'a self) -> i64 {
81140        self.user_id
81141    }
81142    #[allow(rustdoc::invalid_html_tags)]
81143    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
81144    #[allow(clippy::needless_lifetimes)]
81145    pub fn set_user_id<'a>(&'a mut self, user_id: i64) -> &'a mut Self {
81146        self.user_id = user_id;
81147        self
81148    }
81149    #[allow(rustdoc::invalid_html_tags)]
81150    #[doc = "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."]
81151    fn rhai_get_user_id(&mut self) -> i64 {
81152        self.user_id
81153    }
81154    #[allow(rustdoc::invalid_html_tags)]
81155    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
81156    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81157    pub fn get_first_name<'a>(&'a self) -> Option<&'a str> {
81158        self.first_name.as_ref().map(|v| v.as_str())
81159    }
81160    #[allow(rustdoc::invalid_html_tags)]
81161    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
81162    #[allow(clippy::needless_lifetimes)]
81163    pub fn set_first_name<'a>(&'a mut self, first_name: Option<String>) -> &'a mut Self {
81164        self.first_name = first_name;
81165        self
81166    }
81167    #[allow(rustdoc::invalid_html_tags)]
81168    #[doc = "Optional. First name of the user, if the name was requested by the bot"]
81169    fn rhai_get_first_name(&mut self) -> Option<String> {
81170        self.first_name.as_ref().cloned()
81171    }
81172    #[allow(rustdoc::invalid_html_tags)]
81173    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
81174    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81175    pub fn get_last_name<'a>(&'a self) -> Option<&'a str> {
81176        self.last_name.as_ref().map(|v| v.as_str())
81177    }
81178    #[allow(rustdoc::invalid_html_tags)]
81179    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
81180    #[allow(clippy::needless_lifetimes)]
81181    pub fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
81182        self.last_name = last_name;
81183        self
81184    }
81185    #[allow(rustdoc::invalid_html_tags)]
81186    #[doc = "Optional. Last name of the user, if the name was requested by the bot"]
81187    fn rhai_get_last_name(&mut self) -> Option<String> {
81188        self.last_name.as_ref().cloned()
81189    }
81190    #[allow(rustdoc::invalid_html_tags)]
81191    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
81192    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81193    pub fn get_username<'a>(&'a self) -> Option<&'a str> {
81194        self.username.as_ref().map(|v| v.as_str())
81195    }
81196    #[allow(rustdoc::invalid_html_tags)]
81197    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
81198    #[allow(clippy::needless_lifetimes)]
81199    pub fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self {
81200        self.username = username;
81201        self
81202    }
81203    #[allow(rustdoc::invalid_html_tags)]
81204    #[doc = "Optional. Username of the user, if the username was requested by the bot"]
81205    fn rhai_get_username(&mut self) -> Option<String> {
81206        self.username.as_ref().cloned()
81207    }
81208    #[allow(rustdoc::invalid_html_tags)]
81209    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
81210    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81211    pub fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
81212        self.photo.as_ref()
81213    }
81214    #[allow(rustdoc::invalid_html_tags)]
81215    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
81216    #[allow(clippy::needless_lifetimes)]
81217    pub fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self {
81218        self.photo = photo;
81219        self
81220    }
81221    #[allow(rustdoc::invalid_html_tags)]
81222    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
81223    fn rhai_get_photo(&mut self) -> Option<Vec<PhotoSize>> {
81224        self.photo.as_ref().cloned()
81225    }
81226}
81227#[allow(dead_code)]
81228impl UniqueGiftInfo {
81229    #[allow(clippy::too_many_arguments)]
81230    pub fn new<A: Into<Box<UniqueGift>>>(gift: A, origin: String) -> Self {
81231        Self {
81232            gift: BoxWrapper(gift.into()),
81233            origin,
81234            last_resale_star_count: None,
81235            owned_gift_id: None,
81236            transfer_star_count: None,
81237            next_transfer_date: None,
81238        }
81239    }
81240    #[allow(rustdoc::invalid_html_tags)]
81241    #[doc = "Information about the gift"]
81242    #[allow(clippy::needless_lifetimes)]
81243    pub fn get_gift<'a>(&'a self) -> &'a UniqueGift {
81244        self.gift.as_ref()
81245    }
81246    #[allow(rustdoc::invalid_html_tags)]
81247    #[doc = "Information about the gift"]
81248    #[allow(clippy::needless_lifetimes)]
81249    pub fn set_gift<'a>(&'a mut self, gift: UniqueGift) -> &'a mut Self {
81250        self.gift = BoxWrapper(Box::new(gift));
81251        self
81252    }
81253    #[allow(rustdoc::invalid_html_tags)]
81254    #[doc = "Information about the gift"]
81255    fn rhai_get_gift(&mut self) -> UniqueGift {
81256        self.gift.clone().into()
81257    }
81258    #[allow(rustdoc::invalid_html_tags)]
81259    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
81260    #[allow(clippy::needless_lifetimes)]
81261    pub fn get_origin<'a>(&'a self) -> &'a str {
81262        self.origin.as_str()
81263    }
81264    #[allow(rustdoc::invalid_html_tags)]
81265    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
81266    #[allow(clippy::needless_lifetimes)]
81267    pub fn set_origin<'a>(&'a mut self, origin: String) -> &'a mut Self {
81268        self.origin = origin;
81269        self
81270    }
81271    #[allow(rustdoc::invalid_html_tags)]
81272    #[doc = "Origin of the gift. Currently, either \"upgrade\" for gifts upgraded from regular gifts, \"transfer\" for gifts transferred from other users or channels, or \"resale\" for gifts bought from other users"]
81273    fn rhai_get_origin(&mut self) -> String {
81274        self.origin.clone()
81275    }
81276    #[allow(rustdoc::invalid_html_tags)]
81277    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
81278    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81279    pub fn get_last_resale_star_count<'a>(&'a self) -> Option<i64> {
81280        self.last_resale_star_count.as_ref().map(|v| *v)
81281    }
81282    #[allow(rustdoc::invalid_html_tags)]
81283    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
81284    #[allow(clippy::needless_lifetimes)]
81285    pub fn set_last_resale_star_count<'a>(
81286        &'a mut self,
81287        last_resale_star_count: Option<i64>,
81288    ) -> &'a mut Self {
81289        self.last_resale_star_count = last_resale_star_count;
81290        self
81291    }
81292    #[allow(rustdoc::invalid_html_tags)]
81293    #[doc = "Optional. For gifts bought from other users, the price paid for the gift"]
81294    fn rhai_get_last_resale_star_count(&mut self) -> Option<i64> {
81295        self.last_resale_star_count.as_ref().copied()
81296    }
81297    #[allow(rustdoc::invalid_html_tags)]
81298    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
81299    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81300    pub fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str> {
81301        self.owned_gift_id.as_ref().map(|v| v.as_str())
81302    }
81303    #[allow(rustdoc::invalid_html_tags)]
81304    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
81305    #[allow(clippy::needless_lifetimes)]
81306    pub fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self {
81307        self.owned_gift_id = owned_gift_id;
81308        self
81309    }
81310    #[allow(rustdoc::invalid_html_tags)]
81311    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
81312    fn rhai_get_owned_gift_id(&mut self) -> Option<String> {
81313        self.owned_gift_id.as_ref().cloned()
81314    }
81315    #[allow(rustdoc::invalid_html_tags)]
81316    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
81317    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81318    pub fn get_transfer_star_count<'a>(&'a self) -> Option<i64> {
81319        self.transfer_star_count.as_ref().map(|v| *v)
81320    }
81321    #[allow(rustdoc::invalid_html_tags)]
81322    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
81323    #[allow(clippy::needless_lifetimes)]
81324    pub fn set_transfer_star_count<'a>(
81325        &'a mut self,
81326        transfer_star_count: Option<i64>,
81327    ) -> &'a mut Self {
81328        self.transfer_star_count = transfer_star_count;
81329        self
81330    }
81331    #[allow(rustdoc::invalid_html_tags)]
81332    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
81333    fn rhai_get_transfer_star_count(&mut self) -> Option<i64> {
81334        self.transfer_star_count.as_ref().copied()
81335    }
81336    #[allow(rustdoc::invalid_html_tags)]
81337    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
81338    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81339    pub fn get_next_transfer_date<'a>(&'a self) -> Option<i64> {
81340        self.next_transfer_date.as_ref().map(|v| *v)
81341    }
81342    #[allow(rustdoc::invalid_html_tags)]
81343    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
81344    #[allow(clippy::needless_lifetimes)]
81345    pub fn set_next_transfer_date<'a>(
81346        &'a mut self,
81347        next_transfer_date: Option<i64>,
81348    ) -> &'a mut Self {
81349        self.next_transfer_date = next_transfer_date;
81350        self
81351    }
81352    #[allow(rustdoc::invalid_html_tags)]
81353    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
81354    fn rhai_get_next_transfer_date(&mut self) -> Option<i64> {
81355        self.next_transfer_date.as_ref().copied()
81356    }
81357}
81358#[allow(dead_code)]
81359impl ShippingQuery {
81360    #[allow(clippy::too_many_arguments)]
81361    pub fn new<A: Into<User>, B: Into<ShippingAddress>>(
81362        id: String,
81363        from: A,
81364        invoice_payload: String,
81365        shipping_address: B,
81366    ) -> Self {
81367        Self {
81368            id,
81369            from: BoxWrapper::new_unbox(from.into()),
81370            invoice_payload,
81371            shipping_address: BoxWrapper::new_unbox(shipping_address.into()),
81372        }
81373    }
81374    #[allow(rustdoc::invalid_html_tags)]
81375    #[doc = "Unique query identifier"]
81376    #[allow(clippy::needless_lifetimes)]
81377    pub fn get_id<'a>(&'a self) -> &'a str {
81378        self.id.as_str()
81379    }
81380    #[allow(rustdoc::invalid_html_tags)]
81381    #[doc = "Unique query identifier"]
81382    #[allow(clippy::needless_lifetimes)]
81383    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
81384        self.id = id;
81385        self
81386    }
81387    #[allow(rustdoc::invalid_html_tags)]
81388    #[doc = "Unique query identifier"]
81389    fn rhai_get_id(&mut self) -> String {
81390        self.id.clone()
81391    }
81392    #[allow(rustdoc::invalid_html_tags)]
81393    #[doc = "User who sent the query"]
81394    #[allow(clippy::needless_lifetimes)]
81395    pub fn get_from<'a>(&'a self) -> &'a User {
81396        &self.from
81397    }
81398    #[allow(rustdoc::invalid_html_tags)]
81399    #[doc = "User who sent the query"]
81400    #[allow(clippy::needless_lifetimes)]
81401    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
81402        self.from = BoxWrapper(Unbox(from));
81403        self
81404    }
81405    #[allow(rustdoc::invalid_html_tags)]
81406    #[doc = "User who sent the query"]
81407    fn rhai_get_from(&mut self) -> User {
81408        self.from.clone().into()
81409    }
81410    #[allow(rustdoc::invalid_html_tags)]
81411    #[doc = "Bot-specified invoice payload"]
81412    #[allow(clippy::needless_lifetimes)]
81413    pub fn get_invoice_payload<'a>(&'a self) -> &'a str {
81414        self.invoice_payload.as_str()
81415    }
81416    #[allow(rustdoc::invalid_html_tags)]
81417    #[doc = "Bot-specified invoice payload"]
81418    #[allow(clippy::needless_lifetimes)]
81419    pub fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self {
81420        self.invoice_payload = invoice_payload;
81421        self
81422    }
81423    #[allow(rustdoc::invalid_html_tags)]
81424    #[doc = "Bot-specified invoice payload"]
81425    fn rhai_get_invoice_payload(&mut self) -> String {
81426        self.invoice_payload.clone()
81427    }
81428    #[allow(rustdoc::invalid_html_tags)]
81429    #[doc = "User specified shipping address"]
81430    #[allow(clippy::needless_lifetimes)]
81431    pub fn get_shipping_address<'a>(&'a self) -> &'a ShippingAddress {
81432        &self.shipping_address
81433    }
81434    #[allow(rustdoc::invalid_html_tags)]
81435    #[doc = "User specified shipping address"]
81436    #[allow(clippy::needless_lifetimes)]
81437    pub fn set_shipping_address<'a>(
81438        &'a mut self,
81439        shipping_address: ShippingAddress,
81440    ) -> &'a mut Self {
81441        self.shipping_address = BoxWrapper(Unbox(shipping_address));
81442        self
81443    }
81444    #[allow(rustdoc::invalid_html_tags)]
81445    #[doc = "User specified shipping address"]
81446    fn rhai_get_shipping_address(&mut self) -> ShippingAddress {
81447        self.shipping_address.clone().into()
81448    }
81449}
81450#[allow(dead_code)]
81451impl InlineQueryResultVideo {
81452    #[allow(clippy::too_many_arguments)]
81453    pub fn new(
81454        id: String,
81455        video_url: String,
81456        mime_type: String,
81457        thumbnail_url: String,
81458        title: String,
81459    ) -> Self {
81460        Self {
81461            tg_type: "video".to_owned(),
81462            id,
81463            video_url,
81464            mime_type,
81465            thumbnail_url,
81466            title,
81467            caption: None,
81468            parse_mode: None,
81469            caption_entities: None,
81470            show_caption_above_media: None,
81471            video_width: None,
81472            video_height: None,
81473            video_duration: None,
81474            description: None,
81475            reply_markup: None,
81476            input_message_content: None,
81477        }
81478    }
81479    #[allow(rustdoc::invalid_html_tags)]
81480    #[doc = "Type of the result, must be video"]
81481    #[allow(clippy::needless_lifetimes)]
81482    pub fn get_tg_type<'a>(&'a self) -> &'a str {
81483        self.tg_type.as_str()
81484    }
81485    #[allow(rustdoc::invalid_html_tags)]
81486    #[doc = "Type of the result, must be video"]
81487    #[allow(clippy::needless_lifetimes)]
81488    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
81489        self.tg_type = tg_type;
81490        self
81491    }
81492    #[allow(rustdoc::invalid_html_tags)]
81493    #[doc = "Type of the result, must be video"]
81494    fn rhai_get_tg_type(&mut self) -> String {
81495        self.tg_type.clone()
81496    }
81497    #[allow(rustdoc::invalid_html_tags)]
81498    #[doc = "Unique identifier for this result, 1-64 bytes"]
81499    #[allow(clippy::needless_lifetimes)]
81500    pub fn get_id<'a>(&'a self) -> &'a str {
81501        self.id.as_str()
81502    }
81503    #[allow(rustdoc::invalid_html_tags)]
81504    #[doc = "Unique identifier for this result, 1-64 bytes"]
81505    #[allow(clippy::needless_lifetimes)]
81506    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
81507        self.id = id;
81508        self
81509    }
81510    #[allow(rustdoc::invalid_html_tags)]
81511    #[doc = "Unique identifier for this result, 1-64 bytes"]
81512    fn rhai_get_id(&mut self) -> String {
81513        self.id.clone()
81514    }
81515    #[allow(rustdoc::invalid_html_tags)]
81516    #[doc = "A valid URL for the embedded video player or video file"]
81517    #[allow(clippy::needless_lifetimes)]
81518    pub fn get_video_url<'a>(&'a self) -> &'a str {
81519        self.video_url.as_str()
81520    }
81521    #[allow(rustdoc::invalid_html_tags)]
81522    #[doc = "A valid URL for the embedded video player or video file"]
81523    #[allow(clippy::needless_lifetimes)]
81524    pub fn set_video_url<'a>(&'a mut self, video_url: String) -> &'a mut Self {
81525        self.video_url = video_url;
81526        self
81527    }
81528    #[allow(rustdoc::invalid_html_tags)]
81529    #[doc = "A valid URL for the embedded video player or video file"]
81530    fn rhai_get_video_url(&mut self) -> String {
81531        self.video_url.clone()
81532    }
81533    #[allow(rustdoc::invalid_html_tags)]
81534    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
81535    #[allow(clippy::needless_lifetimes)]
81536    pub fn get_mime_type<'a>(&'a self) -> &'a str {
81537        self.mime_type.as_str()
81538    }
81539    #[allow(rustdoc::invalid_html_tags)]
81540    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
81541    #[allow(clippy::needless_lifetimes)]
81542    pub fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self {
81543        self.mime_type = mime_type;
81544        self
81545    }
81546    #[allow(rustdoc::invalid_html_tags)]
81547    #[doc = "MIME type of the content of the video URL, \"text/html\" or \"video/mp4\""]
81548    fn rhai_get_mime_type(&mut self) -> String {
81549        self.mime_type.clone()
81550    }
81551    #[allow(rustdoc::invalid_html_tags)]
81552    #[doc = "URL of the thumbnail (JPEG only) for the video"]
81553    #[allow(clippy::needless_lifetimes)]
81554    pub fn get_thumbnail_url<'a>(&'a self) -> &'a str {
81555        self.thumbnail_url.as_str()
81556    }
81557    #[allow(rustdoc::invalid_html_tags)]
81558    #[doc = "URL of the thumbnail (JPEG only) for the video"]
81559    #[allow(clippy::needless_lifetimes)]
81560    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
81561        self.thumbnail_url = thumbnail_url;
81562        self
81563    }
81564    #[allow(rustdoc::invalid_html_tags)]
81565    #[doc = "URL of the thumbnail (JPEG only) for the video"]
81566    fn rhai_get_thumbnail_url(&mut self) -> String {
81567        self.thumbnail_url.clone()
81568    }
81569    #[allow(rustdoc::invalid_html_tags)]
81570    #[doc = "Title for the result"]
81571    #[allow(clippy::needless_lifetimes)]
81572    pub fn get_title<'a>(&'a self) -> &'a str {
81573        self.title.as_str()
81574    }
81575    #[allow(rustdoc::invalid_html_tags)]
81576    #[doc = "Title for the result"]
81577    #[allow(clippy::needless_lifetimes)]
81578    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
81579        self.title = title;
81580        self
81581    }
81582    #[allow(rustdoc::invalid_html_tags)]
81583    #[doc = "Title for the result"]
81584    fn rhai_get_title(&mut self) -> String {
81585        self.title.clone()
81586    }
81587    #[allow(rustdoc::invalid_html_tags)]
81588    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
81589    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81590    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
81591        self.caption.as_ref().map(|v| v.as_str())
81592    }
81593    #[allow(rustdoc::invalid_html_tags)]
81594    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
81595    #[allow(clippy::needless_lifetimes)]
81596    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
81597        self.caption = caption;
81598        self
81599    }
81600    #[allow(rustdoc::invalid_html_tags)]
81601    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
81602    fn rhai_get_caption(&mut self) -> Option<String> {
81603        self.caption.as_ref().cloned()
81604    }
81605    #[allow(rustdoc::invalid_html_tags)]
81606    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
81607    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81608    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
81609        self.parse_mode.as_ref().map(|v| v.as_str())
81610    }
81611    #[allow(rustdoc::invalid_html_tags)]
81612    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
81613    #[allow(clippy::needless_lifetimes)]
81614    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
81615        self.parse_mode = parse_mode;
81616        self
81617    }
81618    #[allow(rustdoc::invalid_html_tags)]
81619    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
81620    fn rhai_get_parse_mode(&mut self) -> Option<String> {
81621        self.parse_mode.as_ref().cloned()
81622    }
81623    #[allow(rustdoc::invalid_html_tags)]
81624    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
81625    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81626    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
81627        self.caption_entities.as_ref()
81628    }
81629    #[allow(rustdoc::invalid_html_tags)]
81630    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
81631    #[allow(clippy::needless_lifetimes)]
81632    pub fn set_caption_entities<'a>(
81633        &'a mut self,
81634        caption_entities: Option<Vec<MessageEntity>>,
81635    ) -> &'a mut Self {
81636        self.caption_entities = caption_entities;
81637        self
81638    }
81639    #[allow(rustdoc::invalid_html_tags)]
81640    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
81641    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
81642        self.caption_entities.as_ref().cloned()
81643    }
81644    #[allow(rustdoc::invalid_html_tags)]
81645    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
81646    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81647    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
81648        self.show_caption_above_media.as_ref().map(|v| *v)
81649    }
81650    #[allow(rustdoc::invalid_html_tags)]
81651    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
81652    #[allow(clippy::needless_lifetimes)]
81653    pub fn set_show_caption_above_media<'a>(
81654        &'a mut self,
81655        show_caption_above_media: Option<bool>,
81656    ) -> &'a mut Self {
81657        self.show_caption_above_media = show_caption_above_media;
81658        self
81659    }
81660    #[allow(rustdoc::invalid_html_tags)]
81661    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
81662    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
81663        self.show_caption_above_media.as_ref().copied()
81664    }
81665    #[allow(rustdoc::invalid_html_tags)]
81666    #[doc = "Optional. Video width"]
81667    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81668    pub fn get_video_width<'a>(&'a self) -> Option<i64> {
81669        self.video_width.as_ref().map(|v| *v)
81670    }
81671    #[allow(rustdoc::invalid_html_tags)]
81672    #[doc = "Optional. Video width"]
81673    #[allow(clippy::needless_lifetimes)]
81674    pub fn set_video_width<'a>(&'a mut self, video_width: Option<i64>) -> &'a mut Self {
81675        self.video_width = video_width;
81676        self
81677    }
81678    #[allow(rustdoc::invalid_html_tags)]
81679    #[doc = "Optional. Video width"]
81680    fn rhai_get_video_width(&mut self) -> Option<i64> {
81681        self.video_width.as_ref().copied()
81682    }
81683    #[allow(rustdoc::invalid_html_tags)]
81684    #[doc = "Optional. Video height"]
81685    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81686    pub fn get_video_height<'a>(&'a self) -> Option<i64> {
81687        self.video_height.as_ref().map(|v| *v)
81688    }
81689    #[allow(rustdoc::invalid_html_tags)]
81690    #[doc = "Optional. Video height"]
81691    #[allow(clippy::needless_lifetimes)]
81692    pub fn set_video_height<'a>(&'a mut self, video_height: Option<i64>) -> &'a mut Self {
81693        self.video_height = video_height;
81694        self
81695    }
81696    #[allow(rustdoc::invalid_html_tags)]
81697    #[doc = "Optional. Video height"]
81698    fn rhai_get_video_height(&mut self) -> Option<i64> {
81699        self.video_height.as_ref().copied()
81700    }
81701    #[allow(rustdoc::invalid_html_tags)]
81702    #[doc = "Optional. Video duration in seconds"]
81703    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81704    pub fn get_video_duration<'a>(&'a self) -> Option<i64> {
81705        self.video_duration.as_ref().map(|v| *v)
81706    }
81707    #[allow(rustdoc::invalid_html_tags)]
81708    #[doc = "Optional. Video duration in seconds"]
81709    #[allow(clippy::needless_lifetimes)]
81710    pub fn set_video_duration<'a>(&'a mut self, video_duration: Option<i64>) -> &'a mut Self {
81711        self.video_duration = video_duration;
81712        self
81713    }
81714    #[allow(rustdoc::invalid_html_tags)]
81715    #[doc = "Optional. Video duration in seconds"]
81716    fn rhai_get_video_duration(&mut self) -> Option<i64> {
81717        self.video_duration.as_ref().copied()
81718    }
81719    #[allow(rustdoc::invalid_html_tags)]
81720    #[doc = "Optional. Short description of the result"]
81721    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81722    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
81723        self.description.as_ref().map(|v| v.as_str())
81724    }
81725    #[allow(rustdoc::invalid_html_tags)]
81726    #[doc = "Optional. Short description of the result"]
81727    #[allow(clippy::needless_lifetimes)]
81728    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
81729        self.description = description;
81730        self
81731    }
81732    #[allow(rustdoc::invalid_html_tags)]
81733    #[doc = "Optional. Short description of the result"]
81734    fn rhai_get_description(&mut self) -> Option<String> {
81735        self.description.as_ref().cloned()
81736    }
81737    #[allow(rustdoc::invalid_html_tags)]
81738    #[doc = "Optional. Inline keyboard attached to the message"]
81739    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81740    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
81741        self.reply_markup.as_ref().map(|v| v.inner_ref())
81742    }
81743    #[allow(rustdoc::invalid_html_tags)]
81744    #[doc = "Optional. Inline keyboard attached to the message"]
81745    #[allow(clippy::needless_lifetimes)]
81746    pub fn set_reply_markup<'a>(
81747        &'a mut self,
81748        reply_markup: Option<InlineKeyboardMarkup>,
81749    ) -> &'a mut Self {
81750        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
81751        self
81752    }
81753    #[allow(rustdoc::invalid_html_tags)]
81754    #[doc = "Optional. Inline keyboard attached to the message"]
81755    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
81756        self.reply_markup.as_ref().map(|v| v.clone().into())
81757    }
81758    #[allow(rustdoc::invalid_html_tags)]
81759    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
81760    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81761    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
81762        self.input_message_content.as_ref().map(|v| v.inner_ref())
81763    }
81764    #[allow(rustdoc::invalid_html_tags)]
81765    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
81766    #[allow(clippy::needless_lifetimes)]
81767    pub fn set_input_message_content<'a>(
81768        &'a mut self,
81769        input_message_content: Option<InputMessageContent>,
81770    ) -> &'a mut Self {
81771        self.input_message_content = input_message_content
81772            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
81773        self
81774    }
81775    #[allow(rustdoc::invalid_html_tags)]
81776    #[doc = "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video)."]
81777    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
81778        self.input_message_content
81779            .as_ref()
81780            .map(|v| v.clone().into())
81781    }
81782}
81783#[allow(dead_code)]
81784impl DirectMessagePriceChanged {
81785    #[allow(clippy::too_many_arguments)]
81786    pub fn new(are_direct_messages_enabled: bool) -> Self {
81787        Self {
81788            are_direct_messages_enabled,
81789            direct_message_star_count: None,
81790        }
81791    }
81792    #[allow(rustdoc::invalid_html_tags)]
81793    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
81794    #[allow(clippy::needless_lifetimes)]
81795    pub fn get_are_direct_messages_enabled<'a>(&'a self) -> bool {
81796        self.are_direct_messages_enabled
81797    }
81798    #[allow(rustdoc::invalid_html_tags)]
81799    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
81800    #[allow(clippy::needless_lifetimes)]
81801    pub fn set_are_direct_messages_enabled<'a>(
81802        &'a mut self,
81803        are_direct_messages_enabled: bool,
81804    ) -> &'a mut Self {
81805        self.are_direct_messages_enabled = are_direct_messages_enabled;
81806        self
81807    }
81808    #[allow(rustdoc::invalid_html_tags)]
81809    #[doc = "True, if direct messages are enabled for the channel chat; false otherwise"]
81810    fn rhai_get_are_direct_messages_enabled(&mut self) -> bool {
81811        self.are_direct_messages_enabled
81812    }
81813    #[allow(rustdoc::invalid_html_tags)]
81814    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
81815    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81816    pub fn get_direct_message_star_count<'a>(&'a self) -> Option<i64> {
81817        self.direct_message_star_count.as_ref().map(|v| *v)
81818    }
81819    #[allow(rustdoc::invalid_html_tags)]
81820    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
81821    #[allow(clippy::needless_lifetimes)]
81822    pub fn set_direct_message_star_count<'a>(
81823        &'a mut self,
81824        direct_message_star_count: Option<i64>,
81825    ) -> &'a mut Self {
81826        self.direct_message_star_count = direct_message_star_count;
81827        self
81828    }
81829    #[allow(rustdoc::invalid_html_tags)]
81830    #[doc = "Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0."]
81831    fn rhai_get_direct_message_star_count(&mut self) -> Option<i64> {
81832        self.direct_message_star_count.as_ref().copied()
81833    }
81834}
81835#[allow(dead_code)]
81836impl ReactionCount {
81837    #[allow(clippy::too_many_arguments)]
81838    pub fn new(total_count: i64, tg_type: ReactionType) -> Self {
81839        Self {
81840            tg_type,
81841            total_count,
81842        }
81843    }
81844    #[allow(rustdoc::invalid_html_tags)]
81845    #[doc = "Type of the reaction"]
81846    #[allow(clippy::needless_lifetimes)]
81847    pub fn get_tg_type<'a>(&'a self) -> &'a ReactionType {
81848        &self.tg_type
81849    }
81850    #[allow(rustdoc::invalid_html_tags)]
81851    #[doc = "Type of the reaction"]
81852    #[allow(clippy::needless_lifetimes)]
81853    pub fn set_tg_type<'a>(&'a mut self, tg_type: ReactionType) -> &'a mut Self {
81854        self.tg_type = tg_type;
81855        self
81856    }
81857    #[allow(rustdoc::invalid_html_tags)]
81858    #[doc = "Type of the reaction"]
81859    fn rhai_get_tg_type(&mut self) -> ReactionType {
81860        self.tg_type.clone()
81861    }
81862    #[allow(rustdoc::invalid_html_tags)]
81863    #[doc = "Number of times the reaction was added"]
81864    #[allow(clippy::needless_lifetimes)]
81865    pub fn get_total_count<'a>(&'a self) -> i64 {
81866        self.total_count
81867    }
81868    #[allow(rustdoc::invalid_html_tags)]
81869    #[doc = "Number of times the reaction was added"]
81870    #[allow(clippy::needless_lifetimes)]
81871    pub fn set_total_count<'a>(&'a mut self, total_count: i64) -> &'a mut Self {
81872        self.total_count = total_count;
81873        self
81874    }
81875    #[allow(rustdoc::invalid_html_tags)]
81876    #[doc = "Number of times the reaction was added"]
81877    fn rhai_get_total_count(&mut self) -> i64 {
81878        self.total_count
81879    }
81880}
81881#[allow(dead_code)]
81882impl ChatShared {
81883    #[allow(clippy::too_many_arguments)]
81884    pub fn new(request_id: i64, chat_id: i64) -> Self {
81885        Self {
81886            request_id,
81887            chat_id,
81888            title: None,
81889            username: None,
81890            photo: None,
81891        }
81892    }
81893    #[allow(rustdoc::invalid_html_tags)]
81894    #[doc = "Identifier of the request"]
81895    #[allow(clippy::needless_lifetimes)]
81896    pub fn get_request_id<'a>(&'a self) -> i64 {
81897        self.request_id
81898    }
81899    #[allow(rustdoc::invalid_html_tags)]
81900    #[doc = "Identifier of the request"]
81901    #[allow(clippy::needless_lifetimes)]
81902    pub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self {
81903        self.request_id = request_id;
81904        self
81905    }
81906    #[allow(rustdoc::invalid_html_tags)]
81907    #[doc = "Identifier of the request"]
81908    fn rhai_get_request_id(&mut self) -> i64 {
81909        self.request_id
81910    }
81911    #[allow(rustdoc::invalid_html_tags)]
81912    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
81913    #[allow(clippy::needless_lifetimes)]
81914    pub fn get_chat_id<'a>(&'a self) -> i64 {
81915        self.chat_id
81916    }
81917    #[allow(rustdoc::invalid_html_tags)]
81918    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
81919    #[allow(clippy::needless_lifetimes)]
81920    pub fn set_chat_id<'a>(&'a mut self, chat_id: i64) -> &'a mut Self {
81921        self.chat_id = chat_id;
81922        self
81923    }
81924    #[allow(rustdoc::invalid_html_tags)]
81925    #[doc = "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."]
81926    fn rhai_get_chat_id(&mut self) -> i64 {
81927        self.chat_id
81928    }
81929    #[allow(rustdoc::invalid_html_tags)]
81930    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
81931    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81932    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
81933        self.title.as_ref().map(|v| v.as_str())
81934    }
81935    #[allow(rustdoc::invalid_html_tags)]
81936    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
81937    #[allow(clippy::needless_lifetimes)]
81938    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
81939        self.title = title;
81940        self
81941    }
81942    #[allow(rustdoc::invalid_html_tags)]
81943    #[doc = "Optional. Title of the chat, if the title was requested by the bot."]
81944    fn rhai_get_title(&mut self) -> Option<String> {
81945        self.title.as_ref().cloned()
81946    }
81947    #[allow(rustdoc::invalid_html_tags)]
81948    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
81949    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81950    pub fn get_username<'a>(&'a self) -> Option<&'a str> {
81951        self.username.as_ref().map(|v| v.as_str())
81952    }
81953    #[allow(rustdoc::invalid_html_tags)]
81954    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
81955    #[allow(clippy::needless_lifetimes)]
81956    pub fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self {
81957        self.username = username;
81958        self
81959    }
81960    #[allow(rustdoc::invalid_html_tags)]
81961    #[doc = "Optional. Username of the chat, if the username was requested by the bot and available."]
81962    fn rhai_get_username(&mut self) -> Option<String> {
81963        self.username.as_ref().cloned()
81964    }
81965    #[allow(rustdoc::invalid_html_tags)]
81966    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
81967    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
81968    pub fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
81969        self.photo.as_ref()
81970    }
81971    #[allow(rustdoc::invalid_html_tags)]
81972    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
81973    #[allow(clippy::needless_lifetimes)]
81974    pub fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self {
81975        self.photo = photo;
81976        self
81977    }
81978    #[allow(rustdoc::invalid_html_tags)]
81979    #[doc = "Optional. Available sizes of the chat photo, if the photo was requested by the bot"]
81980    fn rhai_get_photo(&mut self) -> Option<Vec<PhotoSize>> {
81981        self.photo.as_ref().cloned()
81982    }
81983}
81984#[allow(dead_code)]
81985impl MessageOriginChannel {
81986    #[allow(clippy::too_many_arguments)]
81987    pub fn new<A: Into<Chat>>(date: i64, chat: A, message_id: i64) -> Self {
81988        Self {
81989            tg_type: "MessageOriginChannel".to_owned(),
81990            date,
81991            chat: BoxWrapper::new_unbox(chat.into()),
81992            message_id,
81993            author_signature: None,
81994        }
81995    }
81996    #[allow(rustdoc::invalid_html_tags)]
81997    #[doc = "Type of the message origin, always \"channel\""]
81998    #[allow(clippy::needless_lifetimes)]
81999    pub fn get_tg_type<'a>(&'a self) -> &'a str {
82000        self.tg_type.as_str()
82001    }
82002    #[allow(rustdoc::invalid_html_tags)]
82003    #[doc = "Type of the message origin, always \"channel\""]
82004    #[allow(clippy::needless_lifetimes)]
82005    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
82006        self.tg_type = tg_type;
82007        self
82008    }
82009    #[allow(rustdoc::invalid_html_tags)]
82010    #[doc = "Type of the message origin, always \"channel\""]
82011    fn rhai_get_tg_type(&mut self) -> String {
82012        self.tg_type.clone()
82013    }
82014    #[allow(rustdoc::invalid_html_tags)]
82015    #[doc = "Date the message was sent originally in Unix time"]
82016    #[allow(clippy::needless_lifetimes)]
82017    pub fn get_date<'a>(&'a self) -> i64 {
82018        self.date
82019    }
82020    #[allow(rustdoc::invalid_html_tags)]
82021    #[doc = "Date the message was sent originally in Unix time"]
82022    #[allow(clippy::needless_lifetimes)]
82023    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
82024        self.date = date;
82025        self
82026    }
82027    #[allow(rustdoc::invalid_html_tags)]
82028    #[doc = "Date the message was sent originally in Unix time"]
82029    fn rhai_get_date(&mut self) -> i64 {
82030        self.date
82031    }
82032    #[allow(rustdoc::invalid_html_tags)]
82033    #[doc = "Channel chat to which the message was originally sent"]
82034    #[allow(clippy::needless_lifetimes)]
82035    pub fn get_chat<'a>(&'a self) -> &'a Chat {
82036        &self.chat
82037    }
82038    #[allow(rustdoc::invalid_html_tags)]
82039    #[doc = "Channel chat to which the message was originally sent"]
82040    #[allow(clippy::needless_lifetimes)]
82041    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
82042        self.chat = BoxWrapper(Unbox(chat));
82043        self
82044    }
82045    #[allow(rustdoc::invalid_html_tags)]
82046    #[doc = "Channel chat to which the message was originally sent"]
82047    fn rhai_get_chat(&mut self) -> Chat {
82048        self.chat.clone().into()
82049    }
82050    #[allow(rustdoc::invalid_html_tags)]
82051    #[doc = "Unique message identifier inside the chat"]
82052    #[allow(clippy::needless_lifetimes)]
82053    pub fn get_message_id<'a>(&'a self) -> i64 {
82054        self.message_id
82055    }
82056    #[allow(rustdoc::invalid_html_tags)]
82057    #[doc = "Unique message identifier inside the chat"]
82058    #[allow(clippy::needless_lifetimes)]
82059    pub fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
82060        self.message_id = message_id;
82061        self
82062    }
82063    #[allow(rustdoc::invalid_html_tags)]
82064    #[doc = "Unique message identifier inside the chat"]
82065    fn rhai_get_message_id(&mut self) -> i64 {
82066        self.message_id
82067    }
82068    #[allow(rustdoc::invalid_html_tags)]
82069    #[doc = "Optional. Signature of the original post author"]
82070    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82071    pub fn get_author_signature<'a>(&'a self) -> Option<&'a str> {
82072        self.author_signature.as_ref().map(|v| v.as_str())
82073    }
82074    #[allow(rustdoc::invalid_html_tags)]
82075    #[doc = "Optional. Signature of the original post author"]
82076    #[allow(clippy::needless_lifetimes)]
82077    pub fn set_author_signature<'a>(
82078        &'a mut self,
82079        author_signature: Option<String>,
82080    ) -> &'a mut Self {
82081        self.author_signature = author_signature;
82082        self
82083    }
82084    #[allow(rustdoc::invalid_html_tags)]
82085    #[doc = "Optional. Signature of the original post author"]
82086    fn rhai_get_author_signature(&mut self) -> Option<String> {
82087        self.author_signature.as_ref().cloned()
82088    }
82089}
82090#[allow(dead_code)]
82091impl ChatBoostRemoved {
82092    #[allow(clippy::too_many_arguments)]
82093    pub fn new<A: Into<Chat>, B: Into<ChatBoostSource>>(
82094        chat: A,
82095        boost_id: String,
82096        remove_date: i64,
82097        source: B,
82098    ) -> Self {
82099        Self {
82100            chat: BoxWrapper::new_unbox(chat.into()),
82101            boost_id,
82102            remove_date,
82103            source: BoxWrapper::new_unbox(source.into()),
82104        }
82105    }
82106    #[allow(rustdoc::invalid_html_tags)]
82107    #[doc = "Chat which was boosted"]
82108    #[allow(clippy::needless_lifetimes)]
82109    pub fn get_chat<'a>(&'a self) -> &'a Chat {
82110        &self.chat
82111    }
82112    #[allow(rustdoc::invalid_html_tags)]
82113    #[doc = "Chat which was boosted"]
82114    #[allow(clippy::needless_lifetimes)]
82115    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
82116        self.chat = BoxWrapper(Unbox(chat));
82117        self
82118    }
82119    #[allow(rustdoc::invalid_html_tags)]
82120    #[doc = "Chat which was boosted"]
82121    fn rhai_get_chat(&mut self) -> Chat {
82122        self.chat.clone().into()
82123    }
82124    #[allow(rustdoc::invalid_html_tags)]
82125    #[doc = "Unique identifier of the boost"]
82126    #[allow(clippy::needless_lifetimes)]
82127    pub fn get_boost_id<'a>(&'a self) -> &'a str {
82128        self.boost_id.as_str()
82129    }
82130    #[allow(rustdoc::invalid_html_tags)]
82131    #[doc = "Unique identifier of the boost"]
82132    #[allow(clippy::needless_lifetimes)]
82133    pub fn set_boost_id<'a>(&'a mut self, boost_id: String) -> &'a mut Self {
82134        self.boost_id = boost_id;
82135        self
82136    }
82137    #[allow(rustdoc::invalid_html_tags)]
82138    #[doc = "Unique identifier of the boost"]
82139    fn rhai_get_boost_id(&mut self) -> String {
82140        self.boost_id.clone()
82141    }
82142    #[allow(rustdoc::invalid_html_tags)]
82143    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
82144    #[allow(clippy::needless_lifetimes)]
82145    pub fn get_remove_date<'a>(&'a self) -> i64 {
82146        self.remove_date
82147    }
82148    #[allow(rustdoc::invalid_html_tags)]
82149    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
82150    #[allow(clippy::needless_lifetimes)]
82151    pub fn set_remove_date<'a>(&'a mut self, remove_date: i64) -> &'a mut Self {
82152        self.remove_date = remove_date;
82153        self
82154    }
82155    #[allow(rustdoc::invalid_html_tags)]
82156    #[doc = "Point in time (Unix timestamp) when the boost was removed"]
82157    fn rhai_get_remove_date(&mut self) -> i64 {
82158        self.remove_date
82159    }
82160    #[allow(rustdoc::invalid_html_tags)]
82161    #[doc = "Source of the removed boost"]
82162    #[allow(clippy::needless_lifetimes)]
82163    pub fn get_source<'a>(&'a self) -> &'a ChatBoostSource {
82164        &self.source
82165    }
82166    #[allow(rustdoc::invalid_html_tags)]
82167    #[doc = "Source of the removed boost"]
82168    #[allow(clippy::needless_lifetimes)]
82169    pub fn set_source<'a>(&'a mut self, source: ChatBoostSource) -> &'a mut Self {
82170        self.source = BoxWrapper(Unbox(source));
82171        self
82172    }
82173    #[allow(rustdoc::invalid_html_tags)]
82174    #[doc = "Source of the removed boost"]
82175    fn rhai_get_source(&mut self) -> ChatBoostSource {
82176        self.source.clone().into()
82177    }
82178}
82179#[allow(dead_code)]
82180impl BackgroundTypeFill {
82181    #[allow(clippy::too_many_arguments)]
82182    pub fn new<A: Into<BackgroundFill>>(fill: A, dark_theme_dimming: i64) -> Self {
82183        Self {
82184            tg_type: "BackgroundTypeFill".to_owned(),
82185            fill: BoxWrapper::new_unbox(fill.into()),
82186            dark_theme_dimming,
82187        }
82188    }
82189    #[allow(rustdoc::invalid_html_tags)]
82190    #[doc = "Type of the background, always \"fill\""]
82191    #[allow(clippy::needless_lifetimes)]
82192    pub fn get_tg_type<'a>(&'a self) -> &'a str {
82193        self.tg_type.as_str()
82194    }
82195    #[allow(rustdoc::invalid_html_tags)]
82196    #[doc = "Type of the background, always \"fill\""]
82197    #[allow(clippy::needless_lifetimes)]
82198    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
82199        self.tg_type = tg_type;
82200        self
82201    }
82202    #[allow(rustdoc::invalid_html_tags)]
82203    #[doc = "Type of the background, always \"fill\""]
82204    fn rhai_get_tg_type(&mut self) -> String {
82205        self.tg_type.clone()
82206    }
82207    #[allow(rustdoc::invalid_html_tags)]
82208    #[doc = "The background fill"]
82209    #[allow(clippy::needless_lifetimes)]
82210    pub fn get_fill<'a>(&'a self) -> &'a BackgroundFill {
82211        &self.fill
82212    }
82213    #[allow(rustdoc::invalid_html_tags)]
82214    #[doc = "The background fill"]
82215    #[allow(clippy::needless_lifetimes)]
82216    pub fn set_fill<'a>(&'a mut self, fill: BackgroundFill) -> &'a mut Self {
82217        self.fill = BoxWrapper(Unbox(fill));
82218        self
82219    }
82220    #[allow(rustdoc::invalid_html_tags)]
82221    #[doc = "The background fill"]
82222    fn rhai_get_fill(&mut self) -> BackgroundFill {
82223        self.fill.clone().into()
82224    }
82225    #[allow(rustdoc::invalid_html_tags)]
82226    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
82227    #[allow(clippy::needless_lifetimes)]
82228    pub fn get_dark_theme_dimming<'a>(&'a self) -> i64 {
82229        self.dark_theme_dimming
82230    }
82231    #[allow(rustdoc::invalid_html_tags)]
82232    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
82233    #[allow(clippy::needless_lifetimes)]
82234    pub fn set_dark_theme_dimming<'a>(&'a mut self, dark_theme_dimming: i64) -> &'a mut Self {
82235        self.dark_theme_dimming = dark_theme_dimming;
82236        self
82237    }
82238    #[allow(rustdoc::invalid_html_tags)]
82239    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
82240    fn rhai_get_dark_theme_dimming(&mut self) -> i64 {
82241        self.dark_theme_dimming
82242    }
82243}
82244#[allow(dead_code)]
82245impl MessageId {
82246    #[allow(clippy::too_many_arguments)]
82247    pub fn new(message_id: i64) -> Self {
82248        Self { message_id }
82249    }
82250    #[allow(rustdoc::invalid_html_tags)]
82251    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
82252    #[allow(clippy::needless_lifetimes)]
82253    pub fn get_message_id<'a>(&'a self) -> i64 {
82254        self.message_id
82255    }
82256    #[allow(rustdoc::invalid_html_tags)]
82257    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
82258    #[allow(clippy::needless_lifetimes)]
82259    pub fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
82260        self.message_id = message_id;
82261        self
82262    }
82263    #[allow(rustdoc::invalid_html_tags)]
82264    #[doc = "Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
82265    fn rhai_get_message_id(&mut self) -> i64 {
82266        self.message_id
82267    }
82268}
82269#[allow(dead_code)]
82270impl KeyboardButtonRequestChat {
82271    #[allow(clippy::too_many_arguments)]
82272    pub fn new(request_id: i64, chat_is_channel: bool) -> Self {
82273        Self {
82274            request_id,
82275            chat_is_channel,
82276            chat_is_forum: None,
82277            chat_has_username: None,
82278            chat_is_created: None,
82279            user_administrator_rights: None,
82280            bot_administrator_rights: None,
82281            bot_is_member: None,
82282            request_title: None,
82283            request_username: None,
82284            request_photo: None,
82285        }
82286    }
82287    #[allow(rustdoc::invalid_html_tags)]
82288    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
82289    #[allow(clippy::needless_lifetimes)]
82290    pub fn get_request_id<'a>(&'a self) -> i64 {
82291        self.request_id
82292    }
82293    #[allow(rustdoc::invalid_html_tags)]
82294    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
82295    #[allow(clippy::needless_lifetimes)]
82296    pub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self {
82297        self.request_id = request_id;
82298        self
82299    }
82300    #[allow(rustdoc::invalid_html_tags)]
82301    #[doc = "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message"]
82302    fn rhai_get_request_id(&mut self) -> i64 {
82303        self.request_id
82304    }
82305    #[allow(rustdoc::invalid_html_tags)]
82306    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
82307    #[allow(clippy::needless_lifetimes)]
82308    pub fn get_chat_is_channel<'a>(&'a self) -> bool {
82309        self.chat_is_channel
82310    }
82311    #[allow(rustdoc::invalid_html_tags)]
82312    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
82313    #[allow(clippy::needless_lifetimes)]
82314    pub fn set_chat_is_channel<'a>(&'a mut self, chat_is_channel: bool) -> &'a mut Self {
82315        self.chat_is_channel = chat_is_channel;
82316        self
82317    }
82318    #[allow(rustdoc::invalid_html_tags)]
82319    #[doc = "Pass True to request a channel chat, pass False to request a group or a supergroup chat."]
82320    fn rhai_get_chat_is_channel(&mut self) -> bool {
82321        self.chat_is_channel
82322    }
82323    #[allow(rustdoc::invalid_html_tags)]
82324    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
82325    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82326    pub fn get_chat_is_forum<'a>(&'a self) -> Option<bool> {
82327        self.chat_is_forum.as_ref().map(|v| *v)
82328    }
82329    #[allow(rustdoc::invalid_html_tags)]
82330    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
82331    #[allow(clippy::needless_lifetimes)]
82332    pub fn set_chat_is_forum<'a>(&'a mut self, chat_is_forum: Option<bool>) -> &'a mut Self {
82333        self.chat_is_forum = chat_is_forum;
82334        self
82335    }
82336    #[allow(rustdoc::invalid_html_tags)]
82337    #[doc = "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied."]
82338    fn rhai_get_chat_is_forum(&mut self) -> Option<bool> {
82339        self.chat_is_forum.as_ref().copied()
82340    }
82341    #[allow(rustdoc::invalid_html_tags)]
82342    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
82343    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82344    pub fn get_chat_has_username<'a>(&'a self) -> Option<bool> {
82345        self.chat_has_username.as_ref().map(|v| *v)
82346    }
82347    #[allow(rustdoc::invalid_html_tags)]
82348    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
82349    #[allow(clippy::needless_lifetimes)]
82350    pub fn set_chat_has_username<'a>(
82351        &'a mut self,
82352        chat_has_username: Option<bool>,
82353    ) -> &'a mut Self {
82354        self.chat_has_username = chat_has_username;
82355        self
82356    }
82357    #[allow(rustdoc::invalid_html_tags)]
82358    #[doc = "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied."]
82359    fn rhai_get_chat_has_username(&mut self) -> Option<bool> {
82360        self.chat_has_username.as_ref().copied()
82361    }
82362    #[allow(rustdoc::invalid_html_tags)]
82363    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
82364    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82365    pub fn get_chat_is_created<'a>(&'a self) -> Option<bool> {
82366        self.chat_is_created.as_ref().map(|v| *v)
82367    }
82368    #[allow(rustdoc::invalid_html_tags)]
82369    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
82370    #[allow(clippy::needless_lifetimes)]
82371    pub fn set_chat_is_created<'a>(&'a mut self, chat_is_created: Option<bool>) -> &'a mut Self {
82372        self.chat_is_created = chat_is_created;
82373        self
82374    }
82375    #[allow(rustdoc::invalid_html_tags)]
82376    #[doc = "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied."]
82377    fn rhai_get_chat_is_created(&mut self) -> Option<bool> {
82378        self.chat_is_created.as_ref().copied()
82379    }
82380    #[allow(rustdoc::invalid_html_tags)]
82381    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
82382    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82383    pub fn get_user_administrator_rights<'a>(&'a self) -> Option<&'a ChatAdministratorRights> {
82384        self.user_administrator_rights
82385            .as_ref()
82386            .map(|v| v.inner_ref())
82387    }
82388    #[allow(rustdoc::invalid_html_tags)]
82389    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
82390    #[allow(clippy::needless_lifetimes)]
82391    pub fn set_user_administrator_rights<'a>(
82392        &'a mut self,
82393        user_administrator_rights: Option<ChatAdministratorRights>,
82394    ) -> &'a mut Self {
82395        self.user_administrator_rights = user_administrator_rights
82396            .map(|user_administrator_rights| BoxWrapper(Unbox(user_administrator_rights)));
82397        self
82398    }
82399    #[allow(rustdoc::invalid_html_tags)]
82400    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied."]
82401    fn rhai_get_user_administrator_rights(&mut self) -> Option<ChatAdministratorRights> {
82402        self.user_administrator_rights
82403            .as_ref()
82404            .map(|v| v.clone().into())
82405    }
82406    #[allow(rustdoc::invalid_html_tags)]
82407    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
82408    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82409    pub fn get_bot_administrator_rights<'a>(&'a self) -> Option<&'a ChatAdministratorRights> {
82410        self.bot_administrator_rights
82411            .as_ref()
82412            .map(|v| v.inner_ref())
82413    }
82414    #[allow(rustdoc::invalid_html_tags)]
82415    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
82416    #[allow(clippy::needless_lifetimes)]
82417    pub fn set_bot_administrator_rights<'a>(
82418        &'a mut self,
82419        bot_administrator_rights: Option<ChatAdministratorRights>,
82420    ) -> &'a mut Self {
82421        self.bot_administrator_rights = bot_administrator_rights
82422            .map(|bot_administrator_rights| BoxWrapper(Unbox(bot_administrator_rights)));
82423        self
82424    }
82425    #[allow(rustdoc::invalid_html_tags)]
82426    #[doc = "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied."]
82427    fn rhai_get_bot_administrator_rights(&mut self) -> Option<ChatAdministratorRights> {
82428        self.bot_administrator_rights
82429            .as_ref()
82430            .map(|v| v.clone().into())
82431    }
82432    #[allow(rustdoc::invalid_html_tags)]
82433    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
82434    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82435    pub fn get_bot_is_member<'a>(&'a self) -> Option<bool> {
82436        self.bot_is_member.as_ref().map(|v| *v)
82437    }
82438    #[allow(rustdoc::invalid_html_tags)]
82439    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
82440    #[allow(clippy::needless_lifetimes)]
82441    pub fn set_bot_is_member<'a>(&'a mut self, bot_is_member: Option<bool>) -> &'a mut Self {
82442        self.bot_is_member = bot_is_member;
82443        self
82444    }
82445    #[allow(rustdoc::invalid_html_tags)]
82446    #[doc = "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."]
82447    fn rhai_get_bot_is_member(&mut self) -> Option<bool> {
82448        self.bot_is_member.as_ref().copied()
82449    }
82450    #[allow(rustdoc::invalid_html_tags)]
82451    #[doc = "Optional. Pass True to request the chat's title"]
82452    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82453    pub fn get_request_title<'a>(&'a self) -> Option<bool> {
82454        self.request_title.as_ref().map(|v| *v)
82455    }
82456    #[allow(rustdoc::invalid_html_tags)]
82457    #[doc = "Optional. Pass True to request the chat's title"]
82458    #[allow(clippy::needless_lifetimes)]
82459    pub fn set_request_title<'a>(&'a mut self, request_title: Option<bool>) -> &'a mut Self {
82460        self.request_title = request_title;
82461        self
82462    }
82463    #[allow(rustdoc::invalid_html_tags)]
82464    #[doc = "Optional. Pass True to request the chat's title"]
82465    fn rhai_get_request_title(&mut self) -> Option<bool> {
82466        self.request_title.as_ref().copied()
82467    }
82468    #[allow(rustdoc::invalid_html_tags)]
82469    #[doc = "Optional. Pass True to request the chat's username"]
82470    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82471    pub fn get_request_username<'a>(&'a self) -> Option<bool> {
82472        self.request_username.as_ref().map(|v| *v)
82473    }
82474    #[allow(rustdoc::invalid_html_tags)]
82475    #[doc = "Optional. Pass True to request the chat's username"]
82476    #[allow(clippy::needless_lifetimes)]
82477    pub fn set_request_username<'a>(&'a mut self, request_username: Option<bool>) -> &'a mut Self {
82478        self.request_username = request_username;
82479        self
82480    }
82481    #[allow(rustdoc::invalid_html_tags)]
82482    #[doc = "Optional. Pass True to request the chat's username"]
82483    fn rhai_get_request_username(&mut self) -> Option<bool> {
82484        self.request_username.as_ref().copied()
82485    }
82486    #[allow(rustdoc::invalid_html_tags)]
82487    #[doc = "Optional. Pass True to request the chat's photo"]
82488    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82489    pub fn get_request_photo<'a>(&'a self) -> Option<bool> {
82490        self.request_photo.as_ref().map(|v| *v)
82491    }
82492    #[allow(rustdoc::invalid_html_tags)]
82493    #[doc = "Optional. Pass True to request the chat's photo"]
82494    #[allow(clippy::needless_lifetimes)]
82495    pub fn set_request_photo<'a>(&'a mut self, request_photo: Option<bool>) -> &'a mut Self {
82496        self.request_photo = request_photo;
82497        self
82498    }
82499    #[allow(rustdoc::invalid_html_tags)]
82500    #[doc = "Optional. Pass True to request the chat's photo"]
82501    fn rhai_get_request_photo(&mut self) -> Option<bool> {
82502        self.request_photo.as_ref().copied()
82503    }
82504}
82505#[allow(dead_code)]
82506impl ReactionTypeEmoji {
82507    #[allow(clippy::too_many_arguments)]
82508    pub fn new(emoji: String) -> Self {
82509        Self {
82510            tg_type: "ReactionTypeEmoji".to_owned(),
82511            emoji,
82512        }
82513    }
82514    #[allow(rustdoc::invalid_html_tags)]
82515    #[doc = "Type of the reaction, always \"emoji\""]
82516    #[allow(clippy::needless_lifetimes)]
82517    pub fn get_tg_type<'a>(&'a self) -> &'a str {
82518        self.tg_type.as_str()
82519    }
82520    #[allow(rustdoc::invalid_html_tags)]
82521    #[doc = "Type of the reaction, always \"emoji\""]
82522    #[allow(clippy::needless_lifetimes)]
82523    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
82524        self.tg_type = tg_type;
82525        self
82526    }
82527    #[allow(rustdoc::invalid_html_tags)]
82528    #[doc = "Type of the reaction, always \"emoji\""]
82529    fn rhai_get_tg_type(&mut self) -> String {
82530        self.tg_type.clone()
82531    }
82532    #[allow(rustdoc::invalid_html_tags)]
82533    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
82534    #[allow(clippy::needless_lifetimes)]
82535    pub fn get_emoji<'a>(&'a self) -> &'a str {
82536        self.emoji.as_str()
82537    }
82538    #[allow(rustdoc::invalid_html_tags)]
82539    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
82540    #[allow(clippy::needless_lifetimes)]
82541    pub fn set_emoji<'a>(&'a mut self, emoji: String) -> &'a mut Self {
82542        self.emoji = emoji;
82543        self
82544    }
82545    #[allow(rustdoc::invalid_html_tags)]
82546    #[doc = "Reaction emoji. Currently, it can be one of \"❤\", \"👍\", \"👎\", \"🔥\", \"🥰\", \"👏\", \"😁\", \"🤔\", \"🤯\", \"😱\", \"🤬\", \"😢\", \"🎉\", \"🤩\", \"🤮\", \"💩\", \"🙏\", \"👌\", \"🕊\", \"🤡\", \"🥱\", \"🥴\", \"😍\", \"🐳\", \"❤\u{200d}🔥\", \"🌚\", \"🌭\", \"💯\", \"🤣\", \"⚡\", \"🍌\", \"🏆\", \"💔\", \"🤨\", \"😐\", \"🍓\", \"🍾\", \"💋\", \"🖕\", \"😈\", \"😴\", \"😭\", \"🤓\", \"👻\", \"👨\u{200d}💻\", \"👀\", \"🎃\", \"🙈\", \"😇\", \"😨\", \"🤝\", \"✍\", \"🤗\", \"🫡\", \"🎅\", \"🎄\", \"☃\", \"💅\", \"🤪\", \"🗿\", \"🆒\", \"💘\", \"🙉\", \"🦄\", \"😘\", \"💊\", \"🙊\", \"😎\", \"👾\", \"🤷\u{200d}♂\", \"🤷\", \"🤷\u{200d}♀\", \"😡\""]
82547    fn rhai_get_emoji(&mut self) -> String {
82548        self.emoji.clone()
82549    }
82550}
82551#[allow(dead_code)]
82552impl InputFile {
82553    pub fn convert_form(self, data: Form) -> Result<(Form, String)> {
82554        match self {
82555            InputFile::Bytes(FileBytes {
82556                name,
82557                bytes: Some(bytes),
82558            }) => {
82559                let attach = format!("attach://{}", name);
82560                let form = data.part(name, Part::bytes(bytes).file_name(""));
82561                Ok((form, attach))
82562            }
82563            InputFile::String(name) => Ok((data, name)),
82564            _ => Err(anyhow!("cry")),
82565        }
82566    }
82567}
82568#[allow(dead_code)]
82569impl SentWebAppMessage {
82570    #[allow(clippy::too_many_arguments)]
82571    pub fn new() -> Self {
82572        Self {
82573            inline_message_id: None,
82574        }
82575    }
82576    #[allow(rustdoc::invalid_html_tags)]
82577    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
82578    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82579    pub fn get_inline_message_id<'a>(&'a self) -> Option<&'a str> {
82580        self.inline_message_id.as_ref().map(|v| v.as_str())
82581    }
82582    #[allow(rustdoc::invalid_html_tags)]
82583    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
82584    #[allow(clippy::needless_lifetimes)]
82585    pub fn set_inline_message_id<'a>(
82586        &'a mut self,
82587        inline_message_id: Option<String>,
82588    ) -> &'a mut Self {
82589        self.inline_message_id = inline_message_id;
82590        self
82591    }
82592    #[allow(rustdoc::invalid_html_tags)]
82593    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message."]
82594    fn rhai_get_inline_message_id(&mut self) -> Option<String> {
82595        self.inline_message_id.as_ref().cloned()
82596    }
82597}
82598#[allow(dead_code)]
82599impl Giveaway {
82600    #[allow(clippy::too_many_arguments)]
82601    pub fn new(chats: Vec<Chat>, winners_selection_date: i64, winner_count: i64) -> Self {
82602        Self {
82603            chats,
82604            winners_selection_date,
82605            winner_count,
82606            only_new_members: None,
82607            has_public_winners: None,
82608            prize_description: None,
82609            country_codes: None,
82610            prize_star_count: None,
82611            premium_subscription_month_count: None,
82612        }
82613    }
82614    #[allow(rustdoc::invalid_html_tags)]
82615    #[doc = "The list of chats which the user must join to participate in the giveaway"]
82616    #[allow(clippy::needless_lifetimes)]
82617    pub fn get_chats<'a>(&'a self) -> &'a Vec<Chat> {
82618        &self.chats
82619    }
82620    #[allow(rustdoc::invalid_html_tags)]
82621    #[doc = "The list of chats which the user must join to participate in the giveaway"]
82622    #[allow(clippy::needless_lifetimes)]
82623    pub fn set_chats<'a>(&'a mut self, chats: Vec<Chat>) -> &'a mut Self {
82624        self.chats = chats;
82625        self
82626    }
82627    #[allow(rustdoc::invalid_html_tags)]
82628    #[doc = "The list of chats which the user must join to participate in the giveaway"]
82629    fn rhai_get_chats(&mut self) -> Vec<Chat> {
82630        self.chats.clone()
82631    }
82632    #[allow(rustdoc::invalid_html_tags)]
82633    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
82634    #[allow(clippy::needless_lifetimes)]
82635    pub fn get_winners_selection_date<'a>(&'a self) -> i64 {
82636        self.winners_selection_date
82637    }
82638    #[allow(rustdoc::invalid_html_tags)]
82639    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
82640    #[allow(clippy::needless_lifetimes)]
82641    pub fn set_winners_selection_date<'a>(
82642        &'a mut self,
82643        winners_selection_date: i64,
82644    ) -> &'a mut Self {
82645        self.winners_selection_date = winners_selection_date;
82646        self
82647    }
82648    #[allow(rustdoc::invalid_html_tags)]
82649    #[doc = "Point in time (Unix timestamp) when winners of the giveaway will be selected"]
82650    fn rhai_get_winners_selection_date(&mut self) -> i64 {
82651        self.winners_selection_date
82652    }
82653    #[allow(rustdoc::invalid_html_tags)]
82654    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
82655    #[allow(clippy::needless_lifetimes)]
82656    pub fn get_winner_count<'a>(&'a self) -> i64 {
82657        self.winner_count
82658    }
82659    #[allow(rustdoc::invalid_html_tags)]
82660    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
82661    #[allow(clippy::needless_lifetimes)]
82662    pub fn set_winner_count<'a>(&'a mut self, winner_count: i64) -> &'a mut Self {
82663        self.winner_count = winner_count;
82664        self
82665    }
82666    #[allow(rustdoc::invalid_html_tags)]
82667    #[doc = "The number of users which are supposed to be selected as winners of the giveaway"]
82668    fn rhai_get_winner_count(&mut self) -> i64 {
82669        self.winner_count
82670    }
82671    #[allow(rustdoc::invalid_html_tags)]
82672    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
82673    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82674    pub fn get_only_new_members<'a>(&'a self) -> Option<bool> {
82675        self.only_new_members.as_ref().map(|v| *v)
82676    }
82677    #[allow(rustdoc::invalid_html_tags)]
82678    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
82679    #[allow(clippy::needless_lifetimes)]
82680    pub fn set_only_new_members<'a>(&'a mut self, only_new_members: Option<bool>) -> &'a mut Self {
82681        self.only_new_members = only_new_members;
82682        self
82683    }
82684    #[allow(rustdoc::invalid_html_tags)]
82685    #[doc = "Optional. True, if only users who join the chats after the giveaway started should be eligible to win"]
82686    fn rhai_get_only_new_members(&mut self) -> Option<bool> {
82687        self.only_new_members.as_ref().copied()
82688    }
82689    #[allow(rustdoc::invalid_html_tags)]
82690    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
82691    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82692    pub fn get_has_public_winners<'a>(&'a self) -> Option<bool> {
82693        self.has_public_winners.as_ref().map(|v| *v)
82694    }
82695    #[allow(rustdoc::invalid_html_tags)]
82696    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
82697    #[allow(clippy::needless_lifetimes)]
82698    pub fn set_has_public_winners<'a>(
82699        &'a mut self,
82700        has_public_winners: Option<bool>,
82701    ) -> &'a mut Self {
82702        self.has_public_winners = has_public_winners;
82703        self
82704    }
82705    #[allow(rustdoc::invalid_html_tags)]
82706    #[doc = "Optional. True, if the list of giveaway winners will be visible to everyone"]
82707    fn rhai_get_has_public_winners(&mut self) -> Option<bool> {
82708        self.has_public_winners.as_ref().copied()
82709    }
82710    #[allow(rustdoc::invalid_html_tags)]
82711    #[doc = "Optional. Description of additional giveaway prize"]
82712    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82713    pub fn get_prize_description<'a>(&'a self) -> Option<&'a str> {
82714        self.prize_description.as_ref().map(|v| v.as_str())
82715    }
82716    #[allow(rustdoc::invalid_html_tags)]
82717    #[doc = "Optional. Description of additional giveaway prize"]
82718    #[allow(clippy::needless_lifetimes)]
82719    pub fn set_prize_description<'a>(
82720        &'a mut self,
82721        prize_description: Option<String>,
82722    ) -> &'a mut Self {
82723        self.prize_description = prize_description;
82724        self
82725    }
82726    #[allow(rustdoc::invalid_html_tags)]
82727    #[doc = "Optional. Description of additional giveaway prize"]
82728    fn rhai_get_prize_description(&mut self) -> Option<String> {
82729        self.prize_description.as_ref().cloned()
82730    }
82731    #[allow(rustdoc::invalid_html_tags)]
82732    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
82733    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82734    pub fn get_country_codes<'a>(&'a self) -> Option<&'a Vec<String>> {
82735        self.country_codes.as_ref()
82736    }
82737    #[allow(rustdoc::invalid_html_tags)]
82738    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
82739    #[allow(clippy::needless_lifetimes)]
82740    pub fn set_country_codes<'a>(&'a mut self, country_codes: Option<Vec<String>>) -> &'a mut Self {
82741        self.country_codes = country_codes;
82742        self
82743    }
82744    #[allow(rustdoc::invalid_html_tags)]
82745    #[doc = "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways."]
82746    fn rhai_get_country_codes(&mut self) -> Option<Vec<String>> {
82747        self.country_codes.as_ref().cloned()
82748    }
82749    #[allow(rustdoc::invalid_html_tags)]
82750    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
82751    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82752    pub fn get_prize_star_count<'a>(&'a self) -> Option<i64> {
82753        self.prize_star_count.as_ref().map(|v| *v)
82754    }
82755    #[allow(rustdoc::invalid_html_tags)]
82756    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
82757    #[allow(clippy::needless_lifetimes)]
82758    pub fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self {
82759        self.prize_star_count = prize_star_count;
82760        self
82761    }
82762    #[allow(rustdoc::invalid_html_tags)]
82763    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
82764    fn rhai_get_prize_star_count(&mut self) -> Option<i64> {
82765        self.prize_star_count.as_ref().copied()
82766    }
82767    #[allow(rustdoc::invalid_html_tags)]
82768    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
82769    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82770    pub fn get_premium_subscription_month_count<'a>(&'a self) -> Option<i64> {
82771        self.premium_subscription_month_count.as_ref().map(|v| *v)
82772    }
82773    #[allow(rustdoc::invalid_html_tags)]
82774    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
82775    #[allow(clippy::needless_lifetimes)]
82776    pub fn set_premium_subscription_month_count<'a>(
82777        &'a mut self,
82778        premium_subscription_month_count: Option<i64>,
82779    ) -> &'a mut Self {
82780        self.premium_subscription_month_count = premium_subscription_month_count;
82781        self
82782    }
82783    #[allow(rustdoc::invalid_html_tags)]
82784    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
82785    fn rhai_get_premium_subscription_month_count(&mut self) -> Option<i64> {
82786        self.premium_subscription_month_count.as_ref().copied()
82787    }
82788}
82789#[allow(dead_code)]
82790impl DirectMessagesTopic {
82791    #[allow(clippy::too_many_arguments)]
82792    pub fn new(topic_id: i64) -> Self {
82793        Self {
82794            topic_id,
82795            user: None,
82796        }
82797    }
82798    #[allow(rustdoc::invalid_html_tags)]
82799    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
82800    #[allow(clippy::needless_lifetimes)]
82801    pub fn get_topic_id<'a>(&'a self) -> i64 {
82802        self.topic_id
82803    }
82804    #[allow(rustdoc::invalid_html_tags)]
82805    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
82806    #[allow(clippy::needless_lifetimes)]
82807    pub fn set_topic_id<'a>(&'a mut self, topic_id: i64) -> &'a mut Self {
82808        self.topic_id = topic_id;
82809        self
82810    }
82811    #[allow(rustdoc::invalid_html_tags)]
82812    #[doc = "Unique identifier of the topic. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."]
82813    fn rhai_get_topic_id(&mut self) -> i64 {
82814        self.topic_id
82815    }
82816    #[allow(rustdoc::invalid_html_tags)]
82817    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
82818    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82819    pub fn get_user<'a>(&'a self) -> Option<&'a User> {
82820        self.user.as_ref().map(|v| v.inner_ref())
82821    }
82822    #[allow(rustdoc::invalid_html_tags)]
82823    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
82824    #[allow(clippy::needless_lifetimes)]
82825    pub fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self {
82826        self.user = user.map(|user| BoxWrapper(Unbox(user)));
82827        self
82828    }
82829    #[allow(rustdoc::invalid_html_tags)]
82830    #[doc = "Optional. Information about the user that created the topic. Currently, it is always present"]
82831    fn rhai_get_user(&mut self) -> Option<User> {
82832        self.user.as_ref().map(|v| v.clone().into())
82833    }
82834}
82835#[allow(dead_code)]
82836impl RevenueWithdrawalStateSucceeded {
82837    #[allow(clippy::too_many_arguments)]
82838    pub fn new(date: i64, url: String) -> Self {
82839        Self {
82840            tg_type: "RevenueWithdrawalStateSucceeded".to_owned(),
82841            date,
82842            url,
82843        }
82844    }
82845    #[allow(rustdoc::invalid_html_tags)]
82846    #[doc = "Type of the state, always \"succeeded\""]
82847    #[allow(clippy::needless_lifetimes)]
82848    pub fn get_tg_type<'a>(&'a self) -> &'a str {
82849        self.tg_type.as_str()
82850    }
82851    #[allow(rustdoc::invalid_html_tags)]
82852    #[doc = "Type of the state, always \"succeeded\""]
82853    #[allow(clippy::needless_lifetimes)]
82854    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
82855        self.tg_type = tg_type;
82856        self
82857    }
82858    #[allow(rustdoc::invalid_html_tags)]
82859    #[doc = "Type of the state, always \"succeeded\""]
82860    fn rhai_get_tg_type(&mut self) -> String {
82861        self.tg_type.clone()
82862    }
82863    #[allow(rustdoc::invalid_html_tags)]
82864    #[doc = "Date the withdrawal was completed in Unix time"]
82865    #[allow(clippy::needless_lifetimes)]
82866    pub fn get_date<'a>(&'a self) -> i64 {
82867        self.date
82868    }
82869    #[allow(rustdoc::invalid_html_tags)]
82870    #[doc = "Date the withdrawal was completed in Unix time"]
82871    #[allow(clippy::needless_lifetimes)]
82872    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
82873        self.date = date;
82874        self
82875    }
82876    #[allow(rustdoc::invalid_html_tags)]
82877    #[doc = "Date the withdrawal was completed in Unix time"]
82878    fn rhai_get_date(&mut self) -> i64 {
82879        self.date
82880    }
82881    #[allow(rustdoc::invalid_html_tags)]
82882    #[doc = "An HTTPS URL that can be used to see transaction details"]
82883    #[allow(clippy::needless_lifetimes)]
82884    pub fn get_url<'a>(&'a self) -> &'a str {
82885        self.url.as_str()
82886    }
82887    #[allow(rustdoc::invalid_html_tags)]
82888    #[doc = "An HTTPS URL that can be used to see transaction details"]
82889    #[allow(clippy::needless_lifetimes)]
82890    pub fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self {
82891        self.url = url;
82892        self
82893    }
82894    #[allow(rustdoc::invalid_html_tags)]
82895    #[doc = "An HTTPS URL that can be used to see transaction details"]
82896    fn rhai_get_url(&mut self) -> String {
82897        self.url.clone()
82898    }
82899}
82900#[allow(dead_code)]
82901impl VideoChatEnded {
82902    #[allow(clippy::too_many_arguments)]
82903    pub fn new(duration: i64) -> Self {
82904        Self { duration }
82905    }
82906    #[allow(rustdoc::invalid_html_tags)]
82907    #[doc = "Video chat duration in seconds"]
82908    #[allow(clippy::needless_lifetimes)]
82909    pub fn get_duration<'a>(&'a self) -> i64 {
82910        self.duration
82911    }
82912    #[allow(rustdoc::invalid_html_tags)]
82913    #[doc = "Video chat duration in seconds"]
82914    #[allow(clippy::needless_lifetimes)]
82915    pub fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self {
82916        self.duration = duration;
82917        self
82918    }
82919    #[allow(rustdoc::invalid_html_tags)]
82920    #[doc = "Video chat duration in seconds"]
82921    fn rhai_get_duration(&mut self) -> i64 {
82922        self.duration
82923    }
82924}
82925#[allow(dead_code)]
82926impl ChatMemberOwner {
82927    #[allow(clippy::too_many_arguments)]
82928    pub fn new<A: Into<User>>(user: A, is_anonymous: bool) -> Self {
82929        Self {
82930            user: BoxWrapper::new_unbox(user.into()),
82931            is_anonymous,
82932            custom_title: None,
82933        }
82934    }
82935    #[allow(rustdoc::invalid_html_tags)]
82936    #[doc = "Information about the user"]
82937    #[allow(clippy::needless_lifetimes)]
82938    pub fn get_user<'a>(&'a self) -> &'a User {
82939        &self.user
82940    }
82941    #[allow(rustdoc::invalid_html_tags)]
82942    #[doc = "Information about the user"]
82943    #[allow(clippy::needless_lifetimes)]
82944    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
82945        self.user = BoxWrapper(Unbox(user));
82946        self
82947    }
82948    #[allow(rustdoc::invalid_html_tags)]
82949    #[doc = "Information about the user"]
82950    fn rhai_get_user(&mut self) -> User {
82951        self.user.clone().into()
82952    }
82953    #[allow(rustdoc::invalid_html_tags)]
82954    #[doc = "True, if the user's presence in the chat is hidden"]
82955    #[allow(clippy::needless_lifetimes)]
82956    pub fn get_is_anonymous<'a>(&'a self) -> bool {
82957        self.is_anonymous
82958    }
82959    #[allow(rustdoc::invalid_html_tags)]
82960    #[doc = "True, if the user's presence in the chat is hidden"]
82961    #[allow(clippy::needless_lifetimes)]
82962    pub fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self {
82963        self.is_anonymous = is_anonymous;
82964        self
82965    }
82966    #[allow(rustdoc::invalid_html_tags)]
82967    #[doc = "True, if the user's presence in the chat is hidden"]
82968    fn rhai_get_is_anonymous(&mut self) -> bool {
82969        self.is_anonymous
82970    }
82971    #[allow(rustdoc::invalid_html_tags)]
82972    #[doc = "Optional. Custom title for this user"]
82973    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
82974    pub fn get_custom_title<'a>(&'a self) -> Option<&'a str> {
82975        self.custom_title.as_ref().map(|v| v.as_str())
82976    }
82977    #[allow(rustdoc::invalid_html_tags)]
82978    #[doc = "Optional. Custom title for this user"]
82979    #[allow(clippy::needless_lifetimes)]
82980    pub fn set_custom_title<'a>(&'a mut self, custom_title: Option<String>) -> &'a mut Self {
82981        self.custom_title = custom_title;
82982        self
82983    }
82984    #[allow(rustdoc::invalid_html_tags)]
82985    #[doc = "Optional. Custom title for this user"]
82986    fn rhai_get_custom_title(&mut self) -> Option<String> {
82987        self.custom_title.as_ref().cloned()
82988    }
82989}
82990#[allow(dead_code)]
82991impl PreCheckoutQuery {
82992    #[allow(clippy::too_many_arguments)]
82993    pub fn new<A: Into<User>>(
82994        id: String,
82995        from: A,
82996        currency: String,
82997        total_amount: i64,
82998        invoice_payload: String,
82999    ) -> Self {
83000        Self {
83001            id,
83002            from: BoxWrapper::new_unbox(from.into()),
83003            currency,
83004            total_amount,
83005            invoice_payload,
83006            shipping_option_id: None,
83007            order_info: None,
83008        }
83009    }
83010    #[allow(rustdoc::invalid_html_tags)]
83011    #[doc = "Unique query identifier"]
83012    #[allow(clippy::needless_lifetimes)]
83013    pub fn get_id<'a>(&'a self) -> &'a str {
83014        self.id.as_str()
83015    }
83016    #[allow(rustdoc::invalid_html_tags)]
83017    #[doc = "Unique query identifier"]
83018    #[allow(clippy::needless_lifetimes)]
83019    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
83020        self.id = id;
83021        self
83022    }
83023    #[allow(rustdoc::invalid_html_tags)]
83024    #[doc = "Unique query identifier"]
83025    fn rhai_get_id(&mut self) -> String {
83026        self.id.clone()
83027    }
83028    #[allow(rustdoc::invalid_html_tags)]
83029    #[doc = "User who sent the query"]
83030    #[allow(clippy::needless_lifetimes)]
83031    pub fn get_from<'a>(&'a self) -> &'a User {
83032        &self.from
83033    }
83034    #[allow(rustdoc::invalid_html_tags)]
83035    #[doc = "User who sent the query"]
83036    #[allow(clippy::needless_lifetimes)]
83037    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
83038        self.from = BoxWrapper(Unbox(from));
83039        self
83040    }
83041    #[allow(rustdoc::invalid_html_tags)]
83042    #[doc = "User who sent the query"]
83043    fn rhai_get_from(&mut self) -> User {
83044        self.from.clone().into()
83045    }
83046    #[allow(rustdoc::invalid_html_tags)]
83047    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
83048    #[allow(clippy::needless_lifetimes)]
83049    pub fn get_currency<'a>(&'a self) -> &'a str {
83050        self.currency.as_str()
83051    }
83052    #[allow(rustdoc::invalid_html_tags)]
83053    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
83054    #[allow(clippy::needless_lifetimes)]
83055    pub fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
83056        self.currency = currency;
83057        self
83058    }
83059    #[allow(rustdoc::invalid_html_tags)]
83060    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
83061    fn rhai_get_currency(&mut self) -> String {
83062        self.currency.clone()
83063    }
83064    #[allow(rustdoc::invalid_html_tags)]
83065    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
83066    #[allow(clippy::needless_lifetimes)]
83067    pub fn get_total_amount<'a>(&'a self) -> i64 {
83068        self.total_amount
83069    }
83070    #[allow(rustdoc::invalid_html_tags)]
83071    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
83072    #[allow(clippy::needless_lifetimes)]
83073    pub fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self {
83074        self.total_amount = total_amount;
83075        self
83076    }
83077    #[allow(rustdoc::invalid_html_tags)]
83078    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
83079    fn rhai_get_total_amount(&mut self) -> i64 {
83080        self.total_amount
83081    }
83082    #[allow(rustdoc::invalid_html_tags)]
83083    #[doc = "Bot-specified invoice payload"]
83084    #[allow(clippy::needless_lifetimes)]
83085    pub fn get_invoice_payload<'a>(&'a self) -> &'a str {
83086        self.invoice_payload.as_str()
83087    }
83088    #[allow(rustdoc::invalid_html_tags)]
83089    #[doc = "Bot-specified invoice payload"]
83090    #[allow(clippy::needless_lifetimes)]
83091    pub fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self {
83092        self.invoice_payload = invoice_payload;
83093        self
83094    }
83095    #[allow(rustdoc::invalid_html_tags)]
83096    #[doc = "Bot-specified invoice payload"]
83097    fn rhai_get_invoice_payload(&mut self) -> String {
83098        self.invoice_payload.clone()
83099    }
83100    #[allow(rustdoc::invalid_html_tags)]
83101    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
83102    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83103    pub fn get_shipping_option_id<'a>(&'a self) -> Option<&'a str> {
83104        self.shipping_option_id.as_ref().map(|v| v.as_str())
83105    }
83106    #[allow(rustdoc::invalid_html_tags)]
83107    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
83108    #[allow(clippy::needless_lifetimes)]
83109    pub fn set_shipping_option_id<'a>(
83110        &'a mut self,
83111        shipping_option_id: Option<String>,
83112    ) -> &'a mut Self {
83113        self.shipping_option_id = shipping_option_id;
83114        self
83115    }
83116    #[allow(rustdoc::invalid_html_tags)]
83117    #[doc = "Optional. Identifier of the shipping option chosen by the user"]
83118    fn rhai_get_shipping_option_id(&mut self) -> Option<String> {
83119        self.shipping_option_id.as_ref().cloned()
83120    }
83121    #[allow(rustdoc::invalid_html_tags)]
83122    #[doc = "Optional. Order information provided by the user"]
83123    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83124    pub fn get_order_info<'a>(&'a self) -> Option<&'a OrderInfo> {
83125        self.order_info.as_ref().map(|v| v.inner_ref())
83126    }
83127    #[allow(rustdoc::invalid_html_tags)]
83128    #[doc = "Optional. Order information provided by the user"]
83129    #[allow(clippy::needless_lifetimes)]
83130    pub fn set_order_info<'a>(&'a mut self, order_info: Option<OrderInfo>) -> &'a mut Self {
83131        self.order_info = order_info.map(|order_info| BoxWrapper(Unbox(order_info)));
83132        self
83133    }
83134    #[allow(rustdoc::invalid_html_tags)]
83135    #[doc = "Optional. Order information provided by the user"]
83136    fn rhai_get_order_info(&mut self) -> Option<OrderInfo> {
83137        self.order_info.as_ref().map(|v| v.clone().into())
83138    }
83139}
83140impl TraitBackgroundTypeFill for BackgroundTypeFill {
83141    #[allow(rustdoc::invalid_html_tags)]
83142    #[doc = "Type of the background, always \"fill\""]
83143    #[allow(clippy::needless_lifetimes)]
83144    fn get_tg_type<'a>(&'a self) -> &'a str {
83145        self.tg_type.as_str()
83146    }
83147    #[allow(rustdoc::invalid_html_tags)]
83148    #[doc = "Type of the background, always \"fill\""]
83149    #[allow(clippy::needless_lifetimes)]
83150    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
83151        self.tg_type = tg_type;
83152        self
83153    }
83154    #[allow(rustdoc::invalid_html_tags)]
83155    #[doc = "The background fill"]
83156    #[allow(clippy::needless_lifetimes)]
83157    fn get_fill<'a>(&'a self) -> &'a BackgroundFill {
83158        &self.fill
83159    }
83160    #[allow(rustdoc::invalid_html_tags)]
83161    #[doc = "The background fill"]
83162    #[allow(clippy::needless_lifetimes)]
83163    fn set_fill<'a>(&'a mut self, fill: BackgroundFill) -> &'a mut Self {
83164        self.fill = BoxWrapper(Unbox(fill));
83165        self
83166    }
83167    #[allow(rustdoc::invalid_html_tags)]
83168    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
83169    #[allow(clippy::needless_lifetimes)]
83170    fn get_dark_theme_dimming<'a>(&'a self) -> i64 {
83171        self.dark_theme_dimming
83172    }
83173    #[allow(rustdoc::invalid_html_tags)]
83174    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
83175    #[allow(clippy::needless_lifetimes)]
83176    fn set_dark_theme_dimming<'a>(&'a mut self, dark_theme_dimming: i64) -> &'a mut Self {
83177        self.dark_theme_dimming = dark_theme_dimming;
83178        self
83179    }
83180}
83181impl TraitBackgroundTypeWallpaper for BackgroundTypeWallpaper {
83182    #[allow(rustdoc::invalid_html_tags)]
83183    #[doc = "Type of the background, always \"wallpaper\""]
83184    #[allow(clippy::needless_lifetimes)]
83185    fn get_tg_type<'a>(&'a self) -> &'a str {
83186        self.tg_type.as_str()
83187    }
83188    #[allow(rustdoc::invalid_html_tags)]
83189    #[doc = "Type of the background, always \"wallpaper\""]
83190    #[allow(clippy::needless_lifetimes)]
83191    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
83192        self.tg_type = tg_type;
83193        self
83194    }
83195    #[allow(rustdoc::invalid_html_tags)]
83196    #[doc = "Document with the wallpaper"]
83197    #[allow(clippy::needless_lifetimes)]
83198    fn get_document<'a>(&'a self) -> &'a Document {
83199        &self.document
83200    }
83201    #[allow(rustdoc::invalid_html_tags)]
83202    #[doc = "Document with the wallpaper"]
83203    #[allow(clippy::needless_lifetimes)]
83204    fn set_document<'a>(&'a mut self, document: Document) -> &'a mut Self {
83205        self.document = BoxWrapper(Unbox(document));
83206        self
83207    }
83208    #[allow(rustdoc::invalid_html_tags)]
83209    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
83210    #[allow(clippy::needless_lifetimes)]
83211    fn get_dark_theme_dimming<'a>(&'a self) -> i64 {
83212        self.dark_theme_dimming
83213    }
83214    #[allow(rustdoc::invalid_html_tags)]
83215    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
83216    #[allow(clippy::needless_lifetimes)]
83217    fn set_dark_theme_dimming<'a>(&'a mut self, dark_theme_dimming: i64) -> &'a mut Self {
83218        self.dark_theme_dimming = dark_theme_dimming;
83219        self
83220    }
83221    #[allow(rustdoc::invalid_html_tags)]
83222    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
83223    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83224    fn get_is_blurred<'a>(&'a self) -> Option<bool> {
83225        self.is_blurred.as_ref().map(|v| *v)
83226    }
83227    #[allow(rustdoc::invalid_html_tags)]
83228    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
83229    #[allow(clippy::needless_lifetimes)]
83230    fn set_is_blurred<'a>(&'a mut self, is_blurred: Option<bool>) -> &'a mut Self {
83231        self.is_blurred = is_blurred;
83232        self
83233    }
83234    #[allow(rustdoc::invalid_html_tags)]
83235    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
83236    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83237    fn get_is_moving<'a>(&'a self) -> Option<bool> {
83238        self.is_moving.as_ref().map(|v| *v)
83239    }
83240    #[allow(rustdoc::invalid_html_tags)]
83241    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
83242    #[allow(clippy::needless_lifetimes)]
83243    fn set_is_moving<'a>(&'a mut self, is_moving: Option<bool>) -> &'a mut Self {
83244        self.is_moving = is_moving;
83245        self
83246    }
83247}
83248impl TraitBackgroundTypePattern for BackgroundTypePattern {
83249    #[allow(rustdoc::invalid_html_tags)]
83250    #[doc = "Type of the background, always \"pattern\""]
83251    #[allow(clippy::needless_lifetimes)]
83252    fn get_tg_type<'a>(&'a self) -> &'a str {
83253        self.tg_type.as_str()
83254    }
83255    #[allow(rustdoc::invalid_html_tags)]
83256    #[doc = "Type of the background, always \"pattern\""]
83257    #[allow(clippy::needless_lifetimes)]
83258    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
83259        self.tg_type = tg_type;
83260        self
83261    }
83262    #[allow(rustdoc::invalid_html_tags)]
83263    #[doc = "Document with the pattern"]
83264    #[allow(clippy::needless_lifetimes)]
83265    fn get_document<'a>(&'a self) -> &'a Document {
83266        &self.document
83267    }
83268    #[allow(rustdoc::invalid_html_tags)]
83269    #[doc = "Document with the pattern"]
83270    #[allow(clippy::needless_lifetimes)]
83271    fn set_document<'a>(&'a mut self, document: Document) -> &'a mut Self {
83272        self.document = BoxWrapper(Unbox(document));
83273        self
83274    }
83275    #[allow(rustdoc::invalid_html_tags)]
83276    #[doc = "The background fill that is combined with the pattern"]
83277    #[allow(clippy::needless_lifetimes)]
83278    fn get_fill<'a>(&'a self) -> &'a BackgroundFill {
83279        &self.fill
83280    }
83281    #[allow(rustdoc::invalid_html_tags)]
83282    #[doc = "The background fill that is combined with the pattern"]
83283    #[allow(clippy::needless_lifetimes)]
83284    fn set_fill<'a>(&'a mut self, fill: BackgroundFill) -> &'a mut Self {
83285        self.fill = BoxWrapper(Unbox(fill));
83286        self
83287    }
83288    #[allow(rustdoc::invalid_html_tags)]
83289    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
83290    #[allow(clippy::needless_lifetimes)]
83291    fn get_intensity<'a>(&'a self) -> i64 {
83292        self.intensity
83293    }
83294    #[allow(rustdoc::invalid_html_tags)]
83295    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
83296    #[allow(clippy::needless_lifetimes)]
83297    fn set_intensity<'a>(&'a mut self, intensity: i64) -> &'a mut Self {
83298        self.intensity = intensity;
83299        self
83300    }
83301    #[allow(rustdoc::invalid_html_tags)]
83302    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
83303    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83304    fn get_is_inverted<'a>(&'a self) -> Option<bool> {
83305        self.is_inverted.as_ref().map(|v| *v)
83306    }
83307    #[allow(rustdoc::invalid_html_tags)]
83308    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
83309    #[allow(clippy::needless_lifetimes)]
83310    fn set_is_inverted<'a>(&'a mut self, is_inverted: Option<bool>) -> &'a mut Self {
83311        self.is_inverted = is_inverted;
83312        self
83313    }
83314    #[allow(rustdoc::invalid_html_tags)]
83315    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
83316    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83317    fn get_is_moving<'a>(&'a self) -> Option<bool> {
83318        self.is_moving.as_ref().map(|v| *v)
83319    }
83320    #[allow(rustdoc::invalid_html_tags)]
83321    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
83322    #[allow(clippy::needless_lifetimes)]
83323    fn set_is_moving<'a>(&'a mut self, is_moving: Option<bool>) -> &'a mut Self {
83324        self.is_moving = is_moving;
83325        self
83326    }
83327}
83328impl TraitBackgroundTypeChatTheme for BackgroundTypeChatTheme {
83329    #[allow(rustdoc::invalid_html_tags)]
83330    #[doc = "Type of the background, always \"chat_theme\""]
83331    #[allow(clippy::needless_lifetimes)]
83332    fn get_tg_type<'a>(&'a self) -> &'a str {
83333        self.tg_type.as_str()
83334    }
83335    #[allow(rustdoc::invalid_html_tags)]
83336    #[doc = "Type of the background, always \"chat_theme\""]
83337    #[allow(clippy::needless_lifetimes)]
83338    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
83339        self.tg_type = tg_type;
83340        self
83341    }
83342    #[allow(rustdoc::invalid_html_tags)]
83343    #[doc = "Name of the chat theme, which is usually an emoji"]
83344    #[allow(clippy::needless_lifetimes)]
83345    fn get_theme_name<'a>(&'a self) -> &'a str {
83346        self.theme_name.as_str()
83347    }
83348    #[allow(rustdoc::invalid_html_tags)]
83349    #[doc = "Name of the chat theme, which is usually an emoji"]
83350    #[allow(clippy::needless_lifetimes)]
83351    fn set_theme_name<'a>(&'a mut self, theme_name: String) -> &'a mut Self {
83352        self.theme_name = theme_name;
83353        self
83354    }
83355}
83356#[allow(dead_code)]
83357impl InlineQueryResultVenue {
83358    #[allow(clippy::too_many_arguments)]
83359    pub fn new(
83360        id: String,
83361        latitude: ::ordered_float::OrderedFloat<f64>,
83362        longitude: ::ordered_float::OrderedFloat<f64>,
83363        title: String,
83364        address: String,
83365    ) -> Self {
83366        Self {
83367            tg_type: "venue".to_owned(),
83368            id,
83369            latitude,
83370            longitude,
83371            title,
83372            address,
83373            foursquare_id: None,
83374            foursquare_type: None,
83375            google_place_id: None,
83376            google_place_type: None,
83377            reply_markup: None,
83378            input_message_content: None,
83379            thumbnail_url: None,
83380            thumbnail_width: None,
83381            thumbnail_height: None,
83382        }
83383    }
83384    #[allow(rustdoc::invalid_html_tags)]
83385    #[doc = "Type of the result, must be venue"]
83386    #[allow(clippy::needless_lifetimes)]
83387    pub fn get_tg_type<'a>(&'a self) -> &'a str {
83388        self.tg_type.as_str()
83389    }
83390    #[allow(rustdoc::invalid_html_tags)]
83391    #[doc = "Type of the result, must be venue"]
83392    #[allow(clippy::needless_lifetimes)]
83393    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
83394        self.tg_type = tg_type;
83395        self
83396    }
83397    #[allow(rustdoc::invalid_html_tags)]
83398    #[doc = "Type of the result, must be venue"]
83399    fn rhai_get_tg_type(&mut self) -> String {
83400        self.tg_type.clone()
83401    }
83402    #[allow(rustdoc::invalid_html_tags)]
83403    #[doc = "Unique identifier for this result, 1-64 Bytes"]
83404    #[allow(clippy::needless_lifetimes)]
83405    pub fn get_id<'a>(&'a self) -> &'a str {
83406        self.id.as_str()
83407    }
83408    #[allow(rustdoc::invalid_html_tags)]
83409    #[doc = "Unique identifier for this result, 1-64 Bytes"]
83410    #[allow(clippy::needless_lifetimes)]
83411    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
83412        self.id = id;
83413        self
83414    }
83415    #[allow(rustdoc::invalid_html_tags)]
83416    #[doc = "Unique identifier for this result, 1-64 Bytes"]
83417    fn rhai_get_id(&mut self) -> String {
83418        self.id.clone()
83419    }
83420    #[allow(rustdoc::invalid_html_tags)]
83421    #[doc = "Latitude of the venue location in degrees"]
83422    #[allow(clippy::needless_lifetimes)]
83423    pub fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
83424        self.latitude
83425    }
83426    #[allow(rustdoc::invalid_html_tags)]
83427    #[doc = "Latitude of the venue location in degrees"]
83428    #[allow(clippy::needless_lifetimes)]
83429    pub fn set_latitude<'a>(
83430        &'a mut self,
83431        latitude: ::ordered_float::OrderedFloat<f64>,
83432    ) -> &'a mut Self {
83433        self.latitude = latitude;
83434        self
83435    }
83436    #[allow(rustdoc::invalid_html_tags)]
83437    #[doc = "Latitude of the venue location in degrees"]
83438    fn rhai_get_latitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
83439        self.latitude
83440    }
83441    #[allow(rustdoc::invalid_html_tags)]
83442    #[doc = "Longitude of the venue location in degrees"]
83443    #[allow(clippy::needless_lifetimes)]
83444    pub fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
83445        self.longitude
83446    }
83447    #[allow(rustdoc::invalid_html_tags)]
83448    #[doc = "Longitude of the venue location in degrees"]
83449    #[allow(clippy::needless_lifetimes)]
83450    pub fn set_longitude<'a>(
83451        &'a mut self,
83452        longitude: ::ordered_float::OrderedFloat<f64>,
83453    ) -> &'a mut Self {
83454        self.longitude = longitude;
83455        self
83456    }
83457    #[allow(rustdoc::invalid_html_tags)]
83458    #[doc = "Longitude of the venue location in degrees"]
83459    fn rhai_get_longitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
83460        self.longitude
83461    }
83462    #[allow(rustdoc::invalid_html_tags)]
83463    #[doc = "Title of the venue"]
83464    #[allow(clippy::needless_lifetimes)]
83465    pub fn get_title<'a>(&'a self) -> &'a str {
83466        self.title.as_str()
83467    }
83468    #[allow(rustdoc::invalid_html_tags)]
83469    #[doc = "Title of the venue"]
83470    #[allow(clippy::needless_lifetimes)]
83471    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
83472        self.title = title;
83473        self
83474    }
83475    #[allow(rustdoc::invalid_html_tags)]
83476    #[doc = "Title of the venue"]
83477    fn rhai_get_title(&mut self) -> String {
83478        self.title.clone()
83479    }
83480    #[allow(rustdoc::invalid_html_tags)]
83481    #[doc = "Address of the venue"]
83482    #[allow(clippy::needless_lifetimes)]
83483    pub fn get_address<'a>(&'a self) -> &'a str {
83484        self.address.as_str()
83485    }
83486    #[allow(rustdoc::invalid_html_tags)]
83487    #[doc = "Address of the venue"]
83488    #[allow(clippy::needless_lifetimes)]
83489    pub fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self {
83490        self.address = address;
83491        self
83492    }
83493    #[allow(rustdoc::invalid_html_tags)]
83494    #[doc = "Address of the venue"]
83495    fn rhai_get_address(&mut self) -> String {
83496        self.address.clone()
83497    }
83498    #[allow(rustdoc::invalid_html_tags)]
83499    #[doc = "Optional. Foursquare identifier of the venue if known"]
83500    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83501    pub fn get_foursquare_id<'a>(&'a self) -> Option<&'a str> {
83502        self.foursquare_id.as_ref().map(|v| v.as_str())
83503    }
83504    #[allow(rustdoc::invalid_html_tags)]
83505    #[doc = "Optional. Foursquare identifier of the venue if known"]
83506    #[allow(clippy::needless_lifetimes)]
83507    pub fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self {
83508        self.foursquare_id = foursquare_id;
83509        self
83510    }
83511    #[allow(rustdoc::invalid_html_tags)]
83512    #[doc = "Optional. Foursquare identifier of the venue if known"]
83513    fn rhai_get_foursquare_id(&mut self) -> Option<String> {
83514        self.foursquare_id.as_ref().cloned()
83515    }
83516    #[allow(rustdoc::invalid_html_tags)]
83517    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
83518    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83519    pub fn get_foursquare_type<'a>(&'a self) -> Option<&'a str> {
83520        self.foursquare_type.as_ref().map(|v| v.as_str())
83521    }
83522    #[allow(rustdoc::invalid_html_tags)]
83523    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
83524    #[allow(clippy::needless_lifetimes)]
83525    pub fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self {
83526        self.foursquare_type = foursquare_type;
83527        self
83528    }
83529    #[allow(rustdoc::invalid_html_tags)]
83530    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
83531    fn rhai_get_foursquare_type(&mut self) -> Option<String> {
83532        self.foursquare_type.as_ref().cloned()
83533    }
83534    #[allow(rustdoc::invalid_html_tags)]
83535    #[doc = "Optional. Google Places identifier of the venue"]
83536    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83537    pub fn get_google_place_id<'a>(&'a self) -> Option<&'a str> {
83538        self.google_place_id.as_ref().map(|v| v.as_str())
83539    }
83540    #[allow(rustdoc::invalid_html_tags)]
83541    #[doc = "Optional. Google Places identifier of the venue"]
83542    #[allow(clippy::needless_lifetimes)]
83543    pub fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self {
83544        self.google_place_id = google_place_id;
83545        self
83546    }
83547    #[allow(rustdoc::invalid_html_tags)]
83548    #[doc = "Optional. Google Places identifier of the venue"]
83549    fn rhai_get_google_place_id(&mut self) -> Option<String> {
83550        self.google_place_id.as_ref().cloned()
83551    }
83552    #[allow(rustdoc::invalid_html_tags)]
83553    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
83554    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83555    pub fn get_google_place_type<'a>(&'a self) -> Option<&'a str> {
83556        self.google_place_type.as_ref().map(|v| v.as_str())
83557    }
83558    #[allow(rustdoc::invalid_html_tags)]
83559    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
83560    #[allow(clippy::needless_lifetimes)]
83561    pub fn set_google_place_type<'a>(
83562        &'a mut self,
83563        google_place_type: Option<String>,
83564    ) -> &'a mut Self {
83565        self.google_place_type = google_place_type;
83566        self
83567    }
83568    #[allow(rustdoc::invalid_html_tags)]
83569    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
83570    fn rhai_get_google_place_type(&mut self) -> Option<String> {
83571        self.google_place_type.as_ref().cloned()
83572    }
83573    #[allow(rustdoc::invalid_html_tags)]
83574    #[doc = "Optional. Inline keyboard attached to the message"]
83575    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83576    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
83577        self.reply_markup.as_ref().map(|v| v.inner_ref())
83578    }
83579    #[allow(rustdoc::invalid_html_tags)]
83580    #[doc = "Optional. Inline keyboard attached to the message"]
83581    #[allow(clippy::needless_lifetimes)]
83582    pub fn set_reply_markup<'a>(
83583        &'a mut self,
83584        reply_markup: Option<InlineKeyboardMarkup>,
83585    ) -> &'a mut Self {
83586        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
83587        self
83588    }
83589    #[allow(rustdoc::invalid_html_tags)]
83590    #[doc = "Optional. Inline keyboard attached to the message"]
83591    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
83592        self.reply_markup.as_ref().map(|v| v.clone().into())
83593    }
83594    #[allow(rustdoc::invalid_html_tags)]
83595    #[doc = "Optional. Content of the message to be sent instead of the venue"]
83596    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83597    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
83598        self.input_message_content.as_ref().map(|v| v.inner_ref())
83599    }
83600    #[allow(rustdoc::invalid_html_tags)]
83601    #[doc = "Optional. Content of the message to be sent instead of the venue"]
83602    #[allow(clippy::needless_lifetimes)]
83603    pub fn set_input_message_content<'a>(
83604        &'a mut self,
83605        input_message_content: Option<InputMessageContent>,
83606    ) -> &'a mut Self {
83607        self.input_message_content = input_message_content
83608            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
83609        self
83610    }
83611    #[allow(rustdoc::invalid_html_tags)]
83612    #[doc = "Optional. Content of the message to be sent instead of the venue"]
83613    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
83614        self.input_message_content
83615            .as_ref()
83616            .map(|v| v.clone().into())
83617    }
83618    #[allow(rustdoc::invalid_html_tags)]
83619    #[doc = "Optional. Url of the thumbnail for the result"]
83620    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83621    pub fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
83622        self.thumbnail_url.as_ref().map(|v| v.as_str())
83623    }
83624    #[allow(rustdoc::invalid_html_tags)]
83625    #[doc = "Optional. Url of the thumbnail for the result"]
83626    #[allow(clippy::needless_lifetimes)]
83627    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
83628        self.thumbnail_url = thumbnail_url;
83629        self
83630    }
83631    #[allow(rustdoc::invalid_html_tags)]
83632    #[doc = "Optional. Url of the thumbnail for the result"]
83633    fn rhai_get_thumbnail_url(&mut self) -> Option<String> {
83634        self.thumbnail_url.as_ref().cloned()
83635    }
83636    #[allow(rustdoc::invalid_html_tags)]
83637    #[doc = "Optional. Thumbnail width"]
83638    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83639    pub fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
83640        self.thumbnail_width.as_ref().map(|v| *v)
83641    }
83642    #[allow(rustdoc::invalid_html_tags)]
83643    #[doc = "Optional. Thumbnail width"]
83644    #[allow(clippy::needless_lifetimes)]
83645    pub fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
83646        self.thumbnail_width = thumbnail_width;
83647        self
83648    }
83649    #[allow(rustdoc::invalid_html_tags)]
83650    #[doc = "Optional. Thumbnail width"]
83651    fn rhai_get_thumbnail_width(&mut self) -> Option<i64> {
83652        self.thumbnail_width.as_ref().copied()
83653    }
83654    #[allow(rustdoc::invalid_html_tags)]
83655    #[doc = "Optional. Thumbnail height"]
83656    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83657    pub fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
83658        self.thumbnail_height.as_ref().map(|v| *v)
83659    }
83660    #[allow(rustdoc::invalid_html_tags)]
83661    #[doc = "Optional. Thumbnail height"]
83662    #[allow(clippy::needless_lifetimes)]
83663    pub fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
83664        self.thumbnail_height = thumbnail_height;
83665        self
83666    }
83667    #[allow(rustdoc::invalid_html_tags)]
83668    #[doc = "Optional. Thumbnail height"]
83669    fn rhai_get_thumbnail_height(&mut self) -> Option<i64> {
83670        self.thumbnail_height.as_ref().copied()
83671    }
83672}
83673#[allow(dead_code)]
83674impl PaidMediaInfo {
83675    #[allow(clippy::too_many_arguments)]
83676    pub fn new(star_count: i64, paid_media: Vec<PaidMedia>) -> Self {
83677        Self {
83678            star_count,
83679            paid_media,
83680        }
83681    }
83682    #[allow(rustdoc::invalid_html_tags)]
83683    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
83684    #[allow(clippy::needless_lifetimes)]
83685    pub fn get_star_count<'a>(&'a self) -> i64 {
83686        self.star_count
83687    }
83688    #[allow(rustdoc::invalid_html_tags)]
83689    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
83690    #[allow(clippy::needless_lifetimes)]
83691    pub fn set_star_count<'a>(&'a mut self, star_count: i64) -> &'a mut Self {
83692        self.star_count = star_count;
83693        self
83694    }
83695    #[allow(rustdoc::invalid_html_tags)]
83696    #[doc = "The number of Telegram Stars that must be paid to buy access to the media"]
83697    fn rhai_get_star_count(&mut self) -> i64 {
83698        self.star_count
83699    }
83700    #[allow(rustdoc::invalid_html_tags)]
83701    #[doc = "Information about the paid media"]
83702    #[allow(clippy::needless_lifetimes)]
83703    pub fn get_paid_media<'a>(&'a self) -> &'a Vec<PaidMedia> {
83704        &self.paid_media
83705    }
83706    #[allow(rustdoc::invalid_html_tags)]
83707    #[doc = "Information about the paid media"]
83708    #[allow(clippy::needless_lifetimes)]
83709    pub fn set_paid_media<'a>(&'a mut self, paid_media: Vec<PaidMedia>) -> &'a mut Self {
83710        self.paid_media = paid_media;
83711        self
83712    }
83713    #[allow(rustdoc::invalid_html_tags)]
83714    #[doc = "Information about the paid media"]
83715    fn rhai_get_paid_media(&mut self) -> Vec<PaidMedia> {
83716        self.paid_media.clone()
83717    }
83718}
83719#[allow(dead_code)]
83720impl InlineQueryResultCachedPhoto {
83721    #[allow(clippy::too_many_arguments)]
83722    pub fn new(id: String, photo_file_id: String) -> Self {
83723        Self {
83724            tg_type: "photo".to_owned(),
83725            id,
83726            photo_file_id,
83727            title: None,
83728            description: None,
83729            caption: None,
83730            parse_mode: None,
83731            caption_entities: None,
83732            show_caption_above_media: None,
83733            reply_markup: None,
83734            input_message_content: None,
83735        }
83736    }
83737    #[allow(rustdoc::invalid_html_tags)]
83738    #[doc = "Type of the result, must be photo"]
83739    #[allow(clippy::needless_lifetimes)]
83740    pub fn get_tg_type<'a>(&'a self) -> &'a str {
83741        self.tg_type.as_str()
83742    }
83743    #[allow(rustdoc::invalid_html_tags)]
83744    #[doc = "Type of the result, must be photo"]
83745    #[allow(clippy::needless_lifetimes)]
83746    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
83747        self.tg_type = tg_type;
83748        self
83749    }
83750    #[allow(rustdoc::invalid_html_tags)]
83751    #[doc = "Type of the result, must be photo"]
83752    fn rhai_get_tg_type(&mut self) -> String {
83753        self.tg_type.clone()
83754    }
83755    #[allow(rustdoc::invalid_html_tags)]
83756    #[doc = "Unique identifier for this result, 1-64 bytes"]
83757    #[allow(clippy::needless_lifetimes)]
83758    pub fn get_id<'a>(&'a self) -> &'a str {
83759        self.id.as_str()
83760    }
83761    #[allow(rustdoc::invalid_html_tags)]
83762    #[doc = "Unique identifier for this result, 1-64 bytes"]
83763    #[allow(clippy::needless_lifetimes)]
83764    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
83765        self.id = id;
83766        self
83767    }
83768    #[allow(rustdoc::invalid_html_tags)]
83769    #[doc = "Unique identifier for this result, 1-64 bytes"]
83770    fn rhai_get_id(&mut self) -> String {
83771        self.id.clone()
83772    }
83773    #[allow(rustdoc::invalid_html_tags)]
83774    #[doc = "A valid file identifier of the photo"]
83775    #[allow(clippy::needless_lifetimes)]
83776    pub fn get_photo_file_id<'a>(&'a self) -> &'a str {
83777        self.photo_file_id.as_str()
83778    }
83779    #[allow(rustdoc::invalid_html_tags)]
83780    #[doc = "A valid file identifier of the photo"]
83781    #[allow(clippy::needless_lifetimes)]
83782    pub fn set_photo_file_id<'a>(&'a mut self, photo_file_id: String) -> &'a mut Self {
83783        self.photo_file_id = photo_file_id;
83784        self
83785    }
83786    #[allow(rustdoc::invalid_html_tags)]
83787    #[doc = "A valid file identifier of the photo"]
83788    fn rhai_get_photo_file_id(&mut self) -> String {
83789        self.photo_file_id.clone()
83790    }
83791    #[allow(rustdoc::invalid_html_tags)]
83792    #[doc = "Optional. Title for the result"]
83793    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83794    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
83795        self.title.as_ref().map(|v| v.as_str())
83796    }
83797    #[allow(rustdoc::invalid_html_tags)]
83798    #[doc = "Optional. Title for the result"]
83799    #[allow(clippy::needless_lifetimes)]
83800    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
83801        self.title = title;
83802        self
83803    }
83804    #[allow(rustdoc::invalid_html_tags)]
83805    #[doc = "Optional. Title for the result"]
83806    fn rhai_get_title(&mut self) -> Option<String> {
83807        self.title.as_ref().cloned()
83808    }
83809    #[allow(rustdoc::invalid_html_tags)]
83810    #[doc = "Optional. Short description of the result"]
83811    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83812    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
83813        self.description.as_ref().map(|v| v.as_str())
83814    }
83815    #[allow(rustdoc::invalid_html_tags)]
83816    #[doc = "Optional. Short description of the result"]
83817    #[allow(clippy::needless_lifetimes)]
83818    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
83819        self.description = description;
83820        self
83821    }
83822    #[allow(rustdoc::invalid_html_tags)]
83823    #[doc = "Optional. Short description of the result"]
83824    fn rhai_get_description(&mut self) -> Option<String> {
83825        self.description.as_ref().cloned()
83826    }
83827    #[allow(rustdoc::invalid_html_tags)]
83828    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
83829    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83830    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
83831        self.caption.as_ref().map(|v| v.as_str())
83832    }
83833    #[allow(rustdoc::invalid_html_tags)]
83834    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
83835    #[allow(clippy::needless_lifetimes)]
83836    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
83837        self.caption = caption;
83838        self
83839    }
83840    #[allow(rustdoc::invalid_html_tags)]
83841    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
83842    fn rhai_get_caption(&mut self) -> Option<String> {
83843        self.caption.as_ref().cloned()
83844    }
83845    #[allow(rustdoc::invalid_html_tags)]
83846    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
83847    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83848    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
83849        self.parse_mode.as_ref().map(|v| v.as_str())
83850    }
83851    #[allow(rustdoc::invalid_html_tags)]
83852    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
83853    #[allow(clippy::needless_lifetimes)]
83854    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
83855        self.parse_mode = parse_mode;
83856        self
83857    }
83858    #[allow(rustdoc::invalid_html_tags)]
83859    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
83860    fn rhai_get_parse_mode(&mut self) -> Option<String> {
83861        self.parse_mode.as_ref().cloned()
83862    }
83863    #[allow(rustdoc::invalid_html_tags)]
83864    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
83865    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83866    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
83867        self.caption_entities.as_ref()
83868    }
83869    #[allow(rustdoc::invalid_html_tags)]
83870    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
83871    #[allow(clippy::needless_lifetimes)]
83872    pub fn set_caption_entities<'a>(
83873        &'a mut self,
83874        caption_entities: Option<Vec<MessageEntity>>,
83875    ) -> &'a mut Self {
83876        self.caption_entities = caption_entities;
83877        self
83878    }
83879    #[allow(rustdoc::invalid_html_tags)]
83880    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
83881    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
83882        self.caption_entities.as_ref().cloned()
83883    }
83884    #[allow(rustdoc::invalid_html_tags)]
83885    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
83886    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83887    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
83888        self.show_caption_above_media.as_ref().map(|v| *v)
83889    }
83890    #[allow(rustdoc::invalid_html_tags)]
83891    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
83892    #[allow(clippy::needless_lifetimes)]
83893    pub fn set_show_caption_above_media<'a>(
83894        &'a mut self,
83895        show_caption_above_media: Option<bool>,
83896    ) -> &'a mut Self {
83897        self.show_caption_above_media = show_caption_above_media;
83898        self
83899    }
83900    #[allow(rustdoc::invalid_html_tags)]
83901    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
83902    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
83903        self.show_caption_above_media.as_ref().copied()
83904    }
83905    #[allow(rustdoc::invalid_html_tags)]
83906    #[doc = "Optional. Inline keyboard attached to the message"]
83907    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83908    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
83909        self.reply_markup.as_ref().map(|v| v.inner_ref())
83910    }
83911    #[allow(rustdoc::invalid_html_tags)]
83912    #[doc = "Optional. Inline keyboard attached to the message"]
83913    #[allow(clippy::needless_lifetimes)]
83914    pub fn set_reply_markup<'a>(
83915        &'a mut self,
83916        reply_markup: Option<InlineKeyboardMarkup>,
83917    ) -> &'a mut Self {
83918        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
83919        self
83920    }
83921    #[allow(rustdoc::invalid_html_tags)]
83922    #[doc = "Optional. Inline keyboard attached to the message"]
83923    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
83924        self.reply_markup.as_ref().map(|v| v.clone().into())
83925    }
83926    #[allow(rustdoc::invalid_html_tags)]
83927    #[doc = "Optional. Content of the message to be sent instead of the photo"]
83928    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
83929    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
83930        self.input_message_content.as_ref().map(|v| v.inner_ref())
83931    }
83932    #[allow(rustdoc::invalid_html_tags)]
83933    #[doc = "Optional. Content of the message to be sent instead of the photo"]
83934    #[allow(clippy::needless_lifetimes)]
83935    pub fn set_input_message_content<'a>(
83936        &'a mut self,
83937        input_message_content: Option<InputMessageContent>,
83938    ) -> &'a mut Self {
83939        self.input_message_content = input_message_content
83940            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
83941        self
83942    }
83943    #[allow(rustdoc::invalid_html_tags)]
83944    #[doc = "Optional. Content of the message to be sent instead of the photo"]
83945    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
83946        self.input_message_content
83947            .as_ref()
83948            .map(|v| v.clone().into())
83949    }
83950}
83951#[allow(dead_code)]
83952impl GeneralForumTopicUnhidden {}
83953#[allow(dead_code)]
83954impl GiveawayWinners {
83955    #[allow(clippy::too_many_arguments)]
83956    pub fn new<A: Into<Chat>>(
83957        chat: A,
83958        giveaway_message_id: i64,
83959        winners_selection_date: i64,
83960        winner_count: i64,
83961        winners: Vec<User>,
83962    ) -> Self {
83963        Self {
83964            chat: BoxWrapper::new_unbox(chat.into()),
83965            giveaway_message_id,
83966            winners_selection_date,
83967            winner_count,
83968            winners,
83969            additional_chat_count: None,
83970            prize_star_count: None,
83971            premium_subscription_month_count: None,
83972            unclaimed_prize_count: None,
83973            only_new_members: None,
83974            was_refunded: None,
83975            prize_description: None,
83976        }
83977    }
83978    #[allow(rustdoc::invalid_html_tags)]
83979    #[doc = "The chat that created the giveaway"]
83980    #[allow(clippy::needless_lifetimes)]
83981    pub fn get_chat<'a>(&'a self) -> &'a Chat {
83982        &self.chat
83983    }
83984    #[allow(rustdoc::invalid_html_tags)]
83985    #[doc = "The chat that created the giveaway"]
83986    #[allow(clippy::needless_lifetimes)]
83987    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
83988        self.chat = BoxWrapper(Unbox(chat));
83989        self
83990    }
83991    #[allow(rustdoc::invalid_html_tags)]
83992    #[doc = "The chat that created the giveaway"]
83993    fn rhai_get_chat(&mut self) -> Chat {
83994        self.chat.clone().into()
83995    }
83996    #[allow(rustdoc::invalid_html_tags)]
83997    #[doc = "Identifier of the message with the giveaway in the chat"]
83998    #[allow(clippy::needless_lifetimes)]
83999    pub fn get_giveaway_message_id<'a>(&'a self) -> i64 {
84000        self.giveaway_message_id
84001    }
84002    #[allow(rustdoc::invalid_html_tags)]
84003    #[doc = "Identifier of the message with the giveaway in the chat"]
84004    #[allow(clippy::needless_lifetimes)]
84005    pub fn set_giveaway_message_id<'a>(&'a mut self, giveaway_message_id: i64) -> &'a mut Self {
84006        self.giveaway_message_id = giveaway_message_id;
84007        self
84008    }
84009    #[allow(rustdoc::invalid_html_tags)]
84010    #[doc = "Identifier of the message with the giveaway in the chat"]
84011    fn rhai_get_giveaway_message_id(&mut self) -> i64 {
84012        self.giveaway_message_id
84013    }
84014    #[allow(rustdoc::invalid_html_tags)]
84015    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
84016    #[allow(clippy::needless_lifetimes)]
84017    pub fn get_winners_selection_date<'a>(&'a self) -> i64 {
84018        self.winners_selection_date
84019    }
84020    #[allow(rustdoc::invalid_html_tags)]
84021    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
84022    #[allow(clippy::needless_lifetimes)]
84023    pub fn set_winners_selection_date<'a>(
84024        &'a mut self,
84025        winners_selection_date: i64,
84026    ) -> &'a mut Self {
84027        self.winners_selection_date = winners_selection_date;
84028        self
84029    }
84030    #[allow(rustdoc::invalid_html_tags)]
84031    #[doc = "Point in time (Unix timestamp) when winners of the giveaway were selected"]
84032    fn rhai_get_winners_selection_date(&mut self) -> i64 {
84033        self.winners_selection_date
84034    }
84035    #[allow(rustdoc::invalid_html_tags)]
84036    #[doc = "Total number of winners in the giveaway"]
84037    #[allow(clippy::needless_lifetimes)]
84038    pub fn get_winner_count<'a>(&'a self) -> i64 {
84039        self.winner_count
84040    }
84041    #[allow(rustdoc::invalid_html_tags)]
84042    #[doc = "Total number of winners in the giveaway"]
84043    #[allow(clippy::needless_lifetimes)]
84044    pub fn set_winner_count<'a>(&'a mut self, winner_count: i64) -> &'a mut Self {
84045        self.winner_count = winner_count;
84046        self
84047    }
84048    #[allow(rustdoc::invalid_html_tags)]
84049    #[doc = "Total number of winners in the giveaway"]
84050    fn rhai_get_winner_count(&mut self) -> i64 {
84051        self.winner_count
84052    }
84053    #[allow(rustdoc::invalid_html_tags)]
84054    #[doc = "List of up to 100 winners of the giveaway"]
84055    #[allow(clippy::needless_lifetimes)]
84056    pub fn get_winners<'a>(&'a self) -> &'a Vec<User> {
84057        &self.winners
84058    }
84059    #[allow(rustdoc::invalid_html_tags)]
84060    #[doc = "List of up to 100 winners of the giveaway"]
84061    #[allow(clippy::needless_lifetimes)]
84062    pub fn set_winners<'a>(&'a mut self, winners: Vec<User>) -> &'a mut Self {
84063        self.winners = winners;
84064        self
84065    }
84066    #[allow(rustdoc::invalid_html_tags)]
84067    #[doc = "List of up to 100 winners of the giveaway"]
84068    fn rhai_get_winners(&mut self) -> Vec<User> {
84069        self.winners.clone()
84070    }
84071    #[allow(rustdoc::invalid_html_tags)]
84072    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
84073    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84074    pub fn get_additional_chat_count<'a>(&'a self) -> Option<i64> {
84075        self.additional_chat_count.as_ref().map(|v| *v)
84076    }
84077    #[allow(rustdoc::invalid_html_tags)]
84078    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
84079    #[allow(clippy::needless_lifetimes)]
84080    pub fn set_additional_chat_count<'a>(
84081        &'a mut self,
84082        additional_chat_count: Option<i64>,
84083    ) -> &'a mut Self {
84084        self.additional_chat_count = additional_chat_count;
84085        self
84086    }
84087    #[allow(rustdoc::invalid_html_tags)]
84088    #[doc = "Optional. The number of other chats the user had to join in order to be eligible for the giveaway"]
84089    fn rhai_get_additional_chat_count(&mut self) -> Option<i64> {
84090        self.additional_chat_count.as_ref().copied()
84091    }
84092    #[allow(rustdoc::invalid_html_tags)]
84093    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
84094    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84095    pub fn get_prize_star_count<'a>(&'a self) -> Option<i64> {
84096        self.prize_star_count.as_ref().map(|v| *v)
84097    }
84098    #[allow(rustdoc::invalid_html_tags)]
84099    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
84100    #[allow(clippy::needless_lifetimes)]
84101    pub fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self {
84102        self.prize_star_count = prize_star_count;
84103        self
84104    }
84105    #[allow(rustdoc::invalid_html_tags)]
84106    #[doc = "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only"]
84107    fn rhai_get_prize_star_count(&mut self) -> Option<i64> {
84108        self.prize_star_count.as_ref().copied()
84109    }
84110    #[allow(rustdoc::invalid_html_tags)]
84111    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
84112    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84113    pub fn get_premium_subscription_month_count<'a>(&'a self) -> Option<i64> {
84114        self.premium_subscription_month_count.as_ref().map(|v| *v)
84115    }
84116    #[allow(rustdoc::invalid_html_tags)]
84117    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
84118    #[allow(clippy::needless_lifetimes)]
84119    pub fn set_premium_subscription_month_count<'a>(
84120        &'a mut self,
84121        premium_subscription_month_count: Option<i64>,
84122    ) -> &'a mut Self {
84123        self.premium_subscription_month_count = premium_subscription_month_count;
84124        self
84125    }
84126    #[allow(rustdoc::invalid_html_tags)]
84127    #[doc = "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only"]
84128    fn rhai_get_premium_subscription_month_count(&mut self) -> Option<i64> {
84129        self.premium_subscription_month_count.as_ref().copied()
84130    }
84131    #[allow(rustdoc::invalid_html_tags)]
84132    #[doc = "Optional. Number of undistributed prizes"]
84133    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84134    pub fn get_unclaimed_prize_count<'a>(&'a self) -> Option<i64> {
84135        self.unclaimed_prize_count.as_ref().map(|v| *v)
84136    }
84137    #[allow(rustdoc::invalid_html_tags)]
84138    #[doc = "Optional. Number of undistributed prizes"]
84139    #[allow(clippy::needless_lifetimes)]
84140    pub fn set_unclaimed_prize_count<'a>(
84141        &'a mut self,
84142        unclaimed_prize_count: Option<i64>,
84143    ) -> &'a mut Self {
84144        self.unclaimed_prize_count = unclaimed_prize_count;
84145        self
84146    }
84147    #[allow(rustdoc::invalid_html_tags)]
84148    #[doc = "Optional. Number of undistributed prizes"]
84149    fn rhai_get_unclaimed_prize_count(&mut self) -> Option<i64> {
84150        self.unclaimed_prize_count.as_ref().copied()
84151    }
84152    #[allow(rustdoc::invalid_html_tags)]
84153    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
84154    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84155    pub fn get_only_new_members<'a>(&'a self) -> Option<bool> {
84156        self.only_new_members.as_ref().map(|v| *v)
84157    }
84158    #[allow(rustdoc::invalid_html_tags)]
84159    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
84160    #[allow(clippy::needless_lifetimes)]
84161    pub fn set_only_new_members<'a>(&'a mut self, only_new_members: Option<bool>) -> &'a mut Self {
84162        self.only_new_members = only_new_members;
84163        self
84164    }
84165    #[allow(rustdoc::invalid_html_tags)]
84166    #[doc = "Optional. True, if only users who had joined the chats after the giveaway started were eligible to win"]
84167    fn rhai_get_only_new_members(&mut self) -> Option<bool> {
84168        self.only_new_members.as_ref().copied()
84169    }
84170    #[allow(rustdoc::invalid_html_tags)]
84171    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
84172    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84173    pub fn get_was_refunded<'a>(&'a self) -> Option<bool> {
84174        self.was_refunded.as_ref().map(|v| *v)
84175    }
84176    #[allow(rustdoc::invalid_html_tags)]
84177    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
84178    #[allow(clippy::needless_lifetimes)]
84179    pub fn set_was_refunded<'a>(&'a mut self, was_refunded: Option<bool>) -> &'a mut Self {
84180        self.was_refunded = was_refunded;
84181        self
84182    }
84183    #[allow(rustdoc::invalid_html_tags)]
84184    #[doc = "Optional. True, if the giveaway was canceled because the payment for it was refunded"]
84185    fn rhai_get_was_refunded(&mut self) -> Option<bool> {
84186        self.was_refunded.as_ref().copied()
84187    }
84188    #[allow(rustdoc::invalid_html_tags)]
84189    #[doc = "Optional. Description of additional giveaway prize"]
84190    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84191    pub fn get_prize_description<'a>(&'a self) -> Option<&'a str> {
84192        self.prize_description.as_ref().map(|v| v.as_str())
84193    }
84194    #[allow(rustdoc::invalid_html_tags)]
84195    #[doc = "Optional. Description of additional giveaway prize"]
84196    #[allow(clippy::needless_lifetimes)]
84197    pub fn set_prize_description<'a>(
84198        &'a mut self,
84199        prize_description: Option<String>,
84200    ) -> &'a mut Self {
84201        self.prize_description = prize_description;
84202        self
84203    }
84204    #[allow(rustdoc::invalid_html_tags)]
84205    #[doc = "Optional. Description of additional giveaway prize"]
84206    fn rhai_get_prize_description(&mut self) -> Option<String> {
84207        self.prize_description.as_ref().cloned()
84208    }
84209}
84210#[allow(dead_code)]
84211impl MessageOriginHiddenUser {
84212    #[allow(clippy::too_many_arguments)]
84213    pub fn new(date: i64, sender_user_name: String) -> Self {
84214        Self {
84215            tg_type: "MessageOriginHiddenUser".to_owned(),
84216            date,
84217            sender_user_name,
84218        }
84219    }
84220    #[allow(rustdoc::invalid_html_tags)]
84221    #[doc = "Type of the message origin, always \"hidden_user\""]
84222    #[allow(clippy::needless_lifetimes)]
84223    pub fn get_tg_type<'a>(&'a self) -> &'a str {
84224        self.tg_type.as_str()
84225    }
84226    #[allow(rustdoc::invalid_html_tags)]
84227    #[doc = "Type of the message origin, always \"hidden_user\""]
84228    #[allow(clippy::needless_lifetimes)]
84229    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
84230        self.tg_type = tg_type;
84231        self
84232    }
84233    #[allow(rustdoc::invalid_html_tags)]
84234    #[doc = "Type of the message origin, always \"hidden_user\""]
84235    fn rhai_get_tg_type(&mut self) -> String {
84236        self.tg_type.clone()
84237    }
84238    #[allow(rustdoc::invalid_html_tags)]
84239    #[doc = "Date the message was sent originally in Unix time"]
84240    #[allow(clippy::needless_lifetimes)]
84241    pub fn get_date<'a>(&'a self) -> i64 {
84242        self.date
84243    }
84244    #[allow(rustdoc::invalid_html_tags)]
84245    #[doc = "Date the message was sent originally in Unix time"]
84246    #[allow(clippy::needless_lifetimes)]
84247    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
84248        self.date = date;
84249        self
84250    }
84251    #[allow(rustdoc::invalid_html_tags)]
84252    #[doc = "Date the message was sent originally in Unix time"]
84253    fn rhai_get_date(&mut self) -> i64 {
84254        self.date
84255    }
84256    #[allow(rustdoc::invalid_html_tags)]
84257    #[doc = "Name of the user that sent the message originally"]
84258    #[allow(clippy::needless_lifetimes)]
84259    pub fn get_sender_user_name<'a>(&'a self) -> &'a str {
84260        self.sender_user_name.as_str()
84261    }
84262    #[allow(rustdoc::invalid_html_tags)]
84263    #[doc = "Name of the user that sent the message originally"]
84264    #[allow(clippy::needless_lifetimes)]
84265    pub fn set_sender_user_name<'a>(&'a mut self, sender_user_name: String) -> &'a mut Self {
84266        self.sender_user_name = sender_user_name;
84267        self
84268    }
84269    #[allow(rustdoc::invalid_html_tags)]
84270    #[doc = "Name of the user that sent the message originally"]
84271    fn rhai_get_sender_user_name(&mut self) -> String {
84272        self.sender_user_name.clone()
84273    }
84274}
84275#[allow(dead_code)]
84276impl StoryAreaTypeLocation {
84277    #[allow(clippy::too_many_arguments)]
84278    pub fn new(
84279        latitude: ::ordered_float::OrderedFloat<f64>,
84280        longitude: ::ordered_float::OrderedFloat<f64>,
84281    ) -> Self {
84282        Self {
84283            tg_type: "StoryAreaTypeLocation".to_owned(),
84284            latitude,
84285            longitude,
84286            address: None,
84287        }
84288    }
84289    #[allow(rustdoc::invalid_html_tags)]
84290    #[doc = "Type of the area, always \"location\""]
84291    #[allow(clippy::needless_lifetimes)]
84292    pub fn get_tg_type<'a>(&'a self) -> &'a str {
84293        self.tg_type.as_str()
84294    }
84295    #[allow(rustdoc::invalid_html_tags)]
84296    #[doc = "Type of the area, always \"location\""]
84297    #[allow(clippy::needless_lifetimes)]
84298    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
84299        self.tg_type = tg_type;
84300        self
84301    }
84302    #[allow(rustdoc::invalid_html_tags)]
84303    #[doc = "Type of the area, always \"location\""]
84304    fn rhai_get_tg_type(&mut self) -> String {
84305        self.tg_type.clone()
84306    }
84307    #[allow(rustdoc::invalid_html_tags)]
84308    #[doc = "Location latitude in degrees"]
84309    #[allow(clippy::needless_lifetimes)]
84310    pub fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
84311        self.latitude
84312    }
84313    #[allow(rustdoc::invalid_html_tags)]
84314    #[doc = "Location latitude in degrees"]
84315    #[allow(clippy::needless_lifetimes)]
84316    pub fn set_latitude<'a>(
84317        &'a mut self,
84318        latitude: ::ordered_float::OrderedFloat<f64>,
84319    ) -> &'a mut Self {
84320        self.latitude = latitude;
84321        self
84322    }
84323    #[allow(rustdoc::invalid_html_tags)]
84324    #[doc = "Location latitude in degrees"]
84325    fn rhai_get_latitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
84326        self.latitude
84327    }
84328    #[allow(rustdoc::invalid_html_tags)]
84329    #[doc = "Location longitude in degrees"]
84330    #[allow(clippy::needless_lifetimes)]
84331    pub fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
84332        self.longitude
84333    }
84334    #[allow(rustdoc::invalid_html_tags)]
84335    #[doc = "Location longitude in degrees"]
84336    #[allow(clippy::needless_lifetimes)]
84337    pub fn set_longitude<'a>(
84338        &'a mut self,
84339        longitude: ::ordered_float::OrderedFloat<f64>,
84340    ) -> &'a mut Self {
84341        self.longitude = longitude;
84342        self
84343    }
84344    #[allow(rustdoc::invalid_html_tags)]
84345    #[doc = "Location longitude in degrees"]
84346    fn rhai_get_longitude(&mut self) -> ::ordered_float::OrderedFloat<f64> {
84347        self.longitude
84348    }
84349    #[allow(rustdoc::invalid_html_tags)]
84350    #[doc = "Optional. Address of the location"]
84351    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84352    pub fn get_address<'a>(&'a self) -> Option<&'a LocationAddress> {
84353        self.address.as_ref().map(|v| v.inner_ref())
84354    }
84355    #[allow(rustdoc::invalid_html_tags)]
84356    #[doc = "Optional. Address of the location"]
84357    #[allow(clippy::needless_lifetimes)]
84358    pub fn set_address<'a>(&'a mut self, address: Option<LocationAddress>) -> &'a mut Self {
84359        self.address = address.map(|address| BoxWrapper(Unbox(address)));
84360        self
84361    }
84362    #[allow(rustdoc::invalid_html_tags)]
84363    #[doc = "Optional. Address of the location"]
84364    fn rhai_get_address(&mut self) -> Option<LocationAddress> {
84365        self.address.as_ref().map(|v| v.clone().into())
84366    }
84367}
84368#[allow(dead_code)]
84369impl SuggestedPostParameters {
84370    #[allow(clippy::too_many_arguments)]
84371    pub fn new() -> Self {
84372        Self {
84373            price: None,
84374            send_date: None,
84375        }
84376    }
84377    #[allow(rustdoc::invalid_html_tags)]
84378    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
84379    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84380    pub fn get_price<'a>(&'a self) -> Option<&'a SuggestedPostPrice> {
84381        self.price.as_ref().map(|v| v.inner_ref())
84382    }
84383    #[allow(rustdoc::invalid_html_tags)]
84384    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
84385    #[allow(clippy::needless_lifetimes)]
84386    pub fn set_price<'a>(&'a mut self, price: Option<SuggestedPostPrice>) -> &'a mut Self {
84387        self.price = price.map(|price| BoxWrapper(Unbox(price)));
84388        self
84389    }
84390    #[allow(rustdoc::invalid_html_tags)]
84391    #[doc = "Optional. Proposed price for the post. If the field is omitted, then the post is unpaid."]
84392    fn rhai_get_price(&mut self) -> Option<SuggestedPostPrice> {
84393        self.price.as_ref().map(|v| v.clone().into())
84394    }
84395    #[allow(rustdoc::invalid_html_tags)]
84396    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
84397    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84398    pub fn get_send_date<'a>(&'a self) -> Option<i64> {
84399        self.send_date.as_ref().map(|v| *v)
84400    }
84401    #[allow(rustdoc::invalid_html_tags)]
84402    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
84403    #[allow(clippy::needless_lifetimes)]
84404    pub fn set_send_date<'a>(&'a mut self, send_date: Option<i64>) -> &'a mut Self {
84405        self.send_date = send_date;
84406        self
84407    }
84408    #[allow(rustdoc::invalid_html_tags)]
84409    #[doc = "Optional. Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it."]
84410    fn rhai_get_send_date(&mut self) -> Option<i64> {
84411        self.send_date.as_ref().copied()
84412    }
84413}
84414#[allow(dead_code)]
84415impl StickerSet {
84416    #[allow(clippy::too_many_arguments)]
84417    pub fn new(name: String, title: String, sticker_type: String, stickers: Vec<Sticker>) -> Self {
84418        Self {
84419            name,
84420            title,
84421            sticker_type,
84422            stickers,
84423            thumbnail: None,
84424        }
84425    }
84426    #[allow(rustdoc::invalid_html_tags)]
84427    #[doc = "Sticker set name"]
84428    #[allow(clippy::needless_lifetimes)]
84429    pub fn get_name<'a>(&'a self) -> &'a str {
84430        self.name.as_str()
84431    }
84432    #[allow(rustdoc::invalid_html_tags)]
84433    #[doc = "Sticker set name"]
84434    #[allow(clippy::needless_lifetimes)]
84435    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
84436        self.name = name;
84437        self
84438    }
84439    #[allow(rustdoc::invalid_html_tags)]
84440    #[doc = "Sticker set name"]
84441    fn rhai_get_name(&mut self) -> String {
84442        self.name.clone()
84443    }
84444    #[allow(rustdoc::invalid_html_tags)]
84445    #[doc = "Sticker set title"]
84446    #[allow(clippy::needless_lifetimes)]
84447    pub fn get_title<'a>(&'a self) -> &'a str {
84448        self.title.as_str()
84449    }
84450    #[allow(rustdoc::invalid_html_tags)]
84451    #[doc = "Sticker set title"]
84452    #[allow(clippy::needless_lifetimes)]
84453    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
84454        self.title = title;
84455        self
84456    }
84457    #[allow(rustdoc::invalid_html_tags)]
84458    #[doc = "Sticker set title"]
84459    fn rhai_get_title(&mut self) -> String {
84460        self.title.clone()
84461    }
84462    #[allow(rustdoc::invalid_html_tags)]
84463    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
84464    #[allow(clippy::needless_lifetimes)]
84465    pub fn get_sticker_type<'a>(&'a self) -> &'a str {
84466        self.sticker_type.as_str()
84467    }
84468    #[allow(rustdoc::invalid_html_tags)]
84469    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
84470    #[allow(clippy::needless_lifetimes)]
84471    pub fn set_sticker_type<'a>(&'a mut self, sticker_type: String) -> &'a mut Self {
84472        self.sticker_type = sticker_type;
84473        self
84474    }
84475    #[allow(rustdoc::invalid_html_tags)]
84476    #[doc = "Type of stickers in the set, currently one of \"regular\", \"mask\", \"custom_emoji\""]
84477    fn rhai_get_sticker_type(&mut self) -> String {
84478        self.sticker_type.clone()
84479    }
84480    #[allow(rustdoc::invalid_html_tags)]
84481    #[doc = "List of all set stickers"]
84482    #[allow(clippy::needless_lifetimes)]
84483    pub fn get_stickers<'a>(&'a self) -> &'a Vec<Sticker> {
84484        &self.stickers
84485    }
84486    #[allow(rustdoc::invalid_html_tags)]
84487    #[doc = "List of all set stickers"]
84488    #[allow(clippy::needless_lifetimes)]
84489    pub fn set_stickers<'a>(&'a mut self, stickers: Vec<Sticker>) -> &'a mut Self {
84490        self.stickers = stickers;
84491        self
84492    }
84493    #[allow(rustdoc::invalid_html_tags)]
84494    #[doc = "List of all set stickers"]
84495    fn rhai_get_stickers(&mut self) -> Vec<Sticker> {
84496        self.stickers.clone()
84497    }
84498    #[allow(rustdoc::invalid_html_tags)]
84499    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
84500    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84501    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize> {
84502        self.thumbnail.as_ref().map(|v| v.inner_ref())
84503    }
84504    #[allow(rustdoc::invalid_html_tags)]
84505    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
84506    #[allow(clippy::needless_lifetimes)]
84507    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self {
84508        self.thumbnail = thumbnail.map(|thumbnail| BoxWrapper(Unbox(thumbnail)));
84509        self
84510    }
84511    #[allow(rustdoc::invalid_html_tags)]
84512    #[doc = "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"]
84513    fn rhai_get_thumbnail(&mut self) -> Option<PhotoSize> {
84514        self.thumbnail.as_ref().map(|v| v.clone().into())
84515    }
84516}
84517#[allow(dead_code)]
84518impl Poll {
84519    #[allow(clippy::too_many_arguments)]
84520    pub fn new(
84521        id: String,
84522        question: String,
84523        options: Vec<PollOption>,
84524        total_voter_count: i64,
84525        is_closed: bool,
84526        is_anonymous: bool,
84527        allows_multiple_answers: bool,
84528    ) -> Self {
84529        Self {
84530            tg_type: "Poll".to_owned(),
84531            id,
84532            question,
84533            options,
84534            total_voter_count,
84535            is_closed,
84536            is_anonymous,
84537            allows_multiple_answers,
84538            question_entities: None,
84539            correct_option_id: None,
84540            explanation: None,
84541            explanation_entities: None,
84542            open_period: None,
84543            close_date: None,
84544        }
84545    }
84546    #[allow(rustdoc::invalid_html_tags)]
84547    #[doc = "Unique poll identifier"]
84548    #[allow(clippy::needless_lifetimes)]
84549    pub fn get_id<'a>(&'a self) -> &'a str {
84550        self.id.as_str()
84551    }
84552    #[allow(rustdoc::invalid_html_tags)]
84553    #[doc = "Unique poll identifier"]
84554    #[allow(clippy::needless_lifetimes)]
84555    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
84556        self.id = id;
84557        self
84558    }
84559    #[allow(rustdoc::invalid_html_tags)]
84560    #[doc = "Unique poll identifier"]
84561    fn rhai_get_id(&mut self) -> String {
84562        self.id.clone()
84563    }
84564    #[allow(rustdoc::invalid_html_tags)]
84565    #[doc = "Poll question, 1-300 characters"]
84566    #[allow(clippy::needless_lifetimes)]
84567    pub fn get_question<'a>(&'a self) -> &'a str {
84568        self.question.as_str()
84569    }
84570    #[allow(rustdoc::invalid_html_tags)]
84571    #[doc = "Poll question, 1-300 characters"]
84572    #[allow(clippy::needless_lifetimes)]
84573    pub fn set_question<'a>(&'a mut self, question: String) -> &'a mut Self {
84574        self.question = question;
84575        self
84576    }
84577    #[allow(rustdoc::invalid_html_tags)]
84578    #[doc = "Poll question, 1-300 characters"]
84579    fn rhai_get_question(&mut self) -> String {
84580        self.question.clone()
84581    }
84582    #[allow(rustdoc::invalid_html_tags)]
84583    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
84584    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84585    pub fn get_question_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
84586        self.question_entities.as_ref()
84587    }
84588    #[allow(rustdoc::invalid_html_tags)]
84589    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
84590    #[allow(clippy::needless_lifetimes)]
84591    pub fn set_question_entities<'a>(
84592        &'a mut self,
84593        question_entities: Option<Vec<MessageEntity>>,
84594    ) -> &'a mut Self {
84595        self.question_entities = question_entities;
84596        self
84597    }
84598    #[allow(rustdoc::invalid_html_tags)]
84599    #[doc = "Optional. Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions"]
84600    fn rhai_get_question_entities(&mut self) -> Option<Vec<MessageEntity>> {
84601        self.question_entities.as_ref().cloned()
84602    }
84603    #[allow(rustdoc::invalid_html_tags)]
84604    #[doc = "List of poll options"]
84605    #[allow(clippy::needless_lifetimes)]
84606    pub fn get_options<'a>(&'a self) -> &'a Vec<PollOption> {
84607        &self.options
84608    }
84609    #[allow(rustdoc::invalid_html_tags)]
84610    #[doc = "List of poll options"]
84611    #[allow(clippy::needless_lifetimes)]
84612    pub fn set_options<'a>(&'a mut self, options: Vec<PollOption>) -> &'a mut Self {
84613        self.options = options;
84614        self
84615    }
84616    #[allow(rustdoc::invalid_html_tags)]
84617    #[doc = "List of poll options"]
84618    fn rhai_get_options(&mut self) -> Vec<PollOption> {
84619        self.options.clone()
84620    }
84621    #[allow(rustdoc::invalid_html_tags)]
84622    #[doc = "Total number of users that voted in the poll"]
84623    #[allow(clippy::needless_lifetimes)]
84624    pub fn get_total_voter_count<'a>(&'a self) -> i64 {
84625        self.total_voter_count
84626    }
84627    #[allow(rustdoc::invalid_html_tags)]
84628    #[doc = "Total number of users that voted in the poll"]
84629    #[allow(clippy::needless_lifetimes)]
84630    pub fn set_total_voter_count<'a>(&'a mut self, total_voter_count: i64) -> &'a mut Self {
84631        self.total_voter_count = total_voter_count;
84632        self
84633    }
84634    #[allow(rustdoc::invalid_html_tags)]
84635    #[doc = "Total number of users that voted in the poll"]
84636    fn rhai_get_total_voter_count(&mut self) -> i64 {
84637        self.total_voter_count
84638    }
84639    #[allow(rustdoc::invalid_html_tags)]
84640    #[doc = "True, if the poll is closed"]
84641    #[allow(clippy::needless_lifetimes)]
84642    pub fn get_is_closed<'a>(&'a self) -> bool {
84643        self.is_closed
84644    }
84645    #[allow(rustdoc::invalid_html_tags)]
84646    #[doc = "True, if the poll is closed"]
84647    #[allow(clippy::needless_lifetimes)]
84648    pub fn set_is_closed<'a>(&'a mut self, is_closed: bool) -> &'a mut Self {
84649        self.is_closed = is_closed;
84650        self
84651    }
84652    #[allow(rustdoc::invalid_html_tags)]
84653    #[doc = "True, if the poll is closed"]
84654    fn rhai_get_is_closed(&mut self) -> bool {
84655        self.is_closed
84656    }
84657    #[allow(rustdoc::invalid_html_tags)]
84658    #[doc = "True, if the poll is anonymous"]
84659    #[allow(clippy::needless_lifetimes)]
84660    pub fn get_is_anonymous<'a>(&'a self) -> bool {
84661        self.is_anonymous
84662    }
84663    #[allow(rustdoc::invalid_html_tags)]
84664    #[doc = "True, if the poll is anonymous"]
84665    #[allow(clippy::needless_lifetimes)]
84666    pub fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self {
84667        self.is_anonymous = is_anonymous;
84668        self
84669    }
84670    #[allow(rustdoc::invalid_html_tags)]
84671    #[doc = "True, if the poll is anonymous"]
84672    fn rhai_get_is_anonymous(&mut self) -> bool {
84673        self.is_anonymous
84674    }
84675    #[allow(rustdoc::invalid_html_tags)]
84676    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
84677    #[allow(clippy::needless_lifetimes)]
84678    pub fn get_tg_type<'a>(&'a self) -> &'a str {
84679        self.tg_type.as_str()
84680    }
84681    #[allow(rustdoc::invalid_html_tags)]
84682    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
84683    #[allow(clippy::needless_lifetimes)]
84684    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
84685        self.tg_type = tg_type;
84686        self
84687    }
84688    #[allow(rustdoc::invalid_html_tags)]
84689    #[doc = "Poll type, currently can be \"regular\" or \"quiz\""]
84690    fn rhai_get_tg_type(&mut self) -> String {
84691        self.tg_type.clone()
84692    }
84693    #[allow(rustdoc::invalid_html_tags)]
84694    #[doc = "True, if the poll allows multiple answers"]
84695    #[allow(clippy::needless_lifetimes)]
84696    pub fn get_allows_multiple_answers<'a>(&'a self) -> bool {
84697        self.allows_multiple_answers
84698    }
84699    #[allow(rustdoc::invalid_html_tags)]
84700    #[doc = "True, if the poll allows multiple answers"]
84701    #[allow(clippy::needless_lifetimes)]
84702    pub fn set_allows_multiple_answers<'a>(
84703        &'a mut self,
84704        allows_multiple_answers: bool,
84705    ) -> &'a mut Self {
84706        self.allows_multiple_answers = allows_multiple_answers;
84707        self
84708    }
84709    #[allow(rustdoc::invalid_html_tags)]
84710    #[doc = "True, if the poll allows multiple answers"]
84711    fn rhai_get_allows_multiple_answers(&mut self) -> bool {
84712        self.allows_multiple_answers
84713    }
84714    #[allow(rustdoc::invalid_html_tags)]
84715    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
84716    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84717    pub fn get_correct_option_id<'a>(&'a self) -> Option<i64> {
84718        self.correct_option_id.as_ref().map(|v| *v)
84719    }
84720    #[allow(rustdoc::invalid_html_tags)]
84721    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
84722    #[allow(clippy::needless_lifetimes)]
84723    pub fn set_correct_option_id<'a>(&'a mut self, correct_option_id: Option<i64>) -> &'a mut Self {
84724        self.correct_option_id = correct_option_id;
84725        self
84726    }
84727    #[allow(rustdoc::invalid_html_tags)]
84728    #[doc = "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot."]
84729    fn rhai_get_correct_option_id(&mut self) -> Option<i64> {
84730        self.correct_option_id.as_ref().copied()
84731    }
84732    #[allow(rustdoc::invalid_html_tags)]
84733    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
84734    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84735    pub fn get_explanation<'a>(&'a self) -> Option<&'a str> {
84736        self.explanation.as_ref().map(|v| v.as_str())
84737    }
84738    #[allow(rustdoc::invalid_html_tags)]
84739    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
84740    #[allow(clippy::needless_lifetimes)]
84741    pub fn set_explanation<'a>(&'a mut self, explanation: Option<String>) -> &'a mut Self {
84742        self.explanation = explanation;
84743        self
84744    }
84745    #[allow(rustdoc::invalid_html_tags)]
84746    #[doc = "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters"]
84747    fn rhai_get_explanation(&mut self) -> Option<String> {
84748        self.explanation.as_ref().cloned()
84749    }
84750    #[allow(rustdoc::invalid_html_tags)]
84751    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
84752    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84753    pub fn get_explanation_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
84754        self.explanation_entities.as_ref()
84755    }
84756    #[allow(rustdoc::invalid_html_tags)]
84757    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
84758    #[allow(clippy::needless_lifetimes)]
84759    pub fn set_explanation_entities<'a>(
84760        &'a mut self,
84761        explanation_entities: Option<Vec<MessageEntity>>,
84762    ) -> &'a mut Self {
84763        self.explanation_entities = explanation_entities;
84764        self
84765    }
84766    #[allow(rustdoc::invalid_html_tags)]
84767    #[doc = "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation"]
84768    fn rhai_get_explanation_entities(&mut self) -> Option<Vec<MessageEntity>> {
84769        self.explanation_entities.as_ref().cloned()
84770    }
84771    #[allow(rustdoc::invalid_html_tags)]
84772    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
84773    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84774    pub fn get_open_period<'a>(&'a self) -> Option<i64> {
84775        self.open_period.as_ref().map(|v| *v)
84776    }
84777    #[allow(rustdoc::invalid_html_tags)]
84778    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
84779    #[allow(clippy::needless_lifetimes)]
84780    pub fn set_open_period<'a>(&'a mut self, open_period: Option<i64>) -> &'a mut Self {
84781        self.open_period = open_period;
84782        self
84783    }
84784    #[allow(rustdoc::invalid_html_tags)]
84785    #[doc = "Optional. Amount of time in seconds the poll will be active after creation"]
84786    fn rhai_get_open_period(&mut self) -> Option<i64> {
84787        self.open_period.as_ref().copied()
84788    }
84789    #[allow(rustdoc::invalid_html_tags)]
84790    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
84791    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84792    pub fn get_close_date<'a>(&'a self) -> Option<i64> {
84793        self.close_date.as_ref().map(|v| *v)
84794    }
84795    #[allow(rustdoc::invalid_html_tags)]
84796    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
84797    #[allow(clippy::needless_lifetimes)]
84798    pub fn set_close_date<'a>(&'a mut self, close_date: Option<i64>) -> &'a mut Self {
84799        self.close_date = close_date;
84800        self
84801    }
84802    #[allow(rustdoc::invalid_html_tags)]
84803    #[doc = "Optional. Point in time (Unix timestamp) when the poll will be automatically closed"]
84804    fn rhai_get_close_date(&mut self) -> Option<i64> {
84805        self.close_date.as_ref().copied()
84806    }
84807}
84808#[allow(dead_code)]
84809impl Video {
84810    #[allow(clippy::too_many_arguments)]
84811    pub fn new(
84812        file_id: String,
84813        file_unique_id: String,
84814        width: i64,
84815        height: i64,
84816        duration: i64,
84817    ) -> Self {
84818        Self {
84819            file_id,
84820            file_unique_id,
84821            width,
84822            height,
84823            duration,
84824            thumbnail: None,
84825            cover: None,
84826            start_timestamp: None,
84827            file_name: None,
84828            mime_type: None,
84829            file_size: None,
84830        }
84831    }
84832    #[allow(rustdoc::invalid_html_tags)]
84833    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
84834    #[allow(clippy::needless_lifetimes)]
84835    pub fn get_file_id<'a>(&'a self) -> &'a str {
84836        self.file_id.as_str()
84837    }
84838    #[allow(rustdoc::invalid_html_tags)]
84839    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
84840    #[allow(clippy::needless_lifetimes)]
84841    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
84842        self.file_id = file_id;
84843        self
84844    }
84845    #[allow(rustdoc::invalid_html_tags)]
84846    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
84847    fn rhai_get_file_id(&mut self) -> String {
84848        self.file_id.clone()
84849    }
84850    #[allow(rustdoc::invalid_html_tags)]
84851    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
84852    #[allow(clippy::needless_lifetimes)]
84853    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
84854        self.file_unique_id.as_str()
84855    }
84856    #[allow(rustdoc::invalid_html_tags)]
84857    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
84858    #[allow(clippy::needless_lifetimes)]
84859    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
84860        self.file_unique_id = file_unique_id;
84861        self
84862    }
84863    #[allow(rustdoc::invalid_html_tags)]
84864    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
84865    fn rhai_get_file_unique_id(&mut self) -> String {
84866        self.file_unique_id.clone()
84867    }
84868    #[allow(rustdoc::invalid_html_tags)]
84869    #[doc = "Video width as defined by the sender"]
84870    #[allow(clippy::needless_lifetimes)]
84871    pub fn get_width<'a>(&'a self) -> i64 {
84872        self.width
84873    }
84874    #[allow(rustdoc::invalid_html_tags)]
84875    #[doc = "Video width as defined by the sender"]
84876    #[allow(clippy::needless_lifetimes)]
84877    pub fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self {
84878        self.width = width;
84879        self
84880    }
84881    #[allow(rustdoc::invalid_html_tags)]
84882    #[doc = "Video width as defined by the sender"]
84883    fn rhai_get_width(&mut self) -> i64 {
84884        self.width
84885    }
84886    #[allow(rustdoc::invalid_html_tags)]
84887    #[doc = "Video height as defined by the sender"]
84888    #[allow(clippy::needless_lifetimes)]
84889    pub fn get_height<'a>(&'a self) -> i64 {
84890        self.height
84891    }
84892    #[allow(rustdoc::invalid_html_tags)]
84893    #[doc = "Video height as defined by the sender"]
84894    #[allow(clippy::needless_lifetimes)]
84895    pub fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self {
84896        self.height = height;
84897        self
84898    }
84899    #[allow(rustdoc::invalid_html_tags)]
84900    #[doc = "Video height as defined by the sender"]
84901    fn rhai_get_height(&mut self) -> i64 {
84902        self.height
84903    }
84904    #[allow(rustdoc::invalid_html_tags)]
84905    #[doc = "Duration of the video in seconds as defined by the sender"]
84906    #[allow(clippy::needless_lifetimes)]
84907    pub fn get_duration<'a>(&'a self) -> i64 {
84908        self.duration
84909    }
84910    #[allow(rustdoc::invalid_html_tags)]
84911    #[doc = "Duration of the video in seconds as defined by the sender"]
84912    #[allow(clippy::needless_lifetimes)]
84913    pub fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self {
84914        self.duration = duration;
84915        self
84916    }
84917    #[allow(rustdoc::invalid_html_tags)]
84918    #[doc = "Duration of the video in seconds as defined by the sender"]
84919    fn rhai_get_duration(&mut self) -> i64 {
84920        self.duration
84921    }
84922    #[allow(rustdoc::invalid_html_tags)]
84923    #[doc = "Optional. Video thumbnail"]
84924    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84925    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize> {
84926        self.thumbnail.as_ref().map(|v| v.inner_ref())
84927    }
84928    #[allow(rustdoc::invalid_html_tags)]
84929    #[doc = "Optional. Video thumbnail"]
84930    #[allow(clippy::needless_lifetimes)]
84931    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self {
84932        self.thumbnail = thumbnail.map(|thumbnail| BoxWrapper(Unbox(thumbnail)));
84933        self
84934    }
84935    #[allow(rustdoc::invalid_html_tags)]
84936    #[doc = "Optional. Video thumbnail"]
84937    fn rhai_get_thumbnail(&mut self) -> Option<PhotoSize> {
84938        self.thumbnail.as_ref().map(|v| v.clone().into())
84939    }
84940    #[allow(rustdoc::invalid_html_tags)]
84941    #[doc = "Optional. Available sizes of the cover of the video in the message"]
84942    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84943    pub fn get_cover<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
84944        self.cover.as_ref()
84945    }
84946    #[allow(rustdoc::invalid_html_tags)]
84947    #[doc = "Optional. Available sizes of the cover of the video in the message"]
84948    #[allow(clippy::needless_lifetimes)]
84949    pub fn set_cover<'a>(&'a mut self, cover: Option<Vec<PhotoSize>>) -> &'a mut Self {
84950        self.cover = cover;
84951        self
84952    }
84953    #[allow(rustdoc::invalid_html_tags)]
84954    #[doc = "Optional. Available sizes of the cover of the video in the message"]
84955    fn rhai_get_cover(&mut self) -> Option<Vec<PhotoSize>> {
84956        self.cover.as_ref().cloned()
84957    }
84958    #[allow(rustdoc::invalid_html_tags)]
84959    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
84960    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84961    pub fn get_start_timestamp<'a>(&'a self) -> Option<i64> {
84962        self.start_timestamp.as_ref().map(|v| *v)
84963    }
84964    #[allow(rustdoc::invalid_html_tags)]
84965    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
84966    #[allow(clippy::needless_lifetimes)]
84967    pub fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self {
84968        self.start_timestamp = start_timestamp;
84969        self
84970    }
84971    #[allow(rustdoc::invalid_html_tags)]
84972    #[doc = "Optional. Timestamp in seconds from which the video will play in the message"]
84973    fn rhai_get_start_timestamp(&mut self) -> Option<i64> {
84974        self.start_timestamp.as_ref().copied()
84975    }
84976    #[allow(rustdoc::invalid_html_tags)]
84977    #[doc = "Optional. Original filename as defined by the sender"]
84978    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84979    pub fn get_file_name<'a>(&'a self) -> Option<&'a str> {
84980        self.file_name.as_ref().map(|v| v.as_str())
84981    }
84982    #[allow(rustdoc::invalid_html_tags)]
84983    #[doc = "Optional. Original filename as defined by the sender"]
84984    #[allow(clippy::needless_lifetimes)]
84985    pub fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self {
84986        self.file_name = file_name;
84987        self
84988    }
84989    #[allow(rustdoc::invalid_html_tags)]
84990    #[doc = "Optional. Original filename as defined by the sender"]
84991    fn rhai_get_file_name(&mut self) -> Option<String> {
84992        self.file_name.as_ref().cloned()
84993    }
84994    #[allow(rustdoc::invalid_html_tags)]
84995    #[doc = "Optional. MIME type of the file as defined by the sender"]
84996    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
84997    pub fn get_mime_type<'a>(&'a self) -> Option<&'a str> {
84998        self.mime_type.as_ref().map(|v| v.as_str())
84999    }
85000    #[allow(rustdoc::invalid_html_tags)]
85001    #[doc = "Optional. MIME type of the file as defined by the sender"]
85002    #[allow(clippy::needless_lifetimes)]
85003    pub fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self {
85004        self.mime_type = mime_type;
85005        self
85006    }
85007    #[allow(rustdoc::invalid_html_tags)]
85008    #[doc = "Optional. MIME type of the file as defined by the sender"]
85009    fn rhai_get_mime_type(&mut self) -> Option<String> {
85010        self.mime_type.as_ref().cloned()
85011    }
85012    #[allow(rustdoc::invalid_html_tags)]
85013    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
85014    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85015    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
85016        self.file_size.as_ref().map(|v| *v)
85017    }
85018    #[allow(rustdoc::invalid_html_tags)]
85019    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
85020    #[allow(clippy::needless_lifetimes)]
85021    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
85022        self.file_size = file_size;
85023        self
85024    }
85025    #[allow(rustdoc::invalid_html_tags)]
85026    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
85027    fn rhai_get_file_size(&mut self) -> Option<i64> {
85028        self.file_size.as_ref().copied()
85029    }
85030}
85031#[allow(dead_code)]
85032impl GeneralForumTopicHidden {}
85033#[allow(dead_code)]
85034impl ChatAdministratorRights {
85035    #[allow(clippy::too_many_arguments)]
85036    pub fn new(
85037        is_anonymous: bool,
85038        can_manage_chat: bool,
85039        can_delete_messages: bool,
85040        can_manage_video_chats: bool,
85041        can_restrict_members: bool,
85042        can_promote_members: bool,
85043        can_change_info: bool,
85044        can_invite_users: bool,
85045        can_post_stories: bool,
85046        can_edit_stories: bool,
85047        can_delete_stories: bool,
85048    ) -> Self {
85049        Self {
85050            is_anonymous,
85051            can_manage_chat,
85052            can_delete_messages,
85053            can_manage_video_chats,
85054            can_restrict_members,
85055            can_promote_members,
85056            can_change_info,
85057            can_invite_users,
85058            can_post_stories,
85059            can_edit_stories,
85060            can_delete_stories,
85061            can_post_messages: None,
85062            can_edit_messages: None,
85063            can_pin_messages: None,
85064            can_manage_topics: None,
85065            can_manage_direct_messages: None,
85066        }
85067    }
85068    #[allow(rustdoc::invalid_html_tags)]
85069    #[doc = "True, if the user's presence in the chat is hidden"]
85070    #[allow(clippy::needless_lifetimes)]
85071    pub fn get_is_anonymous<'a>(&'a self) -> bool {
85072        self.is_anonymous
85073    }
85074    #[allow(rustdoc::invalid_html_tags)]
85075    #[doc = "True, if the user's presence in the chat is hidden"]
85076    #[allow(clippy::needless_lifetimes)]
85077    pub fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self {
85078        self.is_anonymous = is_anonymous;
85079        self
85080    }
85081    #[allow(rustdoc::invalid_html_tags)]
85082    #[doc = "True, if the user's presence in the chat is hidden"]
85083    fn rhai_get_is_anonymous(&mut self) -> bool {
85084        self.is_anonymous
85085    }
85086    #[allow(rustdoc::invalid_html_tags)]
85087    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
85088    #[allow(clippy::needless_lifetimes)]
85089    pub fn get_can_manage_chat<'a>(&'a self) -> bool {
85090        self.can_manage_chat
85091    }
85092    #[allow(rustdoc::invalid_html_tags)]
85093    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
85094    #[allow(clippy::needless_lifetimes)]
85095    pub fn set_can_manage_chat<'a>(&'a mut self, can_manage_chat: bool) -> &'a mut Self {
85096        self.can_manage_chat = can_manage_chat;
85097        self
85098    }
85099    #[allow(rustdoc::invalid_html_tags)]
85100    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
85101    fn rhai_get_can_manage_chat(&mut self) -> bool {
85102        self.can_manage_chat
85103    }
85104    #[allow(rustdoc::invalid_html_tags)]
85105    #[doc = "True, if the administrator can delete messages of other users"]
85106    #[allow(clippy::needless_lifetimes)]
85107    pub fn get_can_delete_messages<'a>(&'a self) -> bool {
85108        self.can_delete_messages
85109    }
85110    #[allow(rustdoc::invalid_html_tags)]
85111    #[doc = "True, if the administrator can delete messages of other users"]
85112    #[allow(clippy::needless_lifetimes)]
85113    pub fn set_can_delete_messages<'a>(&'a mut self, can_delete_messages: bool) -> &'a mut Self {
85114        self.can_delete_messages = can_delete_messages;
85115        self
85116    }
85117    #[allow(rustdoc::invalid_html_tags)]
85118    #[doc = "True, if the administrator can delete messages of other users"]
85119    fn rhai_get_can_delete_messages(&mut self) -> bool {
85120        self.can_delete_messages
85121    }
85122    #[allow(rustdoc::invalid_html_tags)]
85123    #[doc = "True, if the administrator can manage video chats"]
85124    #[allow(clippy::needless_lifetimes)]
85125    pub fn get_can_manage_video_chats<'a>(&'a self) -> bool {
85126        self.can_manage_video_chats
85127    }
85128    #[allow(rustdoc::invalid_html_tags)]
85129    #[doc = "True, if the administrator can manage video chats"]
85130    #[allow(clippy::needless_lifetimes)]
85131    pub fn set_can_manage_video_chats<'a>(
85132        &'a mut self,
85133        can_manage_video_chats: bool,
85134    ) -> &'a mut Self {
85135        self.can_manage_video_chats = can_manage_video_chats;
85136        self
85137    }
85138    #[allow(rustdoc::invalid_html_tags)]
85139    #[doc = "True, if the administrator can manage video chats"]
85140    fn rhai_get_can_manage_video_chats(&mut self) -> bool {
85141        self.can_manage_video_chats
85142    }
85143    #[allow(rustdoc::invalid_html_tags)]
85144    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
85145    #[allow(clippy::needless_lifetimes)]
85146    pub fn get_can_restrict_members<'a>(&'a self) -> bool {
85147        self.can_restrict_members
85148    }
85149    #[allow(rustdoc::invalid_html_tags)]
85150    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
85151    #[allow(clippy::needless_lifetimes)]
85152    pub fn set_can_restrict_members<'a>(&'a mut self, can_restrict_members: bool) -> &'a mut Self {
85153        self.can_restrict_members = can_restrict_members;
85154        self
85155    }
85156    #[allow(rustdoc::invalid_html_tags)]
85157    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
85158    fn rhai_get_can_restrict_members(&mut self) -> bool {
85159        self.can_restrict_members
85160    }
85161    #[allow(rustdoc::invalid_html_tags)]
85162    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
85163    #[allow(clippy::needless_lifetimes)]
85164    pub fn get_can_promote_members<'a>(&'a self) -> bool {
85165        self.can_promote_members
85166    }
85167    #[allow(rustdoc::invalid_html_tags)]
85168    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
85169    #[allow(clippy::needless_lifetimes)]
85170    pub fn set_can_promote_members<'a>(&'a mut self, can_promote_members: bool) -> &'a mut Self {
85171        self.can_promote_members = can_promote_members;
85172        self
85173    }
85174    #[allow(rustdoc::invalid_html_tags)]
85175    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
85176    fn rhai_get_can_promote_members(&mut self) -> bool {
85177        self.can_promote_members
85178    }
85179    #[allow(rustdoc::invalid_html_tags)]
85180    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
85181    #[allow(clippy::needless_lifetimes)]
85182    pub fn get_can_change_info<'a>(&'a self) -> bool {
85183        self.can_change_info
85184    }
85185    #[allow(rustdoc::invalid_html_tags)]
85186    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
85187    #[allow(clippy::needless_lifetimes)]
85188    pub fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self {
85189        self.can_change_info = can_change_info;
85190        self
85191    }
85192    #[allow(rustdoc::invalid_html_tags)]
85193    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
85194    fn rhai_get_can_change_info(&mut self) -> bool {
85195        self.can_change_info
85196    }
85197    #[allow(rustdoc::invalid_html_tags)]
85198    #[doc = "True, if the user is allowed to invite new users to the chat"]
85199    #[allow(clippy::needless_lifetimes)]
85200    pub fn get_can_invite_users<'a>(&'a self) -> bool {
85201        self.can_invite_users
85202    }
85203    #[allow(rustdoc::invalid_html_tags)]
85204    #[doc = "True, if the user is allowed to invite new users to the chat"]
85205    #[allow(clippy::needless_lifetimes)]
85206    pub fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self {
85207        self.can_invite_users = can_invite_users;
85208        self
85209    }
85210    #[allow(rustdoc::invalid_html_tags)]
85211    #[doc = "True, if the user is allowed to invite new users to the chat"]
85212    fn rhai_get_can_invite_users(&mut self) -> bool {
85213        self.can_invite_users
85214    }
85215    #[allow(rustdoc::invalid_html_tags)]
85216    #[doc = "True, if the administrator can post stories to the chat"]
85217    #[allow(clippy::needless_lifetimes)]
85218    pub fn get_can_post_stories<'a>(&'a self) -> bool {
85219        self.can_post_stories
85220    }
85221    #[allow(rustdoc::invalid_html_tags)]
85222    #[doc = "True, if the administrator can post stories to the chat"]
85223    #[allow(clippy::needless_lifetimes)]
85224    pub fn set_can_post_stories<'a>(&'a mut self, can_post_stories: bool) -> &'a mut Self {
85225        self.can_post_stories = can_post_stories;
85226        self
85227    }
85228    #[allow(rustdoc::invalid_html_tags)]
85229    #[doc = "True, if the administrator can post stories to the chat"]
85230    fn rhai_get_can_post_stories(&mut self) -> bool {
85231        self.can_post_stories
85232    }
85233    #[allow(rustdoc::invalid_html_tags)]
85234    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
85235    #[allow(clippy::needless_lifetimes)]
85236    pub fn get_can_edit_stories<'a>(&'a self) -> bool {
85237        self.can_edit_stories
85238    }
85239    #[allow(rustdoc::invalid_html_tags)]
85240    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
85241    #[allow(clippy::needless_lifetimes)]
85242    pub fn set_can_edit_stories<'a>(&'a mut self, can_edit_stories: bool) -> &'a mut Self {
85243        self.can_edit_stories = can_edit_stories;
85244        self
85245    }
85246    #[allow(rustdoc::invalid_html_tags)]
85247    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
85248    fn rhai_get_can_edit_stories(&mut self) -> bool {
85249        self.can_edit_stories
85250    }
85251    #[allow(rustdoc::invalid_html_tags)]
85252    #[doc = "True, if the administrator can delete stories posted by other users"]
85253    #[allow(clippy::needless_lifetimes)]
85254    pub fn get_can_delete_stories<'a>(&'a self) -> bool {
85255        self.can_delete_stories
85256    }
85257    #[allow(rustdoc::invalid_html_tags)]
85258    #[doc = "True, if the administrator can delete stories posted by other users"]
85259    #[allow(clippy::needless_lifetimes)]
85260    pub fn set_can_delete_stories<'a>(&'a mut self, can_delete_stories: bool) -> &'a mut Self {
85261        self.can_delete_stories = can_delete_stories;
85262        self
85263    }
85264    #[allow(rustdoc::invalid_html_tags)]
85265    #[doc = "True, if the administrator can delete stories posted by other users"]
85266    fn rhai_get_can_delete_stories(&mut self) -> bool {
85267        self.can_delete_stories
85268    }
85269    #[allow(rustdoc::invalid_html_tags)]
85270    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
85271    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85272    pub fn get_can_post_messages<'a>(&'a self) -> Option<bool> {
85273        self.can_post_messages.as_ref().map(|v| *v)
85274    }
85275    #[allow(rustdoc::invalid_html_tags)]
85276    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
85277    #[allow(clippy::needless_lifetimes)]
85278    pub fn set_can_post_messages<'a>(
85279        &'a mut self,
85280        can_post_messages: Option<bool>,
85281    ) -> &'a mut Self {
85282        self.can_post_messages = can_post_messages;
85283        self
85284    }
85285    #[allow(rustdoc::invalid_html_tags)]
85286    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
85287    fn rhai_get_can_post_messages(&mut self) -> Option<bool> {
85288        self.can_post_messages.as_ref().copied()
85289    }
85290    #[allow(rustdoc::invalid_html_tags)]
85291    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
85292    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85293    pub fn get_can_edit_messages<'a>(&'a self) -> Option<bool> {
85294        self.can_edit_messages.as_ref().map(|v| *v)
85295    }
85296    #[allow(rustdoc::invalid_html_tags)]
85297    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
85298    #[allow(clippy::needless_lifetimes)]
85299    pub fn set_can_edit_messages<'a>(
85300        &'a mut self,
85301        can_edit_messages: Option<bool>,
85302    ) -> &'a mut Self {
85303        self.can_edit_messages = can_edit_messages;
85304        self
85305    }
85306    #[allow(rustdoc::invalid_html_tags)]
85307    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
85308    fn rhai_get_can_edit_messages(&mut self) -> Option<bool> {
85309        self.can_edit_messages.as_ref().copied()
85310    }
85311    #[allow(rustdoc::invalid_html_tags)]
85312    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
85313    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85314    pub fn get_can_pin_messages<'a>(&'a self) -> Option<bool> {
85315        self.can_pin_messages.as_ref().map(|v| *v)
85316    }
85317    #[allow(rustdoc::invalid_html_tags)]
85318    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
85319    #[allow(clippy::needless_lifetimes)]
85320    pub fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: Option<bool>) -> &'a mut Self {
85321        self.can_pin_messages = can_pin_messages;
85322        self
85323    }
85324    #[allow(rustdoc::invalid_html_tags)]
85325    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
85326    fn rhai_get_can_pin_messages(&mut self) -> Option<bool> {
85327        self.can_pin_messages.as_ref().copied()
85328    }
85329    #[allow(rustdoc::invalid_html_tags)]
85330    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
85331    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85332    pub fn get_can_manage_topics<'a>(&'a self) -> Option<bool> {
85333        self.can_manage_topics.as_ref().map(|v| *v)
85334    }
85335    #[allow(rustdoc::invalid_html_tags)]
85336    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
85337    #[allow(clippy::needless_lifetimes)]
85338    pub fn set_can_manage_topics<'a>(
85339        &'a mut self,
85340        can_manage_topics: Option<bool>,
85341    ) -> &'a mut Self {
85342        self.can_manage_topics = can_manage_topics;
85343        self
85344    }
85345    #[allow(rustdoc::invalid_html_tags)]
85346    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
85347    fn rhai_get_can_manage_topics(&mut self) -> Option<bool> {
85348        self.can_manage_topics.as_ref().copied()
85349    }
85350    #[allow(rustdoc::invalid_html_tags)]
85351    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
85352    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85353    pub fn get_can_manage_direct_messages<'a>(&'a self) -> Option<bool> {
85354        self.can_manage_direct_messages.as_ref().map(|v| *v)
85355    }
85356    #[allow(rustdoc::invalid_html_tags)]
85357    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
85358    #[allow(clippy::needless_lifetimes)]
85359    pub fn set_can_manage_direct_messages<'a>(
85360        &'a mut self,
85361        can_manage_direct_messages: Option<bool>,
85362    ) -> &'a mut Self {
85363        self.can_manage_direct_messages = can_manage_direct_messages;
85364        self
85365    }
85366    #[allow(rustdoc::invalid_html_tags)]
85367    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
85368    fn rhai_get_can_manage_direct_messages(&mut self) -> Option<bool> {
85369        self.can_manage_direct_messages.as_ref().copied()
85370    }
85371}
85372#[allow(dead_code)]
85373impl ResponseParameters {
85374    #[allow(clippy::too_many_arguments)]
85375    pub fn new() -> Self {
85376        Self {
85377            migrate_to_chat_id: None,
85378            retry_after: None,
85379        }
85380    }
85381    #[allow(rustdoc::invalid_html_tags)]
85382    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
85383    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85384    pub fn get_migrate_to_chat_id<'a>(&'a self) -> Option<i64> {
85385        self.migrate_to_chat_id.as_ref().map(|v| *v)
85386    }
85387    #[allow(rustdoc::invalid_html_tags)]
85388    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
85389    #[allow(clippy::needless_lifetimes)]
85390    pub fn set_migrate_to_chat_id<'a>(
85391        &'a mut self,
85392        migrate_to_chat_id: Option<i64>,
85393    ) -> &'a mut Self {
85394        self.migrate_to_chat_id = migrate_to_chat_id;
85395        self
85396    }
85397    #[allow(rustdoc::invalid_html_tags)]
85398    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
85399    fn rhai_get_migrate_to_chat_id(&mut self) -> Option<i64> {
85400        self.migrate_to_chat_id.as_ref().copied()
85401    }
85402    #[allow(rustdoc::invalid_html_tags)]
85403    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
85404    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85405    pub fn get_retry_after<'a>(&'a self) -> Option<i64> {
85406        self.retry_after.as_ref().map(|v| *v)
85407    }
85408    #[allow(rustdoc::invalid_html_tags)]
85409    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
85410    #[allow(clippy::needless_lifetimes)]
85411    pub fn set_retry_after<'a>(&'a mut self, retry_after: Option<i64>) -> &'a mut Self {
85412        self.retry_after = retry_after;
85413        self
85414    }
85415    #[allow(rustdoc::invalid_html_tags)]
85416    #[doc = "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated"]
85417    fn rhai_get_retry_after(&mut self) -> Option<i64> {
85418        self.retry_after.as_ref().copied()
85419    }
85420}
85421#[allow(dead_code)]
85422impl VideoNote {
85423    #[allow(clippy::too_many_arguments)]
85424    pub fn new(file_id: String, file_unique_id: String, length: i64, duration: i64) -> Self {
85425        Self {
85426            file_id,
85427            file_unique_id,
85428            length,
85429            duration,
85430            thumbnail: None,
85431            file_size: None,
85432        }
85433    }
85434    #[allow(rustdoc::invalid_html_tags)]
85435    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
85436    #[allow(clippy::needless_lifetimes)]
85437    pub fn get_file_id<'a>(&'a self) -> &'a str {
85438        self.file_id.as_str()
85439    }
85440    #[allow(rustdoc::invalid_html_tags)]
85441    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
85442    #[allow(clippy::needless_lifetimes)]
85443    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
85444        self.file_id = file_id;
85445        self
85446    }
85447    #[allow(rustdoc::invalid_html_tags)]
85448    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
85449    fn rhai_get_file_id(&mut self) -> String {
85450        self.file_id.clone()
85451    }
85452    #[allow(rustdoc::invalid_html_tags)]
85453    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
85454    #[allow(clippy::needless_lifetimes)]
85455    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
85456        self.file_unique_id.as_str()
85457    }
85458    #[allow(rustdoc::invalid_html_tags)]
85459    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
85460    #[allow(clippy::needless_lifetimes)]
85461    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
85462        self.file_unique_id = file_unique_id;
85463        self
85464    }
85465    #[allow(rustdoc::invalid_html_tags)]
85466    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
85467    fn rhai_get_file_unique_id(&mut self) -> String {
85468        self.file_unique_id.clone()
85469    }
85470    #[allow(rustdoc::invalid_html_tags)]
85471    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
85472    #[allow(clippy::needless_lifetimes)]
85473    pub fn get_length<'a>(&'a self) -> i64 {
85474        self.length
85475    }
85476    #[allow(rustdoc::invalid_html_tags)]
85477    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
85478    #[allow(clippy::needless_lifetimes)]
85479    pub fn set_length<'a>(&'a mut self, length: i64) -> &'a mut Self {
85480        self.length = length;
85481        self
85482    }
85483    #[allow(rustdoc::invalid_html_tags)]
85484    #[doc = "Video width and height (diameter of the video message) as defined by the sender"]
85485    fn rhai_get_length(&mut self) -> i64 {
85486        self.length
85487    }
85488    #[allow(rustdoc::invalid_html_tags)]
85489    #[doc = "Duration of the video in seconds as defined by the sender"]
85490    #[allow(clippy::needless_lifetimes)]
85491    pub fn get_duration<'a>(&'a self) -> i64 {
85492        self.duration
85493    }
85494    #[allow(rustdoc::invalid_html_tags)]
85495    #[doc = "Duration of the video in seconds as defined by the sender"]
85496    #[allow(clippy::needless_lifetimes)]
85497    pub fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self {
85498        self.duration = duration;
85499        self
85500    }
85501    #[allow(rustdoc::invalid_html_tags)]
85502    #[doc = "Duration of the video in seconds as defined by the sender"]
85503    fn rhai_get_duration(&mut self) -> i64 {
85504        self.duration
85505    }
85506    #[allow(rustdoc::invalid_html_tags)]
85507    #[doc = "Optional. Video thumbnail"]
85508    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85509    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize> {
85510        self.thumbnail.as_ref().map(|v| v.inner_ref())
85511    }
85512    #[allow(rustdoc::invalid_html_tags)]
85513    #[doc = "Optional. Video thumbnail"]
85514    #[allow(clippy::needless_lifetimes)]
85515    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self {
85516        self.thumbnail = thumbnail.map(|thumbnail| BoxWrapper(Unbox(thumbnail)));
85517        self
85518    }
85519    #[allow(rustdoc::invalid_html_tags)]
85520    #[doc = "Optional. Video thumbnail"]
85521    fn rhai_get_thumbnail(&mut self) -> Option<PhotoSize> {
85522        self.thumbnail.as_ref().map(|v| v.clone().into())
85523    }
85524    #[allow(rustdoc::invalid_html_tags)]
85525    #[doc = "Optional. File size in bytes"]
85526    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85527    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
85528        self.file_size.as_ref().map(|v| *v)
85529    }
85530    #[allow(rustdoc::invalid_html_tags)]
85531    #[doc = "Optional. File size in bytes"]
85532    #[allow(clippy::needless_lifetimes)]
85533    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
85534        self.file_size = file_size;
85535        self
85536    }
85537    #[allow(rustdoc::invalid_html_tags)]
85538    #[doc = "Optional. File size in bytes"]
85539    fn rhai_get_file_size(&mut self) -> Option<i64> {
85540        self.file_size.as_ref().copied()
85541    }
85542}
85543#[allow(dead_code)]
85544impl ReplyKeyboardRemove {
85545    #[allow(clippy::too_many_arguments)]
85546    pub fn new(remove_keyboard: bool) -> Self {
85547        Self {
85548            remove_keyboard,
85549            selective: None,
85550        }
85551    }
85552    #[allow(rustdoc::invalid_html_tags)]
85553    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
85554    #[allow(clippy::needless_lifetimes)]
85555    pub fn get_remove_keyboard<'a>(&'a self) -> bool {
85556        self.remove_keyboard
85557    }
85558    #[allow(rustdoc::invalid_html_tags)]
85559    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
85560    #[allow(clippy::needless_lifetimes)]
85561    pub fn set_remove_keyboard<'a>(&'a mut self, remove_keyboard: bool) -> &'a mut Self {
85562        self.remove_keyboard = remove_keyboard;
85563        self
85564    }
85565    #[allow(rustdoc::invalid_html_tags)]
85566    #[doc = "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)"]
85567    fn rhai_get_remove_keyboard(&mut self) -> bool {
85568        self.remove_keyboard
85569    }
85570    #[allow(rustdoc::invalid_html_tags)]
85571    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
85572    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85573    pub fn get_selective<'a>(&'a self) -> Option<bool> {
85574        self.selective.as_ref().map(|v| *v)
85575    }
85576    #[allow(rustdoc::invalid_html_tags)]
85577    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
85578    #[allow(clippy::needless_lifetimes)]
85579    pub fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self {
85580        self.selective = selective;
85581        self
85582    }
85583    #[allow(rustdoc::invalid_html_tags)]
85584    #[doc = "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet."]
85585    fn rhai_get_selective(&mut self) -> Option<bool> {
85586        self.selective.as_ref().copied()
85587    }
85588}
85589#[allow(dead_code)]
85590impl LabeledPrice {
85591    #[allow(clippy::too_many_arguments)]
85592    pub fn new(label: String, amount: i64) -> Self {
85593        Self { label, amount }
85594    }
85595    #[allow(rustdoc::invalid_html_tags)]
85596    #[doc = "Portion label"]
85597    #[allow(clippy::needless_lifetimes)]
85598    pub fn get_label<'a>(&'a self) -> &'a str {
85599        self.label.as_str()
85600    }
85601    #[allow(rustdoc::invalid_html_tags)]
85602    #[doc = "Portion label"]
85603    #[allow(clippy::needless_lifetimes)]
85604    pub fn set_label<'a>(&'a mut self, label: String) -> &'a mut Self {
85605        self.label = label;
85606        self
85607    }
85608    #[allow(rustdoc::invalid_html_tags)]
85609    #[doc = "Portion label"]
85610    fn rhai_get_label(&mut self) -> String {
85611        self.label.clone()
85612    }
85613    #[allow(rustdoc::invalid_html_tags)]
85614    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
85615    #[allow(clippy::needless_lifetimes)]
85616    pub fn get_amount<'a>(&'a self) -> i64 {
85617        self.amount
85618    }
85619    #[allow(rustdoc::invalid_html_tags)]
85620    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
85621    #[allow(clippy::needless_lifetimes)]
85622    pub fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self {
85623        self.amount = amount;
85624        self
85625    }
85626    #[allow(rustdoc::invalid_html_tags)]
85627    #[doc = "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
85628    fn rhai_get_amount(&mut self) -> i64 {
85629        self.amount
85630    }
85631}
85632#[allow(dead_code)]
85633impl InputPollOption {
85634    #[allow(clippy::too_many_arguments)]
85635    pub fn new(text: String) -> Self {
85636        Self {
85637            text,
85638            text_parse_mode: None,
85639            text_entities: None,
85640        }
85641    }
85642    #[allow(rustdoc::invalid_html_tags)]
85643    #[doc = "Option text, 1-100 characters"]
85644    #[allow(clippy::needless_lifetimes)]
85645    pub fn get_text<'a>(&'a self) -> &'a str {
85646        self.text.as_str()
85647    }
85648    #[allow(rustdoc::invalid_html_tags)]
85649    #[doc = "Option text, 1-100 characters"]
85650    #[allow(clippy::needless_lifetimes)]
85651    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
85652        self.text = text;
85653        self
85654    }
85655    #[allow(rustdoc::invalid_html_tags)]
85656    #[doc = "Option text, 1-100 characters"]
85657    fn rhai_get_text(&mut self) -> String {
85658        self.text.clone()
85659    }
85660    #[allow(rustdoc::invalid_html_tags)]
85661    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
85662    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85663    pub fn get_text_parse_mode<'a>(&'a self) -> Option<&'a str> {
85664        self.text_parse_mode.as_ref().map(|v| v.as_str())
85665    }
85666    #[allow(rustdoc::invalid_html_tags)]
85667    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
85668    #[allow(clippy::needless_lifetimes)]
85669    pub fn set_text_parse_mode<'a>(&'a mut self, text_parse_mode: Option<String>) -> &'a mut Self {
85670        self.text_parse_mode = text_parse_mode;
85671        self
85672    }
85673    #[allow(rustdoc::invalid_html_tags)]
85674    #[doc = "Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed"]
85675    fn rhai_get_text_parse_mode(&mut self) -> Option<String> {
85676        self.text_parse_mode.as_ref().cloned()
85677    }
85678    #[allow(rustdoc::invalid_html_tags)]
85679    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
85680    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85681    pub fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
85682        self.text_entities.as_ref()
85683    }
85684    #[allow(rustdoc::invalid_html_tags)]
85685    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
85686    #[allow(clippy::needless_lifetimes)]
85687    pub fn set_text_entities<'a>(
85688        &'a mut self,
85689        text_entities: Option<Vec<MessageEntity>>,
85690    ) -> &'a mut Self {
85691        self.text_entities = text_entities;
85692        self
85693    }
85694    #[allow(rustdoc::invalid_html_tags)]
85695    #[doc = "Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode"]
85696    fn rhai_get_text_entities(&mut self) -> Option<Vec<MessageEntity>> {
85697        self.text_entities.as_ref().cloned()
85698    }
85699}
85700#[allow(dead_code)]
85701impl ChatBoostSourcePremium {
85702    #[allow(clippy::too_many_arguments)]
85703    pub fn new<A: Into<User>>(source: String, user: A) -> Self {
85704        Self {
85705            source,
85706            user: BoxWrapper::new_unbox(user.into()),
85707        }
85708    }
85709    #[allow(rustdoc::invalid_html_tags)]
85710    #[doc = "Source of the boost, always \"premium\""]
85711    #[allow(clippy::needless_lifetimes)]
85712    pub fn get_source<'a>(&'a self) -> &'a str {
85713        self.source.as_str()
85714    }
85715    #[allow(rustdoc::invalid_html_tags)]
85716    #[doc = "Source of the boost, always \"premium\""]
85717    #[allow(clippy::needless_lifetimes)]
85718    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
85719        self.source = source;
85720        self
85721    }
85722    #[allow(rustdoc::invalid_html_tags)]
85723    #[doc = "Source of the boost, always \"premium\""]
85724    fn rhai_get_source(&mut self) -> String {
85725        self.source.clone()
85726    }
85727    #[allow(rustdoc::invalid_html_tags)]
85728    #[doc = "User that boosted the chat"]
85729    #[allow(clippy::needless_lifetimes)]
85730    pub fn get_user<'a>(&'a self) -> &'a User {
85731        &self.user
85732    }
85733    #[allow(rustdoc::invalid_html_tags)]
85734    #[doc = "User that boosted the chat"]
85735    #[allow(clippy::needless_lifetimes)]
85736    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
85737        self.user = BoxWrapper(Unbox(user));
85738        self
85739    }
85740    #[allow(rustdoc::invalid_html_tags)]
85741    #[doc = "User that boosted the chat"]
85742    fn rhai_get_user(&mut self) -> User {
85743        self.user.clone().into()
85744    }
85745}
85746#[allow(dead_code)]
85747impl InputMediaVideo {
85748    #[allow(clippy::too_many_arguments)]
85749    pub fn new(media: Option<InputFile>) -> Self {
85750        Self {
85751            tg_type: "video".to_owned(),
85752            media,
85753            thumbnail: None,
85754            cover: None,
85755            start_timestamp: None,
85756            caption: None,
85757            parse_mode: None,
85758            caption_entities: None,
85759            show_caption_above_media: None,
85760            width: None,
85761            height: None,
85762            duration: None,
85763            supports_streaming: None,
85764            has_spoiler: None,
85765        }
85766    }
85767    #[allow(rustdoc::invalid_html_tags)]
85768    #[doc = "Type of the result, must be video"]
85769    #[allow(clippy::needless_lifetimes)]
85770    pub fn get_tg_type<'a>(&'a self) -> &'a str {
85771        self.tg_type.as_str()
85772    }
85773    #[allow(rustdoc::invalid_html_tags)]
85774    #[doc = "Type of the result, must be video"]
85775    #[allow(clippy::needless_lifetimes)]
85776    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
85777        self.tg_type = tg_type;
85778        self
85779    }
85780    #[allow(rustdoc::invalid_html_tags)]
85781    #[doc = "Type of the result, must be video"]
85782    fn rhai_get_tg_type(&mut self) -> String {
85783        self.tg_type.clone()
85784    }
85785    #[allow(rustdoc::invalid_html_tags)]
85786    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85787    #[allow(clippy::needless_lifetimes)]
85788    pub fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
85789        &self.media
85790    }
85791    #[allow(rustdoc::invalid_html_tags)]
85792    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85793    #[allow(clippy::needless_lifetimes)]
85794    pub fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
85795        self.media = media;
85796        self
85797    }
85798    #[allow(rustdoc::invalid_html_tags)]
85799    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85800    fn rhai_get_media(&mut self) -> Option<InputFile> {
85801        self.media.clone()
85802    }
85803    #[allow(rustdoc::invalid_html_tags)]
85804    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85805    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85806    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
85807        self.thumbnail.as_ref().map(|v| v.as_str())
85808    }
85809    #[allow(rustdoc::invalid_html_tags)]
85810    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85811    #[allow(clippy::needless_lifetimes)]
85812    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
85813        self.thumbnail = thumbnail;
85814        self
85815    }
85816    #[allow(rustdoc::invalid_html_tags)]
85817    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85818    fn rhai_get_thumbnail(&mut self) -> Option<String> {
85819        self.thumbnail.as_ref().cloned()
85820    }
85821    #[allow(rustdoc::invalid_html_tags)]
85822    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85823    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85824    pub fn get_cover<'a>(&'a self) -> Option<&'a str> {
85825        self.cover.as_ref().map(|v| v.as_str())
85826    }
85827    #[allow(rustdoc::invalid_html_tags)]
85828    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85829    #[allow(clippy::needless_lifetimes)]
85830    pub fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self {
85831        self.cover = cover;
85832        self
85833    }
85834    #[allow(rustdoc::invalid_html_tags)]
85835    #[doc = "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
85836    fn rhai_get_cover(&mut self) -> Option<String> {
85837        self.cover.as_ref().cloned()
85838    }
85839    #[allow(rustdoc::invalid_html_tags)]
85840    #[doc = "Optional. Start timestamp for the video in the message"]
85841    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85842    pub fn get_start_timestamp<'a>(&'a self) -> Option<i64> {
85843        self.start_timestamp.as_ref().map(|v| *v)
85844    }
85845    #[allow(rustdoc::invalid_html_tags)]
85846    #[doc = "Optional. Start timestamp for the video in the message"]
85847    #[allow(clippy::needless_lifetimes)]
85848    pub fn set_start_timestamp<'a>(&'a mut self, start_timestamp: Option<i64>) -> &'a mut Self {
85849        self.start_timestamp = start_timestamp;
85850        self
85851    }
85852    #[allow(rustdoc::invalid_html_tags)]
85853    #[doc = "Optional. Start timestamp for the video in the message"]
85854    fn rhai_get_start_timestamp(&mut self) -> Option<i64> {
85855        self.start_timestamp.as_ref().copied()
85856    }
85857    #[allow(rustdoc::invalid_html_tags)]
85858    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
85859    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85860    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
85861        self.caption.as_ref().map(|v| v.as_str())
85862    }
85863    #[allow(rustdoc::invalid_html_tags)]
85864    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
85865    #[allow(clippy::needless_lifetimes)]
85866    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
85867        self.caption = caption;
85868        self
85869    }
85870    #[allow(rustdoc::invalid_html_tags)]
85871    #[doc = "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing"]
85872    fn rhai_get_caption(&mut self) -> Option<String> {
85873        self.caption.as_ref().cloned()
85874    }
85875    #[allow(rustdoc::invalid_html_tags)]
85876    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
85877    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85878    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
85879        self.parse_mode.as_ref().map(|v| v.as_str())
85880    }
85881    #[allow(rustdoc::invalid_html_tags)]
85882    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
85883    #[allow(clippy::needless_lifetimes)]
85884    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
85885        self.parse_mode = parse_mode;
85886        self
85887    }
85888    #[allow(rustdoc::invalid_html_tags)]
85889    #[doc = "Optional. Mode for parsing entities in the video caption. See formatting options for more details."]
85890    fn rhai_get_parse_mode(&mut self) -> Option<String> {
85891        self.parse_mode.as_ref().cloned()
85892    }
85893    #[allow(rustdoc::invalid_html_tags)]
85894    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
85895    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85896    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
85897        self.caption_entities.as_ref()
85898    }
85899    #[allow(rustdoc::invalid_html_tags)]
85900    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
85901    #[allow(clippy::needless_lifetimes)]
85902    pub fn set_caption_entities<'a>(
85903        &'a mut self,
85904        caption_entities: Option<Vec<MessageEntity>>,
85905    ) -> &'a mut Self {
85906        self.caption_entities = caption_entities;
85907        self
85908    }
85909    #[allow(rustdoc::invalid_html_tags)]
85910    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
85911    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
85912        self.caption_entities.as_ref().cloned()
85913    }
85914    #[allow(rustdoc::invalid_html_tags)]
85915    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
85916    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85917    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
85918        self.show_caption_above_media.as_ref().map(|v| *v)
85919    }
85920    #[allow(rustdoc::invalid_html_tags)]
85921    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
85922    #[allow(clippy::needless_lifetimes)]
85923    pub fn set_show_caption_above_media<'a>(
85924        &'a mut self,
85925        show_caption_above_media: Option<bool>,
85926    ) -> &'a mut Self {
85927        self.show_caption_above_media = show_caption_above_media;
85928        self
85929    }
85930    #[allow(rustdoc::invalid_html_tags)]
85931    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
85932    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
85933        self.show_caption_above_media.as_ref().copied()
85934    }
85935    #[allow(rustdoc::invalid_html_tags)]
85936    #[doc = "Optional. Video width"]
85937    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85938    pub fn get_width<'a>(&'a self) -> Option<i64> {
85939        self.width.as_ref().map(|v| *v)
85940    }
85941    #[allow(rustdoc::invalid_html_tags)]
85942    #[doc = "Optional. Video width"]
85943    #[allow(clippy::needless_lifetimes)]
85944    pub fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
85945        self.width = width;
85946        self
85947    }
85948    #[allow(rustdoc::invalid_html_tags)]
85949    #[doc = "Optional. Video width"]
85950    fn rhai_get_width(&mut self) -> Option<i64> {
85951        self.width.as_ref().copied()
85952    }
85953    #[allow(rustdoc::invalid_html_tags)]
85954    #[doc = "Optional. Video height"]
85955    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85956    pub fn get_height<'a>(&'a self) -> Option<i64> {
85957        self.height.as_ref().map(|v| *v)
85958    }
85959    #[allow(rustdoc::invalid_html_tags)]
85960    #[doc = "Optional. Video height"]
85961    #[allow(clippy::needless_lifetimes)]
85962    pub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
85963        self.height = height;
85964        self
85965    }
85966    #[allow(rustdoc::invalid_html_tags)]
85967    #[doc = "Optional. Video height"]
85968    fn rhai_get_height(&mut self) -> Option<i64> {
85969        self.height.as_ref().copied()
85970    }
85971    #[allow(rustdoc::invalid_html_tags)]
85972    #[doc = "Optional. Video duration in seconds"]
85973    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85974    pub fn get_duration<'a>(&'a self) -> Option<i64> {
85975        self.duration.as_ref().map(|v| *v)
85976    }
85977    #[allow(rustdoc::invalid_html_tags)]
85978    #[doc = "Optional. Video duration in seconds"]
85979    #[allow(clippy::needless_lifetimes)]
85980    pub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
85981        self.duration = duration;
85982        self
85983    }
85984    #[allow(rustdoc::invalid_html_tags)]
85985    #[doc = "Optional. Video duration in seconds"]
85986    fn rhai_get_duration(&mut self) -> Option<i64> {
85987        self.duration.as_ref().copied()
85988    }
85989    #[allow(rustdoc::invalid_html_tags)]
85990    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
85991    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
85992    pub fn get_supports_streaming<'a>(&'a self) -> Option<bool> {
85993        self.supports_streaming.as_ref().map(|v| *v)
85994    }
85995    #[allow(rustdoc::invalid_html_tags)]
85996    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
85997    #[allow(clippy::needless_lifetimes)]
85998    pub fn set_supports_streaming<'a>(
85999        &'a mut self,
86000        supports_streaming: Option<bool>,
86001    ) -> &'a mut Self {
86002        self.supports_streaming = supports_streaming;
86003        self
86004    }
86005    #[allow(rustdoc::invalid_html_tags)]
86006    #[doc = "Optional. Pass True if the uploaded video is suitable for streaming"]
86007    fn rhai_get_supports_streaming(&mut self) -> Option<bool> {
86008        self.supports_streaming.as_ref().copied()
86009    }
86010    #[allow(rustdoc::invalid_html_tags)]
86011    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
86012    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86013    pub fn get_has_spoiler<'a>(&'a self) -> Option<bool> {
86014        self.has_spoiler.as_ref().map(|v| *v)
86015    }
86016    #[allow(rustdoc::invalid_html_tags)]
86017    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
86018    #[allow(clippy::needless_lifetimes)]
86019    pub fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self {
86020        self.has_spoiler = has_spoiler;
86021        self
86022    }
86023    #[allow(rustdoc::invalid_html_tags)]
86024    #[doc = "Optional. Pass True if the video needs to be covered with a spoiler animation"]
86025    fn rhai_get_has_spoiler(&mut self) -> Option<bool> {
86026        self.has_spoiler.as_ref().copied()
86027    }
86028    fn convert_form(self, data: Form) -> Result<(Form, String)> {
86029        match self.media {
86030            Some(InputFile::Bytes(FileBytes {
86031                name,
86032                bytes: Some(bytes),
86033            })) => {
86034                let attach = format!("attach://{}", name);
86035                let form = data.part(name, Part::bytes(bytes));
86036                Ok((form, attach))
86037            }
86038            Some(InputFile::String(name)) => Ok((data, name)),
86039            _ => Err(anyhow!("cry")),
86040        }
86041    }
86042}
86043#[allow(dead_code)]
86044impl InputMediaAudio {
86045    #[allow(clippy::too_many_arguments)]
86046    pub fn new(media: Option<InputFile>) -> Self {
86047        Self {
86048            tg_type: "audio".to_owned(),
86049            media,
86050            thumbnail: None,
86051            caption: None,
86052            parse_mode: None,
86053            caption_entities: None,
86054            duration: None,
86055            performer: None,
86056            title: None,
86057        }
86058    }
86059    #[allow(rustdoc::invalid_html_tags)]
86060    #[doc = "Type of the result, must be audio"]
86061    #[allow(clippy::needless_lifetimes)]
86062    pub fn get_tg_type<'a>(&'a self) -> &'a str {
86063        self.tg_type.as_str()
86064    }
86065    #[allow(rustdoc::invalid_html_tags)]
86066    #[doc = "Type of the result, must be audio"]
86067    #[allow(clippy::needless_lifetimes)]
86068    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86069        self.tg_type = tg_type;
86070        self
86071    }
86072    #[allow(rustdoc::invalid_html_tags)]
86073    #[doc = "Type of the result, must be audio"]
86074    fn rhai_get_tg_type(&mut self) -> String {
86075        self.tg_type.clone()
86076    }
86077    #[allow(rustdoc::invalid_html_tags)]
86078    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
86079    #[allow(clippy::needless_lifetimes)]
86080    pub fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
86081        &self.media
86082    }
86083    #[allow(rustdoc::invalid_html_tags)]
86084    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
86085    #[allow(clippy::needless_lifetimes)]
86086    pub fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
86087        self.media = media;
86088        self
86089    }
86090    #[allow(rustdoc::invalid_html_tags)]
86091    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
86092    fn rhai_get_media(&mut self) -> Option<InputFile> {
86093        self.media.clone()
86094    }
86095    #[allow(rustdoc::invalid_html_tags)]
86096    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
86097    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86098    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
86099        self.thumbnail.as_ref().map(|v| v.as_str())
86100    }
86101    #[allow(rustdoc::invalid_html_tags)]
86102    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
86103    #[allow(clippy::needless_lifetimes)]
86104    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
86105        self.thumbnail = thumbnail;
86106        self
86107    }
86108    #[allow(rustdoc::invalid_html_tags)]
86109    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
86110    fn rhai_get_thumbnail(&mut self) -> Option<String> {
86111        self.thumbnail.as_ref().cloned()
86112    }
86113    #[allow(rustdoc::invalid_html_tags)]
86114    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
86115    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86116    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
86117        self.caption.as_ref().map(|v| v.as_str())
86118    }
86119    #[allow(rustdoc::invalid_html_tags)]
86120    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
86121    #[allow(clippy::needless_lifetimes)]
86122    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
86123        self.caption = caption;
86124        self
86125    }
86126    #[allow(rustdoc::invalid_html_tags)]
86127    #[doc = "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing"]
86128    fn rhai_get_caption(&mut self) -> Option<String> {
86129        self.caption.as_ref().cloned()
86130    }
86131    #[allow(rustdoc::invalid_html_tags)]
86132    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
86133    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86134    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
86135        self.parse_mode.as_ref().map(|v| v.as_str())
86136    }
86137    #[allow(rustdoc::invalid_html_tags)]
86138    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
86139    #[allow(clippy::needless_lifetimes)]
86140    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
86141        self.parse_mode = parse_mode;
86142        self
86143    }
86144    #[allow(rustdoc::invalid_html_tags)]
86145    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
86146    fn rhai_get_parse_mode(&mut self) -> Option<String> {
86147        self.parse_mode.as_ref().cloned()
86148    }
86149    #[allow(rustdoc::invalid_html_tags)]
86150    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
86151    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86152    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
86153        self.caption_entities.as_ref()
86154    }
86155    #[allow(rustdoc::invalid_html_tags)]
86156    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
86157    #[allow(clippy::needless_lifetimes)]
86158    pub fn set_caption_entities<'a>(
86159        &'a mut self,
86160        caption_entities: Option<Vec<MessageEntity>>,
86161    ) -> &'a mut Self {
86162        self.caption_entities = caption_entities;
86163        self
86164    }
86165    #[allow(rustdoc::invalid_html_tags)]
86166    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
86167    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
86168        self.caption_entities.as_ref().cloned()
86169    }
86170    #[allow(rustdoc::invalid_html_tags)]
86171    #[doc = "Optional. Duration of the audio in seconds"]
86172    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86173    pub fn get_duration<'a>(&'a self) -> Option<i64> {
86174        self.duration.as_ref().map(|v| *v)
86175    }
86176    #[allow(rustdoc::invalid_html_tags)]
86177    #[doc = "Optional. Duration of the audio in seconds"]
86178    #[allow(clippy::needless_lifetimes)]
86179    pub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
86180        self.duration = duration;
86181        self
86182    }
86183    #[allow(rustdoc::invalid_html_tags)]
86184    #[doc = "Optional. Duration of the audio in seconds"]
86185    fn rhai_get_duration(&mut self) -> Option<i64> {
86186        self.duration.as_ref().copied()
86187    }
86188    #[allow(rustdoc::invalid_html_tags)]
86189    #[doc = "Optional. Performer of the audio"]
86190    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86191    pub fn get_performer<'a>(&'a self) -> Option<&'a str> {
86192        self.performer.as_ref().map(|v| v.as_str())
86193    }
86194    #[allow(rustdoc::invalid_html_tags)]
86195    #[doc = "Optional. Performer of the audio"]
86196    #[allow(clippy::needless_lifetimes)]
86197    pub fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self {
86198        self.performer = performer;
86199        self
86200    }
86201    #[allow(rustdoc::invalid_html_tags)]
86202    #[doc = "Optional. Performer of the audio"]
86203    fn rhai_get_performer(&mut self) -> Option<String> {
86204        self.performer.as_ref().cloned()
86205    }
86206    #[allow(rustdoc::invalid_html_tags)]
86207    #[doc = "Optional. Title of the audio"]
86208    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86209    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
86210        self.title.as_ref().map(|v| v.as_str())
86211    }
86212    #[allow(rustdoc::invalid_html_tags)]
86213    #[doc = "Optional. Title of the audio"]
86214    #[allow(clippy::needless_lifetimes)]
86215    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
86216        self.title = title;
86217        self
86218    }
86219    #[allow(rustdoc::invalid_html_tags)]
86220    #[doc = "Optional. Title of the audio"]
86221    fn rhai_get_title(&mut self) -> Option<String> {
86222        self.title.as_ref().cloned()
86223    }
86224    fn convert_form(self, data: Form) -> Result<(Form, String)> {
86225        match self.media {
86226            Some(InputFile::Bytes(FileBytes {
86227                name,
86228                bytes: Some(bytes),
86229            })) => {
86230                let attach = format!("attach://{}", name);
86231                let form = data.part(name, Part::bytes(bytes));
86232                Ok((form, attach))
86233            }
86234            Some(InputFile::String(name)) => Ok((data, name)),
86235            _ => Err(anyhow!("cry")),
86236        }
86237    }
86238}
86239impl TraitChatBoostSourcePremium for ChatBoostSourcePremium {
86240    #[allow(rustdoc::invalid_html_tags)]
86241    #[doc = "Source of the boost, always \"premium\""]
86242    #[allow(clippy::needless_lifetimes)]
86243    fn get_source<'a>(&'a self) -> &'a str {
86244        self.source.as_str()
86245    }
86246    #[allow(rustdoc::invalid_html_tags)]
86247    #[doc = "Source of the boost, always \"premium\""]
86248    #[allow(clippy::needless_lifetimes)]
86249    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
86250        self.source = source;
86251        self
86252    }
86253    #[allow(rustdoc::invalid_html_tags)]
86254    #[doc = "User that boosted the chat"]
86255    #[allow(clippy::needless_lifetimes)]
86256    fn get_user<'a>(&'a self) -> &'a User {
86257        &self.user
86258    }
86259    #[allow(rustdoc::invalid_html_tags)]
86260    #[doc = "User that boosted the chat"]
86261    #[allow(clippy::needless_lifetimes)]
86262    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
86263        self.user = BoxWrapper(Unbox(user));
86264        self
86265    }
86266}
86267impl TraitChatBoostSourceGiftCode for ChatBoostSourceGiftCode {
86268    #[allow(rustdoc::invalid_html_tags)]
86269    #[doc = "Source of the boost, always \"gift_code\""]
86270    #[allow(clippy::needless_lifetimes)]
86271    fn get_source<'a>(&'a self) -> &'a str {
86272        self.source.as_str()
86273    }
86274    #[allow(rustdoc::invalid_html_tags)]
86275    #[doc = "Source of the boost, always \"gift_code\""]
86276    #[allow(clippy::needless_lifetimes)]
86277    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
86278        self.source = source;
86279        self
86280    }
86281    #[allow(rustdoc::invalid_html_tags)]
86282    #[doc = "User for which the gift code was created"]
86283    #[allow(clippy::needless_lifetimes)]
86284    fn get_user<'a>(&'a self) -> &'a User {
86285        &self.user
86286    }
86287    #[allow(rustdoc::invalid_html_tags)]
86288    #[doc = "User for which the gift code was created"]
86289    #[allow(clippy::needless_lifetimes)]
86290    fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
86291        self.user = BoxWrapper(Unbox(user));
86292        self
86293    }
86294}
86295impl TraitChatBoostSourceGiveaway for ChatBoostSourceGiveaway {
86296    #[allow(rustdoc::invalid_html_tags)]
86297    #[doc = "Source of the boost, always \"giveaway\""]
86298    #[allow(clippy::needless_lifetimes)]
86299    fn get_source<'a>(&'a self) -> &'a str {
86300        self.source.as_str()
86301    }
86302    #[allow(rustdoc::invalid_html_tags)]
86303    #[doc = "Source of the boost, always \"giveaway\""]
86304    #[allow(clippy::needless_lifetimes)]
86305    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
86306        self.source = source;
86307        self
86308    }
86309    #[allow(rustdoc::invalid_html_tags)]
86310    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
86311    #[allow(clippy::needless_lifetimes)]
86312    fn get_giveaway_message_id<'a>(&'a self) -> i64 {
86313        self.giveaway_message_id
86314    }
86315    #[allow(rustdoc::invalid_html_tags)]
86316    #[doc = "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet."]
86317    #[allow(clippy::needless_lifetimes)]
86318    fn set_giveaway_message_id<'a>(&'a mut self, giveaway_message_id: i64) -> &'a mut Self {
86319        self.giveaway_message_id = giveaway_message_id;
86320        self
86321    }
86322    #[allow(rustdoc::invalid_html_tags)]
86323    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
86324    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86325    fn get_user<'a>(&'a self) -> Option<&'a User> {
86326        self.user.as_ref().map(|v| v.inner_ref())
86327    }
86328    #[allow(rustdoc::invalid_html_tags)]
86329    #[doc = "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only"]
86330    #[allow(clippy::needless_lifetimes)]
86331    fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self {
86332        self.user = user.map(|user| BoxWrapper(Unbox(user)));
86333        self
86334    }
86335    #[allow(rustdoc::invalid_html_tags)]
86336    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
86337    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86338    fn get_prize_star_count<'a>(&'a self) -> Option<i64> {
86339        self.prize_star_count.as_ref().map(|v| *v)
86340    }
86341    #[allow(rustdoc::invalid_html_tags)]
86342    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
86343    #[allow(clippy::needless_lifetimes)]
86344    fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self {
86345        self.prize_star_count = prize_star_count;
86346        self
86347    }
86348    #[allow(rustdoc::invalid_html_tags)]
86349    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
86350    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86351    fn get_is_unclaimed<'a>(&'a self) -> Option<bool> {
86352        self.is_unclaimed.as_ref().map(|v| *v)
86353    }
86354    #[allow(rustdoc::invalid_html_tags)]
86355    #[doc = "Optional. True, if the giveaway was completed, but there was no user to win the prize"]
86356    #[allow(clippy::needless_lifetimes)]
86357    fn set_is_unclaimed<'a>(&'a mut self, is_unclaimed: Option<bool>) -> &'a mut Self {
86358        self.is_unclaimed = is_unclaimed;
86359        self
86360    }
86361}
86362impl TraitBotCommandScopeDefault for BotCommandScopeDefault {
86363    #[allow(rustdoc::invalid_html_tags)]
86364    #[doc = "Scope type, must be default"]
86365    #[allow(clippy::needless_lifetimes)]
86366    fn get_tg_type<'a>(&'a self) -> &'a str {
86367        self.tg_type.as_str()
86368    }
86369    #[allow(rustdoc::invalid_html_tags)]
86370    #[doc = "Scope type, must be default"]
86371    #[allow(clippy::needless_lifetimes)]
86372    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86373        self.tg_type = tg_type;
86374        self
86375    }
86376}
86377impl TraitBotCommandScopeAllPrivateChats for BotCommandScopeAllPrivateChats {
86378    #[allow(rustdoc::invalid_html_tags)]
86379    #[doc = "Scope type, must be all_private_chats"]
86380    #[allow(clippy::needless_lifetimes)]
86381    fn get_tg_type<'a>(&'a self) -> &'a str {
86382        self.tg_type.as_str()
86383    }
86384    #[allow(rustdoc::invalid_html_tags)]
86385    #[doc = "Scope type, must be all_private_chats"]
86386    #[allow(clippy::needless_lifetimes)]
86387    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86388        self.tg_type = tg_type;
86389        self
86390    }
86391}
86392impl TraitBotCommandScopeAllGroupChats for BotCommandScopeAllGroupChats {
86393    #[allow(rustdoc::invalid_html_tags)]
86394    #[doc = "Scope type, must be all_group_chats"]
86395    #[allow(clippy::needless_lifetimes)]
86396    fn get_tg_type<'a>(&'a self) -> &'a str {
86397        self.tg_type.as_str()
86398    }
86399    #[allow(rustdoc::invalid_html_tags)]
86400    #[doc = "Scope type, must be all_group_chats"]
86401    #[allow(clippy::needless_lifetimes)]
86402    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86403        self.tg_type = tg_type;
86404        self
86405    }
86406}
86407impl TraitBotCommandScopeAllChatAdministrators for BotCommandScopeAllChatAdministrators {
86408    #[allow(rustdoc::invalid_html_tags)]
86409    #[doc = "Scope type, must be all_chat_administrators"]
86410    #[allow(clippy::needless_lifetimes)]
86411    fn get_tg_type<'a>(&'a self) -> &'a str {
86412        self.tg_type.as_str()
86413    }
86414    #[allow(rustdoc::invalid_html_tags)]
86415    #[doc = "Scope type, must be all_chat_administrators"]
86416    #[allow(clippy::needless_lifetimes)]
86417    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86418        self.tg_type = tg_type;
86419        self
86420    }
86421}
86422impl TraitBotCommandScopeChat for BotCommandScopeChat {
86423    #[allow(rustdoc::invalid_html_tags)]
86424    #[doc = "Scope type, must be chat"]
86425    #[allow(clippy::needless_lifetimes)]
86426    fn get_tg_type<'a>(&'a self) -> &'a str {
86427        self.tg_type.as_str()
86428    }
86429    #[allow(rustdoc::invalid_html_tags)]
86430    #[doc = "Scope type, must be chat"]
86431    #[allow(clippy::needless_lifetimes)]
86432    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86433        self.tg_type = tg_type;
86434        self
86435    }
86436    #[allow(rustdoc::invalid_html_tags)]
86437    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
86438    #[allow(clippy::needless_lifetimes)]
86439    fn get_chat_id<'a>(&'a self) -> &'a ChatHandle {
86440        &self.chat_id
86441    }
86442    #[allow(rustdoc::invalid_html_tags)]
86443    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
86444    #[allow(clippy::needless_lifetimes)]
86445    fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self {
86446        self.chat_id = chat_id;
86447        self
86448    }
86449}
86450impl TraitBotCommandScopeChatAdministrators for BotCommandScopeChatAdministrators {
86451    #[allow(rustdoc::invalid_html_tags)]
86452    #[doc = "Scope type, must be chat_administrators"]
86453    #[allow(clippy::needless_lifetimes)]
86454    fn get_tg_type<'a>(&'a self) -> &'a str {
86455        self.tg_type.as_str()
86456    }
86457    #[allow(rustdoc::invalid_html_tags)]
86458    #[doc = "Scope type, must be chat_administrators"]
86459    #[allow(clippy::needless_lifetimes)]
86460    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86461        self.tg_type = tg_type;
86462        self
86463    }
86464    #[allow(rustdoc::invalid_html_tags)]
86465    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
86466    #[allow(clippy::needless_lifetimes)]
86467    fn get_chat_id<'a>(&'a self) -> &'a ChatHandle {
86468        &self.chat_id
86469    }
86470    #[allow(rustdoc::invalid_html_tags)]
86471    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
86472    #[allow(clippy::needless_lifetimes)]
86473    fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self {
86474        self.chat_id = chat_id;
86475        self
86476    }
86477}
86478impl TraitBotCommandScopeChatMember for BotCommandScopeChatMember {
86479    #[allow(rustdoc::invalid_html_tags)]
86480    #[doc = "Scope type, must be chat_member"]
86481    #[allow(clippy::needless_lifetimes)]
86482    fn get_tg_type<'a>(&'a self) -> &'a str {
86483        self.tg_type.as_str()
86484    }
86485    #[allow(rustdoc::invalid_html_tags)]
86486    #[doc = "Scope type, must be chat_member"]
86487    #[allow(clippy::needless_lifetimes)]
86488    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86489        self.tg_type = tg_type;
86490        self
86491    }
86492    #[allow(rustdoc::invalid_html_tags)]
86493    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
86494    #[allow(clippy::needless_lifetimes)]
86495    fn get_chat_id<'a>(&'a self) -> &'a ChatHandle {
86496        &self.chat_id
86497    }
86498    #[allow(rustdoc::invalid_html_tags)]
86499    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
86500    #[allow(clippy::needless_lifetimes)]
86501    fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self {
86502        self.chat_id = chat_id;
86503        self
86504    }
86505    #[allow(rustdoc::invalid_html_tags)]
86506    #[doc = "Unique identifier of the target user"]
86507    #[allow(clippy::needless_lifetimes)]
86508    fn get_user_id<'a>(&'a self) -> i64 {
86509        self.user_id
86510    }
86511    #[allow(rustdoc::invalid_html_tags)]
86512    #[doc = "Unique identifier of the target user"]
86513    #[allow(clippy::needless_lifetimes)]
86514    fn set_user_id<'a>(&'a mut self, user_id: i64) -> &'a mut Self {
86515        self.user_id = user_id;
86516        self
86517    }
86518}
86519#[allow(dead_code)]
86520impl OwnedGifts {
86521    #[allow(clippy::too_many_arguments)]
86522    pub fn new(total_count: i64, gifts: Vec<OwnedGift>) -> Self {
86523        Self {
86524            total_count,
86525            gifts,
86526            next_offset: None,
86527        }
86528    }
86529    #[allow(rustdoc::invalid_html_tags)]
86530    #[doc = "The total number of gifts owned by the user or the chat"]
86531    #[allow(clippy::needless_lifetimes)]
86532    pub fn get_total_count<'a>(&'a self) -> i64 {
86533        self.total_count
86534    }
86535    #[allow(rustdoc::invalid_html_tags)]
86536    #[doc = "The total number of gifts owned by the user or the chat"]
86537    #[allow(clippy::needless_lifetimes)]
86538    pub fn set_total_count<'a>(&'a mut self, total_count: i64) -> &'a mut Self {
86539        self.total_count = total_count;
86540        self
86541    }
86542    #[allow(rustdoc::invalid_html_tags)]
86543    #[doc = "The total number of gifts owned by the user or the chat"]
86544    fn rhai_get_total_count(&mut self) -> i64 {
86545        self.total_count
86546    }
86547    #[allow(rustdoc::invalid_html_tags)]
86548    #[doc = "The list of gifts"]
86549    #[allow(clippy::needless_lifetimes)]
86550    pub fn get_gifts<'a>(&'a self) -> &'a Vec<OwnedGift> {
86551        &self.gifts
86552    }
86553    #[allow(rustdoc::invalid_html_tags)]
86554    #[doc = "The list of gifts"]
86555    #[allow(clippy::needless_lifetimes)]
86556    pub fn set_gifts<'a>(&'a mut self, gifts: Vec<OwnedGift>) -> &'a mut Self {
86557        self.gifts = gifts;
86558        self
86559    }
86560    #[allow(rustdoc::invalid_html_tags)]
86561    #[doc = "The list of gifts"]
86562    fn rhai_get_gifts(&mut self) -> Vec<OwnedGift> {
86563        self.gifts.clone()
86564    }
86565    #[allow(rustdoc::invalid_html_tags)]
86566    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
86567    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86568    pub fn get_next_offset<'a>(&'a self) -> Option<&'a str> {
86569        self.next_offset.as_ref().map(|v| v.as_str())
86570    }
86571    #[allow(rustdoc::invalid_html_tags)]
86572    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
86573    #[allow(clippy::needless_lifetimes)]
86574    pub fn set_next_offset<'a>(&'a mut self, next_offset: Option<String>) -> &'a mut Self {
86575        self.next_offset = next_offset;
86576        self
86577    }
86578    #[allow(rustdoc::invalid_html_tags)]
86579    #[doc = "Optional. Offset for the next request. If empty, then there are no more results"]
86580    fn rhai_get_next_offset(&mut self) -> Option<String> {
86581        self.next_offset.as_ref().cloned()
86582    }
86583}
86584#[allow(dead_code)]
86585impl EncryptedPassportElement {
86586    #[allow(clippy::too_many_arguments)]
86587    pub fn new(hash: String) -> Self {
86588        Self {
86589            tg_type: "EncryptedPassportElement".to_owned(),
86590            hash,
86591            data: None,
86592            phone_number: None,
86593            email: None,
86594            files: None,
86595            front_side: None,
86596            reverse_side: None,
86597            selfie: None,
86598            translation: None,
86599        }
86600    }
86601    #[allow(rustdoc::invalid_html_tags)]
86602    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
86603    #[allow(clippy::needless_lifetimes)]
86604    pub fn get_tg_type<'a>(&'a self) -> &'a str {
86605        self.tg_type.as_str()
86606    }
86607    #[allow(rustdoc::invalid_html_tags)]
86608    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
86609    #[allow(clippy::needless_lifetimes)]
86610    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86611        self.tg_type = tg_type;
86612        self
86613    }
86614    #[allow(rustdoc::invalid_html_tags)]
86615    #[doc = "Element type. One of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\", \"phone_number\", \"email\"."]
86616    fn rhai_get_tg_type(&mut self) -> String {
86617        self.tg_type.clone()
86618    }
86619    #[allow(rustdoc::invalid_html_tags)]
86620    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
86621    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86622    pub fn get_data<'a>(&'a self) -> Option<&'a str> {
86623        self.data.as_ref().map(|v| v.as_str())
86624    }
86625    #[allow(rustdoc::invalid_html_tags)]
86626    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
86627    #[allow(clippy::needless_lifetimes)]
86628    pub fn set_data<'a>(&'a mut self, data: Option<String>) -> &'a mut Self {
86629        self.data = data;
86630        self
86631    }
86632    #[allow(rustdoc::invalid_html_tags)]
86633    #[doc = "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\" and \"address\" types. Can be decrypted and verified using the accompanying EncryptedCredentials."]
86634    fn rhai_get_data(&mut self) -> Option<String> {
86635        self.data.as_ref().cloned()
86636    }
86637    #[allow(rustdoc::invalid_html_tags)]
86638    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
86639    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86640    pub fn get_phone_number<'a>(&'a self) -> Option<&'a str> {
86641        self.phone_number.as_ref().map(|v| v.as_str())
86642    }
86643    #[allow(rustdoc::invalid_html_tags)]
86644    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
86645    #[allow(clippy::needless_lifetimes)]
86646    pub fn set_phone_number<'a>(&'a mut self, phone_number: Option<String>) -> &'a mut Self {
86647        self.phone_number = phone_number;
86648        self
86649    }
86650    #[allow(rustdoc::invalid_html_tags)]
86651    #[doc = "Optional. User's verified phone number; available only for \"phone_number\" type"]
86652    fn rhai_get_phone_number(&mut self) -> Option<String> {
86653        self.phone_number.as_ref().cloned()
86654    }
86655    #[allow(rustdoc::invalid_html_tags)]
86656    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
86657    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86658    pub fn get_email<'a>(&'a self) -> Option<&'a str> {
86659        self.email.as_ref().map(|v| v.as_str())
86660    }
86661    #[allow(rustdoc::invalid_html_tags)]
86662    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
86663    #[allow(clippy::needless_lifetimes)]
86664    pub fn set_email<'a>(&'a mut self, email: Option<String>) -> &'a mut Self {
86665        self.email = email;
86666        self
86667    }
86668    #[allow(rustdoc::invalid_html_tags)]
86669    #[doc = "Optional. User's verified email address; available only for \"email\" type"]
86670    fn rhai_get_email(&mut self) -> Option<String> {
86671        self.email.as_ref().cloned()
86672    }
86673    #[allow(rustdoc::invalid_html_tags)]
86674    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
86675    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86676    pub fn get_files<'a>(&'a self) -> Option<&'a Vec<PassportFile>> {
86677        self.files.as_ref()
86678    }
86679    #[allow(rustdoc::invalid_html_tags)]
86680    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
86681    #[allow(clippy::needless_lifetimes)]
86682    pub fn set_files<'a>(&'a mut self, files: Option<Vec<PassportFile>>) -> &'a mut Self {
86683        self.files = files;
86684        self
86685    }
86686    #[allow(rustdoc::invalid_html_tags)]
86687    #[doc = "Optional. Array of encrypted files with documents provided by the user; available only for \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
86688    fn rhai_get_files(&mut self) -> Option<Vec<PassportFile>> {
86689        self.files.as_ref().cloned()
86690    }
86691    #[allow(rustdoc::invalid_html_tags)]
86692    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86693    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86694    pub fn get_front_side<'a>(&'a self) -> Option<&'a PassportFile> {
86695        self.front_side.as_ref().map(|v| v.inner_ref())
86696    }
86697    #[allow(rustdoc::invalid_html_tags)]
86698    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86699    #[allow(clippy::needless_lifetimes)]
86700    pub fn set_front_side<'a>(&'a mut self, front_side: Option<PassportFile>) -> &'a mut Self {
86701        self.front_side = front_side.map(|front_side| BoxWrapper(Unbox(front_side)));
86702        self
86703    }
86704    #[allow(rustdoc::invalid_html_tags)]
86705    #[doc = "Optional. Encrypted file with the front side of the document, provided by the user; available only for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86706    fn rhai_get_front_side(&mut self) -> Option<PassportFile> {
86707        self.front_side.as_ref().map(|v| v.clone().into())
86708    }
86709    #[allow(rustdoc::invalid_html_tags)]
86710    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86711    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86712    pub fn get_reverse_side<'a>(&'a self) -> Option<&'a PassportFile> {
86713        self.reverse_side.as_ref().map(|v| v.inner_ref())
86714    }
86715    #[allow(rustdoc::invalid_html_tags)]
86716    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86717    #[allow(clippy::needless_lifetimes)]
86718    pub fn set_reverse_side<'a>(&'a mut self, reverse_side: Option<PassportFile>) -> &'a mut Self {
86719        self.reverse_side = reverse_side.map(|reverse_side| BoxWrapper(Unbox(reverse_side)));
86720        self
86721    }
86722    #[allow(rustdoc::invalid_html_tags)]
86723    #[doc = "Optional. Encrypted file with the reverse side of the document, provided by the user; available only for \"driver_license\" and \"identity_card\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86724    fn rhai_get_reverse_side(&mut self) -> Option<PassportFile> {
86725        self.reverse_side.as_ref().map(|v| v.clone().into())
86726    }
86727    #[allow(rustdoc::invalid_html_tags)]
86728    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86729    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86730    pub fn get_selfie<'a>(&'a self) -> Option<&'a PassportFile> {
86731        self.selfie.as_ref().map(|v| v.inner_ref())
86732    }
86733    #[allow(rustdoc::invalid_html_tags)]
86734    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86735    #[allow(clippy::needless_lifetimes)]
86736    pub fn set_selfie<'a>(&'a mut self, selfie: Option<PassportFile>) -> &'a mut Self {
86737        self.selfie = selfie.map(|selfie| BoxWrapper(Unbox(selfie)));
86738        self
86739    }
86740    #[allow(rustdoc::invalid_html_tags)]
86741    #[doc = "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\" and \"internal_passport\". The file can be decrypted and verified using the accompanying EncryptedCredentials."]
86742    fn rhai_get_selfie(&mut self) -> Option<PassportFile> {
86743        self.selfie.as_ref().map(|v| v.clone().into())
86744    }
86745    #[allow(rustdoc::invalid_html_tags)]
86746    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
86747    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86748    pub fn get_translation<'a>(&'a self) -> Option<&'a Vec<PassportFile>> {
86749        self.translation.as_ref()
86750    }
86751    #[allow(rustdoc::invalid_html_tags)]
86752    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
86753    #[allow(clippy::needless_lifetimes)]
86754    pub fn set_translation<'a>(
86755        &'a mut self,
86756        translation: Option<Vec<PassportFile>>,
86757    ) -> &'a mut Self {
86758        self.translation = translation;
86759        self
86760    }
86761    #[allow(rustdoc::invalid_html_tags)]
86762    #[doc = "Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\" and \"temporary_registration\" types. Files can be decrypted and verified using the accompanying EncryptedCredentials."]
86763    fn rhai_get_translation(&mut self) -> Option<Vec<PassportFile>> {
86764        self.translation.as_ref().cloned()
86765    }
86766    #[allow(rustdoc::invalid_html_tags)]
86767    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
86768    #[allow(clippy::needless_lifetimes)]
86769    pub fn get_hash<'a>(&'a self) -> &'a str {
86770        self.hash.as_str()
86771    }
86772    #[allow(rustdoc::invalid_html_tags)]
86773    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
86774    #[allow(clippy::needless_lifetimes)]
86775    pub fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self {
86776        self.hash = hash;
86777        self
86778    }
86779    #[allow(rustdoc::invalid_html_tags)]
86780    #[doc = "Base64-encoded element hash for using in PassportElementErrorUnspecified"]
86781    fn rhai_get_hash(&mut self) -> String {
86782        self.hash.clone()
86783    }
86784}
86785impl TraitPaidMediaPreview for PaidMediaPreview {
86786    #[allow(rustdoc::invalid_html_tags)]
86787    #[doc = "Type of the paid media, always \"preview\""]
86788    #[allow(clippy::needless_lifetimes)]
86789    fn get_tg_type<'a>(&'a self) -> &'a str {
86790        self.tg_type.as_str()
86791    }
86792    #[allow(rustdoc::invalid_html_tags)]
86793    #[doc = "Type of the paid media, always \"preview\""]
86794    #[allow(clippy::needless_lifetimes)]
86795    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86796        self.tg_type = tg_type;
86797        self
86798    }
86799    #[allow(rustdoc::invalid_html_tags)]
86800    #[doc = "Optional. Media width as defined by the sender"]
86801    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86802    fn get_width<'a>(&'a self) -> Option<i64> {
86803        self.width.as_ref().map(|v| *v)
86804    }
86805    #[allow(rustdoc::invalid_html_tags)]
86806    #[doc = "Optional. Media width as defined by the sender"]
86807    #[allow(clippy::needless_lifetimes)]
86808    fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
86809        self.width = width;
86810        self
86811    }
86812    #[allow(rustdoc::invalid_html_tags)]
86813    #[doc = "Optional. Media height as defined by the sender"]
86814    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86815    fn get_height<'a>(&'a self) -> Option<i64> {
86816        self.height.as_ref().map(|v| *v)
86817    }
86818    #[allow(rustdoc::invalid_html_tags)]
86819    #[doc = "Optional. Media height as defined by the sender"]
86820    #[allow(clippy::needless_lifetimes)]
86821    fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
86822        self.height = height;
86823        self
86824    }
86825    #[allow(rustdoc::invalid_html_tags)]
86826    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
86827    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
86828    fn get_duration<'a>(&'a self) -> Option<i64> {
86829        self.duration.as_ref().map(|v| *v)
86830    }
86831    #[allow(rustdoc::invalid_html_tags)]
86832    #[doc = "Optional. Duration of the media in seconds as defined by the sender"]
86833    #[allow(clippy::needless_lifetimes)]
86834    fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
86835        self.duration = duration;
86836        self
86837    }
86838}
86839impl TraitPaidMediaPhoto for PaidMediaPhoto {
86840    #[allow(rustdoc::invalid_html_tags)]
86841    #[doc = "Type of the paid media, always \"photo\""]
86842    #[allow(clippy::needless_lifetimes)]
86843    fn get_tg_type<'a>(&'a self) -> &'a str {
86844        self.tg_type.as_str()
86845    }
86846    #[allow(rustdoc::invalid_html_tags)]
86847    #[doc = "Type of the paid media, always \"photo\""]
86848    #[allow(clippy::needless_lifetimes)]
86849    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86850        self.tg_type = tg_type;
86851        self
86852    }
86853    #[allow(rustdoc::invalid_html_tags)]
86854    #[doc = "The photo"]
86855    #[allow(clippy::needless_lifetimes)]
86856    fn get_photo<'a>(&'a self) -> &'a Vec<PhotoSize> {
86857        &self.photo
86858    }
86859    #[allow(rustdoc::invalid_html_tags)]
86860    #[doc = "The photo"]
86861    #[allow(clippy::needless_lifetimes)]
86862    fn set_photo<'a>(&'a mut self, photo: Vec<PhotoSize>) -> &'a mut Self {
86863        self.photo = photo;
86864        self
86865    }
86866}
86867impl TraitPaidMediaVideo for PaidMediaVideo {
86868    #[allow(rustdoc::invalid_html_tags)]
86869    #[doc = "Type of the paid media, always \"video\""]
86870    #[allow(clippy::needless_lifetimes)]
86871    fn get_tg_type<'a>(&'a self) -> &'a str {
86872        self.tg_type.as_str()
86873    }
86874    #[allow(rustdoc::invalid_html_tags)]
86875    #[doc = "Type of the paid media, always \"video\""]
86876    #[allow(clippy::needless_lifetimes)]
86877    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
86878        self.tg_type = tg_type;
86879        self
86880    }
86881    #[allow(rustdoc::invalid_html_tags)]
86882    #[doc = "The video"]
86883    #[allow(clippy::needless_lifetimes)]
86884    fn get_video<'a>(&'a self) -> &'a Video {
86885        &self.video
86886    }
86887    #[allow(rustdoc::invalid_html_tags)]
86888    #[doc = "The video"]
86889    #[allow(clippy::needless_lifetimes)]
86890    fn set_video<'a>(&'a mut self, video: Video) -> &'a mut Self {
86891        self.video = BoxWrapper(Unbox(video));
86892        self
86893    }
86894}
86895#[allow(dead_code)]
86896impl Invoice {
86897    #[allow(clippy::too_many_arguments)]
86898    pub fn new(
86899        title: String,
86900        description: String,
86901        start_parameter: String,
86902        currency: String,
86903        total_amount: i64,
86904    ) -> Self {
86905        Self {
86906            title,
86907            description,
86908            start_parameter,
86909            currency,
86910            total_amount,
86911        }
86912    }
86913    #[allow(rustdoc::invalid_html_tags)]
86914    #[doc = "Product name"]
86915    #[allow(clippy::needless_lifetimes)]
86916    pub fn get_title<'a>(&'a self) -> &'a str {
86917        self.title.as_str()
86918    }
86919    #[allow(rustdoc::invalid_html_tags)]
86920    #[doc = "Product name"]
86921    #[allow(clippy::needless_lifetimes)]
86922    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
86923        self.title = title;
86924        self
86925    }
86926    #[allow(rustdoc::invalid_html_tags)]
86927    #[doc = "Product name"]
86928    fn rhai_get_title(&mut self) -> String {
86929        self.title.clone()
86930    }
86931    #[allow(rustdoc::invalid_html_tags)]
86932    #[doc = "Product description"]
86933    #[allow(clippy::needless_lifetimes)]
86934    pub fn get_description<'a>(&'a self) -> &'a str {
86935        self.description.as_str()
86936    }
86937    #[allow(rustdoc::invalid_html_tags)]
86938    #[doc = "Product description"]
86939    #[allow(clippy::needless_lifetimes)]
86940    pub fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self {
86941        self.description = description;
86942        self
86943    }
86944    #[allow(rustdoc::invalid_html_tags)]
86945    #[doc = "Product description"]
86946    fn rhai_get_description(&mut self) -> String {
86947        self.description.clone()
86948    }
86949    #[allow(rustdoc::invalid_html_tags)]
86950    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
86951    #[allow(clippy::needless_lifetimes)]
86952    pub fn get_start_parameter<'a>(&'a self) -> &'a str {
86953        self.start_parameter.as_str()
86954    }
86955    #[allow(rustdoc::invalid_html_tags)]
86956    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
86957    #[allow(clippy::needless_lifetimes)]
86958    pub fn set_start_parameter<'a>(&'a mut self, start_parameter: String) -> &'a mut Self {
86959        self.start_parameter = start_parameter;
86960        self
86961    }
86962    #[allow(rustdoc::invalid_html_tags)]
86963    #[doc = "Unique bot deep-linking parameter that can be used to generate this invoice"]
86964    fn rhai_get_start_parameter(&mut self) -> String {
86965        self.start_parameter.clone()
86966    }
86967    #[allow(rustdoc::invalid_html_tags)]
86968    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
86969    #[allow(clippy::needless_lifetimes)]
86970    pub fn get_currency<'a>(&'a self) -> &'a str {
86971        self.currency.as_str()
86972    }
86973    #[allow(rustdoc::invalid_html_tags)]
86974    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
86975    #[allow(clippy::needless_lifetimes)]
86976    pub fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
86977        self.currency = currency;
86978        self
86979    }
86980    #[allow(rustdoc::invalid_html_tags)]
86981    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars"]
86982    fn rhai_get_currency(&mut self) -> String {
86983        self.currency.clone()
86984    }
86985    #[allow(rustdoc::invalid_html_tags)]
86986    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
86987    #[allow(clippy::needless_lifetimes)]
86988    pub fn get_total_amount<'a>(&'a self) -> i64 {
86989        self.total_amount
86990    }
86991    #[allow(rustdoc::invalid_html_tags)]
86992    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
86993    #[allow(clippy::needless_lifetimes)]
86994    pub fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self {
86995        self.total_amount = total_amount;
86996        self
86997    }
86998    #[allow(rustdoc::invalid_html_tags)]
86999    #[doc = "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
87000    fn rhai_get_total_amount(&mut self) -> i64 {
87001        self.total_amount
87002    }
87003}
87004impl TraitOwnedGiftRegular for OwnedGiftRegular {
87005    #[allow(rustdoc::invalid_html_tags)]
87006    #[doc = "Type of the gift, always \"regular\""]
87007    #[allow(clippy::needless_lifetimes)]
87008    fn get_tg_type<'a>(&'a self) -> &'a str {
87009        self.tg_type.as_str()
87010    }
87011    #[allow(rustdoc::invalid_html_tags)]
87012    #[doc = "Type of the gift, always \"regular\""]
87013    #[allow(clippy::needless_lifetimes)]
87014    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
87015        self.tg_type = tg_type;
87016        self
87017    }
87018    #[allow(rustdoc::invalid_html_tags)]
87019    #[doc = "Information about the regular gift"]
87020    #[allow(clippy::needless_lifetimes)]
87021    fn get_gift<'a>(&'a self) -> &'a Gift {
87022        &self.gift
87023    }
87024    #[allow(rustdoc::invalid_html_tags)]
87025    #[doc = "Information about the regular gift"]
87026    #[allow(clippy::needless_lifetimes)]
87027    fn set_gift<'a>(&'a mut self, gift: Gift) -> &'a mut Self {
87028        self.gift = BoxWrapper(Unbox(gift));
87029        self
87030    }
87031    #[allow(rustdoc::invalid_html_tags)]
87032    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
87033    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87034    fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str> {
87035        self.owned_gift_id.as_ref().map(|v| v.as_str())
87036    }
87037    #[allow(rustdoc::invalid_html_tags)]
87038    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
87039    #[allow(clippy::needless_lifetimes)]
87040    fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self {
87041        self.owned_gift_id = owned_gift_id;
87042        self
87043    }
87044    #[allow(rustdoc::invalid_html_tags)]
87045    #[doc = "Optional. Sender of the gift if it is a known user"]
87046    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87047    fn get_sender_user<'a>(&'a self) -> Option<&'a User> {
87048        self.sender_user.as_ref().map(|v| v.inner_ref())
87049    }
87050    #[allow(rustdoc::invalid_html_tags)]
87051    #[doc = "Optional. Sender of the gift if it is a known user"]
87052    #[allow(clippy::needless_lifetimes)]
87053    fn set_sender_user<'a>(&'a mut self, sender_user: Option<User>) -> &'a mut Self {
87054        self.sender_user = sender_user.map(|sender_user| BoxWrapper(Unbox(sender_user)));
87055        self
87056    }
87057    #[allow(rustdoc::invalid_html_tags)]
87058    #[doc = "Date the gift was sent in Unix time"]
87059    #[allow(clippy::needless_lifetimes)]
87060    fn get_send_date<'a>(&'a self) -> i64 {
87061        self.send_date
87062    }
87063    #[allow(rustdoc::invalid_html_tags)]
87064    #[doc = "Date the gift was sent in Unix time"]
87065    #[allow(clippy::needless_lifetimes)]
87066    fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self {
87067        self.send_date = send_date;
87068        self
87069    }
87070    #[allow(rustdoc::invalid_html_tags)]
87071    #[doc = "Optional. Text of the message that was added to the gift"]
87072    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87073    fn get_text<'a>(&'a self) -> Option<&'a str> {
87074        self.text.as_ref().map(|v| v.as_str())
87075    }
87076    #[allow(rustdoc::invalid_html_tags)]
87077    #[doc = "Optional. Text of the message that was added to the gift"]
87078    #[allow(clippy::needless_lifetimes)]
87079    fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self {
87080        self.text = text;
87081        self
87082    }
87083    #[allow(rustdoc::invalid_html_tags)]
87084    #[doc = "Optional. Special entities that appear in the text"]
87085    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87086    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
87087        self.entities.as_ref()
87088    }
87089    #[allow(rustdoc::invalid_html_tags)]
87090    #[doc = "Optional. Special entities that appear in the text"]
87091    #[allow(clippy::needless_lifetimes)]
87092    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
87093        self.entities = entities;
87094        self
87095    }
87096    #[allow(rustdoc::invalid_html_tags)]
87097    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
87098    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87099    fn get_is_private<'a>(&'a self) -> Option<bool> {
87100        self.is_private.as_ref().map(|v| *v)
87101    }
87102    #[allow(rustdoc::invalid_html_tags)]
87103    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
87104    #[allow(clippy::needless_lifetimes)]
87105    fn set_is_private<'a>(&'a mut self, is_private: Option<bool>) -> &'a mut Self {
87106        self.is_private = is_private;
87107        self
87108    }
87109    #[allow(rustdoc::invalid_html_tags)]
87110    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
87111    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87112    fn get_is_saved<'a>(&'a self) -> Option<bool> {
87113        self.is_saved.as_ref().map(|v| *v)
87114    }
87115    #[allow(rustdoc::invalid_html_tags)]
87116    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
87117    #[allow(clippy::needless_lifetimes)]
87118    fn set_is_saved<'a>(&'a mut self, is_saved: Option<bool>) -> &'a mut Self {
87119        self.is_saved = is_saved;
87120        self
87121    }
87122    #[allow(rustdoc::invalid_html_tags)]
87123    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
87124    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87125    fn get_can_be_upgraded<'a>(&'a self) -> Option<bool> {
87126        self.can_be_upgraded.as_ref().map(|v| *v)
87127    }
87128    #[allow(rustdoc::invalid_html_tags)]
87129    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
87130    #[allow(clippy::needless_lifetimes)]
87131    fn set_can_be_upgraded<'a>(&'a mut self, can_be_upgraded: Option<bool>) -> &'a mut Self {
87132        self.can_be_upgraded = can_be_upgraded;
87133        self
87134    }
87135    #[allow(rustdoc::invalid_html_tags)]
87136    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
87137    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87138    fn get_was_refunded<'a>(&'a self) -> Option<bool> {
87139        self.was_refunded.as_ref().map(|v| *v)
87140    }
87141    #[allow(rustdoc::invalid_html_tags)]
87142    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
87143    #[allow(clippy::needless_lifetimes)]
87144    fn set_was_refunded<'a>(&'a mut self, was_refunded: Option<bool>) -> &'a mut Self {
87145        self.was_refunded = was_refunded;
87146        self
87147    }
87148    #[allow(rustdoc::invalid_html_tags)]
87149    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
87150    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87151    fn get_convert_star_count<'a>(&'a self) -> Option<i64> {
87152        self.convert_star_count.as_ref().map(|v| *v)
87153    }
87154    #[allow(rustdoc::invalid_html_tags)]
87155    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
87156    #[allow(clippy::needless_lifetimes)]
87157    fn set_convert_star_count<'a>(&'a mut self, convert_star_count: Option<i64>) -> &'a mut Self {
87158        self.convert_star_count = convert_star_count;
87159        self
87160    }
87161    #[allow(rustdoc::invalid_html_tags)]
87162    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
87163    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87164    fn get_prepaid_upgrade_star_count<'a>(&'a self) -> Option<i64> {
87165        self.prepaid_upgrade_star_count.as_ref().map(|v| *v)
87166    }
87167    #[allow(rustdoc::invalid_html_tags)]
87168    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
87169    #[allow(clippy::needless_lifetimes)]
87170    fn set_prepaid_upgrade_star_count<'a>(
87171        &'a mut self,
87172        prepaid_upgrade_star_count: Option<i64>,
87173    ) -> &'a mut Self {
87174        self.prepaid_upgrade_star_count = prepaid_upgrade_star_count;
87175        self
87176    }
87177}
87178impl TraitOwnedGiftUnique for OwnedGiftUnique {
87179    #[allow(rustdoc::invalid_html_tags)]
87180    #[doc = "Type of the gift, always \"unique\""]
87181    #[allow(clippy::needless_lifetimes)]
87182    fn get_tg_type<'a>(&'a self) -> &'a str {
87183        self.tg_type.as_str()
87184    }
87185    #[allow(rustdoc::invalid_html_tags)]
87186    #[doc = "Type of the gift, always \"unique\""]
87187    #[allow(clippy::needless_lifetimes)]
87188    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
87189        self.tg_type = tg_type;
87190        self
87191    }
87192    #[allow(rustdoc::invalid_html_tags)]
87193    #[doc = "Information about the unique gift"]
87194    #[allow(clippy::needless_lifetimes)]
87195    fn get_gift<'a>(&'a self) -> &'a UniqueGift {
87196        &self.gift
87197    }
87198    #[allow(rustdoc::invalid_html_tags)]
87199    #[doc = "Information about the unique gift"]
87200    #[allow(clippy::needless_lifetimes)]
87201    fn set_gift<'a>(&'a mut self, gift: UniqueGift) -> &'a mut Self {
87202        self.gift = BoxWrapper(Unbox(gift));
87203        self
87204    }
87205    #[allow(rustdoc::invalid_html_tags)]
87206    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
87207    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87208    fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str> {
87209        self.owned_gift_id.as_ref().map(|v| v.as_str())
87210    }
87211    #[allow(rustdoc::invalid_html_tags)]
87212    #[doc = "Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only"]
87213    #[allow(clippy::needless_lifetimes)]
87214    fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self {
87215        self.owned_gift_id = owned_gift_id;
87216        self
87217    }
87218    #[allow(rustdoc::invalid_html_tags)]
87219    #[doc = "Optional. Sender of the gift if it is a known user"]
87220    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87221    fn get_sender_user<'a>(&'a self) -> Option<&'a User> {
87222        self.sender_user.as_ref().map(|v| v.inner_ref())
87223    }
87224    #[allow(rustdoc::invalid_html_tags)]
87225    #[doc = "Optional. Sender of the gift if it is a known user"]
87226    #[allow(clippy::needless_lifetimes)]
87227    fn set_sender_user<'a>(&'a mut self, sender_user: Option<User>) -> &'a mut Self {
87228        self.sender_user = sender_user.map(|sender_user| BoxWrapper(Unbox(sender_user)));
87229        self
87230    }
87231    #[allow(rustdoc::invalid_html_tags)]
87232    #[doc = "Date the gift was sent in Unix time"]
87233    #[allow(clippy::needless_lifetimes)]
87234    fn get_send_date<'a>(&'a self) -> i64 {
87235        self.send_date
87236    }
87237    #[allow(rustdoc::invalid_html_tags)]
87238    #[doc = "Date the gift was sent in Unix time"]
87239    #[allow(clippy::needless_lifetimes)]
87240    fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self {
87241        self.send_date = send_date;
87242        self
87243    }
87244    #[allow(rustdoc::invalid_html_tags)]
87245    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
87246    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87247    fn get_is_saved<'a>(&'a self) -> Option<bool> {
87248        self.is_saved.as_ref().map(|v| *v)
87249    }
87250    #[allow(rustdoc::invalid_html_tags)]
87251    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
87252    #[allow(clippy::needless_lifetimes)]
87253    fn set_is_saved<'a>(&'a mut self, is_saved: Option<bool>) -> &'a mut Self {
87254        self.is_saved = is_saved;
87255        self
87256    }
87257    #[allow(rustdoc::invalid_html_tags)]
87258    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
87259    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87260    fn get_can_be_transferred<'a>(&'a self) -> Option<bool> {
87261        self.can_be_transferred.as_ref().map(|v| *v)
87262    }
87263    #[allow(rustdoc::invalid_html_tags)]
87264    #[doc = "Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only"]
87265    #[allow(clippy::needless_lifetimes)]
87266    fn set_can_be_transferred<'a>(&'a mut self, can_be_transferred: Option<bool>) -> &'a mut Self {
87267        self.can_be_transferred = can_be_transferred;
87268        self
87269    }
87270    #[allow(rustdoc::invalid_html_tags)]
87271    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
87272    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87273    fn get_transfer_star_count<'a>(&'a self) -> Option<i64> {
87274        self.transfer_star_count.as_ref().map(|v| *v)
87275    }
87276    #[allow(rustdoc::invalid_html_tags)]
87277    #[doc = "Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift"]
87278    #[allow(clippy::needless_lifetimes)]
87279    fn set_transfer_star_count<'a>(&'a mut self, transfer_star_count: Option<i64>) -> &'a mut Self {
87280        self.transfer_star_count = transfer_star_count;
87281        self
87282    }
87283    #[allow(rustdoc::invalid_html_tags)]
87284    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
87285    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87286    fn get_next_transfer_date<'a>(&'a self) -> Option<i64> {
87287        self.next_transfer_date.as_ref().map(|v| *v)
87288    }
87289    #[allow(rustdoc::invalid_html_tags)]
87290    #[doc = "Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now"]
87291    #[allow(clippy::needless_lifetimes)]
87292    fn set_next_transfer_date<'a>(&'a mut self, next_transfer_date: Option<i64>) -> &'a mut Self {
87293        self.next_transfer_date = next_transfer_date;
87294        self
87295    }
87296}
87297#[allow(dead_code)]
87298impl BotShortDescription {
87299    #[allow(clippy::too_many_arguments)]
87300    pub fn new(short_description: String) -> Self {
87301        Self { short_description }
87302    }
87303    #[allow(rustdoc::invalid_html_tags)]
87304    #[doc = "The bot's short description"]
87305    #[allow(clippy::needless_lifetimes)]
87306    pub fn get_short_description<'a>(&'a self) -> &'a str {
87307        self.short_description.as_str()
87308    }
87309    #[allow(rustdoc::invalid_html_tags)]
87310    #[doc = "The bot's short description"]
87311    #[allow(clippy::needless_lifetimes)]
87312    pub fn set_short_description<'a>(&'a mut self, short_description: String) -> &'a mut Self {
87313        self.short_description = short_description;
87314        self
87315    }
87316    #[allow(rustdoc::invalid_html_tags)]
87317    #[doc = "The bot's short description"]
87318    fn rhai_get_short_description(&mut self) -> String {
87319        self.short_description.clone()
87320    }
87321}
87322#[allow(dead_code)]
87323impl ChatFullInfo {
87324    #[allow(clippy::too_many_arguments)]
87325    pub fn new<A: Into<AcceptedGiftTypes>>(
87326        id: i64,
87327        accent_color_id: i64,
87328        max_reaction_count: i64,
87329        accepted_gift_types: A,
87330    ) -> Self {
87331        Self {
87332            tg_type: "ChatFullInfo".to_owned(),
87333            id,
87334            accent_color_id,
87335            max_reaction_count,
87336            accepted_gift_types: BoxWrapper::new_unbox(accepted_gift_types.into()),
87337            title: None,
87338            username: None,
87339            first_name: None,
87340            last_name: None,
87341            is_forum: None,
87342            is_direct_messages: None,
87343            photo: None,
87344            active_usernames: None,
87345            birthdate: None,
87346            business_intro: None,
87347            business_location: None,
87348            business_opening_hours: None,
87349            personal_chat: None,
87350            parent_chat: None,
87351            available_reactions: None,
87352            background_custom_emoji_id: None,
87353            profile_accent_color_id: None,
87354            profile_background_custom_emoji_id: None,
87355            emoji_status_custom_emoji_id: None,
87356            emoji_status_expiration_date: None,
87357            bio: None,
87358            has_private_forwards: None,
87359            has_restricted_voice_and_video_messages: None,
87360            join_to_send_messages: None,
87361            join_by_request: None,
87362            description: None,
87363            invite_link: None,
87364            pinned_message: None,
87365            permissions: None,
87366            can_send_paid_media: None,
87367            slow_mode_delay: None,
87368            unrestrict_boost_count: None,
87369            message_auto_delete_time: None,
87370            has_aggressive_anti_spam_enabled: None,
87371            has_hidden_members: None,
87372            has_protected_content: None,
87373            has_visible_history: None,
87374            sticker_set_name: None,
87375            can_set_sticker_set: None,
87376            custom_emoji_sticker_set_name: None,
87377            linked_chat_id: None,
87378            location: None,
87379        }
87380    }
87381    #[allow(rustdoc::invalid_html_tags)]
87382    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
87383    #[allow(clippy::needless_lifetimes)]
87384    pub fn get_id<'a>(&'a self) -> i64 {
87385        self.id
87386    }
87387    #[allow(rustdoc::invalid_html_tags)]
87388    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
87389    #[allow(clippy::needless_lifetimes)]
87390    pub fn set_id<'a>(&'a mut self, id: i64) -> &'a mut Self {
87391        self.id = id;
87392        self
87393    }
87394    #[allow(rustdoc::invalid_html_tags)]
87395    #[doc = "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
87396    fn rhai_get_id(&mut self) -> i64 {
87397        self.id
87398    }
87399    #[allow(rustdoc::invalid_html_tags)]
87400    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
87401    #[allow(clippy::needless_lifetimes)]
87402    pub fn get_tg_type<'a>(&'a self) -> &'a str {
87403        self.tg_type.as_str()
87404    }
87405    #[allow(rustdoc::invalid_html_tags)]
87406    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
87407    #[allow(clippy::needless_lifetimes)]
87408    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
87409        self.tg_type = tg_type;
87410        self
87411    }
87412    #[allow(rustdoc::invalid_html_tags)]
87413    #[doc = "Type of the chat, can be either \"private\", \"group\", \"supergroup\" or \"channel\""]
87414    fn rhai_get_tg_type(&mut self) -> String {
87415        self.tg_type.clone()
87416    }
87417    #[allow(rustdoc::invalid_html_tags)]
87418    #[doc = "Optional. Title, for supergroups, channels and group chats"]
87419    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87420    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
87421        self.title.as_ref().map(|v| v.as_str())
87422    }
87423    #[allow(rustdoc::invalid_html_tags)]
87424    #[doc = "Optional. Title, for supergroups, channels and group chats"]
87425    #[allow(clippy::needless_lifetimes)]
87426    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
87427        self.title = title;
87428        self
87429    }
87430    #[allow(rustdoc::invalid_html_tags)]
87431    #[doc = "Optional. Title, for supergroups, channels and group chats"]
87432    fn rhai_get_title(&mut self) -> Option<String> {
87433        self.title.as_ref().cloned()
87434    }
87435    #[allow(rustdoc::invalid_html_tags)]
87436    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
87437    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87438    pub fn get_username<'a>(&'a self) -> Option<&'a str> {
87439        self.username.as_ref().map(|v| v.as_str())
87440    }
87441    #[allow(rustdoc::invalid_html_tags)]
87442    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
87443    #[allow(clippy::needless_lifetimes)]
87444    pub fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self {
87445        self.username = username;
87446        self
87447    }
87448    #[allow(rustdoc::invalid_html_tags)]
87449    #[doc = "Optional. Username, for private chats, supergroups and channels if available"]
87450    fn rhai_get_username(&mut self) -> Option<String> {
87451        self.username.as_ref().cloned()
87452    }
87453    #[allow(rustdoc::invalid_html_tags)]
87454    #[doc = "Optional. First name of the other party in a private chat"]
87455    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87456    pub fn get_first_name<'a>(&'a self) -> Option<&'a str> {
87457        self.first_name.as_ref().map(|v| v.as_str())
87458    }
87459    #[allow(rustdoc::invalid_html_tags)]
87460    #[doc = "Optional. First name of the other party in a private chat"]
87461    #[allow(clippy::needless_lifetimes)]
87462    pub fn set_first_name<'a>(&'a mut self, first_name: Option<String>) -> &'a mut Self {
87463        self.first_name = first_name;
87464        self
87465    }
87466    #[allow(rustdoc::invalid_html_tags)]
87467    #[doc = "Optional. First name of the other party in a private chat"]
87468    fn rhai_get_first_name(&mut self) -> Option<String> {
87469        self.first_name.as_ref().cloned()
87470    }
87471    #[allow(rustdoc::invalid_html_tags)]
87472    #[doc = "Optional. Last name of the other party in a private chat"]
87473    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87474    pub fn get_last_name<'a>(&'a self) -> Option<&'a str> {
87475        self.last_name.as_ref().map(|v| v.as_str())
87476    }
87477    #[allow(rustdoc::invalid_html_tags)]
87478    #[doc = "Optional. Last name of the other party in a private chat"]
87479    #[allow(clippy::needless_lifetimes)]
87480    pub fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
87481        self.last_name = last_name;
87482        self
87483    }
87484    #[allow(rustdoc::invalid_html_tags)]
87485    #[doc = "Optional. Last name of the other party in a private chat"]
87486    fn rhai_get_last_name(&mut self) -> Option<String> {
87487        self.last_name.as_ref().cloned()
87488    }
87489    #[allow(rustdoc::invalid_html_tags)]
87490    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
87491    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87492    pub fn get_is_forum<'a>(&'a self) -> Option<bool> {
87493        self.is_forum.as_ref().map(|v| *v)
87494    }
87495    #[allow(rustdoc::invalid_html_tags)]
87496    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
87497    #[allow(clippy::needless_lifetimes)]
87498    pub fn set_is_forum<'a>(&'a mut self, is_forum: Option<bool>) -> &'a mut Self {
87499        self.is_forum = is_forum;
87500        self
87501    }
87502    #[allow(rustdoc::invalid_html_tags)]
87503    #[doc = "Optional. True, if the supergroup chat is a forum (has topics enabled)"]
87504    fn rhai_get_is_forum(&mut self) -> Option<bool> {
87505        self.is_forum.as_ref().copied()
87506    }
87507    #[allow(rustdoc::invalid_html_tags)]
87508    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
87509    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87510    pub fn get_is_direct_messages<'a>(&'a self) -> Option<bool> {
87511        self.is_direct_messages.as_ref().map(|v| *v)
87512    }
87513    #[allow(rustdoc::invalid_html_tags)]
87514    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
87515    #[allow(clippy::needless_lifetimes)]
87516    pub fn set_is_direct_messages<'a>(
87517        &'a mut self,
87518        is_direct_messages: Option<bool>,
87519    ) -> &'a mut Self {
87520        self.is_direct_messages = is_direct_messages;
87521        self
87522    }
87523    #[allow(rustdoc::invalid_html_tags)]
87524    #[doc = "Optional. True, if the chat is the direct messages chat of a channel"]
87525    fn rhai_get_is_direct_messages(&mut self) -> Option<bool> {
87526        self.is_direct_messages.as_ref().copied()
87527    }
87528    #[allow(rustdoc::invalid_html_tags)]
87529    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
87530    #[allow(clippy::needless_lifetimes)]
87531    pub fn get_accent_color_id<'a>(&'a self) -> i64 {
87532        self.accent_color_id
87533    }
87534    #[allow(rustdoc::invalid_html_tags)]
87535    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
87536    #[allow(clippy::needless_lifetimes)]
87537    pub fn set_accent_color_id<'a>(&'a mut self, accent_color_id: i64) -> &'a mut Self {
87538        self.accent_color_id = accent_color_id;
87539        self
87540    }
87541    #[allow(rustdoc::invalid_html_tags)]
87542    #[doc = "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details."]
87543    fn rhai_get_accent_color_id(&mut self) -> i64 {
87544        self.accent_color_id
87545    }
87546    #[allow(rustdoc::invalid_html_tags)]
87547    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
87548    #[allow(clippy::needless_lifetimes)]
87549    pub fn get_max_reaction_count<'a>(&'a self) -> i64 {
87550        self.max_reaction_count
87551    }
87552    #[allow(rustdoc::invalid_html_tags)]
87553    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
87554    #[allow(clippy::needless_lifetimes)]
87555    pub fn set_max_reaction_count<'a>(&'a mut self, max_reaction_count: i64) -> &'a mut Self {
87556        self.max_reaction_count = max_reaction_count;
87557        self
87558    }
87559    #[allow(rustdoc::invalid_html_tags)]
87560    #[doc = "The maximum number of reactions that can be set on a message in the chat"]
87561    fn rhai_get_max_reaction_count(&mut self) -> i64 {
87562        self.max_reaction_count
87563    }
87564    #[allow(rustdoc::invalid_html_tags)]
87565    #[doc = "Optional. Chat photo"]
87566    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87567    pub fn get_photo<'a>(&'a self) -> Option<&'a ChatPhoto> {
87568        self.photo.as_ref().map(|v| v.inner_ref())
87569    }
87570    #[allow(rustdoc::invalid_html_tags)]
87571    #[doc = "Optional. Chat photo"]
87572    #[allow(clippy::needless_lifetimes)]
87573    pub fn set_photo<'a>(&'a mut self, photo: Option<ChatPhoto>) -> &'a mut Self {
87574        self.photo = photo.map(|photo| BoxWrapper(Unbox(photo)));
87575        self
87576    }
87577    #[allow(rustdoc::invalid_html_tags)]
87578    #[doc = "Optional. Chat photo"]
87579    fn rhai_get_photo(&mut self) -> Option<ChatPhoto> {
87580        self.photo.as_ref().map(|v| v.clone().into())
87581    }
87582    #[allow(rustdoc::invalid_html_tags)]
87583    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
87584    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87585    pub fn get_active_usernames<'a>(&'a self) -> Option<&'a Vec<String>> {
87586        self.active_usernames.as_ref()
87587    }
87588    #[allow(rustdoc::invalid_html_tags)]
87589    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
87590    #[allow(clippy::needless_lifetimes)]
87591    pub fn set_active_usernames<'a>(
87592        &'a mut self,
87593        active_usernames: Option<Vec<String>>,
87594    ) -> &'a mut Self {
87595        self.active_usernames = active_usernames;
87596        self
87597    }
87598    #[allow(rustdoc::invalid_html_tags)]
87599    #[doc = "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels"]
87600    fn rhai_get_active_usernames(&mut self) -> Option<Vec<String>> {
87601        self.active_usernames.as_ref().cloned()
87602    }
87603    #[allow(rustdoc::invalid_html_tags)]
87604    #[doc = "Optional. For private chats, the date of birth of the user"]
87605    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87606    pub fn get_birthdate<'a>(&'a self) -> Option<&'a Birthdate> {
87607        self.birthdate.as_ref().map(|v| v.inner_ref())
87608    }
87609    #[allow(rustdoc::invalid_html_tags)]
87610    #[doc = "Optional. For private chats, the date of birth of the user"]
87611    #[allow(clippy::needless_lifetimes)]
87612    pub fn set_birthdate<'a>(&'a mut self, birthdate: Option<Birthdate>) -> &'a mut Self {
87613        self.birthdate = birthdate.map(|birthdate| BoxWrapper(Unbox(birthdate)));
87614        self
87615    }
87616    #[allow(rustdoc::invalid_html_tags)]
87617    #[doc = "Optional. For private chats, the date of birth of the user"]
87618    fn rhai_get_birthdate(&mut self) -> Option<Birthdate> {
87619        self.birthdate.as_ref().map(|v| v.clone().into())
87620    }
87621    #[allow(rustdoc::invalid_html_tags)]
87622    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
87623    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87624    pub fn get_business_intro<'a>(&'a self) -> Option<&'a BusinessIntro> {
87625        self.business_intro.as_ref().map(|v| v.inner_ref())
87626    }
87627    #[allow(rustdoc::invalid_html_tags)]
87628    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
87629    #[allow(clippy::needless_lifetimes)]
87630    pub fn set_business_intro<'a>(
87631        &'a mut self,
87632        business_intro: Option<BusinessIntro>,
87633    ) -> &'a mut Self {
87634        self.business_intro =
87635            business_intro.map(|business_intro| BoxWrapper(Unbox(business_intro)));
87636        self
87637    }
87638    #[allow(rustdoc::invalid_html_tags)]
87639    #[doc = "Optional. For private chats with business accounts, the intro of the business"]
87640    fn rhai_get_business_intro(&mut self) -> Option<BusinessIntro> {
87641        self.business_intro.as_ref().map(|v| v.clone().into())
87642    }
87643    #[allow(rustdoc::invalid_html_tags)]
87644    #[doc = "Optional. For private chats with business accounts, the location of the business"]
87645    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87646    pub fn get_business_location<'a>(&'a self) -> Option<&'a BusinessLocation> {
87647        self.business_location.as_ref().map(|v| v.inner_ref())
87648    }
87649    #[allow(rustdoc::invalid_html_tags)]
87650    #[doc = "Optional. For private chats with business accounts, the location of the business"]
87651    #[allow(clippy::needless_lifetimes)]
87652    pub fn set_business_location<'a>(
87653        &'a mut self,
87654        business_location: Option<BusinessLocation>,
87655    ) -> &'a mut Self {
87656        self.business_location =
87657            business_location.map(|business_location| BoxWrapper(Unbox(business_location)));
87658        self
87659    }
87660    #[allow(rustdoc::invalid_html_tags)]
87661    #[doc = "Optional. For private chats with business accounts, the location of the business"]
87662    fn rhai_get_business_location(&mut self) -> Option<BusinessLocation> {
87663        self.business_location.as_ref().map(|v| v.clone().into())
87664    }
87665    #[allow(rustdoc::invalid_html_tags)]
87666    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
87667    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87668    pub fn get_business_opening_hours<'a>(&'a self) -> Option<&'a BusinessOpeningHours> {
87669        self.business_opening_hours.as_ref().map(|v| v.inner_ref())
87670    }
87671    #[allow(rustdoc::invalid_html_tags)]
87672    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
87673    #[allow(clippy::needless_lifetimes)]
87674    pub fn set_business_opening_hours<'a>(
87675        &'a mut self,
87676        business_opening_hours: Option<BusinessOpeningHours>,
87677    ) -> &'a mut Self {
87678        self.business_opening_hours = business_opening_hours
87679            .map(|business_opening_hours| BoxWrapper(Unbox(business_opening_hours)));
87680        self
87681    }
87682    #[allow(rustdoc::invalid_html_tags)]
87683    #[doc = "Optional. For private chats with business accounts, the opening hours of the business"]
87684    fn rhai_get_business_opening_hours(&mut self) -> Option<BusinessOpeningHours> {
87685        self.business_opening_hours
87686            .as_ref()
87687            .map(|v| v.clone().into())
87688    }
87689    #[allow(rustdoc::invalid_html_tags)]
87690    #[doc = "Optional. For private chats, the personal channel of the user"]
87691    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87692    pub fn get_personal_chat<'a>(&'a self) -> Option<&'a Chat> {
87693        self.personal_chat.as_ref().map(|v| v.inner_ref())
87694    }
87695    #[allow(rustdoc::invalid_html_tags)]
87696    #[doc = "Optional. For private chats, the personal channel of the user"]
87697    #[allow(clippy::needless_lifetimes)]
87698    pub fn set_personal_chat<'a>(&'a mut self, personal_chat: Option<Chat>) -> &'a mut Self {
87699        self.personal_chat = personal_chat.map(|personal_chat| BoxWrapper(Unbox(personal_chat)));
87700        self
87701    }
87702    #[allow(rustdoc::invalid_html_tags)]
87703    #[doc = "Optional. For private chats, the personal channel of the user"]
87704    fn rhai_get_personal_chat(&mut self) -> Option<Chat> {
87705        self.personal_chat.as_ref().map(|v| v.clone().into())
87706    }
87707    #[allow(rustdoc::invalid_html_tags)]
87708    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
87709    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87710    pub fn get_parent_chat<'a>(&'a self) -> Option<&'a Chat> {
87711        self.parent_chat.as_ref().map(|v| v.inner_ref())
87712    }
87713    #[allow(rustdoc::invalid_html_tags)]
87714    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
87715    #[allow(clippy::needless_lifetimes)]
87716    pub fn set_parent_chat<'a>(&'a mut self, parent_chat: Option<Chat>) -> &'a mut Self {
87717        self.parent_chat = parent_chat.map(|parent_chat| BoxWrapper(Unbox(parent_chat)));
87718        self
87719    }
87720    #[allow(rustdoc::invalid_html_tags)]
87721    #[doc = "Optional. Information about the corresponding channel chat; for direct messages chats only"]
87722    fn rhai_get_parent_chat(&mut self) -> Option<Chat> {
87723        self.parent_chat.as_ref().map(|v| v.clone().into())
87724    }
87725    #[allow(rustdoc::invalid_html_tags)]
87726    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
87727    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87728    pub fn get_available_reactions<'a>(&'a self) -> Option<&'a Vec<ReactionType>> {
87729        self.available_reactions.as_ref()
87730    }
87731    #[allow(rustdoc::invalid_html_tags)]
87732    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
87733    #[allow(clippy::needless_lifetimes)]
87734    pub fn set_available_reactions<'a>(
87735        &'a mut self,
87736        available_reactions: Option<Vec<ReactionType>>,
87737    ) -> &'a mut Self {
87738        self.available_reactions = available_reactions;
87739        self
87740    }
87741    #[allow(rustdoc::invalid_html_tags)]
87742    #[doc = "Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed."]
87743    fn rhai_get_available_reactions(&mut self) -> Option<Vec<ReactionType>> {
87744        self.available_reactions.as_ref().cloned()
87745    }
87746    #[allow(rustdoc::invalid_html_tags)]
87747    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
87748    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87749    pub fn get_background_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
87750        self.background_custom_emoji_id.as_ref().map(|v| v.as_str())
87751    }
87752    #[allow(rustdoc::invalid_html_tags)]
87753    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
87754    #[allow(clippy::needless_lifetimes)]
87755    pub fn set_background_custom_emoji_id<'a>(
87756        &'a mut self,
87757        background_custom_emoji_id: Option<String>,
87758    ) -> &'a mut Self {
87759        self.background_custom_emoji_id = background_custom_emoji_id;
87760        self
87761    }
87762    #[allow(rustdoc::invalid_html_tags)]
87763    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background"]
87764    fn rhai_get_background_custom_emoji_id(&mut self) -> Option<String> {
87765        self.background_custom_emoji_id.as_ref().cloned()
87766    }
87767    #[allow(rustdoc::invalid_html_tags)]
87768    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
87769    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87770    pub fn get_profile_accent_color_id<'a>(&'a self) -> Option<i64> {
87771        self.profile_accent_color_id.as_ref().map(|v| *v)
87772    }
87773    #[allow(rustdoc::invalid_html_tags)]
87774    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
87775    #[allow(clippy::needless_lifetimes)]
87776    pub fn set_profile_accent_color_id<'a>(
87777        &'a mut self,
87778        profile_accent_color_id: Option<i64>,
87779    ) -> &'a mut Self {
87780        self.profile_accent_color_id = profile_accent_color_id;
87781        self
87782    }
87783    #[allow(rustdoc::invalid_html_tags)]
87784    #[doc = "Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details."]
87785    fn rhai_get_profile_accent_color_id(&mut self) -> Option<i64> {
87786        self.profile_accent_color_id.as_ref().copied()
87787    }
87788    #[allow(rustdoc::invalid_html_tags)]
87789    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
87790    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87791    pub fn get_profile_background_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
87792        self.profile_background_custom_emoji_id
87793            .as_ref()
87794            .map(|v| v.as_str())
87795    }
87796    #[allow(rustdoc::invalid_html_tags)]
87797    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
87798    #[allow(clippy::needless_lifetimes)]
87799    pub fn set_profile_background_custom_emoji_id<'a>(
87800        &'a mut self,
87801        profile_background_custom_emoji_id: Option<String>,
87802    ) -> &'a mut Self {
87803        self.profile_background_custom_emoji_id = profile_background_custom_emoji_id;
87804        self
87805    }
87806    #[allow(rustdoc::invalid_html_tags)]
87807    #[doc = "Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background"]
87808    fn rhai_get_profile_background_custom_emoji_id(&mut self) -> Option<String> {
87809        self.profile_background_custom_emoji_id.as_ref().cloned()
87810    }
87811    #[allow(rustdoc::invalid_html_tags)]
87812    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
87813    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87814    pub fn get_emoji_status_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
87815        self.emoji_status_custom_emoji_id
87816            .as_ref()
87817            .map(|v| v.as_str())
87818    }
87819    #[allow(rustdoc::invalid_html_tags)]
87820    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
87821    #[allow(clippy::needless_lifetimes)]
87822    pub fn set_emoji_status_custom_emoji_id<'a>(
87823        &'a mut self,
87824        emoji_status_custom_emoji_id: Option<String>,
87825    ) -> &'a mut Self {
87826        self.emoji_status_custom_emoji_id = emoji_status_custom_emoji_id;
87827        self
87828    }
87829    #[allow(rustdoc::invalid_html_tags)]
87830    #[doc = "Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat"]
87831    fn rhai_get_emoji_status_custom_emoji_id(&mut self) -> Option<String> {
87832        self.emoji_status_custom_emoji_id.as_ref().cloned()
87833    }
87834    #[allow(rustdoc::invalid_html_tags)]
87835    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
87836    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87837    pub fn get_emoji_status_expiration_date<'a>(&'a self) -> Option<i64> {
87838        self.emoji_status_expiration_date.as_ref().map(|v| *v)
87839    }
87840    #[allow(rustdoc::invalid_html_tags)]
87841    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
87842    #[allow(clippy::needless_lifetimes)]
87843    pub fn set_emoji_status_expiration_date<'a>(
87844        &'a mut self,
87845        emoji_status_expiration_date: Option<i64>,
87846    ) -> &'a mut Self {
87847        self.emoji_status_expiration_date = emoji_status_expiration_date;
87848        self
87849    }
87850    #[allow(rustdoc::invalid_html_tags)]
87851    #[doc = "Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any"]
87852    fn rhai_get_emoji_status_expiration_date(&mut self) -> Option<i64> {
87853        self.emoji_status_expiration_date.as_ref().copied()
87854    }
87855    #[allow(rustdoc::invalid_html_tags)]
87856    #[doc = "Optional. Bio of the other party in a private chat"]
87857    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87858    pub fn get_bio<'a>(&'a self) -> Option<&'a str> {
87859        self.bio.as_ref().map(|v| v.as_str())
87860    }
87861    #[allow(rustdoc::invalid_html_tags)]
87862    #[doc = "Optional. Bio of the other party in a private chat"]
87863    #[allow(clippy::needless_lifetimes)]
87864    pub fn set_bio<'a>(&'a mut self, bio: Option<String>) -> &'a mut Self {
87865        self.bio = bio;
87866        self
87867    }
87868    #[allow(rustdoc::invalid_html_tags)]
87869    #[doc = "Optional. Bio of the other party in a private chat"]
87870    fn rhai_get_bio(&mut self) -> Option<String> {
87871        self.bio.as_ref().cloned()
87872    }
87873    #[allow(rustdoc::invalid_html_tags)]
87874    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
87875    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87876    pub fn get_has_private_forwards<'a>(&'a self) -> Option<bool> {
87877        self.has_private_forwards.as_ref().map(|v| *v)
87878    }
87879    #[allow(rustdoc::invalid_html_tags)]
87880    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
87881    #[allow(clippy::needless_lifetimes)]
87882    pub fn set_has_private_forwards<'a>(
87883        &'a mut self,
87884        has_private_forwards: Option<bool>,
87885    ) -> &'a mut Self {
87886        self.has_private_forwards = has_private_forwards;
87887        self
87888    }
87889    #[allow(rustdoc::invalid_html_tags)]
87890    #[doc = "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user"]
87891    fn rhai_get_has_private_forwards(&mut self) -> Option<bool> {
87892        self.has_private_forwards.as_ref().copied()
87893    }
87894    #[allow(rustdoc::invalid_html_tags)]
87895    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
87896    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87897    pub fn get_has_restricted_voice_and_video_messages<'a>(&'a self) -> Option<bool> {
87898        self.has_restricted_voice_and_video_messages
87899            .as_ref()
87900            .map(|v| *v)
87901    }
87902    #[allow(rustdoc::invalid_html_tags)]
87903    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
87904    #[allow(clippy::needless_lifetimes)]
87905    pub fn set_has_restricted_voice_and_video_messages<'a>(
87906        &'a mut self,
87907        has_restricted_voice_and_video_messages: Option<bool>,
87908    ) -> &'a mut Self {
87909        self.has_restricted_voice_and_video_messages = has_restricted_voice_and_video_messages;
87910        self
87911    }
87912    #[allow(rustdoc::invalid_html_tags)]
87913    #[doc = "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat"]
87914    fn rhai_get_has_restricted_voice_and_video_messages(&mut self) -> Option<bool> {
87915        self.has_restricted_voice_and_video_messages
87916            .as_ref()
87917            .copied()
87918    }
87919    #[allow(rustdoc::invalid_html_tags)]
87920    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
87921    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87922    pub fn get_join_to_send_messages<'a>(&'a self) -> Option<bool> {
87923        self.join_to_send_messages.as_ref().map(|v| *v)
87924    }
87925    #[allow(rustdoc::invalid_html_tags)]
87926    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
87927    #[allow(clippy::needless_lifetimes)]
87928    pub fn set_join_to_send_messages<'a>(
87929        &'a mut self,
87930        join_to_send_messages: Option<bool>,
87931    ) -> &'a mut Self {
87932        self.join_to_send_messages = join_to_send_messages;
87933        self
87934    }
87935    #[allow(rustdoc::invalid_html_tags)]
87936    #[doc = "Optional. True, if users need to join the supergroup before they can send messages"]
87937    fn rhai_get_join_to_send_messages(&mut self) -> Option<bool> {
87938        self.join_to_send_messages.as_ref().copied()
87939    }
87940    #[allow(rustdoc::invalid_html_tags)]
87941    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
87942    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87943    pub fn get_join_by_request<'a>(&'a self) -> Option<bool> {
87944        self.join_by_request.as_ref().map(|v| *v)
87945    }
87946    #[allow(rustdoc::invalid_html_tags)]
87947    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
87948    #[allow(clippy::needless_lifetimes)]
87949    pub fn set_join_by_request<'a>(&'a mut self, join_by_request: Option<bool>) -> &'a mut Self {
87950        self.join_by_request = join_by_request;
87951        self
87952    }
87953    #[allow(rustdoc::invalid_html_tags)]
87954    #[doc = "Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators"]
87955    fn rhai_get_join_by_request(&mut self) -> Option<bool> {
87956        self.join_by_request.as_ref().copied()
87957    }
87958    #[allow(rustdoc::invalid_html_tags)]
87959    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
87960    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87961    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
87962        self.description.as_ref().map(|v| v.as_str())
87963    }
87964    #[allow(rustdoc::invalid_html_tags)]
87965    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
87966    #[allow(clippy::needless_lifetimes)]
87967    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
87968        self.description = description;
87969        self
87970    }
87971    #[allow(rustdoc::invalid_html_tags)]
87972    #[doc = "Optional. Description, for groups, supergroups and channel chats"]
87973    fn rhai_get_description(&mut self) -> Option<String> {
87974        self.description.as_ref().cloned()
87975    }
87976    #[allow(rustdoc::invalid_html_tags)]
87977    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
87978    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87979    pub fn get_invite_link<'a>(&'a self) -> Option<&'a str> {
87980        self.invite_link.as_ref().map(|v| v.as_str())
87981    }
87982    #[allow(rustdoc::invalid_html_tags)]
87983    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
87984    #[allow(clippy::needless_lifetimes)]
87985    pub fn set_invite_link<'a>(&'a mut self, invite_link: Option<String>) -> &'a mut Self {
87986        self.invite_link = invite_link;
87987        self
87988    }
87989    #[allow(rustdoc::invalid_html_tags)]
87990    #[doc = "Optional. Primary invite link, for groups, supergroups and channel chats"]
87991    fn rhai_get_invite_link(&mut self) -> Option<String> {
87992        self.invite_link.as_ref().cloned()
87993    }
87994    #[allow(rustdoc::invalid_html_tags)]
87995    #[doc = "Optional. The most recent pinned message (by sending date)"]
87996    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
87997    pub fn get_pinned_message<'a>(&'a self) -> Option<&'a Message> {
87998        self.pinned_message.as_ref().map(|v| v.inner_ref())
87999    }
88000    #[allow(rustdoc::invalid_html_tags)]
88001    #[doc = "Optional. The most recent pinned message (by sending date)"]
88002    #[allow(clippy::needless_lifetimes)]
88003    pub fn set_pinned_message<'a>(&'a mut self, pinned_message: Option<Message>) -> &'a mut Self {
88004        self.pinned_message =
88005            pinned_message.map(|pinned_message| BoxWrapper(Unbox(pinned_message)));
88006        self
88007    }
88008    #[allow(rustdoc::invalid_html_tags)]
88009    #[doc = "Optional. The most recent pinned message (by sending date)"]
88010    fn rhai_get_pinned_message(&mut self) -> Option<Message> {
88011        self.pinned_message.as_ref().map(|v| v.clone().into())
88012    }
88013    #[allow(rustdoc::invalid_html_tags)]
88014    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
88015    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88016    pub fn get_permissions<'a>(&'a self) -> Option<&'a ChatPermissions> {
88017        self.permissions.as_ref().map(|v| v.inner_ref())
88018    }
88019    #[allow(rustdoc::invalid_html_tags)]
88020    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
88021    #[allow(clippy::needless_lifetimes)]
88022    pub fn set_permissions<'a>(&'a mut self, permissions: Option<ChatPermissions>) -> &'a mut Self {
88023        self.permissions = permissions.map(|permissions| BoxWrapper(Unbox(permissions)));
88024        self
88025    }
88026    #[allow(rustdoc::invalid_html_tags)]
88027    #[doc = "Optional. Default chat member permissions, for groups and supergroups"]
88028    fn rhai_get_permissions(&mut self) -> Option<ChatPermissions> {
88029        self.permissions.as_ref().map(|v| v.clone().into())
88030    }
88031    #[allow(rustdoc::invalid_html_tags)]
88032    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
88033    #[allow(clippy::needless_lifetimes)]
88034    pub fn get_accepted_gift_types<'a>(&'a self) -> &'a AcceptedGiftTypes {
88035        &self.accepted_gift_types
88036    }
88037    #[allow(rustdoc::invalid_html_tags)]
88038    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
88039    #[allow(clippy::needless_lifetimes)]
88040    pub fn set_accepted_gift_types<'a>(
88041        &'a mut self,
88042        accepted_gift_types: AcceptedGiftTypes,
88043    ) -> &'a mut Self {
88044        self.accepted_gift_types = BoxWrapper(Unbox(accepted_gift_types));
88045        self
88046    }
88047    #[allow(rustdoc::invalid_html_tags)]
88048    #[doc = "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats"]
88049    fn rhai_get_accepted_gift_types(&mut self) -> AcceptedGiftTypes {
88050        self.accepted_gift_types.clone().into()
88051    }
88052    #[allow(rustdoc::invalid_html_tags)]
88053    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
88054    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88055    pub fn get_can_send_paid_media<'a>(&'a self) -> Option<bool> {
88056        self.can_send_paid_media.as_ref().map(|v| *v)
88057    }
88058    #[allow(rustdoc::invalid_html_tags)]
88059    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
88060    #[allow(clippy::needless_lifetimes)]
88061    pub fn set_can_send_paid_media<'a>(
88062        &'a mut self,
88063        can_send_paid_media: Option<bool>,
88064    ) -> &'a mut Self {
88065        self.can_send_paid_media = can_send_paid_media;
88066        self
88067    }
88068    #[allow(rustdoc::invalid_html_tags)]
88069    #[doc = "Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."]
88070    fn rhai_get_can_send_paid_media(&mut self) -> Option<bool> {
88071        self.can_send_paid_media.as_ref().copied()
88072    }
88073    #[allow(rustdoc::invalid_html_tags)]
88074    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
88075    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88076    pub fn get_slow_mode_delay<'a>(&'a self) -> Option<i64> {
88077        self.slow_mode_delay.as_ref().map(|v| *v)
88078    }
88079    #[allow(rustdoc::invalid_html_tags)]
88080    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
88081    #[allow(clippy::needless_lifetimes)]
88082    pub fn set_slow_mode_delay<'a>(&'a mut self, slow_mode_delay: Option<i64>) -> &'a mut Self {
88083        self.slow_mode_delay = slow_mode_delay;
88084        self
88085    }
88086    #[allow(rustdoc::invalid_html_tags)]
88087    #[doc = "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds"]
88088    fn rhai_get_slow_mode_delay(&mut self) -> Option<i64> {
88089        self.slow_mode_delay.as_ref().copied()
88090    }
88091    #[allow(rustdoc::invalid_html_tags)]
88092    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
88093    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88094    pub fn get_unrestrict_boost_count<'a>(&'a self) -> Option<i64> {
88095        self.unrestrict_boost_count.as_ref().map(|v| *v)
88096    }
88097    #[allow(rustdoc::invalid_html_tags)]
88098    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
88099    #[allow(clippy::needless_lifetimes)]
88100    pub fn set_unrestrict_boost_count<'a>(
88101        &'a mut self,
88102        unrestrict_boost_count: Option<i64>,
88103    ) -> &'a mut Self {
88104        self.unrestrict_boost_count = unrestrict_boost_count;
88105        self
88106    }
88107    #[allow(rustdoc::invalid_html_tags)]
88108    #[doc = "Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions"]
88109    fn rhai_get_unrestrict_boost_count(&mut self) -> Option<i64> {
88110        self.unrestrict_boost_count.as_ref().copied()
88111    }
88112    #[allow(rustdoc::invalid_html_tags)]
88113    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
88114    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88115    pub fn get_message_auto_delete_time<'a>(&'a self) -> Option<i64> {
88116        self.message_auto_delete_time.as_ref().map(|v| *v)
88117    }
88118    #[allow(rustdoc::invalid_html_tags)]
88119    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
88120    #[allow(clippy::needless_lifetimes)]
88121    pub fn set_message_auto_delete_time<'a>(
88122        &'a mut self,
88123        message_auto_delete_time: Option<i64>,
88124    ) -> &'a mut Self {
88125        self.message_auto_delete_time = message_auto_delete_time;
88126        self
88127    }
88128    #[allow(rustdoc::invalid_html_tags)]
88129    #[doc = "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds"]
88130    fn rhai_get_message_auto_delete_time(&mut self) -> Option<i64> {
88131        self.message_auto_delete_time.as_ref().copied()
88132    }
88133    #[allow(rustdoc::invalid_html_tags)]
88134    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
88135    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88136    pub fn get_has_aggressive_anti_spam_enabled<'a>(&'a self) -> Option<bool> {
88137        self.has_aggressive_anti_spam_enabled.as_ref().map(|v| *v)
88138    }
88139    #[allow(rustdoc::invalid_html_tags)]
88140    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
88141    #[allow(clippy::needless_lifetimes)]
88142    pub fn set_has_aggressive_anti_spam_enabled<'a>(
88143        &'a mut self,
88144        has_aggressive_anti_spam_enabled: Option<bool>,
88145    ) -> &'a mut Self {
88146        self.has_aggressive_anti_spam_enabled = has_aggressive_anti_spam_enabled;
88147        self
88148    }
88149    #[allow(rustdoc::invalid_html_tags)]
88150    #[doc = "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators."]
88151    fn rhai_get_has_aggressive_anti_spam_enabled(&mut self) -> Option<bool> {
88152        self.has_aggressive_anti_spam_enabled.as_ref().copied()
88153    }
88154    #[allow(rustdoc::invalid_html_tags)]
88155    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
88156    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88157    pub fn get_has_hidden_members<'a>(&'a self) -> Option<bool> {
88158        self.has_hidden_members.as_ref().map(|v| *v)
88159    }
88160    #[allow(rustdoc::invalid_html_tags)]
88161    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
88162    #[allow(clippy::needless_lifetimes)]
88163    pub fn set_has_hidden_members<'a>(
88164        &'a mut self,
88165        has_hidden_members: Option<bool>,
88166    ) -> &'a mut Self {
88167        self.has_hidden_members = has_hidden_members;
88168        self
88169    }
88170    #[allow(rustdoc::invalid_html_tags)]
88171    #[doc = "Optional. True, if non-administrators can only get the list of bots and administrators in the chat"]
88172    fn rhai_get_has_hidden_members(&mut self) -> Option<bool> {
88173        self.has_hidden_members.as_ref().copied()
88174    }
88175    #[allow(rustdoc::invalid_html_tags)]
88176    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
88177    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88178    pub fn get_has_protected_content<'a>(&'a self) -> Option<bool> {
88179        self.has_protected_content.as_ref().map(|v| *v)
88180    }
88181    #[allow(rustdoc::invalid_html_tags)]
88182    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
88183    #[allow(clippy::needless_lifetimes)]
88184    pub fn set_has_protected_content<'a>(
88185        &'a mut self,
88186        has_protected_content: Option<bool>,
88187    ) -> &'a mut Self {
88188        self.has_protected_content = has_protected_content;
88189        self
88190    }
88191    #[allow(rustdoc::invalid_html_tags)]
88192    #[doc = "Optional. True, if messages from the chat can't be forwarded to other chats"]
88193    fn rhai_get_has_protected_content(&mut self) -> Option<bool> {
88194        self.has_protected_content.as_ref().copied()
88195    }
88196    #[allow(rustdoc::invalid_html_tags)]
88197    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
88198    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88199    pub fn get_has_visible_history<'a>(&'a self) -> Option<bool> {
88200        self.has_visible_history.as_ref().map(|v| *v)
88201    }
88202    #[allow(rustdoc::invalid_html_tags)]
88203    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
88204    #[allow(clippy::needless_lifetimes)]
88205    pub fn set_has_visible_history<'a>(
88206        &'a mut self,
88207        has_visible_history: Option<bool>,
88208    ) -> &'a mut Self {
88209        self.has_visible_history = has_visible_history;
88210        self
88211    }
88212    #[allow(rustdoc::invalid_html_tags)]
88213    #[doc = "Optional. True, if new chat members will have access to old messages; available only to chat administrators"]
88214    fn rhai_get_has_visible_history(&mut self) -> Option<bool> {
88215        self.has_visible_history.as_ref().copied()
88216    }
88217    #[allow(rustdoc::invalid_html_tags)]
88218    #[doc = "Optional. For supergroups, name of the group sticker set"]
88219    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88220    pub fn get_sticker_set_name<'a>(&'a self) -> Option<&'a str> {
88221        self.sticker_set_name.as_ref().map(|v| v.as_str())
88222    }
88223    #[allow(rustdoc::invalid_html_tags)]
88224    #[doc = "Optional. For supergroups, name of the group sticker set"]
88225    #[allow(clippy::needless_lifetimes)]
88226    pub fn set_sticker_set_name<'a>(
88227        &'a mut self,
88228        sticker_set_name: Option<String>,
88229    ) -> &'a mut Self {
88230        self.sticker_set_name = sticker_set_name;
88231        self
88232    }
88233    #[allow(rustdoc::invalid_html_tags)]
88234    #[doc = "Optional. For supergroups, name of the group sticker set"]
88235    fn rhai_get_sticker_set_name(&mut self) -> Option<String> {
88236        self.sticker_set_name.as_ref().cloned()
88237    }
88238    #[allow(rustdoc::invalid_html_tags)]
88239    #[doc = "Optional. True, if the bot can change the group sticker set"]
88240    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88241    pub fn get_can_set_sticker_set<'a>(&'a self) -> Option<bool> {
88242        self.can_set_sticker_set.as_ref().map(|v| *v)
88243    }
88244    #[allow(rustdoc::invalid_html_tags)]
88245    #[doc = "Optional. True, if the bot can change the group sticker set"]
88246    #[allow(clippy::needless_lifetimes)]
88247    pub fn set_can_set_sticker_set<'a>(
88248        &'a mut self,
88249        can_set_sticker_set: Option<bool>,
88250    ) -> &'a mut Self {
88251        self.can_set_sticker_set = can_set_sticker_set;
88252        self
88253    }
88254    #[allow(rustdoc::invalid_html_tags)]
88255    #[doc = "Optional. True, if the bot can change the group sticker set"]
88256    fn rhai_get_can_set_sticker_set(&mut self) -> Option<bool> {
88257        self.can_set_sticker_set.as_ref().copied()
88258    }
88259    #[allow(rustdoc::invalid_html_tags)]
88260    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
88261    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88262    pub fn get_custom_emoji_sticker_set_name<'a>(&'a self) -> Option<&'a str> {
88263        self.custom_emoji_sticker_set_name
88264            .as_ref()
88265            .map(|v| v.as_str())
88266    }
88267    #[allow(rustdoc::invalid_html_tags)]
88268    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
88269    #[allow(clippy::needless_lifetimes)]
88270    pub fn set_custom_emoji_sticker_set_name<'a>(
88271        &'a mut self,
88272        custom_emoji_sticker_set_name: Option<String>,
88273    ) -> &'a mut Self {
88274        self.custom_emoji_sticker_set_name = custom_emoji_sticker_set_name;
88275        self
88276    }
88277    #[allow(rustdoc::invalid_html_tags)]
88278    #[doc = "Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group."]
88279    fn rhai_get_custom_emoji_sticker_set_name(&mut self) -> Option<String> {
88280        self.custom_emoji_sticker_set_name.as_ref().cloned()
88281    }
88282    #[allow(rustdoc::invalid_html_tags)]
88283    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
88284    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88285    pub fn get_linked_chat_id<'a>(&'a self) -> Option<i64> {
88286        self.linked_chat_id.as_ref().map(|v| *v)
88287    }
88288    #[allow(rustdoc::invalid_html_tags)]
88289    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
88290    #[allow(clippy::needless_lifetimes)]
88291    pub fn set_linked_chat_id<'a>(&'a mut self, linked_chat_id: Option<i64>) -> &'a mut Self {
88292        self.linked_chat_id = linked_chat_id;
88293        self
88294    }
88295    #[allow(rustdoc::invalid_html_tags)]
88296    #[doc = "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier."]
88297    fn rhai_get_linked_chat_id(&mut self) -> Option<i64> {
88298        self.linked_chat_id.as_ref().copied()
88299    }
88300    #[allow(rustdoc::invalid_html_tags)]
88301    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
88302    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88303    pub fn get_location<'a>(&'a self) -> Option<&'a ChatLocation> {
88304        self.location.as_ref().map(|v| v.inner_ref())
88305    }
88306    #[allow(rustdoc::invalid_html_tags)]
88307    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
88308    #[allow(clippy::needless_lifetimes)]
88309    pub fn set_location<'a>(&'a mut self, location: Option<ChatLocation>) -> &'a mut Self {
88310        self.location = location.map(|location| BoxWrapper(Unbox(location)));
88311        self
88312    }
88313    #[allow(rustdoc::invalid_html_tags)]
88314    #[doc = "Optional. For supergroups, the location to which the supergroup is connected"]
88315    fn rhai_get_location(&mut self) -> Option<ChatLocation> {
88316        self.location.as_ref().map(|v| v.clone().into())
88317    }
88318}
88319impl TraitMessageOriginUser for MessageOriginUser {
88320    #[allow(rustdoc::invalid_html_tags)]
88321    #[doc = "Type of the message origin, always \"user\""]
88322    #[allow(clippy::needless_lifetimes)]
88323    fn get_tg_type<'a>(&'a self) -> &'a str {
88324        self.tg_type.as_str()
88325    }
88326    #[allow(rustdoc::invalid_html_tags)]
88327    #[doc = "Type of the message origin, always \"user\""]
88328    #[allow(clippy::needless_lifetimes)]
88329    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
88330        self.tg_type = tg_type;
88331        self
88332    }
88333    #[allow(rustdoc::invalid_html_tags)]
88334    #[doc = "Date the message was sent originally in Unix time"]
88335    #[allow(clippy::needless_lifetimes)]
88336    fn get_date<'a>(&'a self) -> i64 {
88337        self.date
88338    }
88339    #[allow(rustdoc::invalid_html_tags)]
88340    #[doc = "Date the message was sent originally in Unix time"]
88341    #[allow(clippy::needless_lifetimes)]
88342    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
88343        self.date = date;
88344        self
88345    }
88346    #[allow(rustdoc::invalid_html_tags)]
88347    #[doc = "User that sent the message originally"]
88348    #[allow(clippy::needless_lifetimes)]
88349    fn get_sender_user<'a>(&'a self) -> &'a User {
88350        &self.sender_user
88351    }
88352    #[allow(rustdoc::invalid_html_tags)]
88353    #[doc = "User that sent the message originally"]
88354    #[allow(clippy::needless_lifetimes)]
88355    fn set_sender_user<'a>(&'a mut self, sender_user: User) -> &'a mut Self {
88356        self.sender_user = BoxWrapper(Unbox(sender_user));
88357        self
88358    }
88359}
88360impl TraitMessageOriginHiddenUser for MessageOriginHiddenUser {
88361    #[allow(rustdoc::invalid_html_tags)]
88362    #[doc = "Type of the message origin, always \"hidden_user\""]
88363    #[allow(clippy::needless_lifetimes)]
88364    fn get_tg_type<'a>(&'a self) -> &'a str {
88365        self.tg_type.as_str()
88366    }
88367    #[allow(rustdoc::invalid_html_tags)]
88368    #[doc = "Type of the message origin, always \"hidden_user\""]
88369    #[allow(clippy::needless_lifetimes)]
88370    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
88371        self.tg_type = tg_type;
88372        self
88373    }
88374    #[allow(rustdoc::invalid_html_tags)]
88375    #[doc = "Date the message was sent originally in Unix time"]
88376    #[allow(clippy::needless_lifetimes)]
88377    fn get_date<'a>(&'a self) -> i64 {
88378        self.date
88379    }
88380    #[allow(rustdoc::invalid_html_tags)]
88381    #[doc = "Date the message was sent originally in Unix time"]
88382    #[allow(clippy::needless_lifetimes)]
88383    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
88384        self.date = date;
88385        self
88386    }
88387    #[allow(rustdoc::invalid_html_tags)]
88388    #[doc = "Name of the user that sent the message originally"]
88389    #[allow(clippy::needless_lifetimes)]
88390    fn get_sender_user_name<'a>(&'a self) -> &'a str {
88391        self.sender_user_name.as_str()
88392    }
88393    #[allow(rustdoc::invalid_html_tags)]
88394    #[doc = "Name of the user that sent the message originally"]
88395    #[allow(clippy::needless_lifetimes)]
88396    fn set_sender_user_name<'a>(&'a mut self, sender_user_name: String) -> &'a mut Self {
88397        self.sender_user_name = sender_user_name;
88398        self
88399    }
88400}
88401impl TraitMessageOriginChat for MessageOriginChat {
88402    #[allow(rustdoc::invalid_html_tags)]
88403    #[doc = "Type of the message origin, always \"chat\""]
88404    #[allow(clippy::needless_lifetimes)]
88405    fn get_tg_type<'a>(&'a self) -> &'a str {
88406        self.tg_type.as_str()
88407    }
88408    #[allow(rustdoc::invalid_html_tags)]
88409    #[doc = "Type of the message origin, always \"chat\""]
88410    #[allow(clippy::needless_lifetimes)]
88411    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
88412        self.tg_type = tg_type;
88413        self
88414    }
88415    #[allow(rustdoc::invalid_html_tags)]
88416    #[doc = "Date the message was sent originally in Unix time"]
88417    #[allow(clippy::needless_lifetimes)]
88418    fn get_date<'a>(&'a self) -> i64 {
88419        self.date
88420    }
88421    #[allow(rustdoc::invalid_html_tags)]
88422    #[doc = "Date the message was sent originally in Unix time"]
88423    #[allow(clippy::needless_lifetimes)]
88424    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
88425        self.date = date;
88426        self
88427    }
88428    #[allow(rustdoc::invalid_html_tags)]
88429    #[doc = "Chat that sent the message originally"]
88430    #[allow(clippy::needless_lifetimes)]
88431    fn get_sender_chat<'a>(&'a self) -> &'a Chat {
88432        &self.sender_chat
88433    }
88434    #[allow(rustdoc::invalid_html_tags)]
88435    #[doc = "Chat that sent the message originally"]
88436    #[allow(clippy::needless_lifetimes)]
88437    fn set_sender_chat<'a>(&'a mut self, sender_chat: Chat) -> &'a mut Self {
88438        self.sender_chat = BoxWrapper(Unbox(sender_chat));
88439        self
88440    }
88441    #[allow(rustdoc::invalid_html_tags)]
88442    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
88443    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88444    fn get_author_signature<'a>(&'a self) -> Option<&'a str> {
88445        self.author_signature.as_ref().map(|v| v.as_str())
88446    }
88447    #[allow(rustdoc::invalid_html_tags)]
88448    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
88449    #[allow(clippy::needless_lifetimes)]
88450    fn set_author_signature<'a>(&'a mut self, author_signature: Option<String>) -> &'a mut Self {
88451        self.author_signature = author_signature;
88452        self
88453    }
88454}
88455impl TraitMessageOriginChannel for MessageOriginChannel {
88456    #[allow(rustdoc::invalid_html_tags)]
88457    #[doc = "Type of the message origin, always \"channel\""]
88458    #[allow(clippy::needless_lifetimes)]
88459    fn get_tg_type<'a>(&'a self) -> &'a str {
88460        self.tg_type.as_str()
88461    }
88462    #[allow(rustdoc::invalid_html_tags)]
88463    #[doc = "Type of the message origin, always \"channel\""]
88464    #[allow(clippy::needless_lifetimes)]
88465    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
88466        self.tg_type = tg_type;
88467        self
88468    }
88469    #[allow(rustdoc::invalid_html_tags)]
88470    #[doc = "Date the message was sent originally in Unix time"]
88471    #[allow(clippy::needless_lifetimes)]
88472    fn get_date<'a>(&'a self) -> i64 {
88473        self.date
88474    }
88475    #[allow(rustdoc::invalid_html_tags)]
88476    #[doc = "Date the message was sent originally in Unix time"]
88477    #[allow(clippy::needless_lifetimes)]
88478    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
88479        self.date = date;
88480        self
88481    }
88482    #[allow(rustdoc::invalid_html_tags)]
88483    #[doc = "Channel chat to which the message was originally sent"]
88484    #[allow(clippy::needless_lifetimes)]
88485    fn get_chat<'a>(&'a self) -> &'a Chat {
88486        &self.chat
88487    }
88488    #[allow(rustdoc::invalid_html_tags)]
88489    #[doc = "Channel chat to which the message was originally sent"]
88490    #[allow(clippy::needless_lifetimes)]
88491    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
88492        self.chat = BoxWrapper(Unbox(chat));
88493        self
88494    }
88495    #[allow(rustdoc::invalid_html_tags)]
88496    #[doc = "Unique message identifier inside the chat"]
88497    #[allow(clippy::needless_lifetimes)]
88498    fn get_message_id<'a>(&'a self) -> i64 {
88499        self.message_id
88500    }
88501    #[allow(rustdoc::invalid_html_tags)]
88502    #[doc = "Unique message identifier inside the chat"]
88503    #[allow(clippy::needless_lifetimes)]
88504    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
88505        self.message_id = message_id;
88506        self
88507    }
88508    #[allow(rustdoc::invalid_html_tags)]
88509    #[doc = "Optional. Signature of the original post author"]
88510    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88511    fn get_author_signature<'a>(&'a self) -> Option<&'a str> {
88512        self.author_signature.as_ref().map(|v| v.as_str())
88513    }
88514    #[allow(rustdoc::invalid_html_tags)]
88515    #[doc = "Optional. Signature of the original post author"]
88516    #[allow(clippy::needless_lifetimes)]
88517    fn set_author_signature<'a>(&'a mut self, author_signature: Option<String>) -> &'a mut Self {
88518        self.author_signature = author_signature;
88519        self
88520    }
88521}
88522#[allow(dead_code)]
88523impl PollAnswer {
88524    #[allow(clippy::too_many_arguments)]
88525    pub fn new(poll_id: String, option_ids: Vec<i64>) -> Self {
88526        Self {
88527            poll_id,
88528            option_ids,
88529            voter_chat: None,
88530            user: None,
88531        }
88532    }
88533    #[allow(rustdoc::invalid_html_tags)]
88534    #[doc = "Unique poll identifier"]
88535    #[allow(clippy::needless_lifetimes)]
88536    pub fn get_poll_id<'a>(&'a self) -> &'a str {
88537        self.poll_id.as_str()
88538    }
88539    #[allow(rustdoc::invalid_html_tags)]
88540    #[doc = "Unique poll identifier"]
88541    #[allow(clippy::needless_lifetimes)]
88542    pub fn set_poll_id<'a>(&'a mut self, poll_id: String) -> &'a mut Self {
88543        self.poll_id = poll_id;
88544        self
88545    }
88546    #[allow(rustdoc::invalid_html_tags)]
88547    #[doc = "Unique poll identifier"]
88548    fn rhai_get_poll_id(&mut self) -> String {
88549        self.poll_id.clone()
88550    }
88551    #[allow(rustdoc::invalid_html_tags)]
88552    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
88553    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88554    pub fn get_voter_chat<'a>(&'a self) -> Option<&'a Chat> {
88555        self.voter_chat.as_ref().map(|v| v.inner_ref())
88556    }
88557    #[allow(rustdoc::invalid_html_tags)]
88558    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
88559    #[allow(clippy::needless_lifetimes)]
88560    pub fn set_voter_chat<'a>(&'a mut self, voter_chat: Option<Chat>) -> &'a mut Self {
88561        self.voter_chat = voter_chat.map(|voter_chat| BoxWrapper(Unbox(voter_chat)));
88562        self
88563    }
88564    #[allow(rustdoc::invalid_html_tags)]
88565    #[doc = "Optional. The chat that changed the answer to the poll, if the voter is anonymous"]
88566    fn rhai_get_voter_chat(&mut self) -> Option<Chat> {
88567        self.voter_chat.as_ref().map(|v| v.clone().into())
88568    }
88569    #[allow(rustdoc::invalid_html_tags)]
88570    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
88571    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88572    pub fn get_user<'a>(&'a self) -> Option<&'a User> {
88573        self.user.as_ref().map(|v| v.inner_ref())
88574    }
88575    #[allow(rustdoc::invalid_html_tags)]
88576    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
88577    #[allow(clippy::needless_lifetimes)]
88578    pub fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self {
88579        self.user = user.map(|user| BoxWrapper(Unbox(user)));
88580        self
88581    }
88582    #[allow(rustdoc::invalid_html_tags)]
88583    #[doc = "Optional. The user that changed the answer to the poll, if the voter isn't anonymous"]
88584    fn rhai_get_user(&mut self) -> Option<User> {
88585        self.user.as_ref().map(|v| v.clone().into())
88586    }
88587    #[allow(rustdoc::invalid_html_tags)]
88588    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
88589    #[allow(clippy::needless_lifetimes)]
88590    pub fn get_option_ids<'a>(&'a self) -> &'a Vec<i64> {
88591        &self.option_ids
88592    }
88593    #[allow(rustdoc::invalid_html_tags)]
88594    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
88595    #[allow(clippy::needless_lifetimes)]
88596    pub fn set_option_ids<'a>(&'a mut self, option_ids: Vec<i64>) -> &'a mut Self {
88597        self.option_ids = option_ids;
88598        self
88599    }
88600    #[allow(rustdoc::invalid_html_tags)]
88601    #[doc = "0-based identifiers of chosen answer options. May be empty if the vote was retracted."]
88602    fn rhai_get_option_ids(&mut self) -> Vec<i64> {
88603        self.option_ids.clone()
88604    }
88605}
88606#[allow(dead_code)]
88607impl WebhookInfo {
88608    #[allow(clippy::too_many_arguments)]
88609    pub fn new(url: String, has_custom_certificate: bool, pending_update_count: i64) -> Self {
88610        Self {
88611            url,
88612            has_custom_certificate,
88613            pending_update_count,
88614            ip_address: None,
88615            last_error_date: None,
88616            last_error_message: None,
88617            last_synchronization_error_date: None,
88618            max_connections: None,
88619            allowed_updates: None,
88620        }
88621    }
88622    #[allow(rustdoc::invalid_html_tags)]
88623    #[doc = "Webhook URL, may be empty if webhook is not set up"]
88624    #[allow(clippy::needless_lifetimes)]
88625    pub fn get_url<'a>(&'a self) -> &'a str {
88626        self.url.as_str()
88627    }
88628    #[allow(rustdoc::invalid_html_tags)]
88629    #[doc = "Webhook URL, may be empty if webhook is not set up"]
88630    #[allow(clippy::needless_lifetimes)]
88631    pub fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self {
88632        self.url = url;
88633        self
88634    }
88635    #[allow(rustdoc::invalid_html_tags)]
88636    #[doc = "Webhook URL, may be empty if webhook is not set up"]
88637    fn rhai_get_url(&mut self) -> String {
88638        self.url.clone()
88639    }
88640    #[allow(rustdoc::invalid_html_tags)]
88641    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
88642    #[allow(clippy::needless_lifetimes)]
88643    pub fn get_has_custom_certificate<'a>(&'a self) -> bool {
88644        self.has_custom_certificate
88645    }
88646    #[allow(rustdoc::invalid_html_tags)]
88647    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
88648    #[allow(clippy::needless_lifetimes)]
88649    pub fn set_has_custom_certificate<'a>(
88650        &'a mut self,
88651        has_custom_certificate: bool,
88652    ) -> &'a mut Self {
88653        self.has_custom_certificate = has_custom_certificate;
88654        self
88655    }
88656    #[allow(rustdoc::invalid_html_tags)]
88657    #[doc = "True, if a custom certificate was provided for webhook certificate checks"]
88658    fn rhai_get_has_custom_certificate(&mut self) -> bool {
88659        self.has_custom_certificate
88660    }
88661    #[allow(rustdoc::invalid_html_tags)]
88662    #[doc = "Number of updates awaiting delivery"]
88663    #[allow(clippy::needless_lifetimes)]
88664    pub fn get_pending_update_count<'a>(&'a self) -> i64 {
88665        self.pending_update_count
88666    }
88667    #[allow(rustdoc::invalid_html_tags)]
88668    #[doc = "Number of updates awaiting delivery"]
88669    #[allow(clippy::needless_lifetimes)]
88670    pub fn set_pending_update_count<'a>(&'a mut self, pending_update_count: i64) -> &'a mut Self {
88671        self.pending_update_count = pending_update_count;
88672        self
88673    }
88674    #[allow(rustdoc::invalid_html_tags)]
88675    #[doc = "Number of updates awaiting delivery"]
88676    fn rhai_get_pending_update_count(&mut self) -> i64 {
88677        self.pending_update_count
88678    }
88679    #[allow(rustdoc::invalid_html_tags)]
88680    #[doc = "Optional. Currently used webhook IP address"]
88681    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88682    pub fn get_ip_address<'a>(&'a self) -> Option<&'a str> {
88683        self.ip_address.as_ref().map(|v| v.as_str())
88684    }
88685    #[allow(rustdoc::invalid_html_tags)]
88686    #[doc = "Optional. Currently used webhook IP address"]
88687    #[allow(clippy::needless_lifetimes)]
88688    pub fn set_ip_address<'a>(&'a mut self, ip_address: Option<String>) -> &'a mut Self {
88689        self.ip_address = ip_address;
88690        self
88691    }
88692    #[allow(rustdoc::invalid_html_tags)]
88693    #[doc = "Optional. Currently used webhook IP address"]
88694    fn rhai_get_ip_address(&mut self) -> Option<String> {
88695        self.ip_address.as_ref().cloned()
88696    }
88697    #[allow(rustdoc::invalid_html_tags)]
88698    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
88699    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88700    pub fn get_last_error_date<'a>(&'a self) -> Option<i64> {
88701        self.last_error_date.as_ref().map(|v| *v)
88702    }
88703    #[allow(rustdoc::invalid_html_tags)]
88704    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
88705    #[allow(clippy::needless_lifetimes)]
88706    pub fn set_last_error_date<'a>(&'a mut self, last_error_date: Option<i64>) -> &'a mut Self {
88707        self.last_error_date = last_error_date;
88708        self
88709    }
88710    #[allow(rustdoc::invalid_html_tags)]
88711    #[doc = "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook"]
88712    fn rhai_get_last_error_date(&mut self) -> Option<i64> {
88713        self.last_error_date.as_ref().copied()
88714    }
88715    #[allow(rustdoc::invalid_html_tags)]
88716    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
88717    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88718    pub fn get_last_error_message<'a>(&'a self) -> Option<&'a str> {
88719        self.last_error_message.as_ref().map(|v| v.as_str())
88720    }
88721    #[allow(rustdoc::invalid_html_tags)]
88722    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
88723    #[allow(clippy::needless_lifetimes)]
88724    pub fn set_last_error_message<'a>(
88725        &'a mut self,
88726        last_error_message: Option<String>,
88727    ) -> &'a mut Self {
88728        self.last_error_message = last_error_message;
88729        self
88730    }
88731    #[allow(rustdoc::invalid_html_tags)]
88732    #[doc = "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook"]
88733    fn rhai_get_last_error_message(&mut self) -> Option<String> {
88734        self.last_error_message.as_ref().cloned()
88735    }
88736    #[allow(rustdoc::invalid_html_tags)]
88737    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
88738    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88739    pub fn get_last_synchronization_error_date<'a>(&'a self) -> Option<i64> {
88740        self.last_synchronization_error_date.as_ref().map(|v| *v)
88741    }
88742    #[allow(rustdoc::invalid_html_tags)]
88743    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
88744    #[allow(clippy::needless_lifetimes)]
88745    pub fn set_last_synchronization_error_date<'a>(
88746        &'a mut self,
88747        last_synchronization_error_date: Option<i64>,
88748    ) -> &'a mut Self {
88749        self.last_synchronization_error_date = last_synchronization_error_date;
88750        self
88751    }
88752    #[allow(rustdoc::invalid_html_tags)]
88753    #[doc = "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters"]
88754    fn rhai_get_last_synchronization_error_date(&mut self) -> Option<i64> {
88755        self.last_synchronization_error_date.as_ref().copied()
88756    }
88757    #[allow(rustdoc::invalid_html_tags)]
88758    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
88759    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88760    pub fn get_max_connections<'a>(&'a self) -> Option<i64> {
88761        self.max_connections.as_ref().map(|v| *v)
88762    }
88763    #[allow(rustdoc::invalid_html_tags)]
88764    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
88765    #[allow(clippy::needless_lifetimes)]
88766    pub fn set_max_connections<'a>(&'a mut self, max_connections: Option<i64>) -> &'a mut Self {
88767        self.max_connections = max_connections;
88768        self
88769    }
88770    #[allow(rustdoc::invalid_html_tags)]
88771    #[doc = "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery"]
88772    fn rhai_get_max_connections(&mut self) -> Option<i64> {
88773        self.max_connections.as_ref().copied()
88774    }
88775    #[allow(rustdoc::invalid_html_tags)]
88776    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
88777    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
88778    pub fn get_allowed_updates<'a>(&'a self) -> Option<&'a Vec<String>> {
88779        self.allowed_updates.as_ref()
88780    }
88781    #[allow(rustdoc::invalid_html_tags)]
88782    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
88783    #[allow(clippy::needless_lifetimes)]
88784    pub fn set_allowed_updates<'a>(
88785        &'a mut self,
88786        allowed_updates: Option<Vec<String>>,
88787    ) -> &'a mut Self {
88788        self.allowed_updates = allowed_updates;
88789        self
88790    }
88791    #[allow(rustdoc::invalid_html_tags)]
88792    #[doc = "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member"]
88793    fn rhai_get_allowed_updates(&mut self) -> Option<Vec<String>> {
88794        self.allowed_updates.as_ref().cloned()
88795    }
88796}
88797#[allow(dead_code)]
88798impl BusinessMessagesDeleted {
88799    #[allow(clippy::too_many_arguments)]
88800    pub fn new<A: Into<Chat>>(
88801        business_connection_id: String,
88802        chat: A,
88803        message_ids: Vec<i64>,
88804    ) -> Self {
88805        Self {
88806            business_connection_id,
88807            chat: BoxWrapper::new_unbox(chat.into()),
88808            message_ids,
88809        }
88810    }
88811    #[allow(rustdoc::invalid_html_tags)]
88812    #[doc = "Unique identifier of the business connection"]
88813    #[allow(clippy::needless_lifetimes)]
88814    pub fn get_business_connection_id<'a>(&'a self) -> &'a str {
88815        self.business_connection_id.as_str()
88816    }
88817    #[allow(rustdoc::invalid_html_tags)]
88818    #[doc = "Unique identifier of the business connection"]
88819    #[allow(clippy::needless_lifetimes)]
88820    pub fn set_business_connection_id<'a>(
88821        &'a mut self,
88822        business_connection_id: String,
88823    ) -> &'a mut Self {
88824        self.business_connection_id = business_connection_id;
88825        self
88826    }
88827    #[allow(rustdoc::invalid_html_tags)]
88828    #[doc = "Unique identifier of the business connection"]
88829    fn rhai_get_business_connection_id(&mut self) -> String {
88830        self.business_connection_id.clone()
88831    }
88832    #[allow(rustdoc::invalid_html_tags)]
88833    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
88834    #[allow(clippy::needless_lifetimes)]
88835    pub fn get_chat<'a>(&'a self) -> &'a Chat {
88836        &self.chat
88837    }
88838    #[allow(rustdoc::invalid_html_tags)]
88839    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
88840    #[allow(clippy::needless_lifetimes)]
88841    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
88842        self.chat = BoxWrapper(Unbox(chat));
88843        self
88844    }
88845    #[allow(rustdoc::invalid_html_tags)]
88846    #[doc = "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."]
88847    fn rhai_get_chat(&mut self) -> Chat {
88848        self.chat.clone().into()
88849    }
88850    #[allow(rustdoc::invalid_html_tags)]
88851    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
88852    #[allow(clippy::needless_lifetimes)]
88853    pub fn get_message_ids<'a>(&'a self) -> &'a Vec<i64> {
88854        &self.message_ids
88855    }
88856    #[allow(rustdoc::invalid_html_tags)]
88857    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
88858    #[allow(clippy::needless_lifetimes)]
88859    pub fn set_message_ids<'a>(&'a mut self, message_ids: Vec<i64>) -> &'a mut Self {
88860        self.message_ids = message_ids;
88861        self
88862    }
88863    #[allow(rustdoc::invalid_html_tags)]
88864    #[doc = "The list of identifiers of deleted messages in the chat of the business account"]
88865    fn rhai_get_message_ids(&mut self) -> Vec<i64> {
88866        self.message_ids.clone()
88867    }
88868}
88869#[allow(dead_code)]
88870impl BotCommandScopeDefault {
88871    #[allow(clippy::too_many_arguments)]
88872    pub fn new() -> Self {
88873        Self {
88874            tg_type: "default".to_owned(),
88875        }
88876    }
88877    #[allow(rustdoc::invalid_html_tags)]
88878    #[doc = "Scope type, must be default"]
88879    #[allow(clippy::needless_lifetimes)]
88880    pub fn get_tg_type<'a>(&'a self) -> &'a str {
88881        self.tg_type.as_str()
88882    }
88883    #[allow(rustdoc::invalid_html_tags)]
88884    #[doc = "Scope type, must be default"]
88885    #[allow(clippy::needless_lifetimes)]
88886    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
88887        self.tg_type = tg_type;
88888        self
88889    }
88890    #[allow(rustdoc::invalid_html_tags)]
88891    #[doc = "Scope type, must be default"]
88892    fn rhai_get_tg_type(&mut self) -> String {
88893        self.tg_type.clone()
88894    }
88895}
88896#[allow(dead_code)]
88897impl ChatInviteLink {
88898    #[allow(clippy::too_many_arguments)]
88899    pub fn new<A: Into<User>>(
88900        invite_link: String,
88901        creator: A,
88902        creates_join_request: bool,
88903        is_primary: bool,
88904        is_revoked: bool,
88905    ) -> Self {
88906        Self {
88907            invite_link,
88908            creator: BoxWrapper::new_unbox(creator.into()),
88909            creates_join_request,
88910            is_primary,
88911            is_revoked,
88912            name: None,
88913            expire_date: None,
88914            member_limit: None,
88915            pending_join_request_count: None,
88916            subscription_period: None,
88917            subscription_price: None,
88918        }
88919    }
88920    #[allow(rustdoc::invalid_html_tags)]
88921    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
88922    #[allow(clippy::needless_lifetimes)]
88923    pub fn get_invite_link<'a>(&'a self) -> &'a str {
88924        self.invite_link.as_str()
88925    }
88926    #[allow(rustdoc::invalid_html_tags)]
88927    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
88928    #[allow(clippy::needless_lifetimes)]
88929    pub fn set_invite_link<'a>(&'a mut self, invite_link: String) -> &'a mut Self {
88930        self.invite_link = invite_link;
88931        self
88932    }
88933    #[allow(rustdoc::invalid_html_tags)]
88934    #[doc = "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\"."]
88935    fn rhai_get_invite_link(&mut self) -> String {
88936        self.invite_link.clone()
88937    }
88938    #[allow(rustdoc::invalid_html_tags)]
88939    #[doc = "Creator of the link"]
88940    #[allow(clippy::needless_lifetimes)]
88941    pub fn get_creator<'a>(&'a self) -> &'a User {
88942        &self.creator
88943    }
88944    #[allow(rustdoc::invalid_html_tags)]
88945    #[doc = "Creator of the link"]
88946    #[allow(clippy::needless_lifetimes)]
88947    pub fn set_creator<'a>(&'a mut self, creator: User) -> &'a mut Self {
88948        self.creator = BoxWrapper(Unbox(creator));
88949        self
88950    }
88951    #[allow(rustdoc::invalid_html_tags)]
88952    #[doc = "Creator of the link"]
88953    fn rhai_get_creator(&mut self) -> User {
88954        self.creator.clone().into()
88955    }
88956    #[allow(rustdoc::invalid_html_tags)]
88957    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
88958    #[allow(clippy::needless_lifetimes)]
88959    pub fn get_creates_join_request<'a>(&'a self) -> bool {
88960        self.creates_join_request
88961    }
88962    #[allow(rustdoc::invalid_html_tags)]
88963    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
88964    #[allow(clippy::needless_lifetimes)]
88965    pub fn set_creates_join_request<'a>(&'a mut self, creates_join_request: bool) -> &'a mut Self {
88966        self.creates_join_request = creates_join_request;
88967        self
88968    }
88969    #[allow(rustdoc::invalid_html_tags)]
88970    #[doc = "True, if users joining the chat via the link need to be approved by chat administrators"]
88971    fn rhai_get_creates_join_request(&mut self) -> bool {
88972        self.creates_join_request
88973    }
88974    #[allow(rustdoc::invalid_html_tags)]
88975    #[doc = "True, if the link is primary"]
88976    #[allow(clippy::needless_lifetimes)]
88977    pub fn get_is_primary<'a>(&'a self) -> bool {
88978        self.is_primary
88979    }
88980    #[allow(rustdoc::invalid_html_tags)]
88981    #[doc = "True, if the link is primary"]
88982    #[allow(clippy::needless_lifetimes)]
88983    pub fn set_is_primary<'a>(&'a mut self, is_primary: bool) -> &'a mut Self {
88984        self.is_primary = is_primary;
88985        self
88986    }
88987    #[allow(rustdoc::invalid_html_tags)]
88988    #[doc = "True, if the link is primary"]
88989    fn rhai_get_is_primary(&mut self) -> bool {
88990        self.is_primary
88991    }
88992    #[allow(rustdoc::invalid_html_tags)]
88993    #[doc = "True, if the link is revoked"]
88994    #[allow(clippy::needless_lifetimes)]
88995    pub fn get_is_revoked<'a>(&'a self) -> bool {
88996        self.is_revoked
88997    }
88998    #[allow(rustdoc::invalid_html_tags)]
88999    #[doc = "True, if the link is revoked"]
89000    #[allow(clippy::needless_lifetimes)]
89001    pub fn set_is_revoked<'a>(&'a mut self, is_revoked: bool) -> &'a mut Self {
89002        self.is_revoked = is_revoked;
89003        self
89004    }
89005    #[allow(rustdoc::invalid_html_tags)]
89006    #[doc = "True, if the link is revoked"]
89007    fn rhai_get_is_revoked(&mut self) -> bool {
89008        self.is_revoked
89009    }
89010    #[allow(rustdoc::invalid_html_tags)]
89011    #[doc = "Optional. Invite link name"]
89012    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89013    pub fn get_name<'a>(&'a self) -> Option<&'a str> {
89014        self.name.as_ref().map(|v| v.as_str())
89015    }
89016    #[allow(rustdoc::invalid_html_tags)]
89017    #[doc = "Optional. Invite link name"]
89018    #[allow(clippy::needless_lifetimes)]
89019    pub fn set_name<'a>(&'a mut self, name: Option<String>) -> &'a mut Self {
89020        self.name = name;
89021        self
89022    }
89023    #[allow(rustdoc::invalid_html_tags)]
89024    #[doc = "Optional. Invite link name"]
89025    fn rhai_get_name(&mut self) -> Option<String> {
89026        self.name.as_ref().cloned()
89027    }
89028    #[allow(rustdoc::invalid_html_tags)]
89029    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
89030    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89031    pub fn get_expire_date<'a>(&'a self) -> Option<i64> {
89032        self.expire_date.as_ref().map(|v| *v)
89033    }
89034    #[allow(rustdoc::invalid_html_tags)]
89035    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
89036    #[allow(clippy::needless_lifetimes)]
89037    pub fn set_expire_date<'a>(&'a mut self, expire_date: Option<i64>) -> &'a mut Self {
89038        self.expire_date = expire_date;
89039        self
89040    }
89041    #[allow(rustdoc::invalid_html_tags)]
89042    #[doc = "Optional. Point in time (Unix timestamp) when the link will expire or has been expired"]
89043    fn rhai_get_expire_date(&mut self) -> Option<i64> {
89044        self.expire_date.as_ref().copied()
89045    }
89046    #[allow(rustdoc::invalid_html_tags)]
89047    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
89048    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89049    pub fn get_member_limit<'a>(&'a self) -> Option<i64> {
89050        self.member_limit.as_ref().map(|v| *v)
89051    }
89052    #[allow(rustdoc::invalid_html_tags)]
89053    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
89054    #[allow(clippy::needless_lifetimes)]
89055    pub fn set_member_limit<'a>(&'a mut self, member_limit: Option<i64>) -> &'a mut Self {
89056        self.member_limit = member_limit;
89057        self
89058    }
89059    #[allow(rustdoc::invalid_html_tags)]
89060    #[doc = "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"]
89061    fn rhai_get_member_limit(&mut self) -> Option<i64> {
89062        self.member_limit.as_ref().copied()
89063    }
89064    #[allow(rustdoc::invalid_html_tags)]
89065    #[doc = "Optional. Number of pending join requests created using this link"]
89066    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89067    pub fn get_pending_join_request_count<'a>(&'a self) -> Option<i64> {
89068        self.pending_join_request_count.as_ref().map(|v| *v)
89069    }
89070    #[allow(rustdoc::invalid_html_tags)]
89071    #[doc = "Optional. Number of pending join requests created using this link"]
89072    #[allow(clippy::needless_lifetimes)]
89073    pub fn set_pending_join_request_count<'a>(
89074        &'a mut self,
89075        pending_join_request_count: Option<i64>,
89076    ) -> &'a mut Self {
89077        self.pending_join_request_count = pending_join_request_count;
89078        self
89079    }
89080    #[allow(rustdoc::invalid_html_tags)]
89081    #[doc = "Optional. Number of pending join requests created using this link"]
89082    fn rhai_get_pending_join_request_count(&mut self) -> Option<i64> {
89083        self.pending_join_request_count.as_ref().copied()
89084    }
89085    #[allow(rustdoc::invalid_html_tags)]
89086    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
89087    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89088    pub fn get_subscription_period<'a>(&'a self) -> Option<i64> {
89089        self.subscription_period.as_ref().map(|v| *v)
89090    }
89091    #[allow(rustdoc::invalid_html_tags)]
89092    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
89093    #[allow(clippy::needless_lifetimes)]
89094    pub fn set_subscription_period<'a>(
89095        &'a mut self,
89096        subscription_period: Option<i64>,
89097    ) -> &'a mut Self {
89098        self.subscription_period = subscription_period;
89099        self
89100    }
89101    #[allow(rustdoc::invalid_html_tags)]
89102    #[doc = "Optional. The number of seconds the subscription will be active for before the next payment"]
89103    fn rhai_get_subscription_period(&mut self) -> Option<i64> {
89104        self.subscription_period.as_ref().copied()
89105    }
89106    #[allow(rustdoc::invalid_html_tags)]
89107    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
89108    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89109    pub fn get_subscription_price<'a>(&'a self) -> Option<i64> {
89110        self.subscription_price.as_ref().map(|v| *v)
89111    }
89112    #[allow(rustdoc::invalid_html_tags)]
89113    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
89114    #[allow(clippy::needless_lifetimes)]
89115    pub fn set_subscription_price<'a>(
89116        &'a mut self,
89117        subscription_price: Option<i64>,
89118    ) -> &'a mut Self {
89119        self.subscription_price = subscription_price;
89120        self
89121    }
89122    #[allow(rustdoc::invalid_html_tags)]
89123    #[doc = "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link"]
89124    fn rhai_get_subscription_price(&mut self) -> Option<i64> {
89125        self.subscription_price.as_ref().copied()
89126    }
89127}
89128#[allow(dead_code)]
89129impl InlineQueryResultCachedVoice {
89130    #[allow(clippy::too_many_arguments)]
89131    pub fn new(id: String, voice_file_id: String, title: String) -> Self {
89132        Self {
89133            tg_type: "voice".to_owned(),
89134            id,
89135            voice_file_id,
89136            title,
89137            caption: None,
89138            parse_mode: None,
89139            caption_entities: None,
89140            reply_markup: None,
89141            input_message_content: None,
89142        }
89143    }
89144    #[allow(rustdoc::invalid_html_tags)]
89145    #[doc = "Type of the result, must be voice"]
89146    #[allow(clippy::needless_lifetimes)]
89147    pub fn get_tg_type<'a>(&'a self) -> &'a str {
89148        self.tg_type.as_str()
89149    }
89150    #[allow(rustdoc::invalid_html_tags)]
89151    #[doc = "Type of the result, must be voice"]
89152    #[allow(clippy::needless_lifetimes)]
89153    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
89154        self.tg_type = tg_type;
89155        self
89156    }
89157    #[allow(rustdoc::invalid_html_tags)]
89158    #[doc = "Type of the result, must be voice"]
89159    fn rhai_get_tg_type(&mut self) -> String {
89160        self.tg_type.clone()
89161    }
89162    #[allow(rustdoc::invalid_html_tags)]
89163    #[doc = "Unique identifier for this result, 1-64 bytes"]
89164    #[allow(clippy::needless_lifetimes)]
89165    pub fn get_id<'a>(&'a self) -> &'a str {
89166        self.id.as_str()
89167    }
89168    #[allow(rustdoc::invalid_html_tags)]
89169    #[doc = "Unique identifier for this result, 1-64 bytes"]
89170    #[allow(clippy::needless_lifetimes)]
89171    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
89172        self.id = id;
89173        self
89174    }
89175    #[allow(rustdoc::invalid_html_tags)]
89176    #[doc = "Unique identifier for this result, 1-64 bytes"]
89177    fn rhai_get_id(&mut self) -> String {
89178        self.id.clone()
89179    }
89180    #[allow(rustdoc::invalid_html_tags)]
89181    #[doc = "A valid file identifier for the voice message"]
89182    #[allow(clippy::needless_lifetimes)]
89183    pub fn get_voice_file_id<'a>(&'a self) -> &'a str {
89184        self.voice_file_id.as_str()
89185    }
89186    #[allow(rustdoc::invalid_html_tags)]
89187    #[doc = "A valid file identifier for the voice message"]
89188    #[allow(clippy::needless_lifetimes)]
89189    pub fn set_voice_file_id<'a>(&'a mut self, voice_file_id: String) -> &'a mut Self {
89190        self.voice_file_id = voice_file_id;
89191        self
89192    }
89193    #[allow(rustdoc::invalid_html_tags)]
89194    #[doc = "A valid file identifier for the voice message"]
89195    fn rhai_get_voice_file_id(&mut self) -> String {
89196        self.voice_file_id.clone()
89197    }
89198    #[allow(rustdoc::invalid_html_tags)]
89199    #[doc = "Voice message title"]
89200    #[allow(clippy::needless_lifetimes)]
89201    pub fn get_title<'a>(&'a self) -> &'a str {
89202        self.title.as_str()
89203    }
89204    #[allow(rustdoc::invalid_html_tags)]
89205    #[doc = "Voice message title"]
89206    #[allow(clippy::needless_lifetimes)]
89207    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
89208        self.title = title;
89209        self
89210    }
89211    #[allow(rustdoc::invalid_html_tags)]
89212    #[doc = "Voice message title"]
89213    fn rhai_get_title(&mut self) -> String {
89214        self.title.clone()
89215    }
89216    #[allow(rustdoc::invalid_html_tags)]
89217    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
89218    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89219    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
89220        self.caption.as_ref().map(|v| v.as_str())
89221    }
89222    #[allow(rustdoc::invalid_html_tags)]
89223    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
89224    #[allow(clippy::needless_lifetimes)]
89225    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
89226        self.caption = caption;
89227        self
89228    }
89229    #[allow(rustdoc::invalid_html_tags)]
89230    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
89231    fn rhai_get_caption(&mut self) -> Option<String> {
89232        self.caption.as_ref().cloned()
89233    }
89234    #[allow(rustdoc::invalid_html_tags)]
89235    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
89236    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89237    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
89238        self.parse_mode.as_ref().map(|v| v.as_str())
89239    }
89240    #[allow(rustdoc::invalid_html_tags)]
89241    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
89242    #[allow(clippy::needless_lifetimes)]
89243    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
89244        self.parse_mode = parse_mode;
89245        self
89246    }
89247    #[allow(rustdoc::invalid_html_tags)]
89248    #[doc = "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details."]
89249    fn rhai_get_parse_mode(&mut self) -> Option<String> {
89250        self.parse_mode.as_ref().cloned()
89251    }
89252    #[allow(rustdoc::invalid_html_tags)]
89253    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
89254    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89255    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
89256        self.caption_entities.as_ref()
89257    }
89258    #[allow(rustdoc::invalid_html_tags)]
89259    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
89260    #[allow(clippy::needless_lifetimes)]
89261    pub fn set_caption_entities<'a>(
89262        &'a mut self,
89263        caption_entities: Option<Vec<MessageEntity>>,
89264    ) -> &'a mut Self {
89265        self.caption_entities = caption_entities;
89266        self
89267    }
89268    #[allow(rustdoc::invalid_html_tags)]
89269    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
89270    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
89271        self.caption_entities.as_ref().cloned()
89272    }
89273    #[allow(rustdoc::invalid_html_tags)]
89274    #[doc = "Optional. Inline keyboard attached to the message"]
89275    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89276    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
89277        self.reply_markup.as_ref().map(|v| v.inner_ref())
89278    }
89279    #[allow(rustdoc::invalid_html_tags)]
89280    #[doc = "Optional. Inline keyboard attached to the message"]
89281    #[allow(clippy::needless_lifetimes)]
89282    pub fn set_reply_markup<'a>(
89283        &'a mut self,
89284        reply_markup: Option<InlineKeyboardMarkup>,
89285    ) -> &'a mut Self {
89286        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
89287        self
89288    }
89289    #[allow(rustdoc::invalid_html_tags)]
89290    #[doc = "Optional. Inline keyboard attached to the message"]
89291    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
89292        self.reply_markup.as_ref().map(|v| v.clone().into())
89293    }
89294    #[allow(rustdoc::invalid_html_tags)]
89295    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
89296    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89297    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
89298        self.input_message_content.as_ref().map(|v| v.inner_ref())
89299    }
89300    #[allow(rustdoc::invalid_html_tags)]
89301    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
89302    #[allow(clippy::needless_lifetimes)]
89303    pub fn set_input_message_content<'a>(
89304        &'a mut self,
89305        input_message_content: Option<InputMessageContent>,
89306    ) -> &'a mut Self {
89307        self.input_message_content = input_message_content
89308            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
89309        self
89310    }
89311    #[allow(rustdoc::invalid_html_tags)]
89312    #[doc = "Optional. Content of the message to be sent instead of the voice message"]
89313    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
89314        self.input_message_content
89315            .as_ref()
89316            .map(|v| v.clone().into())
89317    }
89318}
89319#[allow(dead_code)]
89320impl PassportElementErrorTranslationFiles {
89321    #[allow(clippy::too_many_arguments)]
89322    pub fn new(source: String, file_hashes: Vec<String>, message: String) -> Self {
89323        Self {
89324            tg_type: "PassportElementErrorTranslationFiles".to_owned(),
89325            source,
89326            file_hashes,
89327            message,
89328        }
89329    }
89330    #[allow(rustdoc::invalid_html_tags)]
89331    #[doc = "Error source, must be translation_files"]
89332    #[allow(clippy::needless_lifetimes)]
89333    pub fn get_source<'a>(&'a self) -> &'a str {
89334        self.source.as_str()
89335    }
89336    #[allow(rustdoc::invalid_html_tags)]
89337    #[doc = "Error source, must be translation_files"]
89338    #[allow(clippy::needless_lifetimes)]
89339    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
89340        self.source = source;
89341        self
89342    }
89343    #[allow(rustdoc::invalid_html_tags)]
89344    #[doc = "Error source, must be translation_files"]
89345    fn rhai_get_source(&mut self) -> String {
89346        self.source.clone()
89347    }
89348    #[allow(rustdoc::invalid_html_tags)]
89349    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
89350    #[allow(clippy::needless_lifetimes)]
89351    pub fn get_tg_type<'a>(&'a self) -> &'a str {
89352        self.tg_type.as_str()
89353    }
89354    #[allow(rustdoc::invalid_html_tags)]
89355    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
89356    #[allow(clippy::needless_lifetimes)]
89357    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
89358        self.tg_type = tg_type;
89359        self
89360    }
89361    #[allow(rustdoc::invalid_html_tags)]
89362    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
89363    fn rhai_get_tg_type(&mut self) -> String {
89364        self.tg_type.clone()
89365    }
89366    #[allow(rustdoc::invalid_html_tags)]
89367    #[doc = "List of base64-encoded file hashes"]
89368    #[allow(clippy::needless_lifetimes)]
89369    pub fn get_file_hashes<'a>(&'a self) -> &'a Vec<String> {
89370        &self.file_hashes
89371    }
89372    #[allow(rustdoc::invalid_html_tags)]
89373    #[doc = "List of base64-encoded file hashes"]
89374    #[allow(clippy::needless_lifetimes)]
89375    pub fn set_file_hashes<'a>(&'a mut self, file_hashes: Vec<String>) -> &'a mut Self {
89376        self.file_hashes = file_hashes;
89377        self
89378    }
89379    #[allow(rustdoc::invalid_html_tags)]
89380    #[doc = "List of base64-encoded file hashes"]
89381    fn rhai_get_file_hashes(&mut self) -> Vec<String> {
89382        self.file_hashes.clone()
89383    }
89384    #[allow(rustdoc::invalid_html_tags)]
89385    #[doc = "Error message"]
89386    #[allow(clippy::needless_lifetimes)]
89387    pub fn get_message<'a>(&'a self) -> &'a str {
89388        self.message.as_str()
89389    }
89390    #[allow(rustdoc::invalid_html_tags)]
89391    #[doc = "Error message"]
89392    #[allow(clippy::needless_lifetimes)]
89393    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
89394        self.message = message;
89395        self
89396    }
89397    #[allow(rustdoc::invalid_html_tags)]
89398    #[doc = "Error message"]
89399    fn rhai_get_message(&mut self) -> String {
89400        self.message.clone()
89401    }
89402}
89403#[allow(dead_code)]
89404impl Animation {
89405    #[allow(clippy::too_many_arguments)]
89406    pub fn new(
89407        file_id: String,
89408        file_unique_id: String,
89409        width: i64,
89410        height: i64,
89411        duration: i64,
89412    ) -> Self {
89413        Self {
89414            file_id,
89415            file_unique_id,
89416            width,
89417            height,
89418            duration,
89419            thumbnail: None,
89420            file_name: None,
89421            mime_type: None,
89422            file_size: None,
89423        }
89424    }
89425    #[allow(rustdoc::invalid_html_tags)]
89426    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
89427    #[allow(clippy::needless_lifetimes)]
89428    pub fn get_file_id<'a>(&'a self) -> &'a str {
89429        self.file_id.as_str()
89430    }
89431    #[allow(rustdoc::invalid_html_tags)]
89432    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
89433    #[allow(clippy::needless_lifetimes)]
89434    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
89435        self.file_id = file_id;
89436        self
89437    }
89438    #[allow(rustdoc::invalid_html_tags)]
89439    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
89440    fn rhai_get_file_id(&mut self) -> String {
89441        self.file_id.clone()
89442    }
89443    #[allow(rustdoc::invalid_html_tags)]
89444    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
89445    #[allow(clippy::needless_lifetimes)]
89446    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
89447        self.file_unique_id.as_str()
89448    }
89449    #[allow(rustdoc::invalid_html_tags)]
89450    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
89451    #[allow(clippy::needless_lifetimes)]
89452    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
89453        self.file_unique_id = file_unique_id;
89454        self
89455    }
89456    #[allow(rustdoc::invalid_html_tags)]
89457    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
89458    fn rhai_get_file_unique_id(&mut self) -> String {
89459        self.file_unique_id.clone()
89460    }
89461    #[allow(rustdoc::invalid_html_tags)]
89462    #[doc = "Video width as defined by the sender"]
89463    #[allow(clippy::needless_lifetimes)]
89464    pub fn get_width<'a>(&'a self) -> i64 {
89465        self.width
89466    }
89467    #[allow(rustdoc::invalid_html_tags)]
89468    #[doc = "Video width as defined by the sender"]
89469    #[allow(clippy::needless_lifetimes)]
89470    pub fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self {
89471        self.width = width;
89472        self
89473    }
89474    #[allow(rustdoc::invalid_html_tags)]
89475    #[doc = "Video width as defined by the sender"]
89476    fn rhai_get_width(&mut self) -> i64 {
89477        self.width
89478    }
89479    #[allow(rustdoc::invalid_html_tags)]
89480    #[doc = "Video height as defined by the sender"]
89481    #[allow(clippy::needless_lifetimes)]
89482    pub fn get_height<'a>(&'a self) -> i64 {
89483        self.height
89484    }
89485    #[allow(rustdoc::invalid_html_tags)]
89486    #[doc = "Video height as defined by the sender"]
89487    #[allow(clippy::needless_lifetimes)]
89488    pub fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self {
89489        self.height = height;
89490        self
89491    }
89492    #[allow(rustdoc::invalid_html_tags)]
89493    #[doc = "Video height as defined by the sender"]
89494    fn rhai_get_height(&mut self) -> i64 {
89495        self.height
89496    }
89497    #[allow(rustdoc::invalid_html_tags)]
89498    #[doc = "Duration of the video in seconds as defined by the sender"]
89499    #[allow(clippy::needless_lifetimes)]
89500    pub fn get_duration<'a>(&'a self) -> i64 {
89501        self.duration
89502    }
89503    #[allow(rustdoc::invalid_html_tags)]
89504    #[doc = "Duration of the video in seconds as defined by the sender"]
89505    #[allow(clippy::needless_lifetimes)]
89506    pub fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self {
89507        self.duration = duration;
89508        self
89509    }
89510    #[allow(rustdoc::invalid_html_tags)]
89511    #[doc = "Duration of the video in seconds as defined by the sender"]
89512    fn rhai_get_duration(&mut self) -> i64 {
89513        self.duration
89514    }
89515    #[allow(rustdoc::invalid_html_tags)]
89516    #[doc = "Optional. Animation thumbnail as defined by the sender"]
89517    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89518    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize> {
89519        self.thumbnail.as_ref().map(|v| v.inner_ref())
89520    }
89521    #[allow(rustdoc::invalid_html_tags)]
89522    #[doc = "Optional. Animation thumbnail as defined by the sender"]
89523    #[allow(clippy::needless_lifetimes)]
89524    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self {
89525        self.thumbnail = thumbnail.map(|thumbnail| BoxWrapper(Unbox(thumbnail)));
89526        self
89527    }
89528    #[allow(rustdoc::invalid_html_tags)]
89529    #[doc = "Optional. Animation thumbnail as defined by the sender"]
89530    fn rhai_get_thumbnail(&mut self) -> Option<PhotoSize> {
89531        self.thumbnail.as_ref().map(|v| v.clone().into())
89532    }
89533    #[allow(rustdoc::invalid_html_tags)]
89534    #[doc = "Optional. Original animation filename as defined by the sender"]
89535    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89536    pub fn get_file_name<'a>(&'a self) -> Option<&'a str> {
89537        self.file_name.as_ref().map(|v| v.as_str())
89538    }
89539    #[allow(rustdoc::invalid_html_tags)]
89540    #[doc = "Optional. Original animation filename as defined by the sender"]
89541    #[allow(clippy::needless_lifetimes)]
89542    pub fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self {
89543        self.file_name = file_name;
89544        self
89545    }
89546    #[allow(rustdoc::invalid_html_tags)]
89547    #[doc = "Optional. Original animation filename as defined by the sender"]
89548    fn rhai_get_file_name(&mut self) -> Option<String> {
89549        self.file_name.as_ref().cloned()
89550    }
89551    #[allow(rustdoc::invalid_html_tags)]
89552    #[doc = "Optional. MIME type of the file as defined by the sender"]
89553    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89554    pub fn get_mime_type<'a>(&'a self) -> Option<&'a str> {
89555        self.mime_type.as_ref().map(|v| v.as_str())
89556    }
89557    #[allow(rustdoc::invalid_html_tags)]
89558    #[doc = "Optional. MIME type of the file as defined by the sender"]
89559    #[allow(clippy::needless_lifetimes)]
89560    pub fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self {
89561        self.mime_type = mime_type;
89562        self
89563    }
89564    #[allow(rustdoc::invalid_html_tags)]
89565    #[doc = "Optional. MIME type of the file as defined by the sender"]
89566    fn rhai_get_mime_type(&mut self) -> Option<String> {
89567        self.mime_type.as_ref().cloned()
89568    }
89569    #[allow(rustdoc::invalid_html_tags)]
89570    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
89571    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89572    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
89573        self.file_size.as_ref().map(|v| *v)
89574    }
89575    #[allow(rustdoc::invalid_html_tags)]
89576    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
89577    #[allow(clippy::needless_lifetimes)]
89578    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
89579        self.file_size = file_size;
89580        self
89581    }
89582    #[allow(rustdoc::invalid_html_tags)]
89583    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
89584    fn rhai_get_file_size(&mut self) -> Option<i64> {
89585        self.file_size.as_ref().copied()
89586    }
89587}
89588#[allow(dead_code)]
89589impl Audio {
89590    #[allow(clippy::too_many_arguments)]
89591    pub fn new(file_id: String, file_unique_id: String, duration: i64) -> Self {
89592        Self {
89593            file_id,
89594            file_unique_id,
89595            duration,
89596            performer: None,
89597            title: None,
89598            file_name: None,
89599            mime_type: None,
89600            file_size: None,
89601            thumbnail: None,
89602        }
89603    }
89604    #[allow(rustdoc::invalid_html_tags)]
89605    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
89606    #[allow(clippy::needless_lifetimes)]
89607    pub fn get_file_id<'a>(&'a self) -> &'a str {
89608        self.file_id.as_str()
89609    }
89610    #[allow(rustdoc::invalid_html_tags)]
89611    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
89612    #[allow(clippy::needless_lifetimes)]
89613    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
89614        self.file_id = file_id;
89615        self
89616    }
89617    #[allow(rustdoc::invalid_html_tags)]
89618    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
89619    fn rhai_get_file_id(&mut self) -> String {
89620        self.file_id.clone()
89621    }
89622    #[allow(rustdoc::invalid_html_tags)]
89623    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
89624    #[allow(clippy::needless_lifetimes)]
89625    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
89626        self.file_unique_id.as_str()
89627    }
89628    #[allow(rustdoc::invalid_html_tags)]
89629    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
89630    #[allow(clippy::needless_lifetimes)]
89631    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
89632        self.file_unique_id = file_unique_id;
89633        self
89634    }
89635    #[allow(rustdoc::invalid_html_tags)]
89636    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
89637    fn rhai_get_file_unique_id(&mut self) -> String {
89638        self.file_unique_id.clone()
89639    }
89640    #[allow(rustdoc::invalid_html_tags)]
89641    #[doc = "Duration of the audio in seconds as defined by the sender"]
89642    #[allow(clippy::needless_lifetimes)]
89643    pub fn get_duration<'a>(&'a self) -> i64 {
89644        self.duration
89645    }
89646    #[allow(rustdoc::invalid_html_tags)]
89647    #[doc = "Duration of the audio in seconds as defined by the sender"]
89648    #[allow(clippy::needless_lifetimes)]
89649    pub fn set_duration<'a>(&'a mut self, duration: i64) -> &'a mut Self {
89650        self.duration = duration;
89651        self
89652    }
89653    #[allow(rustdoc::invalid_html_tags)]
89654    #[doc = "Duration of the audio in seconds as defined by the sender"]
89655    fn rhai_get_duration(&mut self) -> i64 {
89656        self.duration
89657    }
89658    #[allow(rustdoc::invalid_html_tags)]
89659    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
89660    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89661    pub fn get_performer<'a>(&'a self) -> Option<&'a str> {
89662        self.performer.as_ref().map(|v| v.as_str())
89663    }
89664    #[allow(rustdoc::invalid_html_tags)]
89665    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
89666    #[allow(clippy::needless_lifetimes)]
89667    pub fn set_performer<'a>(&'a mut self, performer: Option<String>) -> &'a mut Self {
89668        self.performer = performer;
89669        self
89670    }
89671    #[allow(rustdoc::invalid_html_tags)]
89672    #[doc = "Optional. Performer of the audio as defined by the sender or by audio tags"]
89673    fn rhai_get_performer(&mut self) -> Option<String> {
89674        self.performer.as_ref().cloned()
89675    }
89676    #[allow(rustdoc::invalid_html_tags)]
89677    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
89678    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89679    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
89680        self.title.as_ref().map(|v| v.as_str())
89681    }
89682    #[allow(rustdoc::invalid_html_tags)]
89683    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
89684    #[allow(clippy::needless_lifetimes)]
89685    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
89686        self.title = title;
89687        self
89688    }
89689    #[allow(rustdoc::invalid_html_tags)]
89690    #[doc = "Optional. Title of the audio as defined by the sender or by audio tags"]
89691    fn rhai_get_title(&mut self) -> Option<String> {
89692        self.title.as_ref().cloned()
89693    }
89694    #[allow(rustdoc::invalid_html_tags)]
89695    #[doc = "Optional. Original filename as defined by the sender"]
89696    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89697    pub fn get_file_name<'a>(&'a self) -> Option<&'a str> {
89698        self.file_name.as_ref().map(|v| v.as_str())
89699    }
89700    #[allow(rustdoc::invalid_html_tags)]
89701    #[doc = "Optional. Original filename as defined by the sender"]
89702    #[allow(clippy::needless_lifetimes)]
89703    pub fn set_file_name<'a>(&'a mut self, file_name: Option<String>) -> &'a mut Self {
89704        self.file_name = file_name;
89705        self
89706    }
89707    #[allow(rustdoc::invalid_html_tags)]
89708    #[doc = "Optional. Original filename as defined by the sender"]
89709    fn rhai_get_file_name(&mut self) -> Option<String> {
89710        self.file_name.as_ref().cloned()
89711    }
89712    #[allow(rustdoc::invalid_html_tags)]
89713    #[doc = "Optional. MIME type of the file as defined by the sender"]
89714    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89715    pub fn get_mime_type<'a>(&'a self) -> Option<&'a str> {
89716        self.mime_type.as_ref().map(|v| v.as_str())
89717    }
89718    #[allow(rustdoc::invalid_html_tags)]
89719    #[doc = "Optional. MIME type of the file as defined by the sender"]
89720    #[allow(clippy::needless_lifetimes)]
89721    pub fn set_mime_type<'a>(&'a mut self, mime_type: Option<String>) -> &'a mut Self {
89722        self.mime_type = mime_type;
89723        self
89724    }
89725    #[allow(rustdoc::invalid_html_tags)]
89726    #[doc = "Optional. MIME type of the file as defined by the sender"]
89727    fn rhai_get_mime_type(&mut self) -> Option<String> {
89728        self.mime_type.as_ref().cloned()
89729    }
89730    #[allow(rustdoc::invalid_html_tags)]
89731    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
89732    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89733    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
89734        self.file_size.as_ref().map(|v| *v)
89735    }
89736    #[allow(rustdoc::invalid_html_tags)]
89737    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
89738    #[allow(clippy::needless_lifetimes)]
89739    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
89740        self.file_size = file_size;
89741        self
89742    }
89743    #[allow(rustdoc::invalid_html_tags)]
89744    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
89745    fn rhai_get_file_size(&mut self) -> Option<i64> {
89746        self.file_size.as_ref().copied()
89747    }
89748    #[allow(rustdoc::invalid_html_tags)]
89749    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
89750    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89751    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize> {
89752        self.thumbnail.as_ref().map(|v| v.inner_ref())
89753    }
89754    #[allow(rustdoc::invalid_html_tags)]
89755    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
89756    #[allow(clippy::needless_lifetimes)]
89757    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self {
89758        self.thumbnail = thumbnail.map(|thumbnail| BoxWrapper(Unbox(thumbnail)));
89759        self
89760    }
89761    #[allow(rustdoc::invalid_html_tags)]
89762    #[doc = "Optional. Thumbnail of the album cover to which the music file belongs"]
89763    fn rhai_get_thumbnail(&mut self) -> Option<PhotoSize> {
89764        self.thumbnail.as_ref().map(|v| v.clone().into())
89765    }
89766}
89767#[allow(dead_code)]
89768impl RefundedPayment {
89769    #[allow(clippy::too_many_arguments)]
89770    pub fn new(
89771        currency: String,
89772        total_amount: i64,
89773        invoice_payload: String,
89774        telegram_payment_charge_id: String,
89775    ) -> Self {
89776        Self {
89777            currency,
89778            total_amount,
89779            invoice_payload,
89780            telegram_payment_charge_id,
89781            provider_payment_charge_id: None,
89782        }
89783    }
89784    #[allow(rustdoc::invalid_html_tags)]
89785    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
89786    #[allow(clippy::needless_lifetimes)]
89787    pub fn get_currency<'a>(&'a self) -> &'a str {
89788        self.currency.as_str()
89789    }
89790    #[allow(rustdoc::invalid_html_tags)]
89791    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
89792    #[allow(clippy::needless_lifetimes)]
89793    pub fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
89794        self.currency = currency;
89795        self
89796    }
89797    #[allow(rustdoc::invalid_html_tags)]
89798    #[doc = "Three-letter ISO 4217 currency code, or \"XTR\" for payments in Telegram Stars. Currently, always \"XTR\""]
89799    fn rhai_get_currency(&mut self) -> String {
89800        self.currency.clone()
89801    }
89802    #[allow(rustdoc::invalid_html_tags)]
89803    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
89804    #[allow(clippy::needless_lifetimes)]
89805    pub fn get_total_amount<'a>(&'a self) -> i64 {
89806        self.total_amount
89807    }
89808    #[allow(rustdoc::invalid_html_tags)]
89809    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
89810    #[allow(clippy::needless_lifetimes)]
89811    pub fn set_total_amount<'a>(&'a mut self, total_amount: i64) -> &'a mut Self {
89812        self.total_amount = total_amount;
89813        self
89814    }
89815    #[allow(rustdoc::invalid_html_tags)]
89816    #[doc = "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."]
89817    fn rhai_get_total_amount(&mut self) -> i64 {
89818        self.total_amount
89819    }
89820    #[allow(rustdoc::invalid_html_tags)]
89821    #[doc = "Bot-specified invoice payload"]
89822    #[allow(clippy::needless_lifetimes)]
89823    pub fn get_invoice_payload<'a>(&'a self) -> &'a str {
89824        self.invoice_payload.as_str()
89825    }
89826    #[allow(rustdoc::invalid_html_tags)]
89827    #[doc = "Bot-specified invoice payload"]
89828    #[allow(clippy::needless_lifetimes)]
89829    pub fn set_invoice_payload<'a>(&'a mut self, invoice_payload: String) -> &'a mut Self {
89830        self.invoice_payload = invoice_payload;
89831        self
89832    }
89833    #[allow(rustdoc::invalid_html_tags)]
89834    #[doc = "Bot-specified invoice payload"]
89835    fn rhai_get_invoice_payload(&mut self) -> String {
89836        self.invoice_payload.clone()
89837    }
89838    #[allow(rustdoc::invalid_html_tags)]
89839    #[doc = "Telegram payment identifier"]
89840    #[allow(clippy::needless_lifetimes)]
89841    pub fn get_telegram_payment_charge_id<'a>(&'a self) -> &'a str {
89842        self.telegram_payment_charge_id.as_str()
89843    }
89844    #[allow(rustdoc::invalid_html_tags)]
89845    #[doc = "Telegram payment identifier"]
89846    #[allow(clippy::needless_lifetimes)]
89847    pub fn set_telegram_payment_charge_id<'a>(
89848        &'a mut self,
89849        telegram_payment_charge_id: String,
89850    ) -> &'a mut Self {
89851        self.telegram_payment_charge_id = telegram_payment_charge_id;
89852        self
89853    }
89854    #[allow(rustdoc::invalid_html_tags)]
89855    #[doc = "Telegram payment identifier"]
89856    fn rhai_get_telegram_payment_charge_id(&mut self) -> String {
89857        self.telegram_payment_charge_id.clone()
89858    }
89859    #[allow(rustdoc::invalid_html_tags)]
89860    #[doc = "Optional. Provider payment identifier"]
89861    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89862    pub fn get_provider_payment_charge_id<'a>(&'a self) -> Option<&'a str> {
89863        self.provider_payment_charge_id.as_ref().map(|v| v.as_str())
89864    }
89865    #[allow(rustdoc::invalid_html_tags)]
89866    #[doc = "Optional. Provider payment identifier"]
89867    #[allow(clippy::needless_lifetimes)]
89868    pub fn set_provider_payment_charge_id<'a>(
89869        &'a mut self,
89870        provider_payment_charge_id: Option<String>,
89871    ) -> &'a mut Self {
89872        self.provider_payment_charge_id = provider_payment_charge_id;
89873        self
89874    }
89875    #[allow(rustdoc::invalid_html_tags)]
89876    #[doc = "Optional. Provider payment identifier"]
89877    fn rhai_get_provider_payment_charge_id(&mut self) -> Option<String> {
89878        self.provider_payment_charge_id.as_ref().cloned()
89879    }
89880}
89881#[allow(dead_code)]
89882impl InputMediaAnimation {
89883    #[allow(clippy::too_many_arguments)]
89884    pub fn new(media: Option<InputFile>) -> Self {
89885        Self {
89886            tg_type: "animation".to_owned(),
89887            media,
89888            thumbnail: None,
89889            caption: None,
89890            parse_mode: None,
89891            caption_entities: None,
89892            show_caption_above_media: None,
89893            width: None,
89894            height: None,
89895            duration: None,
89896            has_spoiler: None,
89897        }
89898    }
89899    #[allow(rustdoc::invalid_html_tags)]
89900    #[doc = "Type of the result, must be animation"]
89901    #[allow(clippy::needless_lifetimes)]
89902    pub fn get_tg_type<'a>(&'a self) -> &'a str {
89903        self.tg_type.as_str()
89904    }
89905    #[allow(rustdoc::invalid_html_tags)]
89906    #[doc = "Type of the result, must be animation"]
89907    #[allow(clippy::needless_lifetimes)]
89908    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
89909        self.tg_type = tg_type;
89910        self
89911    }
89912    #[allow(rustdoc::invalid_html_tags)]
89913    #[doc = "Type of the result, must be animation"]
89914    fn rhai_get_tg_type(&mut self) -> String {
89915        self.tg_type.clone()
89916    }
89917    #[allow(rustdoc::invalid_html_tags)]
89918    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
89919    #[allow(clippy::needless_lifetimes)]
89920    pub fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
89921        &self.media
89922    }
89923    #[allow(rustdoc::invalid_html_tags)]
89924    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
89925    #[allow(clippy::needless_lifetimes)]
89926    pub fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
89927        self.media = media;
89928        self
89929    }
89930    #[allow(rustdoc::invalid_html_tags)]
89931    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
89932    fn rhai_get_media(&mut self) -> Option<InputFile> {
89933        self.media.clone()
89934    }
89935    #[allow(rustdoc::invalid_html_tags)]
89936    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
89937    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89938    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
89939        self.thumbnail.as_ref().map(|v| v.as_str())
89940    }
89941    #[allow(rustdoc::invalid_html_tags)]
89942    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
89943    #[allow(clippy::needless_lifetimes)]
89944    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
89945        self.thumbnail = thumbnail;
89946        self
89947    }
89948    #[allow(rustdoc::invalid_html_tags)]
89949    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
89950    fn rhai_get_thumbnail(&mut self) -> Option<String> {
89951        self.thumbnail.as_ref().cloned()
89952    }
89953    #[allow(rustdoc::invalid_html_tags)]
89954    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
89955    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89956    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
89957        self.caption.as_ref().map(|v| v.as_str())
89958    }
89959    #[allow(rustdoc::invalid_html_tags)]
89960    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
89961    #[allow(clippy::needless_lifetimes)]
89962    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
89963        self.caption = caption;
89964        self
89965    }
89966    #[allow(rustdoc::invalid_html_tags)]
89967    #[doc = "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing"]
89968    fn rhai_get_caption(&mut self) -> Option<String> {
89969        self.caption.as_ref().cloned()
89970    }
89971    #[allow(rustdoc::invalid_html_tags)]
89972    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
89973    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89974    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
89975        self.parse_mode.as_ref().map(|v| v.as_str())
89976    }
89977    #[allow(rustdoc::invalid_html_tags)]
89978    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
89979    #[allow(clippy::needless_lifetimes)]
89980    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
89981        self.parse_mode = parse_mode;
89982        self
89983    }
89984    #[allow(rustdoc::invalid_html_tags)]
89985    #[doc = "Optional. Mode for parsing entities in the animation caption. See formatting options for more details."]
89986    fn rhai_get_parse_mode(&mut self) -> Option<String> {
89987        self.parse_mode.as_ref().cloned()
89988    }
89989    #[allow(rustdoc::invalid_html_tags)]
89990    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
89991    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
89992    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
89993        self.caption_entities.as_ref()
89994    }
89995    #[allow(rustdoc::invalid_html_tags)]
89996    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
89997    #[allow(clippy::needless_lifetimes)]
89998    pub fn set_caption_entities<'a>(
89999        &'a mut self,
90000        caption_entities: Option<Vec<MessageEntity>>,
90001    ) -> &'a mut Self {
90002        self.caption_entities = caption_entities;
90003        self
90004    }
90005    #[allow(rustdoc::invalid_html_tags)]
90006    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
90007    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
90008        self.caption_entities.as_ref().cloned()
90009    }
90010    #[allow(rustdoc::invalid_html_tags)]
90011    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
90012    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90013    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
90014        self.show_caption_above_media.as_ref().map(|v| *v)
90015    }
90016    #[allow(rustdoc::invalid_html_tags)]
90017    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
90018    #[allow(clippy::needless_lifetimes)]
90019    pub fn set_show_caption_above_media<'a>(
90020        &'a mut self,
90021        show_caption_above_media: Option<bool>,
90022    ) -> &'a mut Self {
90023        self.show_caption_above_media = show_caption_above_media;
90024        self
90025    }
90026    #[allow(rustdoc::invalid_html_tags)]
90027    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
90028    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
90029        self.show_caption_above_media.as_ref().copied()
90030    }
90031    #[allow(rustdoc::invalid_html_tags)]
90032    #[doc = "Optional. Animation width"]
90033    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90034    pub fn get_width<'a>(&'a self) -> Option<i64> {
90035        self.width.as_ref().map(|v| *v)
90036    }
90037    #[allow(rustdoc::invalid_html_tags)]
90038    #[doc = "Optional. Animation width"]
90039    #[allow(clippy::needless_lifetimes)]
90040    pub fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self {
90041        self.width = width;
90042        self
90043    }
90044    #[allow(rustdoc::invalid_html_tags)]
90045    #[doc = "Optional. Animation width"]
90046    fn rhai_get_width(&mut self) -> Option<i64> {
90047        self.width.as_ref().copied()
90048    }
90049    #[allow(rustdoc::invalid_html_tags)]
90050    #[doc = "Optional. Animation height"]
90051    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90052    pub fn get_height<'a>(&'a self) -> Option<i64> {
90053        self.height.as_ref().map(|v| *v)
90054    }
90055    #[allow(rustdoc::invalid_html_tags)]
90056    #[doc = "Optional. Animation height"]
90057    #[allow(clippy::needless_lifetimes)]
90058    pub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self {
90059        self.height = height;
90060        self
90061    }
90062    #[allow(rustdoc::invalid_html_tags)]
90063    #[doc = "Optional. Animation height"]
90064    fn rhai_get_height(&mut self) -> Option<i64> {
90065        self.height.as_ref().copied()
90066    }
90067    #[allow(rustdoc::invalid_html_tags)]
90068    #[doc = "Optional. Animation duration in seconds"]
90069    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90070    pub fn get_duration<'a>(&'a self) -> Option<i64> {
90071        self.duration.as_ref().map(|v| *v)
90072    }
90073    #[allow(rustdoc::invalid_html_tags)]
90074    #[doc = "Optional. Animation duration in seconds"]
90075    #[allow(clippy::needless_lifetimes)]
90076    pub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self {
90077        self.duration = duration;
90078        self
90079    }
90080    #[allow(rustdoc::invalid_html_tags)]
90081    #[doc = "Optional. Animation duration in seconds"]
90082    fn rhai_get_duration(&mut self) -> Option<i64> {
90083        self.duration.as_ref().copied()
90084    }
90085    #[allow(rustdoc::invalid_html_tags)]
90086    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
90087    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90088    pub fn get_has_spoiler<'a>(&'a self) -> Option<bool> {
90089        self.has_spoiler.as_ref().map(|v| *v)
90090    }
90091    #[allow(rustdoc::invalid_html_tags)]
90092    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
90093    #[allow(clippy::needless_lifetimes)]
90094    pub fn set_has_spoiler<'a>(&'a mut self, has_spoiler: Option<bool>) -> &'a mut Self {
90095        self.has_spoiler = has_spoiler;
90096        self
90097    }
90098    #[allow(rustdoc::invalid_html_tags)]
90099    #[doc = "Optional. Pass True if the animation needs to be covered with a spoiler animation"]
90100    fn rhai_get_has_spoiler(&mut self) -> Option<bool> {
90101        self.has_spoiler.as_ref().copied()
90102    }
90103    fn convert_form(self, data: Form) -> Result<(Form, String)> {
90104        match self.media {
90105            Some(InputFile::Bytes(FileBytes {
90106                name,
90107                bytes: Some(bytes),
90108            })) => {
90109                let attach = format!("attach://{}", name);
90110                let form = data.part(name, Part::bytes(bytes));
90111                Ok((form, attach))
90112            }
90113            Some(InputFile::String(name)) => Ok((data, name)),
90114            _ => Err(anyhow!("cry")),
90115        }
90116    }
90117}
90118#[allow(dead_code)]
90119impl Game {
90120    #[allow(clippy::too_many_arguments)]
90121    pub fn new(title: String, description: String, photo: Vec<PhotoSize>) -> Self {
90122        Self {
90123            title,
90124            description,
90125            photo,
90126            text: None,
90127            text_entities: None,
90128            animation: None,
90129        }
90130    }
90131    #[allow(rustdoc::invalid_html_tags)]
90132    #[doc = "Title of the game"]
90133    #[allow(clippy::needless_lifetimes)]
90134    pub fn get_title<'a>(&'a self) -> &'a str {
90135        self.title.as_str()
90136    }
90137    #[allow(rustdoc::invalid_html_tags)]
90138    #[doc = "Title of the game"]
90139    #[allow(clippy::needless_lifetimes)]
90140    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
90141        self.title = title;
90142        self
90143    }
90144    #[allow(rustdoc::invalid_html_tags)]
90145    #[doc = "Title of the game"]
90146    fn rhai_get_title(&mut self) -> String {
90147        self.title.clone()
90148    }
90149    #[allow(rustdoc::invalid_html_tags)]
90150    #[doc = "Description of the game"]
90151    #[allow(clippy::needless_lifetimes)]
90152    pub fn get_description<'a>(&'a self) -> &'a str {
90153        self.description.as_str()
90154    }
90155    #[allow(rustdoc::invalid_html_tags)]
90156    #[doc = "Description of the game"]
90157    #[allow(clippy::needless_lifetimes)]
90158    pub fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self {
90159        self.description = description;
90160        self
90161    }
90162    #[allow(rustdoc::invalid_html_tags)]
90163    #[doc = "Description of the game"]
90164    fn rhai_get_description(&mut self) -> String {
90165        self.description.clone()
90166    }
90167    #[allow(rustdoc::invalid_html_tags)]
90168    #[doc = "Photo that will be displayed in the game message in chats."]
90169    #[allow(clippy::needless_lifetimes)]
90170    pub fn get_photo<'a>(&'a self) -> &'a Vec<PhotoSize> {
90171        &self.photo
90172    }
90173    #[allow(rustdoc::invalid_html_tags)]
90174    #[doc = "Photo that will be displayed in the game message in chats."]
90175    #[allow(clippy::needless_lifetimes)]
90176    pub fn set_photo<'a>(&'a mut self, photo: Vec<PhotoSize>) -> &'a mut Self {
90177        self.photo = photo;
90178        self
90179    }
90180    #[allow(rustdoc::invalid_html_tags)]
90181    #[doc = "Photo that will be displayed in the game message in chats."]
90182    fn rhai_get_photo(&mut self) -> Vec<PhotoSize> {
90183        self.photo.clone()
90184    }
90185    #[allow(rustdoc::invalid_html_tags)]
90186    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
90187    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90188    pub fn get_text<'a>(&'a self) -> Option<&'a str> {
90189        self.text.as_ref().map(|v| v.as_str())
90190    }
90191    #[allow(rustdoc::invalid_html_tags)]
90192    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
90193    #[allow(clippy::needless_lifetimes)]
90194    pub fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self {
90195        self.text = text;
90196        self
90197    }
90198    #[allow(rustdoc::invalid_html_tags)]
90199    #[doc = "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters."]
90200    fn rhai_get_text(&mut self) -> Option<String> {
90201        self.text.as_ref().cloned()
90202    }
90203    #[allow(rustdoc::invalid_html_tags)]
90204    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
90205    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90206    pub fn get_text_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
90207        self.text_entities.as_ref()
90208    }
90209    #[allow(rustdoc::invalid_html_tags)]
90210    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
90211    #[allow(clippy::needless_lifetimes)]
90212    pub fn set_text_entities<'a>(
90213        &'a mut self,
90214        text_entities: Option<Vec<MessageEntity>>,
90215    ) -> &'a mut Self {
90216        self.text_entities = text_entities;
90217        self
90218    }
90219    #[allow(rustdoc::invalid_html_tags)]
90220    #[doc = "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc."]
90221    fn rhai_get_text_entities(&mut self) -> Option<Vec<MessageEntity>> {
90222        self.text_entities.as_ref().cloned()
90223    }
90224    #[allow(rustdoc::invalid_html_tags)]
90225    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
90226    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90227    pub fn get_animation<'a>(&'a self) -> Option<&'a Animation> {
90228        self.animation.as_ref().map(|v| v.inner_ref())
90229    }
90230    #[allow(rustdoc::invalid_html_tags)]
90231    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
90232    #[allow(clippy::needless_lifetimes)]
90233    pub fn set_animation<'a>(&'a mut self, animation: Option<Animation>) -> &'a mut Self {
90234        self.animation = animation.map(|animation| BoxWrapper(Unbox(animation)));
90235        self
90236    }
90237    #[allow(rustdoc::invalid_html_tags)]
90238    #[doc = "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather"]
90239    fn rhai_get_animation(&mut self) -> Option<Animation> {
90240        self.animation.as_ref().map(|v| v.clone().into())
90241    }
90242}
90243#[allow(dead_code)]
90244impl ChatMemberMember {
90245    #[allow(clippy::too_many_arguments)]
90246    pub fn new<A: Into<User>>(user: A) -> Self {
90247        Self {
90248            user: BoxWrapper::new_unbox(user.into()),
90249            until_date: None,
90250        }
90251    }
90252    #[allow(rustdoc::invalid_html_tags)]
90253    #[doc = "Information about the user"]
90254    #[allow(clippy::needless_lifetimes)]
90255    pub fn get_user<'a>(&'a self) -> &'a User {
90256        &self.user
90257    }
90258    #[allow(rustdoc::invalid_html_tags)]
90259    #[doc = "Information about the user"]
90260    #[allow(clippy::needless_lifetimes)]
90261    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
90262        self.user = BoxWrapper(Unbox(user));
90263        self
90264    }
90265    #[allow(rustdoc::invalid_html_tags)]
90266    #[doc = "Information about the user"]
90267    fn rhai_get_user(&mut self) -> User {
90268        self.user.clone().into()
90269    }
90270    #[allow(rustdoc::invalid_html_tags)]
90271    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
90272    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90273    pub fn get_until_date<'a>(&'a self) -> Option<i64> {
90274        self.until_date.as_ref().map(|v| *v)
90275    }
90276    #[allow(rustdoc::invalid_html_tags)]
90277    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
90278    #[allow(clippy::needless_lifetimes)]
90279    pub fn set_until_date<'a>(&'a mut self, until_date: Option<i64>) -> &'a mut Self {
90280        self.until_date = until_date;
90281        self
90282    }
90283    #[allow(rustdoc::invalid_html_tags)]
90284    #[doc = "Optional. Date when the user's subscription will expire; Unix time"]
90285    fn rhai_get_until_date(&mut self) -> Option<i64> {
90286        self.until_date.as_ref().copied()
90287    }
90288}
90289#[allow(dead_code)]
90290impl ChatPermissions {
90291    #[allow(clippy::too_many_arguments)]
90292    pub fn new() -> Self {
90293        Self {
90294            can_send_messages: None,
90295            can_send_audios: None,
90296            can_send_documents: None,
90297            can_send_photos: None,
90298            can_send_videos: None,
90299            can_send_video_notes: None,
90300            can_send_voice_notes: None,
90301            can_send_polls: None,
90302            can_send_other_messages: None,
90303            can_add_web_page_previews: None,
90304            can_change_info: None,
90305            can_invite_users: None,
90306            can_pin_messages: None,
90307            can_manage_topics: None,
90308        }
90309    }
90310    #[allow(rustdoc::invalid_html_tags)]
90311    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
90312    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90313    pub fn get_can_send_messages<'a>(&'a self) -> Option<bool> {
90314        self.can_send_messages.as_ref().map(|v| *v)
90315    }
90316    #[allow(rustdoc::invalid_html_tags)]
90317    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
90318    #[allow(clippy::needless_lifetimes)]
90319    pub fn set_can_send_messages<'a>(
90320        &'a mut self,
90321        can_send_messages: Option<bool>,
90322    ) -> &'a mut Self {
90323        self.can_send_messages = can_send_messages;
90324        self
90325    }
90326    #[allow(rustdoc::invalid_html_tags)]
90327    #[doc = "Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
90328    fn rhai_get_can_send_messages(&mut self) -> Option<bool> {
90329        self.can_send_messages.as_ref().copied()
90330    }
90331    #[allow(rustdoc::invalid_html_tags)]
90332    #[doc = "Optional. True, if the user is allowed to send audios"]
90333    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90334    pub fn get_can_send_audios<'a>(&'a self) -> Option<bool> {
90335        self.can_send_audios.as_ref().map(|v| *v)
90336    }
90337    #[allow(rustdoc::invalid_html_tags)]
90338    #[doc = "Optional. True, if the user is allowed to send audios"]
90339    #[allow(clippy::needless_lifetimes)]
90340    pub fn set_can_send_audios<'a>(&'a mut self, can_send_audios: Option<bool>) -> &'a mut Self {
90341        self.can_send_audios = can_send_audios;
90342        self
90343    }
90344    #[allow(rustdoc::invalid_html_tags)]
90345    #[doc = "Optional. True, if the user is allowed to send audios"]
90346    fn rhai_get_can_send_audios(&mut self) -> Option<bool> {
90347        self.can_send_audios.as_ref().copied()
90348    }
90349    #[allow(rustdoc::invalid_html_tags)]
90350    #[doc = "Optional. True, if the user is allowed to send documents"]
90351    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90352    pub fn get_can_send_documents<'a>(&'a self) -> Option<bool> {
90353        self.can_send_documents.as_ref().map(|v| *v)
90354    }
90355    #[allow(rustdoc::invalid_html_tags)]
90356    #[doc = "Optional. True, if the user is allowed to send documents"]
90357    #[allow(clippy::needless_lifetimes)]
90358    pub fn set_can_send_documents<'a>(
90359        &'a mut self,
90360        can_send_documents: Option<bool>,
90361    ) -> &'a mut Self {
90362        self.can_send_documents = can_send_documents;
90363        self
90364    }
90365    #[allow(rustdoc::invalid_html_tags)]
90366    #[doc = "Optional. True, if the user is allowed to send documents"]
90367    fn rhai_get_can_send_documents(&mut self) -> Option<bool> {
90368        self.can_send_documents.as_ref().copied()
90369    }
90370    #[allow(rustdoc::invalid_html_tags)]
90371    #[doc = "Optional. True, if the user is allowed to send photos"]
90372    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90373    pub fn get_can_send_photos<'a>(&'a self) -> Option<bool> {
90374        self.can_send_photos.as_ref().map(|v| *v)
90375    }
90376    #[allow(rustdoc::invalid_html_tags)]
90377    #[doc = "Optional. True, if the user is allowed to send photos"]
90378    #[allow(clippy::needless_lifetimes)]
90379    pub fn set_can_send_photos<'a>(&'a mut self, can_send_photos: Option<bool>) -> &'a mut Self {
90380        self.can_send_photos = can_send_photos;
90381        self
90382    }
90383    #[allow(rustdoc::invalid_html_tags)]
90384    #[doc = "Optional. True, if the user is allowed to send photos"]
90385    fn rhai_get_can_send_photos(&mut self) -> Option<bool> {
90386        self.can_send_photos.as_ref().copied()
90387    }
90388    #[allow(rustdoc::invalid_html_tags)]
90389    #[doc = "Optional. True, if the user is allowed to send videos"]
90390    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90391    pub fn get_can_send_videos<'a>(&'a self) -> Option<bool> {
90392        self.can_send_videos.as_ref().map(|v| *v)
90393    }
90394    #[allow(rustdoc::invalid_html_tags)]
90395    #[doc = "Optional. True, if the user is allowed to send videos"]
90396    #[allow(clippy::needless_lifetimes)]
90397    pub fn set_can_send_videos<'a>(&'a mut self, can_send_videos: Option<bool>) -> &'a mut Self {
90398        self.can_send_videos = can_send_videos;
90399        self
90400    }
90401    #[allow(rustdoc::invalid_html_tags)]
90402    #[doc = "Optional. True, if the user is allowed to send videos"]
90403    fn rhai_get_can_send_videos(&mut self) -> Option<bool> {
90404        self.can_send_videos.as_ref().copied()
90405    }
90406    #[allow(rustdoc::invalid_html_tags)]
90407    #[doc = "Optional. True, if the user is allowed to send video notes"]
90408    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90409    pub fn get_can_send_video_notes<'a>(&'a self) -> Option<bool> {
90410        self.can_send_video_notes.as_ref().map(|v| *v)
90411    }
90412    #[allow(rustdoc::invalid_html_tags)]
90413    #[doc = "Optional. True, if the user is allowed to send video notes"]
90414    #[allow(clippy::needless_lifetimes)]
90415    pub fn set_can_send_video_notes<'a>(
90416        &'a mut self,
90417        can_send_video_notes: Option<bool>,
90418    ) -> &'a mut Self {
90419        self.can_send_video_notes = can_send_video_notes;
90420        self
90421    }
90422    #[allow(rustdoc::invalid_html_tags)]
90423    #[doc = "Optional. True, if the user is allowed to send video notes"]
90424    fn rhai_get_can_send_video_notes(&mut self) -> Option<bool> {
90425        self.can_send_video_notes.as_ref().copied()
90426    }
90427    #[allow(rustdoc::invalid_html_tags)]
90428    #[doc = "Optional. True, if the user is allowed to send voice notes"]
90429    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90430    pub fn get_can_send_voice_notes<'a>(&'a self) -> Option<bool> {
90431        self.can_send_voice_notes.as_ref().map(|v| *v)
90432    }
90433    #[allow(rustdoc::invalid_html_tags)]
90434    #[doc = "Optional. True, if the user is allowed to send voice notes"]
90435    #[allow(clippy::needless_lifetimes)]
90436    pub fn set_can_send_voice_notes<'a>(
90437        &'a mut self,
90438        can_send_voice_notes: Option<bool>,
90439    ) -> &'a mut Self {
90440        self.can_send_voice_notes = can_send_voice_notes;
90441        self
90442    }
90443    #[allow(rustdoc::invalid_html_tags)]
90444    #[doc = "Optional. True, if the user is allowed to send voice notes"]
90445    fn rhai_get_can_send_voice_notes(&mut self) -> Option<bool> {
90446        self.can_send_voice_notes.as_ref().copied()
90447    }
90448    #[allow(rustdoc::invalid_html_tags)]
90449    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
90450    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90451    pub fn get_can_send_polls<'a>(&'a self) -> Option<bool> {
90452        self.can_send_polls.as_ref().map(|v| *v)
90453    }
90454    #[allow(rustdoc::invalid_html_tags)]
90455    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
90456    #[allow(clippy::needless_lifetimes)]
90457    pub fn set_can_send_polls<'a>(&'a mut self, can_send_polls: Option<bool>) -> &'a mut Self {
90458        self.can_send_polls = can_send_polls;
90459        self
90460    }
90461    #[allow(rustdoc::invalid_html_tags)]
90462    #[doc = "Optional. True, if the user is allowed to send polls and checklists"]
90463    fn rhai_get_can_send_polls(&mut self) -> Option<bool> {
90464        self.can_send_polls.as_ref().copied()
90465    }
90466    #[allow(rustdoc::invalid_html_tags)]
90467    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
90468    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90469    pub fn get_can_send_other_messages<'a>(&'a self) -> Option<bool> {
90470        self.can_send_other_messages.as_ref().map(|v| *v)
90471    }
90472    #[allow(rustdoc::invalid_html_tags)]
90473    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
90474    #[allow(clippy::needless_lifetimes)]
90475    pub fn set_can_send_other_messages<'a>(
90476        &'a mut self,
90477        can_send_other_messages: Option<bool>,
90478    ) -> &'a mut Self {
90479        self.can_send_other_messages = can_send_other_messages;
90480        self
90481    }
90482    #[allow(rustdoc::invalid_html_tags)]
90483    #[doc = "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots"]
90484    fn rhai_get_can_send_other_messages(&mut self) -> Option<bool> {
90485        self.can_send_other_messages.as_ref().copied()
90486    }
90487    #[allow(rustdoc::invalid_html_tags)]
90488    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
90489    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90490    pub fn get_can_add_web_page_previews<'a>(&'a self) -> Option<bool> {
90491        self.can_add_web_page_previews.as_ref().map(|v| *v)
90492    }
90493    #[allow(rustdoc::invalid_html_tags)]
90494    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
90495    #[allow(clippy::needless_lifetimes)]
90496    pub fn set_can_add_web_page_previews<'a>(
90497        &'a mut self,
90498        can_add_web_page_previews: Option<bool>,
90499    ) -> &'a mut Self {
90500        self.can_add_web_page_previews = can_add_web_page_previews;
90501        self
90502    }
90503    #[allow(rustdoc::invalid_html_tags)]
90504    #[doc = "Optional. True, if the user is allowed to add web page previews to their messages"]
90505    fn rhai_get_can_add_web_page_previews(&mut self) -> Option<bool> {
90506        self.can_add_web_page_previews.as_ref().copied()
90507    }
90508    #[allow(rustdoc::invalid_html_tags)]
90509    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
90510    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90511    pub fn get_can_change_info<'a>(&'a self) -> Option<bool> {
90512        self.can_change_info.as_ref().map(|v| *v)
90513    }
90514    #[allow(rustdoc::invalid_html_tags)]
90515    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
90516    #[allow(clippy::needless_lifetimes)]
90517    pub fn set_can_change_info<'a>(&'a mut self, can_change_info: Option<bool>) -> &'a mut Self {
90518        self.can_change_info = can_change_info;
90519        self
90520    }
90521    #[allow(rustdoc::invalid_html_tags)]
90522    #[doc = "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"]
90523    fn rhai_get_can_change_info(&mut self) -> Option<bool> {
90524        self.can_change_info.as_ref().copied()
90525    }
90526    #[allow(rustdoc::invalid_html_tags)]
90527    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
90528    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90529    pub fn get_can_invite_users<'a>(&'a self) -> Option<bool> {
90530        self.can_invite_users.as_ref().map(|v| *v)
90531    }
90532    #[allow(rustdoc::invalid_html_tags)]
90533    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
90534    #[allow(clippy::needless_lifetimes)]
90535    pub fn set_can_invite_users<'a>(&'a mut self, can_invite_users: Option<bool>) -> &'a mut Self {
90536        self.can_invite_users = can_invite_users;
90537        self
90538    }
90539    #[allow(rustdoc::invalid_html_tags)]
90540    #[doc = "Optional. True, if the user is allowed to invite new users to the chat"]
90541    fn rhai_get_can_invite_users(&mut self) -> Option<bool> {
90542        self.can_invite_users.as_ref().copied()
90543    }
90544    #[allow(rustdoc::invalid_html_tags)]
90545    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
90546    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90547    pub fn get_can_pin_messages<'a>(&'a self) -> Option<bool> {
90548        self.can_pin_messages.as_ref().map(|v| *v)
90549    }
90550    #[allow(rustdoc::invalid_html_tags)]
90551    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
90552    #[allow(clippy::needless_lifetimes)]
90553    pub fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: Option<bool>) -> &'a mut Self {
90554        self.can_pin_messages = can_pin_messages;
90555        self
90556    }
90557    #[allow(rustdoc::invalid_html_tags)]
90558    #[doc = "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups"]
90559    fn rhai_get_can_pin_messages(&mut self) -> Option<bool> {
90560        self.can_pin_messages.as_ref().copied()
90561    }
90562    #[allow(rustdoc::invalid_html_tags)]
90563    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
90564    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90565    pub fn get_can_manage_topics<'a>(&'a self) -> Option<bool> {
90566        self.can_manage_topics.as_ref().map(|v| *v)
90567    }
90568    #[allow(rustdoc::invalid_html_tags)]
90569    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
90570    #[allow(clippy::needless_lifetimes)]
90571    pub fn set_can_manage_topics<'a>(
90572        &'a mut self,
90573        can_manage_topics: Option<bool>,
90574    ) -> &'a mut Self {
90575        self.can_manage_topics = can_manage_topics;
90576        self
90577    }
90578    #[allow(rustdoc::invalid_html_tags)]
90579    #[doc = "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages"]
90580    fn rhai_get_can_manage_topics(&mut self) -> Option<bool> {
90581        self.can_manage_topics.as_ref().copied()
90582    }
90583}
90584#[allow(dead_code)]
90585impl StarTransactions {
90586    #[allow(clippy::too_many_arguments)]
90587    pub fn new(transactions: Vec<StarTransaction>) -> Self {
90588        Self { transactions }
90589    }
90590    #[allow(rustdoc::invalid_html_tags)]
90591    #[doc = "The list of transactions"]
90592    #[allow(clippy::needless_lifetimes)]
90593    pub fn get_transactions<'a>(&'a self) -> &'a Vec<StarTransaction> {
90594        &self.transactions
90595    }
90596    #[allow(rustdoc::invalid_html_tags)]
90597    #[doc = "The list of transactions"]
90598    #[allow(clippy::needless_lifetimes)]
90599    pub fn set_transactions<'a>(&'a mut self, transactions: Vec<StarTransaction>) -> &'a mut Self {
90600        self.transactions = transactions;
90601        self
90602    }
90603    #[allow(rustdoc::invalid_html_tags)]
90604    #[doc = "The list of transactions"]
90605    fn rhai_get_transactions(&mut self) -> Vec<StarTransaction> {
90606        self.transactions.clone()
90607    }
90608}
90609#[allow(dead_code)]
90610impl EncryptedCredentials {
90611    #[allow(clippy::too_many_arguments)]
90612    pub fn new(data: String, hash: String, secret: String) -> Self {
90613        Self { data, hash, secret }
90614    }
90615    #[allow(rustdoc::invalid_html_tags)]
90616    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
90617    #[allow(clippy::needless_lifetimes)]
90618    pub fn get_data<'a>(&'a self) -> &'a str {
90619        self.data.as_str()
90620    }
90621    #[allow(rustdoc::invalid_html_tags)]
90622    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
90623    #[allow(clippy::needless_lifetimes)]
90624    pub fn set_data<'a>(&'a mut self, data: String) -> &'a mut Self {
90625        self.data = data;
90626        self
90627    }
90628    #[allow(rustdoc::invalid_html_tags)]
90629    #[doc = "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication"]
90630    fn rhai_get_data(&mut self) -> String {
90631        self.data.clone()
90632    }
90633    #[allow(rustdoc::invalid_html_tags)]
90634    #[doc = "Base64-encoded data hash for data authentication"]
90635    #[allow(clippy::needless_lifetimes)]
90636    pub fn get_hash<'a>(&'a self) -> &'a str {
90637        self.hash.as_str()
90638    }
90639    #[allow(rustdoc::invalid_html_tags)]
90640    #[doc = "Base64-encoded data hash for data authentication"]
90641    #[allow(clippy::needless_lifetimes)]
90642    pub fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self {
90643        self.hash = hash;
90644        self
90645    }
90646    #[allow(rustdoc::invalid_html_tags)]
90647    #[doc = "Base64-encoded data hash for data authentication"]
90648    fn rhai_get_hash(&mut self) -> String {
90649        self.hash.clone()
90650    }
90651    #[allow(rustdoc::invalid_html_tags)]
90652    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
90653    #[allow(clippy::needless_lifetimes)]
90654    pub fn get_secret<'a>(&'a self) -> &'a str {
90655        self.secret.as_str()
90656    }
90657    #[allow(rustdoc::invalid_html_tags)]
90658    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
90659    #[allow(clippy::needless_lifetimes)]
90660    pub fn set_secret<'a>(&'a mut self, secret: String) -> &'a mut Self {
90661        self.secret = secret;
90662        self
90663    }
90664    #[allow(rustdoc::invalid_html_tags)]
90665    #[doc = "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption"]
90666    fn rhai_get_secret(&mut self) -> String {
90667        self.secret.clone()
90668    }
90669}
90670#[allow(dead_code)]
90671impl StoryAreaTypeSuggestedReaction {
90672    #[allow(clippy::too_many_arguments)]
90673    pub fn new<A: Into<ReactionType>>(reaction_type: A) -> Self {
90674        Self {
90675            tg_type: "StoryAreaTypeSuggestedReaction".to_owned(),
90676            reaction_type: BoxWrapper::new_unbox(reaction_type.into()),
90677            is_dark: None,
90678            is_flipped: None,
90679        }
90680    }
90681    #[allow(rustdoc::invalid_html_tags)]
90682    #[doc = "Type of the area, always \"suggested_reaction\""]
90683    #[allow(clippy::needless_lifetimes)]
90684    pub fn get_tg_type<'a>(&'a self) -> &'a str {
90685        self.tg_type.as_str()
90686    }
90687    #[allow(rustdoc::invalid_html_tags)]
90688    #[doc = "Type of the area, always \"suggested_reaction\""]
90689    #[allow(clippy::needless_lifetimes)]
90690    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
90691        self.tg_type = tg_type;
90692        self
90693    }
90694    #[allow(rustdoc::invalid_html_tags)]
90695    #[doc = "Type of the area, always \"suggested_reaction\""]
90696    fn rhai_get_tg_type(&mut self) -> String {
90697        self.tg_type.clone()
90698    }
90699    #[allow(rustdoc::invalid_html_tags)]
90700    #[doc = "Type of the reaction"]
90701    #[allow(clippy::needless_lifetimes)]
90702    pub fn get_reaction_type<'a>(&'a self) -> &'a ReactionType {
90703        &self.reaction_type
90704    }
90705    #[allow(rustdoc::invalid_html_tags)]
90706    #[doc = "Type of the reaction"]
90707    #[allow(clippy::needless_lifetimes)]
90708    pub fn set_reaction_type<'a>(&'a mut self, reaction_type: ReactionType) -> &'a mut Self {
90709        self.reaction_type = BoxWrapper(Unbox(reaction_type));
90710        self
90711    }
90712    #[allow(rustdoc::invalid_html_tags)]
90713    #[doc = "Type of the reaction"]
90714    fn rhai_get_reaction_type(&mut self) -> ReactionType {
90715        self.reaction_type.clone().into()
90716    }
90717    #[allow(rustdoc::invalid_html_tags)]
90718    #[doc = "Optional. Pass True if the reaction area has a dark background"]
90719    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90720    pub fn get_is_dark<'a>(&'a self) -> Option<bool> {
90721        self.is_dark.as_ref().map(|v| *v)
90722    }
90723    #[allow(rustdoc::invalid_html_tags)]
90724    #[doc = "Optional. Pass True if the reaction area has a dark background"]
90725    #[allow(clippy::needless_lifetimes)]
90726    pub fn set_is_dark<'a>(&'a mut self, is_dark: Option<bool>) -> &'a mut Self {
90727        self.is_dark = is_dark;
90728        self
90729    }
90730    #[allow(rustdoc::invalid_html_tags)]
90731    #[doc = "Optional. Pass True if the reaction area has a dark background"]
90732    fn rhai_get_is_dark(&mut self) -> Option<bool> {
90733        self.is_dark.as_ref().copied()
90734    }
90735    #[allow(rustdoc::invalid_html_tags)]
90736    #[doc = "Optional. Pass True if reaction area corner is flipped"]
90737    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90738    pub fn get_is_flipped<'a>(&'a self) -> Option<bool> {
90739        self.is_flipped.as_ref().map(|v| *v)
90740    }
90741    #[allow(rustdoc::invalid_html_tags)]
90742    #[doc = "Optional. Pass True if reaction area corner is flipped"]
90743    #[allow(clippy::needless_lifetimes)]
90744    pub fn set_is_flipped<'a>(&'a mut self, is_flipped: Option<bool>) -> &'a mut Self {
90745        self.is_flipped = is_flipped;
90746        self
90747    }
90748    #[allow(rustdoc::invalid_html_tags)]
90749    #[doc = "Optional. Pass True if reaction area corner is flipped"]
90750    fn rhai_get_is_flipped(&mut self) -> Option<bool> {
90751        self.is_flipped.as_ref().copied()
90752    }
90753}
90754#[allow(dead_code)]
90755impl ChecklistTasksAdded {
90756    #[allow(clippy::too_many_arguments)]
90757    pub fn new(tasks: Vec<ChecklistTask>) -> Self {
90758        Self {
90759            tasks,
90760            checklist_message: None,
90761        }
90762    }
90763    #[allow(rustdoc::invalid_html_tags)]
90764    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
90765    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90766    pub fn get_checklist_message<'a>(&'a self) -> Option<&'a Message> {
90767        self.checklist_message.as_ref().map(|v| v.inner_ref())
90768    }
90769    #[allow(rustdoc::invalid_html_tags)]
90770    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
90771    #[allow(clippy::needless_lifetimes)]
90772    pub fn set_checklist_message<'a>(
90773        &'a mut self,
90774        checklist_message: Option<Message>,
90775    ) -> &'a mut Self {
90776        self.checklist_message =
90777            checklist_message.map(|checklist_message| BoxWrapper(Unbox(checklist_message)));
90778        self
90779    }
90780    #[allow(rustdoc::invalid_html_tags)]
90781    #[doc = "Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
90782    fn rhai_get_checklist_message(&mut self) -> Option<Message> {
90783        self.checklist_message.as_ref().map(|v| v.clone().into())
90784    }
90785    #[allow(rustdoc::invalid_html_tags)]
90786    #[doc = "List of tasks added to the checklist"]
90787    #[allow(clippy::needless_lifetimes)]
90788    pub fn get_tasks<'a>(&'a self) -> &'a Vec<ChecklistTask> {
90789        &self.tasks
90790    }
90791    #[allow(rustdoc::invalid_html_tags)]
90792    #[doc = "List of tasks added to the checklist"]
90793    #[allow(clippy::needless_lifetimes)]
90794    pub fn set_tasks<'a>(&'a mut self, tasks: Vec<ChecklistTask>) -> &'a mut Self {
90795        self.tasks = tasks;
90796        self
90797    }
90798    #[allow(rustdoc::invalid_html_tags)]
90799    #[doc = "List of tasks added to the checklist"]
90800    fn rhai_get_tasks(&mut self) -> Vec<ChecklistTask> {
90801        self.tasks.clone()
90802    }
90803}
90804impl TraitInputTextMessageContent for InputTextMessageContent {
90805    #[allow(rustdoc::invalid_html_tags)]
90806    #[doc = "Text of the message to be sent, 1-4096 characters"]
90807    #[allow(clippy::needless_lifetimes)]
90808    fn get_message_text<'a>(&'a self) -> &'a str {
90809        self.message_text.as_str()
90810    }
90811    #[allow(rustdoc::invalid_html_tags)]
90812    #[doc = "Text of the message to be sent, 1-4096 characters"]
90813    #[allow(clippy::needless_lifetimes)]
90814    fn set_message_text<'a>(&'a mut self, message_text: String) -> &'a mut Self {
90815        self.message_text = message_text;
90816        self
90817    }
90818    #[allow(rustdoc::invalid_html_tags)]
90819    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
90820    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90821    fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
90822        self.parse_mode.as_ref().map(|v| v.as_str())
90823    }
90824    #[allow(rustdoc::invalid_html_tags)]
90825    #[doc = "Optional. Mode for parsing entities in the message text. See formatting options for more details."]
90826    #[allow(clippy::needless_lifetimes)]
90827    fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
90828        self.parse_mode = parse_mode;
90829        self
90830    }
90831    #[allow(rustdoc::invalid_html_tags)]
90832    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
90833    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90834    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
90835        self.entities.as_ref()
90836    }
90837    #[allow(rustdoc::invalid_html_tags)]
90838    #[doc = "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode"]
90839    #[allow(clippy::needless_lifetimes)]
90840    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
90841        self.entities = entities;
90842        self
90843    }
90844    #[allow(rustdoc::invalid_html_tags)]
90845    #[doc = "Optional. Link preview generation options for the message"]
90846    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90847    fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions> {
90848        self.link_preview_options.as_ref().map(|v| v.inner_ref())
90849    }
90850    #[allow(rustdoc::invalid_html_tags)]
90851    #[doc = "Optional. Link preview generation options for the message"]
90852    #[allow(clippy::needless_lifetimes)]
90853    fn set_link_preview_options<'a>(
90854        &'a mut self,
90855        link_preview_options: Option<LinkPreviewOptions>,
90856    ) -> &'a mut Self {
90857        self.link_preview_options = link_preview_options
90858            .map(|link_preview_options| BoxWrapper(Unbox(link_preview_options)));
90859        self
90860    }
90861}
90862impl TraitInputLocationMessageContent for InputLocationMessageContent {
90863    #[allow(rustdoc::invalid_html_tags)]
90864    #[doc = "Latitude of the location in degrees"]
90865    #[allow(clippy::needless_lifetimes)]
90866    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
90867        self.latitude
90868    }
90869    #[allow(rustdoc::invalid_html_tags)]
90870    #[doc = "Latitude of the location in degrees"]
90871    #[allow(clippy::needless_lifetimes)]
90872    fn set_latitude<'a>(
90873        &'a mut self,
90874        latitude: ::ordered_float::OrderedFloat<f64>,
90875    ) -> &'a mut Self {
90876        self.latitude = latitude;
90877        self
90878    }
90879    #[allow(rustdoc::invalid_html_tags)]
90880    #[doc = "Longitude of the location in degrees"]
90881    #[allow(clippy::needless_lifetimes)]
90882    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
90883        self.longitude
90884    }
90885    #[allow(rustdoc::invalid_html_tags)]
90886    #[doc = "Longitude of the location in degrees"]
90887    #[allow(clippy::needless_lifetimes)]
90888    fn set_longitude<'a>(
90889        &'a mut self,
90890        longitude: ::ordered_float::OrderedFloat<f64>,
90891    ) -> &'a mut Self {
90892        self.longitude = longitude;
90893        self
90894    }
90895    #[allow(rustdoc::invalid_html_tags)]
90896    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
90897    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90898    fn get_horizontal_accuracy<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
90899        self.horizontal_accuracy.as_ref().map(|v| *v)
90900    }
90901    #[allow(rustdoc::invalid_html_tags)]
90902    #[doc = "Optional. The radius of uncertainty for the location, measured in meters; 0-1500"]
90903    #[allow(clippy::needless_lifetimes)]
90904    fn set_horizontal_accuracy<'a>(
90905        &'a mut self,
90906        horizontal_accuracy: Option<::ordered_float::OrderedFloat<f64>>,
90907    ) -> &'a mut Self {
90908        self.horizontal_accuracy = horizontal_accuracy;
90909        self
90910    }
90911    #[allow(rustdoc::invalid_html_tags)]
90912    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
90913    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90914    fn get_live_period<'a>(&'a self) -> Option<i64> {
90915        self.live_period.as_ref().map(|v| *v)
90916    }
90917    #[allow(rustdoc::invalid_html_tags)]
90918    #[doc = "Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."]
90919    #[allow(clippy::needless_lifetimes)]
90920    fn set_live_period<'a>(&'a mut self, live_period: Option<i64>) -> &'a mut Self {
90921        self.live_period = live_period;
90922        self
90923    }
90924    #[allow(rustdoc::invalid_html_tags)]
90925    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
90926    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90927    fn get_heading<'a>(&'a self) -> Option<i64> {
90928        self.heading.as_ref().map(|v| *v)
90929    }
90930    #[allow(rustdoc::invalid_html_tags)]
90931    #[doc = "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."]
90932    #[allow(clippy::needless_lifetimes)]
90933    fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self {
90934        self.heading = heading;
90935        self
90936    }
90937    #[allow(rustdoc::invalid_html_tags)]
90938    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
90939    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
90940    fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64> {
90941        self.proximity_alert_radius.as_ref().map(|v| *v)
90942    }
90943    #[allow(rustdoc::invalid_html_tags)]
90944    #[doc = "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."]
90945    #[allow(clippy::needless_lifetimes)]
90946    fn set_proximity_alert_radius<'a>(
90947        &'a mut self,
90948        proximity_alert_radius: Option<i64>,
90949    ) -> &'a mut Self {
90950        self.proximity_alert_radius = proximity_alert_radius;
90951        self
90952    }
90953}
90954impl TraitInputVenueMessageContent for InputVenueMessageContent {
90955    #[allow(rustdoc::invalid_html_tags)]
90956    #[doc = "Latitude of the venue in degrees"]
90957    #[allow(clippy::needless_lifetimes)]
90958    fn get_latitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
90959        self.latitude
90960    }
90961    #[allow(rustdoc::invalid_html_tags)]
90962    #[doc = "Latitude of the venue in degrees"]
90963    #[allow(clippy::needless_lifetimes)]
90964    fn set_latitude<'a>(
90965        &'a mut self,
90966        latitude: ::ordered_float::OrderedFloat<f64>,
90967    ) -> &'a mut Self {
90968        self.latitude = latitude;
90969        self
90970    }
90971    #[allow(rustdoc::invalid_html_tags)]
90972    #[doc = "Longitude of the venue in degrees"]
90973    #[allow(clippy::needless_lifetimes)]
90974    fn get_longitude<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
90975        self.longitude
90976    }
90977    #[allow(rustdoc::invalid_html_tags)]
90978    #[doc = "Longitude of the venue in degrees"]
90979    #[allow(clippy::needless_lifetimes)]
90980    fn set_longitude<'a>(
90981        &'a mut self,
90982        longitude: ::ordered_float::OrderedFloat<f64>,
90983    ) -> &'a mut Self {
90984        self.longitude = longitude;
90985        self
90986    }
90987    #[allow(rustdoc::invalid_html_tags)]
90988    #[doc = "Name of the venue"]
90989    #[allow(clippy::needless_lifetimes)]
90990    fn get_title<'a>(&'a self) -> &'a str {
90991        self.title.as_str()
90992    }
90993    #[allow(rustdoc::invalid_html_tags)]
90994    #[doc = "Name of the venue"]
90995    #[allow(clippy::needless_lifetimes)]
90996    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
90997        self.title = title;
90998        self
90999    }
91000    #[allow(rustdoc::invalid_html_tags)]
91001    #[doc = "Address of the venue"]
91002    #[allow(clippy::needless_lifetimes)]
91003    fn get_address<'a>(&'a self) -> &'a str {
91004        self.address.as_str()
91005    }
91006    #[allow(rustdoc::invalid_html_tags)]
91007    #[doc = "Address of the venue"]
91008    #[allow(clippy::needless_lifetimes)]
91009    fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self {
91010        self.address = address;
91011        self
91012    }
91013    #[allow(rustdoc::invalid_html_tags)]
91014    #[doc = "Optional. Foursquare identifier of the venue, if known"]
91015    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91016    fn get_foursquare_id<'a>(&'a self) -> Option<&'a str> {
91017        self.foursquare_id.as_ref().map(|v| v.as_str())
91018    }
91019    #[allow(rustdoc::invalid_html_tags)]
91020    #[doc = "Optional. Foursquare identifier of the venue, if known"]
91021    #[allow(clippy::needless_lifetimes)]
91022    fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self {
91023        self.foursquare_id = foursquare_id;
91024        self
91025    }
91026    #[allow(rustdoc::invalid_html_tags)]
91027    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
91028    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91029    fn get_foursquare_type<'a>(&'a self) -> Option<&'a str> {
91030        self.foursquare_type.as_ref().map(|v| v.as_str())
91031    }
91032    #[allow(rustdoc::invalid_html_tags)]
91033    #[doc = "Optional. Foursquare type of the venue, if known. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
91034    #[allow(clippy::needless_lifetimes)]
91035    fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self {
91036        self.foursquare_type = foursquare_type;
91037        self
91038    }
91039    #[allow(rustdoc::invalid_html_tags)]
91040    #[doc = "Optional. Google Places identifier of the venue"]
91041    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91042    fn get_google_place_id<'a>(&'a self) -> Option<&'a str> {
91043        self.google_place_id.as_ref().map(|v| v.as_str())
91044    }
91045    #[allow(rustdoc::invalid_html_tags)]
91046    #[doc = "Optional. Google Places identifier of the venue"]
91047    #[allow(clippy::needless_lifetimes)]
91048    fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self {
91049        self.google_place_id = google_place_id;
91050        self
91051    }
91052    #[allow(rustdoc::invalid_html_tags)]
91053    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
91054    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91055    fn get_google_place_type<'a>(&'a self) -> Option<&'a str> {
91056        self.google_place_type.as_ref().map(|v| v.as_str())
91057    }
91058    #[allow(rustdoc::invalid_html_tags)]
91059    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
91060    #[allow(clippy::needless_lifetimes)]
91061    fn set_google_place_type<'a>(&'a mut self, google_place_type: Option<String>) -> &'a mut Self {
91062        self.google_place_type = google_place_type;
91063        self
91064    }
91065}
91066impl TraitInputContactMessageContent for InputContactMessageContent {
91067    #[allow(rustdoc::invalid_html_tags)]
91068    #[doc = "Contact's phone number"]
91069    #[allow(clippy::needless_lifetimes)]
91070    fn get_phone_number<'a>(&'a self) -> &'a str {
91071        self.phone_number.as_str()
91072    }
91073    #[allow(rustdoc::invalid_html_tags)]
91074    #[doc = "Contact's phone number"]
91075    #[allow(clippy::needless_lifetimes)]
91076    fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self {
91077        self.phone_number = phone_number;
91078        self
91079    }
91080    #[allow(rustdoc::invalid_html_tags)]
91081    #[doc = "Contact's first name"]
91082    #[allow(clippy::needless_lifetimes)]
91083    fn get_first_name<'a>(&'a self) -> &'a str {
91084        self.first_name.as_str()
91085    }
91086    #[allow(rustdoc::invalid_html_tags)]
91087    #[doc = "Contact's first name"]
91088    #[allow(clippy::needless_lifetimes)]
91089    fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self {
91090        self.first_name = first_name;
91091        self
91092    }
91093    #[allow(rustdoc::invalid_html_tags)]
91094    #[doc = "Optional. Contact's last name"]
91095    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91096    fn get_last_name<'a>(&'a self) -> Option<&'a str> {
91097        self.last_name.as_ref().map(|v| v.as_str())
91098    }
91099    #[allow(rustdoc::invalid_html_tags)]
91100    #[doc = "Optional. Contact's last name"]
91101    #[allow(clippy::needless_lifetimes)]
91102    fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
91103        self.last_name = last_name;
91104        self
91105    }
91106    #[allow(rustdoc::invalid_html_tags)]
91107    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
91108    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91109    fn get_vcard<'a>(&'a self) -> Option<&'a str> {
91110        self.vcard.as_ref().map(|v| v.as_str())
91111    }
91112    #[allow(rustdoc::invalid_html_tags)]
91113    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
91114    #[allow(clippy::needless_lifetimes)]
91115    fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self {
91116        self.vcard = vcard;
91117        self
91118    }
91119}
91120impl TraitInputInvoiceMessageContent for InputInvoiceMessageContent {
91121    #[allow(rustdoc::invalid_html_tags)]
91122    #[doc = "Product name, 1-32 characters"]
91123    #[allow(clippy::needless_lifetimes)]
91124    fn get_title<'a>(&'a self) -> &'a str {
91125        self.title.as_str()
91126    }
91127    #[allow(rustdoc::invalid_html_tags)]
91128    #[doc = "Product name, 1-32 characters"]
91129    #[allow(clippy::needless_lifetimes)]
91130    fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
91131        self.title = title;
91132        self
91133    }
91134    #[allow(rustdoc::invalid_html_tags)]
91135    #[doc = "Product description, 1-255 characters"]
91136    #[allow(clippy::needless_lifetimes)]
91137    fn get_description<'a>(&'a self) -> &'a str {
91138        self.description.as_str()
91139    }
91140    #[allow(rustdoc::invalid_html_tags)]
91141    #[doc = "Product description, 1-255 characters"]
91142    #[allow(clippy::needless_lifetimes)]
91143    fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self {
91144        self.description = description;
91145        self
91146    }
91147    #[allow(rustdoc::invalid_html_tags)]
91148    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
91149    #[allow(clippy::needless_lifetimes)]
91150    fn get_payload<'a>(&'a self) -> &'a str {
91151        self.payload.as_str()
91152    }
91153    #[allow(rustdoc::invalid_html_tags)]
91154    #[doc = "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."]
91155    #[allow(clippy::needless_lifetimes)]
91156    fn set_payload<'a>(&'a mut self, payload: String) -> &'a mut Self {
91157        self.payload = payload;
91158        self
91159    }
91160    #[allow(rustdoc::invalid_html_tags)]
91161    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
91162    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91163    fn get_provider_token<'a>(&'a self) -> Option<&'a str> {
91164        self.provider_token.as_ref().map(|v| v.as_str())
91165    }
91166    #[allow(rustdoc::invalid_html_tags)]
91167    #[doc = "Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars."]
91168    #[allow(clippy::needless_lifetimes)]
91169    fn set_provider_token<'a>(&'a mut self, provider_token: Option<String>) -> &'a mut Self {
91170        self.provider_token = provider_token;
91171        self
91172    }
91173    #[allow(rustdoc::invalid_html_tags)]
91174    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
91175    #[allow(clippy::needless_lifetimes)]
91176    fn get_currency<'a>(&'a self) -> &'a str {
91177        self.currency.as_str()
91178    }
91179    #[allow(rustdoc::invalid_html_tags)]
91180    #[doc = "Three-letter ISO 4217 currency code, see more on currencies. Pass \"XTR\" for payments in Telegram Stars."]
91181    #[allow(clippy::needless_lifetimes)]
91182    fn set_currency<'a>(&'a mut self, currency: String) -> &'a mut Self {
91183        self.currency = currency;
91184        self
91185    }
91186    #[allow(rustdoc::invalid_html_tags)]
91187    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
91188    #[allow(clippy::needless_lifetimes)]
91189    fn get_prices<'a>(&'a self) -> &'a Vec<LabeledPrice> {
91190        &self.prices
91191    }
91192    #[allow(rustdoc::invalid_html_tags)]
91193    #[doc = "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars."]
91194    #[allow(clippy::needless_lifetimes)]
91195    fn set_prices<'a>(&'a mut self, prices: Vec<LabeledPrice>) -> &'a mut Self {
91196        self.prices = prices;
91197        self
91198    }
91199    #[allow(rustdoc::invalid_html_tags)]
91200    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
91201    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91202    fn get_max_tip_amount<'a>(&'a self) -> Option<i64> {
91203        self.max_tip_amount.as_ref().map(|v| *v)
91204    }
91205    #[allow(rustdoc::invalid_html_tags)]
91206    #[doc = "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars."]
91207    #[allow(clippy::needless_lifetimes)]
91208    fn set_max_tip_amount<'a>(&'a mut self, max_tip_amount: Option<i64>) -> &'a mut Self {
91209        self.max_tip_amount = max_tip_amount;
91210        self
91211    }
91212    #[allow(rustdoc::invalid_html_tags)]
91213    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
91214    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91215    fn get_suggested_tip_amounts<'a>(&'a self) -> Option<&'a Vec<i64>> {
91216        self.suggested_tip_amounts.as_ref()
91217    }
91218    #[allow(rustdoc::invalid_html_tags)]
91219    #[doc = "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."]
91220    #[allow(clippy::needless_lifetimes)]
91221    fn set_suggested_tip_amounts<'a>(
91222        &'a mut self,
91223        suggested_tip_amounts: Option<Vec<i64>>,
91224    ) -> &'a mut Self {
91225        self.suggested_tip_amounts = suggested_tip_amounts;
91226        self
91227    }
91228    #[allow(rustdoc::invalid_html_tags)]
91229    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
91230    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91231    fn get_provider_data<'a>(&'a self) -> Option<&'a str> {
91232        self.provider_data.as_ref().map(|v| v.as_str())
91233    }
91234    #[allow(rustdoc::invalid_html_tags)]
91235    #[doc = "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."]
91236    #[allow(clippy::needless_lifetimes)]
91237    fn set_provider_data<'a>(&'a mut self, provider_data: Option<String>) -> &'a mut Self {
91238        self.provider_data = provider_data;
91239        self
91240    }
91241    #[allow(rustdoc::invalid_html_tags)]
91242    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
91243    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91244    fn get_photo_url<'a>(&'a self) -> Option<&'a str> {
91245        self.photo_url.as_ref().map(|v| v.as_str())
91246    }
91247    #[allow(rustdoc::invalid_html_tags)]
91248    #[doc = "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service."]
91249    #[allow(clippy::needless_lifetimes)]
91250    fn set_photo_url<'a>(&'a mut self, photo_url: Option<String>) -> &'a mut Self {
91251        self.photo_url = photo_url;
91252        self
91253    }
91254    #[allow(rustdoc::invalid_html_tags)]
91255    #[doc = "Optional. Photo size in bytes"]
91256    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91257    fn get_photo_size<'a>(&'a self) -> Option<i64> {
91258        self.photo_size.as_ref().map(|v| *v)
91259    }
91260    #[allow(rustdoc::invalid_html_tags)]
91261    #[doc = "Optional. Photo size in bytes"]
91262    #[allow(clippy::needless_lifetimes)]
91263    fn set_photo_size<'a>(&'a mut self, photo_size: Option<i64>) -> &'a mut Self {
91264        self.photo_size = photo_size;
91265        self
91266    }
91267    #[allow(rustdoc::invalid_html_tags)]
91268    #[doc = "Optional. Photo width"]
91269    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91270    fn get_photo_width<'a>(&'a self) -> Option<i64> {
91271        self.photo_width.as_ref().map(|v| *v)
91272    }
91273    #[allow(rustdoc::invalid_html_tags)]
91274    #[doc = "Optional. Photo width"]
91275    #[allow(clippy::needless_lifetimes)]
91276    fn set_photo_width<'a>(&'a mut self, photo_width: Option<i64>) -> &'a mut Self {
91277        self.photo_width = photo_width;
91278        self
91279    }
91280    #[allow(rustdoc::invalid_html_tags)]
91281    #[doc = "Optional. Photo height"]
91282    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91283    fn get_photo_height<'a>(&'a self) -> Option<i64> {
91284        self.photo_height.as_ref().map(|v| *v)
91285    }
91286    #[allow(rustdoc::invalid_html_tags)]
91287    #[doc = "Optional. Photo height"]
91288    #[allow(clippy::needless_lifetimes)]
91289    fn set_photo_height<'a>(&'a mut self, photo_height: Option<i64>) -> &'a mut Self {
91290        self.photo_height = photo_height;
91291        self
91292    }
91293    #[allow(rustdoc::invalid_html_tags)]
91294    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
91295    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91296    fn get_need_name<'a>(&'a self) -> Option<bool> {
91297        self.need_name.as_ref().map(|v| *v)
91298    }
91299    #[allow(rustdoc::invalid_html_tags)]
91300    #[doc = "Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars."]
91301    #[allow(clippy::needless_lifetimes)]
91302    fn set_need_name<'a>(&'a mut self, need_name: Option<bool>) -> &'a mut Self {
91303        self.need_name = need_name;
91304        self
91305    }
91306    #[allow(rustdoc::invalid_html_tags)]
91307    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
91308    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91309    fn get_need_phone_number<'a>(&'a self) -> Option<bool> {
91310        self.need_phone_number.as_ref().map(|v| *v)
91311    }
91312    #[allow(rustdoc::invalid_html_tags)]
91313    #[doc = "Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars."]
91314    #[allow(clippy::needless_lifetimes)]
91315    fn set_need_phone_number<'a>(&'a mut self, need_phone_number: Option<bool>) -> &'a mut Self {
91316        self.need_phone_number = need_phone_number;
91317        self
91318    }
91319    #[allow(rustdoc::invalid_html_tags)]
91320    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
91321    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91322    fn get_need_email<'a>(&'a self) -> Option<bool> {
91323        self.need_email.as_ref().map(|v| *v)
91324    }
91325    #[allow(rustdoc::invalid_html_tags)]
91326    #[doc = "Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars."]
91327    #[allow(clippy::needless_lifetimes)]
91328    fn set_need_email<'a>(&'a mut self, need_email: Option<bool>) -> &'a mut Self {
91329        self.need_email = need_email;
91330        self
91331    }
91332    #[allow(rustdoc::invalid_html_tags)]
91333    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
91334    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91335    fn get_need_shipping_address<'a>(&'a self) -> Option<bool> {
91336        self.need_shipping_address.as_ref().map(|v| *v)
91337    }
91338    #[allow(rustdoc::invalid_html_tags)]
91339    #[doc = "Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars."]
91340    #[allow(clippy::needless_lifetimes)]
91341    fn set_need_shipping_address<'a>(
91342        &'a mut self,
91343        need_shipping_address: Option<bool>,
91344    ) -> &'a mut Self {
91345        self.need_shipping_address = need_shipping_address;
91346        self
91347    }
91348    #[allow(rustdoc::invalid_html_tags)]
91349    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
91350    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91351    fn get_send_phone_number_to_provider<'a>(&'a self) -> Option<bool> {
91352        self.send_phone_number_to_provider.as_ref().map(|v| *v)
91353    }
91354    #[allow(rustdoc::invalid_html_tags)]
91355    #[doc = "Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars."]
91356    #[allow(clippy::needless_lifetimes)]
91357    fn set_send_phone_number_to_provider<'a>(
91358        &'a mut self,
91359        send_phone_number_to_provider: Option<bool>,
91360    ) -> &'a mut Self {
91361        self.send_phone_number_to_provider = send_phone_number_to_provider;
91362        self
91363    }
91364    #[allow(rustdoc::invalid_html_tags)]
91365    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
91366    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91367    fn get_send_email_to_provider<'a>(&'a self) -> Option<bool> {
91368        self.send_email_to_provider.as_ref().map(|v| *v)
91369    }
91370    #[allow(rustdoc::invalid_html_tags)]
91371    #[doc = "Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars."]
91372    #[allow(clippy::needless_lifetimes)]
91373    fn set_send_email_to_provider<'a>(
91374        &'a mut self,
91375        send_email_to_provider: Option<bool>,
91376    ) -> &'a mut Self {
91377        self.send_email_to_provider = send_email_to_provider;
91378        self
91379    }
91380    #[allow(rustdoc::invalid_html_tags)]
91381    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
91382    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91383    fn get_is_flexible<'a>(&'a self) -> Option<bool> {
91384        self.is_flexible.as_ref().map(|v| *v)
91385    }
91386    #[allow(rustdoc::invalid_html_tags)]
91387    #[doc = "Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars."]
91388    #[allow(clippy::needless_lifetimes)]
91389    fn set_is_flexible<'a>(&'a mut self, is_flexible: Option<bool>) -> &'a mut Self {
91390        self.is_flexible = is_flexible;
91391        self
91392    }
91393}
91394#[allow(dead_code)]
91395impl BackgroundFillGradient {
91396    #[allow(clippy::too_many_arguments)]
91397    pub fn new(top_color: i64, bottom_color: i64, rotation_angle: i64) -> Self {
91398        Self {
91399            tg_type: "BackgroundFillGradient".to_owned(),
91400            top_color,
91401            bottom_color,
91402            rotation_angle,
91403        }
91404    }
91405    #[allow(rustdoc::invalid_html_tags)]
91406    #[doc = "Type of the background fill, always \"gradient\""]
91407    #[allow(clippy::needless_lifetimes)]
91408    pub fn get_tg_type<'a>(&'a self) -> &'a str {
91409        self.tg_type.as_str()
91410    }
91411    #[allow(rustdoc::invalid_html_tags)]
91412    #[doc = "Type of the background fill, always \"gradient\""]
91413    #[allow(clippy::needless_lifetimes)]
91414    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
91415        self.tg_type = tg_type;
91416        self
91417    }
91418    #[allow(rustdoc::invalid_html_tags)]
91419    #[doc = "Type of the background fill, always \"gradient\""]
91420    fn rhai_get_tg_type(&mut self) -> String {
91421        self.tg_type.clone()
91422    }
91423    #[allow(rustdoc::invalid_html_tags)]
91424    #[doc = "Top color of the gradient in the RGB24 format"]
91425    #[allow(clippy::needless_lifetimes)]
91426    pub fn get_top_color<'a>(&'a self) -> i64 {
91427        self.top_color
91428    }
91429    #[allow(rustdoc::invalid_html_tags)]
91430    #[doc = "Top color of the gradient in the RGB24 format"]
91431    #[allow(clippy::needless_lifetimes)]
91432    pub fn set_top_color<'a>(&'a mut self, top_color: i64) -> &'a mut Self {
91433        self.top_color = top_color;
91434        self
91435    }
91436    #[allow(rustdoc::invalid_html_tags)]
91437    #[doc = "Top color of the gradient in the RGB24 format"]
91438    fn rhai_get_top_color(&mut self) -> i64 {
91439        self.top_color
91440    }
91441    #[allow(rustdoc::invalid_html_tags)]
91442    #[doc = "Bottom color of the gradient in the RGB24 format"]
91443    #[allow(clippy::needless_lifetimes)]
91444    pub fn get_bottom_color<'a>(&'a self) -> i64 {
91445        self.bottom_color
91446    }
91447    #[allow(rustdoc::invalid_html_tags)]
91448    #[doc = "Bottom color of the gradient in the RGB24 format"]
91449    #[allow(clippy::needless_lifetimes)]
91450    pub fn set_bottom_color<'a>(&'a mut self, bottom_color: i64) -> &'a mut Self {
91451        self.bottom_color = bottom_color;
91452        self
91453    }
91454    #[allow(rustdoc::invalid_html_tags)]
91455    #[doc = "Bottom color of the gradient in the RGB24 format"]
91456    fn rhai_get_bottom_color(&mut self) -> i64 {
91457        self.bottom_color
91458    }
91459    #[allow(rustdoc::invalid_html_tags)]
91460    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
91461    #[allow(clippy::needless_lifetimes)]
91462    pub fn get_rotation_angle<'a>(&'a self) -> i64 {
91463        self.rotation_angle
91464    }
91465    #[allow(rustdoc::invalid_html_tags)]
91466    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
91467    #[allow(clippy::needless_lifetimes)]
91468    pub fn set_rotation_angle<'a>(&'a mut self, rotation_angle: i64) -> &'a mut Self {
91469        self.rotation_angle = rotation_angle;
91470        self
91471    }
91472    #[allow(rustdoc::invalid_html_tags)]
91473    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
91474    fn rhai_get_rotation_angle(&mut self) -> i64 {
91475        self.rotation_angle
91476    }
91477}
91478#[allow(dead_code)]
91479impl SuggestedPostRefunded {
91480    #[allow(clippy::too_many_arguments)]
91481    pub fn new(reason: String) -> Self {
91482        Self {
91483            reason,
91484            suggested_post_message: None,
91485        }
91486    }
91487    #[allow(rustdoc::invalid_html_tags)]
91488    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
91489    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91490    pub fn get_suggested_post_message<'a>(&'a self) -> Option<&'a Message> {
91491        self.suggested_post_message.as_ref().map(|v| v.inner_ref())
91492    }
91493    #[allow(rustdoc::invalid_html_tags)]
91494    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
91495    #[allow(clippy::needless_lifetimes)]
91496    pub fn set_suggested_post_message<'a>(
91497        &'a mut self,
91498        suggested_post_message: Option<Message>,
91499    ) -> &'a mut Self {
91500        self.suggested_post_message = suggested_post_message
91501            .map(|suggested_post_message| BoxWrapper(Box::new(suggested_post_message)));
91502        self
91503    }
91504    #[allow(rustdoc::invalid_html_tags)]
91505    #[doc = "Optional. Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
91506    fn rhai_get_suggested_post_message(&mut self) -> Option<Message> {
91507        self.suggested_post_message
91508            .as_ref()
91509            .map(|v| v.clone().into())
91510    }
91511    #[allow(rustdoc::invalid_html_tags)]
91512    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
91513    #[allow(clippy::needless_lifetimes)]
91514    pub fn get_reason<'a>(&'a self) -> &'a str {
91515        self.reason.as_str()
91516    }
91517    #[allow(rustdoc::invalid_html_tags)]
91518    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
91519    #[allow(clippy::needless_lifetimes)]
91520    pub fn set_reason<'a>(&'a mut self, reason: String) -> &'a mut Self {
91521        self.reason = reason;
91522        self
91523    }
91524    #[allow(rustdoc::invalid_html_tags)]
91525    #[doc = "Reason for the refund. Currently, one of \"post_deleted\" if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or \"payment_refunded\" if the payer refunded their payment."]
91526    fn rhai_get_reason(&mut self) -> String {
91527        self.reason.clone()
91528    }
91529}
91530#[allow(dead_code)]
91531impl CallbackQuery {
91532    #[allow(clippy::too_many_arguments)]
91533    pub fn new<A: Into<User>>(id: String, from: A, chat_instance: String) -> Self {
91534        Self {
91535            id,
91536            from: BoxWrapper::new_unbox(from.into()),
91537            chat_instance,
91538            message: None,
91539            inline_message_id: None,
91540            data: None,
91541            game_short_name: None,
91542        }
91543    }
91544    #[allow(rustdoc::invalid_html_tags)]
91545    #[doc = "Unique identifier for this query"]
91546    #[allow(clippy::needless_lifetimes)]
91547    pub fn get_id<'a>(&'a self) -> &'a str {
91548        self.id.as_str()
91549    }
91550    #[allow(rustdoc::invalid_html_tags)]
91551    #[doc = "Unique identifier for this query"]
91552    #[allow(clippy::needless_lifetimes)]
91553    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
91554        self.id = id;
91555        self
91556    }
91557    #[allow(rustdoc::invalid_html_tags)]
91558    #[doc = "Unique identifier for this query"]
91559    fn rhai_get_id(&mut self) -> String {
91560        self.id.clone()
91561    }
91562    #[allow(rustdoc::invalid_html_tags)]
91563    #[doc = "Sender"]
91564    #[allow(clippy::needless_lifetimes)]
91565    pub fn get_from<'a>(&'a self) -> &'a User {
91566        &self.from
91567    }
91568    #[allow(rustdoc::invalid_html_tags)]
91569    #[doc = "Sender"]
91570    #[allow(clippy::needless_lifetimes)]
91571    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
91572        self.from = BoxWrapper(Unbox(from));
91573        self
91574    }
91575    #[allow(rustdoc::invalid_html_tags)]
91576    #[doc = "Sender"]
91577    fn rhai_get_from(&mut self) -> User {
91578        self.from.clone().into()
91579    }
91580    #[allow(rustdoc::invalid_html_tags)]
91581    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
91582    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91583    pub fn get_message<'a>(&'a self) -> Option<&'a MaybeInaccessibleMessage> {
91584        self.message.as_ref().map(|v| v.inner_ref())
91585    }
91586    #[allow(rustdoc::invalid_html_tags)]
91587    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
91588    #[allow(clippy::needless_lifetimes)]
91589    pub fn set_message<'a>(
91590        &'a mut self,
91591        message: Option<MaybeInaccessibleMessage>,
91592    ) -> &'a mut Self {
91593        self.message = message.map(|message| BoxWrapper(Unbox(message)));
91594        self
91595    }
91596    #[allow(rustdoc::invalid_html_tags)]
91597    #[doc = "Optional. Message sent by the bot with the callback button that originated the query"]
91598    fn rhai_get_message(&mut self) -> Option<MaybeInaccessibleMessage> {
91599        self.message.as_ref().map(|v| v.clone().into())
91600    }
91601    #[allow(rustdoc::invalid_html_tags)]
91602    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
91603    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91604    pub fn get_inline_message_id<'a>(&'a self) -> Option<&'a str> {
91605        self.inline_message_id.as_ref().map(|v| v.as_str())
91606    }
91607    #[allow(rustdoc::invalid_html_tags)]
91608    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
91609    #[allow(clippy::needless_lifetimes)]
91610    pub fn set_inline_message_id<'a>(
91611        &'a mut self,
91612        inline_message_id: Option<String>,
91613    ) -> &'a mut Self {
91614        self.inline_message_id = inline_message_id;
91615        self
91616    }
91617    #[allow(rustdoc::invalid_html_tags)]
91618    #[doc = "Optional. Identifier of the message sent via the bot in inline mode, that originated the query."]
91619    fn rhai_get_inline_message_id(&mut self) -> Option<String> {
91620        self.inline_message_id.as_ref().cloned()
91621    }
91622    #[allow(rustdoc::invalid_html_tags)]
91623    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
91624    #[allow(clippy::needless_lifetimes)]
91625    pub fn get_chat_instance<'a>(&'a self) -> &'a str {
91626        self.chat_instance.as_str()
91627    }
91628    #[allow(rustdoc::invalid_html_tags)]
91629    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
91630    #[allow(clippy::needless_lifetimes)]
91631    pub fn set_chat_instance<'a>(&'a mut self, chat_instance: String) -> &'a mut Self {
91632        self.chat_instance = chat_instance;
91633        self
91634    }
91635    #[allow(rustdoc::invalid_html_tags)]
91636    #[doc = "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."]
91637    fn rhai_get_chat_instance(&mut self) -> String {
91638        self.chat_instance.clone()
91639    }
91640    #[allow(rustdoc::invalid_html_tags)]
91641    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
91642    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91643    pub fn get_data<'a>(&'a self) -> Option<&'a str> {
91644        self.data.as_ref().map(|v| v.as_str())
91645    }
91646    #[allow(rustdoc::invalid_html_tags)]
91647    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
91648    #[allow(clippy::needless_lifetimes)]
91649    pub fn set_data<'a>(&'a mut self, data: Option<String>) -> &'a mut Self {
91650        self.data = data;
91651        self
91652    }
91653    #[allow(rustdoc::invalid_html_tags)]
91654    #[doc = "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data."]
91655    fn rhai_get_data(&mut self) -> Option<String> {
91656        self.data.as_ref().cloned()
91657    }
91658    #[allow(rustdoc::invalid_html_tags)]
91659    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
91660    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91661    pub fn get_game_short_name<'a>(&'a self) -> Option<&'a str> {
91662        self.game_short_name.as_ref().map(|v| v.as_str())
91663    }
91664    #[allow(rustdoc::invalid_html_tags)]
91665    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
91666    #[allow(clippy::needless_lifetimes)]
91667    pub fn set_game_short_name<'a>(&'a mut self, game_short_name: Option<String>) -> &'a mut Self {
91668        self.game_short_name = game_short_name;
91669        self
91670    }
91671    #[allow(rustdoc::invalid_html_tags)]
91672    #[doc = "Optional. Short name of a Game to be returned, serves as the unique identifier for the game"]
91673    fn rhai_get_game_short_name(&mut self) -> Option<String> {
91674        self.game_short_name.as_ref().cloned()
91675    }
91676}
91677#[allow(dead_code)]
91678impl PassportElementErrorFiles {
91679    #[allow(clippy::too_many_arguments)]
91680    pub fn new(source: String, file_hashes: Vec<String>, message: String) -> Self {
91681        Self {
91682            tg_type: "PassportElementErrorFiles".to_owned(),
91683            source,
91684            file_hashes,
91685            message,
91686        }
91687    }
91688    #[allow(rustdoc::invalid_html_tags)]
91689    #[doc = "Error source, must be files"]
91690    #[allow(clippy::needless_lifetimes)]
91691    pub fn get_source<'a>(&'a self) -> &'a str {
91692        self.source.as_str()
91693    }
91694    #[allow(rustdoc::invalid_html_tags)]
91695    #[doc = "Error source, must be files"]
91696    #[allow(clippy::needless_lifetimes)]
91697    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
91698        self.source = source;
91699        self
91700    }
91701    #[allow(rustdoc::invalid_html_tags)]
91702    #[doc = "Error source, must be files"]
91703    fn rhai_get_source(&mut self) -> String {
91704        self.source.clone()
91705    }
91706    #[allow(rustdoc::invalid_html_tags)]
91707    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
91708    #[allow(clippy::needless_lifetimes)]
91709    pub fn get_tg_type<'a>(&'a self) -> &'a str {
91710        self.tg_type.as_str()
91711    }
91712    #[allow(rustdoc::invalid_html_tags)]
91713    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
91714    #[allow(clippy::needless_lifetimes)]
91715    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
91716        self.tg_type = tg_type;
91717        self
91718    }
91719    #[allow(rustdoc::invalid_html_tags)]
91720    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
91721    fn rhai_get_tg_type(&mut self) -> String {
91722        self.tg_type.clone()
91723    }
91724    #[allow(rustdoc::invalid_html_tags)]
91725    #[doc = "List of base64-encoded file hashes"]
91726    #[allow(clippy::needless_lifetimes)]
91727    pub fn get_file_hashes<'a>(&'a self) -> &'a Vec<String> {
91728        &self.file_hashes
91729    }
91730    #[allow(rustdoc::invalid_html_tags)]
91731    #[doc = "List of base64-encoded file hashes"]
91732    #[allow(clippy::needless_lifetimes)]
91733    pub fn set_file_hashes<'a>(&'a mut self, file_hashes: Vec<String>) -> &'a mut Self {
91734        self.file_hashes = file_hashes;
91735        self
91736    }
91737    #[allow(rustdoc::invalid_html_tags)]
91738    #[doc = "List of base64-encoded file hashes"]
91739    fn rhai_get_file_hashes(&mut self) -> Vec<String> {
91740        self.file_hashes.clone()
91741    }
91742    #[allow(rustdoc::invalid_html_tags)]
91743    #[doc = "Error message"]
91744    #[allow(clippy::needless_lifetimes)]
91745    pub fn get_message<'a>(&'a self) -> &'a str {
91746        self.message.as_str()
91747    }
91748    #[allow(rustdoc::invalid_html_tags)]
91749    #[doc = "Error message"]
91750    #[allow(clippy::needless_lifetimes)]
91751    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
91752        self.message = message;
91753        self
91754    }
91755    #[allow(rustdoc::invalid_html_tags)]
91756    #[doc = "Error message"]
91757    fn rhai_get_message(&mut self) -> String {
91758        self.message.clone()
91759    }
91760}
91761#[allow(dead_code)]
91762impl MenuButtonDefault {
91763    #[allow(clippy::too_many_arguments)]
91764    pub fn new() -> Self {
91765        Self {
91766            tg_type: "default".to_owned(),
91767        }
91768    }
91769    #[allow(rustdoc::invalid_html_tags)]
91770    #[doc = "Type of the button, must be default"]
91771    #[allow(clippy::needless_lifetimes)]
91772    pub fn get_tg_type<'a>(&'a self) -> &'a str {
91773        self.tg_type.as_str()
91774    }
91775    #[allow(rustdoc::invalid_html_tags)]
91776    #[doc = "Type of the button, must be default"]
91777    #[allow(clippy::needless_lifetimes)]
91778    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
91779        self.tg_type = tg_type;
91780        self
91781    }
91782    #[allow(rustdoc::invalid_html_tags)]
91783    #[doc = "Type of the button, must be default"]
91784    fn rhai_get_tg_type(&mut self) -> String {
91785        self.tg_type.clone()
91786    }
91787}
91788#[allow(dead_code)]
91789impl ForumTopicEdited {
91790    #[allow(clippy::too_many_arguments)]
91791    pub fn new() -> Self {
91792        Self {
91793            name: None,
91794            icon_custom_emoji_id: None,
91795        }
91796    }
91797    #[allow(rustdoc::invalid_html_tags)]
91798    #[doc = "Optional. New name of the topic, if it was edited"]
91799    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91800    pub fn get_name<'a>(&'a self) -> Option<&'a str> {
91801        self.name.as_ref().map(|v| v.as_str())
91802    }
91803    #[allow(rustdoc::invalid_html_tags)]
91804    #[doc = "Optional. New name of the topic, if it was edited"]
91805    #[allow(clippy::needless_lifetimes)]
91806    pub fn set_name<'a>(&'a mut self, name: Option<String>) -> &'a mut Self {
91807        self.name = name;
91808        self
91809    }
91810    #[allow(rustdoc::invalid_html_tags)]
91811    #[doc = "Optional. New name of the topic, if it was edited"]
91812    fn rhai_get_name(&mut self) -> Option<String> {
91813        self.name.as_ref().cloned()
91814    }
91815    #[allow(rustdoc::invalid_html_tags)]
91816    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
91817    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91818    pub fn get_icon_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
91819        self.icon_custom_emoji_id.as_ref().map(|v| v.as_str())
91820    }
91821    #[allow(rustdoc::invalid_html_tags)]
91822    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
91823    #[allow(clippy::needless_lifetimes)]
91824    pub fn set_icon_custom_emoji_id<'a>(
91825        &'a mut self,
91826        icon_custom_emoji_id: Option<String>,
91827    ) -> &'a mut Self {
91828        self.icon_custom_emoji_id = icon_custom_emoji_id;
91829        self
91830    }
91831    #[allow(rustdoc::invalid_html_tags)]
91832    #[doc = "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed"]
91833    fn rhai_get_icon_custom_emoji_id(&mut self) -> Option<String> {
91834        self.icon_custom_emoji_id.as_ref().cloned()
91835    }
91836}
91837#[allow(dead_code)]
91838impl GiveawayCompleted {
91839    #[allow(clippy::too_many_arguments)]
91840    pub fn new(winner_count: i64) -> Self {
91841        Self {
91842            winner_count,
91843            unclaimed_prize_count: None,
91844            giveaway_message: None,
91845            is_star_giveaway: None,
91846        }
91847    }
91848    #[allow(rustdoc::invalid_html_tags)]
91849    #[doc = "Number of winners in the giveaway"]
91850    #[allow(clippy::needless_lifetimes)]
91851    pub fn get_winner_count<'a>(&'a self) -> i64 {
91852        self.winner_count
91853    }
91854    #[allow(rustdoc::invalid_html_tags)]
91855    #[doc = "Number of winners in the giveaway"]
91856    #[allow(clippy::needless_lifetimes)]
91857    pub fn set_winner_count<'a>(&'a mut self, winner_count: i64) -> &'a mut Self {
91858        self.winner_count = winner_count;
91859        self
91860    }
91861    #[allow(rustdoc::invalid_html_tags)]
91862    #[doc = "Number of winners in the giveaway"]
91863    fn rhai_get_winner_count(&mut self) -> i64 {
91864        self.winner_count
91865    }
91866    #[allow(rustdoc::invalid_html_tags)]
91867    #[doc = "Optional. Number of undistributed prizes"]
91868    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91869    pub fn get_unclaimed_prize_count<'a>(&'a self) -> Option<i64> {
91870        self.unclaimed_prize_count.as_ref().map(|v| *v)
91871    }
91872    #[allow(rustdoc::invalid_html_tags)]
91873    #[doc = "Optional. Number of undistributed prizes"]
91874    #[allow(clippy::needless_lifetimes)]
91875    pub fn set_unclaimed_prize_count<'a>(
91876        &'a mut self,
91877        unclaimed_prize_count: Option<i64>,
91878    ) -> &'a mut Self {
91879        self.unclaimed_prize_count = unclaimed_prize_count;
91880        self
91881    }
91882    #[allow(rustdoc::invalid_html_tags)]
91883    #[doc = "Optional. Number of undistributed prizes"]
91884    fn rhai_get_unclaimed_prize_count(&mut self) -> Option<i64> {
91885        self.unclaimed_prize_count.as_ref().copied()
91886    }
91887    #[allow(rustdoc::invalid_html_tags)]
91888    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
91889    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91890    pub fn get_giveaway_message<'a>(&'a self) -> Option<&'a Message> {
91891        self.giveaway_message.as_ref().map(|v| v.inner_ref())
91892    }
91893    #[allow(rustdoc::invalid_html_tags)]
91894    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
91895    #[allow(clippy::needless_lifetimes)]
91896    pub fn set_giveaway_message<'a>(
91897        &'a mut self,
91898        giveaway_message: Option<Message>,
91899    ) -> &'a mut Self {
91900        self.giveaway_message =
91901            giveaway_message.map(|giveaway_message| BoxWrapper(Unbox(giveaway_message)));
91902        self
91903    }
91904    #[allow(rustdoc::invalid_html_tags)]
91905    #[doc = "Optional. Message with the giveaway that was completed, if it wasn't deleted"]
91906    fn rhai_get_giveaway_message(&mut self) -> Option<Message> {
91907        self.giveaway_message.as_ref().map(|v| v.clone().into())
91908    }
91909    #[allow(rustdoc::invalid_html_tags)]
91910    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
91911    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91912    pub fn get_is_star_giveaway<'a>(&'a self) -> Option<bool> {
91913        self.is_star_giveaway.as_ref().map(|v| *v)
91914    }
91915    #[allow(rustdoc::invalid_html_tags)]
91916    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
91917    #[allow(clippy::needless_lifetimes)]
91918    pub fn set_is_star_giveaway<'a>(&'a mut self, is_star_giveaway: Option<bool>) -> &'a mut Self {
91919        self.is_star_giveaway = is_star_giveaway;
91920        self
91921    }
91922    #[allow(rustdoc::invalid_html_tags)]
91923    #[doc = "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway."]
91924    fn rhai_get_is_star_giveaway(&mut self) -> Option<bool> {
91925        self.is_star_giveaway.as_ref().copied()
91926    }
91927}
91928#[allow(dead_code)]
91929impl ReplyKeyboardMarkup {
91930    #[allow(clippy::too_many_arguments)]
91931    pub fn new(keyboard: Vec<Vec<KeyboardButton>>) -> Self {
91932        Self {
91933            keyboard,
91934            is_persistent: None,
91935            resize_keyboard: None,
91936            one_time_keyboard: None,
91937            input_field_placeholder: None,
91938            selective: None,
91939        }
91940    }
91941    #[allow(rustdoc::invalid_html_tags)]
91942    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
91943    #[allow(clippy::needless_lifetimes)]
91944    pub fn get_keyboard<'a>(&'a self) -> &'a Vec<Vec<KeyboardButton>> {
91945        &self.keyboard
91946    }
91947    #[allow(rustdoc::invalid_html_tags)]
91948    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
91949    #[allow(clippy::needless_lifetimes)]
91950    pub fn set_keyboard<'a>(&'a mut self, keyboard: Vec<Vec<KeyboardButton>>) -> &'a mut Self {
91951        self.keyboard = keyboard;
91952        self
91953    }
91954    #[allow(rustdoc::invalid_html_tags)]
91955    #[doc = "Array of button rows, each represented by an Array of KeyboardButton objects"]
91956    fn rhai_get_keyboard(&mut self) -> Vec<Vec<KeyboardButton>> {
91957        self.keyboard.clone()
91958    }
91959    #[allow(rustdoc::invalid_html_tags)]
91960    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
91961    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91962    pub fn get_is_persistent<'a>(&'a self) -> Option<bool> {
91963        self.is_persistent.as_ref().map(|v| *v)
91964    }
91965    #[allow(rustdoc::invalid_html_tags)]
91966    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
91967    #[allow(clippy::needless_lifetimes)]
91968    pub fn set_is_persistent<'a>(&'a mut self, is_persistent: Option<bool>) -> &'a mut Self {
91969        self.is_persistent = is_persistent;
91970        self
91971    }
91972    #[allow(rustdoc::invalid_html_tags)]
91973    #[doc = "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."]
91974    fn rhai_get_is_persistent(&mut self) -> Option<bool> {
91975        self.is_persistent.as_ref().copied()
91976    }
91977    #[allow(rustdoc::invalid_html_tags)]
91978    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
91979    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91980    pub fn get_resize_keyboard<'a>(&'a self) -> Option<bool> {
91981        self.resize_keyboard.as_ref().map(|v| *v)
91982    }
91983    #[allow(rustdoc::invalid_html_tags)]
91984    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
91985    #[allow(clippy::needless_lifetimes)]
91986    pub fn set_resize_keyboard<'a>(&'a mut self, resize_keyboard: Option<bool>) -> &'a mut Self {
91987        self.resize_keyboard = resize_keyboard;
91988        self
91989    }
91990    #[allow(rustdoc::invalid_html_tags)]
91991    #[doc = "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard."]
91992    fn rhai_get_resize_keyboard(&mut self) -> Option<bool> {
91993        self.resize_keyboard.as_ref().copied()
91994    }
91995    #[allow(rustdoc::invalid_html_tags)]
91996    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
91997    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
91998    pub fn get_one_time_keyboard<'a>(&'a self) -> Option<bool> {
91999        self.one_time_keyboard.as_ref().map(|v| *v)
92000    }
92001    #[allow(rustdoc::invalid_html_tags)]
92002    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
92003    #[allow(clippy::needless_lifetimes)]
92004    pub fn set_one_time_keyboard<'a>(
92005        &'a mut self,
92006        one_time_keyboard: Option<bool>,
92007    ) -> &'a mut Self {
92008        self.one_time_keyboard = one_time_keyboard;
92009        self
92010    }
92011    #[allow(rustdoc::invalid_html_tags)]
92012    #[doc = "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false."]
92013    fn rhai_get_one_time_keyboard(&mut self) -> Option<bool> {
92014        self.one_time_keyboard.as_ref().copied()
92015    }
92016    #[allow(rustdoc::invalid_html_tags)]
92017    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
92018    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92019    pub fn get_input_field_placeholder<'a>(&'a self) -> Option<&'a str> {
92020        self.input_field_placeholder.as_ref().map(|v| v.as_str())
92021    }
92022    #[allow(rustdoc::invalid_html_tags)]
92023    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
92024    #[allow(clippy::needless_lifetimes)]
92025    pub fn set_input_field_placeholder<'a>(
92026        &'a mut self,
92027        input_field_placeholder: Option<String>,
92028    ) -> &'a mut Self {
92029        self.input_field_placeholder = input_field_placeholder;
92030        self
92031    }
92032    #[allow(rustdoc::invalid_html_tags)]
92033    #[doc = "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"]
92034    fn rhai_get_input_field_placeholder(&mut self) -> Option<String> {
92035        self.input_field_placeholder.as_ref().cloned()
92036    }
92037    #[allow(rustdoc::invalid_html_tags)]
92038    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
92039    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92040    pub fn get_selective<'a>(&'a self) -> Option<bool> {
92041        self.selective.as_ref().map(|v| *v)
92042    }
92043    #[allow(rustdoc::invalid_html_tags)]
92044    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
92045    #[allow(clippy::needless_lifetimes)]
92046    pub fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self {
92047        self.selective = selective;
92048        self
92049    }
92050    #[allow(rustdoc::invalid_html_tags)]
92051    #[doc = "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."]
92052    fn rhai_get_selective(&mut self) -> Option<bool> {
92053        self.selective.as_ref().copied()
92054    }
92055}
92056#[allow(dead_code)]
92057impl InlineQueryResultCachedAudio {
92058    #[allow(clippy::too_many_arguments)]
92059    pub fn new(id: String, audio_file_id: String) -> Self {
92060        Self {
92061            tg_type: "audio".to_owned(),
92062            id,
92063            audio_file_id,
92064            caption: None,
92065            parse_mode: None,
92066            caption_entities: None,
92067            reply_markup: None,
92068            input_message_content: None,
92069        }
92070    }
92071    #[allow(rustdoc::invalid_html_tags)]
92072    #[doc = "Type of the result, must be audio"]
92073    #[allow(clippy::needless_lifetimes)]
92074    pub fn get_tg_type<'a>(&'a self) -> &'a str {
92075        self.tg_type.as_str()
92076    }
92077    #[allow(rustdoc::invalid_html_tags)]
92078    #[doc = "Type of the result, must be audio"]
92079    #[allow(clippy::needless_lifetimes)]
92080    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
92081        self.tg_type = tg_type;
92082        self
92083    }
92084    #[allow(rustdoc::invalid_html_tags)]
92085    #[doc = "Type of the result, must be audio"]
92086    fn rhai_get_tg_type(&mut self) -> String {
92087        self.tg_type.clone()
92088    }
92089    #[allow(rustdoc::invalid_html_tags)]
92090    #[doc = "Unique identifier for this result, 1-64 bytes"]
92091    #[allow(clippy::needless_lifetimes)]
92092    pub fn get_id<'a>(&'a self) -> &'a str {
92093        self.id.as_str()
92094    }
92095    #[allow(rustdoc::invalid_html_tags)]
92096    #[doc = "Unique identifier for this result, 1-64 bytes"]
92097    #[allow(clippy::needless_lifetimes)]
92098    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
92099        self.id = id;
92100        self
92101    }
92102    #[allow(rustdoc::invalid_html_tags)]
92103    #[doc = "Unique identifier for this result, 1-64 bytes"]
92104    fn rhai_get_id(&mut self) -> String {
92105        self.id.clone()
92106    }
92107    #[allow(rustdoc::invalid_html_tags)]
92108    #[doc = "A valid file identifier for the audio file"]
92109    #[allow(clippy::needless_lifetimes)]
92110    pub fn get_audio_file_id<'a>(&'a self) -> &'a str {
92111        self.audio_file_id.as_str()
92112    }
92113    #[allow(rustdoc::invalid_html_tags)]
92114    #[doc = "A valid file identifier for the audio file"]
92115    #[allow(clippy::needless_lifetimes)]
92116    pub fn set_audio_file_id<'a>(&'a mut self, audio_file_id: String) -> &'a mut Self {
92117        self.audio_file_id = audio_file_id;
92118        self
92119    }
92120    #[allow(rustdoc::invalid_html_tags)]
92121    #[doc = "A valid file identifier for the audio file"]
92122    fn rhai_get_audio_file_id(&mut self) -> String {
92123        self.audio_file_id.clone()
92124    }
92125    #[allow(rustdoc::invalid_html_tags)]
92126    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
92127    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92128    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
92129        self.caption.as_ref().map(|v| v.as_str())
92130    }
92131    #[allow(rustdoc::invalid_html_tags)]
92132    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
92133    #[allow(clippy::needless_lifetimes)]
92134    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
92135        self.caption = caption;
92136        self
92137    }
92138    #[allow(rustdoc::invalid_html_tags)]
92139    #[doc = "Optional. Caption, 0-1024 characters after entities parsing"]
92140    fn rhai_get_caption(&mut self) -> Option<String> {
92141        self.caption.as_ref().cloned()
92142    }
92143    #[allow(rustdoc::invalid_html_tags)]
92144    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
92145    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92146    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
92147        self.parse_mode.as_ref().map(|v| v.as_str())
92148    }
92149    #[allow(rustdoc::invalid_html_tags)]
92150    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
92151    #[allow(clippy::needless_lifetimes)]
92152    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
92153        self.parse_mode = parse_mode;
92154        self
92155    }
92156    #[allow(rustdoc::invalid_html_tags)]
92157    #[doc = "Optional. Mode for parsing entities in the audio caption. See formatting options for more details."]
92158    fn rhai_get_parse_mode(&mut self) -> Option<String> {
92159        self.parse_mode.as_ref().cloned()
92160    }
92161    #[allow(rustdoc::invalid_html_tags)]
92162    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
92163    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92164    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
92165        self.caption_entities.as_ref()
92166    }
92167    #[allow(rustdoc::invalid_html_tags)]
92168    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
92169    #[allow(clippy::needless_lifetimes)]
92170    pub fn set_caption_entities<'a>(
92171        &'a mut self,
92172        caption_entities: Option<Vec<MessageEntity>>,
92173    ) -> &'a mut Self {
92174        self.caption_entities = caption_entities;
92175        self
92176    }
92177    #[allow(rustdoc::invalid_html_tags)]
92178    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
92179    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
92180        self.caption_entities.as_ref().cloned()
92181    }
92182    #[allow(rustdoc::invalid_html_tags)]
92183    #[doc = "Optional. Inline keyboard attached to the message"]
92184    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92185    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
92186        self.reply_markup.as_ref().map(|v| v.inner_ref())
92187    }
92188    #[allow(rustdoc::invalid_html_tags)]
92189    #[doc = "Optional. Inline keyboard attached to the message"]
92190    #[allow(clippy::needless_lifetimes)]
92191    pub fn set_reply_markup<'a>(
92192        &'a mut self,
92193        reply_markup: Option<InlineKeyboardMarkup>,
92194    ) -> &'a mut Self {
92195        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
92196        self
92197    }
92198    #[allow(rustdoc::invalid_html_tags)]
92199    #[doc = "Optional. Inline keyboard attached to the message"]
92200    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
92201        self.reply_markup.as_ref().map(|v| v.clone().into())
92202    }
92203    #[allow(rustdoc::invalid_html_tags)]
92204    #[doc = "Optional. Content of the message to be sent instead of the audio"]
92205    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92206    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
92207        self.input_message_content.as_ref().map(|v| v.inner_ref())
92208    }
92209    #[allow(rustdoc::invalid_html_tags)]
92210    #[doc = "Optional. Content of the message to be sent instead of the audio"]
92211    #[allow(clippy::needless_lifetimes)]
92212    pub fn set_input_message_content<'a>(
92213        &'a mut self,
92214        input_message_content: Option<InputMessageContent>,
92215    ) -> &'a mut Self {
92216        self.input_message_content = input_message_content
92217            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
92218        self
92219    }
92220    #[allow(rustdoc::invalid_html_tags)]
92221    #[doc = "Optional. Content of the message to be sent instead of the audio"]
92222    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
92223        self.input_message_content
92224            .as_ref()
92225            .map(|v| v.clone().into())
92226    }
92227}
92228#[allow(dead_code)]
92229impl CopyTextButton {
92230    #[allow(clippy::too_many_arguments)]
92231    pub fn new(text: String) -> Self {
92232        Self { text }
92233    }
92234    #[allow(rustdoc::invalid_html_tags)]
92235    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
92236    #[allow(clippy::needless_lifetimes)]
92237    pub fn get_text<'a>(&'a self) -> &'a str {
92238        self.text.as_str()
92239    }
92240    #[allow(rustdoc::invalid_html_tags)]
92241    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
92242    #[allow(clippy::needless_lifetimes)]
92243    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
92244        self.text = text;
92245        self
92246    }
92247    #[allow(rustdoc::invalid_html_tags)]
92248    #[doc = "The text to be copied to the clipboard; 1-256 characters"]
92249    fn rhai_get_text(&mut self) -> String {
92250        self.text.clone()
92251    }
92252}
92253#[allow(dead_code)]
92254impl BackgroundTypeWallpaper {
92255    #[allow(clippy::too_many_arguments)]
92256    pub fn new<A: Into<Document>>(document: A, dark_theme_dimming: i64) -> Self {
92257        Self {
92258            tg_type: "BackgroundTypeWallpaper".to_owned(),
92259            document: BoxWrapper::new_unbox(document.into()),
92260            dark_theme_dimming,
92261            is_blurred: None,
92262            is_moving: None,
92263        }
92264    }
92265    #[allow(rustdoc::invalid_html_tags)]
92266    #[doc = "Type of the background, always \"wallpaper\""]
92267    #[allow(clippy::needless_lifetimes)]
92268    pub fn get_tg_type<'a>(&'a self) -> &'a str {
92269        self.tg_type.as_str()
92270    }
92271    #[allow(rustdoc::invalid_html_tags)]
92272    #[doc = "Type of the background, always \"wallpaper\""]
92273    #[allow(clippy::needless_lifetimes)]
92274    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
92275        self.tg_type = tg_type;
92276        self
92277    }
92278    #[allow(rustdoc::invalid_html_tags)]
92279    #[doc = "Type of the background, always \"wallpaper\""]
92280    fn rhai_get_tg_type(&mut self) -> String {
92281        self.tg_type.clone()
92282    }
92283    #[allow(rustdoc::invalid_html_tags)]
92284    #[doc = "Document with the wallpaper"]
92285    #[allow(clippy::needless_lifetimes)]
92286    pub fn get_document<'a>(&'a self) -> &'a Document {
92287        &self.document
92288    }
92289    #[allow(rustdoc::invalid_html_tags)]
92290    #[doc = "Document with the wallpaper"]
92291    #[allow(clippy::needless_lifetimes)]
92292    pub fn set_document<'a>(&'a mut self, document: Document) -> &'a mut Self {
92293        self.document = BoxWrapper(Unbox(document));
92294        self
92295    }
92296    #[allow(rustdoc::invalid_html_tags)]
92297    #[doc = "Document with the wallpaper"]
92298    fn rhai_get_document(&mut self) -> Document {
92299        self.document.clone().into()
92300    }
92301    #[allow(rustdoc::invalid_html_tags)]
92302    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
92303    #[allow(clippy::needless_lifetimes)]
92304    pub fn get_dark_theme_dimming<'a>(&'a self) -> i64 {
92305        self.dark_theme_dimming
92306    }
92307    #[allow(rustdoc::invalid_html_tags)]
92308    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
92309    #[allow(clippy::needless_lifetimes)]
92310    pub fn set_dark_theme_dimming<'a>(&'a mut self, dark_theme_dimming: i64) -> &'a mut Self {
92311        self.dark_theme_dimming = dark_theme_dimming;
92312        self
92313    }
92314    #[allow(rustdoc::invalid_html_tags)]
92315    #[doc = "Dimming of the background in dark themes, as a percentage; 0-100"]
92316    fn rhai_get_dark_theme_dimming(&mut self) -> i64 {
92317        self.dark_theme_dimming
92318    }
92319    #[allow(rustdoc::invalid_html_tags)]
92320    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
92321    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92322    pub fn get_is_blurred<'a>(&'a self) -> Option<bool> {
92323        self.is_blurred.as_ref().map(|v| *v)
92324    }
92325    #[allow(rustdoc::invalid_html_tags)]
92326    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
92327    #[allow(clippy::needless_lifetimes)]
92328    pub fn set_is_blurred<'a>(&'a mut self, is_blurred: Option<bool>) -> &'a mut Self {
92329        self.is_blurred = is_blurred;
92330        self
92331    }
92332    #[allow(rustdoc::invalid_html_tags)]
92333    #[doc = "Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12"]
92334    fn rhai_get_is_blurred(&mut self) -> Option<bool> {
92335        self.is_blurred.as_ref().copied()
92336    }
92337    #[allow(rustdoc::invalid_html_tags)]
92338    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
92339    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92340    pub fn get_is_moving<'a>(&'a self) -> Option<bool> {
92341        self.is_moving.as_ref().map(|v| *v)
92342    }
92343    #[allow(rustdoc::invalid_html_tags)]
92344    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
92345    #[allow(clippy::needless_lifetimes)]
92346    pub fn set_is_moving<'a>(&'a mut self, is_moving: Option<bool>) -> &'a mut Self {
92347        self.is_moving = is_moving;
92348        self
92349    }
92350    #[allow(rustdoc::invalid_html_tags)]
92351    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
92352    fn rhai_get_is_moving(&mut self) -> Option<bool> {
92353        self.is_moving.as_ref().copied()
92354    }
92355}
92356#[allow(dead_code)]
92357impl ForumTopic {
92358    #[allow(clippy::too_many_arguments)]
92359    pub fn new(message_thread_id: i64, name: String, icon_color: i64) -> Self {
92360        Self {
92361            message_thread_id,
92362            name,
92363            icon_color,
92364            icon_custom_emoji_id: None,
92365        }
92366    }
92367    #[allow(rustdoc::invalid_html_tags)]
92368    #[doc = "Unique identifier of the forum topic"]
92369    #[allow(clippy::needless_lifetimes)]
92370    pub fn get_message_thread_id<'a>(&'a self) -> i64 {
92371        self.message_thread_id
92372    }
92373    #[allow(rustdoc::invalid_html_tags)]
92374    #[doc = "Unique identifier of the forum topic"]
92375    #[allow(clippy::needless_lifetimes)]
92376    pub fn set_message_thread_id<'a>(&'a mut self, message_thread_id: i64) -> &'a mut Self {
92377        self.message_thread_id = message_thread_id;
92378        self
92379    }
92380    #[allow(rustdoc::invalid_html_tags)]
92381    #[doc = "Unique identifier of the forum topic"]
92382    fn rhai_get_message_thread_id(&mut self) -> i64 {
92383        self.message_thread_id
92384    }
92385    #[allow(rustdoc::invalid_html_tags)]
92386    #[doc = "Name of the topic"]
92387    #[allow(clippy::needless_lifetimes)]
92388    pub fn get_name<'a>(&'a self) -> &'a str {
92389        self.name.as_str()
92390    }
92391    #[allow(rustdoc::invalid_html_tags)]
92392    #[doc = "Name of the topic"]
92393    #[allow(clippy::needless_lifetimes)]
92394    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
92395        self.name = name;
92396        self
92397    }
92398    #[allow(rustdoc::invalid_html_tags)]
92399    #[doc = "Name of the topic"]
92400    fn rhai_get_name(&mut self) -> String {
92401        self.name.clone()
92402    }
92403    #[allow(rustdoc::invalid_html_tags)]
92404    #[doc = "Color of the topic icon in RGB format"]
92405    #[allow(clippy::needless_lifetimes)]
92406    pub fn get_icon_color<'a>(&'a self) -> i64 {
92407        self.icon_color
92408    }
92409    #[allow(rustdoc::invalid_html_tags)]
92410    #[doc = "Color of the topic icon in RGB format"]
92411    #[allow(clippy::needless_lifetimes)]
92412    pub fn set_icon_color<'a>(&'a mut self, icon_color: i64) -> &'a mut Self {
92413        self.icon_color = icon_color;
92414        self
92415    }
92416    #[allow(rustdoc::invalid_html_tags)]
92417    #[doc = "Color of the topic icon in RGB format"]
92418    fn rhai_get_icon_color(&mut self) -> i64 {
92419        self.icon_color
92420    }
92421    #[allow(rustdoc::invalid_html_tags)]
92422    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
92423    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92424    pub fn get_icon_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
92425        self.icon_custom_emoji_id.as_ref().map(|v| v.as_str())
92426    }
92427    #[allow(rustdoc::invalid_html_tags)]
92428    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
92429    #[allow(clippy::needless_lifetimes)]
92430    pub fn set_icon_custom_emoji_id<'a>(
92431        &'a mut self,
92432        icon_custom_emoji_id: Option<String>,
92433    ) -> &'a mut Self {
92434        self.icon_custom_emoji_id = icon_custom_emoji_id;
92435        self
92436    }
92437    #[allow(rustdoc::invalid_html_tags)]
92438    #[doc = "Optional. Unique identifier of the custom emoji shown as the topic icon"]
92439    fn rhai_get_icon_custom_emoji_id(&mut self) -> Option<String> {
92440        self.icon_custom_emoji_id.as_ref().cloned()
92441    }
92442}
92443#[allow(dead_code)]
92444impl InputContactMessageContent {
92445    #[allow(clippy::too_many_arguments)]
92446    pub fn new(phone_number: String, first_name: String) -> Self {
92447        Self {
92448            phone_number,
92449            first_name,
92450            last_name: None,
92451            vcard: None,
92452        }
92453    }
92454    #[allow(rustdoc::invalid_html_tags)]
92455    #[doc = "Contact's phone number"]
92456    #[allow(clippy::needless_lifetimes)]
92457    pub fn get_phone_number<'a>(&'a self) -> &'a str {
92458        self.phone_number.as_str()
92459    }
92460    #[allow(rustdoc::invalid_html_tags)]
92461    #[doc = "Contact's phone number"]
92462    #[allow(clippy::needless_lifetimes)]
92463    pub fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self {
92464        self.phone_number = phone_number;
92465        self
92466    }
92467    #[allow(rustdoc::invalid_html_tags)]
92468    #[doc = "Contact's phone number"]
92469    fn rhai_get_phone_number(&mut self) -> String {
92470        self.phone_number.clone()
92471    }
92472    #[allow(rustdoc::invalid_html_tags)]
92473    #[doc = "Contact's first name"]
92474    #[allow(clippy::needless_lifetimes)]
92475    pub fn get_first_name<'a>(&'a self) -> &'a str {
92476        self.first_name.as_str()
92477    }
92478    #[allow(rustdoc::invalid_html_tags)]
92479    #[doc = "Contact's first name"]
92480    #[allow(clippy::needless_lifetimes)]
92481    pub fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self {
92482        self.first_name = first_name;
92483        self
92484    }
92485    #[allow(rustdoc::invalid_html_tags)]
92486    #[doc = "Contact's first name"]
92487    fn rhai_get_first_name(&mut self) -> String {
92488        self.first_name.clone()
92489    }
92490    #[allow(rustdoc::invalid_html_tags)]
92491    #[doc = "Optional. Contact's last name"]
92492    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92493    pub fn get_last_name<'a>(&'a self) -> Option<&'a str> {
92494        self.last_name.as_ref().map(|v| v.as_str())
92495    }
92496    #[allow(rustdoc::invalid_html_tags)]
92497    #[doc = "Optional. Contact's last name"]
92498    #[allow(clippy::needless_lifetimes)]
92499    pub fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
92500        self.last_name = last_name;
92501        self
92502    }
92503    #[allow(rustdoc::invalid_html_tags)]
92504    #[doc = "Optional. Contact's last name"]
92505    fn rhai_get_last_name(&mut self) -> Option<String> {
92506        self.last_name.as_ref().cloned()
92507    }
92508    #[allow(rustdoc::invalid_html_tags)]
92509    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
92510    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92511    pub fn get_vcard<'a>(&'a self) -> Option<&'a str> {
92512        self.vcard.as_ref().map(|v| v.as_str())
92513    }
92514    #[allow(rustdoc::invalid_html_tags)]
92515    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
92516    #[allow(clippy::needless_lifetimes)]
92517    pub fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self {
92518        self.vcard = vcard;
92519        self
92520    }
92521    #[allow(rustdoc::invalid_html_tags)]
92522    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
92523    fn rhai_get_vcard(&mut self) -> Option<String> {
92524        self.vcard.as_ref().cloned()
92525    }
92526}
92527#[allow(dead_code)]
92528impl ReplyParameters {
92529    #[allow(clippy::too_many_arguments)]
92530    pub fn new(message_id: i64) -> Self {
92531        Self {
92532            message_id,
92533            chat_id: None,
92534            allow_sending_without_reply: None,
92535            quote: None,
92536            quote_parse_mode: None,
92537            quote_entities: None,
92538            quote_position: None,
92539            checklist_task_id: None,
92540        }
92541    }
92542    #[allow(rustdoc::invalid_html_tags)]
92543    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
92544    #[allow(clippy::needless_lifetimes)]
92545    pub fn get_message_id<'a>(&'a self) -> i64 {
92546        self.message_id
92547    }
92548    #[allow(rustdoc::invalid_html_tags)]
92549    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
92550    #[allow(clippy::needless_lifetimes)]
92551    pub fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
92552        self.message_id = message_id;
92553        self
92554    }
92555    #[allow(rustdoc::invalid_html_tags)]
92556    #[doc = "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified"]
92557    fn rhai_get_message_id(&mut self) -> i64 {
92558        self.message_id
92559    }
92560    #[allow(rustdoc::invalid_html_tags)]
92561    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
92562    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92563    pub fn get_chat_id<'a>(&'a self) -> Option<&'a ChatHandle> {
92564        self.chat_id.as_ref()
92565    }
92566    #[allow(rustdoc::invalid_html_tags)]
92567    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
92568    #[allow(clippy::needless_lifetimes)]
92569    pub fn set_chat_id<'a>(&'a mut self, chat_id: Option<ChatHandle>) -> &'a mut Self {
92570        self.chat_id = chat_id;
92571        self
92572    }
92573    #[allow(rustdoc::invalid_html_tags)]
92574    #[doc = "Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats."]
92575    fn rhai_get_chat_id(&mut self) -> Option<ChatHandle> {
92576        self.chat_id.as_ref().cloned()
92577    }
92578    #[allow(rustdoc::invalid_html_tags)]
92579    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
92580    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92581    pub fn get_allow_sending_without_reply<'a>(&'a self) -> Option<bool> {
92582        self.allow_sending_without_reply.as_ref().map(|v| *v)
92583    }
92584    #[allow(rustdoc::invalid_html_tags)]
92585    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
92586    #[allow(clippy::needless_lifetimes)]
92587    pub fn set_allow_sending_without_reply<'a>(
92588        &'a mut self,
92589        allow_sending_without_reply: Option<bool>,
92590    ) -> &'a mut Self {
92591        self.allow_sending_without_reply = allow_sending_without_reply;
92592        self
92593    }
92594    #[allow(rustdoc::invalid_html_tags)]
92595    #[doc = "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account."]
92596    fn rhai_get_allow_sending_without_reply(&mut self) -> Option<bool> {
92597        self.allow_sending_without_reply.as_ref().copied()
92598    }
92599    #[allow(rustdoc::invalid_html_tags)]
92600    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
92601    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92602    pub fn get_quote<'a>(&'a self) -> Option<&'a str> {
92603        self.quote.as_ref().map(|v| v.as_str())
92604    }
92605    #[allow(rustdoc::invalid_html_tags)]
92606    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
92607    #[allow(clippy::needless_lifetimes)]
92608    pub fn set_quote<'a>(&'a mut self, quote: Option<String>) -> &'a mut Self {
92609        self.quote = quote;
92610        self
92611    }
92612    #[allow(rustdoc::invalid_html_tags)]
92613    #[doc = "Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message."]
92614    fn rhai_get_quote(&mut self) -> Option<String> {
92615        self.quote.as_ref().cloned()
92616    }
92617    #[allow(rustdoc::invalid_html_tags)]
92618    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
92619    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92620    pub fn get_quote_parse_mode<'a>(&'a self) -> Option<&'a str> {
92621        self.quote_parse_mode.as_ref().map(|v| v.as_str())
92622    }
92623    #[allow(rustdoc::invalid_html_tags)]
92624    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
92625    #[allow(clippy::needless_lifetimes)]
92626    pub fn set_quote_parse_mode<'a>(
92627        &'a mut self,
92628        quote_parse_mode: Option<String>,
92629    ) -> &'a mut Self {
92630        self.quote_parse_mode = quote_parse_mode;
92631        self
92632    }
92633    #[allow(rustdoc::invalid_html_tags)]
92634    #[doc = "Optional. Mode for parsing entities in the quote. See formatting options for more details."]
92635    fn rhai_get_quote_parse_mode(&mut self) -> Option<String> {
92636        self.quote_parse_mode.as_ref().cloned()
92637    }
92638    #[allow(rustdoc::invalid_html_tags)]
92639    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
92640    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92641    pub fn get_quote_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
92642        self.quote_entities.as_ref()
92643    }
92644    #[allow(rustdoc::invalid_html_tags)]
92645    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
92646    #[allow(clippy::needless_lifetimes)]
92647    pub fn set_quote_entities<'a>(
92648        &'a mut self,
92649        quote_entities: Option<Vec<MessageEntity>>,
92650    ) -> &'a mut Self {
92651        self.quote_entities = quote_entities;
92652        self
92653    }
92654    #[allow(rustdoc::invalid_html_tags)]
92655    #[doc = "Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode."]
92656    fn rhai_get_quote_entities(&mut self) -> Option<Vec<MessageEntity>> {
92657        self.quote_entities.as_ref().cloned()
92658    }
92659    #[allow(rustdoc::invalid_html_tags)]
92660    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
92661    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92662    pub fn get_quote_position<'a>(&'a self) -> Option<i64> {
92663        self.quote_position.as_ref().map(|v| *v)
92664    }
92665    #[allow(rustdoc::invalid_html_tags)]
92666    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
92667    #[allow(clippy::needless_lifetimes)]
92668    pub fn set_quote_position<'a>(&'a mut self, quote_position: Option<i64>) -> &'a mut Self {
92669        self.quote_position = quote_position;
92670        self
92671    }
92672    #[allow(rustdoc::invalid_html_tags)]
92673    #[doc = "Optional. Position of the quote in the original message in UTF-16 code units"]
92674    fn rhai_get_quote_position(&mut self) -> Option<i64> {
92675        self.quote_position.as_ref().copied()
92676    }
92677    #[allow(rustdoc::invalid_html_tags)]
92678    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
92679    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92680    pub fn get_checklist_task_id<'a>(&'a self) -> Option<i64> {
92681        self.checklist_task_id.as_ref().map(|v| *v)
92682    }
92683    #[allow(rustdoc::invalid_html_tags)]
92684    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
92685    #[allow(clippy::needless_lifetimes)]
92686    pub fn set_checklist_task_id<'a>(&'a mut self, checklist_task_id: Option<i64>) -> &'a mut Self {
92687        self.checklist_task_id = checklist_task_id;
92688        self
92689    }
92690    #[allow(rustdoc::invalid_html_tags)]
92691    #[doc = "Optional. Identifier of the specific checklist task to be replied to"]
92692    fn rhai_get_checklist_task_id(&mut self) -> Option<i64> {
92693        self.checklist_task_id.as_ref().copied()
92694    }
92695}
92696#[allow(dead_code)]
92697impl InputMediaDocument {
92698    #[allow(clippy::too_many_arguments)]
92699    pub fn new(media: Option<InputFile>) -> Self {
92700        Self {
92701            tg_type: "document".to_owned(),
92702            media,
92703            thumbnail: None,
92704            caption: None,
92705            parse_mode: None,
92706            caption_entities: None,
92707            disable_content_type_detection: None,
92708        }
92709    }
92710    #[allow(rustdoc::invalid_html_tags)]
92711    #[doc = "Type of the result, must be document"]
92712    #[allow(clippy::needless_lifetimes)]
92713    pub fn get_tg_type<'a>(&'a self) -> &'a str {
92714        self.tg_type.as_str()
92715    }
92716    #[allow(rustdoc::invalid_html_tags)]
92717    #[doc = "Type of the result, must be document"]
92718    #[allow(clippy::needless_lifetimes)]
92719    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
92720        self.tg_type = tg_type;
92721        self
92722    }
92723    #[allow(rustdoc::invalid_html_tags)]
92724    #[doc = "Type of the result, must be document"]
92725    fn rhai_get_tg_type(&mut self) -> String {
92726        self.tg_type.clone()
92727    }
92728    #[allow(rustdoc::invalid_html_tags)]
92729    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92730    #[allow(clippy::needless_lifetimes)]
92731    pub fn get_media<'a>(&'a self) -> &'a Option<InputFile> {
92732        &self.media
92733    }
92734    #[allow(rustdoc::invalid_html_tags)]
92735    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92736    #[allow(clippy::needless_lifetimes)]
92737    pub fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self {
92738        self.media = media;
92739        self
92740    }
92741    #[allow(rustdoc::invalid_html_tags)]
92742    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92743    fn rhai_get_media(&mut self) -> Option<InputFile> {
92744        self.media.clone()
92745    }
92746    #[allow(rustdoc::invalid_html_tags)]
92747    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92748    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92749    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a str> {
92750        self.thumbnail.as_ref().map(|v| v.as_str())
92751    }
92752    #[allow(rustdoc::invalid_html_tags)]
92753    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92754    #[allow(clippy::needless_lifetimes)]
92755    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<String>) -> &'a mut Self {
92756        self.thumbnail = thumbnail;
92757        self
92758    }
92759    #[allow(rustdoc::invalid_html_tags)]
92760    #[doc = "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92761    fn rhai_get_thumbnail(&mut self) -> Option<String> {
92762        self.thumbnail.as_ref().cloned()
92763    }
92764    #[allow(rustdoc::invalid_html_tags)]
92765    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
92766    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92767    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
92768        self.caption.as_ref().map(|v| v.as_str())
92769    }
92770    #[allow(rustdoc::invalid_html_tags)]
92771    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
92772    #[allow(clippy::needless_lifetimes)]
92773    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
92774        self.caption = caption;
92775        self
92776    }
92777    #[allow(rustdoc::invalid_html_tags)]
92778    #[doc = "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing"]
92779    fn rhai_get_caption(&mut self) -> Option<String> {
92780        self.caption.as_ref().cloned()
92781    }
92782    #[allow(rustdoc::invalid_html_tags)]
92783    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
92784    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92785    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
92786        self.parse_mode.as_ref().map(|v| v.as_str())
92787    }
92788    #[allow(rustdoc::invalid_html_tags)]
92789    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
92790    #[allow(clippy::needless_lifetimes)]
92791    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
92792        self.parse_mode = parse_mode;
92793        self
92794    }
92795    #[allow(rustdoc::invalid_html_tags)]
92796    #[doc = "Optional. Mode for parsing entities in the document caption. See formatting options for more details."]
92797    fn rhai_get_parse_mode(&mut self) -> Option<String> {
92798        self.parse_mode.as_ref().cloned()
92799    }
92800    #[allow(rustdoc::invalid_html_tags)]
92801    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
92802    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92803    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
92804        self.caption_entities.as_ref()
92805    }
92806    #[allow(rustdoc::invalid_html_tags)]
92807    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
92808    #[allow(clippy::needless_lifetimes)]
92809    pub fn set_caption_entities<'a>(
92810        &'a mut self,
92811        caption_entities: Option<Vec<MessageEntity>>,
92812    ) -> &'a mut Self {
92813        self.caption_entities = caption_entities;
92814        self
92815    }
92816    #[allow(rustdoc::invalid_html_tags)]
92817    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
92818    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
92819        self.caption_entities.as_ref().cloned()
92820    }
92821    #[allow(rustdoc::invalid_html_tags)]
92822    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
92823    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92824    pub fn get_disable_content_type_detection<'a>(&'a self) -> Option<bool> {
92825        self.disable_content_type_detection.as_ref().map(|v| *v)
92826    }
92827    #[allow(rustdoc::invalid_html_tags)]
92828    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
92829    #[allow(clippy::needless_lifetimes)]
92830    pub fn set_disable_content_type_detection<'a>(
92831        &'a mut self,
92832        disable_content_type_detection: Option<bool>,
92833    ) -> &'a mut Self {
92834        self.disable_content_type_detection = disable_content_type_detection;
92835        self
92836    }
92837    #[allow(rustdoc::invalid_html_tags)]
92838    #[doc = "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album."]
92839    fn rhai_get_disable_content_type_detection(&mut self) -> Option<bool> {
92840        self.disable_content_type_detection.as_ref().copied()
92841    }
92842    fn convert_form(self, data: Form) -> Result<(Form, String)> {
92843        match self.media {
92844            Some(InputFile::Bytes(FileBytes {
92845                name,
92846                bytes: Some(bytes),
92847            })) => {
92848                let attach = format!("attach://{}", name);
92849                let form = data.part(name, Part::bytes(bytes));
92850                Ok((form, attach))
92851            }
92852            Some(InputFile::String(name)) => Ok((data, name)),
92853            _ => Err(anyhow!("cry")),
92854        }
92855    }
92856}
92857#[allow(dead_code)]
92858impl BusinessIntro {
92859    #[allow(clippy::too_many_arguments)]
92860    pub fn new() -> Self {
92861        Self {
92862            title: None,
92863            message: None,
92864            sticker: None,
92865        }
92866    }
92867    #[allow(rustdoc::invalid_html_tags)]
92868    #[doc = "Optional. Title text of the business intro"]
92869    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92870    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
92871        self.title.as_ref().map(|v| v.as_str())
92872    }
92873    #[allow(rustdoc::invalid_html_tags)]
92874    #[doc = "Optional. Title text of the business intro"]
92875    #[allow(clippy::needless_lifetimes)]
92876    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
92877        self.title = title;
92878        self
92879    }
92880    #[allow(rustdoc::invalid_html_tags)]
92881    #[doc = "Optional. Title text of the business intro"]
92882    fn rhai_get_title(&mut self) -> Option<String> {
92883        self.title.as_ref().cloned()
92884    }
92885    #[allow(rustdoc::invalid_html_tags)]
92886    #[doc = "Optional. Message text of the business intro"]
92887    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92888    pub fn get_message<'a>(&'a self) -> Option<&'a str> {
92889        self.message.as_ref().map(|v| v.as_str())
92890    }
92891    #[allow(rustdoc::invalid_html_tags)]
92892    #[doc = "Optional. Message text of the business intro"]
92893    #[allow(clippy::needless_lifetimes)]
92894    pub fn set_message<'a>(&'a mut self, message: Option<String>) -> &'a mut Self {
92895        self.message = message;
92896        self
92897    }
92898    #[allow(rustdoc::invalid_html_tags)]
92899    #[doc = "Optional. Message text of the business intro"]
92900    fn rhai_get_message(&mut self) -> Option<String> {
92901        self.message.as_ref().cloned()
92902    }
92903    #[allow(rustdoc::invalid_html_tags)]
92904    #[doc = "Optional. Sticker of the business intro"]
92905    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92906    pub fn get_sticker<'a>(&'a self) -> Option<&'a Sticker> {
92907        self.sticker.as_ref().map(|v| v.inner_ref())
92908    }
92909    #[allow(rustdoc::invalid_html_tags)]
92910    #[doc = "Optional. Sticker of the business intro"]
92911    #[allow(clippy::needless_lifetimes)]
92912    pub fn set_sticker<'a>(&'a mut self, sticker: Option<Sticker>) -> &'a mut Self {
92913        self.sticker = sticker.map(|sticker| BoxWrapper(Unbox(sticker)));
92914        self
92915    }
92916    #[allow(rustdoc::invalid_html_tags)]
92917    #[doc = "Optional. Sticker of the business intro"]
92918    fn rhai_get_sticker(&mut self) -> Option<Sticker> {
92919        self.sticker.as_ref().map(|v| v.clone().into())
92920    }
92921}
92922#[allow(dead_code)]
92923impl GiveawayCreated {
92924    #[allow(clippy::too_many_arguments)]
92925    pub fn new() -> Self {
92926        Self {
92927            prize_star_count: None,
92928        }
92929    }
92930    #[allow(rustdoc::invalid_html_tags)]
92931    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
92932    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
92933    pub fn get_prize_star_count<'a>(&'a self) -> Option<i64> {
92934        self.prize_star_count.as_ref().map(|v| *v)
92935    }
92936    #[allow(rustdoc::invalid_html_tags)]
92937    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
92938    #[allow(clippy::needless_lifetimes)]
92939    pub fn set_prize_star_count<'a>(&'a mut self, prize_star_count: Option<i64>) -> &'a mut Self {
92940        self.prize_star_count = prize_star_count;
92941        self
92942    }
92943    #[allow(rustdoc::invalid_html_tags)]
92944    #[doc = "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only"]
92945    fn rhai_get_prize_star_count(&mut self) -> Option<i64> {
92946        self.prize_star_count.as_ref().copied()
92947    }
92948}
92949impl TraitInputProfilePhotoStatic for InputProfilePhotoStatic {
92950    #[allow(rustdoc::invalid_html_tags)]
92951    #[doc = "Type of the profile photo, must be static"]
92952    #[allow(clippy::needless_lifetimes)]
92953    fn get_tg_type<'a>(&'a self) -> &'a str {
92954        self.tg_type.as_str()
92955    }
92956    #[allow(rustdoc::invalid_html_tags)]
92957    #[doc = "Type of the profile photo, must be static"]
92958    #[allow(clippy::needless_lifetimes)]
92959    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
92960        self.tg_type = tg_type;
92961        self
92962    }
92963    #[allow(rustdoc::invalid_html_tags)]
92964    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92965    #[allow(clippy::needless_lifetimes)]
92966    fn get_photo<'a>(&'a self) -> &'a str {
92967        self.photo.as_str()
92968    }
92969    #[allow(rustdoc::invalid_html_tags)]
92970    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92971    #[allow(clippy::needless_lifetimes)]
92972    fn set_photo<'a>(&'a mut self, photo: String) -> &'a mut Self {
92973        self.photo = photo;
92974        self
92975    }
92976}
92977impl TraitInputProfilePhotoAnimated for InputProfilePhotoAnimated {
92978    #[allow(rustdoc::invalid_html_tags)]
92979    #[doc = "Type of the profile photo, must be animated"]
92980    #[allow(clippy::needless_lifetimes)]
92981    fn get_tg_type<'a>(&'a self) -> &'a str {
92982        self.tg_type.as_str()
92983    }
92984    #[allow(rustdoc::invalid_html_tags)]
92985    #[doc = "Type of the profile photo, must be animated"]
92986    #[allow(clippy::needless_lifetimes)]
92987    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
92988        self.tg_type = tg_type;
92989        self
92990    }
92991    #[allow(rustdoc::invalid_html_tags)]
92992    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92993    #[allow(clippy::needless_lifetimes)]
92994    fn get_animation<'a>(&'a self) -> &'a str {
92995        self.animation.as_str()
92996    }
92997    #[allow(rustdoc::invalid_html_tags)]
92998    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
92999    #[allow(clippy::needless_lifetimes)]
93000    fn set_animation<'a>(&'a mut self, animation: String) -> &'a mut Self {
93001        self.animation = animation;
93002        self
93003    }
93004    #[allow(rustdoc::invalid_html_tags)]
93005    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
93006    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93007    fn get_main_frame_timestamp<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
93008        self.main_frame_timestamp.as_ref().map(|v| *v)
93009    }
93010    #[allow(rustdoc::invalid_html_tags)]
93011    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
93012    #[allow(clippy::needless_lifetimes)]
93013    fn set_main_frame_timestamp<'a>(
93014        &'a mut self,
93015        main_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
93016    ) -> &'a mut Self {
93017        self.main_frame_timestamp = main_frame_timestamp;
93018        self
93019    }
93020}
93021#[allow(dead_code)]
93022impl ChatMemberAdministrator {
93023    #[allow(clippy::too_many_arguments)]
93024    pub fn new<A: Into<User>>(
93025        user: A,
93026        can_be_edited: bool,
93027        is_anonymous: bool,
93028        can_manage_chat: bool,
93029        can_delete_messages: bool,
93030        can_manage_video_chats: bool,
93031        can_restrict_members: bool,
93032        can_promote_members: bool,
93033        can_change_info: bool,
93034        can_invite_users: bool,
93035        can_post_stories: bool,
93036        can_edit_stories: bool,
93037        can_delete_stories: bool,
93038    ) -> Self {
93039        Self {
93040            user: BoxWrapper::new_unbox(user.into()),
93041            can_be_edited,
93042            is_anonymous,
93043            can_manage_chat,
93044            can_delete_messages,
93045            can_manage_video_chats,
93046            can_restrict_members,
93047            can_promote_members,
93048            can_change_info,
93049            can_invite_users,
93050            can_post_stories,
93051            can_edit_stories,
93052            can_delete_stories,
93053            can_post_messages: None,
93054            can_edit_messages: None,
93055            can_pin_messages: None,
93056            can_manage_topics: None,
93057            can_manage_direct_messages: None,
93058            custom_title: None,
93059        }
93060    }
93061    #[allow(rustdoc::invalid_html_tags)]
93062    #[doc = "Information about the user"]
93063    #[allow(clippy::needless_lifetimes)]
93064    pub fn get_user<'a>(&'a self) -> &'a User {
93065        &self.user
93066    }
93067    #[allow(rustdoc::invalid_html_tags)]
93068    #[doc = "Information about the user"]
93069    #[allow(clippy::needless_lifetimes)]
93070    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
93071        self.user = BoxWrapper(Unbox(user));
93072        self
93073    }
93074    #[allow(rustdoc::invalid_html_tags)]
93075    #[doc = "Information about the user"]
93076    fn rhai_get_user(&mut self) -> User {
93077        self.user.clone().into()
93078    }
93079    #[allow(rustdoc::invalid_html_tags)]
93080    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
93081    #[allow(clippy::needless_lifetimes)]
93082    pub fn get_can_be_edited<'a>(&'a self) -> bool {
93083        self.can_be_edited
93084    }
93085    #[allow(rustdoc::invalid_html_tags)]
93086    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
93087    #[allow(clippy::needless_lifetimes)]
93088    pub fn set_can_be_edited<'a>(&'a mut self, can_be_edited: bool) -> &'a mut Self {
93089        self.can_be_edited = can_be_edited;
93090        self
93091    }
93092    #[allow(rustdoc::invalid_html_tags)]
93093    #[doc = "True, if the bot is allowed to edit administrator privileges of that user"]
93094    fn rhai_get_can_be_edited(&mut self) -> bool {
93095        self.can_be_edited
93096    }
93097    #[allow(rustdoc::invalid_html_tags)]
93098    #[doc = "True, if the user's presence in the chat is hidden"]
93099    #[allow(clippy::needless_lifetimes)]
93100    pub fn get_is_anonymous<'a>(&'a self) -> bool {
93101        self.is_anonymous
93102    }
93103    #[allow(rustdoc::invalid_html_tags)]
93104    #[doc = "True, if the user's presence in the chat is hidden"]
93105    #[allow(clippy::needless_lifetimes)]
93106    pub fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self {
93107        self.is_anonymous = is_anonymous;
93108        self
93109    }
93110    #[allow(rustdoc::invalid_html_tags)]
93111    #[doc = "True, if the user's presence in the chat is hidden"]
93112    fn rhai_get_is_anonymous(&mut self) -> bool {
93113        self.is_anonymous
93114    }
93115    #[allow(rustdoc::invalid_html_tags)]
93116    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
93117    #[allow(clippy::needless_lifetimes)]
93118    pub fn get_can_manage_chat<'a>(&'a self) -> bool {
93119        self.can_manage_chat
93120    }
93121    #[allow(rustdoc::invalid_html_tags)]
93122    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
93123    #[allow(clippy::needless_lifetimes)]
93124    pub fn set_can_manage_chat<'a>(&'a mut self, can_manage_chat: bool) -> &'a mut Self {
93125        self.can_manage_chat = can_manage_chat;
93126        self
93127    }
93128    #[allow(rustdoc::invalid_html_tags)]
93129    #[doc = "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege."]
93130    fn rhai_get_can_manage_chat(&mut self) -> bool {
93131        self.can_manage_chat
93132    }
93133    #[allow(rustdoc::invalid_html_tags)]
93134    #[doc = "True, if the administrator can delete messages of other users"]
93135    #[allow(clippy::needless_lifetimes)]
93136    pub fn get_can_delete_messages<'a>(&'a self) -> bool {
93137        self.can_delete_messages
93138    }
93139    #[allow(rustdoc::invalid_html_tags)]
93140    #[doc = "True, if the administrator can delete messages of other users"]
93141    #[allow(clippy::needless_lifetimes)]
93142    pub fn set_can_delete_messages<'a>(&'a mut self, can_delete_messages: bool) -> &'a mut Self {
93143        self.can_delete_messages = can_delete_messages;
93144        self
93145    }
93146    #[allow(rustdoc::invalid_html_tags)]
93147    #[doc = "True, if the administrator can delete messages of other users"]
93148    fn rhai_get_can_delete_messages(&mut self) -> bool {
93149        self.can_delete_messages
93150    }
93151    #[allow(rustdoc::invalid_html_tags)]
93152    #[doc = "True, if the administrator can manage video chats"]
93153    #[allow(clippy::needless_lifetimes)]
93154    pub fn get_can_manage_video_chats<'a>(&'a self) -> bool {
93155        self.can_manage_video_chats
93156    }
93157    #[allow(rustdoc::invalid_html_tags)]
93158    #[doc = "True, if the administrator can manage video chats"]
93159    #[allow(clippy::needless_lifetimes)]
93160    pub fn set_can_manage_video_chats<'a>(
93161        &'a mut self,
93162        can_manage_video_chats: bool,
93163    ) -> &'a mut Self {
93164        self.can_manage_video_chats = can_manage_video_chats;
93165        self
93166    }
93167    #[allow(rustdoc::invalid_html_tags)]
93168    #[doc = "True, if the administrator can manage video chats"]
93169    fn rhai_get_can_manage_video_chats(&mut self) -> bool {
93170        self.can_manage_video_chats
93171    }
93172    #[allow(rustdoc::invalid_html_tags)]
93173    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
93174    #[allow(clippy::needless_lifetimes)]
93175    pub fn get_can_restrict_members<'a>(&'a self) -> bool {
93176        self.can_restrict_members
93177    }
93178    #[allow(rustdoc::invalid_html_tags)]
93179    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
93180    #[allow(clippy::needless_lifetimes)]
93181    pub fn set_can_restrict_members<'a>(&'a mut self, can_restrict_members: bool) -> &'a mut Self {
93182        self.can_restrict_members = can_restrict_members;
93183        self
93184    }
93185    #[allow(rustdoc::invalid_html_tags)]
93186    #[doc = "True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics"]
93187    fn rhai_get_can_restrict_members(&mut self) -> bool {
93188        self.can_restrict_members
93189    }
93190    #[allow(rustdoc::invalid_html_tags)]
93191    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
93192    #[allow(clippy::needless_lifetimes)]
93193    pub fn get_can_promote_members<'a>(&'a self) -> bool {
93194        self.can_promote_members
93195    }
93196    #[allow(rustdoc::invalid_html_tags)]
93197    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
93198    #[allow(clippy::needless_lifetimes)]
93199    pub fn set_can_promote_members<'a>(&'a mut self, can_promote_members: bool) -> &'a mut Self {
93200        self.can_promote_members = can_promote_members;
93201        self
93202    }
93203    #[allow(rustdoc::invalid_html_tags)]
93204    #[doc = "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"]
93205    fn rhai_get_can_promote_members(&mut self) -> bool {
93206        self.can_promote_members
93207    }
93208    #[allow(rustdoc::invalid_html_tags)]
93209    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
93210    #[allow(clippy::needless_lifetimes)]
93211    pub fn get_can_change_info<'a>(&'a self) -> bool {
93212        self.can_change_info
93213    }
93214    #[allow(rustdoc::invalid_html_tags)]
93215    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
93216    #[allow(clippy::needless_lifetimes)]
93217    pub fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self {
93218        self.can_change_info = can_change_info;
93219        self
93220    }
93221    #[allow(rustdoc::invalid_html_tags)]
93222    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
93223    fn rhai_get_can_change_info(&mut self) -> bool {
93224        self.can_change_info
93225    }
93226    #[allow(rustdoc::invalid_html_tags)]
93227    #[doc = "True, if the user is allowed to invite new users to the chat"]
93228    #[allow(clippy::needless_lifetimes)]
93229    pub fn get_can_invite_users<'a>(&'a self) -> bool {
93230        self.can_invite_users
93231    }
93232    #[allow(rustdoc::invalid_html_tags)]
93233    #[doc = "True, if the user is allowed to invite new users to the chat"]
93234    #[allow(clippy::needless_lifetimes)]
93235    pub fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self {
93236        self.can_invite_users = can_invite_users;
93237        self
93238    }
93239    #[allow(rustdoc::invalid_html_tags)]
93240    #[doc = "True, if the user is allowed to invite new users to the chat"]
93241    fn rhai_get_can_invite_users(&mut self) -> bool {
93242        self.can_invite_users
93243    }
93244    #[allow(rustdoc::invalid_html_tags)]
93245    #[doc = "True, if the administrator can post stories to the chat"]
93246    #[allow(clippy::needless_lifetimes)]
93247    pub fn get_can_post_stories<'a>(&'a self) -> bool {
93248        self.can_post_stories
93249    }
93250    #[allow(rustdoc::invalid_html_tags)]
93251    #[doc = "True, if the administrator can post stories to the chat"]
93252    #[allow(clippy::needless_lifetimes)]
93253    pub fn set_can_post_stories<'a>(&'a mut self, can_post_stories: bool) -> &'a mut Self {
93254        self.can_post_stories = can_post_stories;
93255        self
93256    }
93257    #[allow(rustdoc::invalid_html_tags)]
93258    #[doc = "True, if the administrator can post stories to the chat"]
93259    fn rhai_get_can_post_stories(&mut self) -> bool {
93260        self.can_post_stories
93261    }
93262    #[allow(rustdoc::invalid_html_tags)]
93263    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
93264    #[allow(clippy::needless_lifetimes)]
93265    pub fn get_can_edit_stories<'a>(&'a self) -> bool {
93266        self.can_edit_stories
93267    }
93268    #[allow(rustdoc::invalid_html_tags)]
93269    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
93270    #[allow(clippy::needless_lifetimes)]
93271    pub fn set_can_edit_stories<'a>(&'a mut self, can_edit_stories: bool) -> &'a mut Self {
93272        self.can_edit_stories = can_edit_stories;
93273        self
93274    }
93275    #[allow(rustdoc::invalid_html_tags)]
93276    #[doc = "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"]
93277    fn rhai_get_can_edit_stories(&mut self) -> bool {
93278        self.can_edit_stories
93279    }
93280    #[allow(rustdoc::invalid_html_tags)]
93281    #[doc = "True, if the administrator can delete stories posted by other users"]
93282    #[allow(clippy::needless_lifetimes)]
93283    pub fn get_can_delete_stories<'a>(&'a self) -> bool {
93284        self.can_delete_stories
93285    }
93286    #[allow(rustdoc::invalid_html_tags)]
93287    #[doc = "True, if the administrator can delete stories posted by other users"]
93288    #[allow(clippy::needless_lifetimes)]
93289    pub fn set_can_delete_stories<'a>(&'a mut self, can_delete_stories: bool) -> &'a mut Self {
93290        self.can_delete_stories = can_delete_stories;
93291        self
93292    }
93293    #[allow(rustdoc::invalid_html_tags)]
93294    #[doc = "True, if the administrator can delete stories posted by other users"]
93295    fn rhai_get_can_delete_stories(&mut self) -> bool {
93296        self.can_delete_stories
93297    }
93298    #[allow(rustdoc::invalid_html_tags)]
93299    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
93300    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93301    pub fn get_can_post_messages<'a>(&'a self) -> Option<bool> {
93302        self.can_post_messages.as_ref().map(|v| *v)
93303    }
93304    #[allow(rustdoc::invalid_html_tags)]
93305    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
93306    #[allow(clippy::needless_lifetimes)]
93307    pub fn set_can_post_messages<'a>(
93308        &'a mut self,
93309        can_post_messages: Option<bool>,
93310    ) -> &'a mut Self {
93311        self.can_post_messages = can_post_messages;
93312        self
93313    }
93314    #[allow(rustdoc::invalid_html_tags)]
93315    #[doc = "Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"]
93316    fn rhai_get_can_post_messages(&mut self) -> Option<bool> {
93317        self.can_post_messages.as_ref().copied()
93318    }
93319    #[allow(rustdoc::invalid_html_tags)]
93320    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
93321    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93322    pub fn get_can_edit_messages<'a>(&'a self) -> Option<bool> {
93323        self.can_edit_messages.as_ref().map(|v| *v)
93324    }
93325    #[allow(rustdoc::invalid_html_tags)]
93326    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
93327    #[allow(clippy::needless_lifetimes)]
93328    pub fn set_can_edit_messages<'a>(
93329        &'a mut self,
93330        can_edit_messages: Option<bool>,
93331    ) -> &'a mut Self {
93332        self.can_edit_messages = can_edit_messages;
93333        self
93334    }
93335    #[allow(rustdoc::invalid_html_tags)]
93336    #[doc = "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only"]
93337    fn rhai_get_can_edit_messages(&mut self) -> Option<bool> {
93338        self.can_edit_messages.as_ref().copied()
93339    }
93340    #[allow(rustdoc::invalid_html_tags)]
93341    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
93342    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93343    pub fn get_can_pin_messages<'a>(&'a self) -> Option<bool> {
93344        self.can_pin_messages.as_ref().map(|v| *v)
93345    }
93346    #[allow(rustdoc::invalid_html_tags)]
93347    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
93348    #[allow(clippy::needless_lifetimes)]
93349    pub fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: Option<bool>) -> &'a mut Self {
93350        self.can_pin_messages = can_pin_messages;
93351        self
93352    }
93353    #[allow(rustdoc::invalid_html_tags)]
93354    #[doc = "Optional. True, if the user is allowed to pin messages; for groups and supergroups only"]
93355    fn rhai_get_can_pin_messages(&mut self) -> Option<bool> {
93356        self.can_pin_messages.as_ref().copied()
93357    }
93358    #[allow(rustdoc::invalid_html_tags)]
93359    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
93360    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93361    pub fn get_can_manage_topics<'a>(&'a self) -> Option<bool> {
93362        self.can_manage_topics.as_ref().map(|v| *v)
93363    }
93364    #[allow(rustdoc::invalid_html_tags)]
93365    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
93366    #[allow(clippy::needless_lifetimes)]
93367    pub fn set_can_manage_topics<'a>(
93368        &'a mut self,
93369        can_manage_topics: Option<bool>,
93370    ) -> &'a mut Self {
93371        self.can_manage_topics = can_manage_topics;
93372        self
93373    }
93374    #[allow(rustdoc::invalid_html_tags)]
93375    #[doc = "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"]
93376    fn rhai_get_can_manage_topics(&mut self) -> Option<bool> {
93377        self.can_manage_topics.as_ref().copied()
93378    }
93379    #[allow(rustdoc::invalid_html_tags)]
93380    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
93381    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93382    pub fn get_can_manage_direct_messages<'a>(&'a self) -> Option<bool> {
93383        self.can_manage_direct_messages.as_ref().map(|v| *v)
93384    }
93385    #[allow(rustdoc::invalid_html_tags)]
93386    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
93387    #[allow(clippy::needless_lifetimes)]
93388    pub fn set_can_manage_direct_messages<'a>(
93389        &'a mut self,
93390        can_manage_direct_messages: Option<bool>,
93391    ) -> &'a mut Self {
93392        self.can_manage_direct_messages = can_manage_direct_messages;
93393        self
93394    }
93395    #[allow(rustdoc::invalid_html_tags)]
93396    #[doc = "Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only"]
93397    fn rhai_get_can_manage_direct_messages(&mut self) -> Option<bool> {
93398        self.can_manage_direct_messages.as_ref().copied()
93399    }
93400    #[allow(rustdoc::invalid_html_tags)]
93401    #[doc = "Optional. Custom title for this user"]
93402    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93403    pub fn get_custom_title<'a>(&'a self) -> Option<&'a str> {
93404        self.custom_title.as_ref().map(|v| v.as_str())
93405    }
93406    #[allow(rustdoc::invalid_html_tags)]
93407    #[doc = "Optional. Custom title for this user"]
93408    #[allow(clippy::needless_lifetimes)]
93409    pub fn set_custom_title<'a>(&'a mut self, custom_title: Option<String>) -> &'a mut Self {
93410        self.custom_title = custom_title;
93411        self
93412    }
93413    #[allow(rustdoc::invalid_html_tags)]
93414    #[doc = "Optional. Custom title for this user"]
93415    fn rhai_get_custom_title(&mut self) -> Option<String> {
93416        self.custom_title.as_ref().cloned()
93417    }
93418}
93419#[allow(dead_code)]
93420impl InlineQueryResultGif {
93421    #[allow(clippy::too_many_arguments)]
93422    pub fn new(id: String, gif_url: String, thumbnail_url: String) -> Self {
93423        Self {
93424            tg_type: "gif".to_owned(),
93425            id,
93426            gif_url,
93427            thumbnail_url,
93428            gif_width: None,
93429            gif_height: None,
93430            gif_duration: None,
93431            thumbnail_mime_type: None,
93432            title: None,
93433            caption: None,
93434            parse_mode: None,
93435            caption_entities: None,
93436            show_caption_above_media: None,
93437            reply_markup: None,
93438            input_message_content: None,
93439        }
93440    }
93441    #[allow(rustdoc::invalid_html_tags)]
93442    #[doc = "Type of the result, must be gif"]
93443    #[allow(clippy::needless_lifetimes)]
93444    pub fn get_tg_type<'a>(&'a self) -> &'a str {
93445        self.tg_type.as_str()
93446    }
93447    #[allow(rustdoc::invalid_html_tags)]
93448    #[doc = "Type of the result, must be gif"]
93449    #[allow(clippy::needless_lifetimes)]
93450    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
93451        self.tg_type = tg_type;
93452        self
93453    }
93454    #[allow(rustdoc::invalid_html_tags)]
93455    #[doc = "Type of the result, must be gif"]
93456    fn rhai_get_tg_type(&mut self) -> String {
93457        self.tg_type.clone()
93458    }
93459    #[allow(rustdoc::invalid_html_tags)]
93460    #[doc = "Unique identifier for this result, 1-64 bytes"]
93461    #[allow(clippy::needless_lifetimes)]
93462    pub fn get_id<'a>(&'a self) -> &'a str {
93463        self.id.as_str()
93464    }
93465    #[allow(rustdoc::invalid_html_tags)]
93466    #[doc = "Unique identifier for this result, 1-64 bytes"]
93467    #[allow(clippy::needless_lifetimes)]
93468    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
93469        self.id = id;
93470        self
93471    }
93472    #[allow(rustdoc::invalid_html_tags)]
93473    #[doc = "Unique identifier for this result, 1-64 bytes"]
93474    fn rhai_get_id(&mut self) -> String {
93475        self.id.clone()
93476    }
93477    #[allow(rustdoc::invalid_html_tags)]
93478    #[doc = "A valid URL for the GIF file"]
93479    #[allow(clippy::needless_lifetimes)]
93480    pub fn get_gif_url<'a>(&'a self) -> &'a str {
93481        self.gif_url.as_str()
93482    }
93483    #[allow(rustdoc::invalid_html_tags)]
93484    #[doc = "A valid URL for the GIF file"]
93485    #[allow(clippy::needless_lifetimes)]
93486    pub fn set_gif_url<'a>(&'a mut self, gif_url: String) -> &'a mut Self {
93487        self.gif_url = gif_url;
93488        self
93489    }
93490    #[allow(rustdoc::invalid_html_tags)]
93491    #[doc = "A valid URL for the GIF file"]
93492    fn rhai_get_gif_url(&mut self) -> String {
93493        self.gif_url.clone()
93494    }
93495    #[allow(rustdoc::invalid_html_tags)]
93496    #[doc = "Optional. Width of the GIF"]
93497    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93498    pub fn get_gif_width<'a>(&'a self) -> Option<i64> {
93499        self.gif_width.as_ref().map(|v| *v)
93500    }
93501    #[allow(rustdoc::invalid_html_tags)]
93502    #[doc = "Optional. Width of the GIF"]
93503    #[allow(clippy::needless_lifetimes)]
93504    pub fn set_gif_width<'a>(&'a mut self, gif_width: Option<i64>) -> &'a mut Self {
93505        self.gif_width = gif_width;
93506        self
93507    }
93508    #[allow(rustdoc::invalid_html_tags)]
93509    #[doc = "Optional. Width of the GIF"]
93510    fn rhai_get_gif_width(&mut self) -> Option<i64> {
93511        self.gif_width.as_ref().copied()
93512    }
93513    #[allow(rustdoc::invalid_html_tags)]
93514    #[doc = "Optional. Height of the GIF"]
93515    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93516    pub fn get_gif_height<'a>(&'a self) -> Option<i64> {
93517        self.gif_height.as_ref().map(|v| *v)
93518    }
93519    #[allow(rustdoc::invalid_html_tags)]
93520    #[doc = "Optional. Height of the GIF"]
93521    #[allow(clippy::needless_lifetimes)]
93522    pub fn set_gif_height<'a>(&'a mut self, gif_height: Option<i64>) -> &'a mut Self {
93523        self.gif_height = gif_height;
93524        self
93525    }
93526    #[allow(rustdoc::invalid_html_tags)]
93527    #[doc = "Optional. Height of the GIF"]
93528    fn rhai_get_gif_height(&mut self) -> Option<i64> {
93529        self.gif_height.as_ref().copied()
93530    }
93531    #[allow(rustdoc::invalid_html_tags)]
93532    #[doc = "Optional. Duration of the GIF in seconds"]
93533    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93534    pub fn get_gif_duration<'a>(&'a self) -> Option<i64> {
93535        self.gif_duration.as_ref().map(|v| *v)
93536    }
93537    #[allow(rustdoc::invalid_html_tags)]
93538    #[doc = "Optional. Duration of the GIF in seconds"]
93539    #[allow(clippy::needless_lifetimes)]
93540    pub fn set_gif_duration<'a>(&'a mut self, gif_duration: Option<i64>) -> &'a mut Self {
93541        self.gif_duration = gif_duration;
93542        self
93543    }
93544    #[allow(rustdoc::invalid_html_tags)]
93545    #[doc = "Optional. Duration of the GIF in seconds"]
93546    fn rhai_get_gif_duration(&mut self) -> Option<i64> {
93547        self.gif_duration.as_ref().copied()
93548    }
93549    #[allow(rustdoc::invalid_html_tags)]
93550    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
93551    #[allow(clippy::needless_lifetimes)]
93552    pub fn get_thumbnail_url<'a>(&'a self) -> &'a str {
93553        self.thumbnail_url.as_str()
93554    }
93555    #[allow(rustdoc::invalid_html_tags)]
93556    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
93557    #[allow(clippy::needless_lifetimes)]
93558    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
93559        self.thumbnail_url = thumbnail_url;
93560        self
93561    }
93562    #[allow(rustdoc::invalid_html_tags)]
93563    #[doc = "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result"]
93564    fn rhai_get_thumbnail_url(&mut self) -> String {
93565        self.thumbnail_url.clone()
93566    }
93567    #[allow(rustdoc::invalid_html_tags)]
93568    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
93569    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93570    pub fn get_thumbnail_mime_type<'a>(&'a self) -> Option<&'a str> {
93571        self.thumbnail_mime_type.as_ref().map(|v| v.as_str())
93572    }
93573    #[allow(rustdoc::invalid_html_tags)]
93574    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
93575    #[allow(clippy::needless_lifetimes)]
93576    pub fn set_thumbnail_mime_type<'a>(
93577        &'a mut self,
93578        thumbnail_mime_type: Option<String>,
93579    ) -> &'a mut Self {
93580        self.thumbnail_mime_type = thumbnail_mime_type;
93581        self
93582    }
93583    #[allow(rustdoc::invalid_html_tags)]
93584    #[doc = "Optional. MIME type of the thumbnail, must be one of \"image/jpeg\", \"image/gif\", or \"video/mp4\". Defaults to \"image/jpeg\""]
93585    fn rhai_get_thumbnail_mime_type(&mut self) -> Option<String> {
93586        self.thumbnail_mime_type.as_ref().cloned()
93587    }
93588    #[allow(rustdoc::invalid_html_tags)]
93589    #[doc = "Optional. Title for the result"]
93590    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93591    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
93592        self.title.as_ref().map(|v| v.as_str())
93593    }
93594    #[allow(rustdoc::invalid_html_tags)]
93595    #[doc = "Optional. Title for the result"]
93596    #[allow(clippy::needless_lifetimes)]
93597    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
93598        self.title = title;
93599        self
93600    }
93601    #[allow(rustdoc::invalid_html_tags)]
93602    #[doc = "Optional. Title for the result"]
93603    fn rhai_get_title(&mut self) -> Option<String> {
93604        self.title.as_ref().cloned()
93605    }
93606    #[allow(rustdoc::invalid_html_tags)]
93607    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
93608    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93609    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
93610        self.caption.as_ref().map(|v| v.as_str())
93611    }
93612    #[allow(rustdoc::invalid_html_tags)]
93613    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
93614    #[allow(clippy::needless_lifetimes)]
93615    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
93616        self.caption = caption;
93617        self
93618    }
93619    #[allow(rustdoc::invalid_html_tags)]
93620    #[doc = "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing"]
93621    fn rhai_get_caption(&mut self) -> Option<String> {
93622        self.caption.as_ref().cloned()
93623    }
93624    #[allow(rustdoc::invalid_html_tags)]
93625    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
93626    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93627    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
93628        self.parse_mode.as_ref().map(|v| v.as_str())
93629    }
93630    #[allow(rustdoc::invalid_html_tags)]
93631    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
93632    #[allow(clippy::needless_lifetimes)]
93633    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
93634        self.parse_mode = parse_mode;
93635        self
93636    }
93637    #[allow(rustdoc::invalid_html_tags)]
93638    #[doc = "Optional. Mode for parsing entities in the caption. See formatting options for more details."]
93639    fn rhai_get_parse_mode(&mut self) -> Option<String> {
93640        self.parse_mode.as_ref().cloned()
93641    }
93642    #[allow(rustdoc::invalid_html_tags)]
93643    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
93644    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93645    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
93646        self.caption_entities.as_ref()
93647    }
93648    #[allow(rustdoc::invalid_html_tags)]
93649    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
93650    #[allow(clippy::needless_lifetimes)]
93651    pub fn set_caption_entities<'a>(
93652        &'a mut self,
93653        caption_entities: Option<Vec<MessageEntity>>,
93654    ) -> &'a mut Self {
93655        self.caption_entities = caption_entities;
93656        self
93657    }
93658    #[allow(rustdoc::invalid_html_tags)]
93659    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
93660    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
93661        self.caption_entities.as_ref().cloned()
93662    }
93663    #[allow(rustdoc::invalid_html_tags)]
93664    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
93665    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93666    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
93667        self.show_caption_above_media.as_ref().map(|v| *v)
93668    }
93669    #[allow(rustdoc::invalid_html_tags)]
93670    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
93671    #[allow(clippy::needless_lifetimes)]
93672    pub fn set_show_caption_above_media<'a>(
93673        &'a mut self,
93674        show_caption_above_media: Option<bool>,
93675    ) -> &'a mut Self {
93676        self.show_caption_above_media = show_caption_above_media;
93677        self
93678    }
93679    #[allow(rustdoc::invalid_html_tags)]
93680    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
93681    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
93682        self.show_caption_above_media.as_ref().copied()
93683    }
93684    #[allow(rustdoc::invalid_html_tags)]
93685    #[doc = "Optional. Inline keyboard attached to the message"]
93686    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93687    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
93688        self.reply_markup.as_ref().map(|v| v.inner_ref())
93689    }
93690    #[allow(rustdoc::invalid_html_tags)]
93691    #[doc = "Optional. Inline keyboard attached to the message"]
93692    #[allow(clippy::needless_lifetimes)]
93693    pub fn set_reply_markup<'a>(
93694        &'a mut self,
93695        reply_markup: Option<InlineKeyboardMarkup>,
93696    ) -> &'a mut Self {
93697        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
93698        self
93699    }
93700    #[allow(rustdoc::invalid_html_tags)]
93701    #[doc = "Optional. Inline keyboard attached to the message"]
93702    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
93703        self.reply_markup.as_ref().map(|v| v.clone().into())
93704    }
93705    #[allow(rustdoc::invalid_html_tags)]
93706    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
93707    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93708    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
93709        self.input_message_content.as_ref().map(|v| v.inner_ref())
93710    }
93711    #[allow(rustdoc::invalid_html_tags)]
93712    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
93713    #[allow(clippy::needless_lifetimes)]
93714    pub fn set_input_message_content<'a>(
93715        &'a mut self,
93716        input_message_content: Option<InputMessageContent>,
93717    ) -> &'a mut Self {
93718        self.input_message_content = input_message_content
93719            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
93720        self
93721    }
93722    #[allow(rustdoc::invalid_html_tags)]
93723    #[doc = "Optional. Content of the message to be sent instead of the GIF animation"]
93724    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
93725        self.input_message_content
93726            .as_ref()
93727            .map(|v| v.clone().into())
93728    }
93729}
93730#[allow(dead_code)]
93731impl InputProfilePhotoAnimated {
93732    #[allow(clippy::too_many_arguments)]
93733    pub fn new(animation: String) -> Self {
93734        Self {
93735            tg_type: "animated".to_owned(),
93736            animation,
93737            main_frame_timestamp: None,
93738        }
93739    }
93740    #[allow(rustdoc::invalid_html_tags)]
93741    #[doc = "Type of the profile photo, must be animated"]
93742    #[allow(clippy::needless_lifetimes)]
93743    pub fn get_tg_type<'a>(&'a self) -> &'a str {
93744        self.tg_type.as_str()
93745    }
93746    #[allow(rustdoc::invalid_html_tags)]
93747    #[doc = "Type of the profile photo, must be animated"]
93748    #[allow(clippy::needless_lifetimes)]
93749    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
93750        self.tg_type = tg_type;
93751        self
93752    }
93753    #[allow(rustdoc::invalid_html_tags)]
93754    #[doc = "Type of the profile photo, must be animated"]
93755    fn rhai_get_tg_type(&mut self) -> String {
93756        self.tg_type.clone()
93757    }
93758    #[allow(rustdoc::invalid_html_tags)]
93759    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
93760    #[allow(clippy::needless_lifetimes)]
93761    pub fn get_animation<'a>(&'a self) -> &'a str {
93762        self.animation.as_str()
93763    }
93764    #[allow(rustdoc::invalid_html_tags)]
93765    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
93766    #[allow(clippy::needless_lifetimes)]
93767    pub fn set_animation<'a>(&'a mut self, animation: String) -> &'a mut Self {
93768        self.animation = animation;
93769        self
93770    }
93771    #[allow(rustdoc::invalid_html_tags)]
93772    #[doc = "The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
93773    fn rhai_get_animation(&mut self) -> String {
93774        self.animation.clone()
93775    }
93776    #[allow(rustdoc::invalid_html_tags)]
93777    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
93778    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93779    pub fn get_main_frame_timestamp<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
93780        self.main_frame_timestamp.as_ref().map(|v| *v)
93781    }
93782    #[allow(rustdoc::invalid_html_tags)]
93783    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
93784    #[allow(clippy::needless_lifetimes)]
93785    pub fn set_main_frame_timestamp<'a>(
93786        &'a mut self,
93787        main_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
93788    ) -> &'a mut Self {
93789        self.main_frame_timestamp = main_frame_timestamp;
93790        self
93791    }
93792    #[allow(rustdoc::invalid_html_tags)]
93793    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0."]
93794    fn rhai_get_main_frame_timestamp(&mut self) -> Option<::ordered_float::OrderedFloat<f64>> {
93795        self.main_frame_timestamp.as_ref().copied()
93796    }
93797}
93798#[allow(dead_code)]
93799impl VideoChatParticipantsInvited {
93800    #[allow(clippy::too_many_arguments)]
93801    pub fn new(users: Vec<User>) -> Self {
93802        Self { users }
93803    }
93804    #[allow(rustdoc::invalid_html_tags)]
93805    #[doc = "New members that were invited to the video chat"]
93806    #[allow(clippy::needless_lifetimes)]
93807    pub fn get_users<'a>(&'a self) -> &'a Vec<User> {
93808        &self.users
93809    }
93810    #[allow(rustdoc::invalid_html_tags)]
93811    #[doc = "New members that were invited to the video chat"]
93812    #[allow(clippy::needless_lifetimes)]
93813    pub fn set_users<'a>(&'a mut self, users: Vec<User>) -> &'a mut Self {
93814        self.users = users;
93815        self
93816    }
93817    #[allow(rustdoc::invalid_html_tags)]
93818    #[doc = "New members that were invited to the video chat"]
93819    fn rhai_get_users(&mut self) -> Vec<User> {
93820        self.users.clone()
93821    }
93822}
93823#[allow(dead_code)]
93824impl LoginUrl {
93825    #[allow(clippy::too_many_arguments)]
93826    pub fn new(url: String) -> Self {
93827        Self {
93828            url,
93829            forward_text: None,
93830            bot_username: None,
93831            request_write_access: None,
93832        }
93833    }
93834    #[allow(rustdoc::invalid_html_tags)]
93835    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
93836    #[allow(clippy::needless_lifetimes)]
93837    pub fn get_url<'a>(&'a self) -> &'a str {
93838        self.url.as_str()
93839    }
93840    #[allow(rustdoc::invalid_html_tags)]
93841    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
93842    #[allow(clippy::needless_lifetimes)]
93843    pub fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self {
93844        self.url = url;
93845        self
93846    }
93847    #[allow(rustdoc::invalid_html_tags)]
93848    #[doc = "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."]
93849    fn rhai_get_url(&mut self) -> String {
93850        self.url.clone()
93851    }
93852    #[allow(rustdoc::invalid_html_tags)]
93853    #[doc = "Optional. New text of the button in forwarded messages."]
93854    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93855    pub fn get_forward_text<'a>(&'a self) -> Option<&'a str> {
93856        self.forward_text.as_ref().map(|v| v.as_str())
93857    }
93858    #[allow(rustdoc::invalid_html_tags)]
93859    #[doc = "Optional. New text of the button in forwarded messages."]
93860    #[allow(clippy::needless_lifetimes)]
93861    pub fn set_forward_text<'a>(&'a mut self, forward_text: Option<String>) -> &'a mut Self {
93862        self.forward_text = forward_text;
93863        self
93864    }
93865    #[allow(rustdoc::invalid_html_tags)]
93866    #[doc = "Optional. New text of the button in forwarded messages."]
93867    fn rhai_get_forward_text(&mut self) -> Option<String> {
93868        self.forward_text.as_ref().cloned()
93869    }
93870    #[allow(rustdoc::invalid_html_tags)]
93871    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
93872    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93873    pub fn get_bot_username<'a>(&'a self) -> Option<&'a str> {
93874        self.bot_username.as_ref().map(|v| v.as_str())
93875    }
93876    #[allow(rustdoc::invalid_html_tags)]
93877    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
93878    #[allow(clippy::needless_lifetimes)]
93879    pub fn set_bot_username<'a>(&'a mut self, bot_username: Option<String>) -> &'a mut Self {
93880        self.bot_username = bot_username;
93881        self
93882    }
93883    #[allow(rustdoc::invalid_html_tags)]
93884    #[doc = "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."]
93885    fn rhai_get_bot_username(&mut self) -> Option<String> {
93886        self.bot_username.as_ref().cloned()
93887    }
93888    #[allow(rustdoc::invalid_html_tags)]
93889    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
93890    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93891    pub fn get_request_write_access<'a>(&'a self) -> Option<bool> {
93892        self.request_write_access.as_ref().map(|v| *v)
93893    }
93894    #[allow(rustdoc::invalid_html_tags)]
93895    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
93896    #[allow(clippy::needless_lifetimes)]
93897    pub fn set_request_write_access<'a>(
93898        &'a mut self,
93899        request_write_access: Option<bool>,
93900    ) -> &'a mut Self {
93901        self.request_write_access = request_write_access;
93902        self
93903    }
93904    #[allow(rustdoc::invalid_html_tags)]
93905    #[doc = "Optional. Pass True to request the permission for your bot to send messages to the user."]
93906    fn rhai_get_request_write_access(&mut self) -> Option<bool> {
93907        self.request_write_access.as_ref().copied()
93908    }
93909}
93910#[allow(dead_code)]
93911impl ChosenInlineResult {
93912    #[allow(clippy::too_many_arguments)]
93913    pub fn new<A: Into<User>>(result_id: String, from: A, query: String) -> Self {
93914        Self {
93915            result_id,
93916            from: BoxWrapper::new_unbox(from.into()),
93917            query,
93918            location: None,
93919            inline_message_id: None,
93920        }
93921    }
93922    #[allow(rustdoc::invalid_html_tags)]
93923    #[doc = "The unique identifier for the result that was chosen"]
93924    #[allow(clippy::needless_lifetimes)]
93925    pub fn get_result_id<'a>(&'a self) -> &'a str {
93926        self.result_id.as_str()
93927    }
93928    #[allow(rustdoc::invalid_html_tags)]
93929    #[doc = "The unique identifier for the result that was chosen"]
93930    #[allow(clippy::needless_lifetimes)]
93931    pub fn set_result_id<'a>(&'a mut self, result_id: String) -> &'a mut Self {
93932        self.result_id = result_id;
93933        self
93934    }
93935    #[allow(rustdoc::invalid_html_tags)]
93936    #[doc = "The unique identifier for the result that was chosen"]
93937    fn rhai_get_result_id(&mut self) -> String {
93938        self.result_id.clone()
93939    }
93940    #[allow(rustdoc::invalid_html_tags)]
93941    #[doc = "The user that chose the result"]
93942    #[allow(clippy::needless_lifetimes)]
93943    pub fn get_from<'a>(&'a self) -> &'a User {
93944        &self.from
93945    }
93946    #[allow(rustdoc::invalid_html_tags)]
93947    #[doc = "The user that chose the result"]
93948    #[allow(clippy::needless_lifetimes)]
93949    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
93950        self.from = BoxWrapper(Unbox(from));
93951        self
93952    }
93953    #[allow(rustdoc::invalid_html_tags)]
93954    #[doc = "The user that chose the result"]
93955    fn rhai_get_from(&mut self) -> User {
93956        self.from.clone().into()
93957    }
93958    #[allow(rustdoc::invalid_html_tags)]
93959    #[doc = "Optional. Sender location, only for bots that require user location"]
93960    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93961    pub fn get_location<'a>(&'a self) -> Option<&'a Location> {
93962        self.location.as_ref().map(|v| v.inner_ref())
93963    }
93964    #[allow(rustdoc::invalid_html_tags)]
93965    #[doc = "Optional. Sender location, only for bots that require user location"]
93966    #[allow(clippy::needless_lifetimes)]
93967    pub fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self {
93968        self.location = location.map(|location| BoxWrapper(Unbox(location)));
93969        self
93970    }
93971    #[allow(rustdoc::invalid_html_tags)]
93972    #[doc = "Optional. Sender location, only for bots that require user location"]
93973    fn rhai_get_location(&mut self) -> Option<Location> {
93974        self.location.as_ref().map(|v| v.clone().into())
93975    }
93976    #[allow(rustdoc::invalid_html_tags)]
93977    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
93978    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
93979    pub fn get_inline_message_id<'a>(&'a self) -> Option<&'a str> {
93980        self.inline_message_id.as_ref().map(|v| v.as_str())
93981    }
93982    #[allow(rustdoc::invalid_html_tags)]
93983    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
93984    #[allow(clippy::needless_lifetimes)]
93985    pub fn set_inline_message_id<'a>(
93986        &'a mut self,
93987        inline_message_id: Option<String>,
93988    ) -> &'a mut Self {
93989        self.inline_message_id = inline_message_id;
93990        self
93991    }
93992    #[allow(rustdoc::invalid_html_tags)]
93993    #[doc = "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."]
93994    fn rhai_get_inline_message_id(&mut self) -> Option<String> {
93995        self.inline_message_id.as_ref().cloned()
93996    }
93997    #[allow(rustdoc::invalid_html_tags)]
93998    #[doc = "The query that was used to obtain the result"]
93999    #[allow(clippy::needless_lifetimes)]
94000    pub fn get_query<'a>(&'a self) -> &'a str {
94001        self.query.as_str()
94002    }
94003    #[allow(rustdoc::invalid_html_tags)]
94004    #[doc = "The query that was used to obtain the result"]
94005    #[allow(clippy::needless_lifetimes)]
94006    pub fn set_query<'a>(&'a mut self, query: String) -> &'a mut Self {
94007        self.query = query;
94008        self
94009    }
94010    #[allow(rustdoc::invalid_html_tags)]
94011    #[doc = "The query that was used to obtain the result"]
94012    fn rhai_get_query(&mut self) -> String {
94013        self.query.clone()
94014    }
94015}
94016#[allow(dead_code)]
94017impl PassportElementErrorUnspecified {
94018    #[allow(clippy::too_many_arguments)]
94019    pub fn new(source: String, element_hash: String, message: String) -> Self {
94020        Self {
94021            tg_type: "PassportElementErrorUnspecified".to_owned(),
94022            source,
94023            element_hash,
94024            message,
94025        }
94026    }
94027    #[allow(rustdoc::invalid_html_tags)]
94028    #[doc = "Error source, must be unspecified"]
94029    #[allow(clippy::needless_lifetimes)]
94030    pub fn get_source<'a>(&'a self) -> &'a str {
94031        self.source.as_str()
94032    }
94033    #[allow(rustdoc::invalid_html_tags)]
94034    #[doc = "Error source, must be unspecified"]
94035    #[allow(clippy::needless_lifetimes)]
94036    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
94037        self.source = source;
94038        self
94039    }
94040    #[allow(rustdoc::invalid_html_tags)]
94041    #[doc = "Error source, must be unspecified"]
94042    fn rhai_get_source(&mut self) -> String {
94043        self.source.clone()
94044    }
94045    #[allow(rustdoc::invalid_html_tags)]
94046    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
94047    #[allow(clippy::needless_lifetimes)]
94048    pub fn get_tg_type<'a>(&'a self) -> &'a str {
94049        self.tg_type.as_str()
94050    }
94051    #[allow(rustdoc::invalid_html_tags)]
94052    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
94053    #[allow(clippy::needless_lifetimes)]
94054    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94055        self.tg_type = tg_type;
94056        self
94057    }
94058    #[allow(rustdoc::invalid_html_tags)]
94059    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
94060    fn rhai_get_tg_type(&mut self) -> String {
94061        self.tg_type.clone()
94062    }
94063    #[allow(rustdoc::invalid_html_tags)]
94064    #[doc = "Base64-encoded element hash"]
94065    #[allow(clippy::needless_lifetimes)]
94066    pub fn get_element_hash<'a>(&'a self) -> &'a str {
94067        self.element_hash.as_str()
94068    }
94069    #[allow(rustdoc::invalid_html_tags)]
94070    #[doc = "Base64-encoded element hash"]
94071    #[allow(clippy::needless_lifetimes)]
94072    pub fn set_element_hash<'a>(&'a mut self, element_hash: String) -> &'a mut Self {
94073        self.element_hash = element_hash;
94074        self
94075    }
94076    #[allow(rustdoc::invalid_html_tags)]
94077    #[doc = "Base64-encoded element hash"]
94078    fn rhai_get_element_hash(&mut self) -> String {
94079        self.element_hash.clone()
94080    }
94081    #[allow(rustdoc::invalid_html_tags)]
94082    #[doc = "Error message"]
94083    #[allow(clippy::needless_lifetimes)]
94084    pub fn get_message<'a>(&'a self) -> &'a str {
94085        self.message.as_str()
94086    }
94087    #[allow(rustdoc::invalid_html_tags)]
94088    #[doc = "Error message"]
94089    #[allow(clippy::needless_lifetimes)]
94090    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
94091        self.message = message;
94092        self
94093    }
94094    #[allow(rustdoc::invalid_html_tags)]
94095    #[doc = "Error message"]
94096    fn rhai_get_message(&mut self) -> String {
94097        self.message.clone()
94098    }
94099}
94100#[allow(dead_code)]
94101impl MenuButtonWebApp {
94102    #[allow(clippy::too_many_arguments)]
94103    pub fn new<A: Into<WebAppInfo>>(text: String, web_app: A) -> Self {
94104        Self {
94105            tg_type: "web_app".to_owned(),
94106            text,
94107            web_app: BoxWrapper::new_unbox(web_app.into()),
94108        }
94109    }
94110    #[allow(rustdoc::invalid_html_tags)]
94111    #[doc = "Type of the button, must be web_app"]
94112    #[allow(clippy::needless_lifetimes)]
94113    pub fn get_tg_type<'a>(&'a self) -> &'a str {
94114        self.tg_type.as_str()
94115    }
94116    #[allow(rustdoc::invalid_html_tags)]
94117    #[doc = "Type of the button, must be web_app"]
94118    #[allow(clippy::needless_lifetimes)]
94119    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94120        self.tg_type = tg_type;
94121        self
94122    }
94123    #[allow(rustdoc::invalid_html_tags)]
94124    #[doc = "Type of the button, must be web_app"]
94125    fn rhai_get_tg_type(&mut self) -> String {
94126        self.tg_type.clone()
94127    }
94128    #[allow(rustdoc::invalid_html_tags)]
94129    #[doc = "Text on the button"]
94130    #[allow(clippy::needless_lifetimes)]
94131    pub fn get_text<'a>(&'a self) -> &'a str {
94132        self.text.as_str()
94133    }
94134    #[allow(rustdoc::invalid_html_tags)]
94135    #[doc = "Text on the button"]
94136    #[allow(clippy::needless_lifetimes)]
94137    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
94138        self.text = text;
94139        self
94140    }
94141    #[allow(rustdoc::invalid_html_tags)]
94142    #[doc = "Text on the button"]
94143    fn rhai_get_text(&mut self) -> String {
94144        self.text.clone()
94145    }
94146    #[allow(rustdoc::invalid_html_tags)]
94147    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
94148    #[allow(clippy::needless_lifetimes)]
94149    pub fn get_web_app<'a>(&'a self) -> &'a WebAppInfo {
94150        &self.web_app
94151    }
94152    #[allow(rustdoc::invalid_html_tags)]
94153    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
94154    #[allow(clippy::needless_lifetimes)]
94155    pub fn set_web_app<'a>(&'a mut self, web_app: WebAppInfo) -> &'a mut Self {
94156        self.web_app = BoxWrapper(Unbox(web_app));
94157        self
94158    }
94159    #[allow(rustdoc::invalid_html_tags)]
94160    #[doc = "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link."]
94161    fn rhai_get_web_app(&mut self) -> WebAppInfo {
94162        self.web_app.clone().into()
94163    }
94164}
94165#[allow(dead_code)]
94166impl UserChatBoosts {
94167    #[allow(clippy::too_many_arguments)]
94168    pub fn new(boosts: Vec<ChatBoost>) -> Self {
94169        Self { boosts }
94170    }
94171    #[allow(rustdoc::invalid_html_tags)]
94172    #[doc = "The list of boosts added to the chat by the user"]
94173    #[allow(clippy::needless_lifetimes)]
94174    pub fn get_boosts<'a>(&'a self) -> &'a Vec<ChatBoost> {
94175        &self.boosts
94176    }
94177    #[allow(rustdoc::invalid_html_tags)]
94178    #[doc = "The list of boosts added to the chat by the user"]
94179    #[allow(clippy::needless_lifetimes)]
94180    pub fn set_boosts<'a>(&'a mut self, boosts: Vec<ChatBoost>) -> &'a mut Self {
94181        self.boosts = boosts;
94182        self
94183    }
94184    #[allow(rustdoc::invalid_html_tags)]
94185    #[doc = "The list of boosts added to the chat by the user"]
94186    fn rhai_get_boosts(&mut self) -> Vec<ChatBoost> {
94187        self.boosts.clone()
94188    }
94189}
94190#[allow(dead_code)]
94191impl GiftInfo {
94192    #[allow(clippy::too_many_arguments)]
94193    pub fn new<A: Into<Gift>>(gift: A) -> Self {
94194        Self {
94195            gift: BoxWrapper::new_unbox(gift.into()),
94196            owned_gift_id: None,
94197            convert_star_count: None,
94198            prepaid_upgrade_star_count: None,
94199            can_be_upgraded: None,
94200            text: None,
94201            entities: None,
94202            is_private: None,
94203        }
94204    }
94205    #[allow(rustdoc::invalid_html_tags)]
94206    #[doc = "Information about the gift"]
94207    #[allow(clippy::needless_lifetimes)]
94208    pub fn get_gift<'a>(&'a self) -> &'a Gift {
94209        &self.gift
94210    }
94211    #[allow(rustdoc::invalid_html_tags)]
94212    #[doc = "Information about the gift"]
94213    #[allow(clippy::needless_lifetimes)]
94214    pub fn set_gift<'a>(&'a mut self, gift: Gift) -> &'a mut Self {
94215        self.gift = BoxWrapper(Unbox(gift));
94216        self
94217    }
94218    #[allow(rustdoc::invalid_html_tags)]
94219    #[doc = "Information about the gift"]
94220    fn rhai_get_gift(&mut self) -> Gift {
94221        self.gift.clone().into()
94222    }
94223    #[allow(rustdoc::invalid_html_tags)]
94224    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
94225    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94226    pub fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str> {
94227        self.owned_gift_id.as_ref().map(|v| v.as_str())
94228    }
94229    #[allow(rustdoc::invalid_html_tags)]
94230    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
94231    #[allow(clippy::needless_lifetimes)]
94232    pub fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self {
94233        self.owned_gift_id = owned_gift_id;
94234        self
94235    }
94236    #[allow(rustdoc::invalid_html_tags)]
94237    #[doc = "Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts"]
94238    fn rhai_get_owned_gift_id(&mut self) -> Option<String> {
94239        self.owned_gift_id.as_ref().cloned()
94240    }
94241    #[allow(rustdoc::invalid_html_tags)]
94242    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
94243    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94244    pub fn get_convert_star_count<'a>(&'a self) -> Option<i64> {
94245        self.convert_star_count.as_ref().map(|v| *v)
94246    }
94247    #[allow(rustdoc::invalid_html_tags)]
94248    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
94249    #[allow(clippy::needless_lifetimes)]
94250    pub fn set_convert_star_count<'a>(
94251        &'a mut self,
94252        convert_star_count: Option<i64>,
94253    ) -> &'a mut Self {
94254        self.convert_star_count = convert_star_count;
94255        self
94256    }
94257    #[allow(rustdoc::invalid_html_tags)]
94258    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible"]
94259    fn rhai_get_convert_star_count(&mut self) -> Option<i64> {
94260        self.convert_star_count.as_ref().copied()
94261    }
94262    #[allow(rustdoc::invalid_html_tags)]
94263    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
94264    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94265    pub fn get_prepaid_upgrade_star_count<'a>(&'a self) -> Option<i64> {
94266        self.prepaid_upgrade_star_count.as_ref().map(|v| *v)
94267    }
94268    #[allow(rustdoc::invalid_html_tags)]
94269    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
94270    #[allow(clippy::needless_lifetimes)]
94271    pub fn set_prepaid_upgrade_star_count<'a>(
94272        &'a mut self,
94273        prepaid_upgrade_star_count: Option<i64>,
94274    ) -> &'a mut Self {
94275        self.prepaid_upgrade_star_count = prepaid_upgrade_star_count;
94276        self
94277    }
94278    #[allow(rustdoc::invalid_html_tags)]
94279    #[doc = "Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift"]
94280    fn rhai_get_prepaid_upgrade_star_count(&mut self) -> Option<i64> {
94281        self.prepaid_upgrade_star_count.as_ref().copied()
94282    }
94283    #[allow(rustdoc::invalid_html_tags)]
94284    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
94285    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94286    pub fn get_can_be_upgraded<'a>(&'a self) -> Option<bool> {
94287        self.can_be_upgraded.as_ref().map(|v| *v)
94288    }
94289    #[allow(rustdoc::invalid_html_tags)]
94290    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
94291    #[allow(clippy::needless_lifetimes)]
94292    pub fn set_can_be_upgraded<'a>(&'a mut self, can_be_upgraded: Option<bool>) -> &'a mut Self {
94293        self.can_be_upgraded = can_be_upgraded;
94294        self
94295    }
94296    #[allow(rustdoc::invalid_html_tags)]
94297    #[doc = "Optional. True, if the gift can be upgraded to a unique gift"]
94298    fn rhai_get_can_be_upgraded(&mut self) -> Option<bool> {
94299        self.can_be_upgraded.as_ref().copied()
94300    }
94301    #[allow(rustdoc::invalid_html_tags)]
94302    #[doc = "Optional. Text of the message that was added to the gift"]
94303    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94304    pub fn get_text<'a>(&'a self) -> Option<&'a str> {
94305        self.text.as_ref().map(|v| v.as_str())
94306    }
94307    #[allow(rustdoc::invalid_html_tags)]
94308    #[doc = "Optional. Text of the message that was added to the gift"]
94309    #[allow(clippy::needless_lifetimes)]
94310    pub fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self {
94311        self.text = text;
94312        self
94313    }
94314    #[allow(rustdoc::invalid_html_tags)]
94315    #[doc = "Optional. Text of the message that was added to the gift"]
94316    fn rhai_get_text(&mut self) -> Option<String> {
94317        self.text.as_ref().cloned()
94318    }
94319    #[allow(rustdoc::invalid_html_tags)]
94320    #[doc = "Optional. Special entities that appear in the text"]
94321    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94322    pub fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
94323        self.entities.as_ref()
94324    }
94325    #[allow(rustdoc::invalid_html_tags)]
94326    #[doc = "Optional. Special entities that appear in the text"]
94327    #[allow(clippy::needless_lifetimes)]
94328    pub fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
94329        self.entities = entities;
94330        self
94331    }
94332    #[allow(rustdoc::invalid_html_tags)]
94333    #[doc = "Optional. Special entities that appear in the text"]
94334    fn rhai_get_entities(&mut self) -> Option<Vec<MessageEntity>> {
94335        self.entities.as_ref().cloned()
94336    }
94337    #[allow(rustdoc::invalid_html_tags)]
94338    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
94339    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94340    pub fn get_is_private<'a>(&'a self) -> Option<bool> {
94341        self.is_private.as_ref().map(|v| *v)
94342    }
94343    #[allow(rustdoc::invalid_html_tags)]
94344    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
94345    #[allow(clippy::needless_lifetimes)]
94346    pub fn set_is_private<'a>(&'a mut self, is_private: Option<bool>) -> &'a mut Self {
94347        self.is_private = is_private;
94348        self
94349    }
94350    #[allow(rustdoc::invalid_html_tags)]
94351    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
94352    fn rhai_get_is_private(&mut self) -> Option<bool> {
94353        self.is_private.as_ref().copied()
94354    }
94355}
94356#[allow(dead_code)]
94357impl ShippingAddress {
94358    #[allow(clippy::too_many_arguments)]
94359    pub fn new(
94360        country_code: String,
94361        state: String,
94362        city: String,
94363        street_line_1: String,
94364        street_line_2: String,
94365        post_code: String,
94366    ) -> Self {
94367        Self {
94368            country_code,
94369            state,
94370            city,
94371            street_line_1,
94372            street_line_2,
94373            post_code,
94374        }
94375    }
94376    #[allow(rustdoc::invalid_html_tags)]
94377    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
94378    #[allow(clippy::needless_lifetimes)]
94379    pub fn get_country_code<'a>(&'a self) -> &'a str {
94380        self.country_code.as_str()
94381    }
94382    #[allow(rustdoc::invalid_html_tags)]
94383    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
94384    #[allow(clippy::needless_lifetimes)]
94385    pub fn set_country_code<'a>(&'a mut self, country_code: String) -> &'a mut Self {
94386        self.country_code = country_code;
94387        self
94388    }
94389    #[allow(rustdoc::invalid_html_tags)]
94390    #[doc = "Two-letter ISO 3166-1 alpha-2 country code"]
94391    fn rhai_get_country_code(&mut self) -> String {
94392        self.country_code.clone()
94393    }
94394    #[allow(rustdoc::invalid_html_tags)]
94395    #[doc = "State, if applicable"]
94396    #[allow(clippy::needless_lifetimes)]
94397    pub fn get_state<'a>(&'a self) -> &'a str {
94398        self.state.as_str()
94399    }
94400    #[allow(rustdoc::invalid_html_tags)]
94401    #[doc = "State, if applicable"]
94402    #[allow(clippy::needless_lifetimes)]
94403    pub fn set_state<'a>(&'a mut self, state: String) -> &'a mut Self {
94404        self.state = state;
94405        self
94406    }
94407    #[allow(rustdoc::invalid_html_tags)]
94408    #[doc = "State, if applicable"]
94409    fn rhai_get_state(&mut self) -> String {
94410        self.state.clone()
94411    }
94412    #[allow(rustdoc::invalid_html_tags)]
94413    #[doc = "City"]
94414    #[allow(clippy::needless_lifetimes)]
94415    pub fn get_city<'a>(&'a self) -> &'a str {
94416        self.city.as_str()
94417    }
94418    #[allow(rustdoc::invalid_html_tags)]
94419    #[doc = "City"]
94420    #[allow(clippy::needless_lifetimes)]
94421    pub fn set_city<'a>(&'a mut self, city: String) -> &'a mut Self {
94422        self.city = city;
94423        self
94424    }
94425    #[allow(rustdoc::invalid_html_tags)]
94426    #[doc = "City"]
94427    fn rhai_get_city(&mut self) -> String {
94428        self.city.clone()
94429    }
94430    #[allow(rustdoc::invalid_html_tags)]
94431    #[doc = "First line for the address"]
94432    #[allow(clippy::needless_lifetimes)]
94433    pub fn get_street_line_1<'a>(&'a self) -> &'a str {
94434        self.street_line_1.as_str()
94435    }
94436    #[allow(rustdoc::invalid_html_tags)]
94437    #[doc = "First line for the address"]
94438    #[allow(clippy::needless_lifetimes)]
94439    pub fn set_street_line_1<'a>(&'a mut self, street_line_1: String) -> &'a mut Self {
94440        self.street_line_1 = street_line_1;
94441        self
94442    }
94443    #[allow(rustdoc::invalid_html_tags)]
94444    #[doc = "First line for the address"]
94445    fn rhai_get_street_line_1(&mut self) -> String {
94446        self.street_line_1.clone()
94447    }
94448    #[allow(rustdoc::invalid_html_tags)]
94449    #[doc = "Second line for the address"]
94450    #[allow(clippy::needless_lifetimes)]
94451    pub fn get_street_line_2<'a>(&'a self) -> &'a str {
94452        self.street_line_2.as_str()
94453    }
94454    #[allow(rustdoc::invalid_html_tags)]
94455    #[doc = "Second line for the address"]
94456    #[allow(clippy::needless_lifetimes)]
94457    pub fn set_street_line_2<'a>(&'a mut self, street_line_2: String) -> &'a mut Self {
94458        self.street_line_2 = street_line_2;
94459        self
94460    }
94461    #[allow(rustdoc::invalid_html_tags)]
94462    #[doc = "Second line for the address"]
94463    fn rhai_get_street_line_2(&mut self) -> String {
94464        self.street_line_2.clone()
94465    }
94466    #[allow(rustdoc::invalid_html_tags)]
94467    #[doc = "Address post code"]
94468    #[allow(clippy::needless_lifetimes)]
94469    pub fn get_post_code<'a>(&'a self) -> &'a str {
94470        self.post_code.as_str()
94471    }
94472    #[allow(rustdoc::invalid_html_tags)]
94473    #[doc = "Address post code"]
94474    #[allow(clippy::needless_lifetimes)]
94475    pub fn set_post_code<'a>(&'a mut self, post_code: String) -> &'a mut Self {
94476        self.post_code = post_code;
94477        self
94478    }
94479    #[allow(rustdoc::invalid_html_tags)]
94480    #[doc = "Address post code"]
94481    fn rhai_get_post_code(&mut self) -> String {
94482        self.post_code.clone()
94483    }
94484}
94485#[allow(dead_code)]
94486impl MessageAutoDeleteTimerChanged {
94487    #[allow(clippy::too_many_arguments)]
94488    pub fn new(message_auto_delete_time: i64) -> Self {
94489        Self {
94490            message_auto_delete_time,
94491        }
94492    }
94493    #[allow(rustdoc::invalid_html_tags)]
94494    #[doc = "New auto-delete time for messages in the chat; in seconds"]
94495    #[allow(clippy::needless_lifetimes)]
94496    pub fn get_message_auto_delete_time<'a>(&'a self) -> i64 {
94497        self.message_auto_delete_time
94498    }
94499    #[allow(rustdoc::invalid_html_tags)]
94500    #[doc = "New auto-delete time for messages in the chat; in seconds"]
94501    #[allow(clippy::needless_lifetimes)]
94502    pub fn set_message_auto_delete_time<'a>(
94503        &'a mut self,
94504        message_auto_delete_time: i64,
94505    ) -> &'a mut Self {
94506        self.message_auto_delete_time = message_auto_delete_time;
94507        self
94508    }
94509    #[allow(rustdoc::invalid_html_tags)]
94510    #[doc = "New auto-delete time for messages in the chat; in seconds"]
94511    fn rhai_get_message_auto_delete_time(&mut self) -> i64 {
94512        self.message_auto_delete_time
94513    }
94514}
94515impl TraitBackgroundFillSolid for BackgroundFillSolid {
94516    #[allow(rustdoc::invalid_html_tags)]
94517    #[doc = "Type of the background fill, always \"solid\""]
94518    #[allow(clippy::needless_lifetimes)]
94519    fn get_tg_type<'a>(&'a self) -> &'a str {
94520        self.tg_type.as_str()
94521    }
94522    #[allow(rustdoc::invalid_html_tags)]
94523    #[doc = "Type of the background fill, always \"solid\""]
94524    #[allow(clippy::needless_lifetimes)]
94525    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94526        self.tg_type = tg_type;
94527        self
94528    }
94529    #[allow(rustdoc::invalid_html_tags)]
94530    #[doc = "The color of the background fill in the RGB24 format"]
94531    #[allow(clippy::needless_lifetimes)]
94532    fn get_color<'a>(&'a self) -> i64 {
94533        self.color
94534    }
94535    #[allow(rustdoc::invalid_html_tags)]
94536    #[doc = "The color of the background fill in the RGB24 format"]
94537    #[allow(clippy::needless_lifetimes)]
94538    fn set_color<'a>(&'a mut self, color: i64) -> &'a mut Self {
94539        self.color = color;
94540        self
94541    }
94542}
94543impl TraitBackgroundFillGradient for BackgroundFillGradient {
94544    #[allow(rustdoc::invalid_html_tags)]
94545    #[doc = "Type of the background fill, always \"gradient\""]
94546    #[allow(clippy::needless_lifetimes)]
94547    fn get_tg_type<'a>(&'a self) -> &'a str {
94548        self.tg_type.as_str()
94549    }
94550    #[allow(rustdoc::invalid_html_tags)]
94551    #[doc = "Type of the background fill, always \"gradient\""]
94552    #[allow(clippy::needless_lifetimes)]
94553    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94554        self.tg_type = tg_type;
94555        self
94556    }
94557    #[allow(rustdoc::invalid_html_tags)]
94558    #[doc = "Top color of the gradient in the RGB24 format"]
94559    #[allow(clippy::needless_lifetimes)]
94560    fn get_top_color<'a>(&'a self) -> i64 {
94561        self.top_color
94562    }
94563    #[allow(rustdoc::invalid_html_tags)]
94564    #[doc = "Top color of the gradient in the RGB24 format"]
94565    #[allow(clippy::needless_lifetimes)]
94566    fn set_top_color<'a>(&'a mut self, top_color: i64) -> &'a mut Self {
94567        self.top_color = top_color;
94568        self
94569    }
94570    #[allow(rustdoc::invalid_html_tags)]
94571    #[doc = "Bottom color of the gradient in the RGB24 format"]
94572    #[allow(clippy::needless_lifetimes)]
94573    fn get_bottom_color<'a>(&'a self) -> i64 {
94574        self.bottom_color
94575    }
94576    #[allow(rustdoc::invalid_html_tags)]
94577    #[doc = "Bottom color of the gradient in the RGB24 format"]
94578    #[allow(clippy::needless_lifetimes)]
94579    fn set_bottom_color<'a>(&'a mut self, bottom_color: i64) -> &'a mut Self {
94580        self.bottom_color = bottom_color;
94581        self
94582    }
94583    #[allow(rustdoc::invalid_html_tags)]
94584    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
94585    #[allow(clippy::needless_lifetimes)]
94586    fn get_rotation_angle<'a>(&'a self) -> i64 {
94587        self.rotation_angle
94588    }
94589    #[allow(rustdoc::invalid_html_tags)]
94590    #[doc = "Clockwise rotation angle of the background fill in degrees; 0-359"]
94591    #[allow(clippy::needless_lifetimes)]
94592    fn set_rotation_angle<'a>(&'a mut self, rotation_angle: i64) -> &'a mut Self {
94593        self.rotation_angle = rotation_angle;
94594        self
94595    }
94596}
94597impl TraitBackgroundFillFreeformGradient for BackgroundFillFreeformGradient {
94598    #[allow(rustdoc::invalid_html_tags)]
94599    #[doc = "Type of the background fill, always \"freeform_gradient\""]
94600    #[allow(clippy::needless_lifetimes)]
94601    fn get_tg_type<'a>(&'a self) -> &'a str {
94602        self.tg_type.as_str()
94603    }
94604    #[allow(rustdoc::invalid_html_tags)]
94605    #[doc = "Type of the background fill, always \"freeform_gradient\""]
94606    #[allow(clippy::needless_lifetimes)]
94607    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94608        self.tg_type = tg_type;
94609        self
94610    }
94611    #[allow(rustdoc::invalid_html_tags)]
94612    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
94613    #[allow(clippy::needless_lifetimes)]
94614    fn get_colors<'a>(&'a self) -> &'a Vec<i64> {
94615        &self.colors
94616    }
94617    #[allow(rustdoc::invalid_html_tags)]
94618    #[doc = "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format"]
94619    #[allow(clippy::needless_lifetimes)]
94620    fn set_colors<'a>(&'a mut self, colors: Vec<i64>) -> &'a mut Self {
94621        self.colors = colors;
94622        self
94623    }
94624}
94625#[allow(dead_code)]
94626impl InlineQueryResultsButton {
94627    #[allow(clippy::too_many_arguments)]
94628    pub fn new(text: String) -> Self {
94629        Self {
94630            text,
94631            web_app: None,
94632            start_parameter: None,
94633        }
94634    }
94635    #[allow(rustdoc::invalid_html_tags)]
94636    #[doc = "Label text on the button"]
94637    #[allow(clippy::needless_lifetimes)]
94638    pub fn get_text<'a>(&'a self) -> &'a str {
94639        self.text.as_str()
94640    }
94641    #[allow(rustdoc::invalid_html_tags)]
94642    #[doc = "Label text on the button"]
94643    #[allow(clippy::needless_lifetimes)]
94644    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
94645        self.text = text;
94646        self
94647    }
94648    #[allow(rustdoc::invalid_html_tags)]
94649    #[doc = "Label text on the button"]
94650    fn rhai_get_text(&mut self) -> String {
94651        self.text.clone()
94652    }
94653    #[allow(rustdoc::invalid_html_tags)]
94654    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
94655    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94656    pub fn get_web_app<'a>(&'a self) -> Option<&'a WebAppInfo> {
94657        self.web_app.as_ref().map(|v| v.inner_ref())
94658    }
94659    #[allow(rustdoc::invalid_html_tags)]
94660    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
94661    #[allow(clippy::needless_lifetimes)]
94662    pub fn set_web_app<'a>(&'a mut self, web_app: Option<WebAppInfo>) -> &'a mut Self {
94663        self.web_app = web_app.map(|web_app| BoxWrapper(Unbox(web_app)));
94664        self
94665    }
94666    #[allow(rustdoc::invalid_html_tags)]
94667    #[doc = "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App."]
94668    fn rhai_get_web_app(&mut self) -> Option<WebAppInfo> {
94669        self.web_app.as_ref().map(|v| v.clone().into())
94670    }
94671    #[allow(rustdoc::invalid_html_tags)]
94672    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
94673    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
94674    pub fn get_start_parameter<'a>(&'a self) -> Option<&'a str> {
94675        self.start_parameter.as_ref().map(|v| v.as_str())
94676    }
94677    #[allow(rustdoc::invalid_html_tags)]
94678    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
94679    #[allow(clippy::needless_lifetimes)]
94680    pub fn set_start_parameter<'a>(&'a mut self, start_parameter: Option<String>) -> &'a mut Self {
94681        self.start_parameter = start_parameter;
94682        self
94683    }
94684    #[allow(rustdoc::invalid_html_tags)]
94685    #[doc = "Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities."]
94686    fn rhai_get_start_parameter(&mut self) -> Option<String> {
94687        self.start_parameter.as_ref().cloned()
94688    }
94689}
94690#[allow(dead_code)]
94691impl BackgroundFillSolid {
94692    #[allow(clippy::too_many_arguments)]
94693    pub fn new(color: i64) -> Self {
94694        Self {
94695            tg_type: "BackgroundFillSolid".to_owned(),
94696            color,
94697        }
94698    }
94699    #[allow(rustdoc::invalid_html_tags)]
94700    #[doc = "Type of the background fill, always \"solid\""]
94701    #[allow(clippy::needless_lifetimes)]
94702    pub fn get_tg_type<'a>(&'a self) -> &'a str {
94703        self.tg_type.as_str()
94704    }
94705    #[allow(rustdoc::invalid_html_tags)]
94706    #[doc = "Type of the background fill, always \"solid\""]
94707    #[allow(clippy::needless_lifetimes)]
94708    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94709        self.tg_type = tg_type;
94710        self
94711    }
94712    #[allow(rustdoc::invalid_html_tags)]
94713    #[doc = "Type of the background fill, always \"solid\""]
94714    fn rhai_get_tg_type(&mut self) -> String {
94715        self.tg_type.clone()
94716    }
94717    #[allow(rustdoc::invalid_html_tags)]
94718    #[doc = "The color of the background fill in the RGB24 format"]
94719    #[allow(clippy::needless_lifetimes)]
94720    pub fn get_color<'a>(&'a self) -> i64 {
94721        self.color
94722    }
94723    #[allow(rustdoc::invalid_html_tags)]
94724    #[doc = "The color of the background fill in the RGB24 format"]
94725    #[allow(clippy::needless_lifetimes)]
94726    pub fn set_color<'a>(&'a mut self, color: i64) -> &'a mut Self {
94727        self.color = color;
94728        self
94729    }
94730    #[allow(rustdoc::invalid_html_tags)]
94731    #[doc = "The color of the background fill in the RGB24 format"]
94732    fn rhai_get_color(&mut self) -> i64 {
94733        self.color
94734    }
94735}
94736#[allow(dead_code)]
94737impl BotCommandScopeAllGroupChats {
94738    #[allow(clippy::too_many_arguments)]
94739    pub fn new() -> Self {
94740        Self {
94741            tg_type: "all_group_chats".to_owned(),
94742        }
94743    }
94744    #[allow(rustdoc::invalid_html_tags)]
94745    #[doc = "Scope type, must be all_group_chats"]
94746    #[allow(clippy::needless_lifetimes)]
94747    pub fn get_tg_type<'a>(&'a self) -> &'a str {
94748        self.tg_type.as_str()
94749    }
94750    #[allow(rustdoc::invalid_html_tags)]
94751    #[doc = "Scope type, must be all_group_chats"]
94752    #[allow(clippy::needless_lifetimes)]
94753    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94754        self.tg_type = tg_type;
94755        self
94756    }
94757    #[allow(rustdoc::invalid_html_tags)]
94758    #[doc = "Scope type, must be all_group_chats"]
94759    fn rhai_get_tg_type(&mut self) -> String {
94760        self.tg_type.clone()
94761    }
94762}
94763#[allow(dead_code)]
94764impl ChatBoostUpdated {
94765    #[allow(clippy::too_many_arguments)]
94766    pub fn new<A: Into<Chat>, B: Into<Box<ChatBoost>>>(chat: A, boost: B) -> Self {
94767        Self {
94768            chat: BoxWrapper::new_unbox(chat.into()),
94769            boost: BoxWrapper(boost.into()),
94770        }
94771    }
94772    #[allow(rustdoc::invalid_html_tags)]
94773    #[doc = "Chat which was boosted"]
94774    #[allow(clippy::needless_lifetimes)]
94775    pub fn get_chat<'a>(&'a self) -> &'a Chat {
94776        &self.chat
94777    }
94778    #[allow(rustdoc::invalid_html_tags)]
94779    #[doc = "Chat which was boosted"]
94780    #[allow(clippy::needless_lifetimes)]
94781    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
94782        self.chat = BoxWrapper(Unbox(chat));
94783        self
94784    }
94785    #[allow(rustdoc::invalid_html_tags)]
94786    #[doc = "Chat which was boosted"]
94787    fn rhai_get_chat(&mut self) -> Chat {
94788        self.chat.clone().into()
94789    }
94790    #[allow(rustdoc::invalid_html_tags)]
94791    #[doc = "Information about the chat boost"]
94792    #[allow(clippy::needless_lifetimes)]
94793    pub fn get_boost<'a>(&'a self) -> &'a ChatBoost {
94794        self.boost.as_ref()
94795    }
94796    #[allow(rustdoc::invalid_html_tags)]
94797    #[doc = "Information about the chat boost"]
94798    #[allow(clippy::needless_lifetimes)]
94799    pub fn set_boost<'a>(&'a mut self, boost: ChatBoost) -> &'a mut Self {
94800        self.boost = BoxWrapper(Box::new(boost));
94801        self
94802    }
94803    #[allow(rustdoc::invalid_html_tags)]
94804    #[doc = "Information about the chat boost"]
94805    fn rhai_get_boost(&mut self) -> ChatBoost {
94806        self.boost.clone().into()
94807    }
94808}
94809#[allow(dead_code)]
94810impl MaskPosition {
94811    #[allow(clippy::too_many_arguments)]
94812    pub fn new(
94813        point: String,
94814        x_shift: ::ordered_float::OrderedFloat<f64>,
94815        y_shift: ::ordered_float::OrderedFloat<f64>,
94816        scale: ::ordered_float::OrderedFloat<f64>,
94817    ) -> Self {
94818        Self {
94819            point,
94820            x_shift,
94821            y_shift,
94822            scale,
94823        }
94824    }
94825    #[allow(rustdoc::invalid_html_tags)]
94826    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
94827    #[allow(clippy::needless_lifetimes)]
94828    pub fn get_point<'a>(&'a self) -> &'a str {
94829        self.point.as_str()
94830    }
94831    #[allow(rustdoc::invalid_html_tags)]
94832    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
94833    #[allow(clippy::needless_lifetimes)]
94834    pub fn set_point<'a>(&'a mut self, point: String) -> &'a mut Self {
94835        self.point = point;
94836        self
94837    }
94838    #[allow(rustdoc::invalid_html_tags)]
94839    #[doc = "The part of the face relative to which the mask should be placed. One of \"forehead\", \"eyes\", \"mouth\", or \"chin\"."]
94840    fn rhai_get_point(&mut self) -> String {
94841        self.point.clone()
94842    }
94843    #[allow(rustdoc::invalid_html_tags)]
94844    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
94845    #[allow(clippy::needless_lifetimes)]
94846    pub fn get_x_shift<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
94847        self.x_shift
94848    }
94849    #[allow(rustdoc::invalid_html_tags)]
94850    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
94851    #[allow(clippy::needless_lifetimes)]
94852    pub fn set_x_shift<'a>(
94853        &'a mut self,
94854        x_shift: ::ordered_float::OrderedFloat<f64>,
94855    ) -> &'a mut Self {
94856        self.x_shift = x_shift;
94857        self
94858    }
94859    #[allow(rustdoc::invalid_html_tags)]
94860    #[doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position."]
94861    fn rhai_get_x_shift(&mut self) -> ::ordered_float::OrderedFloat<f64> {
94862        self.x_shift
94863    }
94864    #[allow(rustdoc::invalid_html_tags)]
94865    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
94866    #[allow(clippy::needless_lifetimes)]
94867    pub fn get_y_shift<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
94868        self.y_shift
94869    }
94870    #[allow(rustdoc::invalid_html_tags)]
94871    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
94872    #[allow(clippy::needless_lifetimes)]
94873    pub fn set_y_shift<'a>(
94874        &'a mut self,
94875        y_shift: ::ordered_float::OrderedFloat<f64>,
94876    ) -> &'a mut Self {
94877        self.y_shift = y_shift;
94878        self
94879    }
94880    #[allow(rustdoc::invalid_html_tags)]
94881    #[doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position."]
94882    fn rhai_get_y_shift(&mut self) -> ::ordered_float::OrderedFloat<f64> {
94883        self.y_shift
94884    }
94885    #[allow(rustdoc::invalid_html_tags)]
94886    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
94887    #[allow(clippy::needless_lifetimes)]
94888    pub fn get_scale<'a>(&'a self) -> ::ordered_float::OrderedFloat<f64> {
94889        self.scale
94890    }
94891    #[allow(rustdoc::invalid_html_tags)]
94892    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
94893    #[allow(clippy::needless_lifetimes)]
94894    pub fn set_scale<'a>(&'a mut self, scale: ::ordered_float::OrderedFloat<f64>) -> &'a mut Self {
94895        self.scale = scale;
94896        self
94897    }
94898    #[allow(rustdoc::invalid_html_tags)]
94899    #[doc = "Mask scaling coefficient. For example, 2.0 means double size."]
94900    fn rhai_get_scale(&mut self) -> ::ordered_float::OrderedFloat<f64> {
94901        self.scale
94902    }
94903}
94904#[allow(dead_code)]
94905impl PassportElementErrorFile {
94906    #[allow(clippy::too_many_arguments)]
94907    pub fn new(source: String, file_hash: String, message: String) -> Self {
94908        Self {
94909            tg_type: "PassportElementErrorFile".to_owned(),
94910            source,
94911            file_hash,
94912            message,
94913        }
94914    }
94915    #[allow(rustdoc::invalid_html_tags)]
94916    #[doc = "Error source, must be file"]
94917    #[allow(clippy::needless_lifetimes)]
94918    pub fn get_source<'a>(&'a self) -> &'a str {
94919        self.source.as_str()
94920    }
94921    #[allow(rustdoc::invalid_html_tags)]
94922    #[doc = "Error source, must be file"]
94923    #[allow(clippy::needless_lifetimes)]
94924    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
94925        self.source = source;
94926        self
94927    }
94928    #[allow(rustdoc::invalid_html_tags)]
94929    #[doc = "Error source, must be file"]
94930    fn rhai_get_source(&mut self) -> String {
94931        self.source.clone()
94932    }
94933    #[allow(rustdoc::invalid_html_tags)]
94934    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
94935    #[allow(clippy::needless_lifetimes)]
94936    pub fn get_tg_type<'a>(&'a self) -> &'a str {
94937        self.tg_type.as_str()
94938    }
94939    #[allow(rustdoc::invalid_html_tags)]
94940    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
94941    #[allow(clippy::needless_lifetimes)]
94942    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
94943        self.tg_type = tg_type;
94944        self
94945    }
94946    #[allow(rustdoc::invalid_html_tags)]
94947    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
94948    fn rhai_get_tg_type(&mut self) -> String {
94949        self.tg_type.clone()
94950    }
94951    #[allow(rustdoc::invalid_html_tags)]
94952    #[doc = "Base64-encoded file hash"]
94953    #[allow(clippy::needless_lifetimes)]
94954    pub fn get_file_hash<'a>(&'a self) -> &'a str {
94955        self.file_hash.as_str()
94956    }
94957    #[allow(rustdoc::invalid_html_tags)]
94958    #[doc = "Base64-encoded file hash"]
94959    #[allow(clippy::needless_lifetimes)]
94960    pub fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
94961        self.file_hash = file_hash;
94962        self
94963    }
94964    #[allow(rustdoc::invalid_html_tags)]
94965    #[doc = "Base64-encoded file hash"]
94966    fn rhai_get_file_hash(&mut self) -> String {
94967        self.file_hash.clone()
94968    }
94969    #[allow(rustdoc::invalid_html_tags)]
94970    #[doc = "Error message"]
94971    #[allow(clippy::needless_lifetimes)]
94972    pub fn get_message<'a>(&'a self) -> &'a str {
94973        self.message.as_str()
94974    }
94975    #[allow(rustdoc::invalid_html_tags)]
94976    #[doc = "Error message"]
94977    #[allow(clippy::needless_lifetimes)]
94978    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
94979        self.message = message;
94980        self
94981    }
94982    #[allow(rustdoc::invalid_html_tags)]
94983    #[doc = "Error message"]
94984    fn rhai_get_message(&mut self) -> String {
94985        self.message.clone()
94986    }
94987}
94988#[allow(dead_code)]
94989impl Sticker {
94990    #[allow(clippy::too_many_arguments)]
94991    pub fn new(
94992        file_id: String,
94993        file_unique_id: String,
94994        width: i64,
94995        height: i64,
94996        is_animated: bool,
94997        is_video: bool,
94998    ) -> Self {
94999        Self {
95000            tg_type: "Sticker".to_owned(),
95001            file_id,
95002            file_unique_id,
95003            width,
95004            height,
95005            is_animated,
95006            is_video,
95007            thumbnail: None,
95008            emoji: None,
95009            set_name: None,
95010            premium_animation: None,
95011            mask_position: None,
95012            custom_emoji_id: None,
95013            needs_repainting: None,
95014            file_size: None,
95015        }
95016    }
95017    #[allow(rustdoc::invalid_html_tags)]
95018    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
95019    #[allow(clippy::needless_lifetimes)]
95020    pub fn get_file_id<'a>(&'a self) -> &'a str {
95021        self.file_id.as_str()
95022    }
95023    #[allow(rustdoc::invalid_html_tags)]
95024    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
95025    #[allow(clippy::needless_lifetimes)]
95026    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
95027        self.file_id = file_id;
95028        self
95029    }
95030    #[allow(rustdoc::invalid_html_tags)]
95031    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
95032    fn rhai_get_file_id(&mut self) -> String {
95033        self.file_id.clone()
95034    }
95035    #[allow(rustdoc::invalid_html_tags)]
95036    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
95037    #[allow(clippy::needless_lifetimes)]
95038    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
95039        self.file_unique_id.as_str()
95040    }
95041    #[allow(rustdoc::invalid_html_tags)]
95042    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
95043    #[allow(clippy::needless_lifetimes)]
95044    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
95045        self.file_unique_id = file_unique_id;
95046        self
95047    }
95048    #[allow(rustdoc::invalid_html_tags)]
95049    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
95050    fn rhai_get_file_unique_id(&mut self) -> String {
95051        self.file_unique_id.clone()
95052    }
95053    #[allow(rustdoc::invalid_html_tags)]
95054    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
95055    #[allow(clippy::needless_lifetimes)]
95056    pub fn get_tg_type<'a>(&'a self) -> &'a str {
95057        self.tg_type.as_str()
95058    }
95059    #[allow(rustdoc::invalid_html_tags)]
95060    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
95061    #[allow(clippy::needless_lifetimes)]
95062    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
95063        self.tg_type = tg_type;
95064        self
95065    }
95066    #[allow(rustdoc::invalid_html_tags)]
95067    #[doc = "Type of the sticker, currently one of \"regular\", \"mask\", \"custom_emoji\". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video."]
95068    fn rhai_get_tg_type(&mut self) -> String {
95069        self.tg_type.clone()
95070    }
95071    #[allow(rustdoc::invalid_html_tags)]
95072    #[doc = "Sticker width"]
95073    #[allow(clippy::needless_lifetimes)]
95074    pub fn get_width<'a>(&'a self) -> i64 {
95075        self.width
95076    }
95077    #[allow(rustdoc::invalid_html_tags)]
95078    #[doc = "Sticker width"]
95079    #[allow(clippy::needless_lifetimes)]
95080    pub fn set_width<'a>(&'a mut self, width: i64) -> &'a mut Self {
95081        self.width = width;
95082        self
95083    }
95084    #[allow(rustdoc::invalid_html_tags)]
95085    #[doc = "Sticker width"]
95086    fn rhai_get_width(&mut self) -> i64 {
95087        self.width
95088    }
95089    #[allow(rustdoc::invalid_html_tags)]
95090    #[doc = "Sticker height"]
95091    #[allow(clippy::needless_lifetimes)]
95092    pub fn get_height<'a>(&'a self) -> i64 {
95093        self.height
95094    }
95095    #[allow(rustdoc::invalid_html_tags)]
95096    #[doc = "Sticker height"]
95097    #[allow(clippy::needless_lifetimes)]
95098    pub fn set_height<'a>(&'a mut self, height: i64) -> &'a mut Self {
95099        self.height = height;
95100        self
95101    }
95102    #[allow(rustdoc::invalid_html_tags)]
95103    #[doc = "Sticker height"]
95104    fn rhai_get_height(&mut self) -> i64 {
95105        self.height
95106    }
95107    #[allow(rustdoc::invalid_html_tags)]
95108    #[doc = "True, if the sticker is animated"]
95109    #[allow(clippy::needless_lifetimes)]
95110    pub fn get_is_animated<'a>(&'a self) -> bool {
95111        self.is_animated
95112    }
95113    #[allow(rustdoc::invalid_html_tags)]
95114    #[doc = "True, if the sticker is animated"]
95115    #[allow(clippy::needless_lifetimes)]
95116    pub fn set_is_animated<'a>(&'a mut self, is_animated: bool) -> &'a mut Self {
95117        self.is_animated = is_animated;
95118        self
95119    }
95120    #[allow(rustdoc::invalid_html_tags)]
95121    #[doc = "True, if the sticker is animated"]
95122    fn rhai_get_is_animated(&mut self) -> bool {
95123        self.is_animated
95124    }
95125    #[allow(rustdoc::invalid_html_tags)]
95126    #[doc = "True, if the sticker is a video sticker"]
95127    #[allow(clippy::needless_lifetimes)]
95128    pub fn get_is_video<'a>(&'a self) -> bool {
95129        self.is_video
95130    }
95131    #[allow(rustdoc::invalid_html_tags)]
95132    #[doc = "True, if the sticker is a video sticker"]
95133    #[allow(clippy::needless_lifetimes)]
95134    pub fn set_is_video<'a>(&'a mut self, is_video: bool) -> &'a mut Self {
95135        self.is_video = is_video;
95136        self
95137    }
95138    #[allow(rustdoc::invalid_html_tags)]
95139    #[doc = "True, if the sticker is a video sticker"]
95140    fn rhai_get_is_video(&mut self) -> bool {
95141        self.is_video
95142    }
95143    #[allow(rustdoc::invalid_html_tags)]
95144    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
95145    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95146    pub fn get_thumbnail<'a>(&'a self) -> Option<&'a PhotoSize> {
95147        self.thumbnail.as_ref().map(|v| v.inner_ref())
95148    }
95149    #[allow(rustdoc::invalid_html_tags)]
95150    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
95151    #[allow(clippy::needless_lifetimes)]
95152    pub fn set_thumbnail<'a>(&'a mut self, thumbnail: Option<PhotoSize>) -> &'a mut Self {
95153        self.thumbnail = thumbnail.map(|thumbnail| BoxWrapper(Unbox(thumbnail)));
95154        self
95155    }
95156    #[allow(rustdoc::invalid_html_tags)]
95157    #[doc = "Optional. Sticker thumbnail in the .WEBP or .JPG format"]
95158    fn rhai_get_thumbnail(&mut self) -> Option<PhotoSize> {
95159        self.thumbnail.as_ref().map(|v| v.clone().into())
95160    }
95161    #[allow(rustdoc::invalid_html_tags)]
95162    #[doc = "Optional. Emoji associated with the sticker"]
95163    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95164    pub fn get_emoji<'a>(&'a self) -> Option<&'a str> {
95165        self.emoji.as_ref().map(|v| v.as_str())
95166    }
95167    #[allow(rustdoc::invalid_html_tags)]
95168    #[doc = "Optional. Emoji associated with the sticker"]
95169    #[allow(clippy::needless_lifetimes)]
95170    pub fn set_emoji<'a>(&'a mut self, emoji: Option<String>) -> &'a mut Self {
95171        self.emoji = emoji;
95172        self
95173    }
95174    #[allow(rustdoc::invalid_html_tags)]
95175    #[doc = "Optional. Emoji associated with the sticker"]
95176    fn rhai_get_emoji(&mut self) -> Option<String> {
95177        self.emoji.as_ref().cloned()
95178    }
95179    #[allow(rustdoc::invalid_html_tags)]
95180    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
95181    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95182    pub fn get_set_name<'a>(&'a self) -> Option<&'a str> {
95183        self.set_name.as_ref().map(|v| v.as_str())
95184    }
95185    #[allow(rustdoc::invalid_html_tags)]
95186    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
95187    #[allow(clippy::needless_lifetimes)]
95188    pub fn set_set_name<'a>(&'a mut self, set_name: Option<String>) -> &'a mut Self {
95189        self.set_name = set_name;
95190        self
95191    }
95192    #[allow(rustdoc::invalid_html_tags)]
95193    #[doc = "Optional. Name of the sticker set to which the sticker belongs"]
95194    fn rhai_get_set_name(&mut self) -> Option<String> {
95195        self.set_name.as_ref().cloned()
95196    }
95197    #[allow(rustdoc::invalid_html_tags)]
95198    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
95199    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95200    pub fn get_premium_animation<'a>(&'a self) -> Option<&'a File> {
95201        self.premium_animation.as_ref().map(|v| v.inner_ref())
95202    }
95203    #[allow(rustdoc::invalid_html_tags)]
95204    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
95205    #[allow(clippy::needless_lifetimes)]
95206    pub fn set_premium_animation<'a>(
95207        &'a mut self,
95208        premium_animation: Option<File>,
95209    ) -> &'a mut Self {
95210        self.premium_animation =
95211            premium_animation.map(|premium_animation| BoxWrapper(Unbox(premium_animation)));
95212        self
95213    }
95214    #[allow(rustdoc::invalid_html_tags)]
95215    #[doc = "Optional. For premium regular stickers, premium animation for the sticker"]
95216    fn rhai_get_premium_animation(&mut self) -> Option<File> {
95217        self.premium_animation.as_ref().map(|v| v.clone().into())
95218    }
95219    #[allow(rustdoc::invalid_html_tags)]
95220    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
95221    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95222    pub fn get_mask_position<'a>(&'a self) -> Option<&'a MaskPosition> {
95223        self.mask_position.as_ref().map(|v| v.inner_ref())
95224    }
95225    #[allow(rustdoc::invalid_html_tags)]
95226    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
95227    #[allow(clippy::needless_lifetimes)]
95228    pub fn set_mask_position<'a>(
95229        &'a mut self,
95230        mask_position: Option<MaskPosition>,
95231    ) -> &'a mut Self {
95232        self.mask_position = mask_position.map(|mask_position| BoxWrapper(Unbox(mask_position)));
95233        self
95234    }
95235    #[allow(rustdoc::invalid_html_tags)]
95236    #[doc = "Optional. For mask stickers, the position where the mask should be placed"]
95237    fn rhai_get_mask_position(&mut self) -> Option<MaskPosition> {
95238        self.mask_position.as_ref().map(|v| v.clone().into())
95239    }
95240    #[allow(rustdoc::invalid_html_tags)]
95241    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
95242    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95243    pub fn get_custom_emoji_id<'a>(&'a self) -> Option<&'a str> {
95244        self.custom_emoji_id.as_ref().map(|v| v.as_str())
95245    }
95246    #[allow(rustdoc::invalid_html_tags)]
95247    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
95248    #[allow(clippy::needless_lifetimes)]
95249    pub fn set_custom_emoji_id<'a>(&'a mut self, custom_emoji_id: Option<String>) -> &'a mut Self {
95250        self.custom_emoji_id = custom_emoji_id;
95251        self
95252    }
95253    #[allow(rustdoc::invalid_html_tags)]
95254    #[doc = "Optional. For custom emoji stickers, unique identifier of the custom emoji"]
95255    fn rhai_get_custom_emoji_id(&mut self) -> Option<String> {
95256        self.custom_emoji_id.as_ref().cloned()
95257    }
95258    #[allow(rustdoc::invalid_html_tags)]
95259    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
95260    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95261    pub fn get_needs_repainting<'a>(&'a self) -> Option<bool> {
95262        self.needs_repainting.as_ref().map(|v| *v)
95263    }
95264    #[allow(rustdoc::invalid_html_tags)]
95265    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
95266    #[allow(clippy::needless_lifetimes)]
95267    pub fn set_needs_repainting<'a>(&'a mut self, needs_repainting: Option<bool>) -> &'a mut Self {
95268        self.needs_repainting = needs_repainting;
95269        self
95270    }
95271    #[allow(rustdoc::invalid_html_tags)]
95272    #[doc = "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places"]
95273    fn rhai_get_needs_repainting(&mut self) -> Option<bool> {
95274        self.needs_repainting.as_ref().copied()
95275    }
95276    #[allow(rustdoc::invalid_html_tags)]
95277    #[doc = "Optional. File size in bytes"]
95278    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95279    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
95280        self.file_size.as_ref().map(|v| *v)
95281    }
95282    #[allow(rustdoc::invalid_html_tags)]
95283    #[doc = "Optional. File size in bytes"]
95284    #[allow(clippy::needless_lifetimes)]
95285    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
95286        self.file_size = file_size;
95287        self
95288    }
95289    #[allow(rustdoc::invalid_html_tags)]
95290    #[doc = "Optional. File size in bytes"]
95291    fn rhai_get_file_size(&mut self) -> Option<i64> {
95292        self.file_size.as_ref().copied()
95293    }
95294}
95295#[allow(dead_code)]
95296impl PassportElementErrorSelfie {
95297    #[allow(clippy::too_many_arguments)]
95298    pub fn new(source: String, file_hash: String, message: String) -> Self {
95299        Self {
95300            tg_type: "PassportElementErrorSelfie".to_owned(),
95301            source,
95302            file_hash,
95303            message,
95304        }
95305    }
95306    #[allow(rustdoc::invalid_html_tags)]
95307    #[doc = "Error source, must be selfie"]
95308    #[allow(clippy::needless_lifetimes)]
95309    pub fn get_source<'a>(&'a self) -> &'a str {
95310        self.source.as_str()
95311    }
95312    #[allow(rustdoc::invalid_html_tags)]
95313    #[doc = "Error source, must be selfie"]
95314    #[allow(clippy::needless_lifetimes)]
95315    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
95316        self.source = source;
95317        self
95318    }
95319    #[allow(rustdoc::invalid_html_tags)]
95320    #[doc = "Error source, must be selfie"]
95321    fn rhai_get_source(&mut self) -> String {
95322        self.source.clone()
95323    }
95324    #[allow(rustdoc::invalid_html_tags)]
95325    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
95326    #[allow(clippy::needless_lifetimes)]
95327    pub fn get_tg_type<'a>(&'a self) -> &'a str {
95328        self.tg_type.as_str()
95329    }
95330    #[allow(rustdoc::invalid_html_tags)]
95331    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
95332    #[allow(clippy::needless_lifetimes)]
95333    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
95334        self.tg_type = tg_type;
95335        self
95336    }
95337    #[allow(rustdoc::invalid_html_tags)]
95338    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
95339    fn rhai_get_tg_type(&mut self) -> String {
95340        self.tg_type.clone()
95341    }
95342    #[allow(rustdoc::invalid_html_tags)]
95343    #[doc = "Base64-encoded hash of the file with the selfie"]
95344    #[allow(clippy::needless_lifetimes)]
95345    pub fn get_file_hash<'a>(&'a self) -> &'a str {
95346        self.file_hash.as_str()
95347    }
95348    #[allow(rustdoc::invalid_html_tags)]
95349    #[doc = "Base64-encoded hash of the file with the selfie"]
95350    #[allow(clippy::needless_lifetimes)]
95351    pub fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
95352        self.file_hash = file_hash;
95353        self
95354    }
95355    #[allow(rustdoc::invalid_html_tags)]
95356    #[doc = "Base64-encoded hash of the file with the selfie"]
95357    fn rhai_get_file_hash(&mut self) -> String {
95358        self.file_hash.clone()
95359    }
95360    #[allow(rustdoc::invalid_html_tags)]
95361    #[doc = "Error message"]
95362    #[allow(clippy::needless_lifetimes)]
95363    pub fn get_message<'a>(&'a self) -> &'a str {
95364        self.message.as_str()
95365    }
95366    #[allow(rustdoc::invalid_html_tags)]
95367    #[doc = "Error message"]
95368    #[allow(clippy::needless_lifetimes)]
95369    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
95370        self.message = message;
95371        self
95372    }
95373    #[allow(rustdoc::invalid_html_tags)]
95374    #[doc = "Error message"]
95375    fn rhai_get_message(&mut self) -> String {
95376        self.message.clone()
95377    }
95378}
95379#[allow(dead_code)]
95380impl BackgroundTypePattern {
95381    #[allow(clippy::too_many_arguments)]
95382    pub fn new<A: Into<Document>, B: Into<BackgroundFill>>(
95383        document: A,
95384        fill: B,
95385        intensity: i64,
95386    ) -> Self {
95387        Self {
95388            tg_type: "BackgroundTypePattern".to_owned(),
95389            document: BoxWrapper::new_unbox(document.into()),
95390            fill: BoxWrapper::new_unbox(fill.into()),
95391            intensity,
95392            is_inverted: None,
95393            is_moving: None,
95394        }
95395    }
95396    #[allow(rustdoc::invalid_html_tags)]
95397    #[doc = "Type of the background, always \"pattern\""]
95398    #[allow(clippy::needless_lifetimes)]
95399    pub fn get_tg_type<'a>(&'a self) -> &'a str {
95400        self.tg_type.as_str()
95401    }
95402    #[allow(rustdoc::invalid_html_tags)]
95403    #[doc = "Type of the background, always \"pattern\""]
95404    #[allow(clippy::needless_lifetimes)]
95405    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
95406        self.tg_type = tg_type;
95407        self
95408    }
95409    #[allow(rustdoc::invalid_html_tags)]
95410    #[doc = "Type of the background, always \"pattern\""]
95411    fn rhai_get_tg_type(&mut self) -> String {
95412        self.tg_type.clone()
95413    }
95414    #[allow(rustdoc::invalid_html_tags)]
95415    #[doc = "Document with the pattern"]
95416    #[allow(clippy::needless_lifetimes)]
95417    pub fn get_document<'a>(&'a self) -> &'a Document {
95418        &self.document
95419    }
95420    #[allow(rustdoc::invalid_html_tags)]
95421    #[doc = "Document with the pattern"]
95422    #[allow(clippy::needless_lifetimes)]
95423    pub fn set_document<'a>(&'a mut self, document: Document) -> &'a mut Self {
95424        self.document = BoxWrapper(Unbox(document));
95425        self
95426    }
95427    #[allow(rustdoc::invalid_html_tags)]
95428    #[doc = "Document with the pattern"]
95429    fn rhai_get_document(&mut self) -> Document {
95430        self.document.clone().into()
95431    }
95432    #[allow(rustdoc::invalid_html_tags)]
95433    #[doc = "The background fill that is combined with the pattern"]
95434    #[allow(clippy::needless_lifetimes)]
95435    pub fn get_fill<'a>(&'a self) -> &'a BackgroundFill {
95436        &self.fill
95437    }
95438    #[allow(rustdoc::invalid_html_tags)]
95439    #[doc = "The background fill that is combined with the pattern"]
95440    #[allow(clippy::needless_lifetimes)]
95441    pub fn set_fill<'a>(&'a mut self, fill: BackgroundFill) -> &'a mut Self {
95442        self.fill = BoxWrapper(Unbox(fill));
95443        self
95444    }
95445    #[allow(rustdoc::invalid_html_tags)]
95446    #[doc = "The background fill that is combined with the pattern"]
95447    fn rhai_get_fill(&mut self) -> BackgroundFill {
95448        self.fill.clone().into()
95449    }
95450    #[allow(rustdoc::invalid_html_tags)]
95451    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
95452    #[allow(clippy::needless_lifetimes)]
95453    pub fn get_intensity<'a>(&'a self) -> i64 {
95454        self.intensity
95455    }
95456    #[allow(rustdoc::invalid_html_tags)]
95457    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
95458    #[allow(clippy::needless_lifetimes)]
95459    pub fn set_intensity<'a>(&'a mut self, intensity: i64) -> &'a mut Self {
95460        self.intensity = intensity;
95461        self
95462    }
95463    #[allow(rustdoc::invalid_html_tags)]
95464    #[doc = "Intensity of the pattern when it is shown above the filled background; 0-100"]
95465    fn rhai_get_intensity(&mut self) -> i64 {
95466        self.intensity
95467    }
95468    #[allow(rustdoc::invalid_html_tags)]
95469    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
95470    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95471    pub fn get_is_inverted<'a>(&'a self) -> Option<bool> {
95472        self.is_inverted.as_ref().map(|v| *v)
95473    }
95474    #[allow(rustdoc::invalid_html_tags)]
95475    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
95476    #[allow(clippy::needless_lifetimes)]
95477    pub fn set_is_inverted<'a>(&'a mut self, is_inverted: Option<bool>) -> &'a mut Self {
95478        self.is_inverted = is_inverted;
95479        self
95480    }
95481    #[allow(rustdoc::invalid_html_tags)]
95482    #[doc = "Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only"]
95483    fn rhai_get_is_inverted(&mut self) -> Option<bool> {
95484        self.is_inverted.as_ref().copied()
95485    }
95486    #[allow(rustdoc::invalid_html_tags)]
95487    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
95488    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95489    pub fn get_is_moving<'a>(&'a self) -> Option<bool> {
95490        self.is_moving.as_ref().map(|v| *v)
95491    }
95492    #[allow(rustdoc::invalid_html_tags)]
95493    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
95494    #[allow(clippy::needless_lifetimes)]
95495    pub fn set_is_moving<'a>(&'a mut self, is_moving: Option<bool>) -> &'a mut Self {
95496        self.is_moving = is_moving;
95497        self
95498    }
95499    #[allow(rustdoc::invalid_html_tags)]
95500    #[doc = "Optional. True, if the background moves slightly when the device is tilted"]
95501    fn rhai_get_is_moving(&mut self) -> Option<bool> {
95502        self.is_moving.as_ref().copied()
95503    }
95504}
95505#[allow(dead_code)]
95506impl StarAmount {
95507    #[allow(clippy::too_many_arguments)]
95508    pub fn new(amount: i64) -> Self {
95509        Self {
95510            amount,
95511            nanostar_amount: None,
95512        }
95513    }
95514    #[allow(rustdoc::invalid_html_tags)]
95515    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
95516    #[allow(clippy::needless_lifetimes)]
95517    pub fn get_amount<'a>(&'a self) -> i64 {
95518        self.amount
95519    }
95520    #[allow(rustdoc::invalid_html_tags)]
95521    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
95522    #[allow(clippy::needless_lifetimes)]
95523    pub fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self {
95524        self.amount = amount;
95525        self
95526    }
95527    #[allow(rustdoc::invalid_html_tags)]
95528    #[doc = "Integer amount of Telegram Stars, rounded to 0; can be negative"]
95529    fn rhai_get_amount(&mut self) -> i64 {
95530        self.amount
95531    }
95532    #[allow(rustdoc::invalid_html_tags)]
95533    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
95534    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95535    pub fn get_nanostar_amount<'a>(&'a self) -> Option<i64> {
95536        self.nanostar_amount.as_ref().map(|v| *v)
95537    }
95538    #[allow(rustdoc::invalid_html_tags)]
95539    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
95540    #[allow(clippy::needless_lifetimes)]
95541    pub fn set_nanostar_amount<'a>(&'a mut self, nanostar_amount: Option<i64>) -> &'a mut Self {
95542        self.nanostar_amount = nanostar_amount;
95543        self
95544    }
95545    #[allow(rustdoc::invalid_html_tags)]
95546    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive"]
95547    fn rhai_get_nanostar_amount(&mut self) -> Option<i64> {
95548        self.nanostar_amount.as_ref().copied()
95549    }
95550}
95551#[allow(dead_code)]
95552impl TransactionPartnerFragment {
95553    #[allow(clippy::too_many_arguments)]
95554    pub fn new() -> Self {
95555        Self {
95556            tg_type: "TransactionPartnerFragment".to_owned(),
95557            withdrawal_state: None,
95558        }
95559    }
95560    #[allow(rustdoc::invalid_html_tags)]
95561    #[doc = "Type of the transaction partner, always \"fragment\""]
95562    #[allow(clippy::needless_lifetimes)]
95563    pub fn get_tg_type<'a>(&'a self) -> &'a str {
95564        self.tg_type.as_str()
95565    }
95566    #[allow(rustdoc::invalid_html_tags)]
95567    #[doc = "Type of the transaction partner, always \"fragment\""]
95568    #[allow(clippy::needless_lifetimes)]
95569    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
95570        self.tg_type = tg_type;
95571        self
95572    }
95573    #[allow(rustdoc::invalid_html_tags)]
95574    #[doc = "Type of the transaction partner, always \"fragment\""]
95575    fn rhai_get_tg_type(&mut self) -> String {
95576        self.tg_type.clone()
95577    }
95578    #[allow(rustdoc::invalid_html_tags)]
95579    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
95580    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95581    pub fn get_withdrawal_state<'a>(&'a self) -> Option<&'a RevenueWithdrawalState> {
95582        self.withdrawal_state.as_ref().map(|v| v.inner_ref())
95583    }
95584    #[allow(rustdoc::invalid_html_tags)]
95585    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
95586    #[allow(clippy::needless_lifetimes)]
95587    pub fn set_withdrawal_state<'a>(
95588        &'a mut self,
95589        withdrawal_state: Option<RevenueWithdrawalState>,
95590    ) -> &'a mut Self {
95591        self.withdrawal_state =
95592            withdrawal_state.map(|withdrawal_state| BoxWrapper(Unbox(withdrawal_state)));
95593        self
95594    }
95595    #[allow(rustdoc::invalid_html_tags)]
95596    #[doc = "Optional. State of the transaction if the transaction is outgoing"]
95597    fn rhai_get_withdrawal_state(&mut self) -> Option<RevenueWithdrawalState> {
95598        self.withdrawal_state.as_ref().map(|v| v.clone().into())
95599    }
95600}
95601#[allow(dead_code)]
95602impl ChatMemberLeft {
95603    #[allow(clippy::too_many_arguments)]
95604    pub fn new<A: Into<User>>(user: A) -> Self {
95605        Self {
95606            user: BoxWrapper::new_unbox(user.into()),
95607        }
95608    }
95609    #[allow(rustdoc::invalid_html_tags)]
95610    #[doc = "Information about the user"]
95611    #[allow(clippy::needless_lifetimes)]
95612    pub fn get_user<'a>(&'a self) -> &'a User {
95613        &self.user
95614    }
95615    #[allow(rustdoc::invalid_html_tags)]
95616    #[doc = "Information about the user"]
95617    #[allow(clippy::needless_lifetimes)]
95618    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
95619        self.user = BoxWrapper(Unbox(user));
95620        self
95621    }
95622    #[allow(rustdoc::invalid_html_tags)]
95623    #[doc = "Information about the user"]
95624    fn rhai_get_user(&mut self) -> User {
95625        self.user.clone().into()
95626    }
95627}
95628#[allow(dead_code)]
95629impl PaidMediaPhoto {
95630    #[allow(clippy::too_many_arguments)]
95631    pub fn new(photo: Vec<PhotoSize>) -> Self {
95632        Self {
95633            tg_type: "PaidMediaPhoto".to_owned(),
95634            photo,
95635        }
95636    }
95637    #[allow(rustdoc::invalid_html_tags)]
95638    #[doc = "Type of the paid media, always \"photo\""]
95639    #[allow(clippy::needless_lifetimes)]
95640    pub fn get_tg_type<'a>(&'a self) -> &'a str {
95641        self.tg_type.as_str()
95642    }
95643    #[allow(rustdoc::invalid_html_tags)]
95644    #[doc = "Type of the paid media, always \"photo\""]
95645    #[allow(clippy::needless_lifetimes)]
95646    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
95647        self.tg_type = tg_type;
95648        self
95649    }
95650    #[allow(rustdoc::invalid_html_tags)]
95651    #[doc = "Type of the paid media, always \"photo\""]
95652    fn rhai_get_tg_type(&mut self) -> String {
95653        self.tg_type.clone()
95654    }
95655    #[allow(rustdoc::invalid_html_tags)]
95656    #[doc = "The photo"]
95657    #[allow(clippy::needless_lifetimes)]
95658    pub fn get_photo<'a>(&'a self) -> &'a Vec<PhotoSize> {
95659        &self.photo
95660    }
95661    #[allow(rustdoc::invalid_html_tags)]
95662    #[doc = "The photo"]
95663    #[allow(clippy::needless_lifetimes)]
95664    pub fn set_photo<'a>(&'a mut self, photo: Vec<PhotoSize>) -> &'a mut Self {
95665        self.photo = photo;
95666        self
95667    }
95668    #[allow(rustdoc::invalid_html_tags)]
95669    #[doc = "The photo"]
95670    fn rhai_get_photo(&mut self) -> Vec<PhotoSize> {
95671        self.photo.clone()
95672    }
95673}
95674#[allow(dead_code)]
95675impl UniqueGift {
95676    #[allow(clippy::too_many_arguments)]
95677    pub fn new<A: Into<UniqueGiftModel>, B: Into<UniqueGiftSymbol>, C: Into<UniqueGiftBackdrop>>(
95678        base_name: String,
95679        name: String,
95680        number: i64,
95681        model: A,
95682        symbol: B,
95683        backdrop: C,
95684    ) -> Self {
95685        Self {
95686            base_name,
95687            name,
95688            number,
95689            model: BoxWrapper::new_unbox(model.into()),
95690            symbol: BoxWrapper::new_unbox(symbol.into()),
95691            backdrop: BoxWrapper::new_unbox(backdrop.into()),
95692            publisher_chat: None,
95693        }
95694    }
95695    #[allow(rustdoc::invalid_html_tags)]
95696    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
95697    #[allow(clippy::needless_lifetimes)]
95698    pub fn get_base_name<'a>(&'a self) -> &'a str {
95699        self.base_name.as_str()
95700    }
95701    #[allow(rustdoc::invalid_html_tags)]
95702    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
95703    #[allow(clippy::needless_lifetimes)]
95704    pub fn set_base_name<'a>(&'a mut self, base_name: String) -> &'a mut Self {
95705        self.base_name = base_name;
95706        self
95707    }
95708    #[allow(rustdoc::invalid_html_tags)]
95709    #[doc = "Human-readable name of the regular gift from which this unique gift was upgraded"]
95710    fn rhai_get_base_name(&mut self) -> String {
95711        self.base_name.clone()
95712    }
95713    #[allow(rustdoc::invalid_html_tags)]
95714    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
95715    #[allow(clippy::needless_lifetimes)]
95716    pub fn get_name<'a>(&'a self) -> &'a str {
95717        self.name.as_str()
95718    }
95719    #[allow(rustdoc::invalid_html_tags)]
95720    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
95721    #[allow(clippy::needless_lifetimes)]
95722    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
95723        self.name = name;
95724        self
95725    }
95726    #[allow(rustdoc::invalid_html_tags)]
95727    #[doc = "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas"]
95728    fn rhai_get_name(&mut self) -> String {
95729        self.name.clone()
95730    }
95731    #[allow(rustdoc::invalid_html_tags)]
95732    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
95733    #[allow(clippy::needless_lifetimes)]
95734    pub fn get_number<'a>(&'a self) -> i64 {
95735        self.number
95736    }
95737    #[allow(rustdoc::invalid_html_tags)]
95738    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
95739    #[allow(clippy::needless_lifetimes)]
95740    pub fn set_number<'a>(&'a mut self, number: i64) -> &'a mut Self {
95741        self.number = number;
95742        self
95743    }
95744    #[allow(rustdoc::invalid_html_tags)]
95745    #[doc = "Unique number of the upgraded gift among gifts upgraded from the same regular gift"]
95746    fn rhai_get_number(&mut self) -> i64 {
95747        self.number
95748    }
95749    #[allow(rustdoc::invalid_html_tags)]
95750    #[doc = "Model of the gift"]
95751    #[allow(clippy::needless_lifetimes)]
95752    pub fn get_model<'a>(&'a self) -> &'a UniqueGiftModel {
95753        &self.model
95754    }
95755    #[allow(rustdoc::invalid_html_tags)]
95756    #[doc = "Model of the gift"]
95757    #[allow(clippy::needless_lifetimes)]
95758    pub fn set_model<'a>(&'a mut self, model: UniqueGiftModel) -> &'a mut Self {
95759        self.model = BoxWrapper(Unbox(model));
95760        self
95761    }
95762    #[allow(rustdoc::invalid_html_tags)]
95763    #[doc = "Model of the gift"]
95764    fn rhai_get_model(&mut self) -> UniqueGiftModel {
95765        self.model.clone().into()
95766    }
95767    #[allow(rustdoc::invalid_html_tags)]
95768    #[doc = "Symbol of the gift"]
95769    #[allow(clippy::needless_lifetimes)]
95770    pub fn get_symbol<'a>(&'a self) -> &'a UniqueGiftSymbol {
95771        &self.symbol
95772    }
95773    #[allow(rustdoc::invalid_html_tags)]
95774    #[doc = "Symbol of the gift"]
95775    #[allow(clippy::needless_lifetimes)]
95776    pub fn set_symbol<'a>(&'a mut self, symbol: UniqueGiftSymbol) -> &'a mut Self {
95777        self.symbol = BoxWrapper(Unbox(symbol));
95778        self
95779    }
95780    #[allow(rustdoc::invalid_html_tags)]
95781    #[doc = "Symbol of the gift"]
95782    fn rhai_get_symbol(&mut self) -> UniqueGiftSymbol {
95783        self.symbol.clone().into()
95784    }
95785    #[allow(rustdoc::invalid_html_tags)]
95786    #[doc = "Backdrop of the gift"]
95787    #[allow(clippy::needless_lifetimes)]
95788    pub fn get_backdrop<'a>(&'a self) -> &'a UniqueGiftBackdrop {
95789        &self.backdrop
95790    }
95791    #[allow(rustdoc::invalid_html_tags)]
95792    #[doc = "Backdrop of the gift"]
95793    #[allow(clippy::needless_lifetimes)]
95794    pub fn set_backdrop<'a>(&'a mut self, backdrop: UniqueGiftBackdrop) -> &'a mut Self {
95795        self.backdrop = BoxWrapper(Unbox(backdrop));
95796        self
95797    }
95798    #[allow(rustdoc::invalid_html_tags)]
95799    #[doc = "Backdrop of the gift"]
95800    fn rhai_get_backdrop(&mut self) -> UniqueGiftBackdrop {
95801        self.backdrop.clone().into()
95802    }
95803    #[allow(rustdoc::invalid_html_tags)]
95804    #[doc = "Optional. Information about the chat that published the gift"]
95805    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95806    pub fn get_publisher_chat<'a>(&'a self) -> Option<&'a Chat> {
95807        self.publisher_chat.as_ref().map(|v| v.inner_ref())
95808    }
95809    #[allow(rustdoc::invalid_html_tags)]
95810    #[doc = "Optional. Information about the chat that published the gift"]
95811    #[allow(clippy::needless_lifetimes)]
95812    pub fn set_publisher_chat<'a>(&'a mut self, publisher_chat: Option<Chat>) -> &'a mut Self {
95813        self.publisher_chat =
95814            publisher_chat.map(|publisher_chat| BoxWrapper(Unbox(publisher_chat)));
95815        self
95816    }
95817    #[allow(rustdoc::invalid_html_tags)]
95818    #[doc = "Optional. Information about the chat that published the gift"]
95819    fn rhai_get_publisher_chat(&mut self) -> Option<Chat> {
95820        self.publisher_chat.as_ref().map(|v| v.clone().into())
95821    }
95822}
95823#[allow(dead_code)]
95824impl MenuButtonCommands {
95825    #[allow(clippy::too_many_arguments)]
95826    pub fn new() -> Self {
95827        Self {
95828            tg_type: "commands".to_owned(),
95829        }
95830    }
95831    #[allow(rustdoc::invalid_html_tags)]
95832    #[doc = "Type of the button, must be commands"]
95833    #[allow(clippy::needless_lifetimes)]
95834    pub fn get_tg_type<'a>(&'a self) -> &'a str {
95835        self.tg_type.as_str()
95836    }
95837    #[allow(rustdoc::invalid_html_tags)]
95838    #[doc = "Type of the button, must be commands"]
95839    #[allow(clippy::needless_lifetimes)]
95840    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
95841        self.tg_type = tg_type;
95842        self
95843    }
95844    #[allow(rustdoc::invalid_html_tags)]
95845    #[doc = "Type of the button, must be commands"]
95846    fn rhai_get_tg_type(&mut self) -> String {
95847        self.tg_type.clone()
95848    }
95849}
95850#[allow(dead_code)]
95851impl TransactionPartnerOther {
95852    #[allow(clippy::too_many_arguments)]
95853    pub fn new() -> Self {
95854        Self {
95855            tg_type: "TransactionPartnerOther".to_owned(),
95856        }
95857    }
95858    #[allow(rustdoc::invalid_html_tags)]
95859    #[doc = "Type of the transaction partner, always \"other\""]
95860    #[allow(clippy::needless_lifetimes)]
95861    pub fn get_tg_type<'a>(&'a self) -> &'a str {
95862        self.tg_type.as_str()
95863    }
95864    #[allow(rustdoc::invalid_html_tags)]
95865    #[doc = "Type of the transaction partner, always \"other\""]
95866    #[allow(clippy::needless_lifetimes)]
95867    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
95868        self.tg_type = tg_type;
95869        self
95870    }
95871    #[allow(rustdoc::invalid_html_tags)]
95872    #[doc = "Type of the transaction partner, always \"other\""]
95873    fn rhai_get_tg_type(&mut self) -> String {
95874        self.tg_type.clone()
95875    }
95876}
95877#[allow(dead_code)]
95878impl Gifts {
95879    #[allow(clippy::too_many_arguments)]
95880    pub fn new(gifts: Vec<Gift>) -> Self {
95881        Self { gifts }
95882    }
95883    #[allow(rustdoc::invalid_html_tags)]
95884    #[doc = "The list of gifts"]
95885    #[allow(clippy::needless_lifetimes)]
95886    pub fn get_gifts<'a>(&'a self) -> &'a Vec<Gift> {
95887        &self.gifts
95888    }
95889    #[allow(rustdoc::invalid_html_tags)]
95890    #[doc = "The list of gifts"]
95891    #[allow(clippy::needless_lifetimes)]
95892    pub fn set_gifts<'a>(&'a mut self, gifts: Vec<Gift>) -> &'a mut Self {
95893        self.gifts = gifts;
95894        self
95895    }
95896    #[allow(rustdoc::invalid_html_tags)]
95897    #[doc = "The list of gifts"]
95898    fn rhai_get_gifts(&mut self) -> Vec<Gift> {
95899        self.gifts.clone()
95900    }
95901}
95902#[allow(dead_code)]
95903impl File {
95904    #[allow(clippy::too_many_arguments)]
95905    pub fn new(file_id: String, file_unique_id: String) -> Self {
95906        Self {
95907            file_id,
95908            file_unique_id,
95909            file_size: None,
95910            file_path: None,
95911        }
95912    }
95913    #[allow(rustdoc::invalid_html_tags)]
95914    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
95915    #[allow(clippy::needless_lifetimes)]
95916    pub fn get_file_id<'a>(&'a self) -> &'a str {
95917        self.file_id.as_str()
95918    }
95919    #[allow(rustdoc::invalid_html_tags)]
95920    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
95921    #[allow(clippy::needless_lifetimes)]
95922    pub fn set_file_id<'a>(&'a mut self, file_id: String) -> &'a mut Self {
95923        self.file_id = file_id;
95924        self
95925    }
95926    #[allow(rustdoc::invalid_html_tags)]
95927    #[doc = "Identifier for this file, which can be used to download or reuse the file"]
95928    fn rhai_get_file_id(&mut self) -> String {
95929        self.file_id.clone()
95930    }
95931    #[allow(rustdoc::invalid_html_tags)]
95932    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
95933    #[allow(clippy::needless_lifetimes)]
95934    pub fn get_file_unique_id<'a>(&'a self) -> &'a str {
95935        self.file_unique_id.as_str()
95936    }
95937    #[allow(rustdoc::invalid_html_tags)]
95938    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
95939    #[allow(clippy::needless_lifetimes)]
95940    pub fn set_file_unique_id<'a>(&'a mut self, file_unique_id: String) -> &'a mut Self {
95941        self.file_unique_id = file_unique_id;
95942        self
95943    }
95944    #[allow(rustdoc::invalid_html_tags)]
95945    #[doc = "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."]
95946    fn rhai_get_file_unique_id(&mut self) -> String {
95947        self.file_unique_id.clone()
95948    }
95949    #[allow(rustdoc::invalid_html_tags)]
95950    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
95951    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95952    pub fn get_file_size<'a>(&'a self) -> Option<i64> {
95953        self.file_size.as_ref().map(|v| *v)
95954    }
95955    #[allow(rustdoc::invalid_html_tags)]
95956    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
95957    #[allow(clippy::needless_lifetimes)]
95958    pub fn set_file_size<'a>(&'a mut self, file_size: Option<i64>) -> &'a mut Self {
95959        self.file_size = file_size;
95960        self
95961    }
95962    #[allow(rustdoc::invalid_html_tags)]
95963    #[doc = "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value."]
95964    fn rhai_get_file_size(&mut self) -> Option<i64> {
95965        self.file_size.as_ref().copied()
95966    }
95967    #[allow(rustdoc::invalid_html_tags)]
95968    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
95969    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
95970    pub fn get_file_path<'a>(&'a self) -> Option<&'a str> {
95971        self.file_path.as_ref().map(|v| v.as_str())
95972    }
95973    #[allow(rustdoc::invalid_html_tags)]
95974    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
95975    #[allow(clippy::needless_lifetimes)]
95976    pub fn set_file_path<'a>(&'a mut self, file_path: Option<String>) -> &'a mut Self {
95977        self.file_path = file_path;
95978        self
95979    }
95980    #[allow(rustdoc::invalid_html_tags)]
95981    #[doc = "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file."]
95982    fn rhai_get_file_path(&mut self) -> Option<String> {
95983        self.file_path.as_ref().cloned()
95984    }
95985}
95986#[allow(dead_code)]
95987impl Birthdate {
95988    #[allow(clippy::too_many_arguments)]
95989    pub fn new(day: i64, month: i64) -> Self {
95990        Self {
95991            day,
95992            month,
95993            year: None,
95994        }
95995    }
95996    #[allow(rustdoc::invalid_html_tags)]
95997    #[doc = "Day of the user's birth; 1-31"]
95998    #[allow(clippy::needless_lifetimes)]
95999    pub fn get_day<'a>(&'a self) -> i64 {
96000        self.day
96001    }
96002    #[allow(rustdoc::invalid_html_tags)]
96003    #[doc = "Day of the user's birth; 1-31"]
96004    #[allow(clippy::needless_lifetimes)]
96005    pub fn set_day<'a>(&'a mut self, day: i64) -> &'a mut Self {
96006        self.day = day;
96007        self
96008    }
96009    #[allow(rustdoc::invalid_html_tags)]
96010    #[doc = "Day of the user's birth; 1-31"]
96011    fn rhai_get_day(&mut self) -> i64 {
96012        self.day
96013    }
96014    #[allow(rustdoc::invalid_html_tags)]
96015    #[doc = "Month of the user's birth; 1-12"]
96016    #[allow(clippy::needless_lifetimes)]
96017    pub fn get_month<'a>(&'a self) -> i64 {
96018        self.month
96019    }
96020    #[allow(rustdoc::invalid_html_tags)]
96021    #[doc = "Month of the user's birth; 1-12"]
96022    #[allow(clippy::needless_lifetimes)]
96023    pub fn set_month<'a>(&'a mut self, month: i64) -> &'a mut Self {
96024        self.month = month;
96025        self
96026    }
96027    #[allow(rustdoc::invalid_html_tags)]
96028    #[doc = "Month of the user's birth; 1-12"]
96029    fn rhai_get_month(&mut self) -> i64 {
96030        self.month
96031    }
96032    #[allow(rustdoc::invalid_html_tags)]
96033    #[doc = "Optional. Year of the user's birth"]
96034    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96035    pub fn get_year<'a>(&'a self) -> Option<i64> {
96036        self.year.as_ref().map(|v| *v)
96037    }
96038    #[allow(rustdoc::invalid_html_tags)]
96039    #[doc = "Optional. Year of the user's birth"]
96040    #[allow(clippy::needless_lifetimes)]
96041    pub fn set_year<'a>(&'a mut self, year: Option<i64>) -> &'a mut Self {
96042        self.year = year;
96043        self
96044    }
96045    #[allow(rustdoc::invalid_html_tags)]
96046    #[doc = "Optional. Year of the user's birth"]
96047    fn rhai_get_year(&mut self) -> Option<i64> {
96048        self.year.as_ref().copied()
96049    }
96050}
96051#[allow(dead_code)]
96052impl TransactionPartnerTelegramAds {
96053    #[allow(clippy::too_many_arguments)]
96054    pub fn new() -> Self {
96055        Self {
96056            tg_type: "TransactionPartnerTelegramAds".to_owned(),
96057        }
96058    }
96059    #[allow(rustdoc::invalid_html_tags)]
96060    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
96061    #[allow(clippy::needless_lifetimes)]
96062    pub fn get_tg_type<'a>(&'a self) -> &'a str {
96063        self.tg_type.as_str()
96064    }
96065    #[allow(rustdoc::invalid_html_tags)]
96066    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
96067    #[allow(clippy::needless_lifetimes)]
96068    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
96069        self.tg_type = tg_type;
96070        self
96071    }
96072    #[allow(rustdoc::invalid_html_tags)]
96073    #[doc = "Type of the transaction partner, always \"telegram_ads\""]
96074    fn rhai_get_tg_type(&mut self) -> String {
96075        self.tg_type.clone()
96076    }
96077}
96078#[allow(dead_code)]
96079impl InlineQueryResultContact {
96080    #[allow(clippy::too_many_arguments)]
96081    pub fn new(id: String, phone_number: String, first_name: String) -> Self {
96082        Self {
96083            tg_type: "contact".to_owned(),
96084            id,
96085            phone_number,
96086            first_name,
96087            last_name: None,
96088            vcard: None,
96089            reply_markup: None,
96090            input_message_content: None,
96091            thumbnail_url: None,
96092            thumbnail_width: None,
96093            thumbnail_height: None,
96094        }
96095    }
96096    #[allow(rustdoc::invalid_html_tags)]
96097    #[doc = "Type of the result, must be contact"]
96098    #[allow(clippy::needless_lifetimes)]
96099    pub fn get_tg_type<'a>(&'a self) -> &'a str {
96100        self.tg_type.as_str()
96101    }
96102    #[allow(rustdoc::invalid_html_tags)]
96103    #[doc = "Type of the result, must be contact"]
96104    #[allow(clippy::needless_lifetimes)]
96105    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
96106        self.tg_type = tg_type;
96107        self
96108    }
96109    #[allow(rustdoc::invalid_html_tags)]
96110    #[doc = "Type of the result, must be contact"]
96111    fn rhai_get_tg_type(&mut self) -> String {
96112        self.tg_type.clone()
96113    }
96114    #[allow(rustdoc::invalid_html_tags)]
96115    #[doc = "Unique identifier for this result, 1-64 Bytes"]
96116    #[allow(clippy::needless_lifetimes)]
96117    pub fn get_id<'a>(&'a self) -> &'a str {
96118        self.id.as_str()
96119    }
96120    #[allow(rustdoc::invalid_html_tags)]
96121    #[doc = "Unique identifier for this result, 1-64 Bytes"]
96122    #[allow(clippy::needless_lifetimes)]
96123    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
96124        self.id = id;
96125        self
96126    }
96127    #[allow(rustdoc::invalid_html_tags)]
96128    #[doc = "Unique identifier for this result, 1-64 Bytes"]
96129    fn rhai_get_id(&mut self) -> String {
96130        self.id.clone()
96131    }
96132    #[allow(rustdoc::invalid_html_tags)]
96133    #[doc = "Contact's phone number"]
96134    #[allow(clippy::needless_lifetimes)]
96135    pub fn get_phone_number<'a>(&'a self) -> &'a str {
96136        self.phone_number.as_str()
96137    }
96138    #[allow(rustdoc::invalid_html_tags)]
96139    #[doc = "Contact's phone number"]
96140    #[allow(clippy::needless_lifetimes)]
96141    pub fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self {
96142        self.phone_number = phone_number;
96143        self
96144    }
96145    #[allow(rustdoc::invalid_html_tags)]
96146    #[doc = "Contact's phone number"]
96147    fn rhai_get_phone_number(&mut self) -> String {
96148        self.phone_number.clone()
96149    }
96150    #[allow(rustdoc::invalid_html_tags)]
96151    #[doc = "Contact's first name"]
96152    #[allow(clippy::needless_lifetimes)]
96153    pub fn get_first_name<'a>(&'a self) -> &'a str {
96154        self.first_name.as_str()
96155    }
96156    #[allow(rustdoc::invalid_html_tags)]
96157    #[doc = "Contact's first name"]
96158    #[allow(clippy::needless_lifetimes)]
96159    pub fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self {
96160        self.first_name = first_name;
96161        self
96162    }
96163    #[allow(rustdoc::invalid_html_tags)]
96164    #[doc = "Contact's first name"]
96165    fn rhai_get_first_name(&mut self) -> String {
96166        self.first_name.clone()
96167    }
96168    #[allow(rustdoc::invalid_html_tags)]
96169    #[doc = "Optional. Contact's last name"]
96170    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96171    pub fn get_last_name<'a>(&'a self) -> Option<&'a str> {
96172        self.last_name.as_ref().map(|v| v.as_str())
96173    }
96174    #[allow(rustdoc::invalid_html_tags)]
96175    #[doc = "Optional. Contact's last name"]
96176    #[allow(clippy::needless_lifetimes)]
96177    pub fn set_last_name<'a>(&'a mut self, last_name: Option<String>) -> &'a mut Self {
96178        self.last_name = last_name;
96179        self
96180    }
96181    #[allow(rustdoc::invalid_html_tags)]
96182    #[doc = "Optional. Contact's last name"]
96183    fn rhai_get_last_name(&mut self) -> Option<String> {
96184        self.last_name.as_ref().cloned()
96185    }
96186    #[allow(rustdoc::invalid_html_tags)]
96187    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
96188    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96189    pub fn get_vcard<'a>(&'a self) -> Option<&'a str> {
96190        self.vcard.as_ref().map(|v| v.as_str())
96191    }
96192    #[allow(rustdoc::invalid_html_tags)]
96193    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
96194    #[allow(clippy::needless_lifetimes)]
96195    pub fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self {
96196        self.vcard = vcard;
96197        self
96198    }
96199    #[allow(rustdoc::invalid_html_tags)]
96200    #[doc = "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes"]
96201    fn rhai_get_vcard(&mut self) -> Option<String> {
96202        self.vcard.as_ref().cloned()
96203    }
96204    #[allow(rustdoc::invalid_html_tags)]
96205    #[doc = "Optional. Inline keyboard attached to the message"]
96206    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96207    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
96208        self.reply_markup.as_ref().map(|v| v.inner_ref())
96209    }
96210    #[allow(rustdoc::invalid_html_tags)]
96211    #[doc = "Optional. Inline keyboard attached to the message"]
96212    #[allow(clippy::needless_lifetimes)]
96213    pub fn set_reply_markup<'a>(
96214        &'a mut self,
96215        reply_markup: Option<InlineKeyboardMarkup>,
96216    ) -> &'a mut Self {
96217        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
96218        self
96219    }
96220    #[allow(rustdoc::invalid_html_tags)]
96221    #[doc = "Optional. Inline keyboard attached to the message"]
96222    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
96223        self.reply_markup.as_ref().map(|v| v.clone().into())
96224    }
96225    #[allow(rustdoc::invalid_html_tags)]
96226    #[doc = "Optional. Content of the message to be sent instead of the contact"]
96227    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96228    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
96229        self.input_message_content.as_ref().map(|v| v.inner_ref())
96230    }
96231    #[allow(rustdoc::invalid_html_tags)]
96232    #[doc = "Optional. Content of the message to be sent instead of the contact"]
96233    #[allow(clippy::needless_lifetimes)]
96234    pub fn set_input_message_content<'a>(
96235        &'a mut self,
96236        input_message_content: Option<InputMessageContent>,
96237    ) -> &'a mut Self {
96238        self.input_message_content = input_message_content
96239            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
96240        self
96241    }
96242    #[allow(rustdoc::invalid_html_tags)]
96243    #[doc = "Optional. Content of the message to be sent instead of the contact"]
96244    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
96245        self.input_message_content
96246            .as_ref()
96247            .map(|v| v.clone().into())
96248    }
96249    #[allow(rustdoc::invalid_html_tags)]
96250    #[doc = "Optional. Url of the thumbnail for the result"]
96251    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96252    pub fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str> {
96253        self.thumbnail_url.as_ref().map(|v| v.as_str())
96254    }
96255    #[allow(rustdoc::invalid_html_tags)]
96256    #[doc = "Optional. Url of the thumbnail for the result"]
96257    #[allow(clippy::needless_lifetimes)]
96258    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: Option<String>) -> &'a mut Self {
96259        self.thumbnail_url = thumbnail_url;
96260        self
96261    }
96262    #[allow(rustdoc::invalid_html_tags)]
96263    #[doc = "Optional. Url of the thumbnail for the result"]
96264    fn rhai_get_thumbnail_url(&mut self) -> Option<String> {
96265        self.thumbnail_url.as_ref().cloned()
96266    }
96267    #[allow(rustdoc::invalid_html_tags)]
96268    #[doc = "Optional. Thumbnail width"]
96269    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96270    pub fn get_thumbnail_width<'a>(&'a self) -> Option<i64> {
96271        self.thumbnail_width.as_ref().map(|v| *v)
96272    }
96273    #[allow(rustdoc::invalid_html_tags)]
96274    #[doc = "Optional. Thumbnail width"]
96275    #[allow(clippy::needless_lifetimes)]
96276    pub fn set_thumbnail_width<'a>(&'a mut self, thumbnail_width: Option<i64>) -> &'a mut Self {
96277        self.thumbnail_width = thumbnail_width;
96278        self
96279    }
96280    #[allow(rustdoc::invalid_html_tags)]
96281    #[doc = "Optional. Thumbnail width"]
96282    fn rhai_get_thumbnail_width(&mut self) -> Option<i64> {
96283        self.thumbnail_width.as_ref().copied()
96284    }
96285    #[allow(rustdoc::invalid_html_tags)]
96286    #[doc = "Optional. Thumbnail height"]
96287    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96288    pub fn get_thumbnail_height<'a>(&'a self) -> Option<i64> {
96289        self.thumbnail_height.as_ref().map(|v| *v)
96290    }
96291    #[allow(rustdoc::invalid_html_tags)]
96292    #[doc = "Optional. Thumbnail height"]
96293    #[allow(clippy::needless_lifetimes)]
96294    pub fn set_thumbnail_height<'a>(&'a mut self, thumbnail_height: Option<i64>) -> &'a mut Self {
96295        self.thumbnail_height = thumbnail_height;
96296        self
96297    }
96298    #[allow(rustdoc::invalid_html_tags)]
96299    #[doc = "Optional. Thumbnail height"]
96300    fn rhai_get_thumbnail_height(&mut self) -> Option<i64> {
96301        self.thumbnail_height.as_ref().copied()
96302    }
96303}
96304#[allow(dead_code)]
96305impl ChatMemberRestricted {
96306    #[allow(clippy::too_many_arguments)]
96307    pub fn new<A: Into<User>>(
96308        user: A,
96309        is_member: bool,
96310        can_send_messages: bool,
96311        can_send_audios: bool,
96312        can_send_documents: bool,
96313        can_send_photos: bool,
96314        can_send_videos: bool,
96315        can_send_video_notes: bool,
96316        can_send_voice_notes: bool,
96317        can_send_polls: bool,
96318        can_send_other_messages: bool,
96319        can_add_web_page_previews: bool,
96320        can_change_info: bool,
96321        can_invite_users: bool,
96322        can_pin_messages: bool,
96323        can_manage_topics: bool,
96324        until_date: i64,
96325    ) -> Self {
96326        Self {
96327            user: BoxWrapper::new_unbox(user.into()),
96328            is_member,
96329            can_send_messages,
96330            can_send_audios,
96331            can_send_documents,
96332            can_send_photos,
96333            can_send_videos,
96334            can_send_video_notes,
96335            can_send_voice_notes,
96336            can_send_polls,
96337            can_send_other_messages,
96338            can_add_web_page_previews,
96339            can_change_info,
96340            can_invite_users,
96341            can_pin_messages,
96342            can_manage_topics,
96343            until_date,
96344        }
96345    }
96346    #[allow(rustdoc::invalid_html_tags)]
96347    #[doc = "Information about the user"]
96348    #[allow(clippy::needless_lifetimes)]
96349    pub fn get_user<'a>(&'a self) -> &'a User {
96350        &self.user
96351    }
96352    #[allow(rustdoc::invalid_html_tags)]
96353    #[doc = "Information about the user"]
96354    #[allow(clippy::needless_lifetimes)]
96355    pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self {
96356        self.user = BoxWrapper(Unbox(user));
96357        self
96358    }
96359    #[allow(rustdoc::invalid_html_tags)]
96360    #[doc = "Information about the user"]
96361    fn rhai_get_user(&mut self) -> User {
96362        self.user.clone().into()
96363    }
96364    #[allow(rustdoc::invalid_html_tags)]
96365    #[doc = "True, if the user is a member of the chat at the moment of the request"]
96366    #[allow(clippy::needless_lifetimes)]
96367    pub fn get_is_member<'a>(&'a self) -> bool {
96368        self.is_member
96369    }
96370    #[allow(rustdoc::invalid_html_tags)]
96371    #[doc = "True, if the user is a member of the chat at the moment of the request"]
96372    #[allow(clippy::needless_lifetimes)]
96373    pub fn set_is_member<'a>(&'a mut self, is_member: bool) -> &'a mut Self {
96374        self.is_member = is_member;
96375        self
96376    }
96377    #[allow(rustdoc::invalid_html_tags)]
96378    #[doc = "True, if the user is a member of the chat at the moment of the request"]
96379    fn rhai_get_is_member(&mut self) -> bool {
96380        self.is_member
96381    }
96382    #[allow(rustdoc::invalid_html_tags)]
96383    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
96384    #[allow(clippy::needless_lifetimes)]
96385    pub fn get_can_send_messages<'a>(&'a self) -> bool {
96386        self.can_send_messages
96387    }
96388    #[allow(rustdoc::invalid_html_tags)]
96389    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
96390    #[allow(clippy::needless_lifetimes)]
96391    pub fn set_can_send_messages<'a>(&'a mut self, can_send_messages: bool) -> &'a mut Self {
96392        self.can_send_messages = can_send_messages;
96393        self
96394    }
96395    #[allow(rustdoc::invalid_html_tags)]
96396    #[doc = "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues"]
96397    fn rhai_get_can_send_messages(&mut self) -> bool {
96398        self.can_send_messages
96399    }
96400    #[allow(rustdoc::invalid_html_tags)]
96401    #[doc = "True, if the user is allowed to send audios"]
96402    #[allow(clippy::needless_lifetimes)]
96403    pub fn get_can_send_audios<'a>(&'a self) -> bool {
96404        self.can_send_audios
96405    }
96406    #[allow(rustdoc::invalid_html_tags)]
96407    #[doc = "True, if the user is allowed to send audios"]
96408    #[allow(clippy::needless_lifetimes)]
96409    pub fn set_can_send_audios<'a>(&'a mut self, can_send_audios: bool) -> &'a mut Self {
96410        self.can_send_audios = can_send_audios;
96411        self
96412    }
96413    #[allow(rustdoc::invalid_html_tags)]
96414    #[doc = "True, if the user is allowed to send audios"]
96415    fn rhai_get_can_send_audios(&mut self) -> bool {
96416        self.can_send_audios
96417    }
96418    #[allow(rustdoc::invalid_html_tags)]
96419    #[doc = "True, if the user is allowed to send documents"]
96420    #[allow(clippy::needless_lifetimes)]
96421    pub fn get_can_send_documents<'a>(&'a self) -> bool {
96422        self.can_send_documents
96423    }
96424    #[allow(rustdoc::invalid_html_tags)]
96425    #[doc = "True, if the user is allowed to send documents"]
96426    #[allow(clippy::needless_lifetimes)]
96427    pub fn set_can_send_documents<'a>(&'a mut self, can_send_documents: bool) -> &'a mut Self {
96428        self.can_send_documents = can_send_documents;
96429        self
96430    }
96431    #[allow(rustdoc::invalid_html_tags)]
96432    #[doc = "True, if the user is allowed to send documents"]
96433    fn rhai_get_can_send_documents(&mut self) -> bool {
96434        self.can_send_documents
96435    }
96436    #[allow(rustdoc::invalid_html_tags)]
96437    #[doc = "True, if the user is allowed to send photos"]
96438    #[allow(clippy::needless_lifetimes)]
96439    pub fn get_can_send_photos<'a>(&'a self) -> bool {
96440        self.can_send_photos
96441    }
96442    #[allow(rustdoc::invalid_html_tags)]
96443    #[doc = "True, if the user is allowed to send photos"]
96444    #[allow(clippy::needless_lifetimes)]
96445    pub fn set_can_send_photos<'a>(&'a mut self, can_send_photos: bool) -> &'a mut Self {
96446        self.can_send_photos = can_send_photos;
96447        self
96448    }
96449    #[allow(rustdoc::invalid_html_tags)]
96450    #[doc = "True, if the user is allowed to send photos"]
96451    fn rhai_get_can_send_photos(&mut self) -> bool {
96452        self.can_send_photos
96453    }
96454    #[allow(rustdoc::invalid_html_tags)]
96455    #[doc = "True, if the user is allowed to send videos"]
96456    #[allow(clippy::needless_lifetimes)]
96457    pub fn get_can_send_videos<'a>(&'a self) -> bool {
96458        self.can_send_videos
96459    }
96460    #[allow(rustdoc::invalid_html_tags)]
96461    #[doc = "True, if the user is allowed to send videos"]
96462    #[allow(clippy::needless_lifetimes)]
96463    pub fn set_can_send_videos<'a>(&'a mut self, can_send_videos: bool) -> &'a mut Self {
96464        self.can_send_videos = can_send_videos;
96465        self
96466    }
96467    #[allow(rustdoc::invalid_html_tags)]
96468    #[doc = "True, if the user is allowed to send videos"]
96469    fn rhai_get_can_send_videos(&mut self) -> bool {
96470        self.can_send_videos
96471    }
96472    #[allow(rustdoc::invalid_html_tags)]
96473    #[doc = "True, if the user is allowed to send video notes"]
96474    #[allow(clippy::needless_lifetimes)]
96475    pub fn get_can_send_video_notes<'a>(&'a self) -> bool {
96476        self.can_send_video_notes
96477    }
96478    #[allow(rustdoc::invalid_html_tags)]
96479    #[doc = "True, if the user is allowed to send video notes"]
96480    #[allow(clippy::needless_lifetimes)]
96481    pub fn set_can_send_video_notes<'a>(&'a mut self, can_send_video_notes: bool) -> &'a mut Self {
96482        self.can_send_video_notes = can_send_video_notes;
96483        self
96484    }
96485    #[allow(rustdoc::invalid_html_tags)]
96486    #[doc = "True, if the user is allowed to send video notes"]
96487    fn rhai_get_can_send_video_notes(&mut self) -> bool {
96488        self.can_send_video_notes
96489    }
96490    #[allow(rustdoc::invalid_html_tags)]
96491    #[doc = "True, if the user is allowed to send voice notes"]
96492    #[allow(clippy::needless_lifetimes)]
96493    pub fn get_can_send_voice_notes<'a>(&'a self) -> bool {
96494        self.can_send_voice_notes
96495    }
96496    #[allow(rustdoc::invalid_html_tags)]
96497    #[doc = "True, if the user is allowed to send voice notes"]
96498    #[allow(clippy::needless_lifetimes)]
96499    pub fn set_can_send_voice_notes<'a>(&'a mut self, can_send_voice_notes: bool) -> &'a mut Self {
96500        self.can_send_voice_notes = can_send_voice_notes;
96501        self
96502    }
96503    #[allow(rustdoc::invalid_html_tags)]
96504    #[doc = "True, if the user is allowed to send voice notes"]
96505    fn rhai_get_can_send_voice_notes(&mut self) -> bool {
96506        self.can_send_voice_notes
96507    }
96508    #[allow(rustdoc::invalid_html_tags)]
96509    #[doc = "True, if the user is allowed to send polls and checklists"]
96510    #[allow(clippy::needless_lifetimes)]
96511    pub fn get_can_send_polls<'a>(&'a self) -> bool {
96512        self.can_send_polls
96513    }
96514    #[allow(rustdoc::invalid_html_tags)]
96515    #[doc = "True, if the user is allowed to send polls and checklists"]
96516    #[allow(clippy::needless_lifetimes)]
96517    pub fn set_can_send_polls<'a>(&'a mut self, can_send_polls: bool) -> &'a mut Self {
96518        self.can_send_polls = can_send_polls;
96519        self
96520    }
96521    #[allow(rustdoc::invalid_html_tags)]
96522    #[doc = "True, if the user is allowed to send polls and checklists"]
96523    fn rhai_get_can_send_polls(&mut self) -> bool {
96524        self.can_send_polls
96525    }
96526    #[allow(rustdoc::invalid_html_tags)]
96527    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
96528    #[allow(clippy::needless_lifetimes)]
96529    pub fn get_can_send_other_messages<'a>(&'a self) -> bool {
96530        self.can_send_other_messages
96531    }
96532    #[allow(rustdoc::invalid_html_tags)]
96533    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
96534    #[allow(clippy::needless_lifetimes)]
96535    pub fn set_can_send_other_messages<'a>(
96536        &'a mut self,
96537        can_send_other_messages: bool,
96538    ) -> &'a mut Self {
96539        self.can_send_other_messages = can_send_other_messages;
96540        self
96541    }
96542    #[allow(rustdoc::invalid_html_tags)]
96543    #[doc = "True, if the user is allowed to send animations, games, stickers and use inline bots"]
96544    fn rhai_get_can_send_other_messages(&mut self) -> bool {
96545        self.can_send_other_messages
96546    }
96547    #[allow(rustdoc::invalid_html_tags)]
96548    #[doc = "True, if the user is allowed to add web page previews to their messages"]
96549    #[allow(clippy::needless_lifetimes)]
96550    pub fn get_can_add_web_page_previews<'a>(&'a self) -> bool {
96551        self.can_add_web_page_previews
96552    }
96553    #[allow(rustdoc::invalid_html_tags)]
96554    #[doc = "True, if the user is allowed to add web page previews to their messages"]
96555    #[allow(clippy::needless_lifetimes)]
96556    pub fn set_can_add_web_page_previews<'a>(
96557        &'a mut self,
96558        can_add_web_page_previews: bool,
96559    ) -> &'a mut Self {
96560        self.can_add_web_page_previews = can_add_web_page_previews;
96561        self
96562    }
96563    #[allow(rustdoc::invalid_html_tags)]
96564    #[doc = "True, if the user is allowed to add web page previews to their messages"]
96565    fn rhai_get_can_add_web_page_previews(&mut self) -> bool {
96566        self.can_add_web_page_previews
96567    }
96568    #[allow(rustdoc::invalid_html_tags)]
96569    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
96570    #[allow(clippy::needless_lifetimes)]
96571    pub fn get_can_change_info<'a>(&'a self) -> bool {
96572        self.can_change_info
96573    }
96574    #[allow(rustdoc::invalid_html_tags)]
96575    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
96576    #[allow(clippy::needless_lifetimes)]
96577    pub fn set_can_change_info<'a>(&'a mut self, can_change_info: bool) -> &'a mut Self {
96578        self.can_change_info = can_change_info;
96579        self
96580    }
96581    #[allow(rustdoc::invalid_html_tags)]
96582    #[doc = "True, if the user is allowed to change the chat title, photo and other settings"]
96583    fn rhai_get_can_change_info(&mut self) -> bool {
96584        self.can_change_info
96585    }
96586    #[allow(rustdoc::invalid_html_tags)]
96587    #[doc = "True, if the user is allowed to invite new users to the chat"]
96588    #[allow(clippy::needless_lifetimes)]
96589    pub fn get_can_invite_users<'a>(&'a self) -> bool {
96590        self.can_invite_users
96591    }
96592    #[allow(rustdoc::invalid_html_tags)]
96593    #[doc = "True, if the user is allowed to invite new users to the chat"]
96594    #[allow(clippy::needless_lifetimes)]
96595    pub fn set_can_invite_users<'a>(&'a mut self, can_invite_users: bool) -> &'a mut Self {
96596        self.can_invite_users = can_invite_users;
96597        self
96598    }
96599    #[allow(rustdoc::invalid_html_tags)]
96600    #[doc = "True, if the user is allowed to invite new users to the chat"]
96601    fn rhai_get_can_invite_users(&mut self) -> bool {
96602        self.can_invite_users
96603    }
96604    #[allow(rustdoc::invalid_html_tags)]
96605    #[doc = "True, if the user is allowed to pin messages"]
96606    #[allow(clippy::needless_lifetimes)]
96607    pub fn get_can_pin_messages<'a>(&'a self) -> bool {
96608        self.can_pin_messages
96609    }
96610    #[allow(rustdoc::invalid_html_tags)]
96611    #[doc = "True, if the user is allowed to pin messages"]
96612    #[allow(clippy::needless_lifetimes)]
96613    pub fn set_can_pin_messages<'a>(&'a mut self, can_pin_messages: bool) -> &'a mut Self {
96614        self.can_pin_messages = can_pin_messages;
96615        self
96616    }
96617    #[allow(rustdoc::invalid_html_tags)]
96618    #[doc = "True, if the user is allowed to pin messages"]
96619    fn rhai_get_can_pin_messages(&mut self) -> bool {
96620        self.can_pin_messages
96621    }
96622    #[allow(rustdoc::invalid_html_tags)]
96623    #[doc = "True, if the user is allowed to create forum topics"]
96624    #[allow(clippy::needless_lifetimes)]
96625    pub fn get_can_manage_topics<'a>(&'a self) -> bool {
96626        self.can_manage_topics
96627    }
96628    #[allow(rustdoc::invalid_html_tags)]
96629    #[doc = "True, if the user is allowed to create forum topics"]
96630    #[allow(clippy::needless_lifetimes)]
96631    pub fn set_can_manage_topics<'a>(&'a mut self, can_manage_topics: bool) -> &'a mut Self {
96632        self.can_manage_topics = can_manage_topics;
96633        self
96634    }
96635    #[allow(rustdoc::invalid_html_tags)]
96636    #[doc = "True, if the user is allowed to create forum topics"]
96637    fn rhai_get_can_manage_topics(&mut self) -> bool {
96638        self.can_manage_topics
96639    }
96640    #[allow(rustdoc::invalid_html_tags)]
96641    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
96642    #[allow(clippy::needless_lifetimes)]
96643    pub fn get_until_date<'a>(&'a self) -> i64 {
96644        self.until_date
96645    }
96646    #[allow(rustdoc::invalid_html_tags)]
96647    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
96648    #[allow(clippy::needless_lifetimes)]
96649    pub fn set_until_date<'a>(&'a mut self, until_date: i64) -> &'a mut Self {
96650        self.until_date = until_date;
96651        self
96652    }
96653    #[allow(rustdoc::invalid_html_tags)]
96654    #[doc = "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"]
96655    fn rhai_get_until_date(&mut self) -> i64 {
96656        self.until_date
96657    }
96658}
96659#[allow(dead_code)]
96660impl LinkPreviewOptions {
96661    #[allow(clippy::too_many_arguments)]
96662    pub fn new() -> Self {
96663        Self {
96664            is_disabled: None,
96665            url: None,
96666            prefer_small_media: None,
96667            prefer_large_media: None,
96668            show_above_text: None,
96669        }
96670    }
96671    #[allow(rustdoc::invalid_html_tags)]
96672    #[doc = "Optional. True, if the link preview is disabled"]
96673    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96674    pub fn get_is_disabled<'a>(&'a self) -> Option<bool> {
96675        self.is_disabled.as_ref().map(|v| *v)
96676    }
96677    #[allow(rustdoc::invalid_html_tags)]
96678    #[doc = "Optional. True, if the link preview is disabled"]
96679    #[allow(clippy::needless_lifetimes)]
96680    pub fn set_is_disabled<'a>(&'a mut self, is_disabled: Option<bool>) -> &'a mut Self {
96681        self.is_disabled = is_disabled;
96682        self
96683    }
96684    #[allow(rustdoc::invalid_html_tags)]
96685    #[doc = "Optional. True, if the link preview is disabled"]
96686    fn rhai_get_is_disabled(&mut self) -> Option<bool> {
96687        self.is_disabled.as_ref().copied()
96688    }
96689    #[allow(rustdoc::invalid_html_tags)]
96690    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
96691    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96692    pub fn get_url<'a>(&'a self) -> Option<&'a str> {
96693        self.url.as_ref().map(|v| v.as_str())
96694    }
96695    #[allow(rustdoc::invalid_html_tags)]
96696    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
96697    #[allow(clippy::needless_lifetimes)]
96698    pub fn set_url<'a>(&'a mut self, url: Option<String>) -> &'a mut Self {
96699        self.url = url;
96700        self
96701    }
96702    #[allow(rustdoc::invalid_html_tags)]
96703    #[doc = "Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used"]
96704    fn rhai_get_url(&mut self) -> Option<String> {
96705        self.url.as_ref().cloned()
96706    }
96707    #[allow(rustdoc::invalid_html_tags)]
96708    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
96709    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96710    pub fn get_prefer_small_media<'a>(&'a self) -> Option<bool> {
96711        self.prefer_small_media.as_ref().map(|v| *v)
96712    }
96713    #[allow(rustdoc::invalid_html_tags)]
96714    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
96715    #[allow(clippy::needless_lifetimes)]
96716    pub fn set_prefer_small_media<'a>(
96717        &'a mut self,
96718        prefer_small_media: Option<bool>,
96719    ) -> &'a mut Self {
96720        self.prefer_small_media = prefer_small_media;
96721        self
96722    }
96723    #[allow(rustdoc::invalid_html_tags)]
96724    #[doc = "Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
96725    fn rhai_get_prefer_small_media(&mut self) -> Option<bool> {
96726        self.prefer_small_media.as_ref().copied()
96727    }
96728    #[allow(rustdoc::invalid_html_tags)]
96729    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
96730    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96731    pub fn get_prefer_large_media<'a>(&'a self) -> Option<bool> {
96732        self.prefer_large_media.as_ref().map(|v| *v)
96733    }
96734    #[allow(rustdoc::invalid_html_tags)]
96735    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
96736    #[allow(clippy::needless_lifetimes)]
96737    pub fn set_prefer_large_media<'a>(
96738        &'a mut self,
96739        prefer_large_media: Option<bool>,
96740    ) -> &'a mut Self {
96741        self.prefer_large_media = prefer_large_media;
96742        self
96743    }
96744    #[allow(rustdoc::invalid_html_tags)]
96745    #[doc = "Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview"]
96746    fn rhai_get_prefer_large_media(&mut self) -> Option<bool> {
96747        self.prefer_large_media.as_ref().copied()
96748    }
96749    #[allow(rustdoc::invalid_html_tags)]
96750    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
96751    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96752    pub fn get_show_above_text<'a>(&'a self) -> Option<bool> {
96753        self.show_above_text.as_ref().map(|v| *v)
96754    }
96755    #[allow(rustdoc::invalid_html_tags)]
96756    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
96757    #[allow(clippy::needless_lifetimes)]
96758    pub fn set_show_above_text<'a>(&'a mut self, show_above_text: Option<bool>) -> &'a mut Self {
96759        self.show_above_text = show_above_text;
96760        self
96761    }
96762    #[allow(rustdoc::invalid_html_tags)]
96763    #[doc = "Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text"]
96764    fn rhai_get_show_above_text(&mut self) -> Option<bool> {
96765        self.show_above_text.as_ref().copied()
96766    }
96767}
96768#[allow(dead_code)]
96769impl PreparedInlineMessage {
96770    #[allow(clippy::too_many_arguments)]
96771    pub fn new(id: String, expiration_date: i64) -> Self {
96772        Self {
96773            id,
96774            expiration_date,
96775        }
96776    }
96777    #[allow(rustdoc::invalid_html_tags)]
96778    #[doc = "Unique identifier of the prepared message"]
96779    #[allow(clippy::needless_lifetimes)]
96780    pub fn get_id<'a>(&'a self) -> &'a str {
96781        self.id.as_str()
96782    }
96783    #[allow(rustdoc::invalid_html_tags)]
96784    #[doc = "Unique identifier of the prepared message"]
96785    #[allow(clippy::needless_lifetimes)]
96786    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
96787        self.id = id;
96788        self
96789    }
96790    #[allow(rustdoc::invalid_html_tags)]
96791    #[doc = "Unique identifier of the prepared message"]
96792    fn rhai_get_id(&mut self) -> String {
96793        self.id.clone()
96794    }
96795    #[allow(rustdoc::invalid_html_tags)]
96796    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
96797    #[allow(clippy::needless_lifetimes)]
96798    pub fn get_expiration_date<'a>(&'a self) -> i64 {
96799        self.expiration_date
96800    }
96801    #[allow(rustdoc::invalid_html_tags)]
96802    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
96803    #[allow(clippy::needless_lifetimes)]
96804    pub fn set_expiration_date<'a>(&'a mut self, expiration_date: i64) -> &'a mut Self {
96805        self.expiration_date = expiration_date;
96806        self
96807    }
96808    #[allow(rustdoc::invalid_html_tags)]
96809    #[doc = "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used"]
96810    fn rhai_get_expiration_date(&mut self) -> i64 {
96811        self.expiration_date
96812    }
96813}
96814#[allow(dead_code)]
96815impl TextQuote {
96816    #[allow(clippy::too_many_arguments)]
96817    pub fn new(text: String, position: i64) -> Self {
96818        Self {
96819            text,
96820            position,
96821            entities: None,
96822            is_manual: None,
96823        }
96824    }
96825    #[allow(rustdoc::invalid_html_tags)]
96826    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
96827    #[allow(clippy::needless_lifetimes)]
96828    pub fn get_text<'a>(&'a self) -> &'a str {
96829        self.text.as_str()
96830    }
96831    #[allow(rustdoc::invalid_html_tags)]
96832    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
96833    #[allow(clippy::needless_lifetimes)]
96834    pub fn set_text<'a>(&'a mut self, text: String) -> &'a mut Self {
96835        self.text = text;
96836        self
96837    }
96838    #[allow(rustdoc::invalid_html_tags)]
96839    #[doc = "Text of the quoted part of a message that is replied to by the given message"]
96840    fn rhai_get_text(&mut self) -> String {
96841        self.text.clone()
96842    }
96843    #[allow(rustdoc::invalid_html_tags)]
96844    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
96845    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96846    pub fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
96847        self.entities.as_ref()
96848    }
96849    #[allow(rustdoc::invalid_html_tags)]
96850    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
96851    #[allow(clippy::needless_lifetimes)]
96852    pub fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
96853        self.entities = entities;
96854        self
96855    }
96856    #[allow(rustdoc::invalid_html_tags)]
96857    #[doc = "Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes."]
96858    fn rhai_get_entities(&mut self) -> Option<Vec<MessageEntity>> {
96859        self.entities.as_ref().cloned()
96860    }
96861    #[allow(rustdoc::invalid_html_tags)]
96862    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
96863    #[allow(clippy::needless_lifetimes)]
96864    pub fn get_position<'a>(&'a self) -> i64 {
96865        self.position
96866    }
96867    #[allow(rustdoc::invalid_html_tags)]
96868    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
96869    #[allow(clippy::needless_lifetimes)]
96870    pub fn set_position<'a>(&'a mut self, position: i64) -> &'a mut Self {
96871        self.position = position;
96872        self
96873    }
96874    #[allow(rustdoc::invalid_html_tags)]
96875    #[doc = "Approximate quote position in the original message in UTF-16 code units as specified by the sender"]
96876    fn rhai_get_position(&mut self) -> i64 {
96877        self.position
96878    }
96879    #[allow(rustdoc::invalid_html_tags)]
96880    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
96881    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96882    pub fn get_is_manual<'a>(&'a self) -> Option<bool> {
96883        self.is_manual.as_ref().map(|v| *v)
96884    }
96885    #[allow(rustdoc::invalid_html_tags)]
96886    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
96887    #[allow(clippy::needless_lifetimes)]
96888    pub fn set_is_manual<'a>(&'a mut self, is_manual: Option<bool>) -> &'a mut Self {
96889        self.is_manual = is_manual;
96890        self
96891    }
96892    #[allow(rustdoc::invalid_html_tags)]
96893    #[doc = "Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server."]
96894    fn rhai_get_is_manual(&mut self) -> Option<bool> {
96895        self.is_manual.as_ref().copied()
96896    }
96897}
96898#[allow(dead_code)]
96899impl ChecklistTasksDone {
96900    #[allow(clippy::too_many_arguments)]
96901    pub fn new() -> Self {
96902        Self {
96903            checklist_message: None,
96904            marked_as_done_task_ids: None,
96905            marked_as_not_done_task_ids: None,
96906        }
96907    }
96908    #[allow(rustdoc::invalid_html_tags)]
96909    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
96910    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96911    pub fn get_checklist_message<'a>(&'a self) -> Option<&'a Message> {
96912        self.checklist_message.as_ref().map(|v| v.inner_ref())
96913    }
96914    #[allow(rustdoc::invalid_html_tags)]
96915    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
96916    #[allow(clippy::needless_lifetimes)]
96917    pub fn set_checklist_message<'a>(
96918        &'a mut self,
96919        checklist_message: Option<Message>,
96920    ) -> &'a mut Self {
96921        self.checklist_message =
96922            checklist_message.map(|checklist_message| BoxWrapper(Unbox(checklist_message)));
96923        self
96924    }
96925    #[allow(rustdoc::invalid_html_tags)]
96926    #[doc = "Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply."]
96927    fn rhai_get_checklist_message(&mut self) -> Option<Message> {
96928        self.checklist_message.as_ref().map(|v| v.clone().into())
96929    }
96930    #[allow(rustdoc::invalid_html_tags)]
96931    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
96932    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96933    pub fn get_marked_as_done_task_ids<'a>(&'a self) -> Option<&'a Vec<i64>> {
96934        self.marked_as_done_task_ids.as_ref()
96935    }
96936    #[allow(rustdoc::invalid_html_tags)]
96937    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
96938    #[allow(clippy::needless_lifetimes)]
96939    pub fn set_marked_as_done_task_ids<'a>(
96940        &'a mut self,
96941        marked_as_done_task_ids: Option<Vec<i64>>,
96942    ) -> &'a mut Self {
96943        self.marked_as_done_task_ids = marked_as_done_task_ids;
96944        self
96945    }
96946    #[allow(rustdoc::invalid_html_tags)]
96947    #[doc = "Optional. Identifiers of the tasks that were marked as done"]
96948    fn rhai_get_marked_as_done_task_ids(&mut self) -> Option<Vec<i64>> {
96949        self.marked_as_done_task_ids.as_ref().cloned()
96950    }
96951    #[allow(rustdoc::invalid_html_tags)]
96952    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
96953    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
96954    pub fn get_marked_as_not_done_task_ids<'a>(&'a self) -> Option<&'a Vec<i64>> {
96955        self.marked_as_not_done_task_ids.as_ref()
96956    }
96957    #[allow(rustdoc::invalid_html_tags)]
96958    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
96959    #[allow(clippy::needless_lifetimes)]
96960    pub fn set_marked_as_not_done_task_ids<'a>(
96961        &'a mut self,
96962        marked_as_not_done_task_ids: Option<Vec<i64>>,
96963    ) -> &'a mut Self {
96964        self.marked_as_not_done_task_ids = marked_as_not_done_task_ids;
96965        self
96966    }
96967    #[allow(rustdoc::invalid_html_tags)]
96968    #[doc = "Optional. Identifiers of the tasks that were marked as not done"]
96969    fn rhai_get_marked_as_not_done_task_ids(&mut self) -> Option<Vec<i64>> {
96970        self.marked_as_not_done_task_ids.as_ref().cloned()
96971    }
96972}
96973#[allow(dead_code)]
96974impl InputStoryContentVideo {
96975    #[allow(clippy::too_many_arguments)]
96976    pub fn new(video: String) -> Self {
96977        Self {
96978            tg_type: "video".to_owned(),
96979            video,
96980            duration: None,
96981            cover_frame_timestamp: None,
96982            is_animation: None,
96983        }
96984    }
96985    #[allow(rustdoc::invalid_html_tags)]
96986    #[doc = "Type of the content, must be video"]
96987    #[allow(clippy::needless_lifetimes)]
96988    pub fn get_tg_type<'a>(&'a self) -> &'a str {
96989        self.tg_type.as_str()
96990    }
96991    #[allow(rustdoc::invalid_html_tags)]
96992    #[doc = "Type of the content, must be video"]
96993    #[allow(clippy::needless_lifetimes)]
96994    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
96995        self.tg_type = tg_type;
96996        self
96997    }
96998    #[allow(rustdoc::invalid_html_tags)]
96999    #[doc = "Type of the content, must be video"]
97000    fn rhai_get_tg_type(&mut self) -> String {
97001        self.tg_type.clone()
97002    }
97003    #[allow(rustdoc::invalid_html_tags)]
97004    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
97005    #[allow(clippy::needless_lifetimes)]
97006    pub fn get_video<'a>(&'a self) -> &'a str {
97007        self.video.as_str()
97008    }
97009    #[allow(rustdoc::invalid_html_tags)]
97010    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
97011    #[allow(clippy::needless_lifetimes)]
97012    pub fn set_video<'a>(&'a mut self, video: String) -> &'a mut Self {
97013        self.video = video;
97014        self
97015    }
97016    #[allow(rustdoc::invalid_html_tags)]
97017    #[doc = "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
97018    fn rhai_get_video(&mut self) -> String {
97019        self.video.clone()
97020    }
97021    #[allow(rustdoc::invalid_html_tags)]
97022    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
97023    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97024    pub fn get_duration<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
97025        self.duration.as_ref().map(|v| *v)
97026    }
97027    #[allow(rustdoc::invalid_html_tags)]
97028    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
97029    #[allow(clippy::needless_lifetimes)]
97030    pub fn set_duration<'a>(
97031        &'a mut self,
97032        duration: Option<::ordered_float::OrderedFloat<f64>>,
97033    ) -> &'a mut Self {
97034        self.duration = duration;
97035        self
97036    }
97037    #[allow(rustdoc::invalid_html_tags)]
97038    #[doc = "Optional. Precise duration of the video in seconds; 0-60"]
97039    fn rhai_get_duration(&mut self) -> Option<::ordered_float::OrderedFloat<f64>> {
97040        self.duration.as_ref().copied()
97041    }
97042    #[allow(rustdoc::invalid_html_tags)]
97043    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
97044    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97045    pub fn get_cover_frame_timestamp<'a>(&'a self) -> Option<::ordered_float::OrderedFloat<f64>> {
97046        self.cover_frame_timestamp.as_ref().map(|v| *v)
97047    }
97048    #[allow(rustdoc::invalid_html_tags)]
97049    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
97050    #[allow(clippy::needless_lifetimes)]
97051    pub fn set_cover_frame_timestamp<'a>(
97052        &'a mut self,
97053        cover_frame_timestamp: Option<::ordered_float::OrderedFloat<f64>>,
97054    ) -> &'a mut Self {
97055        self.cover_frame_timestamp = cover_frame_timestamp;
97056        self
97057    }
97058    #[allow(rustdoc::invalid_html_tags)]
97059    #[doc = "Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0."]
97060    fn rhai_get_cover_frame_timestamp(&mut self) -> Option<::ordered_float::OrderedFloat<f64>> {
97061        self.cover_frame_timestamp.as_ref().copied()
97062    }
97063    #[allow(rustdoc::invalid_html_tags)]
97064    #[doc = "Optional. Pass True if the video has no sound"]
97065    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97066    pub fn get_is_animation<'a>(&'a self) -> Option<bool> {
97067        self.is_animation.as_ref().map(|v| *v)
97068    }
97069    #[allow(rustdoc::invalid_html_tags)]
97070    #[doc = "Optional. Pass True if the video has no sound"]
97071    #[allow(clippy::needless_lifetimes)]
97072    pub fn set_is_animation<'a>(&'a mut self, is_animation: Option<bool>) -> &'a mut Self {
97073        self.is_animation = is_animation;
97074        self
97075    }
97076    #[allow(rustdoc::invalid_html_tags)]
97077    #[doc = "Optional. Pass True if the video has no sound"]
97078    fn rhai_get_is_animation(&mut self) -> Option<bool> {
97079        self.is_animation.as_ref().copied()
97080    }
97081}
97082#[allow(dead_code)]
97083impl BackgroundTypeChatTheme {
97084    #[allow(clippy::too_many_arguments)]
97085    pub fn new(theme_name: String) -> Self {
97086        Self {
97087            tg_type: "BackgroundTypeChatTheme".to_owned(),
97088            theme_name,
97089        }
97090    }
97091    #[allow(rustdoc::invalid_html_tags)]
97092    #[doc = "Type of the background, always \"chat_theme\""]
97093    #[allow(clippy::needless_lifetimes)]
97094    pub fn get_tg_type<'a>(&'a self) -> &'a str {
97095        self.tg_type.as_str()
97096    }
97097    #[allow(rustdoc::invalid_html_tags)]
97098    #[doc = "Type of the background, always \"chat_theme\""]
97099    #[allow(clippy::needless_lifetimes)]
97100    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
97101        self.tg_type = tg_type;
97102        self
97103    }
97104    #[allow(rustdoc::invalid_html_tags)]
97105    #[doc = "Type of the background, always \"chat_theme\""]
97106    fn rhai_get_tg_type(&mut self) -> String {
97107        self.tg_type.clone()
97108    }
97109    #[allow(rustdoc::invalid_html_tags)]
97110    #[doc = "Name of the chat theme, which is usually an emoji"]
97111    #[allow(clippy::needless_lifetimes)]
97112    pub fn get_theme_name<'a>(&'a self) -> &'a str {
97113        self.theme_name.as_str()
97114    }
97115    #[allow(rustdoc::invalid_html_tags)]
97116    #[doc = "Name of the chat theme, which is usually an emoji"]
97117    #[allow(clippy::needless_lifetimes)]
97118    pub fn set_theme_name<'a>(&'a mut self, theme_name: String) -> &'a mut Self {
97119        self.theme_name = theme_name;
97120        self
97121    }
97122    #[allow(rustdoc::invalid_html_tags)]
97123    #[doc = "Name of the chat theme, which is usually an emoji"]
97124    fn rhai_get_theme_name(&mut self) -> String {
97125        self.theme_name.clone()
97126    }
97127}
97128#[allow(dead_code)]
97129impl InaccessibleMessage {
97130    #[allow(clippy::too_many_arguments)]
97131    pub fn new<A: Into<Chat>>(chat: A, message_id: i64, date: i64) -> Self {
97132        Self {
97133            chat: BoxWrapper::new_unbox(chat.into()),
97134            message_id,
97135            date,
97136        }
97137    }
97138    #[allow(rustdoc::invalid_html_tags)]
97139    #[doc = "Chat the message belonged to"]
97140    #[allow(clippy::needless_lifetimes)]
97141    pub fn get_chat<'a>(&'a self) -> &'a Chat {
97142        &self.chat
97143    }
97144    #[allow(rustdoc::invalid_html_tags)]
97145    #[doc = "Chat the message belonged to"]
97146    #[allow(clippy::needless_lifetimes)]
97147    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
97148        self.chat = BoxWrapper(Unbox(chat));
97149        self
97150    }
97151    #[allow(rustdoc::invalid_html_tags)]
97152    #[doc = "Chat the message belonged to"]
97153    fn rhai_get_chat(&mut self) -> Chat {
97154        self.chat.clone().into()
97155    }
97156    #[allow(rustdoc::invalid_html_tags)]
97157    #[doc = "Unique message identifier inside the chat"]
97158    #[allow(clippy::needless_lifetimes)]
97159    pub fn get_message_id<'a>(&'a self) -> i64 {
97160        self.message_id
97161    }
97162    #[allow(rustdoc::invalid_html_tags)]
97163    #[doc = "Unique message identifier inside the chat"]
97164    #[allow(clippy::needless_lifetimes)]
97165    pub fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
97166        self.message_id = message_id;
97167        self
97168    }
97169    #[allow(rustdoc::invalid_html_tags)]
97170    #[doc = "Unique message identifier inside the chat"]
97171    fn rhai_get_message_id(&mut self) -> i64 {
97172        self.message_id
97173    }
97174    #[allow(rustdoc::invalid_html_tags)]
97175    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
97176    #[allow(clippy::needless_lifetimes)]
97177    pub fn get_date<'a>(&'a self) -> i64 {
97178        self.date
97179    }
97180    #[allow(rustdoc::invalid_html_tags)]
97181    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
97182    #[allow(clippy::needless_lifetimes)]
97183    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
97184        self.date = date;
97185        self
97186    }
97187    #[allow(rustdoc::invalid_html_tags)]
97188    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
97189    fn rhai_get_date(&mut self) -> i64 {
97190        self.date
97191    }
97192}
97193#[allow(dead_code)]
97194impl InputChecklist {
97195    #[allow(clippy::too_many_arguments)]
97196    pub fn new(title: String, tasks: Vec<InputChecklistTask>) -> Self {
97197        Self {
97198            title,
97199            tasks,
97200            parse_mode: None,
97201            title_entities: None,
97202            others_can_add_tasks: None,
97203            others_can_mark_tasks_as_done: None,
97204        }
97205    }
97206    #[allow(rustdoc::invalid_html_tags)]
97207    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
97208    #[allow(clippy::needless_lifetimes)]
97209    pub fn get_title<'a>(&'a self) -> &'a str {
97210        self.title.as_str()
97211    }
97212    #[allow(rustdoc::invalid_html_tags)]
97213    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
97214    #[allow(clippy::needless_lifetimes)]
97215    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
97216        self.title = title;
97217        self
97218    }
97219    #[allow(rustdoc::invalid_html_tags)]
97220    #[doc = "Title of the checklist; 1-255 characters after entities parsing"]
97221    fn rhai_get_title(&mut self) -> String {
97222        self.title.clone()
97223    }
97224    #[allow(rustdoc::invalid_html_tags)]
97225    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
97226    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97227    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
97228        self.parse_mode.as_ref().map(|v| v.as_str())
97229    }
97230    #[allow(rustdoc::invalid_html_tags)]
97231    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
97232    #[allow(clippy::needless_lifetimes)]
97233    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
97234        self.parse_mode = parse_mode;
97235        self
97236    }
97237    #[allow(rustdoc::invalid_html_tags)]
97238    #[doc = "Optional. Mode for parsing entities in the title. See formatting options for more details."]
97239    fn rhai_get_parse_mode(&mut self) -> Option<String> {
97240        self.parse_mode.as_ref().cloned()
97241    }
97242    #[allow(rustdoc::invalid_html_tags)]
97243    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
97244    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97245    pub fn get_title_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
97246        self.title_entities.as_ref()
97247    }
97248    #[allow(rustdoc::invalid_html_tags)]
97249    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
97250    #[allow(clippy::needless_lifetimes)]
97251    pub fn set_title_entities<'a>(
97252        &'a mut self,
97253        title_entities: Option<Vec<MessageEntity>>,
97254    ) -> &'a mut Self {
97255        self.title_entities = title_entities;
97256        self
97257    }
97258    #[allow(rustdoc::invalid_html_tags)]
97259    #[doc = "Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed."]
97260    fn rhai_get_title_entities(&mut self) -> Option<Vec<MessageEntity>> {
97261        self.title_entities.as_ref().cloned()
97262    }
97263    #[allow(rustdoc::invalid_html_tags)]
97264    #[doc = "List of 1-30 tasks in the checklist"]
97265    #[allow(clippy::needless_lifetimes)]
97266    pub fn get_tasks<'a>(&'a self) -> &'a Vec<InputChecklistTask> {
97267        &self.tasks
97268    }
97269    #[allow(rustdoc::invalid_html_tags)]
97270    #[doc = "List of 1-30 tasks in the checklist"]
97271    #[allow(clippy::needless_lifetimes)]
97272    pub fn set_tasks<'a>(&'a mut self, tasks: Vec<InputChecklistTask>) -> &'a mut Self {
97273        self.tasks = tasks;
97274        self
97275    }
97276    #[allow(rustdoc::invalid_html_tags)]
97277    #[doc = "List of 1-30 tasks in the checklist"]
97278    fn rhai_get_tasks(&mut self) -> Vec<InputChecklistTask> {
97279        self.tasks.clone()
97280    }
97281    #[allow(rustdoc::invalid_html_tags)]
97282    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
97283    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97284    pub fn get_others_can_add_tasks<'a>(&'a self) -> Option<bool> {
97285        self.others_can_add_tasks.as_ref().map(|v| *v)
97286    }
97287    #[allow(rustdoc::invalid_html_tags)]
97288    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
97289    #[allow(clippy::needless_lifetimes)]
97290    pub fn set_others_can_add_tasks<'a>(
97291        &'a mut self,
97292        others_can_add_tasks: Option<bool>,
97293    ) -> &'a mut Self {
97294        self.others_can_add_tasks = others_can_add_tasks;
97295        self
97296    }
97297    #[allow(rustdoc::invalid_html_tags)]
97298    #[doc = "Optional. Pass True if other users can add tasks to the checklist"]
97299    fn rhai_get_others_can_add_tasks(&mut self) -> Option<bool> {
97300        self.others_can_add_tasks.as_ref().copied()
97301    }
97302    #[allow(rustdoc::invalid_html_tags)]
97303    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
97304    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97305    pub fn get_others_can_mark_tasks_as_done<'a>(&'a self) -> Option<bool> {
97306        self.others_can_mark_tasks_as_done.as_ref().map(|v| *v)
97307    }
97308    #[allow(rustdoc::invalid_html_tags)]
97309    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
97310    #[allow(clippy::needless_lifetimes)]
97311    pub fn set_others_can_mark_tasks_as_done<'a>(
97312        &'a mut self,
97313        others_can_mark_tasks_as_done: Option<bool>,
97314    ) -> &'a mut Self {
97315        self.others_can_mark_tasks_as_done = others_can_mark_tasks_as_done;
97316        self
97317    }
97318    #[allow(rustdoc::invalid_html_tags)]
97319    #[doc = "Optional. Pass True if other users can mark tasks as done or not done in the checklist"]
97320    fn rhai_get_others_can_mark_tasks_as_done(&mut self) -> Option<bool> {
97321        self.others_can_mark_tasks_as_done.as_ref().copied()
97322    }
97323}
97324#[allow(dead_code)]
97325impl SuggestedPostInfo {
97326    #[allow(clippy::too_many_arguments)]
97327    pub fn new(state: String) -> Self {
97328        Self {
97329            state,
97330            price: None,
97331            send_date: None,
97332        }
97333    }
97334    #[allow(rustdoc::invalid_html_tags)]
97335    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
97336    #[allow(clippy::needless_lifetimes)]
97337    pub fn get_state<'a>(&'a self) -> &'a str {
97338        self.state.as_str()
97339    }
97340    #[allow(rustdoc::invalid_html_tags)]
97341    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
97342    #[allow(clippy::needless_lifetimes)]
97343    pub fn set_state<'a>(&'a mut self, state: String) -> &'a mut Self {
97344        self.state = state;
97345        self
97346    }
97347    #[allow(rustdoc::invalid_html_tags)]
97348    #[doc = "State of the suggested post. Currently, it can be one of \"pending\", \"approved\", \"declined\"."]
97349    fn rhai_get_state(&mut self) -> String {
97350        self.state.clone()
97351    }
97352    #[allow(rustdoc::invalid_html_tags)]
97353    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
97354    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97355    pub fn get_price<'a>(&'a self) -> Option<&'a SuggestedPostPrice> {
97356        self.price.as_ref().map(|v| v.inner_ref())
97357    }
97358    #[allow(rustdoc::invalid_html_tags)]
97359    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
97360    #[allow(clippy::needless_lifetimes)]
97361    pub fn set_price<'a>(&'a mut self, price: Option<SuggestedPostPrice>) -> &'a mut Self {
97362        self.price = price.map(|price| BoxWrapper(Unbox(price)));
97363        self
97364    }
97365    #[allow(rustdoc::invalid_html_tags)]
97366    #[doc = "Optional. Proposed price of the post. If the field is omitted, then the post is unpaid."]
97367    fn rhai_get_price(&mut self) -> Option<SuggestedPostPrice> {
97368        self.price.as_ref().map(|v| v.clone().into())
97369    }
97370    #[allow(rustdoc::invalid_html_tags)]
97371    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
97372    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97373    pub fn get_send_date<'a>(&'a self) -> Option<i64> {
97374        self.send_date.as_ref().map(|v| *v)
97375    }
97376    #[allow(rustdoc::invalid_html_tags)]
97377    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
97378    #[allow(clippy::needless_lifetimes)]
97379    pub fn set_send_date<'a>(&'a mut self, send_date: Option<i64>) -> &'a mut Self {
97380        self.send_date = send_date;
97381        self
97382    }
97383    #[allow(rustdoc::invalid_html_tags)]
97384    #[doc = "Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it."]
97385    fn rhai_get_send_date(&mut self) -> Option<i64> {
97386        self.send_date.as_ref().copied()
97387    }
97388}
97389#[allow(dead_code)]
97390impl SwitchInlineQueryChosenChat {
97391    #[allow(clippy::too_many_arguments)]
97392    pub fn new() -> Self {
97393        Self {
97394            query: None,
97395            allow_user_chats: None,
97396            allow_bot_chats: None,
97397            allow_group_chats: None,
97398            allow_channel_chats: None,
97399        }
97400    }
97401    #[allow(rustdoc::invalid_html_tags)]
97402    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
97403    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97404    pub fn get_query<'a>(&'a self) -> Option<&'a str> {
97405        self.query.as_ref().map(|v| v.as_str())
97406    }
97407    #[allow(rustdoc::invalid_html_tags)]
97408    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
97409    #[allow(clippy::needless_lifetimes)]
97410    pub fn set_query<'a>(&'a mut self, query: Option<String>) -> &'a mut Self {
97411        self.query = query;
97412        self
97413    }
97414    #[allow(rustdoc::invalid_html_tags)]
97415    #[doc = "Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted"]
97416    fn rhai_get_query(&mut self) -> Option<String> {
97417        self.query.as_ref().cloned()
97418    }
97419    #[allow(rustdoc::invalid_html_tags)]
97420    #[doc = "Optional. True, if private chats with users can be chosen"]
97421    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97422    pub fn get_allow_user_chats<'a>(&'a self) -> Option<bool> {
97423        self.allow_user_chats.as_ref().map(|v| *v)
97424    }
97425    #[allow(rustdoc::invalid_html_tags)]
97426    #[doc = "Optional. True, if private chats with users can be chosen"]
97427    #[allow(clippy::needless_lifetimes)]
97428    pub fn set_allow_user_chats<'a>(&'a mut self, allow_user_chats: Option<bool>) -> &'a mut Self {
97429        self.allow_user_chats = allow_user_chats;
97430        self
97431    }
97432    #[allow(rustdoc::invalid_html_tags)]
97433    #[doc = "Optional. True, if private chats with users can be chosen"]
97434    fn rhai_get_allow_user_chats(&mut self) -> Option<bool> {
97435        self.allow_user_chats.as_ref().copied()
97436    }
97437    #[allow(rustdoc::invalid_html_tags)]
97438    #[doc = "Optional. True, if private chats with bots can be chosen"]
97439    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97440    pub fn get_allow_bot_chats<'a>(&'a self) -> Option<bool> {
97441        self.allow_bot_chats.as_ref().map(|v| *v)
97442    }
97443    #[allow(rustdoc::invalid_html_tags)]
97444    #[doc = "Optional. True, if private chats with bots can be chosen"]
97445    #[allow(clippy::needless_lifetimes)]
97446    pub fn set_allow_bot_chats<'a>(&'a mut self, allow_bot_chats: Option<bool>) -> &'a mut Self {
97447        self.allow_bot_chats = allow_bot_chats;
97448        self
97449    }
97450    #[allow(rustdoc::invalid_html_tags)]
97451    #[doc = "Optional. True, if private chats with bots can be chosen"]
97452    fn rhai_get_allow_bot_chats(&mut self) -> Option<bool> {
97453        self.allow_bot_chats.as_ref().copied()
97454    }
97455    #[allow(rustdoc::invalid_html_tags)]
97456    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
97457    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97458    pub fn get_allow_group_chats<'a>(&'a self) -> Option<bool> {
97459        self.allow_group_chats.as_ref().map(|v| *v)
97460    }
97461    #[allow(rustdoc::invalid_html_tags)]
97462    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
97463    #[allow(clippy::needless_lifetimes)]
97464    pub fn set_allow_group_chats<'a>(
97465        &'a mut self,
97466        allow_group_chats: Option<bool>,
97467    ) -> &'a mut Self {
97468        self.allow_group_chats = allow_group_chats;
97469        self
97470    }
97471    #[allow(rustdoc::invalid_html_tags)]
97472    #[doc = "Optional. True, if group and supergroup chats can be chosen"]
97473    fn rhai_get_allow_group_chats(&mut self) -> Option<bool> {
97474        self.allow_group_chats.as_ref().copied()
97475    }
97476    #[allow(rustdoc::invalid_html_tags)]
97477    #[doc = "Optional. True, if channel chats can be chosen"]
97478    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97479    pub fn get_allow_channel_chats<'a>(&'a self) -> Option<bool> {
97480        self.allow_channel_chats.as_ref().map(|v| *v)
97481    }
97482    #[allow(rustdoc::invalid_html_tags)]
97483    #[doc = "Optional. True, if channel chats can be chosen"]
97484    #[allow(clippy::needless_lifetimes)]
97485    pub fn set_allow_channel_chats<'a>(
97486        &'a mut self,
97487        allow_channel_chats: Option<bool>,
97488    ) -> &'a mut Self {
97489        self.allow_channel_chats = allow_channel_chats;
97490        self
97491    }
97492    #[allow(rustdoc::invalid_html_tags)]
97493    #[doc = "Optional. True, if channel chats can be chosen"]
97494    fn rhai_get_allow_channel_chats(&mut self) -> Option<bool> {
97495        self.allow_channel_chats.as_ref().copied()
97496    }
97497}
97498#[allow(dead_code)]
97499impl AcceptedGiftTypes {
97500    #[allow(clippy::too_many_arguments)]
97501    pub fn new(
97502        unlimited_gifts: bool,
97503        limited_gifts: bool,
97504        unique_gifts: bool,
97505        premium_subscription: bool,
97506    ) -> Self {
97507        Self {
97508            unlimited_gifts,
97509            limited_gifts,
97510            unique_gifts,
97511            premium_subscription,
97512        }
97513    }
97514    #[allow(rustdoc::invalid_html_tags)]
97515    #[doc = "True, if unlimited regular gifts are accepted"]
97516    #[allow(clippy::needless_lifetimes)]
97517    pub fn get_unlimited_gifts<'a>(&'a self) -> bool {
97518        self.unlimited_gifts
97519    }
97520    #[allow(rustdoc::invalid_html_tags)]
97521    #[doc = "True, if unlimited regular gifts are accepted"]
97522    #[allow(clippy::needless_lifetimes)]
97523    pub fn set_unlimited_gifts<'a>(&'a mut self, unlimited_gifts: bool) -> &'a mut Self {
97524        self.unlimited_gifts = unlimited_gifts;
97525        self
97526    }
97527    #[allow(rustdoc::invalid_html_tags)]
97528    #[doc = "True, if unlimited regular gifts are accepted"]
97529    fn rhai_get_unlimited_gifts(&mut self) -> bool {
97530        self.unlimited_gifts
97531    }
97532    #[allow(rustdoc::invalid_html_tags)]
97533    #[doc = "True, if limited regular gifts are accepted"]
97534    #[allow(clippy::needless_lifetimes)]
97535    pub fn get_limited_gifts<'a>(&'a self) -> bool {
97536        self.limited_gifts
97537    }
97538    #[allow(rustdoc::invalid_html_tags)]
97539    #[doc = "True, if limited regular gifts are accepted"]
97540    #[allow(clippy::needless_lifetimes)]
97541    pub fn set_limited_gifts<'a>(&'a mut self, limited_gifts: bool) -> &'a mut Self {
97542        self.limited_gifts = limited_gifts;
97543        self
97544    }
97545    #[allow(rustdoc::invalid_html_tags)]
97546    #[doc = "True, if limited regular gifts are accepted"]
97547    fn rhai_get_limited_gifts(&mut self) -> bool {
97548        self.limited_gifts
97549    }
97550    #[allow(rustdoc::invalid_html_tags)]
97551    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
97552    #[allow(clippy::needless_lifetimes)]
97553    pub fn get_unique_gifts<'a>(&'a self) -> bool {
97554        self.unique_gifts
97555    }
97556    #[allow(rustdoc::invalid_html_tags)]
97557    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
97558    #[allow(clippy::needless_lifetimes)]
97559    pub fn set_unique_gifts<'a>(&'a mut self, unique_gifts: bool) -> &'a mut Self {
97560        self.unique_gifts = unique_gifts;
97561        self
97562    }
97563    #[allow(rustdoc::invalid_html_tags)]
97564    #[doc = "True, if unique gifts or gifts that can be upgraded to unique for free are accepted"]
97565    fn rhai_get_unique_gifts(&mut self) -> bool {
97566        self.unique_gifts
97567    }
97568    #[allow(rustdoc::invalid_html_tags)]
97569    #[doc = "True, if a Telegram Premium subscription is accepted"]
97570    #[allow(clippy::needless_lifetimes)]
97571    pub fn get_premium_subscription<'a>(&'a self) -> bool {
97572        self.premium_subscription
97573    }
97574    #[allow(rustdoc::invalid_html_tags)]
97575    #[doc = "True, if a Telegram Premium subscription is accepted"]
97576    #[allow(clippy::needless_lifetimes)]
97577    pub fn set_premium_subscription<'a>(&'a mut self, premium_subscription: bool) -> &'a mut Self {
97578        self.premium_subscription = premium_subscription;
97579        self
97580    }
97581    #[allow(rustdoc::invalid_html_tags)]
97582    #[doc = "True, if a Telegram Premium subscription is accepted"]
97583    fn rhai_get_premium_subscription(&mut self) -> bool {
97584        self.premium_subscription
97585    }
97586}
97587#[allow(dead_code)]
97588impl PassportElementErrorTranslationFile {
97589    #[allow(clippy::too_many_arguments)]
97590    pub fn new(source: String, file_hash: String, message: String) -> Self {
97591        Self {
97592            tg_type: "PassportElementErrorTranslationFile".to_owned(),
97593            source,
97594            file_hash,
97595            message,
97596        }
97597    }
97598    #[allow(rustdoc::invalid_html_tags)]
97599    #[doc = "Error source, must be translation_file"]
97600    #[allow(clippy::needless_lifetimes)]
97601    pub fn get_source<'a>(&'a self) -> &'a str {
97602        self.source.as_str()
97603    }
97604    #[allow(rustdoc::invalid_html_tags)]
97605    #[doc = "Error source, must be translation_file"]
97606    #[allow(clippy::needless_lifetimes)]
97607    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
97608        self.source = source;
97609        self
97610    }
97611    #[allow(rustdoc::invalid_html_tags)]
97612    #[doc = "Error source, must be translation_file"]
97613    fn rhai_get_source(&mut self) -> String {
97614        self.source.clone()
97615    }
97616    #[allow(rustdoc::invalid_html_tags)]
97617    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
97618    #[allow(clippy::needless_lifetimes)]
97619    pub fn get_tg_type<'a>(&'a self) -> &'a str {
97620        self.tg_type.as_str()
97621    }
97622    #[allow(rustdoc::invalid_html_tags)]
97623    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
97624    #[allow(clippy::needless_lifetimes)]
97625    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
97626        self.tg_type = tg_type;
97627        self
97628    }
97629    #[allow(rustdoc::invalid_html_tags)]
97630    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
97631    fn rhai_get_tg_type(&mut self) -> String {
97632        self.tg_type.clone()
97633    }
97634    #[allow(rustdoc::invalid_html_tags)]
97635    #[doc = "Base64-encoded file hash"]
97636    #[allow(clippy::needless_lifetimes)]
97637    pub fn get_file_hash<'a>(&'a self) -> &'a str {
97638        self.file_hash.as_str()
97639    }
97640    #[allow(rustdoc::invalid_html_tags)]
97641    #[doc = "Base64-encoded file hash"]
97642    #[allow(clippy::needless_lifetimes)]
97643    pub fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
97644        self.file_hash = file_hash;
97645        self
97646    }
97647    #[allow(rustdoc::invalid_html_tags)]
97648    #[doc = "Base64-encoded file hash"]
97649    fn rhai_get_file_hash(&mut self) -> String {
97650        self.file_hash.clone()
97651    }
97652    #[allow(rustdoc::invalid_html_tags)]
97653    #[doc = "Error message"]
97654    #[allow(clippy::needless_lifetimes)]
97655    pub fn get_message<'a>(&'a self) -> &'a str {
97656        self.message.as_str()
97657    }
97658    #[allow(rustdoc::invalid_html_tags)]
97659    #[doc = "Error message"]
97660    #[allow(clippy::needless_lifetimes)]
97661    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
97662        self.message = message;
97663        self
97664    }
97665    #[allow(rustdoc::invalid_html_tags)]
97666    #[doc = "Error message"]
97667    fn rhai_get_message(&mut self) -> String {
97668        self.message.clone()
97669    }
97670}
97671#[allow(dead_code)]
97672impl BusinessLocation {
97673    #[allow(clippy::too_many_arguments)]
97674    pub fn new(address: String) -> Self {
97675        Self {
97676            address,
97677            location: None,
97678        }
97679    }
97680    #[allow(rustdoc::invalid_html_tags)]
97681    #[doc = "Address of the business"]
97682    #[allow(clippy::needless_lifetimes)]
97683    pub fn get_address<'a>(&'a self) -> &'a str {
97684        self.address.as_str()
97685    }
97686    #[allow(rustdoc::invalid_html_tags)]
97687    #[doc = "Address of the business"]
97688    #[allow(clippy::needless_lifetimes)]
97689    pub fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self {
97690        self.address = address;
97691        self
97692    }
97693    #[allow(rustdoc::invalid_html_tags)]
97694    #[doc = "Address of the business"]
97695    fn rhai_get_address(&mut self) -> String {
97696        self.address.clone()
97697    }
97698    #[allow(rustdoc::invalid_html_tags)]
97699    #[doc = "Optional. Location of the business"]
97700    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97701    pub fn get_location<'a>(&'a self) -> Option<&'a Location> {
97702        self.location.as_ref().map(|v| v.inner_ref())
97703    }
97704    #[allow(rustdoc::invalid_html_tags)]
97705    #[doc = "Optional. Location of the business"]
97706    #[allow(clippy::needless_lifetimes)]
97707    pub fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self {
97708        self.location = location.map(|location| BoxWrapper(Unbox(location)));
97709        self
97710    }
97711    #[allow(rustdoc::invalid_html_tags)]
97712    #[doc = "Optional. Location of the business"]
97713    fn rhai_get_location(&mut self) -> Option<Location> {
97714        self.location.as_ref().map(|v| v.clone().into())
97715    }
97716}
97717#[allow(dead_code)]
97718impl AffiliateInfo {
97719    #[allow(clippy::too_many_arguments)]
97720    pub fn new(commission_per_mille: i64, amount: i64) -> Self {
97721        Self {
97722            commission_per_mille,
97723            amount,
97724            affiliate_user: None,
97725            affiliate_chat: None,
97726            nanostar_amount: None,
97727        }
97728    }
97729    #[allow(rustdoc::invalid_html_tags)]
97730    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
97731    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97732    pub fn get_affiliate_user<'a>(&'a self) -> Option<&'a User> {
97733        self.affiliate_user.as_ref().map(|v| v.inner_ref())
97734    }
97735    #[allow(rustdoc::invalid_html_tags)]
97736    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
97737    #[allow(clippy::needless_lifetimes)]
97738    pub fn set_affiliate_user<'a>(&'a mut self, affiliate_user: Option<User>) -> &'a mut Self {
97739        self.affiliate_user =
97740            affiliate_user.map(|affiliate_user| BoxWrapper(Unbox(affiliate_user)));
97741        self
97742    }
97743    #[allow(rustdoc::invalid_html_tags)]
97744    #[doc = "Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user"]
97745    fn rhai_get_affiliate_user(&mut self) -> Option<User> {
97746        self.affiliate_user.as_ref().map(|v| v.clone().into())
97747    }
97748    #[allow(rustdoc::invalid_html_tags)]
97749    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
97750    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97751    pub fn get_affiliate_chat<'a>(&'a self) -> Option<&'a Chat> {
97752        self.affiliate_chat.as_ref().map(|v| v.inner_ref())
97753    }
97754    #[allow(rustdoc::invalid_html_tags)]
97755    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
97756    #[allow(clippy::needless_lifetimes)]
97757    pub fn set_affiliate_chat<'a>(&'a mut self, affiliate_chat: Option<Chat>) -> &'a mut Self {
97758        self.affiliate_chat =
97759            affiliate_chat.map(|affiliate_chat| BoxWrapper(Unbox(affiliate_chat)));
97760        self
97761    }
97762    #[allow(rustdoc::invalid_html_tags)]
97763    #[doc = "Optional. The chat that received an affiliate commission if it was received by a chat"]
97764    fn rhai_get_affiliate_chat(&mut self) -> Option<Chat> {
97765        self.affiliate_chat.as_ref().map(|v| v.clone().into())
97766    }
97767    #[allow(rustdoc::invalid_html_tags)]
97768    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
97769    #[allow(clippy::needless_lifetimes)]
97770    pub fn get_commission_per_mille<'a>(&'a self) -> i64 {
97771        self.commission_per_mille
97772    }
97773    #[allow(rustdoc::invalid_html_tags)]
97774    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
97775    #[allow(clippy::needless_lifetimes)]
97776    pub fn set_commission_per_mille<'a>(&'a mut self, commission_per_mille: i64) -> &'a mut Self {
97777        self.commission_per_mille = commission_per_mille;
97778        self
97779    }
97780    #[allow(rustdoc::invalid_html_tags)]
97781    #[doc = "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users"]
97782    fn rhai_get_commission_per_mille(&mut self) -> i64 {
97783        self.commission_per_mille
97784    }
97785    #[allow(rustdoc::invalid_html_tags)]
97786    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
97787    #[allow(clippy::needless_lifetimes)]
97788    pub fn get_amount<'a>(&'a self) -> i64 {
97789        self.amount
97790    }
97791    #[allow(rustdoc::invalid_html_tags)]
97792    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
97793    #[allow(clippy::needless_lifetimes)]
97794    pub fn set_amount<'a>(&'a mut self, amount: i64) -> &'a mut Self {
97795        self.amount = amount;
97796        self
97797    }
97798    #[allow(rustdoc::invalid_html_tags)]
97799    #[doc = "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds"]
97800    fn rhai_get_amount(&mut self) -> i64 {
97801        self.amount
97802    }
97803    #[allow(rustdoc::invalid_html_tags)]
97804    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
97805    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97806    pub fn get_nanostar_amount<'a>(&'a self) -> Option<i64> {
97807        self.nanostar_amount.as_ref().map(|v| *v)
97808    }
97809    #[allow(rustdoc::invalid_html_tags)]
97810    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
97811    #[allow(clippy::needless_lifetimes)]
97812    pub fn set_nanostar_amount<'a>(&'a mut self, nanostar_amount: Option<i64>) -> &'a mut Self {
97813        self.nanostar_amount = nanostar_amount;
97814        self
97815    }
97816    #[allow(rustdoc::invalid_html_tags)]
97817    #[doc = "Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds"]
97818    fn rhai_get_nanostar_amount(&mut self) -> Option<i64> {
97819        self.nanostar_amount.as_ref().copied()
97820    }
97821}
97822#[allow(dead_code)]
97823impl MessageOriginChat {
97824    #[allow(clippy::too_many_arguments)]
97825    pub fn new<A: Into<Chat>>(date: i64, sender_chat: A) -> Self {
97826        Self {
97827            tg_type: "MessageOriginChat".to_owned(),
97828            date,
97829            sender_chat: BoxWrapper::new_unbox(sender_chat.into()),
97830            author_signature: None,
97831        }
97832    }
97833    #[allow(rustdoc::invalid_html_tags)]
97834    #[doc = "Type of the message origin, always \"chat\""]
97835    #[allow(clippy::needless_lifetimes)]
97836    pub fn get_tg_type<'a>(&'a self) -> &'a str {
97837        self.tg_type.as_str()
97838    }
97839    #[allow(rustdoc::invalid_html_tags)]
97840    #[doc = "Type of the message origin, always \"chat\""]
97841    #[allow(clippy::needless_lifetimes)]
97842    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
97843        self.tg_type = tg_type;
97844        self
97845    }
97846    #[allow(rustdoc::invalid_html_tags)]
97847    #[doc = "Type of the message origin, always \"chat\""]
97848    fn rhai_get_tg_type(&mut self) -> String {
97849        self.tg_type.clone()
97850    }
97851    #[allow(rustdoc::invalid_html_tags)]
97852    #[doc = "Date the message was sent originally in Unix time"]
97853    #[allow(clippy::needless_lifetimes)]
97854    pub fn get_date<'a>(&'a self) -> i64 {
97855        self.date
97856    }
97857    #[allow(rustdoc::invalid_html_tags)]
97858    #[doc = "Date the message was sent originally in Unix time"]
97859    #[allow(clippy::needless_lifetimes)]
97860    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
97861        self.date = date;
97862        self
97863    }
97864    #[allow(rustdoc::invalid_html_tags)]
97865    #[doc = "Date the message was sent originally in Unix time"]
97866    fn rhai_get_date(&mut self) -> i64 {
97867        self.date
97868    }
97869    #[allow(rustdoc::invalid_html_tags)]
97870    #[doc = "Chat that sent the message originally"]
97871    #[allow(clippy::needless_lifetimes)]
97872    pub fn get_sender_chat<'a>(&'a self) -> &'a Chat {
97873        &self.sender_chat
97874    }
97875    #[allow(rustdoc::invalid_html_tags)]
97876    #[doc = "Chat that sent the message originally"]
97877    #[allow(clippy::needless_lifetimes)]
97878    pub fn set_sender_chat<'a>(&'a mut self, sender_chat: Chat) -> &'a mut Self {
97879        self.sender_chat = BoxWrapper(Unbox(sender_chat));
97880        self
97881    }
97882    #[allow(rustdoc::invalid_html_tags)]
97883    #[doc = "Chat that sent the message originally"]
97884    fn rhai_get_sender_chat(&mut self) -> Chat {
97885        self.sender_chat.clone().into()
97886    }
97887    #[allow(rustdoc::invalid_html_tags)]
97888    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
97889    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
97890    pub fn get_author_signature<'a>(&'a self) -> Option<&'a str> {
97891        self.author_signature.as_ref().map(|v| v.as_str())
97892    }
97893    #[allow(rustdoc::invalid_html_tags)]
97894    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
97895    #[allow(clippy::needless_lifetimes)]
97896    pub fn set_author_signature<'a>(
97897        &'a mut self,
97898        author_signature: Option<String>,
97899    ) -> &'a mut Self {
97900        self.author_signature = author_signature;
97901        self
97902    }
97903    #[allow(rustdoc::invalid_html_tags)]
97904    #[doc = "Optional. For messages originally sent by an anonymous chat administrator, original message author signature"]
97905    fn rhai_get_author_signature(&mut self) -> Option<String> {
97906        self.author_signature.as_ref().cloned()
97907    }
97908}
97909#[allow(dead_code)]
97910impl BotCommandScopeChat {
97911    #[allow(clippy::too_many_arguments)]
97912    pub fn new(chat_id: ChatHandle) -> Self {
97913        Self {
97914            tg_type: "chat".to_owned(),
97915            chat_id,
97916        }
97917    }
97918    #[allow(rustdoc::invalid_html_tags)]
97919    #[doc = "Scope type, must be chat"]
97920    #[allow(clippy::needless_lifetimes)]
97921    pub fn get_tg_type<'a>(&'a self) -> &'a str {
97922        self.tg_type.as_str()
97923    }
97924    #[allow(rustdoc::invalid_html_tags)]
97925    #[doc = "Scope type, must be chat"]
97926    #[allow(clippy::needless_lifetimes)]
97927    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
97928        self.tg_type = tg_type;
97929        self
97930    }
97931    #[allow(rustdoc::invalid_html_tags)]
97932    #[doc = "Scope type, must be chat"]
97933    fn rhai_get_tg_type(&mut self) -> String {
97934        self.tg_type.clone()
97935    }
97936    #[allow(rustdoc::invalid_html_tags)]
97937    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
97938    #[allow(clippy::needless_lifetimes)]
97939    pub fn get_chat_id<'a>(&'a self) -> &'a ChatHandle {
97940        &self.chat_id
97941    }
97942    #[allow(rustdoc::invalid_html_tags)]
97943    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
97944    #[allow(clippy::needless_lifetimes)]
97945    pub fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self {
97946        self.chat_id = chat_id;
97947        self
97948    }
97949    #[allow(rustdoc::invalid_html_tags)]
97950    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
97951    fn rhai_get_chat_id(&mut self) -> ChatHandle {
97952        self.chat_id.clone()
97953    }
97954}
97955#[allow(dead_code)]
97956impl PassportElementErrorReverseSide {
97957    #[allow(clippy::too_many_arguments)]
97958    pub fn new(source: String, file_hash: String, message: String) -> Self {
97959        Self {
97960            tg_type: "PassportElementErrorReverseSide".to_owned(),
97961            source,
97962            file_hash,
97963            message,
97964        }
97965    }
97966    #[allow(rustdoc::invalid_html_tags)]
97967    #[doc = "Error source, must be reverse_side"]
97968    #[allow(clippy::needless_lifetimes)]
97969    pub fn get_source<'a>(&'a self) -> &'a str {
97970        self.source.as_str()
97971    }
97972    #[allow(rustdoc::invalid_html_tags)]
97973    #[doc = "Error source, must be reverse_side"]
97974    #[allow(clippy::needless_lifetimes)]
97975    pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
97976        self.source = source;
97977        self
97978    }
97979    #[allow(rustdoc::invalid_html_tags)]
97980    #[doc = "Error source, must be reverse_side"]
97981    fn rhai_get_source(&mut self) -> String {
97982        self.source.clone()
97983    }
97984    #[allow(rustdoc::invalid_html_tags)]
97985    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
97986    #[allow(clippy::needless_lifetimes)]
97987    pub fn get_tg_type<'a>(&'a self) -> &'a str {
97988        self.tg_type.as_str()
97989    }
97990    #[allow(rustdoc::invalid_html_tags)]
97991    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
97992    #[allow(clippy::needless_lifetimes)]
97993    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
97994        self.tg_type = tg_type;
97995        self
97996    }
97997    #[allow(rustdoc::invalid_html_tags)]
97998    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
97999    fn rhai_get_tg_type(&mut self) -> String {
98000        self.tg_type.clone()
98001    }
98002    #[allow(rustdoc::invalid_html_tags)]
98003    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
98004    #[allow(clippy::needless_lifetimes)]
98005    pub fn get_file_hash<'a>(&'a self) -> &'a str {
98006        self.file_hash.as_str()
98007    }
98008    #[allow(rustdoc::invalid_html_tags)]
98009    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
98010    #[allow(clippy::needless_lifetimes)]
98011    pub fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
98012        self.file_hash = file_hash;
98013        self
98014    }
98015    #[allow(rustdoc::invalid_html_tags)]
98016    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
98017    fn rhai_get_file_hash(&mut self) -> String {
98018        self.file_hash.clone()
98019    }
98020    #[allow(rustdoc::invalid_html_tags)]
98021    #[doc = "Error message"]
98022    #[allow(clippy::needless_lifetimes)]
98023    pub fn get_message<'a>(&'a self) -> &'a str {
98024        self.message.as_str()
98025    }
98026    #[allow(rustdoc::invalid_html_tags)]
98027    #[doc = "Error message"]
98028    #[allow(clippy::needless_lifetimes)]
98029    pub fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
98030        self.message = message;
98031        self
98032    }
98033    #[allow(rustdoc::invalid_html_tags)]
98034    #[doc = "Error message"]
98035    fn rhai_get_message(&mut self) -> String {
98036        self.message.clone()
98037    }
98038}
98039#[allow(dead_code)]
98040impl InlineQueryResultPhoto {
98041    #[allow(clippy::too_many_arguments)]
98042    pub fn new(id: String, photo_url: String, thumbnail_url: String) -> Self {
98043        Self {
98044            tg_type: "photo".to_owned(),
98045            id,
98046            photo_url,
98047            thumbnail_url,
98048            photo_width: None,
98049            photo_height: None,
98050            title: None,
98051            description: None,
98052            caption: None,
98053            parse_mode: None,
98054            caption_entities: None,
98055            show_caption_above_media: None,
98056            reply_markup: None,
98057            input_message_content: None,
98058        }
98059    }
98060    #[allow(rustdoc::invalid_html_tags)]
98061    #[doc = "Type of the result, must be photo"]
98062    #[allow(clippy::needless_lifetimes)]
98063    pub fn get_tg_type<'a>(&'a self) -> &'a str {
98064        self.tg_type.as_str()
98065    }
98066    #[allow(rustdoc::invalid_html_tags)]
98067    #[doc = "Type of the result, must be photo"]
98068    #[allow(clippy::needless_lifetimes)]
98069    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
98070        self.tg_type = tg_type;
98071        self
98072    }
98073    #[allow(rustdoc::invalid_html_tags)]
98074    #[doc = "Type of the result, must be photo"]
98075    fn rhai_get_tg_type(&mut self) -> String {
98076        self.tg_type.clone()
98077    }
98078    #[allow(rustdoc::invalid_html_tags)]
98079    #[doc = "Unique identifier for this result, 1-64 bytes"]
98080    #[allow(clippy::needless_lifetimes)]
98081    pub fn get_id<'a>(&'a self) -> &'a str {
98082        self.id.as_str()
98083    }
98084    #[allow(rustdoc::invalid_html_tags)]
98085    #[doc = "Unique identifier for this result, 1-64 bytes"]
98086    #[allow(clippy::needless_lifetimes)]
98087    pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self {
98088        self.id = id;
98089        self
98090    }
98091    #[allow(rustdoc::invalid_html_tags)]
98092    #[doc = "Unique identifier for this result, 1-64 bytes"]
98093    fn rhai_get_id(&mut self) -> String {
98094        self.id.clone()
98095    }
98096    #[allow(rustdoc::invalid_html_tags)]
98097    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
98098    #[allow(clippy::needless_lifetimes)]
98099    pub fn get_photo_url<'a>(&'a self) -> &'a str {
98100        self.photo_url.as_str()
98101    }
98102    #[allow(rustdoc::invalid_html_tags)]
98103    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
98104    #[allow(clippy::needless_lifetimes)]
98105    pub fn set_photo_url<'a>(&'a mut self, photo_url: String) -> &'a mut Self {
98106        self.photo_url = photo_url;
98107        self
98108    }
98109    #[allow(rustdoc::invalid_html_tags)]
98110    #[doc = "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB"]
98111    fn rhai_get_photo_url(&mut self) -> String {
98112        self.photo_url.clone()
98113    }
98114    #[allow(rustdoc::invalid_html_tags)]
98115    #[doc = "URL of the thumbnail for the photo"]
98116    #[allow(clippy::needless_lifetimes)]
98117    pub fn get_thumbnail_url<'a>(&'a self) -> &'a str {
98118        self.thumbnail_url.as_str()
98119    }
98120    #[allow(rustdoc::invalid_html_tags)]
98121    #[doc = "URL of the thumbnail for the photo"]
98122    #[allow(clippy::needless_lifetimes)]
98123    pub fn set_thumbnail_url<'a>(&'a mut self, thumbnail_url: String) -> &'a mut Self {
98124        self.thumbnail_url = thumbnail_url;
98125        self
98126    }
98127    #[allow(rustdoc::invalid_html_tags)]
98128    #[doc = "URL of the thumbnail for the photo"]
98129    fn rhai_get_thumbnail_url(&mut self) -> String {
98130        self.thumbnail_url.clone()
98131    }
98132    #[allow(rustdoc::invalid_html_tags)]
98133    #[doc = "Optional. Width of the photo"]
98134    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98135    pub fn get_photo_width<'a>(&'a self) -> Option<i64> {
98136        self.photo_width.as_ref().map(|v| *v)
98137    }
98138    #[allow(rustdoc::invalid_html_tags)]
98139    #[doc = "Optional. Width of the photo"]
98140    #[allow(clippy::needless_lifetimes)]
98141    pub fn set_photo_width<'a>(&'a mut self, photo_width: Option<i64>) -> &'a mut Self {
98142        self.photo_width = photo_width;
98143        self
98144    }
98145    #[allow(rustdoc::invalid_html_tags)]
98146    #[doc = "Optional. Width of the photo"]
98147    fn rhai_get_photo_width(&mut self) -> Option<i64> {
98148        self.photo_width.as_ref().copied()
98149    }
98150    #[allow(rustdoc::invalid_html_tags)]
98151    #[doc = "Optional. Height of the photo"]
98152    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98153    pub fn get_photo_height<'a>(&'a self) -> Option<i64> {
98154        self.photo_height.as_ref().map(|v| *v)
98155    }
98156    #[allow(rustdoc::invalid_html_tags)]
98157    #[doc = "Optional. Height of the photo"]
98158    #[allow(clippy::needless_lifetimes)]
98159    pub fn set_photo_height<'a>(&'a mut self, photo_height: Option<i64>) -> &'a mut Self {
98160        self.photo_height = photo_height;
98161        self
98162    }
98163    #[allow(rustdoc::invalid_html_tags)]
98164    #[doc = "Optional. Height of the photo"]
98165    fn rhai_get_photo_height(&mut self) -> Option<i64> {
98166        self.photo_height.as_ref().copied()
98167    }
98168    #[allow(rustdoc::invalid_html_tags)]
98169    #[doc = "Optional. Title for the result"]
98170    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98171    pub fn get_title<'a>(&'a self) -> Option<&'a str> {
98172        self.title.as_ref().map(|v| v.as_str())
98173    }
98174    #[allow(rustdoc::invalid_html_tags)]
98175    #[doc = "Optional. Title for the result"]
98176    #[allow(clippy::needless_lifetimes)]
98177    pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self {
98178        self.title = title;
98179        self
98180    }
98181    #[allow(rustdoc::invalid_html_tags)]
98182    #[doc = "Optional. Title for the result"]
98183    fn rhai_get_title(&mut self) -> Option<String> {
98184        self.title.as_ref().cloned()
98185    }
98186    #[allow(rustdoc::invalid_html_tags)]
98187    #[doc = "Optional. Short description of the result"]
98188    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98189    pub fn get_description<'a>(&'a self) -> Option<&'a str> {
98190        self.description.as_ref().map(|v| v.as_str())
98191    }
98192    #[allow(rustdoc::invalid_html_tags)]
98193    #[doc = "Optional. Short description of the result"]
98194    #[allow(clippy::needless_lifetimes)]
98195    pub fn set_description<'a>(&'a mut self, description: Option<String>) -> &'a mut Self {
98196        self.description = description;
98197        self
98198    }
98199    #[allow(rustdoc::invalid_html_tags)]
98200    #[doc = "Optional. Short description of the result"]
98201    fn rhai_get_description(&mut self) -> Option<String> {
98202        self.description.as_ref().cloned()
98203    }
98204    #[allow(rustdoc::invalid_html_tags)]
98205    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
98206    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98207    pub fn get_caption<'a>(&'a self) -> Option<&'a str> {
98208        self.caption.as_ref().map(|v| v.as_str())
98209    }
98210    #[allow(rustdoc::invalid_html_tags)]
98211    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
98212    #[allow(clippy::needless_lifetimes)]
98213    pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
98214        self.caption = caption;
98215        self
98216    }
98217    #[allow(rustdoc::invalid_html_tags)]
98218    #[doc = "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing"]
98219    fn rhai_get_caption(&mut self) -> Option<String> {
98220        self.caption.as_ref().cloned()
98221    }
98222    #[allow(rustdoc::invalid_html_tags)]
98223    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
98224    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98225    pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str> {
98226        self.parse_mode.as_ref().map(|v| v.as_str())
98227    }
98228    #[allow(rustdoc::invalid_html_tags)]
98229    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
98230    #[allow(clippy::needless_lifetimes)]
98231    pub fn set_parse_mode<'a>(&'a mut self, parse_mode: Option<String>) -> &'a mut Self {
98232        self.parse_mode = parse_mode;
98233        self
98234    }
98235    #[allow(rustdoc::invalid_html_tags)]
98236    #[doc = "Optional. Mode for parsing entities in the photo caption. See formatting options for more details."]
98237    fn rhai_get_parse_mode(&mut self) -> Option<String> {
98238        self.parse_mode.as_ref().cloned()
98239    }
98240    #[allow(rustdoc::invalid_html_tags)]
98241    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
98242    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98243    pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
98244        self.caption_entities.as_ref()
98245    }
98246    #[allow(rustdoc::invalid_html_tags)]
98247    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
98248    #[allow(clippy::needless_lifetimes)]
98249    pub fn set_caption_entities<'a>(
98250        &'a mut self,
98251        caption_entities: Option<Vec<MessageEntity>>,
98252    ) -> &'a mut Self {
98253        self.caption_entities = caption_entities;
98254        self
98255    }
98256    #[allow(rustdoc::invalid_html_tags)]
98257    #[doc = "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode"]
98258    fn rhai_get_caption_entities(&mut self) -> Option<Vec<MessageEntity>> {
98259        self.caption_entities.as_ref().cloned()
98260    }
98261    #[allow(rustdoc::invalid_html_tags)]
98262    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
98263    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98264    pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
98265        self.show_caption_above_media.as_ref().map(|v| *v)
98266    }
98267    #[allow(rustdoc::invalid_html_tags)]
98268    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
98269    #[allow(clippy::needless_lifetimes)]
98270    pub fn set_show_caption_above_media<'a>(
98271        &'a mut self,
98272        show_caption_above_media: Option<bool>,
98273    ) -> &'a mut Self {
98274        self.show_caption_above_media = show_caption_above_media;
98275        self
98276    }
98277    #[allow(rustdoc::invalid_html_tags)]
98278    #[doc = "Optional. Pass True, if the caption must be shown above the message media"]
98279    fn rhai_get_show_caption_above_media(&mut self) -> Option<bool> {
98280        self.show_caption_above_media.as_ref().copied()
98281    }
98282    #[allow(rustdoc::invalid_html_tags)]
98283    #[doc = "Optional. Inline keyboard attached to the message"]
98284    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98285    pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
98286        self.reply_markup.as_ref().map(|v| v.inner_ref())
98287    }
98288    #[allow(rustdoc::invalid_html_tags)]
98289    #[doc = "Optional. Inline keyboard attached to the message"]
98290    #[allow(clippy::needless_lifetimes)]
98291    pub fn set_reply_markup<'a>(
98292        &'a mut self,
98293        reply_markup: Option<InlineKeyboardMarkup>,
98294    ) -> &'a mut Self {
98295        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
98296        self
98297    }
98298    #[allow(rustdoc::invalid_html_tags)]
98299    #[doc = "Optional. Inline keyboard attached to the message"]
98300    fn rhai_get_reply_markup(&mut self) -> Option<InlineKeyboardMarkup> {
98301        self.reply_markup.as_ref().map(|v| v.clone().into())
98302    }
98303    #[allow(rustdoc::invalid_html_tags)]
98304    #[doc = "Optional. Content of the message to be sent instead of the photo"]
98305    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98306    pub fn get_input_message_content<'a>(&'a self) -> Option<&'a InputMessageContent> {
98307        self.input_message_content.as_ref().map(|v| v.inner_ref())
98308    }
98309    #[allow(rustdoc::invalid_html_tags)]
98310    #[doc = "Optional. Content of the message to be sent instead of the photo"]
98311    #[allow(clippy::needless_lifetimes)]
98312    pub fn set_input_message_content<'a>(
98313        &'a mut self,
98314        input_message_content: Option<InputMessageContent>,
98315    ) -> &'a mut Self {
98316        self.input_message_content = input_message_content
98317            .map(|input_message_content| BoxWrapper(Unbox(input_message_content)));
98318        self
98319    }
98320    #[allow(rustdoc::invalid_html_tags)]
98321    #[doc = "Optional. Content of the message to be sent instead of the photo"]
98322    fn rhai_get_input_message_content(&mut self) -> Option<InputMessageContent> {
98323        self.input_message_content
98324            .as_ref()
98325            .map(|v| v.clone().into())
98326    }
98327}
98328#[allow(dead_code)]
98329impl StoryAreaTypeLink {
98330    #[allow(clippy::too_many_arguments)]
98331    pub fn new(url: String) -> Self {
98332        Self {
98333            tg_type: "StoryAreaTypeLink".to_owned(),
98334            url,
98335        }
98336    }
98337    #[allow(rustdoc::invalid_html_tags)]
98338    #[doc = "Type of the area, always \"link\""]
98339    #[allow(clippy::needless_lifetimes)]
98340    pub fn get_tg_type<'a>(&'a self) -> &'a str {
98341        self.tg_type.as_str()
98342    }
98343    #[allow(rustdoc::invalid_html_tags)]
98344    #[doc = "Type of the area, always \"link\""]
98345    #[allow(clippy::needless_lifetimes)]
98346    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
98347        self.tg_type = tg_type;
98348        self
98349    }
98350    #[allow(rustdoc::invalid_html_tags)]
98351    #[doc = "Type of the area, always \"link\""]
98352    fn rhai_get_tg_type(&mut self) -> String {
98353        self.tg_type.clone()
98354    }
98355    #[allow(rustdoc::invalid_html_tags)]
98356    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
98357    #[allow(clippy::needless_lifetimes)]
98358    pub fn get_url<'a>(&'a self) -> &'a str {
98359        self.url.as_str()
98360    }
98361    #[allow(rustdoc::invalid_html_tags)]
98362    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
98363    #[allow(clippy::needless_lifetimes)]
98364    pub fn set_url<'a>(&'a mut self, url: String) -> &'a mut Self {
98365        self.url = url;
98366        self
98367    }
98368    #[allow(rustdoc::invalid_html_tags)]
98369    #[doc = "HTTP or tg:// URL to be opened when the area is clicked"]
98370    fn rhai_get_url(&mut self) -> String {
98371        self.url.clone()
98372    }
98373}
98374#[allow(dead_code)]
98375impl InputSticker {
98376    #[allow(clippy::too_many_arguments)]
98377    pub fn new(sticker: String, format: String, emoji_list: Vec<String>) -> Self {
98378        Self {
98379            sticker,
98380            format,
98381            emoji_list,
98382            mask_position: None,
98383            keywords: None,
98384        }
98385    }
98386    #[allow(rustdoc::invalid_html_tags)]
98387    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98388    #[allow(clippy::needless_lifetimes)]
98389    pub fn get_sticker<'a>(&'a self) -> &'a str {
98390        self.sticker.as_str()
98391    }
98392    #[allow(rustdoc::invalid_html_tags)]
98393    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98394    #[allow(clippy::needless_lifetimes)]
98395    pub fn set_sticker<'a>(&'a mut self, sticker: String) -> &'a mut Self {
98396        self.sticker = sticker;
98397        self
98398    }
98399    #[allow(rustdoc::invalid_html_tags)]
98400    #[doc = "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new file using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98401    fn rhai_get_sticker(&mut self) -> String {
98402        self.sticker.clone()
98403    }
98404    #[allow(rustdoc::invalid_html_tags)]
98405    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
98406    #[allow(clippy::needless_lifetimes)]
98407    pub fn get_format<'a>(&'a self) -> &'a str {
98408        self.format.as_str()
98409    }
98410    #[allow(rustdoc::invalid_html_tags)]
98411    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
98412    #[allow(clippy::needless_lifetimes)]
98413    pub fn set_format<'a>(&'a mut self, format: String) -> &'a mut Self {
98414        self.format = format;
98415        self
98416    }
98417    #[allow(rustdoc::invalid_html_tags)]
98418    #[doc = "Format of the added sticker, must be one of \"static\" for a .WEBP or .PNG image, \"animated\" for a .TGS animation, \"video\" for a .WEBM video"]
98419    fn rhai_get_format(&mut self) -> String {
98420        self.format.clone()
98421    }
98422    #[allow(rustdoc::invalid_html_tags)]
98423    #[doc = "List of 1-20 emoji associated with the sticker"]
98424    #[allow(clippy::needless_lifetimes)]
98425    pub fn get_emoji_list<'a>(&'a self) -> &'a Vec<String> {
98426        &self.emoji_list
98427    }
98428    #[allow(rustdoc::invalid_html_tags)]
98429    #[doc = "List of 1-20 emoji associated with the sticker"]
98430    #[allow(clippy::needless_lifetimes)]
98431    pub fn set_emoji_list<'a>(&'a mut self, emoji_list: Vec<String>) -> &'a mut Self {
98432        self.emoji_list = emoji_list;
98433        self
98434    }
98435    #[allow(rustdoc::invalid_html_tags)]
98436    #[doc = "List of 1-20 emoji associated with the sticker"]
98437    fn rhai_get_emoji_list(&mut self) -> Vec<String> {
98438        self.emoji_list.clone()
98439    }
98440    #[allow(rustdoc::invalid_html_tags)]
98441    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
98442    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98443    pub fn get_mask_position<'a>(&'a self) -> Option<&'a MaskPosition> {
98444        self.mask_position.as_ref().map(|v| v.inner_ref())
98445    }
98446    #[allow(rustdoc::invalid_html_tags)]
98447    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
98448    #[allow(clippy::needless_lifetimes)]
98449    pub fn set_mask_position<'a>(
98450        &'a mut self,
98451        mask_position: Option<MaskPosition>,
98452    ) -> &'a mut Self {
98453        self.mask_position = mask_position.map(|mask_position| BoxWrapper(Unbox(mask_position)));
98454        self
98455    }
98456    #[allow(rustdoc::invalid_html_tags)]
98457    #[doc = "Optional. Position where the mask should be placed on faces. For \"mask\" stickers only."]
98458    fn rhai_get_mask_position(&mut self) -> Option<MaskPosition> {
98459        self.mask_position.as_ref().map(|v| v.clone().into())
98460    }
98461    #[allow(rustdoc::invalid_html_tags)]
98462    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
98463    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98464    pub fn get_keywords<'a>(&'a self) -> Option<&'a Vec<String>> {
98465        self.keywords.as_ref()
98466    }
98467    #[allow(rustdoc::invalid_html_tags)]
98468    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
98469    #[allow(clippy::needless_lifetimes)]
98470    pub fn set_keywords<'a>(&'a mut self, keywords: Option<Vec<String>>) -> &'a mut Self {
98471        self.keywords = keywords;
98472        self
98473    }
98474    #[allow(rustdoc::invalid_html_tags)]
98475    #[doc = "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For \"regular\" and \"custom_emoji\" stickers only."]
98476    fn rhai_get_keywords(&mut self) -> Option<Vec<String>> {
98477        self.keywords.as_ref().cloned()
98478    }
98479}
98480#[allow(dead_code)]
98481impl InputPaidMediaPhoto {
98482    #[allow(clippy::too_many_arguments)]
98483    pub fn new(media: String) -> Self {
98484        Self {
98485            tg_type: "photo".to_owned(),
98486            media,
98487        }
98488    }
98489    #[allow(rustdoc::invalid_html_tags)]
98490    #[doc = "Type of the media, must be photo"]
98491    #[allow(clippy::needless_lifetimes)]
98492    pub fn get_tg_type<'a>(&'a self) -> &'a str {
98493        self.tg_type.as_str()
98494    }
98495    #[allow(rustdoc::invalid_html_tags)]
98496    #[doc = "Type of the media, must be photo"]
98497    #[allow(clippy::needless_lifetimes)]
98498    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
98499        self.tg_type = tg_type;
98500        self
98501    }
98502    #[allow(rustdoc::invalid_html_tags)]
98503    #[doc = "Type of the media, must be photo"]
98504    fn rhai_get_tg_type(&mut self) -> String {
98505        self.tg_type.clone()
98506    }
98507    #[allow(rustdoc::invalid_html_tags)]
98508    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98509    #[allow(clippy::needless_lifetimes)]
98510    pub fn get_media<'a>(&'a self) -> &'a String {
98511        &self.media
98512    }
98513    #[allow(rustdoc::invalid_html_tags)]
98514    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98515    #[allow(clippy::needless_lifetimes)]
98516    pub fn set_media<'a>(&'a mut self, media: String) -> &'a mut Self {
98517        self.media = media;
98518        self
98519    }
98520    #[allow(rustdoc::invalid_html_tags)]
98521    #[doc = "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98522    fn rhai_get_media(&mut self) -> String {
98523        self.media.clone()
98524    }
98525}
98526#[allow(dead_code)]
98527impl InputProfilePhotoStatic {
98528    #[allow(clippy::too_many_arguments)]
98529    pub fn new(photo: String) -> Self {
98530        Self {
98531            tg_type: "static".to_owned(),
98532            photo,
98533        }
98534    }
98535    #[allow(rustdoc::invalid_html_tags)]
98536    #[doc = "Type of the profile photo, must be static"]
98537    #[allow(clippy::needless_lifetimes)]
98538    pub fn get_tg_type<'a>(&'a self) -> &'a str {
98539        self.tg_type.as_str()
98540    }
98541    #[allow(rustdoc::invalid_html_tags)]
98542    #[doc = "Type of the profile photo, must be static"]
98543    #[allow(clippy::needless_lifetimes)]
98544    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
98545        self.tg_type = tg_type;
98546        self
98547    }
98548    #[allow(rustdoc::invalid_html_tags)]
98549    #[doc = "Type of the profile photo, must be static"]
98550    fn rhai_get_tg_type(&mut self) -> String {
98551        self.tg_type.clone()
98552    }
98553    #[allow(rustdoc::invalid_html_tags)]
98554    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98555    #[allow(clippy::needless_lifetimes)]
98556    pub fn get_photo<'a>(&'a self) -> &'a str {
98557        self.photo.as_str()
98558    }
98559    #[allow(rustdoc::invalid_html_tags)]
98560    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98561    #[allow(clippy::needless_lifetimes)]
98562    pub fn set_photo<'a>(&'a mut self, photo: String) -> &'a mut Self {
98563        self.photo = photo;
98564        self
98565    }
98566    #[allow(rustdoc::invalid_html_tags)]
98567    #[doc = "The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass \"attach://<file_attach_name>\" if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"]
98568    fn rhai_get_photo(&mut self) -> String {
98569        self.photo.clone()
98570    }
98571}
98572#[allow(dead_code)]
98573impl TransactionPartnerChat {
98574    #[allow(clippy::too_many_arguments)]
98575    pub fn new<A: Into<Chat>>(chat: A) -> Self {
98576        Self {
98577            tg_type: "TransactionPartnerChat".to_owned(),
98578            chat: BoxWrapper::new_unbox(chat.into()),
98579            gift: None,
98580        }
98581    }
98582    #[allow(rustdoc::invalid_html_tags)]
98583    #[doc = "Type of the transaction partner, always \"chat\""]
98584    #[allow(clippy::needless_lifetimes)]
98585    pub fn get_tg_type<'a>(&'a self) -> &'a str {
98586        self.tg_type.as_str()
98587    }
98588    #[allow(rustdoc::invalid_html_tags)]
98589    #[doc = "Type of the transaction partner, always \"chat\""]
98590    #[allow(clippy::needless_lifetimes)]
98591    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
98592        self.tg_type = tg_type;
98593        self
98594    }
98595    #[allow(rustdoc::invalid_html_tags)]
98596    #[doc = "Type of the transaction partner, always \"chat\""]
98597    fn rhai_get_tg_type(&mut self) -> String {
98598        self.tg_type.clone()
98599    }
98600    #[allow(rustdoc::invalid_html_tags)]
98601    #[doc = "Information about the chat"]
98602    #[allow(clippy::needless_lifetimes)]
98603    pub fn get_chat<'a>(&'a self) -> &'a Chat {
98604        &self.chat
98605    }
98606    #[allow(rustdoc::invalid_html_tags)]
98607    #[doc = "Information about the chat"]
98608    #[allow(clippy::needless_lifetimes)]
98609    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
98610        self.chat = BoxWrapper(Unbox(chat));
98611        self
98612    }
98613    #[allow(rustdoc::invalid_html_tags)]
98614    #[doc = "Information about the chat"]
98615    fn rhai_get_chat(&mut self) -> Chat {
98616        self.chat.clone().into()
98617    }
98618    #[allow(rustdoc::invalid_html_tags)]
98619    #[doc = "Optional. The gift sent to the chat by the bot"]
98620    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98621    pub fn get_gift<'a>(&'a self) -> Option<&'a Gift> {
98622        self.gift.as_ref().map(|v| v.inner_ref())
98623    }
98624    #[allow(rustdoc::invalid_html_tags)]
98625    #[doc = "Optional. The gift sent to the chat by the bot"]
98626    #[allow(clippy::needless_lifetimes)]
98627    pub fn set_gift<'a>(&'a mut self, gift: Option<Gift>) -> &'a mut Self {
98628        self.gift = gift.map(|gift| BoxWrapper(Unbox(gift)));
98629        self
98630    }
98631    #[allow(rustdoc::invalid_html_tags)]
98632    #[doc = "Optional. The gift sent to the chat by the bot"]
98633    fn rhai_get_gift(&mut self) -> Option<Gift> {
98634        self.gift.as_ref().map(|v| v.clone().into())
98635    }
98636}
98637#[allow(dead_code)]
98638impl BotCommandScopeChatAdministrators {
98639    #[allow(clippy::too_many_arguments)]
98640    pub fn new(chat_id: ChatHandle) -> Self {
98641        Self {
98642            tg_type: "chat_administrators".to_owned(),
98643            chat_id,
98644        }
98645    }
98646    #[allow(rustdoc::invalid_html_tags)]
98647    #[doc = "Scope type, must be chat_administrators"]
98648    #[allow(clippy::needless_lifetimes)]
98649    pub fn get_tg_type<'a>(&'a self) -> &'a str {
98650        self.tg_type.as_str()
98651    }
98652    #[allow(rustdoc::invalid_html_tags)]
98653    #[doc = "Scope type, must be chat_administrators"]
98654    #[allow(clippy::needless_lifetimes)]
98655    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
98656        self.tg_type = tg_type;
98657        self
98658    }
98659    #[allow(rustdoc::invalid_html_tags)]
98660    #[doc = "Scope type, must be chat_administrators"]
98661    fn rhai_get_tg_type(&mut self) -> String {
98662        self.tg_type.clone()
98663    }
98664    #[allow(rustdoc::invalid_html_tags)]
98665    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
98666    #[allow(clippy::needless_lifetimes)]
98667    pub fn get_chat_id<'a>(&'a self) -> &'a ChatHandle {
98668        &self.chat_id
98669    }
98670    #[allow(rustdoc::invalid_html_tags)]
98671    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
98672    #[allow(clippy::needless_lifetimes)]
98673    pub fn set_chat_id<'a>(&'a mut self, chat_id: ChatHandle) -> &'a mut Self {
98674        self.chat_id = chat_id;
98675        self
98676    }
98677    #[allow(rustdoc::invalid_html_tags)]
98678    #[doc = "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported."]
98679    fn rhai_get_chat_id(&mut self) -> ChatHandle {
98680        self.chat_id.clone()
98681    }
98682}
98683#[allow(dead_code)]
98684impl ForumTopicClosed {}
98685#[allow(dead_code)]
98686impl PaidMediaPurchased {
98687    #[allow(clippy::too_many_arguments)]
98688    pub fn new<A: Into<User>>(from: A, paid_media_payload: String) -> Self {
98689        Self {
98690            from: BoxWrapper::new_unbox(from.into()),
98691            paid_media_payload,
98692        }
98693    }
98694    #[allow(rustdoc::invalid_html_tags)]
98695    #[doc = "User who purchased the media"]
98696    #[allow(clippy::needless_lifetimes)]
98697    pub fn get_from<'a>(&'a self) -> &'a User {
98698        &self.from
98699    }
98700    #[allow(rustdoc::invalid_html_tags)]
98701    #[doc = "User who purchased the media"]
98702    #[allow(clippy::needless_lifetimes)]
98703    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
98704        self.from = BoxWrapper(Unbox(from));
98705        self
98706    }
98707    #[allow(rustdoc::invalid_html_tags)]
98708    #[doc = "User who purchased the media"]
98709    fn rhai_get_from(&mut self) -> User {
98710        self.from.clone().into()
98711    }
98712    #[allow(rustdoc::invalid_html_tags)]
98713    #[doc = "Bot-specified paid media payload"]
98714    #[allow(clippy::needless_lifetimes)]
98715    pub fn get_paid_media_payload<'a>(&'a self) -> &'a str {
98716        self.paid_media_payload.as_str()
98717    }
98718    #[allow(rustdoc::invalid_html_tags)]
98719    #[doc = "Bot-specified paid media payload"]
98720    #[allow(clippy::needless_lifetimes)]
98721    pub fn set_paid_media_payload<'a>(&'a mut self, paid_media_payload: String) -> &'a mut Self {
98722        self.paid_media_payload = paid_media_payload;
98723        self
98724    }
98725    #[allow(rustdoc::invalid_html_tags)]
98726    #[doc = "Bot-specified paid media payload"]
98727    fn rhai_get_paid_media_payload(&mut self) -> String {
98728        self.paid_media_payload.clone()
98729    }
98730}
98731#[allow(dead_code)]
98732impl ChatLocation {
98733    #[allow(clippy::too_many_arguments)]
98734    pub fn new<A: Into<Location>>(location: A, address: String) -> Self {
98735        Self {
98736            location: BoxWrapper::new_unbox(location.into()),
98737            address,
98738        }
98739    }
98740    #[allow(rustdoc::invalid_html_tags)]
98741    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
98742    #[allow(clippy::needless_lifetimes)]
98743    pub fn get_location<'a>(&'a self) -> &'a Location {
98744        &self.location
98745    }
98746    #[allow(rustdoc::invalid_html_tags)]
98747    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
98748    #[allow(clippy::needless_lifetimes)]
98749    pub fn set_location<'a>(&'a mut self, location: Location) -> &'a mut Self {
98750        self.location = BoxWrapper(Unbox(location));
98751        self
98752    }
98753    #[allow(rustdoc::invalid_html_tags)]
98754    #[doc = "The location to which the supergroup is connected. Can't be a live location."]
98755    fn rhai_get_location(&mut self) -> Location {
98756        self.location.clone().into()
98757    }
98758    #[allow(rustdoc::invalid_html_tags)]
98759    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
98760    #[allow(clippy::needless_lifetimes)]
98761    pub fn get_address<'a>(&'a self) -> &'a str {
98762        self.address.as_str()
98763    }
98764    #[allow(rustdoc::invalid_html_tags)]
98765    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
98766    #[allow(clippy::needless_lifetimes)]
98767    pub fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self {
98768        self.address = address;
98769        self
98770    }
98771    #[allow(rustdoc::invalid_html_tags)]
98772    #[doc = "Location address; 1-64 characters, as defined by the chat owner"]
98773    fn rhai_get_address(&mut self) -> String {
98774        self.address.clone()
98775    }
98776}
98777#[allow(dead_code)]
98778impl VideoChatStarted {}
98779#[allow(dead_code)]
98780impl ChatMemberUpdated {
98781    #[allow(clippy::too_many_arguments)]
98782    pub fn new<A: Into<Chat>, B: Into<User>, C: Into<ChatMember>, D: Into<ChatMember>>(
98783        chat: A,
98784        from: B,
98785        date: i64,
98786        old_chat_member: C,
98787        new_chat_member: D,
98788    ) -> Self {
98789        Self {
98790            chat: BoxWrapper::new_unbox(chat.into()),
98791            from: BoxWrapper::new_unbox(from.into()),
98792            date,
98793            old_chat_member: BoxWrapper::new_unbox(old_chat_member.into()),
98794            new_chat_member: BoxWrapper::new_unbox(new_chat_member.into()),
98795            invite_link: None,
98796            via_join_request: None,
98797            via_chat_folder_invite_link: None,
98798        }
98799    }
98800    #[allow(rustdoc::invalid_html_tags)]
98801    #[doc = "Chat the user belongs to"]
98802    #[allow(clippy::needless_lifetimes)]
98803    pub fn get_chat<'a>(&'a self) -> &'a Chat {
98804        &self.chat
98805    }
98806    #[allow(rustdoc::invalid_html_tags)]
98807    #[doc = "Chat the user belongs to"]
98808    #[allow(clippy::needless_lifetimes)]
98809    pub fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
98810        self.chat = BoxWrapper(Unbox(chat));
98811        self
98812    }
98813    #[allow(rustdoc::invalid_html_tags)]
98814    #[doc = "Chat the user belongs to"]
98815    fn rhai_get_chat(&mut self) -> Chat {
98816        self.chat.clone().into()
98817    }
98818    #[allow(rustdoc::invalid_html_tags)]
98819    #[doc = "Performer of the action, which resulted in the change"]
98820    #[allow(clippy::needless_lifetimes)]
98821    pub fn get_from<'a>(&'a self) -> &'a User {
98822        &self.from
98823    }
98824    #[allow(rustdoc::invalid_html_tags)]
98825    #[doc = "Performer of the action, which resulted in the change"]
98826    #[allow(clippy::needless_lifetimes)]
98827    pub fn set_from<'a>(&'a mut self, from: User) -> &'a mut Self {
98828        self.from = BoxWrapper(Unbox(from));
98829        self
98830    }
98831    #[allow(rustdoc::invalid_html_tags)]
98832    #[doc = "Performer of the action, which resulted in the change"]
98833    fn rhai_get_from(&mut self) -> User {
98834        self.from.clone().into()
98835    }
98836    #[allow(rustdoc::invalid_html_tags)]
98837    #[doc = "Date the change was done in Unix time"]
98838    #[allow(clippy::needless_lifetimes)]
98839    pub fn get_date<'a>(&'a self) -> i64 {
98840        self.date
98841    }
98842    #[allow(rustdoc::invalid_html_tags)]
98843    #[doc = "Date the change was done in Unix time"]
98844    #[allow(clippy::needless_lifetimes)]
98845    pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
98846        self.date = date;
98847        self
98848    }
98849    #[allow(rustdoc::invalid_html_tags)]
98850    #[doc = "Date the change was done in Unix time"]
98851    fn rhai_get_date(&mut self) -> i64 {
98852        self.date
98853    }
98854    #[allow(rustdoc::invalid_html_tags)]
98855    #[doc = "Previous information about the chat member"]
98856    #[allow(clippy::needless_lifetimes)]
98857    pub fn get_old_chat_member<'a>(&'a self) -> &'a ChatMember {
98858        &self.old_chat_member
98859    }
98860    #[allow(rustdoc::invalid_html_tags)]
98861    #[doc = "Previous information about the chat member"]
98862    #[allow(clippy::needless_lifetimes)]
98863    pub fn set_old_chat_member<'a>(&'a mut self, old_chat_member: ChatMember) -> &'a mut Self {
98864        self.old_chat_member = BoxWrapper(Unbox(old_chat_member));
98865        self
98866    }
98867    #[allow(rustdoc::invalid_html_tags)]
98868    #[doc = "Previous information about the chat member"]
98869    fn rhai_get_old_chat_member(&mut self) -> ChatMember {
98870        self.old_chat_member.clone().into()
98871    }
98872    #[allow(rustdoc::invalid_html_tags)]
98873    #[doc = "New information about the chat member"]
98874    #[allow(clippy::needless_lifetimes)]
98875    pub fn get_new_chat_member<'a>(&'a self) -> &'a ChatMember {
98876        &self.new_chat_member
98877    }
98878    #[allow(rustdoc::invalid_html_tags)]
98879    #[doc = "New information about the chat member"]
98880    #[allow(clippy::needless_lifetimes)]
98881    pub fn set_new_chat_member<'a>(&'a mut self, new_chat_member: ChatMember) -> &'a mut Self {
98882        self.new_chat_member = BoxWrapper(Unbox(new_chat_member));
98883        self
98884    }
98885    #[allow(rustdoc::invalid_html_tags)]
98886    #[doc = "New information about the chat member"]
98887    fn rhai_get_new_chat_member(&mut self) -> ChatMember {
98888        self.new_chat_member.clone().into()
98889    }
98890    #[allow(rustdoc::invalid_html_tags)]
98891    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
98892    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98893    pub fn get_invite_link<'a>(&'a self) -> Option<&'a ChatInviteLink> {
98894        self.invite_link.as_ref().map(|v| v.inner_ref())
98895    }
98896    #[allow(rustdoc::invalid_html_tags)]
98897    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
98898    #[allow(clippy::needless_lifetimes)]
98899    pub fn set_invite_link<'a>(&'a mut self, invite_link: Option<ChatInviteLink>) -> &'a mut Self {
98900        self.invite_link = invite_link.map(|invite_link| BoxWrapper(Unbox(invite_link)));
98901        self
98902    }
98903    #[allow(rustdoc::invalid_html_tags)]
98904    #[doc = "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only."]
98905    fn rhai_get_invite_link(&mut self) -> Option<ChatInviteLink> {
98906        self.invite_link.as_ref().map(|v| v.clone().into())
98907    }
98908    #[allow(rustdoc::invalid_html_tags)]
98909    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
98910    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98911    pub fn get_via_join_request<'a>(&'a self) -> Option<bool> {
98912        self.via_join_request.as_ref().map(|v| *v)
98913    }
98914    #[allow(rustdoc::invalid_html_tags)]
98915    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
98916    #[allow(clippy::needless_lifetimes)]
98917    pub fn set_via_join_request<'a>(&'a mut self, via_join_request: Option<bool>) -> &'a mut Self {
98918        self.via_join_request = via_join_request;
98919        self
98920    }
98921    #[allow(rustdoc::invalid_html_tags)]
98922    #[doc = "Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator"]
98923    fn rhai_get_via_join_request(&mut self) -> Option<bool> {
98924        self.via_join_request.as_ref().copied()
98925    }
98926    #[allow(rustdoc::invalid_html_tags)]
98927    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
98928    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
98929    pub fn get_via_chat_folder_invite_link<'a>(&'a self) -> Option<bool> {
98930        self.via_chat_folder_invite_link.as_ref().map(|v| *v)
98931    }
98932    #[allow(rustdoc::invalid_html_tags)]
98933    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
98934    #[allow(clippy::needless_lifetimes)]
98935    pub fn set_via_chat_folder_invite_link<'a>(
98936        &'a mut self,
98937        via_chat_folder_invite_link: Option<bool>,
98938    ) -> &'a mut Self {
98939        self.via_chat_folder_invite_link = via_chat_folder_invite_link;
98940        self
98941    }
98942    #[allow(rustdoc::invalid_html_tags)]
98943    #[doc = "Optional. True, if the user joined the chat via a chat folder invite link"]
98944    fn rhai_get_via_chat_folder_invite_link(&mut self) -> Option<bool> {
98945        self.via_chat_folder_invite_link.as_ref().copied()
98946    }
98947}
98948#[allow(dead_code)]
98949impl Venue {
98950    #[allow(clippy::too_many_arguments)]
98951    pub fn new<A: Into<Location>>(location: A, title: String, address: String) -> Self {
98952        Self {
98953            location: BoxWrapper::new_unbox(location.into()),
98954            title,
98955            address,
98956            foursquare_id: None,
98957            foursquare_type: None,
98958            google_place_id: None,
98959            google_place_type: None,
98960        }
98961    }
98962    #[allow(rustdoc::invalid_html_tags)]
98963    #[doc = "Venue location. Can't be a live location"]
98964    #[allow(clippy::needless_lifetimes)]
98965    pub fn get_location<'a>(&'a self) -> &'a Location {
98966        &self.location
98967    }
98968    #[allow(rustdoc::invalid_html_tags)]
98969    #[doc = "Venue location. Can't be a live location"]
98970    #[allow(clippy::needless_lifetimes)]
98971    pub fn set_location<'a>(&'a mut self, location: Location) -> &'a mut Self {
98972        self.location = BoxWrapper(Unbox(location));
98973        self
98974    }
98975    #[allow(rustdoc::invalid_html_tags)]
98976    #[doc = "Venue location. Can't be a live location"]
98977    fn rhai_get_location(&mut self) -> Location {
98978        self.location.clone().into()
98979    }
98980    #[allow(rustdoc::invalid_html_tags)]
98981    #[doc = "Name of the venue"]
98982    #[allow(clippy::needless_lifetimes)]
98983    pub fn get_title<'a>(&'a self) -> &'a str {
98984        self.title.as_str()
98985    }
98986    #[allow(rustdoc::invalid_html_tags)]
98987    #[doc = "Name of the venue"]
98988    #[allow(clippy::needless_lifetimes)]
98989    pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self {
98990        self.title = title;
98991        self
98992    }
98993    #[allow(rustdoc::invalid_html_tags)]
98994    #[doc = "Name of the venue"]
98995    fn rhai_get_title(&mut self) -> String {
98996        self.title.clone()
98997    }
98998    #[allow(rustdoc::invalid_html_tags)]
98999    #[doc = "Address of the venue"]
99000    #[allow(clippy::needless_lifetimes)]
99001    pub fn get_address<'a>(&'a self) -> &'a str {
99002        self.address.as_str()
99003    }
99004    #[allow(rustdoc::invalid_html_tags)]
99005    #[doc = "Address of the venue"]
99006    #[allow(clippy::needless_lifetimes)]
99007    pub fn set_address<'a>(&'a mut self, address: String) -> &'a mut Self {
99008        self.address = address;
99009        self
99010    }
99011    #[allow(rustdoc::invalid_html_tags)]
99012    #[doc = "Address of the venue"]
99013    fn rhai_get_address(&mut self) -> String {
99014        self.address.clone()
99015    }
99016    #[allow(rustdoc::invalid_html_tags)]
99017    #[doc = "Optional. Foursquare identifier of the venue"]
99018    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99019    pub fn get_foursquare_id<'a>(&'a self) -> Option<&'a str> {
99020        self.foursquare_id.as_ref().map(|v| v.as_str())
99021    }
99022    #[allow(rustdoc::invalid_html_tags)]
99023    #[doc = "Optional. Foursquare identifier of the venue"]
99024    #[allow(clippy::needless_lifetimes)]
99025    pub fn set_foursquare_id<'a>(&'a mut self, foursquare_id: Option<String>) -> &'a mut Self {
99026        self.foursquare_id = foursquare_id;
99027        self
99028    }
99029    #[allow(rustdoc::invalid_html_tags)]
99030    #[doc = "Optional. Foursquare identifier of the venue"]
99031    fn rhai_get_foursquare_id(&mut self) -> Option<String> {
99032        self.foursquare_id.as_ref().cloned()
99033    }
99034    #[allow(rustdoc::invalid_html_tags)]
99035    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
99036    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99037    pub fn get_foursquare_type<'a>(&'a self) -> Option<&'a str> {
99038        self.foursquare_type.as_ref().map(|v| v.as_str())
99039    }
99040    #[allow(rustdoc::invalid_html_tags)]
99041    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
99042    #[allow(clippy::needless_lifetimes)]
99043    pub fn set_foursquare_type<'a>(&'a mut self, foursquare_type: Option<String>) -> &'a mut Self {
99044        self.foursquare_type = foursquare_type;
99045        self
99046    }
99047    #[allow(rustdoc::invalid_html_tags)]
99048    #[doc = "Optional. Foursquare type of the venue. (For example, \"arts_entertainment/default\", \"arts_entertainment/aquarium\" or \"food/icecream\".)"]
99049    fn rhai_get_foursquare_type(&mut self) -> Option<String> {
99050        self.foursquare_type.as_ref().cloned()
99051    }
99052    #[allow(rustdoc::invalid_html_tags)]
99053    #[doc = "Optional. Google Places identifier of the venue"]
99054    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99055    pub fn get_google_place_id<'a>(&'a self) -> Option<&'a str> {
99056        self.google_place_id.as_ref().map(|v| v.as_str())
99057    }
99058    #[allow(rustdoc::invalid_html_tags)]
99059    #[doc = "Optional. Google Places identifier of the venue"]
99060    #[allow(clippy::needless_lifetimes)]
99061    pub fn set_google_place_id<'a>(&'a mut self, google_place_id: Option<String>) -> &'a mut Self {
99062        self.google_place_id = google_place_id;
99063        self
99064    }
99065    #[allow(rustdoc::invalid_html_tags)]
99066    #[doc = "Optional. Google Places identifier of the venue"]
99067    fn rhai_get_google_place_id(&mut self) -> Option<String> {
99068        self.google_place_id.as_ref().cloned()
99069    }
99070    #[allow(rustdoc::invalid_html_tags)]
99071    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
99072    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99073    pub fn get_google_place_type<'a>(&'a self) -> Option<&'a str> {
99074        self.google_place_type.as_ref().map(|v| v.as_str())
99075    }
99076    #[allow(rustdoc::invalid_html_tags)]
99077    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
99078    #[allow(clippy::needless_lifetimes)]
99079    pub fn set_google_place_type<'a>(
99080        &'a mut self,
99081        google_place_type: Option<String>,
99082    ) -> &'a mut Self {
99083        self.google_place_type = google_place_type;
99084        self
99085    }
99086    #[allow(rustdoc::invalid_html_tags)]
99087    #[doc = "Optional. Google Places type of the venue. (See supported types.)"]
99088    fn rhai_get_google_place_type(&mut self) -> Option<String> {
99089        self.google_place_type.as_ref().cloned()
99090    }
99091}
99092#[allow(dead_code)]
99093impl ChatBoostAdded {
99094    #[allow(clippy::too_many_arguments)]
99095    pub fn new(boost_count: i64) -> Self {
99096        Self { boost_count }
99097    }
99098    #[allow(rustdoc::invalid_html_tags)]
99099    #[doc = "Number of boosts added by the user"]
99100    #[allow(clippy::needless_lifetimes)]
99101    pub fn get_boost_count<'a>(&'a self) -> i64 {
99102        self.boost_count
99103    }
99104    #[allow(rustdoc::invalid_html_tags)]
99105    #[doc = "Number of boosts added by the user"]
99106    #[allow(clippy::needless_lifetimes)]
99107    pub fn set_boost_count<'a>(&'a mut self, boost_count: i64) -> &'a mut Self {
99108        self.boost_count = boost_count;
99109        self
99110    }
99111    #[allow(rustdoc::invalid_html_tags)]
99112    #[doc = "Number of boosts added by the user"]
99113    fn rhai_get_boost_count(&mut self) -> i64 {
99114        self.boost_count
99115    }
99116}
99117#[allow(dead_code)]
99118impl ReactionTypeCustomEmoji {
99119    #[allow(clippy::too_many_arguments)]
99120    pub fn new(custom_emoji_id: String) -> Self {
99121        Self {
99122            tg_type: "ReactionTypeCustomEmoji".to_owned(),
99123            custom_emoji_id,
99124        }
99125    }
99126    #[allow(rustdoc::invalid_html_tags)]
99127    #[doc = "Type of the reaction, always \"custom_emoji\""]
99128    #[allow(clippy::needless_lifetimes)]
99129    pub fn get_tg_type<'a>(&'a self) -> &'a str {
99130        self.tg_type.as_str()
99131    }
99132    #[allow(rustdoc::invalid_html_tags)]
99133    #[doc = "Type of the reaction, always \"custom_emoji\""]
99134    #[allow(clippy::needless_lifetimes)]
99135    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99136        self.tg_type = tg_type;
99137        self
99138    }
99139    #[allow(rustdoc::invalid_html_tags)]
99140    #[doc = "Type of the reaction, always \"custom_emoji\""]
99141    fn rhai_get_tg_type(&mut self) -> String {
99142        self.tg_type.clone()
99143    }
99144    #[allow(rustdoc::invalid_html_tags)]
99145    #[doc = "Custom emoji identifier"]
99146    #[allow(clippy::needless_lifetimes)]
99147    pub fn get_custom_emoji_id<'a>(&'a self) -> &'a str {
99148        self.custom_emoji_id.as_str()
99149    }
99150    #[allow(rustdoc::invalid_html_tags)]
99151    #[doc = "Custom emoji identifier"]
99152    #[allow(clippy::needless_lifetimes)]
99153    pub fn set_custom_emoji_id<'a>(&'a mut self, custom_emoji_id: String) -> &'a mut Self {
99154        self.custom_emoji_id = custom_emoji_id;
99155        self
99156    }
99157    #[allow(rustdoc::invalid_html_tags)]
99158    #[doc = "Custom emoji identifier"]
99159    fn rhai_get_custom_emoji_id(&mut self) -> String {
99160        self.custom_emoji_id.clone()
99161    }
99162}
99163#[allow(dead_code)]
99164impl LocationAddress {
99165    #[allow(clippy::too_many_arguments)]
99166    pub fn new(country_code: String) -> Self {
99167        Self {
99168            country_code,
99169            state: None,
99170            city: None,
99171            street: None,
99172        }
99173    }
99174    #[allow(rustdoc::invalid_html_tags)]
99175    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
99176    #[allow(clippy::needless_lifetimes)]
99177    pub fn get_country_code<'a>(&'a self) -> &'a str {
99178        self.country_code.as_str()
99179    }
99180    #[allow(rustdoc::invalid_html_tags)]
99181    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
99182    #[allow(clippy::needless_lifetimes)]
99183    pub fn set_country_code<'a>(&'a mut self, country_code: String) -> &'a mut Self {
99184        self.country_code = country_code;
99185        self
99186    }
99187    #[allow(rustdoc::invalid_html_tags)]
99188    #[doc = "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located"]
99189    fn rhai_get_country_code(&mut self) -> String {
99190        self.country_code.clone()
99191    }
99192    #[allow(rustdoc::invalid_html_tags)]
99193    #[doc = "Optional. State of the location"]
99194    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99195    pub fn get_state<'a>(&'a self) -> Option<&'a str> {
99196        self.state.as_ref().map(|v| v.as_str())
99197    }
99198    #[allow(rustdoc::invalid_html_tags)]
99199    #[doc = "Optional. State of the location"]
99200    #[allow(clippy::needless_lifetimes)]
99201    pub fn set_state<'a>(&'a mut self, state: Option<String>) -> &'a mut Self {
99202        self.state = state;
99203        self
99204    }
99205    #[allow(rustdoc::invalid_html_tags)]
99206    #[doc = "Optional. State of the location"]
99207    fn rhai_get_state(&mut self) -> Option<String> {
99208        self.state.as_ref().cloned()
99209    }
99210    #[allow(rustdoc::invalid_html_tags)]
99211    #[doc = "Optional. City of the location"]
99212    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99213    pub fn get_city<'a>(&'a self) -> Option<&'a str> {
99214        self.city.as_ref().map(|v| v.as_str())
99215    }
99216    #[allow(rustdoc::invalid_html_tags)]
99217    #[doc = "Optional. City of the location"]
99218    #[allow(clippy::needless_lifetimes)]
99219    pub fn set_city<'a>(&'a mut self, city: Option<String>) -> &'a mut Self {
99220        self.city = city;
99221        self
99222    }
99223    #[allow(rustdoc::invalid_html_tags)]
99224    #[doc = "Optional. City of the location"]
99225    fn rhai_get_city(&mut self) -> Option<String> {
99226        self.city.as_ref().cloned()
99227    }
99228    #[allow(rustdoc::invalid_html_tags)]
99229    #[doc = "Optional. Street address of the location"]
99230    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99231    pub fn get_street<'a>(&'a self) -> Option<&'a str> {
99232        self.street.as_ref().map(|v| v.as_str())
99233    }
99234    #[allow(rustdoc::invalid_html_tags)]
99235    #[doc = "Optional. Street address of the location"]
99236    #[allow(clippy::needless_lifetimes)]
99237    pub fn set_street<'a>(&'a mut self, street: Option<String>) -> &'a mut Self {
99238        self.street = street;
99239        self
99240    }
99241    #[allow(rustdoc::invalid_html_tags)]
99242    #[doc = "Optional. Street address of the location"]
99243    fn rhai_get_street(&mut self) -> Option<String> {
99244        self.street.as_ref().cloned()
99245    }
99246}
99247impl TraitPassportElementErrorDataField for PassportElementErrorDataField {
99248    #[allow(rustdoc::invalid_html_tags)]
99249    #[doc = "Error source, must be data"]
99250    #[allow(clippy::needless_lifetimes)]
99251    fn get_source<'a>(&'a self) -> &'a str {
99252        self.source.as_str()
99253    }
99254    #[allow(rustdoc::invalid_html_tags)]
99255    #[doc = "Error source, must be data"]
99256    #[allow(clippy::needless_lifetimes)]
99257    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99258        self.source = source;
99259        self
99260    }
99261    #[allow(rustdoc::invalid_html_tags)]
99262    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
99263    #[allow(clippy::needless_lifetimes)]
99264    fn get_tg_type<'a>(&'a self) -> &'a str {
99265        self.tg_type.as_str()
99266    }
99267    #[allow(rustdoc::invalid_html_tags)]
99268    #[doc = "The section of the user's Telegram Passport which has the error, one of \"personal_details\", \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"address\""]
99269    #[allow(clippy::needless_lifetimes)]
99270    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99271        self.tg_type = tg_type;
99272        self
99273    }
99274    #[allow(rustdoc::invalid_html_tags)]
99275    #[doc = "Name of the data field which has the error"]
99276    #[allow(clippy::needless_lifetimes)]
99277    fn get_field_name<'a>(&'a self) -> &'a str {
99278        self.field_name.as_str()
99279    }
99280    #[allow(rustdoc::invalid_html_tags)]
99281    #[doc = "Name of the data field which has the error"]
99282    #[allow(clippy::needless_lifetimes)]
99283    fn set_field_name<'a>(&'a mut self, field_name: String) -> &'a mut Self {
99284        self.field_name = field_name;
99285        self
99286    }
99287    #[allow(rustdoc::invalid_html_tags)]
99288    #[doc = "Base64-encoded data hash"]
99289    #[allow(clippy::needless_lifetimes)]
99290    fn get_data_hash<'a>(&'a self) -> &'a str {
99291        self.data_hash.as_str()
99292    }
99293    #[allow(rustdoc::invalid_html_tags)]
99294    #[doc = "Base64-encoded data hash"]
99295    #[allow(clippy::needless_lifetimes)]
99296    fn set_data_hash<'a>(&'a mut self, data_hash: String) -> &'a mut Self {
99297        self.data_hash = data_hash;
99298        self
99299    }
99300    #[allow(rustdoc::invalid_html_tags)]
99301    #[doc = "Error message"]
99302    #[allow(clippy::needless_lifetimes)]
99303    fn get_message<'a>(&'a self) -> &'a str {
99304        self.message.as_str()
99305    }
99306    #[allow(rustdoc::invalid_html_tags)]
99307    #[doc = "Error message"]
99308    #[allow(clippy::needless_lifetimes)]
99309    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99310        self.message = message;
99311        self
99312    }
99313}
99314impl TraitPassportElementErrorFrontSide for PassportElementErrorFrontSide {
99315    #[allow(rustdoc::invalid_html_tags)]
99316    #[doc = "Error source, must be front_side"]
99317    #[allow(clippy::needless_lifetimes)]
99318    fn get_source<'a>(&'a self) -> &'a str {
99319        self.source.as_str()
99320    }
99321    #[allow(rustdoc::invalid_html_tags)]
99322    #[doc = "Error source, must be front_side"]
99323    #[allow(clippy::needless_lifetimes)]
99324    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99325        self.source = source;
99326        self
99327    }
99328    #[allow(rustdoc::invalid_html_tags)]
99329    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
99330    #[allow(clippy::needless_lifetimes)]
99331    fn get_tg_type<'a>(&'a self) -> &'a str {
99332        self.tg_type.as_str()
99333    }
99334    #[allow(rustdoc::invalid_html_tags)]
99335    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
99336    #[allow(clippy::needless_lifetimes)]
99337    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99338        self.tg_type = tg_type;
99339        self
99340    }
99341    #[allow(rustdoc::invalid_html_tags)]
99342    #[doc = "Base64-encoded hash of the file with the front side of the document"]
99343    #[allow(clippy::needless_lifetimes)]
99344    fn get_file_hash<'a>(&'a self) -> &'a str {
99345        self.file_hash.as_str()
99346    }
99347    #[allow(rustdoc::invalid_html_tags)]
99348    #[doc = "Base64-encoded hash of the file with the front side of the document"]
99349    #[allow(clippy::needless_lifetimes)]
99350    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
99351        self.file_hash = file_hash;
99352        self
99353    }
99354    #[allow(rustdoc::invalid_html_tags)]
99355    #[doc = "Error message"]
99356    #[allow(clippy::needless_lifetimes)]
99357    fn get_message<'a>(&'a self) -> &'a str {
99358        self.message.as_str()
99359    }
99360    #[allow(rustdoc::invalid_html_tags)]
99361    #[doc = "Error message"]
99362    #[allow(clippy::needless_lifetimes)]
99363    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99364        self.message = message;
99365        self
99366    }
99367}
99368impl TraitPassportElementErrorReverseSide for PassportElementErrorReverseSide {
99369    #[allow(rustdoc::invalid_html_tags)]
99370    #[doc = "Error source, must be reverse_side"]
99371    #[allow(clippy::needless_lifetimes)]
99372    fn get_source<'a>(&'a self) -> &'a str {
99373        self.source.as_str()
99374    }
99375    #[allow(rustdoc::invalid_html_tags)]
99376    #[doc = "Error source, must be reverse_side"]
99377    #[allow(clippy::needless_lifetimes)]
99378    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99379        self.source = source;
99380        self
99381    }
99382    #[allow(rustdoc::invalid_html_tags)]
99383    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
99384    #[allow(clippy::needless_lifetimes)]
99385    fn get_tg_type<'a>(&'a self) -> &'a str {
99386        self.tg_type.as_str()
99387    }
99388    #[allow(rustdoc::invalid_html_tags)]
99389    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"driver_license\", \"identity_card\""]
99390    #[allow(clippy::needless_lifetimes)]
99391    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99392        self.tg_type = tg_type;
99393        self
99394    }
99395    #[allow(rustdoc::invalid_html_tags)]
99396    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
99397    #[allow(clippy::needless_lifetimes)]
99398    fn get_file_hash<'a>(&'a self) -> &'a str {
99399        self.file_hash.as_str()
99400    }
99401    #[allow(rustdoc::invalid_html_tags)]
99402    #[doc = "Base64-encoded hash of the file with the reverse side of the document"]
99403    #[allow(clippy::needless_lifetimes)]
99404    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
99405        self.file_hash = file_hash;
99406        self
99407    }
99408    #[allow(rustdoc::invalid_html_tags)]
99409    #[doc = "Error message"]
99410    #[allow(clippy::needless_lifetimes)]
99411    fn get_message<'a>(&'a self) -> &'a str {
99412        self.message.as_str()
99413    }
99414    #[allow(rustdoc::invalid_html_tags)]
99415    #[doc = "Error message"]
99416    #[allow(clippy::needless_lifetimes)]
99417    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99418        self.message = message;
99419        self
99420    }
99421}
99422impl TraitPassportElementErrorSelfie for PassportElementErrorSelfie {
99423    #[allow(rustdoc::invalid_html_tags)]
99424    #[doc = "Error source, must be selfie"]
99425    #[allow(clippy::needless_lifetimes)]
99426    fn get_source<'a>(&'a self) -> &'a str {
99427        self.source.as_str()
99428    }
99429    #[allow(rustdoc::invalid_html_tags)]
99430    #[doc = "Error source, must be selfie"]
99431    #[allow(clippy::needless_lifetimes)]
99432    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99433        self.source = source;
99434        self
99435    }
99436    #[allow(rustdoc::invalid_html_tags)]
99437    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
99438    #[allow(clippy::needless_lifetimes)]
99439    fn get_tg_type<'a>(&'a self) -> &'a str {
99440        self.tg_type.as_str()
99441    }
99442    #[allow(rustdoc::invalid_html_tags)]
99443    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\""]
99444    #[allow(clippy::needless_lifetimes)]
99445    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99446        self.tg_type = tg_type;
99447        self
99448    }
99449    #[allow(rustdoc::invalid_html_tags)]
99450    #[doc = "Base64-encoded hash of the file with the selfie"]
99451    #[allow(clippy::needless_lifetimes)]
99452    fn get_file_hash<'a>(&'a self) -> &'a str {
99453        self.file_hash.as_str()
99454    }
99455    #[allow(rustdoc::invalid_html_tags)]
99456    #[doc = "Base64-encoded hash of the file with the selfie"]
99457    #[allow(clippy::needless_lifetimes)]
99458    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
99459        self.file_hash = file_hash;
99460        self
99461    }
99462    #[allow(rustdoc::invalid_html_tags)]
99463    #[doc = "Error message"]
99464    #[allow(clippy::needless_lifetimes)]
99465    fn get_message<'a>(&'a self) -> &'a str {
99466        self.message.as_str()
99467    }
99468    #[allow(rustdoc::invalid_html_tags)]
99469    #[doc = "Error message"]
99470    #[allow(clippy::needless_lifetimes)]
99471    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99472        self.message = message;
99473        self
99474    }
99475}
99476impl TraitPassportElementErrorFile for PassportElementErrorFile {
99477    #[allow(rustdoc::invalid_html_tags)]
99478    #[doc = "Error source, must be file"]
99479    #[allow(clippy::needless_lifetimes)]
99480    fn get_source<'a>(&'a self) -> &'a str {
99481        self.source.as_str()
99482    }
99483    #[allow(rustdoc::invalid_html_tags)]
99484    #[doc = "Error source, must be file"]
99485    #[allow(clippy::needless_lifetimes)]
99486    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99487        self.source = source;
99488        self
99489    }
99490    #[allow(rustdoc::invalid_html_tags)]
99491    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99492    #[allow(clippy::needless_lifetimes)]
99493    fn get_tg_type<'a>(&'a self) -> &'a str {
99494        self.tg_type.as_str()
99495    }
99496    #[allow(rustdoc::invalid_html_tags)]
99497    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99498    #[allow(clippy::needless_lifetimes)]
99499    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99500        self.tg_type = tg_type;
99501        self
99502    }
99503    #[allow(rustdoc::invalid_html_tags)]
99504    #[doc = "Base64-encoded file hash"]
99505    #[allow(clippy::needless_lifetimes)]
99506    fn get_file_hash<'a>(&'a self) -> &'a str {
99507        self.file_hash.as_str()
99508    }
99509    #[allow(rustdoc::invalid_html_tags)]
99510    #[doc = "Base64-encoded file hash"]
99511    #[allow(clippy::needless_lifetimes)]
99512    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
99513        self.file_hash = file_hash;
99514        self
99515    }
99516    #[allow(rustdoc::invalid_html_tags)]
99517    #[doc = "Error message"]
99518    #[allow(clippy::needless_lifetimes)]
99519    fn get_message<'a>(&'a self) -> &'a str {
99520        self.message.as_str()
99521    }
99522    #[allow(rustdoc::invalid_html_tags)]
99523    #[doc = "Error message"]
99524    #[allow(clippy::needless_lifetimes)]
99525    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99526        self.message = message;
99527        self
99528    }
99529}
99530impl TraitPassportElementErrorFiles for PassportElementErrorFiles {
99531    #[allow(rustdoc::invalid_html_tags)]
99532    #[doc = "Error source, must be files"]
99533    #[allow(clippy::needless_lifetimes)]
99534    fn get_source<'a>(&'a self) -> &'a str {
99535        self.source.as_str()
99536    }
99537    #[allow(rustdoc::invalid_html_tags)]
99538    #[doc = "Error source, must be files"]
99539    #[allow(clippy::needless_lifetimes)]
99540    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99541        self.source = source;
99542        self
99543    }
99544    #[allow(rustdoc::invalid_html_tags)]
99545    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99546    #[allow(clippy::needless_lifetimes)]
99547    fn get_tg_type<'a>(&'a self) -> &'a str {
99548        self.tg_type.as_str()
99549    }
99550    #[allow(rustdoc::invalid_html_tags)]
99551    #[doc = "The section of the user's Telegram Passport which has the issue, one of \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99552    #[allow(clippy::needless_lifetimes)]
99553    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99554        self.tg_type = tg_type;
99555        self
99556    }
99557    #[allow(rustdoc::invalid_html_tags)]
99558    #[doc = "List of base64-encoded file hashes"]
99559    #[allow(clippy::needless_lifetimes)]
99560    fn get_file_hashes<'a>(&'a self) -> &'a Vec<String> {
99561        &self.file_hashes
99562    }
99563    #[allow(rustdoc::invalid_html_tags)]
99564    #[doc = "List of base64-encoded file hashes"]
99565    #[allow(clippy::needless_lifetimes)]
99566    fn set_file_hashes<'a>(&'a mut self, file_hashes: Vec<String>) -> &'a mut Self {
99567        self.file_hashes = file_hashes;
99568        self
99569    }
99570    #[allow(rustdoc::invalid_html_tags)]
99571    #[doc = "Error message"]
99572    #[allow(clippy::needless_lifetimes)]
99573    fn get_message<'a>(&'a self) -> &'a str {
99574        self.message.as_str()
99575    }
99576    #[allow(rustdoc::invalid_html_tags)]
99577    #[doc = "Error message"]
99578    #[allow(clippy::needless_lifetimes)]
99579    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99580        self.message = message;
99581        self
99582    }
99583}
99584impl TraitPassportElementErrorTranslationFile for PassportElementErrorTranslationFile {
99585    #[allow(rustdoc::invalid_html_tags)]
99586    #[doc = "Error source, must be translation_file"]
99587    #[allow(clippy::needless_lifetimes)]
99588    fn get_source<'a>(&'a self) -> &'a str {
99589        self.source.as_str()
99590    }
99591    #[allow(rustdoc::invalid_html_tags)]
99592    #[doc = "Error source, must be translation_file"]
99593    #[allow(clippy::needless_lifetimes)]
99594    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99595        self.source = source;
99596        self
99597    }
99598    #[allow(rustdoc::invalid_html_tags)]
99599    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99600    #[allow(clippy::needless_lifetimes)]
99601    fn get_tg_type<'a>(&'a self) -> &'a str {
99602        self.tg_type.as_str()
99603    }
99604    #[allow(rustdoc::invalid_html_tags)]
99605    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99606    #[allow(clippy::needless_lifetimes)]
99607    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99608        self.tg_type = tg_type;
99609        self
99610    }
99611    #[allow(rustdoc::invalid_html_tags)]
99612    #[doc = "Base64-encoded file hash"]
99613    #[allow(clippy::needless_lifetimes)]
99614    fn get_file_hash<'a>(&'a self) -> &'a str {
99615        self.file_hash.as_str()
99616    }
99617    #[allow(rustdoc::invalid_html_tags)]
99618    #[doc = "Base64-encoded file hash"]
99619    #[allow(clippy::needless_lifetimes)]
99620    fn set_file_hash<'a>(&'a mut self, file_hash: String) -> &'a mut Self {
99621        self.file_hash = file_hash;
99622        self
99623    }
99624    #[allow(rustdoc::invalid_html_tags)]
99625    #[doc = "Error message"]
99626    #[allow(clippy::needless_lifetimes)]
99627    fn get_message<'a>(&'a self) -> &'a str {
99628        self.message.as_str()
99629    }
99630    #[allow(rustdoc::invalid_html_tags)]
99631    #[doc = "Error message"]
99632    #[allow(clippy::needless_lifetimes)]
99633    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99634        self.message = message;
99635        self
99636    }
99637}
99638impl TraitPassportElementErrorTranslationFiles for PassportElementErrorTranslationFiles {
99639    #[allow(rustdoc::invalid_html_tags)]
99640    #[doc = "Error source, must be translation_files"]
99641    #[allow(clippy::needless_lifetimes)]
99642    fn get_source<'a>(&'a self) -> &'a str {
99643        self.source.as_str()
99644    }
99645    #[allow(rustdoc::invalid_html_tags)]
99646    #[doc = "Error source, must be translation_files"]
99647    #[allow(clippy::needless_lifetimes)]
99648    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99649        self.source = source;
99650        self
99651    }
99652    #[allow(rustdoc::invalid_html_tags)]
99653    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99654    #[allow(clippy::needless_lifetimes)]
99655    fn get_tg_type<'a>(&'a self) -> &'a str {
99656        self.tg_type.as_str()
99657    }
99658    #[allow(rustdoc::invalid_html_tags)]
99659    #[doc = "Type of element of the user's Telegram Passport which has the issue, one of \"passport\", \"driver_license\", \"identity_card\", \"internal_passport\", \"utility_bill\", \"bank_statement\", \"rental_agreement\", \"passport_registration\", \"temporary_registration\""]
99660    #[allow(clippy::needless_lifetimes)]
99661    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99662        self.tg_type = tg_type;
99663        self
99664    }
99665    #[allow(rustdoc::invalid_html_tags)]
99666    #[doc = "List of base64-encoded file hashes"]
99667    #[allow(clippy::needless_lifetimes)]
99668    fn get_file_hashes<'a>(&'a self) -> &'a Vec<String> {
99669        &self.file_hashes
99670    }
99671    #[allow(rustdoc::invalid_html_tags)]
99672    #[doc = "List of base64-encoded file hashes"]
99673    #[allow(clippy::needless_lifetimes)]
99674    fn set_file_hashes<'a>(&'a mut self, file_hashes: Vec<String>) -> &'a mut Self {
99675        self.file_hashes = file_hashes;
99676        self
99677    }
99678    #[allow(rustdoc::invalid_html_tags)]
99679    #[doc = "Error message"]
99680    #[allow(clippy::needless_lifetimes)]
99681    fn get_message<'a>(&'a self) -> &'a str {
99682        self.message.as_str()
99683    }
99684    #[allow(rustdoc::invalid_html_tags)]
99685    #[doc = "Error message"]
99686    #[allow(clippy::needless_lifetimes)]
99687    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99688        self.message = message;
99689        self
99690    }
99691}
99692impl TraitPassportElementErrorUnspecified for PassportElementErrorUnspecified {
99693    #[allow(rustdoc::invalid_html_tags)]
99694    #[doc = "Error source, must be unspecified"]
99695    #[allow(clippy::needless_lifetimes)]
99696    fn get_source<'a>(&'a self) -> &'a str {
99697        self.source.as_str()
99698    }
99699    #[allow(rustdoc::invalid_html_tags)]
99700    #[doc = "Error source, must be unspecified"]
99701    #[allow(clippy::needless_lifetimes)]
99702    fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self {
99703        self.source = source;
99704        self
99705    }
99706    #[allow(rustdoc::invalid_html_tags)]
99707    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
99708    #[allow(clippy::needless_lifetimes)]
99709    fn get_tg_type<'a>(&'a self) -> &'a str {
99710        self.tg_type.as_str()
99711    }
99712    #[allow(rustdoc::invalid_html_tags)]
99713    #[doc = "Type of element of the user's Telegram Passport which has the issue"]
99714    #[allow(clippy::needless_lifetimes)]
99715    fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99716        self.tg_type = tg_type;
99717        self
99718    }
99719    #[allow(rustdoc::invalid_html_tags)]
99720    #[doc = "Base64-encoded element hash"]
99721    #[allow(clippy::needless_lifetimes)]
99722    fn get_element_hash<'a>(&'a self) -> &'a str {
99723        self.element_hash.as_str()
99724    }
99725    #[allow(rustdoc::invalid_html_tags)]
99726    #[doc = "Base64-encoded element hash"]
99727    #[allow(clippy::needless_lifetimes)]
99728    fn set_element_hash<'a>(&'a mut self, element_hash: String) -> &'a mut Self {
99729        self.element_hash = element_hash;
99730        self
99731    }
99732    #[allow(rustdoc::invalid_html_tags)]
99733    #[doc = "Error message"]
99734    #[allow(clippy::needless_lifetimes)]
99735    fn get_message<'a>(&'a self) -> &'a str {
99736        self.message.as_str()
99737    }
99738    #[allow(rustdoc::invalid_html_tags)]
99739    #[doc = "Error message"]
99740    #[allow(clippy::needless_lifetimes)]
99741    fn set_message<'a>(&'a mut self, message: String) -> &'a mut Self {
99742        self.message = message;
99743        self
99744    }
99745}
99746#[allow(dead_code)]
99747impl OwnedGiftRegular {
99748    #[allow(clippy::too_many_arguments)]
99749    pub fn new<A: Into<Gift>>(gift: A, send_date: i64) -> Self {
99750        Self {
99751            tg_type: "OwnedGiftRegular".to_owned(),
99752            gift: BoxWrapper::new_unbox(gift.into()),
99753            send_date,
99754            owned_gift_id: None,
99755            sender_user: None,
99756            text: None,
99757            entities: None,
99758            is_private: None,
99759            is_saved: None,
99760            can_be_upgraded: None,
99761            was_refunded: None,
99762            convert_star_count: None,
99763            prepaid_upgrade_star_count: None,
99764        }
99765    }
99766    #[allow(rustdoc::invalid_html_tags)]
99767    #[doc = "Type of the gift, always \"regular\""]
99768    #[allow(clippy::needless_lifetimes)]
99769    pub fn get_tg_type<'a>(&'a self) -> &'a str {
99770        self.tg_type.as_str()
99771    }
99772    #[allow(rustdoc::invalid_html_tags)]
99773    #[doc = "Type of the gift, always \"regular\""]
99774    #[allow(clippy::needless_lifetimes)]
99775    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
99776        self.tg_type = tg_type;
99777        self
99778    }
99779    #[allow(rustdoc::invalid_html_tags)]
99780    #[doc = "Type of the gift, always \"regular\""]
99781    fn rhai_get_tg_type(&mut self) -> String {
99782        self.tg_type.clone()
99783    }
99784    #[allow(rustdoc::invalid_html_tags)]
99785    #[doc = "Information about the regular gift"]
99786    #[allow(clippy::needless_lifetimes)]
99787    pub fn get_gift<'a>(&'a self) -> &'a Gift {
99788        &self.gift
99789    }
99790    #[allow(rustdoc::invalid_html_tags)]
99791    #[doc = "Information about the regular gift"]
99792    #[allow(clippy::needless_lifetimes)]
99793    pub fn set_gift<'a>(&'a mut self, gift: Gift) -> &'a mut Self {
99794        self.gift = BoxWrapper(Unbox(gift));
99795        self
99796    }
99797    #[allow(rustdoc::invalid_html_tags)]
99798    #[doc = "Information about the regular gift"]
99799    fn rhai_get_gift(&mut self) -> Gift {
99800        self.gift.clone().into()
99801    }
99802    #[allow(rustdoc::invalid_html_tags)]
99803    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
99804    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99805    pub fn get_owned_gift_id<'a>(&'a self) -> Option<&'a str> {
99806        self.owned_gift_id.as_ref().map(|v| v.as_str())
99807    }
99808    #[allow(rustdoc::invalid_html_tags)]
99809    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
99810    #[allow(clippy::needless_lifetimes)]
99811    pub fn set_owned_gift_id<'a>(&'a mut self, owned_gift_id: Option<String>) -> &'a mut Self {
99812        self.owned_gift_id = owned_gift_id;
99813        self
99814    }
99815    #[allow(rustdoc::invalid_html_tags)]
99816    #[doc = "Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only"]
99817    fn rhai_get_owned_gift_id(&mut self) -> Option<String> {
99818        self.owned_gift_id.as_ref().cloned()
99819    }
99820    #[allow(rustdoc::invalid_html_tags)]
99821    #[doc = "Optional. Sender of the gift if it is a known user"]
99822    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99823    pub fn get_sender_user<'a>(&'a self) -> Option<&'a User> {
99824        self.sender_user.as_ref().map(|v| v.inner_ref())
99825    }
99826    #[allow(rustdoc::invalid_html_tags)]
99827    #[doc = "Optional. Sender of the gift if it is a known user"]
99828    #[allow(clippy::needless_lifetimes)]
99829    pub fn set_sender_user<'a>(&'a mut self, sender_user: Option<User>) -> &'a mut Self {
99830        self.sender_user = sender_user.map(|sender_user| BoxWrapper(Unbox(sender_user)));
99831        self
99832    }
99833    #[allow(rustdoc::invalid_html_tags)]
99834    #[doc = "Optional. Sender of the gift if it is a known user"]
99835    fn rhai_get_sender_user(&mut self) -> Option<User> {
99836        self.sender_user.as_ref().map(|v| v.clone().into())
99837    }
99838    #[allow(rustdoc::invalid_html_tags)]
99839    #[doc = "Date the gift was sent in Unix time"]
99840    #[allow(clippy::needless_lifetimes)]
99841    pub fn get_send_date<'a>(&'a self) -> i64 {
99842        self.send_date
99843    }
99844    #[allow(rustdoc::invalid_html_tags)]
99845    #[doc = "Date the gift was sent in Unix time"]
99846    #[allow(clippy::needless_lifetimes)]
99847    pub fn set_send_date<'a>(&'a mut self, send_date: i64) -> &'a mut Self {
99848        self.send_date = send_date;
99849        self
99850    }
99851    #[allow(rustdoc::invalid_html_tags)]
99852    #[doc = "Date the gift was sent in Unix time"]
99853    fn rhai_get_send_date(&mut self) -> i64 {
99854        self.send_date
99855    }
99856    #[allow(rustdoc::invalid_html_tags)]
99857    #[doc = "Optional. Text of the message that was added to the gift"]
99858    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99859    pub fn get_text<'a>(&'a self) -> Option<&'a str> {
99860        self.text.as_ref().map(|v| v.as_str())
99861    }
99862    #[allow(rustdoc::invalid_html_tags)]
99863    #[doc = "Optional. Text of the message that was added to the gift"]
99864    #[allow(clippy::needless_lifetimes)]
99865    pub fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self {
99866        self.text = text;
99867        self
99868    }
99869    #[allow(rustdoc::invalid_html_tags)]
99870    #[doc = "Optional. Text of the message that was added to the gift"]
99871    fn rhai_get_text(&mut self) -> Option<String> {
99872        self.text.as_ref().cloned()
99873    }
99874    #[allow(rustdoc::invalid_html_tags)]
99875    #[doc = "Optional. Special entities that appear in the text"]
99876    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99877    pub fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
99878        self.entities.as_ref()
99879    }
99880    #[allow(rustdoc::invalid_html_tags)]
99881    #[doc = "Optional. Special entities that appear in the text"]
99882    #[allow(clippy::needless_lifetimes)]
99883    pub fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
99884        self.entities = entities;
99885        self
99886    }
99887    #[allow(rustdoc::invalid_html_tags)]
99888    #[doc = "Optional. Special entities that appear in the text"]
99889    fn rhai_get_entities(&mut self) -> Option<Vec<MessageEntity>> {
99890        self.entities.as_ref().cloned()
99891    }
99892    #[allow(rustdoc::invalid_html_tags)]
99893    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
99894    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99895    pub fn get_is_private<'a>(&'a self) -> Option<bool> {
99896        self.is_private.as_ref().map(|v| *v)
99897    }
99898    #[allow(rustdoc::invalid_html_tags)]
99899    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
99900    #[allow(clippy::needless_lifetimes)]
99901    pub fn set_is_private<'a>(&'a mut self, is_private: Option<bool>) -> &'a mut Self {
99902        self.is_private = is_private;
99903        self
99904    }
99905    #[allow(rustdoc::invalid_html_tags)]
99906    #[doc = "Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them"]
99907    fn rhai_get_is_private(&mut self) -> Option<bool> {
99908        self.is_private.as_ref().copied()
99909    }
99910    #[allow(rustdoc::invalid_html_tags)]
99911    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
99912    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99913    pub fn get_is_saved<'a>(&'a self) -> Option<bool> {
99914        self.is_saved.as_ref().map(|v| *v)
99915    }
99916    #[allow(rustdoc::invalid_html_tags)]
99917    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
99918    #[allow(clippy::needless_lifetimes)]
99919    pub fn set_is_saved<'a>(&'a mut self, is_saved: Option<bool>) -> &'a mut Self {
99920        self.is_saved = is_saved;
99921        self
99922    }
99923    #[allow(rustdoc::invalid_html_tags)]
99924    #[doc = "Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only"]
99925    fn rhai_get_is_saved(&mut self) -> Option<bool> {
99926        self.is_saved.as_ref().copied()
99927    }
99928    #[allow(rustdoc::invalid_html_tags)]
99929    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
99930    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99931    pub fn get_can_be_upgraded<'a>(&'a self) -> Option<bool> {
99932        self.can_be_upgraded.as_ref().map(|v| *v)
99933    }
99934    #[allow(rustdoc::invalid_html_tags)]
99935    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
99936    #[allow(clippy::needless_lifetimes)]
99937    pub fn set_can_be_upgraded<'a>(&'a mut self, can_be_upgraded: Option<bool>) -> &'a mut Self {
99938        self.can_be_upgraded = can_be_upgraded;
99939        self
99940    }
99941    #[allow(rustdoc::invalid_html_tags)]
99942    #[doc = "Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only"]
99943    fn rhai_get_can_be_upgraded(&mut self) -> Option<bool> {
99944        self.can_be_upgraded.as_ref().copied()
99945    }
99946    #[allow(rustdoc::invalid_html_tags)]
99947    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
99948    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99949    pub fn get_was_refunded<'a>(&'a self) -> Option<bool> {
99950        self.was_refunded.as_ref().map(|v| *v)
99951    }
99952    #[allow(rustdoc::invalid_html_tags)]
99953    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
99954    #[allow(clippy::needless_lifetimes)]
99955    pub fn set_was_refunded<'a>(&'a mut self, was_refunded: Option<bool>) -> &'a mut Self {
99956        self.was_refunded = was_refunded;
99957        self
99958    }
99959    #[allow(rustdoc::invalid_html_tags)]
99960    #[doc = "Optional. True, if the gift was refunded and isn't available anymore"]
99961    fn rhai_get_was_refunded(&mut self) -> Option<bool> {
99962        self.was_refunded.as_ref().copied()
99963    }
99964    #[allow(rustdoc::invalid_html_tags)]
99965    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
99966    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99967    pub fn get_convert_star_count<'a>(&'a self) -> Option<i64> {
99968        self.convert_star_count.as_ref().map(|v| *v)
99969    }
99970    #[allow(rustdoc::invalid_html_tags)]
99971    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
99972    #[allow(clippy::needless_lifetimes)]
99973    pub fn set_convert_star_count<'a>(
99974        &'a mut self,
99975        convert_star_count: Option<i64>,
99976    ) -> &'a mut Self {
99977        self.convert_star_count = convert_star_count;
99978        self
99979    }
99980    #[allow(rustdoc::invalid_html_tags)]
99981    #[doc = "Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars"]
99982    fn rhai_get_convert_star_count(&mut self) -> Option<i64> {
99983        self.convert_star_count.as_ref().copied()
99984    }
99985    #[allow(rustdoc::invalid_html_tags)]
99986    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
99987    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
99988    pub fn get_prepaid_upgrade_star_count<'a>(&'a self) -> Option<i64> {
99989        self.prepaid_upgrade_star_count.as_ref().map(|v| *v)
99990    }
99991    #[allow(rustdoc::invalid_html_tags)]
99992    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
99993    #[allow(clippy::needless_lifetimes)]
99994    pub fn set_prepaid_upgrade_star_count<'a>(
99995        &'a mut self,
99996        prepaid_upgrade_star_count: Option<i64>,
99997    ) -> &'a mut Self {
99998        self.prepaid_upgrade_star_count = prepaid_upgrade_star_count;
99999        self
100000    }
100001    #[allow(rustdoc::invalid_html_tags)]
100002    #[doc = "Optional. Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift"]
100003    fn rhai_get_prepaid_upgrade_star_count(&mut self) -> Option<i64> {
100004        self.prepaid_upgrade_star_count.as_ref().copied()
100005    }
100006}
100007#[allow(dead_code)]
100008impl InlineKeyboardMarkup {
100009    #[allow(clippy::too_many_arguments)]
100010    pub fn new(inline_keyboard: Vec<Vec<InlineKeyboardButton>>) -> Self {
100011        Self { inline_keyboard }
100012    }
100013    #[allow(rustdoc::invalid_html_tags)]
100014    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
100015    #[allow(clippy::needless_lifetimes)]
100016    pub fn get_inline_keyboard<'a>(&'a self) -> &'a Vec<Vec<InlineKeyboardButton>> {
100017        &self.inline_keyboard
100018    }
100019    #[allow(rustdoc::invalid_html_tags)]
100020    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
100021    #[allow(clippy::needless_lifetimes)]
100022    pub fn set_inline_keyboard<'a>(
100023        &'a mut self,
100024        inline_keyboard: Vec<Vec<InlineKeyboardButton>>,
100025    ) -> &'a mut Self {
100026        self.inline_keyboard = inline_keyboard;
100027        self
100028    }
100029    #[allow(rustdoc::invalid_html_tags)]
100030    #[doc = "Array of button rows, each represented by an Array of InlineKeyboardButton objects"]
100031    fn rhai_get_inline_keyboard(&mut self) -> Vec<Vec<InlineKeyboardButton>> {
100032        self.inline_keyboard.clone()
100033    }
100034}
100035#[allow(dead_code)]
100036impl StoryArea {
100037    #[allow(clippy::too_many_arguments)]
100038    pub fn new<A: Into<StoryAreaPosition>>(position: A, tg_type: StoryAreaType) -> Self {
100039        Self {
100040            tg_type,
100041            position: BoxWrapper::new_unbox(position.into()),
100042        }
100043    }
100044    #[allow(rustdoc::invalid_html_tags)]
100045    #[doc = "Position of the area"]
100046    #[allow(clippy::needless_lifetimes)]
100047    pub fn get_position<'a>(&'a self) -> &'a StoryAreaPosition {
100048        &self.position
100049    }
100050    #[allow(rustdoc::invalid_html_tags)]
100051    #[doc = "Position of the area"]
100052    #[allow(clippy::needless_lifetimes)]
100053    pub fn set_position<'a>(&'a mut self, position: StoryAreaPosition) -> &'a mut Self {
100054        self.position = BoxWrapper(Unbox(position));
100055        self
100056    }
100057    #[allow(rustdoc::invalid_html_tags)]
100058    #[doc = "Position of the area"]
100059    fn rhai_get_position(&mut self) -> StoryAreaPosition {
100060        self.position.clone().into()
100061    }
100062    #[allow(rustdoc::invalid_html_tags)]
100063    #[doc = "Type of the area"]
100064    #[allow(clippy::needless_lifetimes)]
100065    pub fn get_tg_type<'a>(&'a self) -> &'a StoryAreaType {
100066        &self.tg_type
100067    }
100068    #[allow(rustdoc::invalid_html_tags)]
100069    #[doc = "Type of the area"]
100070    #[allow(clippy::needless_lifetimes)]
100071    pub fn set_tg_type<'a>(&'a mut self, tg_type: StoryAreaType) -> &'a mut Self {
100072        self.tg_type = tg_type;
100073        self
100074    }
100075    #[allow(rustdoc::invalid_html_tags)]
100076    #[doc = "Type of the area"]
100077    fn rhai_get_tg_type(&mut self) -> StoryAreaType {
100078        self.tg_type.clone()
100079    }
100080}
100081impl TraitMessage for Message {
100082    #[allow(rustdoc::invalid_html_tags)]
100083    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
100084    #[allow(clippy::needless_lifetimes)]
100085    fn get_message_id<'a>(&'a self) -> i64 {
100086        self.message_id
100087    }
100088    #[allow(rustdoc::invalid_html_tags)]
100089    #[doc = "Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent"]
100090    #[allow(clippy::needless_lifetimes)]
100091    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
100092        self.message_id = message_id;
100093        self
100094    }
100095    #[allow(rustdoc::invalid_html_tags)]
100096    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
100097    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100098    fn get_message_thread_id<'a>(&'a self) -> Option<i64> {
100099        self.message_thread_id.as_ref().map(|v| *v)
100100    }
100101    #[allow(rustdoc::invalid_html_tags)]
100102    #[doc = "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only"]
100103    #[allow(clippy::needless_lifetimes)]
100104    fn set_message_thread_id<'a>(&'a mut self, message_thread_id: Option<i64>) -> &'a mut Self {
100105        self.message_thread_id = message_thread_id;
100106        self
100107    }
100108    #[allow(rustdoc::invalid_html_tags)]
100109    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
100110    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100111    fn get_direct_messages_topic<'a>(&'a self) -> Option<&'a DirectMessagesTopic> {
100112        self.direct_messages_topic.as_ref().map(|v| v.inner_ref())
100113    }
100114    #[allow(rustdoc::invalid_html_tags)]
100115    #[doc = "Optional. Information about the direct messages chat topic that contains the message"]
100116    #[allow(clippy::needless_lifetimes)]
100117    fn set_direct_messages_topic<'a>(
100118        &'a mut self,
100119        direct_messages_topic: Option<DirectMessagesTopic>,
100120    ) -> &'a mut Self {
100121        self.direct_messages_topic = direct_messages_topic
100122            .map(|direct_messages_topic| BoxWrapper(Unbox(direct_messages_topic)));
100123        self
100124    }
100125    #[allow(rustdoc::invalid_html_tags)]
100126    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
100127    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100128    fn get_from<'a>(&'a self) -> Option<&'a User> {
100129        self.from.as_ref().map(|v| v.inner_ref())
100130    }
100131    #[allow(rustdoc::invalid_html_tags)]
100132    #[doc = "Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats"]
100133    #[allow(clippy::needless_lifetimes)]
100134    fn set_from<'a>(&'a mut self, from: Option<User>) -> &'a mut Self {
100135        self.from = from.map(|from| BoxWrapper(Unbox(from)));
100136        self
100137    }
100138    #[allow(rustdoc::invalid_html_tags)]
100139    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
100140    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100141    fn get_sender_chat<'a>(&'a self) -> Option<&'a Chat> {
100142        self.sender_chat.as_ref().map(|v| v.inner_ref())
100143    }
100144    #[allow(rustdoc::invalid_html_tags)]
100145    #[doc = "Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats."]
100146    #[allow(clippy::needless_lifetimes)]
100147    fn set_sender_chat<'a>(&'a mut self, sender_chat: Option<Chat>) -> &'a mut Self {
100148        self.sender_chat = sender_chat.map(|sender_chat| BoxWrapper(Unbox(sender_chat)));
100149        self
100150    }
100151    #[allow(rustdoc::invalid_html_tags)]
100152    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
100153    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100154    fn get_sender_boost_count<'a>(&'a self) -> Option<i64> {
100155        self.sender_boost_count.as_ref().map(|v| *v)
100156    }
100157    #[allow(rustdoc::invalid_html_tags)]
100158    #[doc = "Optional. If the sender of the message boosted the chat, the number of boosts added by the user"]
100159    #[allow(clippy::needless_lifetimes)]
100160    fn set_sender_boost_count<'a>(&'a mut self, sender_boost_count: Option<i64>) -> &'a mut Self {
100161        self.sender_boost_count = sender_boost_count;
100162        self
100163    }
100164    #[allow(rustdoc::invalid_html_tags)]
100165    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
100166    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100167    fn get_sender_business_bot<'a>(&'a self) -> Option<&'a User> {
100168        self.sender_business_bot.as_ref().map(|v| v.inner_ref())
100169    }
100170    #[allow(rustdoc::invalid_html_tags)]
100171    #[doc = "Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."]
100172    #[allow(clippy::needless_lifetimes)]
100173    fn set_sender_business_bot<'a>(
100174        &'a mut self,
100175        sender_business_bot: Option<User>,
100176    ) -> &'a mut Self {
100177        self.sender_business_bot =
100178            sender_business_bot.map(|sender_business_bot| BoxWrapper(Unbox(sender_business_bot)));
100179        self
100180    }
100181    #[allow(rustdoc::invalid_html_tags)]
100182    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
100183    #[allow(clippy::needless_lifetimes)]
100184    fn get_date<'a>(&'a self) -> i64 {
100185        self.date
100186    }
100187    #[allow(rustdoc::invalid_html_tags)]
100188    #[doc = "Date the message was sent in Unix time. It is always a positive number, representing a valid date."]
100189    #[allow(clippy::needless_lifetimes)]
100190    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
100191        self.date = date;
100192        self
100193    }
100194    #[allow(rustdoc::invalid_html_tags)]
100195    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
100196    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100197    fn get_business_connection_id<'a>(&'a self) -> Option<&'a str> {
100198        self.business_connection_id.as_ref().map(|v| v.as_str())
100199    }
100200    #[allow(rustdoc::invalid_html_tags)]
100201    #[doc = "Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."]
100202    #[allow(clippy::needless_lifetimes)]
100203    fn set_business_connection_id<'a>(
100204        &'a mut self,
100205        business_connection_id: Option<String>,
100206    ) -> &'a mut Self {
100207        self.business_connection_id = business_connection_id;
100208        self
100209    }
100210    #[allow(rustdoc::invalid_html_tags)]
100211    #[doc = "Chat the message belongs to"]
100212    #[allow(clippy::needless_lifetimes)]
100213    fn get_chat<'a>(&'a self) -> &'a Chat {
100214        &self.chat
100215    }
100216    #[allow(rustdoc::invalid_html_tags)]
100217    #[doc = "Chat the message belongs to"]
100218    #[allow(clippy::needless_lifetimes)]
100219    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
100220        self.chat = BoxWrapper(Unbox(chat));
100221        self
100222    }
100223    #[allow(rustdoc::invalid_html_tags)]
100224    #[doc = "Optional. Information about the original message for forwarded messages"]
100225    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100226    fn get_forward_origin<'a>(&'a self) -> Option<&'a MessageOrigin> {
100227        self.forward_origin.as_ref().map(|v| v.inner_ref())
100228    }
100229    #[allow(rustdoc::invalid_html_tags)]
100230    #[doc = "Optional. Information about the original message for forwarded messages"]
100231    #[allow(clippy::needless_lifetimes)]
100232    fn set_forward_origin<'a>(&'a mut self, forward_origin: Option<MessageOrigin>) -> &'a mut Self {
100233        self.forward_origin =
100234            forward_origin.map(|forward_origin| BoxWrapper(Unbox(forward_origin)));
100235        self
100236    }
100237    #[allow(rustdoc::invalid_html_tags)]
100238    #[doc = "Optional. True, if the message is sent to a forum topic"]
100239    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100240    fn get_is_topic_message<'a>(&'a self) -> Option<bool> {
100241        self.is_topic_message.as_ref().map(|v| *v)
100242    }
100243    #[allow(rustdoc::invalid_html_tags)]
100244    #[doc = "Optional. True, if the message is sent to a forum topic"]
100245    #[allow(clippy::needless_lifetimes)]
100246    fn set_is_topic_message<'a>(&'a mut self, is_topic_message: Option<bool>) -> &'a mut Self {
100247        self.is_topic_message = is_topic_message;
100248        self
100249    }
100250    #[allow(rustdoc::invalid_html_tags)]
100251    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
100252    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100253    fn get_is_automatic_forward<'a>(&'a self) -> Option<bool> {
100254        self.is_automatic_forward.as_ref().map(|v| *v)
100255    }
100256    #[allow(rustdoc::invalid_html_tags)]
100257    #[doc = "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group"]
100258    #[allow(clippy::needless_lifetimes)]
100259    fn set_is_automatic_forward<'a>(
100260        &'a mut self,
100261        is_automatic_forward: Option<bool>,
100262    ) -> &'a mut Self {
100263        self.is_automatic_forward = is_automatic_forward;
100264        self
100265    }
100266    #[allow(rustdoc::invalid_html_tags)]
100267    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
100268    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100269    fn get_reply_to_message<'a>(&'a self) -> Option<&'a Message> {
100270        self.reply_to_message.as_ref().map(|v| v.inner_ref())
100271    }
100272    #[allow(rustdoc::invalid_html_tags)]
100273    #[doc = "Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
100274    #[allow(clippy::needless_lifetimes)]
100275    fn set_reply_to_message<'a>(&'a mut self, reply_to_message: Option<Message>) -> &'a mut Self {
100276        self.reply_to_message =
100277            reply_to_message.map(|reply_to_message| BoxWrapper(Box::new(reply_to_message)));
100278        self
100279    }
100280    #[allow(rustdoc::invalid_html_tags)]
100281    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
100282    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100283    fn get_external_reply<'a>(&'a self) -> Option<&'a ExternalReplyInfo> {
100284        self.external_reply.as_ref().map(|v| v.inner_ref())
100285    }
100286    #[allow(rustdoc::invalid_html_tags)]
100287    #[doc = "Optional. Information about the message that is being replied to, which may come from another chat or forum topic"]
100288    #[allow(clippy::needless_lifetimes)]
100289    fn set_external_reply<'a>(
100290        &'a mut self,
100291        external_reply: Option<ExternalReplyInfo>,
100292    ) -> &'a mut Self {
100293        self.external_reply =
100294            external_reply.map(|external_reply| BoxWrapper(Unbox(external_reply)));
100295        self
100296    }
100297    #[allow(rustdoc::invalid_html_tags)]
100298    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
100299    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100300    fn get_quote<'a>(&'a self) -> Option<&'a TextQuote> {
100301        self.quote.as_ref().map(|v| v.inner_ref())
100302    }
100303    #[allow(rustdoc::invalid_html_tags)]
100304    #[doc = "Optional. For replies that quote part of the original message, the quoted part of the message"]
100305    #[allow(clippy::needless_lifetimes)]
100306    fn set_quote<'a>(&'a mut self, quote: Option<TextQuote>) -> &'a mut Self {
100307        self.quote = quote.map(|quote| BoxWrapper(Unbox(quote)));
100308        self
100309    }
100310    #[allow(rustdoc::invalid_html_tags)]
100311    #[doc = "Optional. For replies to a story, the original story"]
100312    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100313    fn get_reply_to_story<'a>(&'a self) -> Option<&'a Story> {
100314        self.reply_to_story.as_ref().map(|v| v.inner_ref())
100315    }
100316    #[allow(rustdoc::invalid_html_tags)]
100317    #[doc = "Optional. For replies to a story, the original story"]
100318    #[allow(clippy::needless_lifetimes)]
100319    fn set_reply_to_story<'a>(&'a mut self, reply_to_story: Option<Story>) -> &'a mut Self {
100320        self.reply_to_story =
100321            reply_to_story.map(|reply_to_story| BoxWrapper(Unbox(reply_to_story)));
100322        self
100323    }
100324    #[allow(rustdoc::invalid_html_tags)]
100325    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
100326    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100327    fn get_reply_to_checklist_task_id<'a>(&'a self) -> Option<i64> {
100328        self.reply_to_checklist_task_id.as_ref().map(|v| *v)
100329    }
100330    #[allow(rustdoc::invalid_html_tags)]
100331    #[doc = "Optional. Identifier of the specific checklist task that is being replied to"]
100332    #[allow(clippy::needless_lifetimes)]
100333    fn set_reply_to_checklist_task_id<'a>(
100334        &'a mut self,
100335        reply_to_checklist_task_id: Option<i64>,
100336    ) -> &'a mut Self {
100337        self.reply_to_checklist_task_id = reply_to_checklist_task_id;
100338        self
100339    }
100340    #[allow(rustdoc::invalid_html_tags)]
100341    #[doc = "Optional. Bot through which the message was sent"]
100342    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100343    fn get_via_bot<'a>(&'a self) -> Option<&'a User> {
100344        self.via_bot.as_ref().map(|v| v.inner_ref())
100345    }
100346    #[allow(rustdoc::invalid_html_tags)]
100347    #[doc = "Optional. Bot through which the message was sent"]
100348    #[allow(clippy::needless_lifetimes)]
100349    fn set_via_bot<'a>(&'a mut self, via_bot: Option<User>) -> &'a mut Self {
100350        self.via_bot = via_bot.map(|via_bot| BoxWrapper(Unbox(via_bot)));
100351        self
100352    }
100353    #[allow(rustdoc::invalid_html_tags)]
100354    #[doc = "Optional. Date the message was last edited in Unix time"]
100355    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100356    fn get_edit_date<'a>(&'a self) -> Option<i64> {
100357        self.edit_date.as_ref().map(|v| *v)
100358    }
100359    #[allow(rustdoc::invalid_html_tags)]
100360    #[doc = "Optional. Date the message was last edited in Unix time"]
100361    #[allow(clippy::needless_lifetimes)]
100362    fn set_edit_date<'a>(&'a mut self, edit_date: Option<i64>) -> &'a mut Self {
100363        self.edit_date = edit_date;
100364        self
100365    }
100366    #[allow(rustdoc::invalid_html_tags)]
100367    #[doc = "Optional. True, if the message can't be forwarded"]
100368    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100369    fn get_has_protected_content<'a>(&'a self) -> Option<bool> {
100370        self.has_protected_content.as_ref().map(|v| *v)
100371    }
100372    #[allow(rustdoc::invalid_html_tags)]
100373    #[doc = "Optional. True, if the message can't be forwarded"]
100374    #[allow(clippy::needless_lifetimes)]
100375    fn set_has_protected_content<'a>(
100376        &'a mut self,
100377        has_protected_content: Option<bool>,
100378    ) -> &'a mut Self {
100379        self.has_protected_content = has_protected_content;
100380        self
100381    }
100382    #[allow(rustdoc::invalid_html_tags)]
100383    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
100384    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100385    fn get_is_from_offline<'a>(&'a self) -> Option<bool> {
100386        self.is_from_offline.as_ref().map(|v| *v)
100387    }
100388    #[allow(rustdoc::invalid_html_tags)]
100389    #[doc = "Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"]
100390    #[allow(clippy::needless_lifetimes)]
100391    fn set_is_from_offline<'a>(&'a mut self, is_from_offline: Option<bool>) -> &'a mut Self {
100392        self.is_from_offline = is_from_offline;
100393        self
100394    }
100395    #[allow(rustdoc::invalid_html_tags)]
100396    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
100397    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100398    fn get_is_paid_post<'a>(&'a self) -> Option<bool> {
100399        self.is_paid_post.as_ref().map(|v| *v)
100400    }
100401    #[allow(rustdoc::invalid_html_tags)]
100402    #[doc = "Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited."]
100403    #[allow(clippy::needless_lifetimes)]
100404    fn set_is_paid_post<'a>(&'a mut self, is_paid_post: Option<bool>) -> &'a mut Self {
100405        self.is_paid_post = is_paid_post;
100406        self
100407    }
100408    #[allow(rustdoc::invalid_html_tags)]
100409    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
100410    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100411    fn get_media_group_id<'a>(&'a self) -> Option<&'a str> {
100412        self.media_group_id.as_ref().map(|v| v.as_str())
100413    }
100414    #[allow(rustdoc::invalid_html_tags)]
100415    #[doc = "Optional. The unique identifier of a media message group this message belongs to"]
100416    #[allow(clippy::needless_lifetimes)]
100417    fn set_media_group_id<'a>(&'a mut self, media_group_id: Option<String>) -> &'a mut Self {
100418        self.media_group_id = media_group_id;
100419        self
100420    }
100421    #[allow(rustdoc::invalid_html_tags)]
100422    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
100423    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100424    fn get_author_signature<'a>(&'a self) -> Option<&'a str> {
100425        self.author_signature.as_ref().map(|v| v.as_str())
100426    }
100427    #[allow(rustdoc::invalid_html_tags)]
100428    #[doc = "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator"]
100429    #[allow(clippy::needless_lifetimes)]
100430    fn set_author_signature<'a>(&'a mut self, author_signature: Option<String>) -> &'a mut Self {
100431        self.author_signature = author_signature;
100432        self
100433    }
100434    #[allow(rustdoc::invalid_html_tags)]
100435    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
100436    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100437    fn get_paid_star_count<'a>(&'a self) -> Option<i64> {
100438        self.paid_star_count.as_ref().map(|v| *v)
100439    }
100440    #[allow(rustdoc::invalid_html_tags)]
100441    #[doc = "Optional. The number of Telegram Stars that were paid by the sender of the message to send it"]
100442    #[allow(clippy::needless_lifetimes)]
100443    fn set_paid_star_count<'a>(&'a mut self, paid_star_count: Option<i64>) -> &'a mut Self {
100444        self.paid_star_count = paid_star_count;
100445        self
100446    }
100447    #[allow(rustdoc::invalid_html_tags)]
100448    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
100449    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100450    fn get_text<'a>(&'a self) -> Option<&'a str> {
100451        self.text.as_ref().map(|v| v.as_str())
100452    }
100453    #[allow(rustdoc::invalid_html_tags)]
100454    #[doc = "Optional. For text messages, the actual UTF-8 text of the message"]
100455    #[allow(clippy::needless_lifetimes)]
100456    fn set_text<'a>(&'a mut self, text: Option<String>) -> &'a mut Self {
100457        self.text = text;
100458        self
100459    }
100460    #[allow(rustdoc::invalid_html_tags)]
100461    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
100462    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100463    fn get_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
100464        self.entities.as_ref()
100465    }
100466    #[allow(rustdoc::invalid_html_tags)]
100467    #[doc = "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text"]
100468    #[allow(clippy::needless_lifetimes)]
100469    fn set_entities<'a>(&'a mut self, entities: Option<Vec<MessageEntity>>) -> &'a mut Self {
100470        self.entities = entities;
100471        self
100472    }
100473    #[allow(rustdoc::invalid_html_tags)]
100474    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
100475    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100476    fn get_link_preview_options<'a>(&'a self) -> Option<&'a LinkPreviewOptions> {
100477        self.link_preview_options.as_ref().map(|v| v.inner_ref())
100478    }
100479    #[allow(rustdoc::invalid_html_tags)]
100480    #[doc = "Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed"]
100481    #[allow(clippy::needless_lifetimes)]
100482    fn set_link_preview_options<'a>(
100483        &'a mut self,
100484        link_preview_options: Option<LinkPreviewOptions>,
100485    ) -> &'a mut Self {
100486        self.link_preview_options = link_preview_options
100487            .map(|link_preview_options| BoxWrapper(Unbox(link_preview_options)));
100488        self
100489    }
100490    #[allow(rustdoc::invalid_html_tags)]
100491    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
100492    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100493    fn get_suggested_post_info<'a>(&'a self) -> Option<&'a SuggestedPostInfo> {
100494        self.suggested_post_info.as_ref().map(|v| v.inner_ref())
100495    }
100496    #[allow(rustdoc::invalid_html_tags)]
100497    #[doc = "Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited."]
100498    #[allow(clippy::needless_lifetimes)]
100499    fn set_suggested_post_info<'a>(
100500        &'a mut self,
100501        suggested_post_info: Option<SuggestedPostInfo>,
100502    ) -> &'a mut Self {
100503        self.suggested_post_info =
100504            suggested_post_info.map(|suggested_post_info| BoxWrapper(Unbox(suggested_post_info)));
100505        self
100506    }
100507    #[allow(rustdoc::invalid_html_tags)]
100508    #[doc = "Optional. Unique identifier of the message effect added to the message"]
100509    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100510    fn get_effect_id<'a>(&'a self) -> Option<&'a str> {
100511        self.effect_id.as_ref().map(|v| v.as_str())
100512    }
100513    #[allow(rustdoc::invalid_html_tags)]
100514    #[doc = "Optional. Unique identifier of the message effect added to the message"]
100515    #[allow(clippy::needless_lifetimes)]
100516    fn set_effect_id<'a>(&'a mut self, effect_id: Option<String>) -> &'a mut Self {
100517        self.effect_id = effect_id;
100518        self
100519    }
100520    #[allow(rustdoc::invalid_html_tags)]
100521    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
100522    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100523    fn get_animation<'a>(&'a self) -> Option<&'a Animation> {
100524        self.animation.as_ref().map(|v| v.inner_ref())
100525    }
100526    #[allow(rustdoc::invalid_html_tags)]
100527    #[doc = "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set"]
100528    #[allow(clippy::needless_lifetimes)]
100529    fn set_animation<'a>(&'a mut self, animation: Option<Animation>) -> &'a mut Self {
100530        self.animation = animation.map(|animation| BoxWrapper(Unbox(animation)));
100531        self
100532    }
100533    #[allow(rustdoc::invalid_html_tags)]
100534    #[doc = "Optional. Message is an audio file, information about the file"]
100535    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100536    fn get_audio<'a>(&'a self) -> Option<&'a Audio> {
100537        self.audio.as_ref().map(|v| v.inner_ref())
100538    }
100539    #[allow(rustdoc::invalid_html_tags)]
100540    #[doc = "Optional. Message is an audio file, information about the file"]
100541    #[allow(clippy::needless_lifetimes)]
100542    fn set_audio<'a>(&'a mut self, audio: Option<Audio>) -> &'a mut Self {
100543        self.audio = audio.map(|audio| BoxWrapper(Unbox(audio)));
100544        self
100545    }
100546    #[allow(rustdoc::invalid_html_tags)]
100547    #[doc = "Optional. Message is a general file, information about the file"]
100548    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100549    fn get_document<'a>(&'a self) -> Option<&'a Document> {
100550        self.document.as_ref().map(|v| v.inner_ref())
100551    }
100552    #[allow(rustdoc::invalid_html_tags)]
100553    #[doc = "Optional. Message is a general file, information about the file"]
100554    #[allow(clippy::needless_lifetimes)]
100555    fn set_document<'a>(&'a mut self, document: Option<Document>) -> &'a mut Self {
100556        self.document = document.map(|document| BoxWrapper(Unbox(document)));
100557        self
100558    }
100559    #[allow(rustdoc::invalid_html_tags)]
100560    #[doc = "Optional. Message contains paid media; information about the paid media"]
100561    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100562    fn get_paid_media<'a>(&'a self) -> Option<&'a PaidMediaInfo> {
100563        self.paid_media.as_ref().map(|v| v.inner_ref())
100564    }
100565    #[allow(rustdoc::invalid_html_tags)]
100566    #[doc = "Optional. Message contains paid media; information about the paid media"]
100567    #[allow(clippy::needless_lifetimes)]
100568    fn set_paid_media<'a>(&'a mut self, paid_media: Option<PaidMediaInfo>) -> &'a mut Self {
100569        self.paid_media = paid_media.map(|paid_media| BoxWrapper(Unbox(paid_media)));
100570        self
100571    }
100572    #[allow(rustdoc::invalid_html_tags)]
100573    #[doc = "Optional. Message is a photo, available sizes of the photo"]
100574    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100575    fn get_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
100576        self.photo.as_ref()
100577    }
100578    #[allow(rustdoc::invalid_html_tags)]
100579    #[doc = "Optional. Message is a photo, available sizes of the photo"]
100580    #[allow(clippy::needless_lifetimes)]
100581    fn set_photo<'a>(&'a mut self, photo: Option<Vec<PhotoSize>>) -> &'a mut Self {
100582        self.photo = photo;
100583        self
100584    }
100585    #[allow(rustdoc::invalid_html_tags)]
100586    #[doc = "Optional. Message is a sticker, information about the sticker"]
100587    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100588    fn get_sticker<'a>(&'a self) -> Option<&'a Sticker> {
100589        self.sticker.as_ref().map(|v| v.inner_ref())
100590    }
100591    #[allow(rustdoc::invalid_html_tags)]
100592    #[doc = "Optional. Message is a sticker, information about the sticker"]
100593    #[allow(clippy::needless_lifetimes)]
100594    fn set_sticker<'a>(&'a mut self, sticker: Option<Sticker>) -> &'a mut Self {
100595        self.sticker = sticker.map(|sticker| BoxWrapper(Unbox(sticker)));
100596        self
100597    }
100598    #[allow(rustdoc::invalid_html_tags)]
100599    #[doc = "Optional. Message is a forwarded story"]
100600    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100601    fn get_story<'a>(&'a self) -> Option<&'a Story> {
100602        self.story.as_ref().map(|v| v.inner_ref())
100603    }
100604    #[allow(rustdoc::invalid_html_tags)]
100605    #[doc = "Optional. Message is a forwarded story"]
100606    #[allow(clippy::needless_lifetimes)]
100607    fn set_story<'a>(&'a mut self, story: Option<Story>) -> &'a mut Self {
100608        self.story = story.map(|story| BoxWrapper(Unbox(story)));
100609        self
100610    }
100611    #[allow(rustdoc::invalid_html_tags)]
100612    #[doc = "Optional. Message is a video, information about the video"]
100613    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100614    fn get_video<'a>(&'a self) -> Option<&'a Video> {
100615        self.video.as_ref().map(|v| v.inner_ref())
100616    }
100617    #[allow(rustdoc::invalid_html_tags)]
100618    #[doc = "Optional. Message is a video, information about the video"]
100619    #[allow(clippy::needless_lifetimes)]
100620    fn set_video<'a>(&'a mut self, video: Option<Video>) -> &'a mut Self {
100621        self.video = video.map(|video| BoxWrapper(Unbox(video)));
100622        self
100623    }
100624    #[allow(rustdoc::invalid_html_tags)]
100625    #[doc = "Optional. Message is a video note, information about the video message"]
100626    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100627    fn get_video_note<'a>(&'a self) -> Option<&'a VideoNote> {
100628        self.video_note.as_ref().map(|v| v.inner_ref())
100629    }
100630    #[allow(rustdoc::invalid_html_tags)]
100631    #[doc = "Optional. Message is a video note, information about the video message"]
100632    #[allow(clippy::needless_lifetimes)]
100633    fn set_video_note<'a>(&'a mut self, video_note: Option<VideoNote>) -> &'a mut Self {
100634        self.video_note = video_note.map(|video_note| BoxWrapper(Unbox(video_note)));
100635        self
100636    }
100637    #[allow(rustdoc::invalid_html_tags)]
100638    #[doc = "Optional. Message is a voice message, information about the file"]
100639    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100640    fn get_voice<'a>(&'a self) -> Option<&'a Voice> {
100641        self.voice.as_ref().map(|v| v.inner_ref())
100642    }
100643    #[allow(rustdoc::invalid_html_tags)]
100644    #[doc = "Optional. Message is a voice message, information about the file"]
100645    #[allow(clippy::needless_lifetimes)]
100646    fn set_voice<'a>(&'a mut self, voice: Option<Voice>) -> &'a mut Self {
100647        self.voice = voice.map(|voice| BoxWrapper(Unbox(voice)));
100648        self
100649    }
100650    #[allow(rustdoc::invalid_html_tags)]
100651    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
100652    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100653    fn get_caption<'a>(&'a self) -> Option<&'a str> {
100654        self.caption.as_ref().map(|v| v.as_str())
100655    }
100656    #[allow(rustdoc::invalid_html_tags)]
100657    #[doc = "Optional. Caption for the animation, audio, document, paid media, photo, video or voice"]
100658    #[allow(clippy::needless_lifetimes)]
100659    fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self {
100660        self.caption = caption;
100661        self
100662    }
100663    #[allow(rustdoc::invalid_html_tags)]
100664    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
100665    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100666    fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>> {
100667        self.caption_entities.as_ref()
100668    }
100669    #[allow(rustdoc::invalid_html_tags)]
100670    #[doc = "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption"]
100671    #[allow(clippy::needless_lifetimes)]
100672    fn set_caption_entities<'a>(
100673        &'a mut self,
100674        caption_entities: Option<Vec<MessageEntity>>,
100675    ) -> &'a mut Self {
100676        self.caption_entities = caption_entities;
100677        self
100678    }
100679    #[allow(rustdoc::invalid_html_tags)]
100680    #[doc = "Optional. True, if the caption must be shown above the message media"]
100681    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100682    fn get_show_caption_above_media<'a>(&'a self) -> Option<bool> {
100683        self.show_caption_above_media.as_ref().map(|v| *v)
100684    }
100685    #[allow(rustdoc::invalid_html_tags)]
100686    #[doc = "Optional. True, if the caption must be shown above the message media"]
100687    #[allow(clippy::needless_lifetimes)]
100688    fn set_show_caption_above_media<'a>(
100689        &'a mut self,
100690        show_caption_above_media: Option<bool>,
100691    ) -> &'a mut Self {
100692        self.show_caption_above_media = show_caption_above_media;
100693        self
100694    }
100695    #[allow(rustdoc::invalid_html_tags)]
100696    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
100697    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100698    fn get_has_media_spoiler<'a>(&'a self) -> Option<bool> {
100699        self.has_media_spoiler.as_ref().map(|v| *v)
100700    }
100701    #[allow(rustdoc::invalid_html_tags)]
100702    #[doc = "Optional. True, if the message media is covered by a spoiler animation"]
100703    #[allow(clippy::needless_lifetimes)]
100704    fn set_has_media_spoiler<'a>(&'a mut self, has_media_spoiler: Option<bool>) -> &'a mut Self {
100705        self.has_media_spoiler = has_media_spoiler;
100706        self
100707    }
100708    #[allow(rustdoc::invalid_html_tags)]
100709    #[doc = "Optional. Message is a checklist"]
100710    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100711    fn get_checklist<'a>(&'a self) -> Option<&'a Checklist> {
100712        self.checklist.as_ref().map(|v| v.inner_ref())
100713    }
100714    #[allow(rustdoc::invalid_html_tags)]
100715    #[doc = "Optional. Message is a checklist"]
100716    #[allow(clippy::needless_lifetimes)]
100717    fn set_checklist<'a>(&'a mut self, checklist: Option<Checklist>) -> &'a mut Self {
100718        self.checklist = checklist.map(|checklist| BoxWrapper(Unbox(checklist)));
100719        self
100720    }
100721    #[allow(rustdoc::invalid_html_tags)]
100722    #[doc = "Optional. Message is a shared contact, information about the contact"]
100723    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100724    fn get_contact<'a>(&'a self) -> Option<&'a Contact> {
100725        self.contact.as_ref().map(|v| v.inner_ref())
100726    }
100727    #[allow(rustdoc::invalid_html_tags)]
100728    #[doc = "Optional. Message is a shared contact, information about the contact"]
100729    #[allow(clippy::needless_lifetimes)]
100730    fn set_contact<'a>(&'a mut self, contact: Option<Contact>) -> &'a mut Self {
100731        self.contact = contact.map(|contact| BoxWrapper(Unbox(contact)));
100732        self
100733    }
100734    #[allow(rustdoc::invalid_html_tags)]
100735    #[doc = "Optional. Message is a dice with random value"]
100736    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100737    fn get_dice<'a>(&'a self) -> Option<&'a Dice> {
100738        self.dice.as_ref().map(|v| v.inner_ref())
100739    }
100740    #[allow(rustdoc::invalid_html_tags)]
100741    #[doc = "Optional. Message is a dice with random value"]
100742    #[allow(clippy::needless_lifetimes)]
100743    fn set_dice<'a>(&'a mut self, dice: Option<Dice>) -> &'a mut Self {
100744        self.dice = dice.map(|dice| BoxWrapper(Unbox(dice)));
100745        self
100746    }
100747    #[allow(rustdoc::invalid_html_tags)]
100748    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
100749    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100750    fn get_game<'a>(&'a self) -> Option<&'a Game> {
100751        self.game.as_ref().map(|v| v.inner_ref())
100752    }
100753    #[allow(rustdoc::invalid_html_tags)]
100754    #[doc = "Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games"]
100755    #[allow(clippy::needless_lifetimes)]
100756    fn set_game<'a>(&'a mut self, game: Option<Game>) -> &'a mut Self {
100757        self.game = game.map(|game| BoxWrapper(Unbox(game)));
100758        self
100759    }
100760    #[allow(rustdoc::invalid_html_tags)]
100761    #[doc = "Optional. Message is a native poll, information about the poll"]
100762    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100763    fn get_poll<'a>(&'a self) -> Option<&'a Poll> {
100764        self.poll.as_ref().map(|v| v.inner_ref())
100765    }
100766    #[allow(rustdoc::invalid_html_tags)]
100767    #[doc = "Optional. Message is a native poll, information about the poll"]
100768    #[allow(clippy::needless_lifetimes)]
100769    fn set_poll<'a>(&'a mut self, poll: Option<Poll>) -> &'a mut Self {
100770        self.poll = poll.map(|poll| BoxWrapper(Unbox(poll)));
100771        self
100772    }
100773    #[allow(rustdoc::invalid_html_tags)]
100774    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
100775    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100776    fn get_venue<'a>(&'a self) -> Option<&'a Venue> {
100777        self.venue.as_ref().map(|v| v.inner_ref())
100778    }
100779    #[allow(rustdoc::invalid_html_tags)]
100780    #[doc = "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set"]
100781    #[allow(clippy::needless_lifetimes)]
100782    fn set_venue<'a>(&'a mut self, venue: Option<Venue>) -> &'a mut Self {
100783        self.venue = venue.map(|venue| BoxWrapper(Unbox(venue)));
100784        self
100785    }
100786    #[allow(rustdoc::invalid_html_tags)]
100787    #[doc = "Optional. Message is a shared location, information about the location"]
100788    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100789    fn get_location<'a>(&'a self) -> Option<&'a Location> {
100790        self.location.as_ref().map(|v| v.inner_ref())
100791    }
100792    #[allow(rustdoc::invalid_html_tags)]
100793    #[doc = "Optional. Message is a shared location, information about the location"]
100794    #[allow(clippy::needless_lifetimes)]
100795    fn set_location<'a>(&'a mut self, location: Option<Location>) -> &'a mut Self {
100796        self.location = location.map(|location| BoxWrapper(Unbox(location)));
100797        self
100798    }
100799    #[allow(rustdoc::invalid_html_tags)]
100800    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
100801    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100802    fn get_new_chat_members<'a>(&'a self) -> Option<&'a Vec<User>> {
100803        self.new_chat_members.as_ref()
100804    }
100805    #[allow(rustdoc::invalid_html_tags)]
100806    #[doc = "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)"]
100807    #[allow(clippy::needless_lifetimes)]
100808    fn set_new_chat_members<'a>(&'a mut self, new_chat_members: Option<Vec<User>>) -> &'a mut Self {
100809        self.new_chat_members = new_chat_members;
100810        self
100811    }
100812    #[allow(rustdoc::invalid_html_tags)]
100813    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
100814    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100815    fn get_left_chat_member<'a>(&'a self) -> Option<&'a User> {
100816        self.left_chat_member.as_ref().map(|v| v.inner_ref())
100817    }
100818    #[allow(rustdoc::invalid_html_tags)]
100819    #[doc = "Optional. A member was removed from the group, information about them (this member may be the bot itself)"]
100820    #[allow(clippy::needless_lifetimes)]
100821    fn set_left_chat_member<'a>(&'a mut self, left_chat_member: Option<User>) -> &'a mut Self {
100822        self.left_chat_member =
100823            left_chat_member.map(|left_chat_member| BoxWrapper(Unbox(left_chat_member)));
100824        self
100825    }
100826    #[allow(rustdoc::invalid_html_tags)]
100827    #[doc = "Optional. A chat title was changed to this value"]
100828    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100829    fn get_new_chat_title<'a>(&'a self) -> Option<&'a str> {
100830        self.new_chat_title.as_ref().map(|v| v.as_str())
100831    }
100832    #[allow(rustdoc::invalid_html_tags)]
100833    #[doc = "Optional. A chat title was changed to this value"]
100834    #[allow(clippy::needless_lifetimes)]
100835    fn set_new_chat_title<'a>(&'a mut self, new_chat_title: Option<String>) -> &'a mut Self {
100836        self.new_chat_title = new_chat_title;
100837        self
100838    }
100839    #[allow(rustdoc::invalid_html_tags)]
100840    #[doc = "Optional. A chat photo was change to this value"]
100841    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100842    fn get_new_chat_photo<'a>(&'a self) -> Option<&'a Vec<PhotoSize>> {
100843        self.new_chat_photo.as_ref()
100844    }
100845    #[allow(rustdoc::invalid_html_tags)]
100846    #[doc = "Optional. A chat photo was change to this value"]
100847    #[allow(clippy::needless_lifetimes)]
100848    fn set_new_chat_photo<'a>(
100849        &'a mut self,
100850        new_chat_photo: Option<Vec<PhotoSize>>,
100851    ) -> &'a mut Self {
100852        self.new_chat_photo = new_chat_photo;
100853        self
100854    }
100855    #[allow(rustdoc::invalid_html_tags)]
100856    #[doc = "Optional. Service message: the chat photo was deleted"]
100857    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100858    fn get_delete_chat_photo<'a>(&'a self) -> Option<bool> {
100859        self.delete_chat_photo.as_ref().map(|v| *v)
100860    }
100861    #[allow(rustdoc::invalid_html_tags)]
100862    #[doc = "Optional. Service message: the chat photo was deleted"]
100863    #[allow(clippy::needless_lifetimes)]
100864    fn set_delete_chat_photo<'a>(&'a mut self, delete_chat_photo: Option<bool>) -> &'a mut Self {
100865        self.delete_chat_photo = delete_chat_photo;
100866        self
100867    }
100868    #[allow(rustdoc::invalid_html_tags)]
100869    #[doc = "Optional. Service message: the group has been created"]
100870    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100871    fn get_group_chat_created<'a>(&'a self) -> Option<bool> {
100872        self.group_chat_created.as_ref().map(|v| *v)
100873    }
100874    #[allow(rustdoc::invalid_html_tags)]
100875    #[doc = "Optional. Service message: the group has been created"]
100876    #[allow(clippy::needless_lifetimes)]
100877    fn set_group_chat_created<'a>(&'a mut self, group_chat_created: Option<bool>) -> &'a mut Self {
100878        self.group_chat_created = group_chat_created;
100879        self
100880    }
100881    #[allow(rustdoc::invalid_html_tags)]
100882    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
100883    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100884    fn get_supergroup_chat_created<'a>(&'a self) -> Option<bool> {
100885        self.supergroup_chat_created.as_ref().map(|v| *v)
100886    }
100887    #[allow(rustdoc::invalid_html_tags)]
100888    #[doc = "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup."]
100889    #[allow(clippy::needless_lifetimes)]
100890    fn set_supergroup_chat_created<'a>(
100891        &'a mut self,
100892        supergroup_chat_created: Option<bool>,
100893    ) -> &'a mut Self {
100894        self.supergroup_chat_created = supergroup_chat_created;
100895        self
100896    }
100897    #[allow(rustdoc::invalid_html_tags)]
100898    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
100899    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100900    fn get_channel_chat_created<'a>(&'a self) -> Option<bool> {
100901        self.channel_chat_created.as_ref().map(|v| *v)
100902    }
100903    #[allow(rustdoc::invalid_html_tags)]
100904    #[doc = "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel."]
100905    #[allow(clippy::needless_lifetimes)]
100906    fn set_channel_chat_created<'a>(
100907        &'a mut self,
100908        channel_chat_created: Option<bool>,
100909    ) -> &'a mut Self {
100910        self.channel_chat_created = channel_chat_created;
100911        self
100912    }
100913    #[allow(rustdoc::invalid_html_tags)]
100914    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
100915    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100916    fn get_message_auto_delete_timer_changed<'a>(
100917        &'a self,
100918    ) -> Option<&'a MessageAutoDeleteTimerChanged> {
100919        self.message_auto_delete_timer_changed
100920            .as_ref()
100921            .map(|v| v.inner_ref())
100922    }
100923    #[allow(rustdoc::invalid_html_tags)]
100924    #[doc = "Optional. Service message: auto-delete timer settings changed in the chat"]
100925    #[allow(clippy::needless_lifetimes)]
100926    fn set_message_auto_delete_timer_changed<'a>(
100927        &'a mut self,
100928        message_auto_delete_timer_changed: Option<MessageAutoDeleteTimerChanged>,
100929    ) -> &'a mut Self {
100930        self.message_auto_delete_timer_changed =
100931            message_auto_delete_timer_changed.map(|message_auto_delete_timer_changed| {
100932                BoxWrapper(Unbox(message_auto_delete_timer_changed))
100933            });
100934        self
100935    }
100936    #[allow(rustdoc::invalid_html_tags)]
100937    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
100938    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100939    fn get_migrate_to_chat_id<'a>(&'a self) -> Option<i64> {
100940        self.migrate_to_chat_id.as_ref().map(|v| *v)
100941    }
100942    #[allow(rustdoc::invalid_html_tags)]
100943    #[doc = "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
100944    #[allow(clippy::needless_lifetimes)]
100945    fn set_migrate_to_chat_id<'a>(&'a mut self, migrate_to_chat_id: Option<i64>) -> &'a mut Self {
100946        self.migrate_to_chat_id = migrate_to_chat_id;
100947        self
100948    }
100949    #[allow(rustdoc::invalid_html_tags)]
100950    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
100951    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100952    fn get_migrate_from_chat_id<'a>(&'a self) -> Option<i64> {
100953        self.migrate_from_chat_id.as_ref().map(|v| *v)
100954    }
100955    #[allow(rustdoc::invalid_html_tags)]
100956    #[doc = "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier."]
100957    #[allow(clippy::needless_lifetimes)]
100958    fn set_migrate_from_chat_id<'a>(
100959        &'a mut self,
100960        migrate_from_chat_id: Option<i64>,
100961    ) -> &'a mut Self {
100962        self.migrate_from_chat_id = migrate_from_chat_id;
100963        self
100964    }
100965    #[allow(rustdoc::invalid_html_tags)]
100966    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
100967    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100968    fn get_pinned_message<'a>(&'a self) -> Option<&'a MaybeInaccessibleMessage> {
100969        self.pinned_message.as_ref().map(|v| v.inner_ref())
100970    }
100971    #[allow(rustdoc::invalid_html_tags)]
100972    #[doc = "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply."]
100973    #[allow(clippy::needless_lifetimes)]
100974    fn set_pinned_message<'a>(
100975        &'a mut self,
100976        pinned_message: Option<MaybeInaccessibleMessage>,
100977    ) -> &'a mut Self {
100978        self.pinned_message =
100979            pinned_message.map(|pinned_message| BoxWrapper(Box::new(pinned_message)));
100980        self
100981    }
100982    #[allow(rustdoc::invalid_html_tags)]
100983    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
100984    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100985    fn get_invoice<'a>(&'a self) -> Option<&'a Invoice> {
100986        self.invoice.as_ref().map(|v| v.inner_ref())
100987    }
100988    #[allow(rustdoc::invalid_html_tags)]
100989    #[doc = "Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments"]
100990    #[allow(clippy::needless_lifetimes)]
100991    fn set_invoice<'a>(&'a mut self, invoice: Option<Invoice>) -> &'a mut Self {
100992        self.invoice = invoice.map(|invoice| BoxWrapper(Unbox(invoice)));
100993        self
100994    }
100995    #[allow(rustdoc::invalid_html_tags)]
100996    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
100997    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
100998    fn get_successful_payment<'a>(&'a self) -> Option<&'a SuccessfulPayment> {
100999        self.successful_payment.as_ref().map(|v| v.inner_ref())
101000    }
101001    #[allow(rustdoc::invalid_html_tags)]
101002    #[doc = "Optional. Message is a service message about a successful payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
101003    #[allow(clippy::needless_lifetimes)]
101004    fn set_successful_payment<'a>(
101005        &'a mut self,
101006        successful_payment: Option<SuccessfulPayment>,
101007    ) -> &'a mut Self {
101008        self.successful_payment =
101009            successful_payment.map(|successful_payment| BoxWrapper(Unbox(successful_payment)));
101010        self
101011    }
101012    #[allow(rustdoc::invalid_html_tags)]
101013    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
101014    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101015    fn get_refunded_payment<'a>(&'a self) -> Option<&'a RefundedPayment> {
101016        self.refunded_payment.as_ref().map(|v| v.inner_ref())
101017    }
101018    #[allow(rustdoc::invalid_html_tags)]
101019    #[doc = "Optional. Message is a service message about a refunded payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments"]
101020    #[allow(clippy::needless_lifetimes)]
101021    fn set_refunded_payment<'a>(
101022        &'a mut self,
101023        refunded_payment: Option<RefundedPayment>,
101024    ) -> &'a mut Self {
101025        self.refunded_payment =
101026            refunded_payment.map(|refunded_payment| BoxWrapper(Unbox(refunded_payment)));
101027        self
101028    }
101029    #[allow(rustdoc::invalid_html_tags)]
101030    #[doc = "Optional. Service message: users were shared with the bot"]
101031    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101032    fn get_users_shared<'a>(&'a self) -> Option<&'a UsersShared> {
101033        self.users_shared.as_ref().map(|v| v.inner_ref())
101034    }
101035    #[allow(rustdoc::invalid_html_tags)]
101036    #[doc = "Optional. Service message: users were shared with the bot"]
101037    #[allow(clippy::needless_lifetimes)]
101038    fn set_users_shared<'a>(&'a mut self, users_shared: Option<UsersShared>) -> &'a mut Self {
101039        self.users_shared = users_shared.map(|users_shared| BoxWrapper(Unbox(users_shared)));
101040        self
101041    }
101042    #[allow(rustdoc::invalid_html_tags)]
101043    #[doc = "Optional. Service message: a chat was shared with the bot"]
101044    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101045    fn get_chat_shared<'a>(&'a self) -> Option<&'a ChatShared> {
101046        self.chat_shared.as_ref().map(|v| v.inner_ref())
101047    }
101048    #[allow(rustdoc::invalid_html_tags)]
101049    #[doc = "Optional. Service message: a chat was shared with the bot"]
101050    #[allow(clippy::needless_lifetimes)]
101051    fn set_chat_shared<'a>(&'a mut self, chat_shared: Option<ChatShared>) -> &'a mut Self {
101052        self.chat_shared = chat_shared.map(|chat_shared| BoxWrapper(Unbox(chat_shared)));
101053        self
101054    }
101055    #[allow(rustdoc::invalid_html_tags)]
101056    #[doc = "Optional. Service message: a regular gift was sent or received"]
101057    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101058    fn get_gift<'a>(&'a self) -> Option<&'a GiftInfo> {
101059        self.gift.as_ref().map(|v| v.inner_ref())
101060    }
101061    #[allow(rustdoc::invalid_html_tags)]
101062    #[doc = "Optional. Service message: a regular gift was sent or received"]
101063    #[allow(clippy::needless_lifetimes)]
101064    fn set_gift<'a>(&'a mut self, gift: Option<GiftInfo>) -> &'a mut Self {
101065        self.gift = gift.map(|gift| BoxWrapper(Unbox(gift)));
101066        self
101067    }
101068    #[allow(rustdoc::invalid_html_tags)]
101069    #[doc = "Optional. Service message: a unique gift was sent or received"]
101070    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101071    fn get_unique_gift<'a>(&'a self) -> Option<&'a UniqueGiftInfo> {
101072        self.unique_gift.as_ref().map(|v| v.inner_ref())
101073    }
101074    #[allow(rustdoc::invalid_html_tags)]
101075    #[doc = "Optional. Service message: a unique gift was sent or received"]
101076    #[allow(clippy::needless_lifetimes)]
101077    fn set_unique_gift<'a>(&'a mut self, unique_gift: Option<UniqueGiftInfo>) -> &'a mut Self {
101078        self.unique_gift = unique_gift.map(|unique_gift| BoxWrapper(Unbox(unique_gift)));
101079        self
101080    }
101081    #[allow(rustdoc::invalid_html_tags)]
101082    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
101083    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101084    fn get_connected_website<'a>(&'a self) -> Option<&'a str> {
101085        self.connected_website.as_ref().map(|v| v.as_str())
101086    }
101087    #[allow(rustdoc::invalid_html_tags)]
101088    #[doc = "Optional. The domain name of the website on which the user has logged in. More about Telegram Login: https://core.telegram.org/widgets/login"]
101089    #[allow(clippy::needless_lifetimes)]
101090    fn set_connected_website<'a>(&'a mut self, connected_website: Option<String>) -> &'a mut Self {
101091        self.connected_website = connected_website;
101092        self
101093    }
101094    #[allow(rustdoc::invalid_html_tags)]
101095    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
101096    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101097    fn get_write_access_allowed<'a>(&'a self) -> Option<&'a WriteAccessAllowed> {
101098        self.write_access_allowed.as_ref().map(|v| v.inner_ref())
101099    }
101100    #[allow(rustdoc::invalid_html_tags)]
101101    #[doc = "Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess"]
101102    #[allow(clippy::needless_lifetimes)]
101103    fn set_write_access_allowed<'a>(
101104        &'a mut self,
101105        write_access_allowed: Option<WriteAccessAllowed>,
101106    ) -> &'a mut Self {
101107        self.write_access_allowed = write_access_allowed
101108            .map(|write_access_allowed| BoxWrapper(Unbox(write_access_allowed)));
101109        self
101110    }
101111    #[allow(rustdoc::invalid_html_tags)]
101112    #[doc = "Optional. Telegram Passport data"]
101113    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101114    fn get_passport_data<'a>(&'a self) -> Option<&'a PassportData> {
101115        self.passport_data.as_ref().map(|v| v.inner_ref())
101116    }
101117    #[allow(rustdoc::invalid_html_tags)]
101118    #[doc = "Optional. Telegram Passport data"]
101119    #[allow(clippy::needless_lifetimes)]
101120    fn set_passport_data<'a>(&'a mut self, passport_data: Option<PassportData>) -> &'a mut Self {
101121        self.passport_data = passport_data.map(|passport_data| BoxWrapper(Unbox(passport_data)));
101122        self
101123    }
101124    #[allow(rustdoc::invalid_html_tags)]
101125    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
101126    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101127    fn get_proximity_alert_triggered<'a>(&'a self) -> Option<&'a ProximityAlertTriggered> {
101128        self.proximity_alert_triggered
101129            .as_ref()
101130            .map(|v| v.inner_ref())
101131    }
101132    #[allow(rustdoc::invalid_html_tags)]
101133    #[doc = "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location."]
101134    #[allow(clippy::needless_lifetimes)]
101135    fn set_proximity_alert_triggered<'a>(
101136        &'a mut self,
101137        proximity_alert_triggered: Option<ProximityAlertTriggered>,
101138    ) -> &'a mut Self {
101139        self.proximity_alert_triggered = proximity_alert_triggered
101140            .map(|proximity_alert_triggered| BoxWrapper(Unbox(proximity_alert_triggered)));
101141        self
101142    }
101143    #[allow(rustdoc::invalid_html_tags)]
101144    #[doc = "Optional. Service message: user boosted the chat"]
101145    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101146    fn get_boost_added<'a>(&'a self) -> Option<&'a ChatBoostAdded> {
101147        self.boost_added.as_ref().map(|v| v.inner_ref())
101148    }
101149    #[allow(rustdoc::invalid_html_tags)]
101150    #[doc = "Optional. Service message: user boosted the chat"]
101151    #[allow(clippy::needless_lifetimes)]
101152    fn set_boost_added<'a>(&'a mut self, boost_added: Option<ChatBoostAdded>) -> &'a mut Self {
101153        self.boost_added = boost_added.map(|boost_added| BoxWrapper(Unbox(boost_added)));
101154        self
101155    }
101156    #[allow(rustdoc::invalid_html_tags)]
101157    #[doc = "Optional. Service message: chat background set"]
101158    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101159    fn get_chat_background_set<'a>(&'a self) -> Option<&'a ChatBackground> {
101160        self.chat_background_set.as_ref().map(|v| v.inner_ref())
101161    }
101162    #[allow(rustdoc::invalid_html_tags)]
101163    #[doc = "Optional. Service message: chat background set"]
101164    #[allow(clippy::needless_lifetimes)]
101165    fn set_chat_background_set<'a>(
101166        &'a mut self,
101167        chat_background_set: Option<ChatBackground>,
101168    ) -> &'a mut Self {
101169        self.chat_background_set =
101170            chat_background_set.map(|chat_background_set| BoxWrapper(Unbox(chat_background_set)));
101171        self
101172    }
101173    #[allow(rustdoc::invalid_html_tags)]
101174    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
101175    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101176    fn get_checklist_tasks_done<'a>(&'a self) -> Option<&'a ChecklistTasksDone> {
101177        self.checklist_tasks_done.as_ref().map(|v| v.inner_ref())
101178    }
101179    #[allow(rustdoc::invalid_html_tags)]
101180    #[doc = "Optional. Service message: some tasks in a checklist were marked as done or not done"]
101181    #[allow(clippy::needless_lifetimes)]
101182    fn set_checklist_tasks_done<'a>(
101183        &'a mut self,
101184        checklist_tasks_done: Option<ChecklistTasksDone>,
101185    ) -> &'a mut Self {
101186        self.checklist_tasks_done = checklist_tasks_done
101187            .map(|checklist_tasks_done| BoxWrapper(Box::new(checklist_tasks_done)));
101188        self
101189    }
101190    #[allow(rustdoc::invalid_html_tags)]
101191    #[doc = "Optional. Service message: tasks were added to a checklist"]
101192    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101193    fn get_checklist_tasks_added<'a>(&'a self) -> Option<&'a ChecklistTasksAdded> {
101194        self.checklist_tasks_added.as_ref().map(|v| v.inner_ref())
101195    }
101196    #[allow(rustdoc::invalid_html_tags)]
101197    #[doc = "Optional. Service message: tasks were added to a checklist"]
101198    #[allow(clippy::needless_lifetimes)]
101199    fn set_checklist_tasks_added<'a>(
101200        &'a mut self,
101201        checklist_tasks_added: Option<ChecklistTasksAdded>,
101202    ) -> &'a mut Self {
101203        self.checklist_tasks_added = checklist_tasks_added
101204            .map(|checklist_tasks_added| BoxWrapper(Box::new(checklist_tasks_added)));
101205        self
101206    }
101207    #[allow(rustdoc::invalid_html_tags)]
101208    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
101209    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101210    fn get_direct_message_price_changed<'a>(&'a self) -> Option<&'a DirectMessagePriceChanged> {
101211        self.direct_message_price_changed
101212            .as_ref()
101213            .map(|v| v.inner_ref())
101214    }
101215    #[allow(rustdoc::invalid_html_tags)]
101216    #[doc = "Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed"]
101217    #[allow(clippy::needless_lifetimes)]
101218    fn set_direct_message_price_changed<'a>(
101219        &'a mut self,
101220        direct_message_price_changed: Option<DirectMessagePriceChanged>,
101221    ) -> &'a mut Self {
101222        self.direct_message_price_changed = direct_message_price_changed
101223            .map(|direct_message_price_changed| BoxWrapper(Unbox(direct_message_price_changed)));
101224        self
101225    }
101226    #[allow(rustdoc::invalid_html_tags)]
101227    #[doc = "Optional. Service message: forum topic created"]
101228    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101229    fn get_forum_topic_created<'a>(&'a self) -> Option<&'a ForumTopicCreated> {
101230        self.forum_topic_created.as_ref().map(|v| v.inner_ref())
101231    }
101232    #[allow(rustdoc::invalid_html_tags)]
101233    #[doc = "Optional. Service message: forum topic created"]
101234    #[allow(clippy::needless_lifetimes)]
101235    fn set_forum_topic_created<'a>(
101236        &'a mut self,
101237        forum_topic_created: Option<ForumTopicCreated>,
101238    ) -> &'a mut Self {
101239        self.forum_topic_created =
101240            forum_topic_created.map(|forum_topic_created| BoxWrapper(Unbox(forum_topic_created)));
101241        self
101242    }
101243    #[allow(rustdoc::invalid_html_tags)]
101244    #[doc = "Optional. Service message: forum topic edited"]
101245    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101246    fn get_forum_topic_edited<'a>(&'a self) -> Option<&'a ForumTopicEdited> {
101247        self.forum_topic_edited.as_ref().map(|v| v.inner_ref())
101248    }
101249    #[allow(rustdoc::invalid_html_tags)]
101250    #[doc = "Optional. Service message: forum topic edited"]
101251    #[allow(clippy::needless_lifetimes)]
101252    fn set_forum_topic_edited<'a>(
101253        &'a mut self,
101254        forum_topic_edited: Option<ForumTopicEdited>,
101255    ) -> &'a mut Self {
101256        self.forum_topic_edited =
101257            forum_topic_edited.map(|forum_topic_edited| BoxWrapper(Unbox(forum_topic_edited)));
101258        self
101259    }
101260    #[allow(rustdoc::invalid_html_tags)]
101261    #[doc = "Optional. Service message: forum topic closed"]
101262    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101263    fn get_forum_topic_closed<'a>(&'a self) -> Option<&'a ForumTopicClosed> {
101264        self.forum_topic_closed.as_ref().map(|v| v.inner_ref())
101265    }
101266    #[allow(rustdoc::invalid_html_tags)]
101267    #[doc = "Optional. Service message: forum topic closed"]
101268    #[allow(clippy::needless_lifetimes)]
101269    fn set_forum_topic_closed<'a>(
101270        &'a mut self,
101271        forum_topic_closed: Option<ForumTopicClosed>,
101272    ) -> &'a mut Self {
101273        self.forum_topic_closed =
101274            forum_topic_closed.map(|forum_topic_closed| BoxWrapper(Unbox(forum_topic_closed)));
101275        self
101276    }
101277    #[allow(rustdoc::invalid_html_tags)]
101278    #[doc = "Optional. Service message: forum topic reopened"]
101279    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101280    fn get_forum_topic_reopened<'a>(&'a self) -> Option<&'a ForumTopicReopened> {
101281        self.forum_topic_reopened.as_ref().map(|v| v.inner_ref())
101282    }
101283    #[allow(rustdoc::invalid_html_tags)]
101284    #[doc = "Optional. Service message: forum topic reopened"]
101285    #[allow(clippy::needless_lifetimes)]
101286    fn set_forum_topic_reopened<'a>(
101287        &'a mut self,
101288        forum_topic_reopened: Option<ForumTopicReopened>,
101289    ) -> &'a mut Self {
101290        self.forum_topic_reopened = forum_topic_reopened
101291            .map(|forum_topic_reopened| BoxWrapper(Unbox(forum_topic_reopened)));
101292        self
101293    }
101294    #[allow(rustdoc::invalid_html_tags)]
101295    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
101296    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101297    fn get_general_forum_topic_hidden<'a>(&'a self) -> Option<&'a GeneralForumTopicHidden> {
101298        self.general_forum_topic_hidden
101299            .as_ref()
101300            .map(|v| v.inner_ref())
101301    }
101302    #[allow(rustdoc::invalid_html_tags)]
101303    #[doc = "Optional. Service message: the 'General' forum topic hidden"]
101304    #[allow(clippy::needless_lifetimes)]
101305    fn set_general_forum_topic_hidden<'a>(
101306        &'a mut self,
101307        general_forum_topic_hidden: Option<GeneralForumTopicHidden>,
101308    ) -> &'a mut Self {
101309        self.general_forum_topic_hidden = general_forum_topic_hidden
101310            .map(|general_forum_topic_hidden| BoxWrapper(Unbox(general_forum_topic_hidden)));
101311        self
101312    }
101313    #[allow(rustdoc::invalid_html_tags)]
101314    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
101315    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101316    fn get_general_forum_topic_unhidden<'a>(&'a self) -> Option<&'a GeneralForumTopicUnhidden> {
101317        self.general_forum_topic_unhidden
101318            .as_ref()
101319            .map(|v| v.inner_ref())
101320    }
101321    #[allow(rustdoc::invalid_html_tags)]
101322    #[doc = "Optional. Service message: the 'General' forum topic unhidden"]
101323    #[allow(clippy::needless_lifetimes)]
101324    fn set_general_forum_topic_unhidden<'a>(
101325        &'a mut self,
101326        general_forum_topic_unhidden: Option<GeneralForumTopicUnhidden>,
101327    ) -> &'a mut Self {
101328        self.general_forum_topic_unhidden = general_forum_topic_unhidden
101329            .map(|general_forum_topic_unhidden| BoxWrapper(Unbox(general_forum_topic_unhidden)));
101330        self
101331    }
101332    #[allow(rustdoc::invalid_html_tags)]
101333    #[doc = "Optional. Service message: a scheduled giveaway was created"]
101334    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101335    fn get_giveaway_created<'a>(&'a self) -> Option<&'a GiveawayCreated> {
101336        self.giveaway_created.as_ref().map(|v| v.inner_ref())
101337    }
101338    #[allow(rustdoc::invalid_html_tags)]
101339    #[doc = "Optional. Service message: a scheduled giveaway was created"]
101340    #[allow(clippy::needless_lifetimes)]
101341    fn set_giveaway_created<'a>(
101342        &'a mut self,
101343        giveaway_created: Option<GiveawayCreated>,
101344    ) -> &'a mut Self {
101345        self.giveaway_created =
101346            giveaway_created.map(|giveaway_created| BoxWrapper(Unbox(giveaway_created)));
101347        self
101348    }
101349    #[allow(rustdoc::invalid_html_tags)]
101350    #[doc = "Optional. The message is a scheduled giveaway message"]
101351    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101352    fn get_giveaway<'a>(&'a self) -> Option<&'a Giveaway> {
101353        self.giveaway.as_ref().map(|v| v.inner_ref())
101354    }
101355    #[allow(rustdoc::invalid_html_tags)]
101356    #[doc = "Optional. The message is a scheduled giveaway message"]
101357    #[allow(clippy::needless_lifetimes)]
101358    fn set_giveaway<'a>(&'a mut self, giveaway: Option<Giveaway>) -> &'a mut Self {
101359        self.giveaway = giveaway.map(|giveaway| BoxWrapper(Unbox(giveaway)));
101360        self
101361    }
101362    #[allow(rustdoc::invalid_html_tags)]
101363    #[doc = "Optional. A giveaway with public winners was completed"]
101364    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101365    fn get_giveaway_winners<'a>(&'a self) -> Option<&'a GiveawayWinners> {
101366        self.giveaway_winners.as_ref().map(|v| v.inner_ref())
101367    }
101368    #[allow(rustdoc::invalid_html_tags)]
101369    #[doc = "Optional. A giveaway with public winners was completed"]
101370    #[allow(clippy::needless_lifetimes)]
101371    fn set_giveaway_winners<'a>(
101372        &'a mut self,
101373        giveaway_winners: Option<GiveawayWinners>,
101374    ) -> &'a mut Self {
101375        self.giveaway_winners =
101376            giveaway_winners.map(|giveaway_winners| BoxWrapper(Unbox(giveaway_winners)));
101377        self
101378    }
101379    #[allow(rustdoc::invalid_html_tags)]
101380    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
101381    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101382    fn get_giveaway_completed<'a>(&'a self) -> Option<&'a GiveawayCompleted> {
101383        self.giveaway_completed.as_ref().map(|v| v.inner_ref())
101384    }
101385    #[allow(rustdoc::invalid_html_tags)]
101386    #[doc = "Optional. Service message: a giveaway without public winners was completed"]
101387    #[allow(clippy::needless_lifetimes)]
101388    fn set_giveaway_completed<'a>(
101389        &'a mut self,
101390        giveaway_completed: Option<GiveawayCompleted>,
101391    ) -> &'a mut Self {
101392        self.giveaway_completed =
101393            giveaway_completed.map(|giveaway_completed| BoxWrapper(Box::new(giveaway_completed)));
101394        self
101395    }
101396    #[allow(rustdoc::invalid_html_tags)]
101397    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
101398    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101399    fn get_paid_message_price_changed<'a>(&'a self) -> Option<&'a PaidMessagePriceChanged> {
101400        self.paid_message_price_changed
101401            .as_ref()
101402            .map(|v| v.inner_ref())
101403    }
101404    #[allow(rustdoc::invalid_html_tags)]
101405    #[doc = "Optional. Service message: the price for paid messages has changed in the chat"]
101406    #[allow(clippy::needless_lifetimes)]
101407    fn set_paid_message_price_changed<'a>(
101408        &'a mut self,
101409        paid_message_price_changed: Option<PaidMessagePriceChanged>,
101410    ) -> &'a mut Self {
101411        self.paid_message_price_changed = paid_message_price_changed
101412            .map(|paid_message_price_changed| BoxWrapper(Unbox(paid_message_price_changed)));
101413        self
101414    }
101415    #[allow(rustdoc::invalid_html_tags)]
101416    #[doc = "Optional. Service message: a suggested post was approved"]
101417    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101418    fn get_suggested_post_approved<'a>(&'a self) -> Option<&'a SuggestedPostApproved> {
101419        self.suggested_post_approved.as_ref().map(|v| v.inner_ref())
101420    }
101421    #[allow(rustdoc::invalid_html_tags)]
101422    #[doc = "Optional. Service message: a suggested post was approved"]
101423    #[allow(clippy::needless_lifetimes)]
101424    fn set_suggested_post_approved<'a>(
101425        &'a mut self,
101426        suggested_post_approved: Option<SuggestedPostApproved>,
101427    ) -> &'a mut Self {
101428        self.suggested_post_approved = suggested_post_approved
101429            .map(|suggested_post_approved| BoxWrapper(Unbox(suggested_post_approved)));
101430        self
101431    }
101432    #[allow(rustdoc::invalid_html_tags)]
101433    #[doc = "Optional. Service message: approval of a suggested post has failed"]
101434    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101435    fn get_suggested_post_approval_failed<'a>(&'a self) -> Option<&'a SuggestedPostApprovalFailed> {
101436        self.suggested_post_approval_failed
101437            .as_ref()
101438            .map(|v| v.inner_ref())
101439    }
101440    #[allow(rustdoc::invalid_html_tags)]
101441    #[doc = "Optional. Service message: approval of a suggested post has failed"]
101442    #[allow(clippy::needless_lifetimes)]
101443    fn set_suggested_post_approval_failed<'a>(
101444        &'a mut self,
101445        suggested_post_approval_failed: Option<SuggestedPostApprovalFailed>,
101446    ) -> &'a mut Self {
101447        self.suggested_post_approval_failed =
101448            suggested_post_approval_failed.map(|suggested_post_approval_failed| {
101449                BoxWrapper(Unbox(suggested_post_approval_failed))
101450            });
101451        self
101452    }
101453    #[allow(rustdoc::invalid_html_tags)]
101454    #[doc = "Optional. Service message: a suggested post was declined"]
101455    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101456    fn get_suggested_post_declined<'a>(&'a self) -> Option<&'a SuggestedPostDeclined> {
101457        self.suggested_post_declined.as_ref().map(|v| v.inner_ref())
101458    }
101459    #[allow(rustdoc::invalid_html_tags)]
101460    #[doc = "Optional. Service message: a suggested post was declined"]
101461    #[allow(clippy::needless_lifetimes)]
101462    fn set_suggested_post_declined<'a>(
101463        &'a mut self,
101464        suggested_post_declined: Option<SuggestedPostDeclined>,
101465    ) -> &'a mut Self {
101466        self.suggested_post_declined = suggested_post_declined
101467            .map(|suggested_post_declined| BoxWrapper(Unbox(suggested_post_declined)));
101468        self
101469    }
101470    #[allow(rustdoc::invalid_html_tags)]
101471    #[doc = "Optional. Service message: payment for a suggested post was received"]
101472    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101473    fn get_suggested_post_paid<'a>(&'a self) -> Option<&'a SuggestedPostPaid> {
101474        self.suggested_post_paid.as_ref().map(|v| v.inner_ref())
101475    }
101476    #[allow(rustdoc::invalid_html_tags)]
101477    #[doc = "Optional. Service message: payment for a suggested post was received"]
101478    #[allow(clippy::needless_lifetimes)]
101479    fn set_suggested_post_paid<'a>(
101480        &'a mut self,
101481        suggested_post_paid: Option<SuggestedPostPaid>,
101482    ) -> &'a mut Self {
101483        self.suggested_post_paid =
101484            suggested_post_paid.map(|suggested_post_paid| BoxWrapper(Unbox(suggested_post_paid)));
101485        self
101486    }
101487    #[allow(rustdoc::invalid_html_tags)]
101488    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
101489    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101490    fn get_suggested_post_refunded<'a>(&'a self) -> Option<&'a SuggestedPostRefunded> {
101491        self.suggested_post_refunded.as_ref().map(|v| v.inner_ref())
101492    }
101493    #[allow(rustdoc::invalid_html_tags)]
101494    #[doc = "Optional. Service message: payment for a suggested post was refunded"]
101495    #[allow(clippy::needless_lifetimes)]
101496    fn set_suggested_post_refunded<'a>(
101497        &'a mut self,
101498        suggested_post_refunded: Option<SuggestedPostRefunded>,
101499    ) -> &'a mut Self {
101500        self.suggested_post_refunded = suggested_post_refunded
101501            .map(|suggested_post_refunded| BoxWrapper(Unbox(suggested_post_refunded)));
101502        self
101503    }
101504    #[allow(rustdoc::invalid_html_tags)]
101505    #[doc = "Optional. Service message: video chat scheduled"]
101506    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101507    fn get_video_chat_scheduled<'a>(&'a self) -> Option<&'a VideoChatScheduled> {
101508        self.video_chat_scheduled.as_ref().map(|v| v.inner_ref())
101509    }
101510    #[allow(rustdoc::invalid_html_tags)]
101511    #[doc = "Optional. Service message: video chat scheduled"]
101512    #[allow(clippy::needless_lifetimes)]
101513    fn set_video_chat_scheduled<'a>(
101514        &'a mut self,
101515        video_chat_scheduled: Option<VideoChatScheduled>,
101516    ) -> &'a mut Self {
101517        self.video_chat_scheduled = video_chat_scheduled
101518            .map(|video_chat_scheduled| BoxWrapper(Unbox(video_chat_scheduled)));
101519        self
101520    }
101521    #[allow(rustdoc::invalid_html_tags)]
101522    #[doc = "Optional. Service message: video chat started"]
101523    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101524    fn get_video_chat_started<'a>(&'a self) -> Option<&'a VideoChatStarted> {
101525        self.video_chat_started.as_ref().map(|v| v.inner_ref())
101526    }
101527    #[allow(rustdoc::invalid_html_tags)]
101528    #[doc = "Optional. Service message: video chat started"]
101529    #[allow(clippy::needless_lifetimes)]
101530    fn set_video_chat_started<'a>(
101531        &'a mut self,
101532        video_chat_started: Option<VideoChatStarted>,
101533    ) -> &'a mut Self {
101534        self.video_chat_started =
101535            video_chat_started.map(|video_chat_started| BoxWrapper(Unbox(video_chat_started)));
101536        self
101537    }
101538    #[allow(rustdoc::invalid_html_tags)]
101539    #[doc = "Optional. Service message: video chat ended"]
101540    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101541    fn get_video_chat_ended<'a>(&'a self) -> Option<&'a VideoChatEnded> {
101542        self.video_chat_ended.as_ref().map(|v| v.inner_ref())
101543    }
101544    #[allow(rustdoc::invalid_html_tags)]
101545    #[doc = "Optional. Service message: video chat ended"]
101546    #[allow(clippy::needless_lifetimes)]
101547    fn set_video_chat_ended<'a>(
101548        &'a mut self,
101549        video_chat_ended: Option<VideoChatEnded>,
101550    ) -> &'a mut Self {
101551        self.video_chat_ended =
101552            video_chat_ended.map(|video_chat_ended| BoxWrapper(Unbox(video_chat_ended)));
101553        self
101554    }
101555    #[allow(rustdoc::invalid_html_tags)]
101556    #[doc = "Optional. Service message: new participants invited to a video chat"]
101557    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101558    fn get_video_chat_participants_invited<'a>(
101559        &'a self,
101560    ) -> Option<&'a VideoChatParticipantsInvited> {
101561        self.video_chat_participants_invited
101562            .as_ref()
101563            .map(|v| v.inner_ref())
101564    }
101565    #[allow(rustdoc::invalid_html_tags)]
101566    #[doc = "Optional. Service message: new participants invited to a video chat"]
101567    #[allow(clippy::needless_lifetimes)]
101568    fn set_video_chat_participants_invited<'a>(
101569        &'a mut self,
101570        video_chat_participants_invited: Option<VideoChatParticipantsInvited>,
101571    ) -> &'a mut Self {
101572        self.video_chat_participants_invited =
101573            video_chat_participants_invited.map(|video_chat_participants_invited| {
101574                BoxWrapper(Unbox(video_chat_participants_invited))
101575            });
101576        self
101577    }
101578    #[allow(rustdoc::invalid_html_tags)]
101579    #[doc = "Optional. Service message: data sent by a Web App"]
101580    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101581    fn get_web_app_data<'a>(&'a self) -> Option<&'a WebAppData> {
101582        self.web_app_data.as_ref().map(|v| v.inner_ref())
101583    }
101584    #[allow(rustdoc::invalid_html_tags)]
101585    #[doc = "Optional. Service message: data sent by a Web App"]
101586    #[allow(clippy::needless_lifetimes)]
101587    fn set_web_app_data<'a>(&'a mut self, web_app_data: Option<WebAppData>) -> &'a mut Self {
101588        self.web_app_data = web_app_data.map(|web_app_data| BoxWrapper(Unbox(web_app_data)));
101589        self
101590    }
101591    #[allow(rustdoc::invalid_html_tags)]
101592    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
101593    #[allow(clippy::needless_lifetimes, clippy::option_as_ref_deref)]
101594    fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup> {
101595        self.reply_markup.as_ref().map(|v| v.inner_ref())
101596    }
101597    #[allow(rustdoc::invalid_html_tags)]
101598    #[doc = "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons."]
101599    #[allow(clippy::needless_lifetimes)]
101600    fn set_reply_markup<'a>(
101601        &'a mut self,
101602        reply_markup: Option<InlineKeyboardMarkup>,
101603    ) -> &'a mut Self {
101604        self.reply_markup = reply_markup.map(|reply_markup| BoxWrapper(Unbox(reply_markup)));
101605        self
101606    }
101607}
101608impl TraitInaccessibleMessage for InaccessibleMessage {
101609    #[allow(rustdoc::invalid_html_tags)]
101610    #[doc = "Chat the message belonged to"]
101611    #[allow(clippy::needless_lifetimes)]
101612    fn get_chat<'a>(&'a self) -> &'a Chat {
101613        &self.chat
101614    }
101615    #[allow(rustdoc::invalid_html_tags)]
101616    #[doc = "Chat the message belonged to"]
101617    #[allow(clippy::needless_lifetimes)]
101618    fn set_chat<'a>(&'a mut self, chat: Chat) -> &'a mut Self {
101619        self.chat = BoxWrapper(Unbox(chat));
101620        self
101621    }
101622    #[allow(rustdoc::invalid_html_tags)]
101623    #[doc = "Unique message identifier inside the chat"]
101624    #[allow(clippy::needless_lifetimes)]
101625    fn get_message_id<'a>(&'a self) -> i64 {
101626        self.message_id
101627    }
101628    #[allow(rustdoc::invalid_html_tags)]
101629    #[doc = "Unique message identifier inside the chat"]
101630    #[allow(clippy::needless_lifetimes)]
101631    fn set_message_id<'a>(&'a mut self, message_id: i64) -> &'a mut Self {
101632        self.message_id = message_id;
101633        self
101634    }
101635    #[allow(rustdoc::invalid_html_tags)]
101636    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
101637    #[allow(clippy::needless_lifetimes)]
101638    fn get_date<'a>(&'a self) -> i64 {
101639        self.date
101640    }
101641    #[allow(rustdoc::invalid_html_tags)]
101642    #[doc = "Always 0. The field can be used to differentiate regular and inaccessible messages."]
101643    #[allow(clippy::needless_lifetimes)]
101644    fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self {
101645        self.date = date;
101646        self
101647    }
101648}
101649#[allow(dead_code)]
101650impl StoryAreaTypeUniqueGift {
101651    #[allow(clippy::too_many_arguments)]
101652    pub fn new(name: String) -> Self {
101653        Self {
101654            tg_type: "StoryAreaTypeUniqueGift".to_owned(),
101655            name,
101656        }
101657    }
101658    #[allow(rustdoc::invalid_html_tags)]
101659    #[doc = "Type of the area, always \"unique_gift\""]
101660    #[allow(clippy::needless_lifetimes)]
101661    pub fn get_tg_type<'a>(&'a self) -> &'a str {
101662        self.tg_type.as_str()
101663    }
101664    #[allow(rustdoc::invalid_html_tags)]
101665    #[doc = "Type of the area, always \"unique_gift\""]
101666    #[allow(clippy::needless_lifetimes)]
101667    pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self {
101668        self.tg_type = tg_type;
101669        self
101670    }
101671    #[allow(rustdoc::invalid_html_tags)]
101672    #[doc = "Type of the area, always \"unique_gift\""]
101673    fn rhai_get_tg_type(&mut self) -> String {
101674        self.tg_type.clone()
101675    }
101676    #[allow(rustdoc::invalid_html_tags)]
101677    #[doc = "Unique name of the gift"]
101678    #[allow(clippy::needless_lifetimes)]
101679    pub fn get_name<'a>(&'a self) -> &'a str {
101680        self.name.as_str()
101681    }
101682    #[allow(rustdoc::invalid_html_tags)]
101683    #[doc = "Unique name of the gift"]
101684    #[allow(clippy::needless_lifetimes)]
101685    pub fn set_name<'a>(&'a mut self, name: String) -> &'a mut Self {
101686        self.name = name;
101687        self
101688    }
101689    #[allow(rustdoc::invalid_html_tags)]
101690    #[doc = "Unique name of the gift"]
101691    fn rhai_get_name(&mut self) -> String {
101692        self.name.clone()
101693    }
101694}
101695#[allow(dead_code)]
101696impl PassportData {
101697    #[allow(clippy::too_many_arguments)]
101698    pub fn new<A: Into<EncryptedCredentials>>(
101699        data: Vec<EncryptedPassportElement>,
101700        credentials: A,
101701    ) -> Self {
101702        Self {
101703            data,
101704            credentials: BoxWrapper::new_unbox(credentials.into()),
101705        }
101706    }
101707    #[allow(rustdoc::invalid_html_tags)]
101708    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
101709    #[allow(clippy::needless_lifetimes)]
101710    pub fn get_data<'a>(&'a self) -> &'a Vec<EncryptedPassportElement> {
101711        &self.data
101712    }
101713    #[allow(rustdoc::invalid_html_tags)]
101714    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
101715    #[allow(clippy::needless_lifetimes)]
101716    pub fn set_data<'a>(&'a mut self, data: Vec<EncryptedPassportElement>) -> &'a mut Self {
101717        self.data = data;
101718        self
101719    }
101720    #[allow(rustdoc::invalid_html_tags)]
101721    #[doc = "Array with information about documents and other Telegram Passport elements that was shared with the bot"]
101722    fn rhai_get_data(&mut self) -> Vec<EncryptedPassportElement> {
101723        self.data.clone()
101724    }
101725    #[allow(rustdoc::invalid_html_tags)]
101726    #[doc = "Encrypted credentials required to decrypt the data"]
101727    #[allow(clippy::needless_lifetimes)]
101728    pub fn get_credentials<'a>(&'a self) -> &'a EncryptedCredentials {
101729        &self.credentials
101730    }
101731    #[allow(rustdoc::invalid_html_tags)]
101732    #[doc = "Encrypted credentials required to decrypt the data"]
101733    #[allow(clippy::needless_lifetimes)]
101734    pub fn set_credentials<'a>(&'a mut self, credentials: EncryptedCredentials) -> &'a mut Self {
101735        self.credentials = BoxWrapper(Unbox(credentials));
101736        self
101737    }
101738    #[allow(rustdoc::invalid_html_tags)]
101739    #[doc = "Encrypted credentials required to decrypt the data"]
101740    fn rhai_get_credentials(&mut self) -> EncryptedCredentials {
101741        self.credentials.clone().into()
101742    }
101743}
101744#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
101745#[serde(untagged)]
101746pub enum EChatId {
101747    I64(i64),
101748    String(String),
101749}
101750impl Default for EChatId {
101751    fn default() -> Self {
101752        EChatId::I64(i64::default())
101753    }
101754}
101755impl fmt::Display for EChatId {
101756    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
101757        let v = match self {
101758            EChatId::I64(thing) => {
101759                serde_json::to_string(thing).unwrap_or_else(|err| format!("invalid: {err}"))
101760            }
101761            EChatId::String(thing) => {
101762                serde_json::to_string(thing).unwrap_or_else(|err| format!("invalid: {err}"))
101763            }
101764        };
101765        write!(f, "{}", v)?;
101766        Ok(())
101767    }
101768}
101769#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
101770#[serde(untagged)]
101771pub enum EReplyMarkup {
101772    InlineKeyboardMarkup(InlineKeyboardMarkup),
101773    ReplyKeyboardMarkup(ReplyKeyboardMarkup),
101774    ReplyKeyboardRemove(ReplyKeyboardRemove),
101775    ForceReply(ForceReply),
101776}
101777impl Default for EReplyMarkup {
101778    fn default() -> Self {
101779        EReplyMarkup::InlineKeyboardMarkup(InlineKeyboardMarkup::default())
101780    }
101781}
101782#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
101783#[serde(untagged)]
101784pub enum EMedia {
101785    InputMediaAudio(InputMediaAudio),
101786    InputMediaDocument(InputMediaDocument),
101787    InputMediaPhoto(InputMediaPhoto),
101788    InputMediaVideo(InputMediaVideo),
101789}
101790impl Default for EMedia {
101791    fn default() -> Self {
101792        EMedia::InputMediaAudio(InputMediaAudio::default())
101793    }
101794}
101795#[cfg(feature = "rhai")]
101796pub mod rhai_helpers {
101797    use super::*;
101798    use rhai::{export_module, exported_module, plugin::*};
101799    pub trait SetupRhai {
101800        fn setup_rhai(engine: &mut rhai::Engine);
101801    }
101802    #[export_module]
101803    #[warn(non_snake_case)]
101804    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
101805    mod InputPaidMediaModule {
101806        #[doc = r" `Option::None` with no inner data"]
101807        pub const None: Option<InputPaidMedia> = Option::None;
101808        #[doc = r" `Option::Some`"]
101809        pub fn Some(value: InputPaidMedia) -> Option<InputPaidMedia> {
101810            Option::Some(value)
101811        }
101812        #[doc = r" Return the current variant of `MyEnum`."]
101813        #[rhai_fn(global, get = "enum_type", pure)]
101814        pub fn get_type(my_enum: &mut Option<InputPaidMedia>) -> String {
101815            match my_enum {
101816                Option::None => "None".to_string(),
101817                Option::Some(_) => "Some".to_string(),
101818            }
101819        }
101820        #[doc = r" Return the inner value."]
101821        #[rhai_fn(global, get = "value", pure)]
101822        pub fn get_value(my_enum: &mut Option<InputPaidMedia>) -> Dynamic {
101823            match my_enum {
101824                Option::None => Dynamic::UNIT,
101825                Option::Some(x) => Dynamic::from(x.clone()),
101826            }
101827        }
101828        #[rhai_fn(global, name = "to_string", pure)]
101829        pub fn to_string(my_enum: &mut Option<InputPaidMedia>) -> String {
101830            format!("{my_enum:?}")
101831        }
101832        #[rhai_fn(global, name = "to_debug", pure)]
101833        pub fn to_debug(my_enum: &mut Option<InputPaidMedia>) -> String {
101834            format!("{:?}", my_enum)
101835        }
101836    }
101837    #[export_module]
101838    #[warn(non_snake_case)]
101839    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
101840    mod OrderInfoModule {
101841        #[doc = r" `Option::None` with no inner data"]
101842        pub const None: Option<OrderInfo> = Option::None;
101843        #[doc = r" `Option::Some`"]
101844        pub fn Some(value: OrderInfo) -> Option<OrderInfo> {
101845            Option::Some(value)
101846        }
101847        #[doc = r" Return the current variant of `MyEnum`."]
101848        #[rhai_fn(global, get = "enum_type", pure)]
101849        pub fn get_type(my_enum: &mut Option<OrderInfo>) -> String {
101850            match my_enum {
101851                Option::None => "None".to_string(),
101852                Option::Some(_) => "Some".to_string(),
101853            }
101854        }
101855        #[doc = r" Return the inner value."]
101856        #[rhai_fn(global, get = "value", pure)]
101857        pub fn get_value(my_enum: &mut Option<OrderInfo>) -> Dynamic {
101858            match my_enum {
101859                Option::None => Dynamic::UNIT,
101860                Option::Some(x) => Dynamic::from(x.clone()),
101861            }
101862        }
101863        #[rhai_fn(global, name = "to_string", pure)]
101864        pub fn to_string(my_enum: &mut Option<OrderInfo>) -> String {
101865            format!("{my_enum:?}")
101866        }
101867        #[rhai_fn(global, name = "to_debug", pure)]
101868        pub fn to_debug(my_enum: &mut Option<OrderInfo>) -> String {
101869            format!("{:?}", my_enum)
101870        }
101871    }
101872    #[export_module]
101873    #[warn(non_snake_case)]
101874    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
101875    mod SuggestedPostPriceModule {
101876        #[doc = r" `Option::None` with no inner data"]
101877        pub const None: Option<SuggestedPostPrice> = Option::None;
101878        #[doc = r" `Option::Some`"]
101879        pub fn Some(value: SuggestedPostPrice) -> Option<SuggestedPostPrice> {
101880            Option::Some(value)
101881        }
101882        #[doc = r" Return the current variant of `MyEnum`."]
101883        #[rhai_fn(global, get = "enum_type", pure)]
101884        pub fn get_type(my_enum: &mut Option<SuggestedPostPrice>) -> String {
101885            match my_enum {
101886                Option::None => "None".to_string(),
101887                Option::Some(_) => "Some".to_string(),
101888            }
101889        }
101890        #[doc = r" Return the inner value."]
101891        #[rhai_fn(global, get = "value", pure)]
101892        pub fn get_value(my_enum: &mut Option<SuggestedPostPrice>) -> Dynamic {
101893            match my_enum {
101894                Option::None => Dynamic::UNIT,
101895                Option::Some(x) => Dynamic::from(x.clone()),
101896            }
101897        }
101898        #[rhai_fn(global, name = "to_string", pure)]
101899        pub fn to_string(my_enum: &mut Option<SuggestedPostPrice>) -> String {
101900            format!("{my_enum:?}")
101901        }
101902        #[rhai_fn(global, name = "to_debug", pure)]
101903        pub fn to_debug(my_enum: &mut Option<SuggestedPostPrice>) -> String {
101904            format!("{:?}", my_enum)
101905        }
101906    }
101907    #[export_module]
101908    #[warn(non_snake_case)]
101909    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
101910    mod ChatModule {
101911        #[doc = r" `Option::None` with no inner data"]
101912        pub const None: Option<Chat> = Option::None;
101913        #[doc = r" `Option::Some`"]
101914        pub fn Some(value: Chat) -> Option<Chat> {
101915            Option::Some(value)
101916        }
101917        #[doc = r" Return the current variant of `MyEnum`."]
101918        #[rhai_fn(global, get = "enum_type", pure)]
101919        pub fn get_type(my_enum: &mut Option<Chat>) -> String {
101920            match my_enum {
101921                Option::None => "None".to_string(),
101922                Option::Some(_) => "Some".to_string(),
101923            }
101924        }
101925        #[doc = r" Return the inner value."]
101926        #[rhai_fn(global, get = "value", pure)]
101927        pub fn get_value(my_enum: &mut Option<Chat>) -> Dynamic {
101928            match my_enum {
101929                Option::None => Dynamic::UNIT,
101930                Option::Some(x) => Dynamic::from(x.clone()),
101931            }
101932        }
101933        #[rhai_fn(global, name = "to_string", pure)]
101934        pub fn to_string(my_enum: &mut Option<Chat>) -> String {
101935            format!("{my_enum:?}")
101936        }
101937        #[rhai_fn(global, name = "to_debug", pure)]
101938        pub fn to_debug(my_enum: &mut Option<Chat>) -> String {
101939            format!("{:?}", my_enum)
101940        }
101941    }
101942    #[export_module]
101943    #[warn(non_snake_case)]
101944    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
101945    mod CallbackGameModule {
101946        #[doc = r" `Option::None` with no inner data"]
101947        pub const None: Option<CallbackGame> = Option::None;
101948        #[doc = r" `Option::Some`"]
101949        pub fn Some(value: CallbackGame) -> Option<CallbackGame> {
101950            Option::Some(value)
101951        }
101952        #[doc = r" Return the current variant of `MyEnum`."]
101953        #[rhai_fn(global, get = "enum_type", pure)]
101954        pub fn get_type(my_enum: &mut Option<CallbackGame>) -> String {
101955            match my_enum {
101956                Option::None => "None".to_string(),
101957                Option::Some(_) => "Some".to_string(),
101958            }
101959        }
101960        #[doc = r" Return the inner value."]
101961        #[rhai_fn(global, get = "value", pure)]
101962        pub fn get_value(my_enum: &mut Option<CallbackGame>) -> Dynamic {
101963            match my_enum {
101964                Option::None => Dynamic::UNIT,
101965                Option::Some(x) => Dynamic::from(x.clone()),
101966            }
101967        }
101968        #[rhai_fn(global, name = "to_string", pure)]
101969        pub fn to_string(my_enum: &mut Option<CallbackGame>) -> String {
101970            format!("{my_enum:?}")
101971        }
101972        #[rhai_fn(global, name = "to_debug", pure)]
101973        pub fn to_debug(my_enum: &mut Option<CallbackGame>) -> String {
101974            format!("{:?}", my_enum)
101975        }
101976    }
101977    #[export_module]
101978    #[warn(non_snake_case)]
101979    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
101980    mod UpdateModule {
101981        #[doc = r" `Option::None` with no inner data"]
101982        pub const None: Option<Update> = Option::None;
101983        #[doc = r" `Option::Some`"]
101984        pub fn Some(value: Update) -> Option<Update> {
101985            Option::Some(value)
101986        }
101987        #[doc = r" Return the current variant of `MyEnum`."]
101988        #[rhai_fn(global, get = "enum_type", pure)]
101989        pub fn get_type(my_enum: &mut Option<Update>) -> String {
101990            match my_enum {
101991                Option::None => "None".to_string(),
101992                Option::Some(_) => "Some".to_string(),
101993            }
101994        }
101995        #[doc = r" Return the inner value."]
101996        #[rhai_fn(global, get = "value", pure)]
101997        pub fn get_value(my_enum: &mut Option<Update>) -> Dynamic {
101998            match my_enum {
101999                Option::None => Dynamic::UNIT,
102000                Option::Some(x) => Dynamic::from(x.clone()),
102001            }
102002        }
102003        #[rhai_fn(global, name = "to_string", pure)]
102004        pub fn to_string(my_enum: &mut Option<Update>) -> String {
102005            format!("{my_enum:?}")
102006        }
102007        #[rhai_fn(global, name = "to_debug", pure)]
102008        pub fn to_debug(my_enum: &mut Option<Update>) -> String {
102009            format!("{:?}", my_enum)
102010        }
102011    }
102012    #[export_module]
102013    #[warn(non_snake_case)]
102014    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102015    mod PhotoSizeModule {
102016        #[doc = r" `Option::None` with no inner data"]
102017        pub const None: Option<PhotoSize> = Option::None;
102018        #[doc = r" `Option::Some`"]
102019        pub fn Some(value: PhotoSize) -> Option<PhotoSize> {
102020            Option::Some(value)
102021        }
102022        #[doc = r" Return the current variant of `MyEnum`."]
102023        #[rhai_fn(global, get = "enum_type", pure)]
102024        pub fn get_type(my_enum: &mut Option<PhotoSize>) -> String {
102025            match my_enum {
102026                Option::None => "None".to_string(),
102027                Option::Some(_) => "Some".to_string(),
102028            }
102029        }
102030        #[doc = r" Return the inner value."]
102031        #[rhai_fn(global, get = "value", pure)]
102032        pub fn get_value(my_enum: &mut Option<PhotoSize>) -> Dynamic {
102033            match my_enum {
102034                Option::None => Dynamic::UNIT,
102035                Option::Some(x) => Dynamic::from(x.clone()),
102036            }
102037        }
102038        #[rhai_fn(global, name = "to_string", pure)]
102039        pub fn to_string(my_enum: &mut Option<PhotoSize>) -> String {
102040            format!("{my_enum:?}")
102041        }
102042        #[rhai_fn(global, name = "to_debug", pure)]
102043        pub fn to_debug(my_enum: &mut Option<PhotoSize>) -> String {
102044            format!("{:?}", my_enum)
102045        }
102046    }
102047    #[export_module]
102048    #[warn(non_snake_case)]
102049    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102050    mod ChatMemberModule {
102051        #[doc = r" `Option::None` with no inner data"]
102052        pub const None: Option<ChatMember> = Option::None;
102053        #[doc = r" `Option::Some`"]
102054        pub fn Some(value: ChatMember) -> Option<ChatMember> {
102055            Option::Some(value)
102056        }
102057        #[doc = r" Return the current variant of `MyEnum`."]
102058        #[rhai_fn(global, get = "enum_type", pure)]
102059        pub fn get_type(my_enum: &mut Option<ChatMember>) -> String {
102060            match my_enum {
102061                Option::None => "None".to_string(),
102062                Option::Some(_) => "Some".to_string(),
102063            }
102064        }
102065        #[doc = r" Return the inner value."]
102066        #[rhai_fn(global, get = "value", pure)]
102067        pub fn get_value(my_enum: &mut Option<ChatMember>) -> Dynamic {
102068            match my_enum {
102069                Option::None => Dynamic::UNIT,
102070                Option::Some(x) => Dynamic::from(x.clone()),
102071            }
102072        }
102073        #[rhai_fn(global, name = "to_string", pure)]
102074        pub fn to_string(my_enum: &mut Option<ChatMember>) -> String {
102075            format!("{my_enum:?}")
102076        }
102077        #[rhai_fn(global, name = "to_debug", pure)]
102078        pub fn to_debug(my_enum: &mut Option<ChatMember>) -> String {
102079            format!("{:?}", my_enum)
102080        }
102081    }
102082    #[export_module]
102083    #[warn(non_snake_case)]
102084    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102085    mod ChatBoostSourceGiftCodeModule {
102086        #[doc = r" `Option::None` with no inner data"]
102087        pub const None: Option<ChatBoostSourceGiftCode> = Option::None;
102088        #[doc = r" `Option::Some`"]
102089        pub fn Some(value: ChatBoostSourceGiftCode) -> Option<ChatBoostSourceGiftCode> {
102090            Option::Some(value)
102091        }
102092        #[doc = r" Return the current variant of `MyEnum`."]
102093        #[rhai_fn(global, get = "enum_type", pure)]
102094        pub fn get_type(my_enum: &mut Option<ChatBoostSourceGiftCode>) -> String {
102095            match my_enum {
102096                Option::None => "None".to_string(),
102097                Option::Some(_) => "Some".to_string(),
102098            }
102099        }
102100        #[doc = r" Return the inner value."]
102101        #[rhai_fn(global, get = "value", pure)]
102102        pub fn get_value(my_enum: &mut Option<ChatBoostSourceGiftCode>) -> Dynamic {
102103            match my_enum {
102104                Option::None => Dynamic::UNIT,
102105                Option::Some(x) => Dynamic::from(x.clone()),
102106            }
102107        }
102108        #[rhai_fn(global, name = "to_string", pure)]
102109        pub fn to_string(my_enum: &mut Option<ChatBoostSourceGiftCode>) -> String {
102110            format!("{my_enum:?}")
102111        }
102112        #[rhai_fn(global, name = "to_debug", pure)]
102113        pub fn to_debug(my_enum: &mut Option<ChatBoostSourceGiftCode>) -> String {
102114            format!("{:?}", my_enum)
102115        }
102116    }
102117    #[export_module]
102118    #[warn(non_snake_case)]
102119    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102120    mod PollOptionModule {
102121        #[doc = r" `Option::None` with no inner data"]
102122        pub const None: Option<PollOption> = Option::None;
102123        #[doc = r" `Option::Some`"]
102124        pub fn Some(value: PollOption) -> Option<PollOption> {
102125            Option::Some(value)
102126        }
102127        #[doc = r" Return the current variant of `MyEnum`."]
102128        #[rhai_fn(global, get = "enum_type", pure)]
102129        pub fn get_type(my_enum: &mut Option<PollOption>) -> String {
102130            match my_enum {
102131                Option::None => "None".to_string(),
102132                Option::Some(_) => "Some".to_string(),
102133            }
102134        }
102135        #[doc = r" Return the inner value."]
102136        #[rhai_fn(global, get = "value", pure)]
102137        pub fn get_value(my_enum: &mut Option<PollOption>) -> Dynamic {
102138            match my_enum {
102139                Option::None => Dynamic::UNIT,
102140                Option::Some(x) => Dynamic::from(x.clone()),
102141            }
102142        }
102143        #[rhai_fn(global, name = "to_string", pure)]
102144        pub fn to_string(my_enum: &mut Option<PollOption>) -> String {
102145            format!("{my_enum:?}")
102146        }
102147        #[rhai_fn(global, name = "to_debug", pure)]
102148        pub fn to_debug(my_enum: &mut Option<PollOption>) -> String {
102149            format!("{:?}", my_enum)
102150        }
102151    }
102152    #[export_module]
102153    #[warn(non_snake_case)]
102154    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102155    mod StoryAreaTypeModule {
102156        #[doc = r" `Option::None` with no inner data"]
102157        pub const None: Option<StoryAreaType> = Option::None;
102158        #[doc = r" `Option::Some`"]
102159        pub fn Some(value: StoryAreaType) -> Option<StoryAreaType> {
102160            Option::Some(value)
102161        }
102162        #[doc = r" Return the current variant of `MyEnum`."]
102163        #[rhai_fn(global, get = "enum_type", pure)]
102164        pub fn get_type(my_enum: &mut Option<StoryAreaType>) -> String {
102165            match my_enum {
102166                Option::None => "None".to_string(),
102167                Option::Some(_) => "Some".to_string(),
102168            }
102169        }
102170        #[doc = r" Return the inner value."]
102171        #[rhai_fn(global, get = "value", pure)]
102172        pub fn get_value(my_enum: &mut Option<StoryAreaType>) -> Dynamic {
102173            match my_enum {
102174                Option::None => Dynamic::UNIT,
102175                Option::Some(x) => Dynamic::from(x.clone()),
102176            }
102177        }
102178        #[rhai_fn(global, name = "to_string", pure)]
102179        pub fn to_string(my_enum: &mut Option<StoryAreaType>) -> String {
102180            format!("{my_enum:?}")
102181        }
102182        #[rhai_fn(global, name = "to_debug", pure)]
102183        pub fn to_debug(my_enum: &mut Option<StoryAreaType>) -> String {
102184            format!("{:?}", my_enum)
102185        }
102186    }
102187    #[export_module]
102188    #[warn(non_snake_case)]
102189    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102190    mod InlineQueryModule {
102191        #[doc = r" `Option::None` with no inner data"]
102192        pub const None: Option<InlineQuery> = Option::None;
102193        #[doc = r" `Option::Some`"]
102194        pub fn Some(value: InlineQuery) -> Option<InlineQuery> {
102195            Option::Some(value)
102196        }
102197        #[doc = r" Return the current variant of `MyEnum`."]
102198        #[rhai_fn(global, get = "enum_type", pure)]
102199        pub fn get_type(my_enum: &mut Option<InlineQuery>) -> String {
102200            match my_enum {
102201                Option::None => "None".to_string(),
102202                Option::Some(_) => "Some".to_string(),
102203            }
102204        }
102205        #[doc = r" Return the inner value."]
102206        #[rhai_fn(global, get = "value", pure)]
102207        pub fn get_value(my_enum: &mut Option<InlineQuery>) -> Dynamic {
102208            match my_enum {
102209                Option::None => Dynamic::UNIT,
102210                Option::Some(x) => Dynamic::from(x.clone()),
102211            }
102212        }
102213        #[rhai_fn(global, name = "to_string", pure)]
102214        pub fn to_string(my_enum: &mut Option<InlineQuery>) -> String {
102215            format!("{my_enum:?}")
102216        }
102217        #[rhai_fn(global, name = "to_debug", pure)]
102218        pub fn to_debug(my_enum: &mut Option<InlineQuery>) -> String {
102219            format!("{:?}", my_enum)
102220        }
102221    }
102222    #[export_module]
102223    #[warn(non_snake_case)]
102224    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102225    mod TransactionPartnerUserModule {
102226        #[doc = r" `Option::None` with no inner data"]
102227        pub const None: Option<TransactionPartnerUser> = Option::None;
102228        #[doc = r" `Option::Some`"]
102229        pub fn Some(value: TransactionPartnerUser) -> Option<TransactionPartnerUser> {
102230            Option::Some(value)
102231        }
102232        #[doc = r" Return the current variant of `MyEnum`."]
102233        #[rhai_fn(global, get = "enum_type", pure)]
102234        pub fn get_type(my_enum: &mut Option<TransactionPartnerUser>) -> String {
102235            match my_enum {
102236                Option::None => "None".to_string(),
102237                Option::Some(_) => "Some".to_string(),
102238            }
102239        }
102240        #[doc = r" Return the inner value."]
102241        #[rhai_fn(global, get = "value", pure)]
102242        pub fn get_value(my_enum: &mut Option<TransactionPartnerUser>) -> Dynamic {
102243            match my_enum {
102244                Option::None => Dynamic::UNIT,
102245                Option::Some(x) => Dynamic::from(x.clone()),
102246            }
102247        }
102248        #[rhai_fn(global, name = "to_string", pure)]
102249        pub fn to_string(my_enum: &mut Option<TransactionPartnerUser>) -> String {
102250            format!("{my_enum:?}")
102251        }
102252        #[rhai_fn(global, name = "to_debug", pure)]
102253        pub fn to_debug(my_enum: &mut Option<TransactionPartnerUser>) -> String {
102254            format!("{:?}", my_enum)
102255        }
102256    }
102257    #[export_module]
102258    #[warn(non_snake_case)]
102259    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102260    mod InputMediaPhotoModule {
102261        #[doc = r" `Option::None` with no inner data"]
102262        pub const None: Option<InputMediaPhoto> = Option::None;
102263        #[doc = r" `Option::Some`"]
102264        pub fn Some(value: InputMediaPhoto) -> Option<InputMediaPhoto> {
102265            Option::Some(value)
102266        }
102267        #[doc = r" Return the current variant of `MyEnum`."]
102268        #[rhai_fn(global, get = "enum_type", pure)]
102269        pub fn get_type(my_enum: &mut Option<InputMediaPhoto>) -> String {
102270            match my_enum {
102271                Option::None => "None".to_string(),
102272                Option::Some(_) => "Some".to_string(),
102273            }
102274        }
102275        #[doc = r" Return the inner value."]
102276        #[rhai_fn(global, get = "value", pure)]
102277        pub fn get_value(my_enum: &mut Option<InputMediaPhoto>) -> Dynamic {
102278            match my_enum {
102279                Option::None => Dynamic::UNIT,
102280                Option::Some(x) => Dynamic::from(x.clone()),
102281            }
102282        }
102283        #[rhai_fn(global, name = "to_string", pure)]
102284        pub fn to_string(my_enum: &mut Option<InputMediaPhoto>) -> String {
102285            format!("{my_enum:?}")
102286        }
102287        #[rhai_fn(global, name = "to_debug", pure)]
102288        pub fn to_debug(my_enum: &mut Option<InputMediaPhoto>) -> String {
102289            format!("{:?}", my_enum)
102290        }
102291    }
102292    #[export_module]
102293    #[warn(non_snake_case)]
102294    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102295    mod VideoChatScheduledModule {
102296        #[doc = r" `Option::None` with no inner data"]
102297        pub const None: Option<VideoChatScheduled> = Option::None;
102298        #[doc = r" `Option::Some`"]
102299        pub fn Some(value: VideoChatScheduled) -> Option<VideoChatScheduled> {
102300            Option::Some(value)
102301        }
102302        #[doc = r" Return the current variant of `MyEnum`."]
102303        #[rhai_fn(global, get = "enum_type", pure)]
102304        pub fn get_type(my_enum: &mut Option<VideoChatScheduled>) -> String {
102305            match my_enum {
102306                Option::None => "None".to_string(),
102307                Option::Some(_) => "Some".to_string(),
102308            }
102309        }
102310        #[doc = r" Return the inner value."]
102311        #[rhai_fn(global, get = "value", pure)]
102312        pub fn get_value(my_enum: &mut Option<VideoChatScheduled>) -> Dynamic {
102313            match my_enum {
102314                Option::None => Dynamic::UNIT,
102315                Option::Some(x) => Dynamic::from(x.clone()),
102316            }
102317        }
102318        #[rhai_fn(global, name = "to_string", pure)]
102319        pub fn to_string(my_enum: &mut Option<VideoChatScheduled>) -> String {
102320            format!("{my_enum:?}")
102321        }
102322        #[rhai_fn(global, name = "to_debug", pure)]
102323        pub fn to_debug(my_enum: &mut Option<VideoChatScheduled>) -> String {
102324            format!("{:?}", my_enum)
102325        }
102326    }
102327    #[export_module]
102328    #[warn(non_snake_case)]
102329    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102330    mod ForumTopicCreatedModule {
102331        #[doc = r" `Option::None` with no inner data"]
102332        pub const None: Option<ForumTopicCreated> = Option::None;
102333        #[doc = r" `Option::Some`"]
102334        pub fn Some(value: ForumTopicCreated) -> Option<ForumTopicCreated> {
102335            Option::Some(value)
102336        }
102337        #[doc = r" Return the current variant of `MyEnum`."]
102338        #[rhai_fn(global, get = "enum_type", pure)]
102339        pub fn get_type(my_enum: &mut Option<ForumTopicCreated>) -> String {
102340            match my_enum {
102341                Option::None => "None".to_string(),
102342                Option::Some(_) => "Some".to_string(),
102343            }
102344        }
102345        #[doc = r" Return the inner value."]
102346        #[rhai_fn(global, get = "value", pure)]
102347        pub fn get_value(my_enum: &mut Option<ForumTopicCreated>) -> Dynamic {
102348            match my_enum {
102349                Option::None => Dynamic::UNIT,
102350                Option::Some(x) => Dynamic::from(x.clone()),
102351            }
102352        }
102353        #[rhai_fn(global, name = "to_string", pure)]
102354        pub fn to_string(my_enum: &mut Option<ForumTopicCreated>) -> String {
102355            format!("{my_enum:?}")
102356        }
102357        #[rhai_fn(global, name = "to_debug", pure)]
102358        pub fn to_debug(my_enum: &mut Option<ForumTopicCreated>) -> String {
102359            format!("{:?}", my_enum)
102360        }
102361    }
102362    #[export_module]
102363    #[warn(non_snake_case)]
102364    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102365    mod InlineKeyboardButtonModule {
102366        #[doc = r" `Option::None` with no inner data"]
102367        pub const None: Option<InlineKeyboardButton> = Option::None;
102368        #[doc = r" `Option::Some`"]
102369        pub fn Some(value: InlineKeyboardButton) -> Option<InlineKeyboardButton> {
102370            Option::Some(value)
102371        }
102372        #[doc = r" Return the current variant of `MyEnum`."]
102373        #[rhai_fn(global, get = "enum_type", pure)]
102374        pub fn get_type(my_enum: &mut Option<InlineKeyboardButton>) -> String {
102375            match my_enum {
102376                Option::None => "None".to_string(),
102377                Option::Some(_) => "Some".to_string(),
102378            }
102379        }
102380        #[doc = r" Return the inner value."]
102381        #[rhai_fn(global, get = "value", pure)]
102382        pub fn get_value(my_enum: &mut Option<InlineKeyboardButton>) -> Dynamic {
102383            match my_enum {
102384                Option::None => Dynamic::UNIT,
102385                Option::Some(x) => Dynamic::from(x.clone()),
102386            }
102387        }
102388        #[rhai_fn(global, name = "to_string", pure)]
102389        pub fn to_string(my_enum: &mut Option<InlineKeyboardButton>) -> String {
102390            format!("{my_enum:?}")
102391        }
102392        #[rhai_fn(global, name = "to_debug", pure)]
102393        pub fn to_debug(my_enum: &mut Option<InlineKeyboardButton>) -> String {
102394            format!("{:?}", my_enum)
102395        }
102396    }
102397    #[export_module]
102398    #[warn(non_snake_case)]
102399    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102400    mod PaidMediaVideoModule {
102401        #[doc = r" `Option::None` with no inner data"]
102402        pub const None: Option<PaidMediaVideo> = Option::None;
102403        #[doc = r" `Option::Some`"]
102404        pub fn Some(value: PaidMediaVideo) -> Option<PaidMediaVideo> {
102405            Option::Some(value)
102406        }
102407        #[doc = r" Return the current variant of `MyEnum`."]
102408        #[rhai_fn(global, get = "enum_type", pure)]
102409        pub fn get_type(my_enum: &mut Option<PaidMediaVideo>) -> String {
102410            match my_enum {
102411                Option::None => "None".to_string(),
102412                Option::Some(_) => "Some".to_string(),
102413            }
102414        }
102415        #[doc = r" Return the inner value."]
102416        #[rhai_fn(global, get = "value", pure)]
102417        pub fn get_value(my_enum: &mut Option<PaidMediaVideo>) -> Dynamic {
102418            match my_enum {
102419                Option::None => Dynamic::UNIT,
102420                Option::Some(x) => Dynamic::from(x.clone()),
102421            }
102422        }
102423        #[rhai_fn(global, name = "to_string", pure)]
102424        pub fn to_string(my_enum: &mut Option<PaidMediaVideo>) -> String {
102425            format!("{my_enum:?}")
102426        }
102427        #[rhai_fn(global, name = "to_debug", pure)]
102428        pub fn to_debug(my_enum: &mut Option<PaidMediaVideo>) -> String {
102429            format!("{:?}", my_enum)
102430        }
102431    }
102432    #[export_module]
102433    #[warn(non_snake_case)]
102434    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102435    mod ChatJoinRequestModule {
102436        #[doc = r" `Option::None` with no inner data"]
102437        pub const None: Option<ChatJoinRequest> = Option::None;
102438        #[doc = r" `Option::Some`"]
102439        pub fn Some(value: ChatJoinRequest) -> Option<ChatJoinRequest> {
102440            Option::Some(value)
102441        }
102442        #[doc = r" Return the current variant of `MyEnum`."]
102443        #[rhai_fn(global, get = "enum_type", pure)]
102444        pub fn get_type(my_enum: &mut Option<ChatJoinRequest>) -> String {
102445            match my_enum {
102446                Option::None => "None".to_string(),
102447                Option::Some(_) => "Some".to_string(),
102448            }
102449        }
102450        #[doc = r" Return the inner value."]
102451        #[rhai_fn(global, get = "value", pure)]
102452        pub fn get_value(my_enum: &mut Option<ChatJoinRequest>) -> Dynamic {
102453            match my_enum {
102454                Option::None => Dynamic::UNIT,
102455                Option::Some(x) => Dynamic::from(x.clone()),
102456            }
102457        }
102458        #[rhai_fn(global, name = "to_string", pure)]
102459        pub fn to_string(my_enum: &mut Option<ChatJoinRequest>) -> String {
102460            format!("{my_enum:?}")
102461        }
102462        #[rhai_fn(global, name = "to_debug", pure)]
102463        pub fn to_debug(my_enum: &mut Option<ChatJoinRequest>) -> String {
102464            format!("{:?}", my_enum)
102465        }
102466    }
102467    #[export_module]
102468    #[warn(non_snake_case)]
102469    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102470    mod StoryAreaPositionModule {
102471        #[doc = r" `Option::None` with no inner data"]
102472        pub const None: Option<StoryAreaPosition> = Option::None;
102473        #[doc = r" `Option::Some`"]
102474        pub fn Some(value: StoryAreaPosition) -> Option<StoryAreaPosition> {
102475            Option::Some(value)
102476        }
102477        #[doc = r" Return the current variant of `MyEnum`."]
102478        #[rhai_fn(global, get = "enum_type", pure)]
102479        pub fn get_type(my_enum: &mut Option<StoryAreaPosition>) -> String {
102480            match my_enum {
102481                Option::None => "None".to_string(),
102482                Option::Some(_) => "Some".to_string(),
102483            }
102484        }
102485        #[doc = r" Return the inner value."]
102486        #[rhai_fn(global, get = "value", pure)]
102487        pub fn get_value(my_enum: &mut Option<StoryAreaPosition>) -> Dynamic {
102488            match my_enum {
102489                Option::None => Dynamic::UNIT,
102490                Option::Some(x) => Dynamic::from(x.clone()),
102491            }
102492        }
102493        #[rhai_fn(global, name = "to_string", pure)]
102494        pub fn to_string(my_enum: &mut Option<StoryAreaPosition>) -> String {
102495            format!("{my_enum:?}")
102496        }
102497        #[rhai_fn(global, name = "to_debug", pure)]
102498        pub fn to_debug(my_enum: &mut Option<StoryAreaPosition>) -> String {
102499            format!("{:?}", my_enum)
102500        }
102501    }
102502    #[export_module]
102503    #[warn(non_snake_case)]
102504    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102505    mod BotCommandModule {
102506        #[doc = r" `Option::None` with no inner data"]
102507        pub const None: Option<BotCommand> = Option::None;
102508        #[doc = r" `Option::Some`"]
102509        pub fn Some(value: BotCommand) -> Option<BotCommand> {
102510            Option::Some(value)
102511        }
102512        #[doc = r" Return the current variant of `MyEnum`."]
102513        #[rhai_fn(global, get = "enum_type", pure)]
102514        pub fn get_type(my_enum: &mut Option<BotCommand>) -> String {
102515            match my_enum {
102516                Option::None => "None".to_string(),
102517                Option::Some(_) => "Some".to_string(),
102518            }
102519        }
102520        #[doc = r" Return the inner value."]
102521        #[rhai_fn(global, get = "value", pure)]
102522        pub fn get_value(my_enum: &mut Option<BotCommand>) -> Dynamic {
102523            match my_enum {
102524                Option::None => Dynamic::UNIT,
102525                Option::Some(x) => Dynamic::from(x.clone()),
102526            }
102527        }
102528        #[rhai_fn(global, name = "to_string", pure)]
102529        pub fn to_string(my_enum: &mut Option<BotCommand>) -> String {
102530            format!("{my_enum:?}")
102531        }
102532        #[rhai_fn(global, name = "to_debug", pure)]
102533        pub fn to_debug(my_enum: &mut Option<BotCommand>) -> String {
102534            format!("{:?}", my_enum)
102535        }
102536    }
102537    #[export_module]
102538    #[warn(non_snake_case)]
102539    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102540    mod SuggestedPostPaidModule {
102541        #[doc = r" `Option::None` with no inner data"]
102542        pub const None: Option<SuggestedPostPaid> = Option::None;
102543        #[doc = r" `Option::Some`"]
102544        pub fn Some(value: SuggestedPostPaid) -> Option<SuggestedPostPaid> {
102545            Option::Some(value)
102546        }
102547        #[doc = r" Return the current variant of `MyEnum`."]
102548        #[rhai_fn(global, get = "enum_type", pure)]
102549        pub fn get_type(my_enum: &mut Option<SuggestedPostPaid>) -> String {
102550            match my_enum {
102551                Option::None => "None".to_string(),
102552                Option::Some(_) => "Some".to_string(),
102553            }
102554        }
102555        #[doc = r" Return the inner value."]
102556        #[rhai_fn(global, get = "value", pure)]
102557        pub fn get_value(my_enum: &mut Option<SuggestedPostPaid>) -> Dynamic {
102558            match my_enum {
102559                Option::None => Dynamic::UNIT,
102560                Option::Some(x) => Dynamic::from(x.clone()),
102561            }
102562        }
102563        #[rhai_fn(global, name = "to_string", pure)]
102564        pub fn to_string(my_enum: &mut Option<SuggestedPostPaid>) -> String {
102565            format!("{my_enum:?}")
102566        }
102567        #[rhai_fn(global, name = "to_debug", pure)]
102568        pub fn to_debug(my_enum: &mut Option<SuggestedPostPaid>) -> String {
102569            format!("{:?}", my_enum)
102570        }
102571    }
102572    #[export_module]
102573    #[warn(non_snake_case)]
102574    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102575    mod ContactModule {
102576        #[doc = r" `Option::None` with no inner data"]
102577        pub const None: Option<Contact> = Option::None;
102578        #[doc = r" `Option::Some`"]
102579        pub fn Some(value: Contact) -> Option<Contact> {
102580            Option::Some(value)
102581        }
102582        #[doc = r" Return the current variant of `MyEnum`."]
102583        #[rhai_fn(global, get = "enum_type", pure)]
102584        pub fn get_type(my_enum: &mut Option<Contact>) -> String {
102585            match my_enum {
102586                Option::None => "None".to_string(),
102587                Option::Some(_) => "Some".to_string(),
102588            }
102589        }
102590        #[doc = r" Return the inner value."]
102591        #[rhai_fn(global, get = "value", pure)]
102592        pub fn get_value(my_enum: &mut Option<Contact>) -> Dynamic {
102593            match my_enum {
102594                Option::None => Dynamic::UNIT,
102595                Option::Some(x) => Dynamic::from(x.clone()),
102596            }
102597        }
102598        #[rhai_fn(global, name = "to_string", pure)]
102599        pub fn to_string(my_enum: &mut Option<Contact>) -> String {
102600            format!("{my_enum:?}")
102601        }
102602        #[rhai_fn(global, name = "to_debug", pure)]
102603        pub fn to_debug(my_enum: &mut Option<Contact>) -> String {
102604            format!("{:?}", my_enum)
102605        }
102606    }
102607    #[export_module]
102608    #[warn(non_snake_case)]
102609    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102610    mod ChatBoostSourceGiveawayModule {
102611        #[doc = r" `Option::None` with no inner data"]
102612        pub const None: Option<ChatBoostSourceGiveaway> = Option::None;
102613        #[doc = r" `Option::Some`"]
102614        pub fn Some(value: ChatBoostSourceGiveaway) -> Option<ChatBoostSourceGiveaway> {
102615            Option::Some(value)
102616        }
102617        #[doc = r" Return the current variant of `MyEnum`."]
102618        #[rhai_fn(global, get = "enum_type", pure)]
102619        pub fn get_type(my_enum: &mut Option<ChatBoostSourceGiveaway>) -> String {
102620            match my_enum {
102621                Option::None => "None".to_string(),
102622                Option::Some(_) => "Some".to_string(),
102623            }
102624        }
102625        #[doc = r" Return the inner value."]
102626        #[rhai_fn(global, get = "value", pure)]
102627        pub fn get_value(my_enum: &mut Option<ChatBoostSourceGiveaway>) -> Dynamic {
102628            match my_enum {
102629                Option::None => Dynamic::UNIT,
102630                Option::Some(x) => Dynamic::from(x.clone()),
102631            }
102632        }
102633        #[rhai_fn(global, name = "to_string", pure)]
102634        pub fn to_string(my_enum: &mut Option<ChatBoostSourceGiveaway>) -> String {
102635            format!("{my_enum:?}")
102636        }
102637        #[rhai_fn(global, name = "to_debug", pure)]
102638        pub fn to_debug(my_enum: &mut Option<ChatBoostSourceGiveaway>) -> String {
102639            format!("{:?}", my_enum)
102640        }
102641    }
102642    #[export_module]
102643    #[warn(non_snake_case)]
102644    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102645    mod BotNameModule {
102646        #[doc = r" `Option::None` with no inner data"]
102647        pub const None: Option<BotName> = Option::None;
102648        #[doc = r" `Option::Some`"]
102649        pub fn Some(value: BotName) -> Option<BotName> {
102650            Option::Some(value)
102651        }
102652        #[doc = r" Return the current variant of `MyEnum`."]
102653        #[rhai_fn(global, get = "enum_type", pure)]
102654        pub fn get_type(my_enum: &mut Option<BotName>) -> String {
102655            match my_enum {
102656                Option::None => "None".to_string(),
102657                Option::Some(_) => "Some".to_string(),
102658            }
102659        }
102660        #[doc = r" Return the inner value."]
102661        #[rhai_fn(global, get = "value", pure)]
102662        pub fn get_value(my_enum: &mut Option<BotName>) -> Dynamic {
102663            match my_enum {
102664                Option::None => Dynamic::UNIT,
102665                Option::Some(x) => Dynamic::from(x.clone()),
102666            }
102667        }
102668        #[rhai_fn(global, name = "to_string", pure)]
102669        pub fn to_string(my_enum: &mut Option<BotName>) -> String {
102670            format!("{my_enum:?}")
102671        }
102672        #[rhai_fn(global, name = "to_debug", pure)]
102673        pub fn to_debug(my_enum: &mut Option<BotName>) -> String {
102674            format!("{:?}", my_enum)
102675        }
102676    }
102677    #[export_module]
102678    #[warn(non_snake_case)]
102679    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102680    mod SuggestedPostDeclinedModule {
102681        #[doc = r" `Option::None` with no inner data"]
102682        pub const None: Option<SuggestedPostDeclined> = Option::None;
102683        #[doc = r" `Option::Some`"]
102684        pub fn Some(value: SuggestedPostDeclined) -> Option<SuggestedPostDeclined> {
102685            Option::Some(value)
102686        }
102687        #[doc = r" Return the current variant of `MyEnum`."]
102688        #[rhai_fn(global, get = "enum_type", pure)]
102689        pub fn get_type(my_enum: &mut Option<SuggestedPostDeclined>) -> String {
102690            match my_enum {
102691                Option::None => "None".to_string(),
102692                Option::Some(_) => "Some".to_string(),
102693            }
102694        }
102695        #[doc = r" Return the inner value."]
102696        #[rhai_fn(global, get = "value", pure)]
102697        pub fn get_value(my_enum: &mut Option<SuggestedPostDeclined>) -> Dynamic {
102698            match my_enum {
102699                Option::None => Dynamic::UNIT,
102700                Option::Some(x) => Dynamic::from(x.clone()),
102701            }
102702        }
102703        #[rhai_fn(global, name = "to_string", pure)]
102704        pub fn to_string(my_enum: &mut Option<SuggestedPostDeclined>) -> String {
102705            format!("{my_enum:?}")
102706        }
102707        #[rhai_fn(global, name = "to_debug", pure)]
102708        pub fn to_debug(my_enum: &mut Option<SuggestedPostDeclined>) -> String {
102709            format!("{:?}", my_enum)
102710        }
102711    }
102712    #[export_module]
102713    #[warn(non_snake_case)]
102714    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102715    mod BusinessOpeningHoursIntervalModule {
102716        #[doc = r" `Option::None` with no inner data"]
102717        pub const None: Option<BusinessOpeningHoursInterval> = Option::None;
102718        #[doc = r" `Option::Some`"]
102719        pub fn Some(value: BusinessOpeningHoursInterval) -> Option<BusinessOpeningHoursInterval> {
102720            Option::Some(value)
102721        }
102722        #[doc = r" Return the current variant of `MyEnum`."]
102723        #[rhai_fn(global, get = "enum_type", pure)]
102724        pub fn get_type(my_enum: &mut Option<BusinessOpeningHoursInterval>) -> String {
102725            match my_enum {
102726                Option::None => "None".to_string(),
102727                Option::Some(_) => "Some".to_string(),
102728            }
102729        }
102730        #[doc = r" Return the inner value."]
102731        #[rhai_fn(global, get = "value", pure)]
102732        pub fn get_value(my_enum: &mut Option<BusinessOpeningHoursInterval>) -> Dynamic {
102733            match my_enum {
102734                Option::None => Dynamic::UNIT,
102735                Option::Some(x) => Dynamic::from(x.clone()),
102736            }
102737        }
102738        #[rhai_fn(global, name = "to_string", pure)]
102739        pub fn to_string(my_enum: &mut Option<BusinessOpeningHoursInterval>) -> String {
102740            format!("{my_enum:?}")
102741        }
102742        #[rhai_fn(global, name = "to_debug", pure)]
102743        pub fn to_debug(my_enum: &mut Option<BusinessOpeningHoursInterval>) -> String {
102744            format!("{:?}", my_enum)
102745        }
102746    }
102747    #[export_module]
102748    #[warn(non_snake_case)]
102749    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102750    mod DiceModule {
102751        #[doc = r" `Option::None` with no inner data"]
102752        pub const None: Option<Dice> = Option::None;
102753        #[doc = r" `Option::Some`"]
102754        pub fn Some(value: Dice) -> Option<Dice> {
102755            Option::Some(value)
102756        }
102757        #[doc = r" Return the current variant of `MyEnum`."]
102758        #[rhai_fn(global, get = "enum_type", pure)]
102759        pub fn get_type(my_enum: &mut Option<Dice>) -> String {
102760            match my_enum {
102761                Option::None => "None".to_string(),
102762                Option::Some(_) => "Some".to_string(),
102763            }
102764        }
102765        #[doc = r" Return the inner value."]
102766        #[rhai_fn(global, get = "value", pure)]
102767        pub fn get_value(my_enum: &mut Option<Dice>) -> Dynamic {
102768            match my_enum {
102769                Option::None => Dynamic::UNIT,
102770                Option::Some(x) => Dynamic::from(x.clone()),
102771            }
102772        }
102773        #[rhai_fn(global, name = "to_string", pure)]
102774        pub fn to_string(my_enum: &mut Option<Dice>) -> String {
102775            format!("{my_enum:?}")
102776        }
102777        #[rhai_fn(global, name = "to_debug", pure)]
102778        pub fn to_debug(my_enum: &mut Option<Dice>) -> String {
102779            format!("{:?}", my_enum)
102780        }
102781    }
102782    #[export_module]
102783    #[warn(non_snake_case)]
102784    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102785    mod InlineQueryResultArticleModule {
102786        #[doc = r" `Option::None` with no inner data"]
102787        pub const None: Option<InlineQueryResultArticle> = Option::None;
102788        #[doc = r" `Option::Some`"]
102789        pub fn Some(value: InlineQueryResultArticle) -> Option<InlineQueryResultArticle> {
102790            Option::Some(value)
102791        }
102792        #[doc = r" Return the current variant of `MyEnum`."]
102793        #[rhai_fn(global, get = "enum_type", pure)]
102794        pub fn get_type(my_enum: &mut Option<InlineQueryResultArticle>) -> String {
102795            match my_enum {
102796                Option::None => "None".to_string(),
102797                Option::Some(_) => "Some".to_string(),
102798            }
102799        }
102800        #[doc = r" Return the inner value."]
102801        #[rhai_fn(global, get = "value", pure)]
102802        pub fn get_value(my_enum: &mut Option<InlineQueryResultArticle>) -> Dynamic {
102803            match my_enum {
102804                Option::None => Dynamic::UNIT,
102805                Option::Some(x) => Dynamic::from(x.clone()),
102806            }
102807        }
102808        #[rhai_fn(global, name = "to_string", pure)]
102809        pub fn to_string(my_enum: &mut Option<InlineQueryResultArticle>) -> String {
102810            format!("{my_enum:?}")
102811        }
102812        #[rhai_fn(global, name = "to_debug", pure)]
102813        pub fn to_debug(my_enum: &mut Option<InlineQueryResultArticle>) -> String {
102814            format!("{:?}", my_enum)
102815        }
102816    }
102817    #[export_module]
102818    #[warn(non_snake_case)]
102819    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102820    mod InputLocationMessageContentModule {
102821        #[doc = r" `Option::None` with no inner data"]
102822        pub const None: Option<InputLocationMessageContent> = Option::None;
102823        #[doc = r" `Option::Some`"]
102824        pub fn Some(value: InputLocationMessageContent) -> Option<InputLocationMessageContent> {
102825            Option::Some(value)
102826        }
102827        #[doc = r" Return the current variant of `MyEnum`."]
102828        #[rhai_fn(global, get = "enum_type", pure)]
102829        pub fn get_type(my_enum: &mut Option<InputLocationMessageContent>) -> String {
102830            match my_enum {
102831                Option::None => "None".to_string(),
102832                Option::Some(_) => "Some".to_string(),
102833            }
102834        }
102835        #[doc = r" Return the inner value."]
102836        #[rhai_fn(global, get = "value", pure)]
102837        pub fn get_value(my_enum: &mut Option<InputLocationMessageContent>) -> Dynamic {
102838            match my_enum {
102839                Option::None => Dynamic::UNIT,
102840                Option::Some(x) => Dynamic::from(x.clone()),
102841            }
102842        }
102843        #[rhai_fn(global, name = "to_string", pure)]
102844        pub fn to_string(my_enum: &mut Option<InputLocationMessageContent>) -> String {
102845            format!("{my_enum:?}")
102846        }
102847        #[rhai_fn(global, name = "to_debug", pure)]
102848        pub fn to_debug(my_enum: &mut Option<InputLocationMessageContent>) -> String {
102849            format!("{:?}", my_enum)
102850        }
102851    }
102852    #[export_module]
102853    #[warn(non_snake_case)]
102854    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102855    mod InlineQueryResultCachedStickerModule {
102856        #[doc = r" `Option::None` with no inner data"]
102857        pub const None: Option<InlineQueryResultCachedSticker> = Option::None;
102858        #[doc = r" `Option::Some`"]
102859        pub fn Some(
102860            value: InlineQueryResultCachedSticker,
102861        ) -> Option<InlineQueryResultCachedSticker> {
102862            Option::Some(value)
102863        }
102864        #[doc = r" Return the current variant of `MyEnum`."]
102865        #[rhai_fn(global, get = "enum_type", pure)]
102866        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedSticker>) -> String {
102867            match my_enum {
102868                Option::None => "None".to_string(),
102869                Option::Some(_) => "Some".to_string(),
102870            }
102871        }
102872        #[doc = r" Return the inner value."]
102873        #[rhai_fn(global, get = "value", pure)]
102874        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedSticker>) -> Dynamic {
102875            match my_enum {
102876                Option::None => Dynamic::UNIT,
102877                Option::Some(x) => Dynamic::from(x.clone()),
102878            }
102879        }
102880        #[rhai_fn(global, name = "to_string", pure)]
102881        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedSticker>) -> String {
102882            format!("{my_enum:?}")
102883        }
102884        #[rhai_fn(global, name = "to_debug", pure)]
102885        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedSticker>) -> String {
102886            format!("{:?}", my_enum)
102887        }
102888    }
102889    #[export_module]
102890    #[warn(non_snake_case)]
102891    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102892    mod InputPaidMediaVideoModule {
102893        #[doc = r" `Option::None` with no inner data"]
102894        pub const None: Option<InputPaidMediaVideo> = Option::None;
102895        #[doc = r" `Option::Some`"]
102896        pub fn Some(value: InputPaidMediaVideo) -> Option<InputPaidMediaVideo> {
102897            Option::Some(value)
102898        }
102899        #[doc = r" Return the current variant of `MyEnum`."]
102900        #[rhai_fn(global, get = "enum_type", pure)]
102901        pub fn get_type(my_enum: &mut Option<InputPaidMediaVideo>) -> String {
102902            match my_enum {
102903                Option::None => "None".to_string(),
102904                Option::Some(_) => "Some".to_string(),
102905            }
102906        }
102907        #[doc = r" Return the inner value."]
102908        #[rhai_fn(global, get = "value", pure)]
102909        pub fn get_value(my_enum: &mut Option<InputPaidMediaVideo>) -> Dynamic {
102910            match my_enum {
102911                Option::None => Dynamic::UNIT,
102912                Option::Some(x) => Dynamic::from(x.clone()),
102913            }
102914        }
102915        #[rhai_fn(global, name = "to_string", pure)]
102916        pub fn to_string(my_enum: &mut Option<InputPaidMediaVideo>) -> String {
102917            format!("{my_enum:?}")
102918        }
102919        #[rhai_fn(global, name = "to_debug", pure)]
102920        pub fn to_debug(my_enum: &mut Option<InputPaidMediaVideo>) -> String {
102921            format!("{:?}", my_enum)
102922        }
102923    }
102924    #[export_module]
102925    #[warn(non_snake_case)]
102926    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102927    mod GiftModule {
102928        #[doc = r" `Option::None` with no inner data"]
102929        pub const None: Option<Gift> = Option::None;
102930        #[doc = r" `Option::Some`"]
102931        pub fn Some(value: Gift) -> Option<Gift> {
102932            Option::Some(value)
102933        }
102934        #[doc = r" Return the current variant of `MyEnum`."]
102935        #[rhai_fn(global, get = "enum_type", pure)]
102936        pub fn get_type(my_enum: &mut Option<Gift>) -> String {
102937            match my_enum {
102938                Option::None => "None".to_string(),
102939                Option::Some(_) => "Some".to_string(),
102940            }
102941        }
102942        #[doc = r" Return the inner value."]
102943        #[rhai_fn(global, get = "value", pure)]
102944        pub fn get_value(my_enum: &mut Option<Gift>) -> Dynamic {
102945            match my_enum {
102946                Option::None => Dynamic::UNIT,
102947                Option::Some(x) => Dynamic::from(x.clone()),
102948            }
102949        }
102950        #[rhai_fn(global, name = "to_string", pure)]
102951        pub fn to_string(my_enum: &mut Option<Gift>) -> String {
102952            format!("{my_enum:?}")
102953        }
102954        #[rhai_fn(global, name = "to_debug", pure)]
102955        pub fn to_debug(my_enum: &mut Option<Gift>) -> String {
102956            format!("{:?}", my_enum)
102957        }
102958    }
102959    #[export_module]
102960    #[warn(non_snake_case)]
102961    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102962    mod MessageOriginUserModule {
102963        #[doc = r" `Option::None` with no inner data"]
102964        pub const None: Option<MessageOriginUser> = Option::None;
102965        #[doc = r" `Option::Some`"]
102966        pub fn Some(value: MessageOriginUser) -> Option<MessageOriginUser> {
102967            Option::Some(value)
102968        }
102969        #[doc = r" Return the current variant of `MyEnum`."]
102970        #[rhai_fn(global, get = "enum_type", pure)]
102971        pub fn get_type(my_enum: &mut Option<MessageOriginUser>) -> String {
102972            match my_enum {
102973                Option::None => "None".to_string(),
102974                Option::Some(_) => "Some".to_string(),
102975            }
102976        }
102977        #[doc = r" Return the inner value."]
102978        #[rhai_fn(global, get = "value", pure)]
102979        pub fn get_value(my_enum: &mut Option<MessageOriginUser>) -> Dynamic {
102980            match my_enum {
102981                Option::None => Dynamic::UNIT,
102982                Option::Some(x) => Dynamic::from(x.clone()),
102983            }
102984        }
102985        #[rhai_fn(global, name = "to_string", pure)]
102986        pub fn to_string(my_enum: &mut Option<MessageOriginUser>) -> String {
102987            format!("{my_enum:?}")
102988        }
102989        #[rhai_fn(global, name = "to_debug", pure)]
102990        pub fn to_debug(my_enum: &mut Option<MessageOriginUser>) -> String {
102991            format!("{:?}", my_enum)
102992        }
102993    }
102994    #[export_module]
102995    #[warn(non_snake_case)]
102996    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
102997    mod KeyboardButtonModule {
102998        #[doc = r" `Option::None` with no inner data"]
102999        pub const None: Option<KeyboardButton> = Option::None;
103000        #[doc = r" `Option::Some`"]
103001        pub fn Some(value: KeyboardButton) -> Option<KeyboardButton> {
103002            Option::Some(value)
103003        }
103004        #[doc = r" Return the current variant of `MyEnum`."]
103005        #[rhai_fn(global, get = "enum_type", pure)]
103006        pub fn get_type(my_enum: &mut Option<KeyboardButton>) -> String {
103007            match my_enum {
103008                Option::None => "None".to_string(),
103009                Option::Some(_) => "Some".to_string(),
103010            }
103011        }
103012        #[doc = r" Return the inner value."]
103013        #[rhai_fn(global, get = "value", pure)]
103014        pub fn get_value(my_enum: &mut Option<KeyboardButton>) -> Dynamic {
103015            match my_enum {
103016                Option::None => Dynamic::UNIT,
103017                Option::Some(x) => Dynamic::from(x.clone()),
103018            }
103019        }
103020        #[rhai_fn(global, name = "to_string", pure)]
103021        pub fn to_string(my_enum: &mut Option<KeyboardButton>) -> String {
103022            format!("{my_enum:?}")
103023        }
103024        #[rhai_fn(global, name = "to_debug", pure)]
103025        pub fn to_debug(my_enum: &mut Option<KeyboardButton>) -> String {
103026            format!("{:?}", my_enum)
103027        }
103028    }
103029    #[export_module]
103030    #[warn(non_snake_case)]
103031    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103032    mod InlineQueryResultCachedMpeg4GifModule {
103033        #[doc = r" `Option::None` with no inner data"]
103034        pub const None: Option<InlineQueryResultCachedMpeg4Gif> = Option::None;
103035        #[doc = r" `Option::Some`"]
103036        pub fn Some(
103037            value: InlineQueryResultCachedMpeg4Gif,
103038        ) -> Option<InlineQueryResultCachedMpeg4Gif> {
103039            Option::Some(value)
103040        }
103041        #[doc = r" Return the current variant of `MyEnum`."]
103042        #[rhai_fn(global, get = "enum_type", pure)]
103043        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedMpeg4Gif>) -> String {
103044            match my_enum {
103045                Option::None => "None".to_string(),
103046                Option::Some(_) => "Some".to_string(),
103047            }
103048        }
103049        #[doc = r" Return the inner value."]
103050        #[rhai_fn(global, get = "value", pure)]
103051        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedMpeg4Gif>) -> Dynamic {
103052            match my_enum {
103053                Option::None => Dynamic::UNIT,
103054                Option::Some(x) => Dynamic::from(x.clone()),
103055            }
103056        }
103057        #[rhai_fn(global, name = "to_string", pure)]
103058        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedMpeg4Gif>) -> String {
103059            format!("{my_enum:?}")
103060        }
103061        #[rhai_fn(global, name = "to_debug", pure)]
103062        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedMpeg4Gif>) -> String {
103063            format!("{:?}", my_enum)
103064        }
103065    }
103066    #[export_module]
103067    #[warn(non_snake_case)]
103068    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103069    mod InputInvoiceMessageContentModule {
103070        #[doc = r" `Option::None` with no inner data"]
103071        pub const None: Option<InputInvoiceMessageContent> = Option::None;
103072        #[doc = r" `Option::Some`"]
103073        pub fn Some(value: InputInvoiceMessageContent) -> Option<InputInvoiceMessageContent> {
103074            Option::Some(value)
103075        }
103076        #[doc = r" Return the current variant of `MyEnum`."]
103077        #[rhai_fn(global, get = "enum_type", pure)]
103078        pub fn get_type(my_enum: &mut Option<InputInvoiceMessageContent>) -> String {
103079            match my_enum {
103080                Option::None => "None".to_string(),
103081                Option::Some(_) => "Some".to_string(),
103082            }
103083        }
103084        #[doc = r" Return the inner value."]
103085        #[rhai_fn(global, get = "value", pure)]
103086        pub fn get_value(my_enum: &mut Option<InputInvoiceMessageContent>) -> Dynamic {
103087            match my_enum {
103088                Option::None => Dynamic::UNIT,
103089                Option::Some(x) => Dynamic::from(x.clone()),
103090            }
103091        }
103092        #[rhai_fn(global, name = "to_string", pure)]
103093        pub fn to_string(my_enum: &mut Option<InputInvoiceMessageContent>) -> String {
103094            format!("{my_enum:?}")
103095        }
103096        #[rhai_fn(global, name = "to_debug", pure)]
103097        pub fn to_debug(my_enum: &mut Option<InputInvoiceMessageContent>) -> String {
103098            format!("{:?}", my_enum)
103099        }
103100    }
103101    #[export_module]
103102    #[warn(non_snake_case)]
103103    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103104    mod BusinessBotRightsModule {
103105        #[doc = r" `Option::None` with no inner data"]
103106        pub const None: Option<BusinessBotRights> = Option::None;
103107        #[doc = r" `Option::Some`"]
103108        pub fn Some(value: BusinessBotRights) -> Option<BusinessBotRights> {
103109            Option::Some(value)
103110        }
103111        #[doc = r" Return the current variant of `MyEnum`."]
103112        #[rhai_fn(global, get = "enum_type", pure)]
103113        pub fn get_type(my_enum: &mut Option<BusinessBotRights>) -> String {
103114            match my_enum {
103115                Option::None => "None".to_string(),
103116                Option::Some(_) => "Some".to_string(),
103117            }
103118        }
103119        #[doc = r" Return the inner value."]
103120        #[rhai_fn(global, get = "value", pure)]
103121        pub fn get_value(my_enum: &mut Option<BusinessBotRights>) -> Dynamic {
103122            match my_enum {
103123                Option::None => Dynamic::UNIT,
103124                Option::Some(x) => Dynamic::from(x.clone()),
103125            }
103126        }
103127        #[rhai_fn(global, name = "to_string", pure)]
103128        pub fn to_string(my_enum: &mut Option<BusinessBotRights>) -> String {
103129            format!("{my_enum:?}")
103130        }
103131        #[rhai_fn(global, name = "to_debug", pure)]
103132        pub fn to_debug(my_enum: &mut Option<BusinessBotRights>) -> String {
103133            format!("{:?}", my_enum)
103134        }
103135    }
103136    #[export_module]
103137    #[warn(non_snake_case)]
103138    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103139    mod InputStoryContentPhotoModule {
103140        #[doc = r" `Option::None` with no inner data"]
103141        pub const None: Option<InputStoryContentPhoto> = Option::None;
103142        #[doc = r" `Option::Some`"]
103143        pub fn Some(value: InputStoryContentPhoto) -> Option<InputStoryContentPhoto> {
103144            Option::Some(value)
103145        }
103146        #[doc = r" Return the current variant of `MyEnum`."]
103147        #[rhai_fn(global, get = "enum_type", pure)]
103148        pub fn get_type(my_enum: &mut Option<InputStoryContentPhoto>) -> String {
103149            match my_enum {
103150                Option::None => "None".to_string(),
103151                Option::Some(_) => "Some".to_string(),
103152            }
103153        }
103154        #[doc = r" Return the inner value."]
103155        #[rhai_fn(global, get = "value", pure)]
103156        pub fn get_value(my_enum: &mut Option<InputStoryContentPhoto>) -> Dynamic {
103157            match my_enum {
103158                Option::None => Dynamic::UNIT,
103159                Option::Some(x) => Dynamic::from(x.clone()),
103160            }
103161        }
103162        #[rhai_fn(global, name = "to_string", pure)]
103163        pub fn to_string(my_enum: &mut Option<InputStoryContentPhoto>) -> String {
103164            format!("{my_enum:?}")
103165        }
103166        #[rhai_fn(global, name = "to_debug", pure)]
103167        pub fn to_debug(my_enum: &mut Option<InputStoryContentPhoto>) -> String {
103168            format!("{:?}", my_enum)
103169        }
103170    }
103171    #[export_module]
103172    #[warn(non_snake_case)]
103173    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103174    mod InputVenueMessageContentModule {
103175        #[doc = r" `Option::None` with no inner data"]
103176        pub const None: Option<InputVenueMessageContent> = Option::None;
103177        #[doc = r" `Option::Some`"]
103178        pub fn Some(value: InputVenueMessageContent) -> Option<InputVenueMessageContent> {
103179            Option::Some(value)
103180        }
103181        #[doc = r" Return the current variant of `MyEnum`."]
103182        #[rhai_fn(global, get = "enum_type", pure)]
103183        pub fn get_type(my_enum: &mut Option<InputVenueMessageContent>) -> String {
103184            match my_enum {
103185                Option::None => "None".to_string(),
103186                Option::Some(_) => "Some".to_string(),
103187            }
103188        }
103189        #[doc = r" Return the inner value."]
103190        #[rhai_fn(global, get = "value", pure)]
103191        pub fn get_value(my_enum: &mut Option<InputVenueMessageContent>) -> Dynamic {
103192            match my_enum {
103193                Option::None => Dynamic::UNIT,
103194                Option::Some(x) => Dynamic::from(x.clone()),
103195            }
103196        }
103197        #[rhai_fn(global, name = "to_string", pure)]
103198        pub fn to_string(my_enum: &mut Option<InputVenueMessageContent>) -> String {
103199            format!("{my_enum:?}")
103200        }
103201        #[rhai_fn(global, name = "to_debug", pure)]
103202        pub fn to_debug(my_enum: &mut Option<InputVenueMessageContent>) -> String {
103203            format!("{:?}", my_enum)
103204        }
103205    }
103206    #[export_module]
103207    #[warn(non_snake_case)]
103208    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103209    mod UniqueGiftSymbolModule {
103210        #[doc = r" `Option::None` with no inner data"]
103211        pub const None: Option<UniqueGiftSymbol> = Option::None;
103212        #[doc = r" `Option::Some`"]
103213        pub fn Some(value: UniqueGiftSymbol) -> Option<UniqueGiftSymbol> {
103214            Option::Some(value)
103215        }
103216        #[doc = r" Return the current variant of `MyEnum`."]
103217        #[rhai_fn(global, get = "enum_type", pure)]
103218        pub fn get_type(my_enum: &mut Option<UniqueGiftSymbol>) -> String {
103219            match my_enum {
103220                Option::None => "None".to_string(),
103221                Option::Some(_) => "Some".to_string(),
103222            }
103223        }
103224        #[doc = r" Return the inner value."]
103225        #[rhai_fn(global, get = "value", pure)]
103226        pub fn get_value(my_enum: &mut Option<UniqueGiftSymbol>) -> Dynamic {
103227            match my_enum {
103228                Option::None => Dynamic::UNIT,
103229                Option::Some(x) => Dynamic::from(x.clone()),
103230            }
103231        }
103232        #[rhai_fn(global, name = "to_string", pure)]
103233        pub fn to_string(my_enum: &mut Option<UniqueGiftSymbol>) -> String {
103234            format!("{my_enum:?}")
103235        }
103236        #[rhai_fn(global, name = "to_debug", pure)]
103237        pub fn to_debug(my_enum: &mut Option<UniqueGiftSymbol>) -> String {
103238            format!("{:?}", my_enum)
103239        }
103240    }
103241    #[export_module]
103242    #[warn(non_snake_case)]
103243    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103244    mod InputChecklistTaskModule {
103245        #[doc = r" `Option::None` with no inner data"]
103246        pub const None: Option<InputChecklistTask> = Option::None;
103247        #[doc = r" `Option::Some`"]
103248        pub fn Some(value: InputChecklistTask) -> Option<InputChecklistTask> {
103249            Option::Some(value)
103250        }
103251        #[doc = r" Return the current variant of `MyEnum`."]
103252        #[rhai_fn(global, get = "enum_type", pure)]
103253        pub fn get_type(my_enum: &mut Option<InputChecklistTask>) -> String {
103254            match my_enum {
103255                Option::None => "None".to_string(),
103256                Option::Some(_) => "Some".to_string(),
103257            }
103258        }
103259        #[doc = r" Return the inner value."]
103260        #[rhai_fn(global, get = "value", pure)]
103261        pub fn get_value(my_enum: &mut Option<InputChecklistTask>) -> Dynamic {
103262            match my_enum {
103263                Option::None => Dynamic::UNIT,
103264                Option::Some(x) => Dynamic::from(x.clone()),
103265            }
103266        }
103267        #[rhai_fn(global, name = "to_string", pure)]
103268        pub fn to_string(my_enum: &mut Option<InputChecklistTask>) -> String {
103269            format!("{my_enum:?}")
103270        }
103271        #[rhai_fn(global, name = "to_debug", pure)]
103272        pub fn to_debug(my_enum: &mut Option<InputChecklistTask>) -> String {
103273            format!("{:?}", my_enum)
103274        }
103275    }
103276    #[export_module]
103277    #[warn(non_snake_case)]
103278    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103279    mod PaidMessagePriceChangedModule {
103280        #[doc = r" `Option::None` with no inner data"]
103281        pub const None: Option<PaidMessagePriceChanged> = Option::None;
103282        #[doc = r" `Option::Some`"]
103283        pub fn Some(value: PaidMessagePriceChanged) -> Option<PaidMessagePriceChanged> {
103284            Option::Some(value)
103285        }
103286        #[doc = r" Return the current variant of `MyEnum`."]
103287        #[rhai_fn(global, get = "enum_type", pure)]
103288        pub fn get_type(my_enum: &mut Option<PaidMessagePriceChanged>) -> String {
103289            match my_enum {
103290                Option::None => "None".to_string(),
103291                Option::Some(_) => "Some".to_string(),
103292            }
103293        }
103294        #[doc = r" Return the inner value."]
103295        #[rhai_fn(global, get = "value", pure)]
103296        pub fn get_value(my_enum: &mut Option<PaidMessagePriceChanged>) -> Dynamic {
103297            match my_enum {
103298                Option::None => Dynamic::UNIT,
103299                Option::Some(x) => Dynamic::from(x.clone()),
103300            }
103301        }
103302        #[rhai_fn(global, name = "to_string", pure)]
103303        pub fn to_string(my_enum: &mut Option<PaidMessagePriceChanged>) -> String {
103304            format!("{my_enum:?}")
103305        }
103306        #[rhai_fn(global, name = "to_debug", pure)]
103307        pub fn to_debug(my_enum: &mut Option<PaidMessagePriceChanged>) -> String {
103308            format!("{:?}", my_enum)
103309        }
103310    }
103311    #[export_module]
103312    #[warn(non_snake_case)]
103313    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103314    mod TransactionPartnerModule {
103315        #[doc = r" `Option::None` with no inner data"]
103316        pub const None: Option<TransactionPartner> = Option::None;
103317        #[doc = r" `Option::Some`"]
103318        pub fn Some(value: TransactionPartner) -> Option<TransactionPartner> {
103319            Option::Some(value)
103320        }
103321        #[doc = r" Return the current variant of `MyEnum`."]
103322        #[rhai_fn(global, get = "enum_type", pure)]
103323        pub fn get_type(my_enum: &mut Option<TransactionPartner>) -> String {
103324            match my_enum {
103325                Option::None => "None".to_string(),
103326                Option::Some(_) => "Some".to_string(),
103327            }
103328        }
103329        #[doc = r" Return the inner value."]
103330        #[rhai_fn(global, get = "value", pure)]
103331        pub fn get_value(my_enum: &mut Option<TransactionPartner>) -> Dynamic {
103332            match my_enum {
103333                Option::None => Dynamic::UNIT,
103334                Option::Some(x) => Dynamic::from(x.clone()),
103335            }
103336        }
103337        #[rhai_fn(global, name = "to_string", pure)]
103338        pub fn to_string(my_enum: &mut Option<TransactionPartner>) -> String {
103339            format!("{my_enum:?}")
103340        }
103341        #[rhai_fn(global, name = "to_debug", pure)]
103342        pub fn to_debug(my_enum: &mut Option<TransactionPartner>) -> String {
103343            format!("{:?}", my_enum)
103344        }
103345    }
103346    #[export_module]
103347    #[warn(non_snake_case)]
103348    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103349    mod MessageReactionCountUpdatedModule {
103350        #[doc = r" `Option::None` with no inner data"]
103351        pub const None: Option<MessageReactionCountUpdated> = Option::None;
103352        #[doc = r" `Option::Some`"]
103353        pub fn Some(value: MessageReactionCountUpdated) -> Option<MessageReactionCountUpdated> {
103354            Option::Some(value)
103355        }
103356        #[doc = r" Return the current variant of `MyEnum`."]
103357        #[rhai_fn(global, get = "enum_type", pure)]
103358        pub fn get_type(my_enum: &mut Option<MessageReactionCountUpdated>) -> String {
103359            match my_enum {
103360                Option::None => "None".to_string(),
103361                Option::Some(_) => "Some".to_string(),
103362            }
103363        }
103364        #[doc = r" Return the inner value."]
103365        #[rhai_fn(global, get = "value", pure)]
103366        pub fn get_value(my_enum: &mut Option<MessageReactionCountUpdated>) -> Dynamic {
103367            match my_enum {
103368                Option::None => Dynamic::UNIT,
103369                Option::Some(x) => Dynamic::from(x.clone()),
103370            }
103371        }
103372        #[rhai_fn(global, name = "to_string", pure)]
103373        pub fn to_string(my_enum: &mut Option<MessageReactionCountUpdated>) -> String {
103374            format!("{my_enum:?}")
103375        }
103376        #[rhai_fn(global, name = "to_debug", pure)]
103377        pub fn to_debug(my_enum: &mut Option<MessageReactionCountUpdated>) -> String {
103378            format!("{:?}", my_enum)
103379        }
103380    }
103381    #[export_module]
103382    #[warn(non_snake_case)]
103383    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103384    mod LocationModule {
103385        #[doc = r" `Option::None` with no inner data"]
103386        pub const None: Option<Location> = Option::None;
103387        #[doc = r" `Option::Some`"]
103388        pub fn Some(value: Location) -> Option<Location> {
103389            Option::Some(value)
103390        }
103391        #[doc = r" Return the current variant of `MyEnum`."]
103392        #[rhai_fn(global, get = "enum_type", pure)]
103393        pub fn get_type(my_enum: &mut Option<Location>) -> String {
103394            match my_enum {
103395                Option::None => "None".to_string(),
103396                Option::Some(_) => "Some".to_string(),
103397            }
103398        }
103399        #[doc = r" Return the inner value."]
103400        #[rhai_fn(global, get = "value", pure)]
103401        pub fn get_value(my_enum: &mut Option<Location>) -> Dynamic {
103402            match my_enum {
103403                Option::None => Dynamic::UNIT,
103404                Option::Some(x) => Dynamic::from(x.clone()),
103405            }
103406        }
103407        #[rhai_fn(global, name = "to_string", pure)]
103408        pub fn to_string(my_enum: &mut Option<Location>) -> String {
103409            format!("{my_enum:?}")
103410        }
103411        #[rhai_fn(global, name = "to_debug", pure)]
103412        pub fn to_debug(my_enum: &mut Option<Location>) -> String {
103413            format!("{:?}", my_enum)
103414        }
103415    }
103416    #[export_module]
103417    #[warn(non_snake_case)]
103418    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103419    mod GameHighScoreModule {
103420        #[doc = r" `Option::None` with no inner data"]
103421        pub const None: Option<GameHighScore> = Option::None;
103422        #[doc = r" `Option::Some`"]
103423        pub fn Some(value: GameHighScore) -> Option<GameHighScore> {
103424            Option::Some(value)
103425        }
103426        #[doc = r" Return the current variant of `MyEnum`."]
103427        #[rhai_fn(global, get = "enum_type", pure)]
103428        pub fn get_type(my_enum: &mut Option<GameHighScore>) -> String {
103429            match my_enum {
103430                Option::None => "None".to_string(),
103431                Option::Some(_) => "Some".to_string(),
103432            }
103433        }
103434        #[doc = r" Return the inner value."]
103435        #[rhai_fn(global, get = "value", pure)]
103436        pub fn get_value(my_enum: &mut Option<GameHighScore>) -> Dynamic {
103437            match my_enum {
103438                Option::None => Dynamic::UNIT,
103439                Option::Some(x) => Dynamic::from(x.clone()),
103440            }
103441        }
103442        #[rhai_fn(global, name = "to_string", pure)]
103443        pub fn to_string(my_enum: &mut Option<GameHighScore>) -> String {
103444            format!("{my_enum:?}")
103445        }
103446        #[rhai_fn(global, name = "to_debug", pure)]
103447        pub fn to_debug(my_enum: &mut Option<GameHighScore>) -> String {
103448            format!("{:?}", my_enum)
103449        }
103450    }
103451    #[export_module]
103452    #[warn(non_snake_case)]
103453    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103454    mod MessageReactionUpdatedModule {
103455        #[doc = r" `Option::None` with no inner data"]
103456        pub const None: Option<MessageReactionUpdated> = Option::None;
103457        #[doc = r" `Option::Some`"]
103458        pub fn Some(value: MessageReactionUpdated) -> Option<MessageReactionUpdated> {
103459            Option::Some(value)
103460        }
103461        #[doc = r" Return the current variant of `MyEnum`."]
103462        #[rhai_fn(global, get = "enum_type", pure)]
103463        pub fn get_type(my_enum: &mut Option<MessageReactionUpdated>) -> String {
103464            match my_enum {
103465                Option::None => "None".to_string(),
103466                Option::Some(_) => "Some".to_string(),
103467            }
103468        }
103469        #[doc = r" Return the inner value."]
103470        #[rhai_fn(global, get = "value", pure)]
103471        pub fn get_value(my_enum: &mut Option<MessageReactionUpdated>) -> Dynamic {
103472            match my_enum {
103473                Option::None => Dynamic::UNIT,
103474                Option::Some(x) => Dynamic::from(x.clone()),
103475            }
103476        }
103477        #[rhai_fn(global, name = "to_string", pure)]
103478        pub fn to_string(my_enum: &mut Option<MessageReactionUpdated>) -> String {
103479            format!("{my_enum:?}")
103480        }
103481        #[rhai_fn(global, name = "to_debug", pure)]
103482        pub fn to_debug(my_enum: &mut Option<MessageReactionUpdated>) -> String {
103483            format!("{:?}", my_enum)
103484        }
103485    }
103486    #[export_module]
103487    #[warn(non_snake_case)]
103488    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103489    mod SuccessfulPaymentModule {
103490        #[doc = r" `Option::None` with no inner data"]
103491        pub const None: Option<SuccessfulPayment> = Option::None;
103492        #[doc = r" `Option::Some`"]
103493        pub fn Some(value: SuccessfulPayment) -> Option<SuccessfulPayment> {
103494            Option::Some(value)
103495        }
103496        #[doc = r" Return the current variant of `MyEnum`."]
103497        #[rhai_fn(global, get = "enum_type", pure)]
103498        pub fn get_type(my_enum: &mut Option<SuccessfulPayment>) -> String {
103499            match my_enum {
103500                Option::None => "None".to_string(),
103501                Option::Some(_) => "Some".to_string(),
103502            }
103503        }
103504        #[doc = r" Return the inner value."]
103505        #[rhai_fn(global, get = "value", pure)]
103506        pub fn get_value(my_enum: &mut Option<SuccessfulPayment>) -> Dynamic {
103507            match my_enum {
103508                Option::None => Dynamic::UNIT,
103509                Option::Some(x) => Dynamic::from(x.clone()),
103510            }
103511        }
103512        #[rhai_fn(global, name = "to_string", pure)]
103513        pub fn to_string(my_enum: &mut Option<SuccessfulPayment>) -> String {
103514            format!("{my_enum:?}")
103515        }
103516        #[rhai_fn(global, name = "to_debug", pure)]
103517        pub fn to_debug(my_enum: &mut Option<SuccessfulPayment>) -> String {
103518            format!("{:?}", my_enum)
103519        }
103520    }
103521    #[export_module]
103522    #[warn(non_snake_case)]
103523    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103524    mod InlineQueryResultDocumentModule {
103525        #[doc = r" `Option::None` with no inner data"]
103526        pub const None: Option<InlineQueryResultDocument> = Option::None;
103527        #[doc = r" `Option::Some`"]
103528        pub fn Some(value: InlineQueryResultDocument) -> Option<InlineQueryResultDocument> {
103529            Option::Some(value)
103530        }
103531        #[doc = r" Return the current variant of `MyEnum`."]
103532        #[rhai_fn(global, get = "enum_type", pure)]
103533        pub fn get_type(my_enum: &mut Option<InlineQueryResultDocument>) -> String {
103534            match my_enum {
103535                Option::None => "None".to_string(),
103536                Option::Some(_) => "Some".to_string(),
103537            }
103538        }
103539        #[doc = r" Return the inner value."]
103540        #[rhai_fn(global, get = "value", pure)]
103541        pub fn get_value(my_enum: &mut Option<InlineQueryResultDocument>) -> Dynamic {
103542            match my_enum {
103543                Option::None => Dynamic::UNIT,
103544                Option::Some(x) => Dynamic::from(x.clone()),
103545            }
103546        }
103547        #[rhai_fn(global, name = "to_string", pure)]
103548        pub fn to_string(my_enum: &mut Option<InlineQueryResultDocument>) -> String {
103549            format!("{my_enum:?}")
103550        }
103551        #[rhai_fn(global, name = "to_debug", pure)]
103552        pub fn to_debug(my_enum: &mut Option<InlineQueryResultDocument>) -> String {
103553            format!("{:?}", my_enum)
103554        }
103555    }
103556    #[export_module]
103557    #[warn(non_snake_case)]
103558    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103559    mod SuggestedPostApprovedModule {
103560        #[doc = r" `Option::None` with no inner data"]
103561        pub const None: Option<SuggestedPostApproved> = Option::None;
103562        #[doc = r" `Option::Some`"]
103563        pub fn Some(value: SuggestedPostApproved) -> Option<SuggestedPostApproved> {
103564            Option::Some(value)
103565        }
103566        #[doc = r" Return the current variant of `MyEnum`."]
103567        #[rhai_fn(global, get = "enum_type", pure)]
103568        pub fn get_type(my_enum: &mut Option<SuggestedPostApproved>) -> String {
103569            match my_enum {
103570                Option::None => "None".to_string(),
103571                Option::Some(_) => "Some".to_string(),
103572            }
103573        }
103574        #[doc = r" Return the inner value."]
103575        #[rhai_fn(global, get = "value", pure)]
103576        pub fn get_value(my_enum: &mut Option<SuggestedPostApproved>) -> Dynamic {
103577            match my_enum {
103578                Option::None => Dynamic::UNIT,
103579                Option::Some(x) => Dynamic::from(x.clone()),
103580            }
103581        }
103582        #[rhai_fn(global, name = "to_string", pure)]
103583        pub fn to_string(my_enum: &mut Option<SuggestedPostApproved>) -> String {
103584            format!("{my_enum:?}")
103585        }
103586        #[rhai_fn(global, name = "to_debug", pure)]
103587        pub fn to_debug(my_enum: &mut Option<SuggestedPostApproved>) -> String {
103588            format!("{:?}", my_enum)
103589        }
103590    }
103591    #[export_module]
103592    #[warn(non_snake_case)]
103593    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103594    mod MenuButtonModule {
103595        #[doc = r" `Option::None` with no inner data"]
103596        pub const None: Option<MenuButton> = Option::None;
103597        #[doc = r" `Option::Some`"]
103598        pub fn Some(value: MenuButton) -> Option<MenuButton> {
103599            Option::Some(value)
103600        }
103601        #[doc = r" Return the current variant of `MyEnum`."]
103602        #[rhai_fn(global, get = "enum_type", pure)]
103603        pub fn get_type(my_enum: &mut Option<MenuButton>) -> String {
103604            match my_enum {
103605                Option::None => "None".to_string(),
103606                Option::Some(_) => "Some".to_string(),
103607            }
103608        }
103609        #[doc = r" Return the inner value."]
103610        #[rhai_fn(global, get = "value", pure)]
103611        pub fn get_value(my_enum: &mut Option<MenuButton>) -> Dynamic {
103612            match my_enum {
103613                Option::None => Dynamic::UNIT,
103614                Option::Some(x) => Dynamic::from(x.clone()),
103615            }
103616        }
103617        #[rhai_fn(global, name = "to_string", pure)]
103618        pub fn to_string(my_enum: &mut Option<MenuButton>) -> String {
103619            format!("{my_enum:?}")
103620        }
103621        #[rhai_fn(global, name = "to_debug", pure)]
103622        pub fn to_debug(my_enum: &mut Option<MenuButton>) -> String {
103623            format!("{:?}", my_enum)
103624        }
103625    }
103626    #[export_module]
103627    #[warn(non_snake_case)]
103628    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103629    mod UserModule {
103630        #[doc = r" `Option::None` with no inner data"]
103631        pub const None: Option<User> = Option::None;
103632        #[doc = r" `Option::Some`"]
103633        pub fn Some(value: User) -> Option<User> {
103634            Option::Some(value)
103635        }
103636        #[doc = r" Return the current variant of `MyEnum`."]
103637        #[rhai_fn(global, get = "enum_type", pure)]
103638        pub fn get_type(my_enum: &mut Option<User>) -> String {
103639            match my_enum {
103640                Option::None => "None".to_string(),
103641                Option::Some(_) => "Some".to_string(),
103642            }
103643        }
103644        #[doc = r" Return the inner value."]
103645        #[rhai_fn(global, get = "value", pure)]
103646        pub fn get_value(my_enum: &mut Option<User>) -> Dynamic {
103647            match my_enum {
103648                Option::None => Dynamic::UNIT,
103649                Option::Some(x) => Dynamic::from(x.clone()),
103650            }
103651        }
103652        #[rhai_fn(global, name = "to_string", pure)]
103653        pub fn to_string(my_enum: &mut Option<User>) -> String {
103654            format!("{my_enum:?}")
103655        }
103656        #[rhai_fn(global, name = "to_debug", pure)]
103657        pub fn to_debug(my_enum: &mut Option<User>) -> String {
103658            format!("{:?}", my_enum)
103659        }
103660    }
103661    #[export_module]
103662    #[warn(non_snake_case)]
103663    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103664    mod RevenueWithdrawalStateModule {
103665        #[doc = r" `Option::None` with no inner data"]
103666        pub const None: Option<RevenueWithdrawalState> = Option::None;
103667        #[doc = r" `Option::Some`"]
103668        pub fn Some(value: RevenueWithdrawalState) -> Option<RevenueWithdrawalState> {
103669            Option::Some(value)
103670        }
103671        #[doc = r" Return the current variant of `MyEnum`."]
103672        #[rhai_fn(global, get = "enum_type", pure)]
103673        pub fn get_type(my_enum: &mut Option<RevenueWithdrawalState>) -> String {
103674            match my_enum {
103675                Option::None => "None".to_string(),
103676                Option::Some(_) => "Some".to_string(),
103677            }
103678        }
103679        #[doc = r" Return the inner value."]
103680        #[rhai_fn(global, get = "value", pure)]
103681        pub fn get_value(my_enum: &mut Option<RevenueWithdrawalState>) -> Dynamic {
103682            match my_enum {
103683                Option::None => Dynamic::UNIT,
103684                Option::Some(x) => Dynamic::from(x.clone()),
103685            }
103686        }
103687        #[rhai_fn(global, name = "to_string", pure)]
103688        pub fn to_string(my_enum: &mut Option<RevenueWithdrawalState>) -> String {
103689            format!("{my_enum:?}")
103690        }
103691        #[rhai_fn(global, name = "to_debug", pure)]
103692        pub fn to_debug(my_enum: &mut Option<RevenueWithdrawalState>) -> String {
103693            format!("{:?}", my_enum)
103694        }
103695    }
103696    #[export_module]
103697    #[warn(non_snake_case)]
103698    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103699    mod RevenueWithdrawalStatePendingModule {
103700        #[doc = r" `Option::None` with no inner data"]
103701        pub const None: Option<RevenueWithdrawalStatePending> = Option::None;
103702        #[doc = r" `Option::Some`"]
103703        pub fn Some(value: RevenueWithdrawalStatePending) -> Option<RevenueWithdrawalStatePending> {
103704            Option::Some(value)
103705        }
103706        #[doc = r" Return the current variant of `MyEnum`."]
103707        #[rhai_fn(global, get = "enum_type", pure)]
103708        pub fn get_type(my_enum: &mut Option<RevenueWithdrawalStatePending>) -> String {
103709            match my_enum {
103710                Option::None => "None".to_string(),
103711                Option::Some(_) => "Some".to_string(),
103712            }
103713        }
103714        #[doc = r" Return the inner value."]
103715        #[rhai_fn(global, get = "value", pure)]
103716        pub fn get_value(my_enum: &mut Option<RevenueWithdrawalStatePending>) -> Dynamic {
103717            match my_enum {
103718                Option::None => Dynamic::UNIT,
103719                Option::Some(x) => Dynamic::from(x.clone()),
103720            }
103721        }
103722        #[rhai_fn(global, name = "to_string", pure)]
103723        pub fn to_string(my_enum: &mut Option<RevenueWithdrawalStatePending>) -> String {
103724            format!("{my_enum:?}")
103725        }
103726        #[rhai_fn(global, name = "to_debug", pure)]
103727        pub fn to_debug(my_enum: &mut Option<RevenueWithdrawalStatePending>) -> String {
103728            format!("{:?}", my_enum)
103729        }
103730    }
103731    #[export_module]
103732    #[warn(non_snake_case)]
103733    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103734    mod BotDescriptionModule {
103735        #[doc = r" `Option::None` with no inner data"]
103736        pub const None: Option<BotDescription> = Option::None;
103737        #[doc = r" `Option::Some`"]
103738        pub fn Some(value: BotDescription) -> Option<BotDescription> {
103739            Option::Some(value)
103740        }
103741        #[doc = r" Return the current variant of `MyEnum`."]
103742        #[rhai_fn(global, get = "enum_type", pure)]
103743        pub fn get_type(my_enum: &mut Option<BotDescription>) -> String {
103744            match my_enum {
103745                Option::None => "None".to_string(),
103746                Option::Some(_) => "Some".to_string(),
103747            }
103748        }
103749        #[doc = r" Return the inner value."]
103750        #[rhai_fn(global, get = "value", pure)]
103751        pub fn get_value(my_enum: &mut Option<BotDescription>) -> Dynamic {
103752            match my_enum {
103753                Option::None => Dynamic::UNIT,
103754                Option::Some(x) => Dynamic::from(x.clone()),
103755            }
103756        }
103757        #[rhai_fn(global, name = "to_string", pure)]
103758        pub fn to_string(my_enum: &mut Option<BotDescription>) -> String {
103759            format!("{my_enum:?}")
103760        }
103761        #[rhai_fn(global, name = "to_debug", pure)]
103762        pub fn to_debug(my_enum: &mut Option<BotDescription>) -> String {
103763            format!("{:?}", my_enum)
103764        }
103765    }
103766    #[export_module]
103767    #[warn(non_snake_case)]
103768    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103769    mod TransactionPartnerAffiliateProgramModule {
103770        #[doc = r" `Option::None` with no inner data"]
103771        pub const None: Option<TransactionPartnerAffiliateProgram> = Option::None;
103772        #[doc = r" `Option::Some`"]
103773        pub fn Some(
103774            value: TransactionPartnerAffiliateProgram,
103775        ) -> Option<TransactionPartnerAffiliateProgram> {
103776            Option::Some(value)
103777        }
103778        #[doc = r" Return the current variant of `MyEnum`."]
103779        #[rhai_fn(global, get = "enum_type", pure)]
103780        pub fn get_type(my_enum: &mut Option<TransactionPartnerAffiliateProgram>) -> String {
103781            match my_enum {
103782                Option::None => "None".to_string(),
103783                Option::Some(_) => "Some".to_string(),
103784            }
103785        }
103786        #[doc = r" Return the inner value."]
103787        #[rhai_fn(global, get = "value", pure)]
103788        pub fn get_value(my_enum: &mut Option<TransactionPartnerAffiliateProgram>) -> Dynamic {
103789            match my_enum {
103790                Option::None => Dynamic::UNIT,
103791                Option::Some(x) => Dynamic::from(x.clone()),
103792            }
103793        }
103794        #[rhai_fn(global, name = "to_string", pure)]
103795        pub fn to_string(my_enum: &mut Option<TransactionPartnerAffiliateProgram>) -> String {
103796            format!("{my_enum:?}")
103797        }
103798        #[rhai_fn(global, name = "to_debug", pure)]
103799        pub fn to_debug(my_enum: &mut Option<TransactionPartnerAffiliateProgram>) -> String {
103800            format!("{:?}", my_enum)
103801        }
103802    }
103803    #[export_module]
103804    #[warn(non_snake_case)]
103805    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103806    mod InlineQueryResultCachedVideoModule {
103807        #[doc = r" `Option::None` with no inner data"]
103808        pub const None: Option<InlineQueryResultCachedVideo> = Option::None;
103809        #[doc = r" `Option::Some`"]
103810        pub fn Some(value: InlineQueryResultCachedVideo) -> Option<InlineQueryResultCachedVideo> {
103811            Option::Some(value)
103812        }
103813        #[doc = r" Return the current variant of `MyEnum`."]
103814        #[rhai_fn(global, get = "enum_type", pure)]
103815        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedVideo>) -> String {
103816            match my_enum {
103817                Option::None => "None".to_string(),
103818                Option::Some(_) => "Some".to_string(),
103819            }
103820        }
103821        #[doc = r" Return the inner value."]
103822        #[rhai_fn(global, get = "value", pure)]
103823        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedVideo>) -> Dynamic {
103824            match my_enum {
103825                Option::None => Dynamic::UNIT,
103826                Option::Some(x) => Dynamic::from(x.clone()),
103827            }
103828        }
103829        #[rhai_fn(global, name = "to_string", pure)]
103830        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedVideo>) -> String {
103831            format!("{my_enum:?}")
103832        }
103833        #[rhai_fn(global, name = "to_debug", pure)]
103834        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedVideo>) -> String {
103835            format!("{:?}", my_enum)
103836        }
103837    }
103838    #[export_module]
103839    #[warn(non_snake_case)]
103840    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103841    mod BusinessConnectionModule {
103842        #[doc = r" `Option::None` with no inner data"]
103843        pub const None: Option<BusinessConnection> = Option::None;
103844        #[doc = r" `Option::Some`"]
103845        pub fn Some(value: BusinessConnection) -> Option<BusinessConnection> {
103846            Option::Some(value)
103847        }
103848        #[doc = r" Return the current variant of `MyEnum`."]
103849        #[rhai_fn(global, get = "enum_type", pure)]
103850        pub fn get_type(my_enum: &mut Option<BusinessConnection>) -> String {
103851            match my_enum {
103852                Option::None => "None".to_string(),
103853                Option::Some(_) => "Some".to_string(),
103854            }
103855        }
103856        #[doc = r" Return the inner value."]
103857        #[rhai_fn(global, get = "value", pure)]
103858        pub fn get_value(my_enum: &mut Option<BusinessConnection>) -> Dynamic {
103859            match my_enum {
103860                Option::None => Dynamic::UNIT,
103861                Option::Some(x) => Dynamic::from(x.clone()),
103862            }
103863        }
103864        #[rhai_fn(global, name = "to_string", pure)]
103865        pub fn to_string(my_enum: &mut Option<BusinessConnection>) -> String {
103866            format!("{my_enum:?}")
103867        }
103868        #[rhai_fn(global, name = "to_debug", pure)]
103869        pub fn to_debug(my_enum: &mut Option<BusinessConnection>) -> String {
103870            format!("{:?}", my_enum)
103871        }
103872    }
103873    #[export_module]
103874    #[warn(non_snake_case)]
103875    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103876    mod UserProfilePhotosModule {
103877        #[doc = r" `Option::None` with no inner data"]
103878        pub const None: Option<UserProfilePhotos> = Option::None;
103879        #[doc = r" `Option::Some`"]
103880        pub fn Some(value: UserProfilePhotos) -> Option<UserProfilePhotos> {
103881            Option::Some(value)
103882        }
103883        #[doc = r" Return the current variant of `MyEnum`."]
103884        #[rhai_fn(global, get = "enum_type", pure)]
103885        pub fn get_type(my_enum: &mut Option<UserProfilePhotos>) -> String {
103886            match my_enum {
103887                Option::None => "None".to_string(),
103888                Option::Some(_) => "Some".to_string(),
103889            }
103890        }
103891        #[doc = r" Return the inner value."]
103892        #[rhai_fn(global, get = "value", pure)]
103893        pub fn get_value(my_enum: &mut Option<UserProfilePhotos>) -> Dynamic {
103894            match my_enum {
103895                Option::None => Dynamic::UNIT,
103896                Option::Some(x) => Dynamic::from(x.clone()),
103897            }
103898        }
103899        #[rhai_fn(global, name = "to_string", pure)]
103900        pub fn to_string(my_enum: &mut Option<UserProfilePhotos>) -> String {
103901            format!("{my_enum:?}")
103902        }
103903        #[rhai_fn(global, name = "to_debug", pure)]
103904        pub fn to_debug(my_enum: &mut Option<UserProfilePhotos>) -> String {
103905            format!("{:?}", my_enum)
103906        }
103907    }
103908    #[export_module]
103909    #[warn(non_snake_case)]
103910    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103911    mod ReactionTypePaidModule {
103912        #[doc = r" `Option::None` with no inner data"]
103913        pub const None: Option<ReactionTypePaid> = Option::None;
103914        #[doc = r" `Option::Some`"]
103915        pub fn Some(value: ReactionTypePaid) -> Option<ReactionTypePaid> {
103916            Option::Some(value)
103917        }
103918        #[doc = r" Return the current variant of `MyEnum`."]
103919        #[rhai_fn(global, get = "enum_type", pure)]
103920        pub fn get_type(my_enum: &mut Option<ReactionTypePaid>) -> String {
103921            match my_enum {
103922                Option::None => "None".to_string(),
103923                Option::Some(_) => "Some".to_string(),
103924            }
103925        }
103926        #[doc = r" Return the inner value."]
103927        #[rhai_fn(global, get = "value", pure)]
103928        pub fn get_value(my_enum: &mut Option<ReactionTypePaid>) -> Dynamic {
103929            match my_enum {
103930                Option::None => Dynamic::UNIT,
103931                Option::Some(x) => Dynamic::from(x.clone()),
103932            }
103933        }
103934        #[rhai_fn(global, name = "to_string", pure)]
103935        pub fn to_string(my_enum: &mut Option<ReactionTypePaid>) -> String {
103936            format!("{my_enum:?}")
103937        }
103938        #[rhai_fn(global, name = "to_debug", pure)]
103939        pub fn to_debug(my_enum: &mut Option<ReactionTypePaid>) -> String {
103940            format!("{:?}", my_enum)
103941        }
103942    }
103943    #[export_module]
103944    #[warn(non_snake_case)]
103945    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103946    mod ChatMemberBannedModule {
103947        #[doc = r" `Option::None` with no inner data"]
103948        pub const None: Option<ChatMemberBanned> = Option::None;
103949        #[doc = r" `Option::Some`"]
103950        pub fn Some(value: ChatMemberBanned) -> Option<ChatMemberBanned> {
103951            Option::Some(value)
103952        }
103953        #[doc = r" Return the current variant of `MyEnum`."]
103954        #[rhai_fn(global, get = "enum_type", pure)]
103955        pub fn get_type(my_enum: &mut Option<ChatMemberBanned>) -> String {
103956            match my_enum {
103957                Option::None => "None".to_string(),
103958                Option::Some(_) => "Some".to_string(),
103959            }
103960        }
103961        #[doc = r" Return the inner value."]
103962        #[rhai_fn(global, get = "value", pure)]
103963        pub fn get_value(my_enum: &mut Option<ChatMemberBanned>) -> Dynamic {
103964            match my_enum {
103965                Option::None => Dynamic::UNIT,
103966                Option::Some(x) => Dynamic::from(x.clone()),
103967            }
103968        }
103969        #[rhai_fn(global, name = "to_string", pure)]
103970        pub fn to_string(my_enum: &mut Option<ChatMemberBanned>) -> String {
103971            format!("{my_enum:?}")
103972        }
103973        #[rhai_fn(global, name = "to_debug", pure)]
103974        pub fn to_debug(my_enum: &mut Option<ChatMemberBanned>) -> String {
103975            format!("{:?}", my_enum)
103976        }
103977    }
103978    #[export_module]
103979    #[warn(non_snake_case)]
103980    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
103981    mod UsersSharedModule {
103982        #[doc = r" `Option::None` with no inner data"]
103983        pub const None: Option<UsersShared> = Option::None;
103984        #[doc = r" `Option::Some`"]
103985        pub fn Some(value: UsersShared) -> Option<UsersShared> {
103986            Option::Some(value)
103987        }
103988        #[doc = r" Return the current variant of `MyEnum`."]
103989        #[rhai_fn(global, get = "enum_type", pure)]
103990        pub fn get_type(my_enum: &mut Option<UsersShared>) -> String {
103991            match my_enum {
103992                Option::None => "None".to_string(),
103993                Option::Some(_) => "Some".to_string(),
103994            }
103995        }
103996        #[doc = r" Return the inner value."]
103997        #[rhai_fn(global, get = "value", pure)]
103998        pub fn get_value(my_enum: &mut Option<UsersShared>) -> Dynamic {
103999            match my_enum {
104000                Option::None => Dynamic::UNIT,
104001                Option::Some(x) => Dynamic::from(x.clone()),
104002            }
104003        }
104004        #[rhai_fn(global, name = "to_string", pure)]
104005        pub fn to_string(my_enum: &mut Option<UsersShared>) -> String {
104006            format!("{my_enum:?}")
104007        }
104008        #[rhai_fn(global, name = "to_debug", pure)]
104009        pub fn to_debug(my_enum: &mut Option<UsersShared>) -> String {
104010            format!("{:?}", my_enum)
104011        }
104012    }
104013    #[export_module]
104014    #[warn(non_snake_case)]
104015    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104016    mod InlineQueryResultMpeg4GifModule {
104017        #[doc = r" `Option::None` with no inner data"]
104018        pub const None: Option<InlineQueryResultMpeg4Gif> = Option::None;
104019        #[doc = r" `Option::Some`"]
104020        pub fn Some(value: InlineQueryResultMpeg4Gif) -> Option<InlineQueryResultMpeg4Gif> {
104021            Option::Some(value)
104022        }
104023        #[doc = r" Return the current variant of `MyEnum`."]
104024        #[rhai_fn(global, get = "enum_type", pure)]
104025        pub fn get_type(my_enum: &mut Option<InlineQueryResultMpeg4Gif>) -> String {
104026            match my_enum {
104027                Option::None => "None".to_string(),
104028                Option::Some(_) => "Some".to_string(),
104029            }
104030        }
104031        #[doc = r" Return the inner value."]
104032        #[rhai_fn(global, get = "value", pure)]
104033        pub fn get_value(my_enum: &mut Option<InlineQueryResultMpeg4Gif>) -> Dynamic {
104034            match my_enum {
104035                Option::None => Dynamic::UNIT,
104036                Option::Some(x) => Dynamic::from(x.clone()),
104037            }
104038        }
104039        #[rhai_fn(global, name = "to_string", pure)]
104040        pub fn to_string(my_enum: &mut Option<InlineQueryResultMpeg4Gif>) -> String {
104041            format!("{my_enum:?}")
104042        }
104043        #[rhai_fn(global, name = "to_debug", pure)]
104044        pub fn to_debug(my_enum: &mut Option<InlineQueryResultMpeg4Gif>) -> String {
104045            format!("{:?}", my_enum)
104046        }
104047    }
104048    #[export_module]
104049    #[warn(non_snake_case)]
104050    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104051    mod ChecklistTaskModule {
104052        #[doc = r" `Option::None` with no inner data"]
104053        pub const None: Option<ChecklistTask> = Option::None;
104054        #[doc = r" `Option::Some`"]
104055        pub fn Some(value: ChecklistTask) -> Option<ChecklistTask> {
104056            Option::Some(value)
104057        }
104058        #[doc = r" Return the current variant of `MyEnum`."]
104059        #[rhai_fn(global, get = "enum_type", pure)]
104060        pub fn get_type(my_enum: &mut Option<ChecklistTask>) -> String {
104061            match my_enum {
104062                Option::None => "None".to_string(),
104063                Option::Some(_) => "Some".to_string(),
104064            }
104065        }
104066        #[doc = r" Return the inner value."]
104067        #[rhai_fn(global, get = "value", pure)]
104068        pub fn get_value(my_enum: &mut Option<ChecklistTask>) -> Dynamic {
104069            match my_enum {
104070                Option::None => Dynamic::UNIT,
104071                Option::Some(x) => Dynamic::from(x.clone()),
104072            }
104073        }
104074        #[rhai_fn(global, name = "to_string", pure)]
104075        pub fn to_string(my_enum: &mut Option<ChecklistTask>) -> String {
104076            format!("{my_enum:?}")
104077        }
104078        #[rhai_fn(global, name = "to_debug", pure)]
104079        pub fn to_debug(my_enum: &mut Option<ChecklistTask>) -> String {
104080            format!("{:?}", my_enum)
104081        }
104082    }
104083    #[export_module]
104084    #[warn(non_snake_case)]
104085    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104086    mod ChecklistModule {
104087        #[doc = r" `Option::None` with no inner data"]
104088        pub const None: Option<Checklist> = Option::None;
104089        #[doc = r" `Option::Some`"]
104090        pub fn Some(value: Checklist) -> Option<Checklist> {
104091            Option::Some(value)
104092        }
104093        #[doc = r" Return the current variant of `MyEnum`."]
104094        #[rhai_fn(global, get = "enum_type", pure)]
104095        pub fn get_type(my_enum: &mut Option<Checklist>) -> String {
104096            match my_enum {
104097                Option::None => "None".to_string(),
104098                Option::Some(_) => "Some".to_string(),
104099            }
104100        }
104101        #[doc = r" Return the inner value."]
104102        #[rhai_fn(global, get = "value", pure)]
104103        pub fn get_value(my_enum: &mut Option<Checklist>) -> Dynamic {
104104            match my_enum {
104105                Option::None => Dynamic::UNIT,
104106                Option::Some(x) => Dynamic::from(x.clone()),
104107            }
104108        }
104109        #[rhai_fn(global, name = "to_string", pure)]
104110        pub fn to_string(my_enum: &mut Option<Checklist>) -> String {
104111            format!("{my_enum:?}")
104112        }
104113        #[rhai_fn(global, name = "to_debug", pure)]
104114        pub fn to_debug(my_enum: &mut Option<Checklist>) -> String {
104115            format!("{:?}", my_enum)
104116        }
104117    }
104118    #[export_module]
104119    #[warn(non_snake_case)]
104120    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104121    mod BackgroundFillFreeformGradientModule {
104122        #[doc = r" `Option::None` with no inner data"]
104123        pub const None: Option<BackgroundFillFreeformGradient> = Option::None;
104124        #[doc = r" `Option::Some`"]
104125        pub fn Some(
104126            value: BackgroundFillFreeformGradient,
104127        ) -> Option<BackgroundFillFreeformGradient> {
104128            Option::Some(value)
104129        }
104130        #[doc = r" Return the current variant of `MyEnum`."]
104131        #[rhai_fn(global, get = "enum_type", pure)]
104132        pub fn get_type(my_enum: &mut Option<BackgroundFillFreeformGradient>) -> String {
104133            match my_enum {
104134                Option::None => "None".to_string(),
104135                Option::Some(_) => "Some".to_string(),
104136            }
104137        }
104138        #[doc = r" Return the inner value."]
104139        #[rhai_fn(global, get = "value", pure)]
104140        pub fn get_value(my_enum: &mut Option<BackgroundFillFreeformGradient>) -> Dynamic {
104141            match my_enum {
104142                Option::None => Dynamic::UNIT,
104143                Option::Some(x) => Dynamic::from(x.clone()),
104144            }
104145        }
104146        #[rhai_fn(global, name = "to_string", pure)]
104147        pub fn to_string(my_enum: &mut Option<BackgroundFillFreeformGradient>) -> String {
104148            format!("{my_enum:?}")
104149        }
104150        #[rhai_fn(global, name = "to_debug", pure)]
104151        pub fn to_debug(my_enum: &mut Option<BackgroundFillFreeformGradient>) -> String {
104152            format!("{:?}", my_enum)
104153        }
104154    }
104155    #[export_module]
104156    #[warn(non_snake_case)]
104157    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104158    mod OwnedGiftUniqueModule {
104159        #[doc = r" `Option::None` with no inner data"]
104160        pub const None: Option<OwnedGiftUnique> = Option::None;
104161        #[doc = r" `Option::Some`"]
104162        pub fn Some(value: OwnedGiftUnique) -> Option<OwnedGiftUnique> {
104163            Option::Some(value)
104164        }
104165        #[doc = r" Return the current variant of `MyEnum`."]
104166        #[rhai_fn(global, get = "enum_type", pure)]
104167        pub fn get_type(my_enum: &mut Option<OwnedGiftUnique>) -> String {
104168            match my_enum {
104169                Option::None => "None".to_string(),
104170                Option::Some(_) => "Some".to_string(),
104171            }
104172        }
104173        #[doc = r" Return the inner value."]
104174        #[rhai_fn(global, get = "value", pure)]
104175        pub fn get_value(my_enum: &mut Option<OwnedGiftUnique>) -> Dynamic {
104176            match my_enum {
104177                Option::None => Dynamic::UNIT,
104178                Option::Some(x) => Dynamic::from(x.clone()),
104179            }
104180        }
104181        #[rhai_fn(global, name = "to_string", pure)]
104182        pub fn to_string(my_enum: &mut Option<OwnedGiftUnique>) -> String {
104183            format!("{my_enum:?}")
104184        }
104185        #[rhai_fn(global, name = "to_debug", pure)]
104186        pub fn to_debug(my_enum: &mut Option<OwnedGiftUnique>) -> String {
104187            format!("{:?}", my_enum)
104188        }
104189    }
104190    #[export_module]
104191    #[warn(non_snake_case)]
104192    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104193    mod PaidMediaPreviewModule {
104194        #[doc = r" `Option::None` with no inner data"]
104195        pub const None: Option<PaidMediaPreview> = Option::None;
104196        #[doc = r" `Option::Some`"]
104197        pub fn Some(value: PaidMediaPreview) -> Option<PaidMediaPreview> {
104198            Option::Some(value)
104199        }
104200        #[doc = r" Return the current variant of `MyEnum`."]
104201        #[rhai_fn(global, get = "enum_type", pure)]
104202        pub fn get_type(my_enum: &mut Option<PaidMediaPreview>) -> String {
104203            match my_enum {
104204                Option::None => "None".to_string(),
104205                Option::Some(_) => "Some".to_string(),
104206            }
104207        }
104208        #[doc = r" Return the inner value."]
104209        #[rhai_fn(global, get = "value", pure)]
104210        pub fn get_value(my_enum: &mut Option<PaidMediaPreview>) -> Dynamic {
104211            match my_enum {
104212                Option::None => Dynamic::UNIT,
104213                Option::Some(x) => Dynamic::from(x.clone()),
104214            }
104215        }
104216        #[rhai_fn(global, name = "to_string", pure)]
104217        pub fn to_string(my_enum: &mut Option<PaidMediaPreview>) -> String {
104218            format!("{my_enum:?}")
104219        }
104220        #[rhai_fn(global, name = "to_debug", pure)]
104221        pub fn to_debug(my_enum: &mut Option<PaidMediaPreview>) -> String {
104222            format!("{:?}", my_enum)
104223        }
104224    }
104225    #[export_module]
104226    #[warn(non_snake_case)]
104227    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104228    mod InputTextMessageContentModule {
104229        #[doc = r" `Option::None` with no inner data"]
104230        pub const None: Option<InputTextMessageContent> = Option::None;
104231        #[doc = r" `Option::Some`"]
104232        pub fn Some(value: InputTextMessageContent) -> Option<InputTextMessageContent> {
104233            Option::Some(value)
104234        }
104235        #[doc = r" Return the current variant of `MyEnum`."]
104236        #[rhai_fn(global, get = "enum_type", pure)]
104237        pub fn get_type(my_enum: &mut Option<InputTextMessageContent>) -> String {
104238            match my_enum {
104239                Option::None => "None".to_string(),
104240                Option::Some(_) => "Some".to_string(),
104241            }
104242        }
104243        #[doc = r" Return the inner value."]
104244        #[rhai_fn(global, get = "value", pure)]
104245        pub fn get_value(my_enum: &mut Option<InputTextMessageContent>) -> Dynamic {
104246            match my_enum {
104247                Option::None => Dynamic::UNIT,
104248                Option::Some(x) => Dynamic::from(x.clone()),
104249            }
104250        }
104251        #[rhai_fn(global, name = "to_string", pure)]
104252        pub fn to_string(my_enum: &mut Option<InputTextMessageContent>) -> String {
104253            format!("{my_enum:?}")
104254        }
104255        #[rhai_fn(global, name = "to_debug", pure)]
104256        pub fn to_debug(my_enum: &mut Option<InputTextMessageContent>) -> String {
104257            format!("{:?}", my_enum)
104258        }
104259    }
104260    #[export_module]
104261    #[warn(non_snake_case)]
104262    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104263    mod BotCommandScopeAllPrivateChatsModule {
104264        #[doc = r" `Option::None` with no inner data"]
104265        pub const None: Option<BotCommandScopeAllPrivateChats> = Option::None;
104266        #[doc = r" `Option::Some`"]
104267        pub fn Some(
104268            value: BotCommandScopeAllPrivateChats,
104269        ) -> Option<BotCommandScopeAllPrivateChats> {
104270            Option::Some(value)
104271        }
104272        #[doc = r" Return the current variant of `MyEnum`."]
104273        #[rhai_fn(global, get = "enum_type", pure)]
104274        pub fn get_type(my_enum: &mut Option<BotCommandScopeAllPrivateChats>) -> String {
104275            match my_enum {
104276                Option::None => "None".to_string(),
104277                Option::Some(_) => "Some".to_string(),
104278            }
104279        }
104280        #[doc = r" Return the inner value."]
104281        #[rhai_fn(global, get = "value", pure)]
104282        pub fn get_value(my_enum: &mut Option<BotCommandScopeAllPrivateChats>) -> Dynamic {
104283            match my_enum {
104284                Option::None => Dynamic::UNIT,
104285                Option::Some(x) => Dynamic::from(x.clone()),
104286            }
104287        }
104288        #[rhai_fn(global, name = "to_string", pure)]
104289        pub fn to_string(my_enum: &mut Option<BotCommandScopeAllPrivateChats>) -> String {
104290            format!("{my_enum:?}")
104291        }
104292        #[rhai_fn(global, name = "to_debug", pure)]
104293        pub fn to_debug(my_enum: &mut Option<BotCommandScopeAllPrivateChats>) -> String {
104294            format!("{:?}", my_enum)
104295        }
104296    }
104297    #[export_module]
104298    #[warn(non_snake_case)]
104299    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104300    mod InlineQueryResultModule {
104301        #[doc = r" `Option::None` with no inner data"]
104302        pub const None: Option<InlineQueryResult> = Option::None;
104303        #[doc = r" `Option::Some`"]
104304        pub fn Some(value: InlineQueryResult) -> Option<InlineQueryResult> {
104305            Option::Some(value)
104306        }
104307        #[doc = r" Return the current variant of `MyEnum`."]
104308        #[rhai_fn(global, get = "enum_type", pure)]
104309        pub fn get_type(my_enum: &mut Option<InlineQueryResult>) -> String {
104310            match my_enum {
104311                Option::None => "None".to_string(),
104312                Option::Some(_) => "Some".to_string(),
104313            }
104314        }
104315        #[doc = r" Return the inner value."]
104316        #[rhai_fn(global, get = "value", pure)]
104317        pub fn get_value(my_enum: &mut Option<InlineQueryResult>) -> Dynamic {
104318            match my_enum {
104319                Option::None => Dynamic::UNIT,
104320                Option::Some(x) => Dynamic::from(x.clone()),
104321            }
104322        }
104323        #[rhai_fn(global, name = "to_string", pure)]
104324        pub fn to_string(my_enum: &mut Option<InlineQueryResult>) -> String {
104325            format!("{my_enum:?}")
104326        }
104327        #[rhai_fn(global, name = "to_debug", pure)]
104328        pub fn to_debug(my_enum: &mut Option<InlineQueryResult>) -> String {
104329            format!("{:?}", my_enum)
104330        }
104331    }
104332    #[export_module]
104333    #[warn(non_snake_case)]
104334    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104335    mod VoiceModule {
104336        #[doc = r" `Option::None` with no inner data"]
104337        pub const None: Option<Voice> = Option::None;
104338        #[doc = r" `Option::Some`"]
104339        pub fn Some(value: Voice) -> Option<Voice> {
104340            Option::Some(value)
104341        }
104342        #[doc = r" Return the current variant of `MyEnum`."]
104343        #[rhai_fn(global, get = "enum_type", pure)]
104344        pub fn get_type(my_enum: &mut Option<Voice>) -> String {
104345            match my_enum {
104346                Option::None => "None".to_string(),
104347                Option::Some(_) => "Some".to_string(),
104348            }
104349        }
104350        #[doc = r" Return the inner value."]
104351        #[rhai_fn(global, get = "value", pure)]
104352        pub fn get_value(my_enum: &mut Option<Voice>) -> Dynamic {
104353            match my_enum {
104354                Option::None => Dynamic::UNIT,
104355                Option::Some(x) => Dynamic::from(x.clone()),
104356            }
104357        }
104358        #[rhai_fn(global, name = "to_string", pure)]
104359        pub fn to_string(my_enum: &mut Option<Voice>) -> String {
104360            format!("{my_enum:?}")
104361        }
104362        #[rhai_fn(global, name = "to_debug", pure)]
104363        pub fn to_debug(my_enum: &mut Option<Voice>) -> String {
104364            format!("{:?}", my_enum)
104365        }
104366    }
104367    #[export_module]
104368    #[warn(non_snake_case)]
104369    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104370    mod KeyboardButtonRequestUsersModule {
104371        #[doc = r" `Option::None` with no inner data"]
104372        pub const None: Option<KeyboardButtonRequestUsers> = Option::None;
104373        #[doc = r" `Option::Some`"]
104374        pub fn Some(value: KeyboardButtonRequestUsers) -> Option<KeyboardButtonRequestUsers> {
104375            Option::Some(value)
104376        }
104377        #[doc = r" Return the current variant of `MyEnum`."]
104378        #[rhai_fn(global, get = "enum_type", pure)]
104379        pub fn get_type(my_enum: &mut Option<KeyboardButtonRequestUsers>) -> String {
104380            match my_enum {
104381                Option::None => "None".to_string(),
104382                Option::Some(_) => "Some".to_string(),
104383            }
104384        }
104385        #[doc = r" Return the inner value."]
104386        #[rhai_fn(global, get = "value", pure)]
104387        pub fn get_value(my_enum: &mut Option<KeyboardButtonRequestUsers>) -> Dynamic {
104388            match my_enum {
104389                Option::None => Dynamic::UNIT,
104390                Option::Some(x) => Dynamic::from(x.clone()),
104391            }
104392        }
104393        #[rhai_fn(global, name = "to_string", pure)]
104394        pub fn to_string(my_enum: &mut Option<KeyboardButtonRequestUsers>) -> String {
104395            format!("{my_enum:?}")
104396        }
104397        #[rhai_fn(global, name = "to_debug", pure)]
104398        pub fn to_debug(my_enum: &mut Option<KeyboardButtonRequestUsers>) -> String {
104399            format!("{:?}", my_enum)
104400        }
104401    }
104402    #[export_module]
104403    #[warn(non_snake_case)]
104404    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104405    mod InlineQueryResultLocationModule {
104406        #[doc = r" `Option::None` with no inner data"]
104407        pub const None: Option<InlineQueryResultLocation> = Option::None;
104408        #[doc = r" `Option::Some`"]
104409        pub fn Some(value: InlineQueryResultLocation) -> Option<InlineQueryResultLocation> {
104410            Option::Some(value)
104411        }
104412        #[doc = r" Return the current variant of `MyEnum`."]
104413        #[rhai_fn(global, get = "enum_type", pure)]
104414        pub fn get_type(my_enum: &mut Option<InlineQueryResultLocation>) -> String {
104415            match my_enum {
104416                Option::None => "None".to_string(),
104417                Option::Some(_) => "Some".to_string(),
104418            }
104419        }
104420        #[doc = r" Return the inner value."]
104421        #[rhai_fn(global, get = "value", pure)]
104422        pub fn get_value(my_enum: &mut Option<InlineQueryResultLocation>) -> Dynamic {
104423            match my_enum {
104424                Option::None => Dynamic::UNIT,
104425                Option::Some(x) => Dynamic::from(x.clone()),
104426            }
104427        }
104428        #[rhai_fn(global, name = "to_string", pure)]
104429        pub fn to_string(my_enum: &mut Option<InlineQueryResultLocation>) -> String {
104430            format!("{my_enum:?}")
104431        }
104432        #[rhai_fn(global, name = "to_debug", pure)]
104433        pub fn to_debug(my_enum: &mut Option<InlineQueryResultLocation>) -> String {
104434            format!("{:?}", my_enum)
104435        }
104436    }
104437    #[export_module]
104438    #[warn(non_snake_case)]
104439    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104440    mod KeyboardButtonPollTypeModule {
104441        #[doc = r" `Option::None` with no inner data"]
104442        pub const None: Option<KeyboardButtonPollType> = Option::None;
104443        #[doc = r" `Option::Some`"]
104444        pub fn Some(value: KeyboardButtonPollType) -> Option<KeyboardButtonPollType> {
104445            Option::Some(value)
104446        }
104447        #[doc = r" Return the current variant of `MyEnum`."]
104448        #[rhai_fn(global, get = "enum_type", pure)]
104449        pub fn get_type(my_enum: &mut Option<KeyboardButtonPollType>) -> String {
104450            match my_enum {
104451                Option::None => "None".to_string(),
104452                Option::Some(_) => "Some".to_string(),
104453            }
104454        }
104455        #[doc = r" Return the inner value."]
104456        #[rhai_fn(global, get = "value", pure)]
104457        pub fn get_value(my_enum: &mut Option<KeyboardButtonPollType>) -> Dynamic {
104458            match my_enum {
104459                Option::None => Dynamic::UNIT,
104460                Option::Some(x) => Dynamic::from(x.clone()),
104461            }
104462        }
104463        #[rhai_fn(global, name = "to_string", pure)]
104464        pub fn to_string(my_enum: &mut Option<KeyboardButtonPollType>) -> String {
104465            format!("{my_enum:?}")
104466        }
104467        #[rhai_fn(global, name = "to_debug", pure)]
104468        pub fn to_debug(my_enum: &mut Option<KeyboardButtonPollType>) -> String {
104469            format!("{:?}", my_enum)
104470        }
104471    }
104472    #[export_module]
104473    #[warn(non_snake_case)]
104474    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104475    mod WebAppDataModule {
104476        #[doc = r" `Option::None` with no inner data"]
104477        pub const None: Option<WebAppData> = Option::None;
104478        #[doc = r" `Option::Some`"]
104479        pub fn Some(value: WebAppData) -> Option<WebAppData> {
104480            Option::Some(value)
104481        }
104482        #[doc = r" Return the current variant of `MyEnum`."]
104483        #[rhai_fn(global, get = "enum_type", pure)]
104484        pub fn get_type(my_enum: &mut Option<WebAppData>) -> String {
104485            match my_enum {
104486                Option::None => "None".to_string(),
104487                Option::Some(_) => "Some".to_string(),
104488            }
104489        }
104490        #[doc = r" Return the inner value."]
104491        #[rhai_fn(global, get = "value", pure)]
104492        pub fn get_value(my_enum: &mut Option<WebAppData>) -> Dynamic {
104493            match my_enum {
104494                Option::None => Dynamic::UNIT,
104495                Option::Some(x) => Dynamic::from(x.clone()),
104496            }
104497        }
104498        #[rhai_fn(global, name = "to_string", pure)]
104499        pub fn to_string(my_enum: &mut Option<WebAppData>) -> String {
104500            format!("{my_enum:?}")
104501        }
104502        #[rhai_fn(global, name = "to_debug", pure)]
104503        pub fn to_debug(my_enum: &mut Option<WebAppData>) -> String {
104504            format!("{:?}", my_enum)
104505        }
104506    }
104507    #[export_module]
104508    #[warn(non_snake_case)]
104509    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104510    mod ForumTopicReopenedModule {
104511        #[doc = r" `Option::None` with no inner data"]
104512        pub const None: Option<ForumTopicReopened> = Option::None;
104513        #[doc = r" `Option::Some`"]
104514        pub fn Some(value: ForumTopicReopened) -> Option<ForumTopicReopened> {
104515            Option::Some(value)
104516        }
104517        #[doc = r" Return the current variant of `MyEnum`."]
104518        #[rhai_fn(global, get = "enum_type", pure)]
104519        pub fn get_type(my_enum: &mut Option<ForumTopicReopened>) -> String {
104520            match my_enum {
104521                Option::None => "None".to_string(),
104522                Option::Some(_) => "Some".to_string(),
104523            }
104524        }
104525        #[doc = r" Return the inner value."]
104526        #[rhai_fn(global, get = "value", pure)]
104527        pub fn get_value(my_enum: &mut Option<ForumTopicReopened>) -> Dynamic {
104528            match my_enum {
104529                Option::None => Dynamic::UNIT,
104530                Option::Some(x) => Dynamic::from(x.clone()),
104531            }
104532        }
104533        #[rhai_fn(global, name = "to_string", pure)]
104534        pub fn to_string(my_enum: &mut Option<ForumTopicReopened>) -> String {
104535            format!("{my_enum:?}")
104536        }
104537        #[rhai_fn(global, name = "to_debug", pure)]
104538        pub fn to_debug(my_enum: &mut Option<ForumTopicReopened>) -> String {
104539            format!("{:?}", my_enum)
104540        }
104541    }
104542    #[export_module]
104543    #[warn(non_snake_case)]
104544    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104545    mod InlineQueryResultCachedDocumentModule {
104546        #[doc = r" `Option::None` with no inner data"]
104547        pub const None: Option<InlineQueryResultCachedDocument> = Option::None;
104548        #[doc = r" `Option::Some`"]
104549        pub fn Some(
104550            value: InlineQueryResultCachedDocument,
104551        ) -> Option<InlineQueryResultCachedDocument> {
104552            Option::Some(value)
104553        }
104554        #[doc = r" Return the current variant of `MyEnum`."]
104555        #[rhai_fn(global, get = "enum_type", pure)]
104556        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedDocument>) -> String {
104557            match my_enum {
104558                Option::None => "None".to_string(),
104559                Option::Some(_) => "Some".to_string(),
104560            }
104561        }
104562        #[doc = r" Return the inner value."]
104563        #[rhai_fn(global, get = "value", pure)]
104564        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedDocument>) -> Dynamic {
104565            match my_enum {
104566                Option::None => Dynamic::UNIT,
104567                Option::Some(x) => Dynamic::from(x.clone()),
104568            }
104569        }
104570        #[rhai_fn(global, name = "to_string", pure)]
104571        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedDocument>) -> String {
104572            format!("{my_enum:?}")
104573        }
104574        #[rhai_fn(global, name = "to_debug", pure)]
104575        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedDocument>) -> String {
104576            format!("{:?}", my_enum)
104577        }
104578    }
104579    #[export_module]
104580    #[warn(non_snake_case)]
104581    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104582    mod InlineQueryResultVoiceModule {
104583        #[doc = r" `Option::None` with no inner data"]
104584        pub const None: Option<InlineQueryResultVoice> = Option::None;
104585        #[doc = r" `Option::Some`"]
104586        pub fn Some(value: InlineQueryResultVoice) -> Option<InlineQueryResultVoice> {
104587            Option::Some(value)
104588        }
104589        #[doc = r" Return the current variant of `MyEnum`."]
104590        #[rhai_fn(global, get = "enum_type", pure)]
104591        pub fn get_type(my_enum: &mut Option<InlineQueryResultVoice>) -> String {
104592            match my_enum {
104593                Option::None => "None".to_string(),
104594                Option::Some(_) => "Some".to_string(),
104595            }
104596        }
104597        #[doc = r" Return the inner value."]
104598        #[rhai_fn(global, get = "value", pure)]
104599        pub fn get_value(my_enum: &mut Option<InlineQueryResultVoice>) -> Dynamic {
104600            match my_enum {
104601                Option::None => Dynamic::UNIT,
104602                Option::Some(x) => Dynamic::from(x.clone()),
104603            }
104604        }
104605        #[rhai_fn(global, name = "to_string", pure)]
104606        pub fn to_string(my_enum: &mut Option<InlineQueryResultVoice>) -> String {
104607            format!("{my_enum:?}")
104608        }
104609        #[rhai_fn(global, name = "to_debug", pure)]
104610        pub fn to_debug(my_enum: &mut Option<InlineQueryResultVoice>) -> String {
104611            format!("{:?}", my_enum)
104612        }
104613    }
104614    #[export_module]
104615    #[warn(non_snake_case)]
104616    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104617    mod UniqueGiftBackdropModule {
104618        #[doc = r" `Option::None` with no inner data"]
104619        pub const None: Option<UniqueGiftBackdrop> = Option::None;
104620        #[doc = r" `Option::Some`"]
104621        pub fn Some(value: UniqueGiftBackdrop) -> Option<UniqueGiftBackdrop> {
104622            Option::Some(value)
104623        }
104624        #[doc = r" Return the current variant of `MyEnum`."]
104625        #[rhai_fn(global, get = "enum_type", pure)]
104626        pub fn get_type(my_enum: &mut Option<UniqueGiftBackdrop>) -> String {
104627            match my_enum {
104628                Option::None => "None".to_string(),
104629                Option::Some(_) => "Some".to_string(),
104630            }
104631        }
104632        #[doc = r" Return the inner value."]
104633        #[rhai_fn(global, get = "value", pure)]
104634        pub fn get_value(my_enum: &mut Option<UniqueGiftBackdrop>) -> Dynamic {
104635            match my_enum {
104636                Option::None => Dynamic::UNIT,
104637                Option::Some(x) => Dynamic::from(x.clone()),
104638            }
104639        }
104640        #[rhai_fn(global, name = "to_string", pure)]
104641        pub fn to_string(my_enum: &mut Option<UniqueGiftBackdrop>) -> String {
104642            format!("{my_enum:?}")
104643        }
104644        #[rhai_fn(global, name = "to_debug", pure)]
104645        pub fn to_debug(my_enum: &mut Option<UniqueGiftBackdrop>) -> String {
104646            format!("{:?}", my_enum)
104647        }
104648    }
104649    #[export_module]
104650    #[warn(non_snake_case)]
104651    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104652    mod StoryAreaTypeWeatherModule {
104653        #[doc = r" `Option::None` with no inner data"]
104654        pub const None: Option<StoryAreaTypeWeather> = Option::None;
104655        #[doc = r" `Option::Some`"]
104656        pub fn Some(value: StoryAreaTypeWeather) -> Option<StoryAreaTypeWeather> {
104657            Option::Some(value)
104658        }
104659        #[doc = r" Return the current variant of `MyEnum`."]
104660        #[rhai_fn(global, get = "enum_type", pure)]
104661        pub fn get_type(my_enum: &mut Option<StoryAreaTypeWeather>) -> String {
104662            match my_enum {
104663                Option::None => "None".to_string(),
104664                Option::Some(_) => "Some".to_string(),
104665            }
104666        }
104667        #[doc = r" Return the inner value."]
104668        #[rhai_fn(global, get = "value", pure)]
104669        pub fn get_value(my_enum: &mut Option<StoryAreaTypeWeather>) -> Dynamic {
104670            match my_enum {
104671                Option::None => Dynamic::UNIT,
104672                Option::Some(x) => Dynamic::from(x.clone()),
104673            }
104674        }
104675        #[rhai_fn(global, name = "to_string", pure)]
104676        pub fn to_string(my_enum: &mut Option<StoryAreaTypeWeather>) -> String {
104677            format!("{my_enum:?}")
104678        }
104679        #[rhai_fn(global, name = "to_debug", pure)]
104680        pub fn to_debug(my_enum: &mut Option<StoryAreaTypeWeather>) -> String {
104681            format!("{:?}", my_enum)
104682        }
104683    }
104684    #[export_module]
104685    #[warn(non_snake_case)]
104686    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104687    mod UniqueGiftModelModule {
104688        #[doc = r" `Option::None` with no inner data"]
104689        pub const None: Option<UniqueGiftModel> = Option::None;
104690        #[doc = r" `Option::Some`"]
104691        pub fn Some(value: UniqueGiftModel) -> Option<UniqueGiftModel> {
104692            Option::Some(value)
104693        }
104694        #[doc = r" Return the current variant of `MyEnum`."]
104695        #[rhai_fn(global, get = "enum_type", pure)]
104696        pub fn get_type(my_enum: &mut Option<UniqueGiftModel>) -> String {
104697            match my_enum {
104698                Option::None => "None".to_string(),
104699                Option::Some(_) => "Some".to_string(),
104700            }
104701        }
104702        #[doc = r" Return the inner value."]
104703        #[rhai_fn(global, get = "value", pure)]
104704        pub fn get_value(my_enum: &mut Option<UniqueGiftModel>) -> Dynamic {
104705            match my_enum {
104706                Option::None => Dynamic::UNIT,
104707                Option::Some(x) => Dynamic::from(x.clone()),
104708            }
104709        }
104710        #[rhai_fn(global, name = "to_string", pure)]
104711        pub fn to_string(my_enum: &mut Option<UniqueGiftModel>) -> String {
104712            format!("{my_enum:?}")
104713        }
104714        #[rhai_fn(global, name = "to_debug", pure)]
104715        pub fn to_debug(my_enum: &mut Option<UniqueGiftModel>) -> String {
104716            format!("{:?}", my_enum)
104717        }
104718    }
104719    #[export_module]
104720    #[warn(non_snake_case)]
104721    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104722    mod ForceReplyModule {
104723        #[doc = r" `Option::None` with no inner data"]
104724        pub const None: Option<ForceReply> = Option::None;
104725        #[doc = r" `Option::Some`"]
104726        pub fn Some(value: ForceReply) -> Option<ForceReply> {
104727            Option::Some(value)
104728        }
104729        #[doc = r" Return the current variant of `MyEnum`."]
104730        #[rhai_fn(global, get = "enum_type", pure)]
104731        pub fn get_type(my_enum: &mut Option<ForceReply>) -> String {
104732            match my_enum {
104733                Option::None => "None".to_string(),
104734                Option::Some(_) => "Some".to_string(),
104735            }
104736        }
104737        #[doc = r" Return the inner value."]
104738        #[rhai_fn(global, get = "value", pure)]
104739        pub fn get_value(my_enum: &mut Option<ForceReply>) -> Dynamic {
104740            match my_enum {
104741                Option::None => Dynamic::UNIT,
104742                Option::Some(x) => Dynamic::from(x.clone()),
104743            }
104744        }
104745        #[rhai_fn(global, name = "to_string", pure)]
104746        pub fn to_string(my_enum: &mut Option<ForceReply>) -> String {
104747            format!("{my_enum:?}")
104748        }
104749        #[rhai_fn(global, name = "to_debug", pure)]
104750        pub fn to_debug(my_enum: &mut Option<ForceReply>) -> String {
104751            format!("{:?}", my_enum)
104752        }
104753    }
104754    #[export_module]
104755    #[warn(non_snake_case)]
104756    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104757    mod StarTransactionModule {
104758        #[doc = r" `Option::None` with no inner data"]
104759        pub const None: Option<StarTransaction> = Option::None;
104760        #[doc = r" `Option::Some`"]
104761        pub fn Some(value: StarTransaction) -> Option<StarTransaction> {
104762            Option::Some(value)
104763        }
104764        #[doc = r" Return the current variant of `MyEnum`."]
104765        #[rhai_fn(global, get = "enum_type", pure)]
104766        pub fn get_type(my_enum: &mut Option<StarTransaction>) -> String {
104767            match my_enum {
104768                Option::None => "None".to_string(),
104769                Option::Some(_) => "Some".to_string(),
104770            }
104771        }
104772        #[doc = r" Return the inner value."]
104773        #[rhai_fn(global, get = "value", pure)]
104774        pub fn get_value(my_enum: &mut Option<StarTransaction>) -> Dynamic {
104775            match my_enum {
104776                Option::None => Dynamic::UNIT,
104777                Option::Some(x) => Dynamic::from(x.clone()),
104778            }
104779        }
104780        #[rhai_fn(global, name = "to_string", pure)]
104781        pub fn to_string(my_enum: &mut Option<StarTransaction>) -> String {
104782            format!("{my_enum:?}")
104783        }
104784        #[rhai_fn(global, name = "to_debug", pure)]
104785        pub fn to_debug(my_enum: &mut Option<StarTransaction>) -> String {
104786            format!("{:?}", my_enum)
104787        }
104788    }
104789    #[export_module]
104790    #[warn(non_snake_case)]
104791    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104792    mod PassportElementErrorDataFieldModule {
104793        #[doc = r" `Option::None` with no inner data"]
104794        pub const None: Option<PassportElementErrorDataField> = Option::None;
104795        #[doc = r" `Option::Some`"]
104796        pub fn Some(value: PassportElementErrorDataField) -> Option<PassportElementErrorDataField> {
104797            Option::Some(value)
104798        }
104799        #[doc = r" Return the current variant of `MyEnum`."]
104800        #[rhai_fn(global, get = "enum_type", pure)]
104801        pub fn get_type(my_enum: &mut Option<PassportElementErrorDataField>) -> String {
104802            match my_enum {
104803                Option::None => "None".to_string(),
104804                Option::Some(_) => "Some".to_string(),
104805            }
104806        }
104807        #[doc = r" Return the inner value."]
104808        #[rhai_fn(global, get = "value", pure)]
104809        pub fn get_value(my_enum: &mut Option<PassportElementErrorDataField>) -> Dynamic {
104810            match my_enum {
104811                Option::None => Dynamic::UNIT,
104812                Option::Some(x) => Dynamic::from(x.clone()),
104813            }
104814        }
104815        #[rhai_fn(global, name = "to_string", pure)]
104816        pub fn to_string(my_enum: &mut Option<PassportElementErrorDataField>) -> String {
104817            format!("{my_enum:?}")
104818        }
104819        #[rhai_fn(global, name = "to_debug", pure)]
104820        pub fn to_debug(my_enum: &mut Option<PassportElementErrorDataField>) -> String {
104821            format!("{:?}", my_enum)
104822        }
104823    }
104824    #[export_module]
104825    #[warn(non_snake_case)]
104826    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104827    mod ChatBoostModule {
104828        #[doc = r" `Option::None` with no inner data"]
104829        pub const None: Option<ChatBoost> = Option::None;
104830        #[doc = r" `Option::Some`"]
104831        pub fn Some(value: ChatBoost) -> Option<ChatBoost> {
104832            Option::Some(value)
104833        }
104834        #[doc = r" Return the current variant of `MyEnum`."]
104835        #[rhai_fn(global, get = "enum_type", pure)]
104836        pub fn get_type(my_enum: &mut Option<ChatBoost>) -> String {
104837            match my_enum {
104838                Option::None => "None".to_string(),
104839                Option::Some(_) => "Some".to_string(),
104840            }
104841        }
104842        #[doc = r" Return the inner value."]
104843        #[rhai_fn(global, get = "value", pure)]
104844        pub fn get_value(my_enum: &mut Option<ChatBoost>) -> Dynamic {
104845            match my_enum {
104846                Option::None => Dynamic::UNIT,
104847                Option::Some(x) => Dynamic::from(x.clone()),
104848            }
104849        }
104850        #[rhai_fn(global, name = "to_string", pure)]
104851        pub fn to_string(my_enum: &mut Option<ChatBoost>) -> String {
104852            format!("{my_enum:?}")
104853        }
104854        #[rhai_fn(global, name = "to_debug", pure)]
104855        pub fn to_debug(my_enum: &mut Option<ChatBoost>) -> String {
104856            format!("{:?}", my_enum)
104857        }
104858    }
104859    #[export_module]
104860    #[warn(non_snake_case)]
104861    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104862    mod ShippingOptionModule {
104863        #[doc = r" `Option::None` with no inner data"]
104864        pub const None: Option<ShippingOption> = Option::None;
104865        #[doc = r" `Option::Some`"]
104866        pub fn Some(value: ShippingOption) -> Option<ShippingOption> {
104867            Option::Some(value)
104868        }
104869        #[doc = r" Return the current variant of `MyEnum`."]
104870        #[rhai_fn(global, get = "enum_type", pure)]
104871        pub fn get_type(my_enum: &mut Option<ShippingOption>) -> String {
104872            match my_enum {
104873                Option::None => "None".to_string(),
104874                Option::Some(_) => "Some".to_string(),
104875            }
104876        }
104877        #[doc = r" Return the inner value."]
104878        #[rhai_fn(global, get = "value", pure)]
104879        pub fn get_value(my_enum: &mut Option<ShippingOption>) -> Dynamic {
104880            match my_enum {
104881                Option::None => Dynamic::UNIT,
104882                Option::Some(x) => Dynamic::from(x.clone()),
104883            }
104884        }
104885        #[rhai_fn(global, name = "to_string", pure)]
104886        pub fn to_string(my_enum: &mut Option<ShippingOption>) -> String {
104887            format!("{my_enum:?}")
104888        }
104889        #[rhai_fn(global, name = "to_debug", pure)]
104890        pub fn to_debug(my_enum: &mut Option<ShippingOption>) -> String {
104891            format!("{:?}", my_enum)
104892        }
104893    }
104894    #[export_module]
104895    #[warn(non_snake_case)]
104896    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104897    mod PassportElementErrorFrontSideModule {
104898        #[doc = r" `Option::None` with no inner data"]
104899        pub const None: Option<PassportElementErrorFrontSide> = Option::None;
104900        #[doc = r" `Option::Some`"]
104901        pub fn Some(value: PassportElementErrorFrontSide) -> Option<PassportElementErrorFrontSide> {
104902            Option::Some(value)
104903        }
104904        #[doc = r" Return the current variant of `MyEnum`."]
104905        #[rhai_fn(global, get = "enum_type", pure)]
104906        pub fn get_type(my_enum: &mut Option<PassportElementErrorFrontSide>) -> String {
104907            match my_enum {
104908                Option::None => "None".to_string(),
104909                Option::Some(_) => "Some".to_string(),
104910            }
104911        }
104912        #[doc = r" Return the inner value."]
104913        #[rhai_fn(global, get = "value", pure)]
104914        pub fn get_value(my_enum: &mut Option<PassportElementErrorFrontSide>) -> Dynamic {
104915            match my_enum {
104916                Option::None => Dynamic::UNIT,
104917                Option::Some(x) => Dynamic::from(x.clone()),
104918            }
104919        }
104920        #[rhai_fn(global, name = "to_string", pure)]
104921        pub fn to_string(my_enum: &mut Option<PassportElementErrorFrontSide>) -> String {
104922            format!("{my_enum:?}")
104923        }
104924        #[rhai_fn(global, name = "to_debug", pure)]
104925        pub fn to_debug(my_enum: &mut Option<PassportElementErrorFrontSide>) -> String {
104926            format!("{:?}", my_enum)
104927        }
104928    }
104929    #[export_module]
104930    #[warn(non_snake_case)]
104931    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104932    mod BusinessOpeningHoursModule {
104933        #[doc = r" `Option::None` with no inner data"]
104934        pub const None: Option<BusinessOpeningHours> = Option::None;
104935        #[doc = r" `Option::Some`"]
104936        pub fn Some(value: BusinessOpeningHours) -> Option<BusinessOpeningHours> {
104937            Option::Some(value)
104938        }
104939        #[doc = r" Return the current variant of `MyEnum`."]
104940        #[rhai_fn(global, get = "enum_type", pure)]
104941        pub fn get_type(my_enum: &mut Option<BusinessOpeningHours>) -> String {
104942            match my_enum {
104943                Option::None => "None".to_string(),
104944                Option::Some(_) => "Some".to_string(),
104945            }
104946        }
104947        #[doc = r" Return the inner value."]
104948        #[rhai_fn(global, get = "value", pure)]
104949        pub fn get_value(my_enum: &mut Option<BusinessOpeningHours>) -> Dynamic {
104950            match my_enum {
104951                Option::None => Dynamic::UNIT,
104952                Option::Some(x) => Dynamic::from(x.clone()),
104953            }
104954        }
104955        #[rhai_fn(global, name = "to_string", pure)]
104956        pub fn to_string(my_enum: &mut Option<BusinessOpeningHours>) -> String {
104957            format!("{my_enum:?}")
104958        }
104959        #[rhai_fn(global, name = "to_debug", pure)]
104960        pub fn to_debug(my_enum: &mut Option<BusinessOpeningHours>) -> String {
104961            format!("{:?}", my_enum)
104962        }
104963    }
104964    #[export_module]
104965    #[warn(non_snake_case)]
104966    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
104967    mod ReactionTypeModule {
104968        #[doc = r" `Option::None` with no inner data"]
104969        pub const None: Option<ReactionType> = Option::None;
104970        #[doc = r" `Option::Some`"]
104971        pub fn Some(value: ReactionType) -> Option<ReactionType> {
104972            Option::Some(value)
104973        }
104974        #[doc = r" Return the current variant of `MyEnum`."]
104975        #[rhai_fn(global, get = "enum_type", pure)]
104976        pub fn get_type(my_enum: &mut Option<ReactionType>) -> String {
104977            match my_enum {
104978                Option::None => "None".to_string(),
104979                Option::Some(_) => "Some".to_string(),
104980            }
104981        }
104982        #[doc = r" Return the inner value."]
104983        #[rhai_fn(global, get = "value", pure)]
104984        pub fn get_value(my_enum: &mut Option<ReactionType>) -> Dynamic {
104985            match my_enum {
104986                Option::None => Dynamic::UNIT,
104987                Option::Some(x) => Dynamic::from(x.clone()),
104988            }
104989        }
104990        #[rhai_fn(global, name = "to_string", pure)]
104991        pub fn to_string(my_enum: &mut Option<ReactionType>) -> String {
104992            format!("{my_enum:?}")
104993        }
104994        #[rhai_fn(global, name = "to_debug", pure)]
104995        pub fn to_debug(my_enum: &mut Option<ReactionType>) -> String {
104996            format!("{:?}", my_enum)
104997        }
104998    }
104999    #[export_module]
105000    #[warn(non_snake_case)]
105001    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105002    mod StoryModule {
105003        #[doc = r" `Option::None` with no inner data"]
105004        pub const None: Option<Story> = Option::None;
105005        #[doc = r" `Option::Some`"]
105006        pub fn Some(value: Story) -> Option<Story> {
105007            Option::Some(value)
105008        }
105009        #[doc = r" Return the current variant of `MyEnum`."]
105010        #[rhai_fn(global, get = "enum_type", pure)]
105011        pub fn get_type(my_enum: &mut Option<Story>) -> String {
105012            match my_enum {
105013                Option::None => "None".to_string(),
105014                Option::Some(_) => "Some".to_string(),
105015            }
105016        }
105017        #[doc = r" Return the inner value."]
105018        #[rhai_fn(global, get = "value", pure)]
105019        pub fn get_value(my_enum: &mut Option<Story>) -> Dynamic {
105020            match my_enum {
105021                Option::None => Dynamic::UNIT,
105022                Option::Some(x) => Dynamic::from(x.clone()),
105023            }
105024        }
105025        #[rhai_fn(global, name = "to_string", pure)]
105026        pub fn to_string(my_enum: &mut Option<Story>) -> String {
105027            format!("{my_enum:?}")
105028        }
105029        #[rhai_fn(global, name = "to_debug", pure)]
105030        pub fn to_debug(my_enum: &mut Option<Story>) -> String {
105031            format!("{:?}", my_enum)
105032        }
105033    }
105034    #[export_module]
105035    #[warn(non_snake_case)]
105036    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105037    mod WebAppInfoModule {
105038        #[doc = r" `Option::None` with no inner data"]
105039        pub const None: Option<WebAppInfo> = Option::None;
105040        #[doc = r" `Option::Some`"]
105041        pub fn Some(value: WebAppInfo) -> Option<WebAppInfo> {
105042            Option::Some(value)
105043        }
105044        #[doc = r" Return the current variant of `MyEnum`."]
105045        #[rhai_fn(global, get = "enum_type", pure)]
105046        pub fn get_type(my_enum: &mut Option<WebAppInfo>) -> String {
105047            match my_enum {
105048                Option::None => "None".to_string(),
105049                Option::Some(_) => "Some".to_string(),
105050            }
105051        }
105052        #[doc = r" Return the inner value."]
105053        #[rhai_fn(global, get = "value", pure)]
105054        pub fn get_value(my_enum: &mut Option<WebAppInfo>) -> Dynamic {
105055            match my_enum {
105056                Option::None => Dynamic::UNIT,
105057                Option::Some(x) => Dynamic::from(x.clone()),
105058            }
105059        }
105060        #[rhai_fn(global, name = "to_string", pure)]
105061        pub fn to_string(my_enum: &mut Option<WebAppInfo>) -> String {
105062            format!("{my_enum:?}")
105063        }
105064        #[rhai_fn(global, name = "to_debug", pure)]
105065        pub fn to_debug(my_enum: &mut Option<WebAppInfo>) -> String {
105066            format!("{:?}", my_enum)
105067        }
105068    }
105069    #[export_module]
105070    #[warn(non_snake_case)]
105071    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105072    mod BotCommandScopeChatMemberModule {
105073        #[doc = r" `Option::None` with no inner data"]
105074        pub const None: Option<BotCommandScopeChatMember> = Option::None;
105075        #[doc = r" `Option::Some`"]
105076        pub fn Some(value: BotCommandScopeChatMember) -> Option<BotCommandScopeChatMember> {
105077            Option::Some(value)
105078        }
105079        #[doc = r" Return the current variant of `MyEnum`."]
105080        #[rhai_fn(global, get = "enum_type", pure)]
105081        pub fn get_type(my_enum: &mut Option<BotCommandScopeChatMember>) -> String {
105082            match my_enum {
105083                Option::None => "None".to_string(),
105084                Option::Some(_) => "Some".to_string(),
105085            }
105086        }
105087        #[doc = r" Return the inner value."]
105088        #[rhai_fn(global, get = "value", pure)]
105089        pub fn get_value(my_enum: &mut Option<BotCommandScopeChatMember>) -> Dynamic {
105090            match my_enum {
105091                Option::None => Dynamic::UNIT,
105092                Option::Some(x) => Dynamic::from(x.clone()),
105093            }
105094        }
105095        #[rhai_fn(global, name = "to_string", pure)]
105096        pub fn to_string(my_enum: &mut Option<BotCommandScopeChatMember>) -> String {
105097            format!("{my_enum:?}")
105098        }
105099        #[rhai_fn(global, name = "to_debug", pure)]
105100        pub fn to_debug(my_enum: &mut Option<BotCommandScopeChatMember>) -> String {
105101            format!("{:?}", my_enum)
105102        }
105103    }
105104    #[export_module]
105105    #[warn(non_snake_case)]
105106    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105107    mod ChatBackgroundModule {
105108        #[doc = r" `Option::None` with no inner data"]
105109        pub const None: Option<ChatBackground> = Option::None;
105110        #[doc = r" `Option::Some`"]
105111        pub fn Some(value: ChatBackground) -> Option<ChatBackground> {
105112            Option::Some(value)
105113        }
105114        #[doc = r" Return the current variant of `MyEnum`."]
105115        #[rhai_fn(global, get = "enum_type", pure)]
105116        pub fn get_type(my_enum: &mut Option<ChatBackground>) -> String {
105117            match my_enum {
105118                Option::None => "None".to_string(),
105119                Option::Some(_) => "Some".to_string(),
105120            }
105121        }
105122        #[doc = r" Return the inner value."]
105123        #[rhai_fn(global, get = "value", pure)]
105124        pub fn get_value(my_enum: &mut Option<ChatBackground>) -> Dynamic {
105125            match my_enum {
105126                Option::None => Dynamic::UNIT,
105127                Option::Some(x) => Dynamic::from(x.clone()),
105128            }
105129        }
105130        #[rhai_fn(global, name = "to_string", pure)]
105131        pub fn to_string(my_enum: &mut Option<ChatBackground>) -> String {
105132            format!("{my_enum:?}")
105133        }
105134        #[rhai_fn(global, name = "to_debug", pure)]
105135        pub fn to_debug(my_enum: &mut Option<ChatBackground>) -> String {
105136            format!("{:?}", my_enum)
105137        }
105138    }
105139    #[export_module]
105140    #[warn(non_snake_case)]
105141    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105142    mod PassportFileModule {
105143        #[doc = r" `Option::None` with no inner data"]
105144        pub const None: Option<PassportFile> = Option::None;
105145        #[doc = r" `Option::Some`"]
105146        pub fn Some(value: PassportFile) -> Option<PassportFile> {
105147            Option::Some(value)
105148        }
105149        #[doc = r" Return the current variant of `MyEnum`."]
105150        #[rhai_fn(global, get = "enum_type", pure)]
105151        pub fn get_type(my_enum: &mut Option<PassportFile>) -> String {
105152            match my_enum {
105153                Option::None => "None".to_string(),
105154                Option::Some(_) => "Some".to_string(),
105155            }
105156        }
105157        #[doc = r" Return the inner value."]
105158        #[rhai_fn(global, get = "value", pure)]
105159        pub fn get_value(my_enum: &mut Option<PassportFile>) -> Dynamic {
105160            match my_enum {
105161                Option::None => Dynamic::UNIT,
105162                Option::Some(x) => Dynamic::from(x.clone()),
105163            }
105164        }
105165        #[rhai_fn(global, name = "to_string", pure)]
105166        pub fn to_string(my_enum: &mut Option<PassportFile>) -> String {
105167            format!("{my_enum:?}")
105168        }
105169        #[rhai_fn(global, name = "to_debug", pure)]
105170        pub fn to_debug(my_enum: &mut Option<PassportFile>) -> String {
105171            format!("{:?}", my_enum)
105172        }
105173    }
105174    #[export_module]
105175    #[warn(non_snake_case)]
105176    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105177    mod BotCommandScopeAllChatAdministratorsModule {
105178        #[doc = r" `Option::None` with no inner data"]
105179        pub const None: Option<BotCommandScopeAllChatAdministrators> = Option::None;
105180        #[doc = r" `Option::Some`"]
105181        pub fn Some(
105182            value: BotCommandScopeAllChatAdministrators,
105183        ) -> Option<BotCommandScopeAllChatAdministrators> {
105184            Option::Some(value)
105185        }
105186        #[doc = r" Return the current variant of `MyEnum`."]
105187        #[rhai_fn(global, get = "enum_type", pure)]
105188        pub fn get_type(my_enum: &mut Option<BotCommandScopeAllChatAdministrators>) -> String {
105189            match my_enum {
105190                Option::None => "None".to_string(),
105191                Option::Some(_) => "Some".to_string(),
105192            }
105193        }
105194        #[doc = r" Return the inner value."]
105195        #[rhai_fn(global, get = "value", pure)]
105196        pub fn get_value(my_enum: &mut Option<BotCommandScopeAllChatAdministrators>) -> Dynamic {
105197            match my_enum {
105198                Option::None => Dynamic::UNIT,
105199                Option::Some(x) => Dynamic::from(x.clone()),
105200            }
105201        }
105202        #[rhai_fn(global, name = "to_string", pure)]
105203        pub fn to_string(my_enum: &mut Option<BotCommandScopeAllChatAdministrators>) -> String {
105204            format!("{my_enum:?}")
105205        }
105206        #[rhai_fn(global, name = "to_debug", pure)]
105207        pub fn to_debug(my_enum: &mut Option<BotCommandScopeAllChatAdministrators>) -> String {
105208            format!("{:?}", my_enum)
105209        }
105210    }
105211    #[export_module]
105212    #[warn(non_snake_case)]
105213    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105214    mod InputMediaModule {
105215        #[doc = r" `Option::None` with no inner data"]
105216        pub const None: Option<InputMedia> = Option::None;
105217        #[doc = r" `Option::Some`"]
105218        pub fn Some(value: InputMedia) -> Option<InputMedia> {
105219            Option::Some(value)
105220        }
105221        #[doc = r" Return the current variant of `MyEnum`."]
105222        #[rhai_fn(global, get = "enum_type", pure)]
105223        pub fn get_type(my_enum: &mut Option<InputMedia>) -> String {
105224            match my_enum {
105225                Option::None => "None".to_string(),
105226                Option::Some(_) => "Some".to_string(),
105227            }
105228        }
105229        #[doc = r" Return the inner value."]
105230        #[rhai_fn(global, get = "value", pure)]
105231        pub fn get_value(my_enum: &mut Option<InputMedia>) -> Dynamic {
105232            match my_enum {
105233                Option::None => Dynamic::UNIT,
105234                Option::Some(x) => Dynamic::from(x.clone()),
105235            }
105236        }
105237        #[rhai_fn(global, name = "to_string", pure)]
105238        pub fn to_string(my_enum: &mut Option<InputMedia>) -> String {
105239            format!("{my_enum:?}")
105240        }
105241        #[rhai_fn(global, name = "to_debug", pure)]
105242        pub fn to_debug(my_enum: &mut Option<InputMedia>) -> String {
105243            format!("{:?}", my_enum)
105244        }
105245    }
105246    #[export_module]
105247    #[warn(non_snake_case)]
105248    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105249    mod ExternalReplyInfoModule {
105250        #[doc = r" `Option::None` with no inner data"]
105251        pub const None: Option<ExternalReplyInfo> = Option::None;
105252        #[doc = r" `Option::Some`"]
105253        pub fn Some(value: ExternalReplyInfo) -> Option<ExternalReplyInfo> {
105254            Option::Some(value)
105255        }
105256        #[doc = r" Return the current variant of `MyEnum`."]
105257        #[rhai_fn(global, get = "enum_type", pure)]
105258        pub fn get_type(my_enum: &mut Option<ExternalReplyInfo>) -> String {
105259            match my_enum {
105260                Option::None => "None".to_string(),
105261                Option::Some(_) => "Some".to_string(),
105262            }
105263        }
105264        #[doc = r" Return the inner value."]
105265        #[rhai_fn(global, get = "value", pure)]
105266        pub fn get_value(my_enum: &mut Option<ExternalReplyInfo>) -> Dynamic {
105267            match my_enum {
105268                Option::None => Dynamic::UNIT,
105269                Option::Some(x) => Dynamic::from(x.clone()),
105270            }
105271        }
105272        #[rhai_fn(global, name = "to_string", pure)]
105273        pub fn to_string(my_enum: &mut Option<ExternalReplyInfo>) -> String {
105274            format!("{my_enum:?}")
105275        }
105276        #[rhai_fn(global, name = "to_debug", pure)]
105277        pub fn to_debug(my_enum: &mut Option<ExternalReplyInfo>) -> String {
105278            format!("{:?}", my_enum)
105279        }
105280    }
105281    #[export_module]
105282    #[warn(non_snake_case)]
105283    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105284    mod InlineQueryResultCachedGifModule {
105285        #[doc = r" `Option::None` with no inner data"]
105286        pub const None: Option<InlineQueryResultCachedGif> = Option::None;
105287        #[doc = r" `Option::Some`"]
105288        pub fn Some(value: InlineQueryResultCachedGif) -> Option<InlineQueryResultCachedGif> {
105289            Option::Some(value)
105290        }
105291        #[doc = r" Return the current variant of `MyEnum`."]
105292        #[rhai_fn(global, get = "enum_type", pure)]
105293        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedGif>) -> String {
105294            match my_enum {
105295                Option::None => "None".to_string(),
105296                Option::Some(_) => "Some".to_string(),
105297            }
105298        }
105299        #[doc = r" Return the inner value."]
105300        #[rhai_fn(global, get = "value", pure)]
105301        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedGif>) -> Dynamic {
105302            match my_enum {
105303                Option::None => Dynamic::UNIT,
105304                Option::Some(x) => Dynamic::from(x.clone()),
105305            }
105306        }
105307        #[rhai_fn(global, name = "to_string", pure)]
105308        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedGif>) -> String {
105309            format!("{my_enum:?}")
105310        }
105311        #[rhai_fn(global, name = "to_debug", pure)]
105312        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedGif>) -> String {
105313            format!("{:?}", my_enum)
105314        }
105315    }
105316    #[export_module]
105317    #[warn(non_snake_case)]
105318    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105319    mod WriteAccessAllowedModule {
105320        #[doc = r" `Option::None` with no inner data"]
105321        pub const None: Option<WriteAccessAllowed> = Option::None;
105322        #[doc = r" `Option::Some`"]
105323        pub fn Some(value: WriteAccessAllowed) -> Option<WriteAccessAllowed> {
105324            Option::Some(value)
105325        }
105326        #[doc = r" Return the current variant of `MyEnum`."]
105327        #[rhai_fn(global, get = "enum_type", pure)]
105328        pub fn get_type(my_enum: &mut Option<WriteAccessAllowed>) -> String {
105329            match my_enum {
105330                Option::None => "None".to_string(),
105331                Option::Some(_) => "Some".to_string(),
105332            }
105333        }
105334        #[doc = r" Return the inner value."]
105335        #[rhai_fn(global, get = "value", pure)]
105336        pub fn get_value(my_enum: &mut Option<WriteAccessAllowed>) -> Dynamic {
105337            match my_enum {
105338                Option::None => Dynamic::UNIT,
105339                Option::Some(x) => Dynamic::from(x.clone()),
105340            }
105341        }
105342        #[rhai_fn(global, name = "to_string", pure)]
105343        pub fn to_string(my_enum: &mut Option<WriteAccessAllowed>) -> String {
105344            format!("{my_enum:?}")
105345        }
105346        #[rhai_fn(global, name = "to_debug", pure)]
105347        pub fn to_debug(my_enum: &mut Option<WriteAccessAllowed>) -> String {
105348            format!("{:?}", my_enum)
105349        }
105350    }
105351    #[export_module]
105352    #[warn(non_snake_case)]
105353    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105354    mod TransactionPartnerTelegramApiModule {
105355        #[doc = r" `Option::None` with no inner data"]
105356        pub const None: Option<TransactionPartnerTelegramApi> = Option::None;
105357        #[doc = r" `Option::Some`"]
105358        pub fn Some(value: TransactionPartnerTelegramApi) -> Option<TransactionPartnerTelegramApi> {
105359            Option::Some(value)
105360        }
105361        #[doc = r" Return the current variant of `MyEnum`."]
105362        #[rhai_fn(global, get = "enum_type", pure)]
105363        pub fn get_type(my_enum: &mut Option<TransactionPartnerTelegramApi>) -> String {
105364            match my_enum {
105365                Option::None => "None".to_string(),
105366                Option::Some(_) => "Some".to_string(),
105367            }
105368        }
105369        #[doc = r" Return the inner value."]
105370        #[rhai_fn(global, get = "value", pure)]
105371        pub fn get_value(my_enum: &mut Option<TransactionPartnerTelegramApi>) -> Dynamic {
105372            match my_enum {
105373                Option::None => Dynamic::UNIT,
105374                Option::Some(x) => Dynamic::from(x.clone()),
105375            }
105376        }
105377        #[rhai_fn(global, name = "to_string", pure)]
105378        pub fn to_string(my_enum: &mut Option<TransactionPartnerTelegramApi>) -> String {
105379            format!("{my_enum:?}")
105380        }
105381        #[rhai_fn(global, name = "to_debug", pure)]
105382        pub fn to_debug(my_enum: &mut Option<TransactionPartnerTelegramApi>) -> String {
105383            format!("{:?}", my_enum)
105384        }
105385    }
105386    #[export_module]
105387    #[warn(non_snake_case)]
105388    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105389    mod ProximityAlertTriggeredModule {
105390        #[doc = r" `Option::None` with no inner data"]
105391        pub const None: Option<ProximityAlertTriggered> = Option::None;
105392        #[doc = r" `Option::Some`"]
105393        pub fn Some(value: ProximityAlertTriggered) -> Option<ProximityAlertTriggered> {
105394            Option::Some(value)
105395        }
105396        #[doc = r" Return the current variant of `MyEnum`."]
105397        #[rhai_fn(global, get = "enum_type", pure)]
105398        pub fn get_type(my_enum: &mut Option<ProximityAlertTriggered>) -> String {
105399            match my_enum {
105400                Option::None => "None".to_string(),
105401                Option::Some(_) => "Some".to_string(),
105402            }
105403        }
105404        #[doc = r" Return the inner value."]
105405        #[rhai_fn(global, get = "value", pure)]
105406        pub fn get_value(my_enum: &mut Option<ProximityAlertTriggered>) -> Dynamic {
105407            match my_enum {
105408                Option::None => Dynamic::UNIT,
105409                Option::Some(x) => Dynamic::from(x.clone()),
105410            }
105411        }
105412        #[rhai_fn(global, name = "to_string", pure)]
105413        pub fn to_string(my_enum: &mut Option<ProximityAlertTriggered>) -> String {
105414            format!("{my_enum:?}")
105415        }
105416        #[rhai_fn(global, name = "to_debug", pure)]
105417        pub fn to_debug(my_enum: &mut Option<ProximityAlertTriggered>) -> String {
105418            format!("{:?}", my_enum)
105419        }
105420    }
105421    #[export_module]
105422    #[warn(non_snake_case)]
105423    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105424    mod InlineQueryResultAudioModule {
105425        #[doc = r" `Option::None` with no inner data"]
105426        pub const None: Option<InlineQueryResultAudio> = Option::None;
105427        #[doc = r" `Option::Some`"]
105428        pub fn Some(value: InlineQueryResultAudio) -> Option<InlineQueryResultAudio> {
105429            Option::Some(value)
105430        }
105431        #[doc = r" Return the current variant of `MyEnum`."]
105432        #[rhai_fn(global, get = "enum_type", pure)]
105433        pub fn get_type(my_enum: &mut Option<InlineQueryResultAudio>) -> String {
105434            match my_enum {
105435                Option::None => "None".to_string(),
105436                Option::Some(_) => "Some".to_string(),
105437            }
105438        }
105439        #[doc = r" Return the inner value."]
105440        #[rhai_fn(global, get = "value", pure)]
105441        pub fn get_value(my_enum: &mut Option<InlineQueryResultAudio>) -> Dynamic {
105442            match my_enum {
105443                Option::None => Dynamic::UNIT,
105444                Option::Some(x) => Dynamic::from(x.clone()),
105445            }
105446        }
105447        #[rhai_fn(global, name = "to_string", pure)]
105448        pub fn to_string(my_enum: &mut Option<InlineQueryResultAudio>) -> String {
105449            format!("{my_enum:?}")
105450        }
105451        #[rhai_fn(global, name = "to_debug", pure)]
105452        pub fn to_debug(my_enum: &mut Option<InlineQueryResultAudio>) -> String {
105453            format!("{:?}", my_enum)
105454        }
105455    }
105456    #[export_module]
105457    #[warn(non_snake_case)]
105458    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105459    mod MessageModule {
105460        #[doc = r" `Option::None` with no inner data"]
105461        pub const None: Option<Message> = Option::None;
105462        #[doc = r" `Option::Some`"]
105463        pub fn Some(value: Message) -> Option<Message> {
105464            Option::Some(value)
105465        }
105466        #[doc = r" Return the current variant of `MyEnum`."]
105467        #[rhai_fn(global, get = "enum_type", pure)]
105468        pub fn get_type(my_enum: &mut Option<Message>) -> String {
105469            match my_enum {
105470                Option::None => "None".to_string(),
105471                Option::Some(_) => "Some".to_string(),
105472            }
105473        }
105474        #[doc = r" Return the inner value."]
105475        #[rhai_fn(global, get = "value", pure)]
105476        pub fn get_value(my_enum: &mut Option<Message>) -> Dynamic {
105477            match my_enum {
105478                Option::None => Dynamic::UNIT,
105479                Option::Some(x) => Dynamic::from(x.clone()),
105480            }
105481        }
105482        #[rhai_fn(global, name = "to_string", pure)]
105483        pub fn to_string(my_enum: &mut Option<Message>) -> String {
105484            format!("{my_enum:?}")
105485        }
105486        #[rhai_fn(global, name = "to_debug", pure)]
105487        pub fn to_debug(my_enum: &mut Option<Message>) -> String {
105488            format!("{:?}", my_enum)
105489        }
105490    }
105491    #[export_module]
105492    #[warn(non_snake_case)]
105493    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105494    mod ChatPhotoModule {
105495        #[doc = r" `Option::None` with no inner data"]
105496        pub const None: Option<ChatPhoto> = Option::None;
105497        #[doc = r" `Option::Some`"]
105498        pub fn Some(value: ChatPhoto) -> Option<ChatPhoto> {
105499            Option::Some(value)
105500        }
105501        #[doc = r" Return the current variant of `MyEnum`."]
105502        #[rhai_fn(global, get = "enum_type", pure)]
105503        pub fn get_type(my_enum: &mut Option<ChatPhoto>) -> String {
105504            match my_enum {
105505                Option::None => "None".to_string(),
105506                Option::Some(_) => "Some".to_string(),
105507            }
105508        }
105509        #[doc = r" Return the inner value."]
105510        #[rhai_fn(global, get = "value", pure)]
105511        pub fn get_value(my_enum: &mut Option<ChatPhoto>) -> Dynamic {
105512            match my_enum {
105513                Option::None => Dynamic::UNIT,
105514                Option::Some(x) => Dynamic::from(x.clone()),
105515            }
105516        }
105517        #[rhai_fn(global, name = "to_string", pure)]
105518        pub fn to_string(my_enum: &mut Option<ChatPhoto>) -> String {
105519            format!("{my_enum:?}")
105520        }
105521        #[rhai_fn(global, name = "to_debug", pure)]
105522        pub fn to_debug(my_enum: &mut Option<ChatPhoto>) -> String {
105523            format!("{:?}", my_enum)
105524        }
105525    }
105526    #[export_module]
105527    #[warn(non_snake_case)]
105528    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105529    mod InlineQueryResultGameModule {
105530        #[doc = r" `Option::None` with no inner data"]
105531        pub const None: Option<InlineQueryResultGame> = Option::None;
105532        #[doc = r" `Option::Some`"]
105533        pub fn Some(value: InlineQueryResultGame) -> Option<InlineQueryResultGame> {
105534            Option::Some(value)
105535        }
105536        #[doc = r" Return the current variant of `MyEnum`."]
105537        #[rhai_fn(global, get = "enum_type", pure)]
105538        pub fn get_type(my_enum: &mut Option<InlineQueryResultGame>) -> String {
105539            match my_enum {
105540                Option::None => "None".to_string(),
105541                Option::Some(_) => "Some".to_string(),
105542            }
105543        }
105544        #[doc = r" Return the inner value."]
105545        #[rhai_fn(global, get = "value", pure)]
105546        pub fn get_value(my_enum: &mut Option<InlineQueryResultGame>) -> Dynamic {
105547            match my_enum {
105548                Option::None => Dynamic::UNIT,
105549                Option::Some(x) => Dynamic::from(x.clone()),
105550            }
105551        }
105552        #[rhai_fn(global, name = "to_string", pure)]
105553        pub fn to_string(my_enum: &mut Option<InlineQueryResultGame>) -> String {
105554            format!("{my_enum:?}")
105555        }
105556        #[rhai_fn(global, name = "to_debug", pure)]
105557        pub fn to_debug(my_enum: &mut Option<InlineQueryResultGame>) -> String {
105558            format!("{:?}", my_enum)
105559        }
105560    }
105561    #[export_module]
105562    #[warn(non_snake_case)]
105563    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105564    mod RevenueWithdrawalStateFailedModule {
105565        #[doc = r" `Option::None` with no inner data"]
105566        pub const None: Option<RevenueWithdrawalStateFailed> = Option::None;
105567        #[doc = r" `Option::Some`"]
105568        pub fn Some(value: RevenueWithdrawalStateFailed) -> Option<RevenueWithdrawalStateFailed> {
105569            Option::Some(value)
105570        }
105571        #[doc = r" Return the current variant of `MyEnum`."]
105572        #[rhai_fn(global, get = "enum_type", pure)]
105573        pub fn get_type(my_enum: &mut Option<RevenueWithdrawalStateFailed>) -> String {
105574            match my_enum {
105575                Option::None => "None".to_string(),
105576                Option::Some(_) => "Some".to_string(),
105577            }
105578        }
105579        #[doc = r" Return the inner value."]
105580        #[rhai_fn(global, get = "value", pure)]
105581        pub fn get_value(my_enum: &mut Option<RevenueWithdrawalStateFailed>) -> Dynamic {
105582            match my_enum {
105583                Option::None => Dynamic::UNIT,
105584                Option::Some(x) => Dynamic::from(x.clone()),
105585            }
105586        }
105587        #[rhai_fn(global, name = "to_string", pure)]
105588        pub fn to_string(my_enum: &mut Option<RevenueWithdrawalStateFailed>) -> String {
105589            format!("{my_enum:?}")
105590        }
105591        #[rhai_fn(global, name = "to_debug", pure)]
105592        pub fn to_debug(my_enum: &mut Option<RevenueWithdrawalStateFailed>) -> String {
105593            format!("{:?}", my_enum)
105594        }
105595    }
105596    #[export_module]
105597    #[warn(non_snake_case)]
105598    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105599    mod MessageEntityModule {
105600        #[doc = r" `Option::None` with no inner data"]
105601        pub const None: Option<MessageEntity> = Option::None;
105602        #[doc = r" `Option::Some`"]
105603        pub fn Some(value: MessageEntity) -> Option<MessageEntity> {
105604            Option::Some(value)
105605        }
105606        #[doc = r" Return the current variant of `MyEnum`."]
105607        #[rhai_fn(global, get = "enum_type", pure)]
105608        pub fn get_type(my_enum: &mut Option<MessageEntity>) -> String {
105609            match my_enum {
105610                Option::None => "None".to_string(),
105611                Option::Some(_) => "Some".to_string(),
105612            }
105613        }
105614        #[doc = r" Return the inner value."]
105615        #[rhai_fn(global, get = "value", pure)]
105616        pub fn get_value(my_enum: &mut Option<MessageEntity>) -> Dynamic {
105617            match my_enum {
105618                Option::None => Dynamic::UNIT,
105619                Option::Some(x) => Dynamic::from(x.clone()),
105620            }
105621        }
105622        #[rhai_fn(global, name = "to_string", pure)]
105623        pub fn to_string(my_enum: &mut Option<MessageEntity>) -> String {
105624            format!("{my_enum:?}")
105625        }
105626        #[rhai_fn(global, name = "to_debug", pure)]
105627        pub fn to_debug(my_enum: &mut Option<MessageEntity>) -> String {
105628            format!("{:?}", my_enum)
105629        }
105630    }
105631    #[export_module]
105632    #[warn(non_snake_case)]
105633    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105634    mod UniqueGiftBackdropColorsModule {
105635        #[doc = r" `Option::None` with no inner data"]
105636        pub const None: Option<UniqueGiftBackdropColors> = Option::None;
105637        #[doc = r" `Option::Some`"]
105638        pub fn Some(value: UniqueGiftBackdropColors) -> Option<UniqueGiftBackdropColors> {
105639            Option::Some(value)
105640        }
105641        #[doc = r" Return the current variant of `MyEnum`."]
105642        #[rhai_fn(global, get = "enum_type", pure)]
105643        pub fn get_type(my_enum: &mut Option<UniqueGiftBackdropColors>) -> String {
105644            match my_enum {
105645                Option::None => "None".to_string(),
105646                Option::Some(_) => "Some".to_string(),
105647            }
105648        }
105649        #[doc = r" Return the inner value."]
105650        #[rhai_fn(global, get = "value", pure)]
105651        pub fn get_value(my_enum: &mut Option<UniqueGiftBackdropColors>) -> Dynamic {
105652            match my_enum {
105653                Option::None => Dynamic::UNIT,
105654                Option::Some(x) => Dynamic::from(x.clone()),
105655            }
105656        }
105657        #[rhai_fn(global, name = "to_string", pure)]
105658        pub fn to_string(my_enum: &mut Option<UniqueGiftBackdropColors>) -> String {
105659            format!("{my_enum:?}")
105660        }
105661        #[rhai_fn(global, name = "to_debug", pure)]
105662        pub fn to_debug(my_enum: &mut Option<UniqueGiftBackdropColors>) -> String {
105663            format!("{:?}", my_enum)
105664        }
105665    }
105666    #[export_module]
105667    #[warn(non_snake_case)]
105668    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105669    mod InputStoryContentModule {
105670        #[doc = r" `Option::None` with no inner data"]
105671        pub const None: Option<InputStoryContent> = Option::None;
105672        #[doc = r" `Option::Some`"]
105673        pub fn Some(value: InputStoryContent) -> Option<InputStoryContent> {
105674            Option::Some(value)
105675        }
105676        #[doc = r" Return the current variant of `MyEnum`."]
105677        #[rhai_fn(global, get = "enum_type", pure)]
105678        pub fn get_type(my_enum: &mut Option<InputStoryContent>) -> String {
105679            match my_enum {
105680                Option::None => "None".to_string(),
105681                Option::Some(_) => "Some".to_string(),
105682            }
105683        }
105684        #[doc = r" Return the inner value."]
105685        #[rhai_fn(global, get = "value", pure)]
105686        pub fn get_value(my_enum: &mut Option<InputStoryContent>) -> Dynamic {
105687            match my_enum {
105688                Option::None => Dynamic::UNIT,
105689                Option::Some(x) => Dynamic::from(x.clone()),
105690            }
105691        }
105692        #[rhai_fn(global, name = "to_string", pure)]
105693        pub fn to_string(my_enum: &mut Option<InputStoryContent>) -> String {
105694            format!("{my_enum:?}")
105695        }
105696        #[rhai_fn(global, name = "to_debug", pure)]
105697        pub fn to_debug(my_enum: &mut Option<InputStoryContent>) -> String {
105698            format!("{:?}", my_enum)
105699        }
105700    }
105701    #[export_module]
105702    #[warn(non_snake_case)]
105703    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105704    mod SuggestedPostApprovalFailedModule {
105705        #[doc = r" `Option::None` with no inner data"]
105706        pub const None: Option<SuggestedPostApprovalFailed> = Option::None;
105707        #[doc = r" `Option::Some`"]
105708        pub fn Some(value: SuggestedPostApprovalFailed) -> Option<SuggestedPostApprovalFailed> {
105709            Option::Some(value)
105710        }
105711        #[doc = r" Return the current variant of `MyEnum`."]
105712        #[rhai_fn(global, get = "enum_type", pure)]
105713        pub fn get_type(my_enum: &mut Option<SuggestedPostApprovalFailed>) -> String {
105714            match my_enum {
105715                Option::None => "None".to_string(),
105716                Option::Some(_) => "Some".to_string(),
105717            }
105718        }
105719        #[doc = r" Return the inner value."]
105720        #[rhai_fn(global, get = "value", pure)]
105721        pub fn get_value(my_enum: &mut Option<SuggestedPostApprovalFailed>) -> Dynamic {
105722            match my_enum {
105723                Option::None => Dynamic::UNIT,
105724                Option::Some(x) => Dynamic::from(x.clone()),
105725            }
105726        }
105727        #[rhai_fn(global, name = "to_string", pure)]
105728        pub fn to_string(my_enum: &mut Option<SuggestedPostApprovalFailed>) -> String {
105729            format!("{my_enum:?}")
105730        }
105731        #[rhai_fn(global, name = "to_debug", pure)]
105732        pub fn to_debug(my_enum: &mut Option<SuggestedPostApprovalFailed>) -> String {
105733            format!("{:?}", my_enum)
105734        }
105735    }
105736    #[export_module]
105737    #[warn(non_snake_case)]
105738    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105739    mod DocumentModule {
105740        #[doc = r" `Option::None` with no inner data"]
105741        pub const None: Option<Document> = Option::None;
105742        #[doc = r" `Option::Some`"]
105743        pub fn Some(value: Document) -> Option<Document> {
105744            Option::Some(value)
105745        }
105746        #[doc = r" Return the current variant of `MyEnum`."]
105747        #[rhai_fn(global, get = "enum_type", pure)]
105748        pub fn get_type(my_enum: &mut Option<Document>) -> String {
105749            match my_enum {
105750                Option::None => "None".to_string(),
105751                Option::Some(_) => "Some".to_string(),
105752            }
105753        }
105754        #[doc = r" Return the inner value."]
105755        #[rhai_fn(global, get = "value", pure)]
105756        pub fn get_value(my_enum: &mut Option<Document>) -> Dynamic {
105757            match my_enum {
105758                Option::None => Dynamic::UNIT,
105759                Option::Some(x) => Dynamic::from(x.clone()),
105760            }
105761        }
105762        #[rhai_fn(global, name = "to_string", pure)]
105763        pub fn to_string(my_enum: &mut Option<Document>) -> String {
105764            format!("{my_enum:?}")
105765        }
105766        #[rhai_fn(global, name = "to_debug", pure)]
105767        pub fn to_debug(my_enum: &mut Option<Document>) -> String {
105768            format!("{:?}", my_enum)
105769        }
105770    }
105771    #[export_module]
105772    #[warn(non_snake_case)]
105773    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105774    mod SharedUserModule {
105775        #[doc = r" `Option::None` with no inner data"]
105776        pub const None: Option<SharedUser> = Option::None;
105777        #[doc = r" `Option::Some`"]
105778        pub fn Some(value: SharedUser) -> Option<SharedUser> {
105779            Option::Some(value)
105780        }
105781        #[doc = r" Return the current variant of `MyEnum`."]
105782        #[rhai_fn(global, get = "enum_type", pure)]
105783        pub fn get_type(my_enum: &mut Option<SharedUser>) -> String {
105784            match my_enum {
105785                Option::None => "None".to_string(),
105786                Option::Some(_) => "Some".to_string(),
105787            }
105788        }
105789        #[doc = r" Return the inner value."]
105790        #[rhai_fn(global, get = "value", pure)]
105791        pub fn get_value(my_enum: &mut Option<SharedUser>) -> Dynamic {
105792            match my_enum {
105793                Option::None => Dynamic::UNIT,
105794                Option::Some(x) => Dynamic::from(x.clone()),
105795            }
105796        }
105797        #[rhai_fn(global, name = "to_string", pure)]
105798        pub fn to_string(my_enum: &mut Option<SharedUser>) -> String {
105799            format!("{my_enum:?}")
105800        }
105801        #[rhai_fn(global, name = "to_debug", pure)]
105802        pub fn to_debug(my_enum: &mut Option<SharedUser>) -> String {
105803            format!("{:?}", my_enum)
105804        }
105805    }
105806    #[export_module]
105807    #[warn(non_snake_case)]
105808    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105809    mod UniqueGiftInfoModule {
105810        #[doc = r" `Option::None` with no inner data"]
105811        pub const None: Option<UniqueGiftInfo> = Option::None;
105812        #[doc = r" `Option::Some`"]
105813        pub fn Some(value: UniqueGiftInfo) -> Option<UniqueGiftInfo> {
105814            Option::Some(value)
105815        }
105816        #[doc = r" Return the current variant of `MyEnum`."]
105817        #[rhai_fn(global, get = "enum_type", pure)]
105818        pub fn get_type(my_enum: &mut Option<UniqueGiftInfo>) -> String {
105819            match my_enum {
105820                Option::None => "None".to_string(),
105821                Option::Some(_) => "Some".to_string(),
105822            }
105823        }
105824        #[doc = r" Return the inner value."]
105825        #[rhai_fn(global, get = "value", pure)]
105826        pub fn get_value(my_enum: &mut Option<UniqueGiftInfo>) -> Dynamic {
105827            match my_enum {
105828                Option::None => Dynamic::UNIT,
105829                Option::Some(x) => Dynamic::from(x.clone()),
105830            }
105831        }
105832        #[rhai_fn(global, name = "to_string", pure)]
105833        pub fn to_string(my_enum: &mut Option<UniqueGiftInfo>) -> String {
105834            format!("{my_enum:?}")
105835        }
105836        #[rhai_fn(global, name = "to_debug", pure)]
105837        pub fn to_debug(my_enum: &mut Option<UniqueGiftInfo>) -> String {
105838            format!("{:?}", my_enum)
105839        }
105840    }
105841    #[export_module]
105842    #[warn(non_snake_case)]
105843    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105844    mod ShippingQueryModule {
105845        #[doc = r" `Option::None` with no inner data"]
105846        pub const None: Option<ShippingQuery> = Option::None;
105847        #[doc = r" `Option::Some`"]
105848        pub fn Some(value: ShippingQuery) -> Option<ShippingQuery> {
105849            Option::Some(value)
105850        }
105851        #[doc = r" Return the current variant of `MyEnum`."]
105852        #[rhai_fn(global, get = "enum_type", pure)]
105853        pub fn get_type(my_enum: &mut Option<ShippingQuery>) -> String {
105854            match my_enum {
105855                Option::None => "None".to_string(),
105856                Option::Some(_) => "Some".to_string(),
105857            }
105858        }
105859        #[doc = r" Return the inner value."]
105860        #[rhai_fn(global, get = "value", pure)]
105861        pub fn get_value(my_enum: &mut Option<ShippingQuery>) -> Dynamic {
105862            match my_enum {
105863                Option::None => Dynamic::UNIT,
105864                Option::Some(x) => Dynamic::from(x.clone()),
105865            }
105866        }
105867        #[rhai_fn(global, name = "to_string", pure)]
105868        pub fn to_string(my_enum: &mut Option<ShippingQuery>) -> String {
105869            format!("{my_enum:?}")
105870        }
105871        #[rhai_fn(global, name = "to_debug", pure)]
105872        pub fn to_debug(my_enum: &mut Option<ShippingQuery>) -> String {
105873            format!("{:?}", my_enum)
105874        }
105875    }
105876    #[export_module]
105877    #[warn(non_snake_case)]
105878    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105879    mod InlineQueryResultVideoModule {
105880        #[doc = r" `Option::None` with no inner data"]
105881        pub const None: Option<InlineQueryResultVideo> = Option::None;
105882        #[doc = r" `Option::Some`"]
105883        pub fn Some(value: InlineQueryResultVideo) -> Option<InlineQueryResultVideo> {
105884            Option::Some(value)
105885        }
105886        #[doc = r" Return the current variant of `MyEnum`."]
105887        #[rhai_fn(global, get = "enum_type", pure)]
105888        pub fn get_type(my_enum: &mut Option<InlineQueryResultVideo>) -> String {
105889            match my_enum {
105890                Option::None => "None".to_string(),
105891                Option::Some(_) => "Some".to_string(),
105892            }
105893        }
105894        #[doc = r" Return the inner value."]
105895        #[rhai_fn(global, get = "value", pure)]
105896        pub fn get_value(my_enum: &mut Option<InlineQueryResultVideo>) -> Dynamic {
105897            match my_enum {
105898                Option::None => Dynamic::UNIT,
105899                Option::Some(x) => Dynamic::from(x.clone()),
105900            }
105901        }
105902        #[rhai_fn(global, name = "to_string", pure)]
105903        pub fn to_string(my_enum: &mut Option<InlineQueryResultVideo>) -> String {
105904            format!("{my_enum:?}")
105905        }
105906        #[rhai_fn(global, name = "to_debug", pure)]
105907        pub fn to_debug(my_enum: &mut Option<InlineQueryResultVideo>) -> String {
105908            format!("{:?}", my_enum)
105909        }
105910    }
105911    #[export_module]
105912    #[warn(non_snake_case)]
105913    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105914    mod DirectMessagePriceChangedModule {
105915        #[doc = r" `Option::None` with no inner data"]
105916        pub const None: Option<DirectMessagePriceChanged> = Option::None;
105917        #[doc = r" `Option::Some`"]
105918        pub fn Some(value: DirectMessagePriceChanged) -> Option<DirectMessagePriceChanged> {
105919            Option::Some(value)
105920        }
105921        #[doc = r" Return the current variant of `MyEnum`."]
105922        #[rhai_fn(global, get = "enum_type", pure)]
105923        pub fn get_type(my_enum: &mut Option<DirectMessagePriceChanged>) -> String {
105924            match my_enum {
105925                Option::None => "None".to_string(),
105926                Option::Some(_) => "Some".to_string(),
105927            }
105928        }
105929        #[doc = r" Return the inner value."]
105930        #[rhai_fn(global, get = "value", pure)]
105931        pub fn get_value(my_enum: &mut Option<DirectMessagePriceChanged>) -> Dynamic {
105932            match my_enum {
105933                Option::None => Dynamic::UNIT,
105934                Option::Some(x) => Dynamic::from(x.clone()),
105935            }
105936        }
105937        #[rhai_fn(global, name = "to_string", pure)]
105938        pub fn to_string(my_enum: &mut Option<DirectMessagePriceChanged>) -> String {
105939            format!("{my_enum:?}")
105940        }
105941        #[rhai_fn(global, name = "to_debug", pure)]
105942        pub fn to_debug(my_enum: &mut Option<DirectMessagePriceChanged>) -> String {
105943            format!("{:?}", my_enum)
105944        }
105945    }
105946    #[export_module]
105947    #[warn(non_snake_case)]
105948    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105949    mod ReactionCountModule {
105950        #[doc = r" `Option::None` with no inner data"]
105951        pub const None: Option<ReactionCount> = Option::None;
105952        #[doc = r" `Option::Some`"]
105953        pub fn Some(value: ReactionCount) -> Option<ReactionCount> {
105954            Option::Some(value)
105955        }
105956        #[doc = r" Return the current variant of `MyEnum`."]
105957        #[rhai_fn(global, get = "enum_type", pure)]
105958        pub fn get_type(my_enum: &mut Option<ReactionCount>) -> String {
105959            match my_enum {
105960                Option::None => "None".to_string(),
105961                Option::Some(_) => "Some".to_string(),
105962            }
105963        }
105964        #[doc = r" Return the inner value."]
105965        #[rhai_fn(global, get = "value", pure)]
105966        pub fn get_value(my_enum: &mut Option<ReactionCount>) -> Dynamic {
105967            match my_enum {
105968                Option::None => Dynamic::UNIT,
105969                Option::Some(x) => Dynamic::from(x.clone()),
105970            }
105971        }
105972        #[rhai_fn(global, name = "to_string", pure)]
105973        pub fn to_string(my_enum: &mut Option<ReactionCount>) -> String {
105974            format!("{my_enum:?}")
105975        }
105976        #[rhai_fn(global, name = "to_debug", pure)]
105977        pub fn to_debug(my_enum: &mut Option<ReactionCount>) -> String {
105978            format!("{:?}", my_enum)
105979        }
105980    }
105981    #[export_module]
105982    #[warn(non_snake_case)]
105983    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
105984    mod ChatSharedModule {
105985        #[doc = r" `Option::None` with no inner data"]
105986        pub const None: Option<ChatShared> = Option::None;
105987        #[doc = r" `Option::Some`"]
105988        pub fn Some(value: ChatShared) -> Option<ChatShared> {
105989            Option::Some(value)
105990        }
105991        #[doc = r" Return the current variant of `MyEnum`."]
105992        #[rhai_fn(global, get = "enum_type", pure)]
105993        pub fn get_type(my_enum: &mut Option<ChatShared>) -> String {
105994            match my_enum {
105995                Option::None => "None".to_string(),
105996                Option::Some(_) => "Some".to_string(),
105997            }
105998        }
105999        #[doc = r" Return the inner value."]
106000        #[rhai_fn(global, get = "value", pure)]
106001        pub fn get_value(my_enum: &mut Option<ChatShared>) -> Dynamic {
106002            match my_enum {
106003                Option::None => Dynamic::UNIT,
106004                Option::Some(x) => Dynamic::from(x.clone()),
106005            }
106006        }
106007        #[rhai_fn(global, name = "to_string", pure)]
106008        pub fn to_string(my_enum: &mut Option<ChatShared>) -> String {
106009            format!("{my_enum:?}")
106010        }
106011        #[rhai_fn(global, name = "to_debug", pure)]
106012        pub fn to_debug(my_enum: &mut Option<ChatShared>) -> String {
106013            format!("{:?}", my_enum)
106014        }
106015    }
106016    #[export_module]
106017    #[warn(non_snake_case)]
106018    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106019    mod MessageOriginChannelModule {
106020        #[doc = r" `Option::None` with no inner data"]
106021        pub const None: Option<MessageOriginChannel> = Option::None;
106022        #[doc = r" `Option::Some`"]
106023        pub fn Some(value: MessageOriginChannel) -> Option<MessageOriginChannel> {
106024            Option::Some(value)
106025        }
106026        #[doc = r" Return the current variant of `MyEnum`."]
106027        #[rhai_fn(global, get = "enum_type", pure)]
106028        pub fn get_type(my_enum: &mut Option<MessageOriginChannel>) -> String {
106029            match my_enum {
106030                Option::None => "None".to_string(),
106031                Option::Some(_) => "Some".to_string(),
106032            }
106033        }
106034        #[doc = r" Return the inner value."]
106035        #[rhai_fn(global, get = "value", pure)]
106036        pub fn get_value(my_enum: &mut Option<MessageOriginChannel>) -> Dynamic {
106037            match my_enum {
106038                Option::None => Dynamic::UNIT,
106039                Option::Some(x) => Dynamic::from(x.clone()),
106040            }
106041        }
106042        #[rhai_fn(global, name = "to_string", pure)]
106043        pub fn to_string(my_enum: &mut Option<MessageOriginChannel>) -> String {
106044            format!("{my_enum:?}")
106045        }
106046        #[rhai_fn(global, name = "to_debug", pure)]
106047        pub fn to_debug(my_enum: &mut Option<MessageOriginChannel>) -> String {
106048            format!("{:?}", my_enum)
106049        }
106050    }
106051    #[export_module]
106052    #[warn(non_snake_case)]
106053    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106054    mod ChatBoostRemovedModule {
106055        #[doc = r" `Option::None` with no inner data"]
106056        pub const None: Option<ChatBoostRemoved> = Option::None;
106057        #[doc = r" `Option::Some`"]
106058        pub fn Some(value: ChatBoostRemoved) -> Option<ChatBoostRemoved> {
106059            Option::Some(value)
106060        }
106061        #[doc = r" Return the current variant of `MyEnum`."]
106062        #[rhai_fn(global, get = "enum_type", pure)]
106063        pub fn get_type(my_enum: &mut Option<ChatBoostRemoved>) -> String {
106064            match my_enum {
106065                Option::None => "None".to_string(),
106066                Option::Some(_) => "Some".to_string(),
106067            }
106068        }
106069        #[doc = r" Return the inner value."]
106070        #[rhai_fn(global, get = "value", pure)]
106071        pub fn get_value(my_enum: &mut Option<ChatBoostRemoved>) -> Dynamic {
106072            match my_enum {
106073                Option::None => Dynamic::UNIT,
106074                Option::Some(x) => Dynamic::from(x.clone()),
106075            }
106076        }
106077        #[rhai_fn(global, name = "to_string", pure)]
106078        pub fn to_string(my_enum: &mut Option<ChatBoostRemoved>) -> String {
106079            format!("{my_enum:?}")
106080        }
106081        #[rhai_fn(global, name = "to_debug", pure)]
106082        pub fn to_debug(my_enum: &mut Option<ChatBoostRemoved>) -> String {
106083            format!("{:?}", my_enum)
106084        }
106085    }
106086    #[export_module]
106087    #[warn(non_snake_case)]
106088    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106089    mod BackgroundTypeFillModule {
106090        #[doc = r" `Option::None` with no inner data"]
106091        pub const None: Option<BackgroundTypeFill> = Option::None;
106092        #[doc = r" `Option::Some`"]
106093        pub fn Some(value: BackgroundTypeFill) -> Option<BackgroundTypeFill> {
106094            Option::Some(value)
106095        }
106096        #[doc = r" Return the current variant of `MyEnum`."]
106097        #[rhai_fn(global, get = "enum_type", pure)]
106098        pub fn get_type(my_enum: &mut Option<BackgroundTypeFill>) -> String {
106099            match my_enum {
106100                Option::None => "None".to_string(),
106101                Option::Some(_) => "Some".to_string(),
106102            }
106103        }
106104        #[doc = r" Return the inner value."]
106105        #[rhai_fn(global, get = "value", pure)]
106106        pub fn get_value(my_enum: &mut Option<BackgroundTypeFill>) -> Dynamic {
106107            match my_enum {
106108                Option::None => Dynamic::UNIT,
106109                Option::Some(x) => Dynamic::from(x.clone()),
106110            }
106111        }
106112        #[rhai_fn(global, name = "to_string", pure)]
106113        pub fn to_string(my_enum: &mut Option<BackgroundTypeFill>) -> String {
106114            format!("{my_enum:?}")
106115        }
106116        #[rhai_fn(global, name = "to_debug", pure)]
106117        pub fn to_debug(my_enum: &mut Option<BackgroundTypeFill>) -> String {
106118            format!("{:?}", my_enum)
106119        }
106120    }
106121    #[export_module]
106122    #[warn(non_snake_case)]
106123    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106124    mod MessageIdModule {
106125        #[doc = r" `Option::None` with no inner data"]
106126        pub const None: Option<MessageId> = Option::None;
106127        #[doc = r" `Option::Some`"]
106128        pub fn Some(value: MessageId) -> Option<MessageId> {
106129            Option::Some(value)
106130        }
106131        #[doc = r" Return the current variant of `MyEnum`."]
106132        #[rhai_fn(global, get = "enum_type", pure)]
106133        pub fn get_type(my_enum: &mut Option<MessageId>) -> String {
106134            match my_enum {
106135                Option::None => "None".to_string(),
106136                Option::Some(_) => "Some".to_string(),
106137            }
106138        }
106139        #[doc = r" Return the inner value."]
106140        #[rhai_fn(global, get = "value", pure)]
106141        pub fn get_value(my_enum: &mut Option<MessageId>) -> Dynamic {
106142            match my_enum {
106143                Option::None => Dynamic::UNIT,
106144                Option::Some(x) => Dynamic::from(x.clone()),
106145            }
106146        }
106147        #[rhai_fn(global, name = "to_string", pure)]
106148        pub fn to_string(my_enum: &mut Option<MessageId>) -> String {
106149            format!("{my_enum:?}")
106150        }
106151        #[rhai_fn(global, name = "to_debug", pure)]
106152        pub fn to_debug(my_enum: &mut Option<MessageId>) -> String {
106153            format!("{:?}", my_enum)
106154        }
106155    }
106156    #[export_module]
106157    #[warn(non_snake_case)]
106158    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106159    mod KeyboardButtonRequestChatModule {
106160        #[doc = r" `Option::None` with no inner data"]
106161        pub const None: Option<KeyboardButtonRequestChat> = Option::None;
106162        #[doc = r" `Option::Some`"]
106163        pub fn Some(value: KeyboardButtonRequestChat) -> Option<KeyboardButtonRequestChat> {
106164            Option::Some(value)
106165        }
106166        #[doc = r" Return the current variant of `MyEnum`."]
106167        #[rhai_fn(global, get = "enum_type", pure)]
106168        pub fn get_type(my_enum: &mut Option<KeyboardButtonRequestChat>) -> String {
106169            match my_enum {
106170                Option::None => "None".to_string(),
106171                Option::Some(_) => "Some".to_string(),
106172            }
106173        }
106174        #[doc = r" Return the inner value."]
106175        #[rhai_fn(global, get = "value", pure)]
106176        pub fn get_value(my_enum: &mut Option<KeyboardButtonRequestChat>) -> Dynamic {
106177            match my_enum {
106178                Option::None => Dynamic::UNIT,
106179                Option::Some(x) => Dynamic::from(x.clone()),
106180            }
106181        }
106182        #[rhai_fn(global, name = "to_string", pure)]
106183        pub fn to_string(my_enum: &mut Option<KeyboardButtonRequestChat>) -> String {
106184            format!("{my_enum:?}")
106185        }
106186        #[rhai_fn(global, name = "to_debug", pure)]
106187        pub fn to_debug(my_enum: &mut Option<KeyboardButtonRequestChat>) -> String {
106188            format!("{:?}", my_enum)
106189        }
106190    }
106191    #[export_module]
106192    #[warn(non_snake_case)]
106193    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106194    mod ReactionTypeEmojiModule {
106195        #[doc = r" `Option::None` with no inner data"]
106196        pub const None: Option<ReactionTypeEmoji> = Option::None;
106197        #[doc = r" `Option::Some`"]
106198        pub fn Some(value: ReactionTypeEmoji) -> Option<ReactionTypeEmoji> {
106199            Option::Some(value)
106200        }
106201        #[doc = r" Return the current variant of `MyEnum`."]
106202        #[rhai_fn(global, get = "enum_type", pure)]
106203        pub fn get_type(my_enum: &mut Option<ReactionTypeEmoji>) -> String {
106204            match my_enum {
106205                Option::None => "None".to_string(),
106206                Option::Some(_) => "Some".to_string(),
106207            }
106208        }
106209        #[doc = r" Return the inner value."]
106210        #[rhai_fn(global, get = "value", pure)]
106211        pub fn get_value(my_enum: &mut Option<ReactionTypeEmoji>) -> Dynamic {
106212            match my_enum {
106213                Option::None => Dynamic::UNIT,
106214                Option::Some(x) => Dynamic::from(x.clone()),
106215            }
106216        }
106217        #[rhai_fn(global, name = "to_string", pure)]
106218        pub fn to_string(my_enum: &mut Option<ReactionTypeEmoji>) -> String {
106219            format!("{my_enum:?}")
106220        }
106221        #[rhai_fn(global, name = "to_debug", pure)]
106222        pub fn to_debug(my_enum: &mut Option<ReactionTypeEmoji>) -> String {
106223            format!("{:?}", my_enum)
106224        }
106225    }
106226    #[export_module]
106227    #[warn(non_snake_case)]
106228    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106229    mod InputFileModule {
106230        #[doc = r" `Option::None` with no inner data"]
106231        pub const None: Option<InputFile> = Option::None;
106232        #[doc = r" `Option::Some`"]
106233        pub fn Some(value: InputFile) -> Option<InputFile> {
106234            Option::Some(value)
106235        }
106236        #[doc = r" Return the current variant of `MyEnum`."]
106237        #[rhai_fn(global, get = "enum_type", pure)]
106238        pub fn get_type(my_enum: &mut Option<InputFile>) -> String {
106239            match my_enum {
106240                Option::None => "None".to_string(),
106241                Option::Some(_) => "Some".to_string(),
106242            }
106243        }
106244        #[doc = r" Return the inner value."]
106245        #[rhai_fn(global, get = "value", pure)]
106246        pub fn get_value(my_enum: &mut Option<InputFile>) -> Dynamic {
106247            match my_enum {
106248                Option::None => Dynamic::UNIT,
106249                Option::Some(x) => Dynamic::from(x.clone()),
106250            }
106251        }
106252        #[rhai_fn(global, name = "to_string", pure)]
106253        pub fn to_string(my_enum: &mut Option<InputFile>) -> String {
106254            format!("{my_enum:?}")
106255        }
106256        #[rhai_fn(global, name = "to_debug", pure)]
106257        pub fn to_debug(my_enum: &mut Option<InputFile>) -> String {
106258            format!("{:?}", my_enum)
106259        }
106260    }
106261    #[export_module]
106262    #[warn(non_snake_case)]
106263    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106264    mod SentWebAppMessageModule {
106265        #[doc = r" `Option::None` with no inner data"]
106266        pub const None: Option<SentWebAppMessage> = Option::None;
106267        #[doc = r" `Option::Some`"]
106268        pub fn Some(value: SentWebAppMessage) -> Option<SentWebAppMessage> {
106269            Option::Some(value)
106270        }
106271        #[doc = r" Return the current variant of `MyEnum`."]
106272        #[rhai_fn(global, get = "enum_type", pure)]
106273        pub fn get_type(my_enum: &mut Option<SentWebAppMessage>) -> String {
106274            match my_enum {
106275                Option::None => "None".to_string(),
106276                Option::Some(_) => "Some".to_string(),
106277            }
106278        }
106279        #[doc = r" Return the inner value."]
106280        #[rhai_fn(global, get = "value", pure)]
106281        pub fn get_value(my_enum: &mut Option<SentWebAppMessage>) -> Dynamic {
106282            match my_enum {
106283                Option::None => Dynamic::UNIT,
106284                Option::Some(x) => Dynamic::from(x.clone()),
106285            }
106286        }
106287        #[rhai_fn(global, name = "to_string", pure)]
106288        pub fn to_string(my_enum: &mut Option<SentWebAppMessage>) -> String {
106289            format!("{my_enum:?}")
106290        }
106291        #[rhai_fn(global, name = "to_debug", pure)]
106292        pub fn to_debug(my_enum: &mut Option<SentWebAppMessage>) -> String {
106293            format!("{:?}", my_enum)
106294        }
106295    }
106296    #[export_module]
106297    #[warn(non_snake_case)]
106298    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106299    mod GiveawayModule {
106300        #[doc = r" `Option::None` with no inner data"]
106301        pub const None: Option<Giveaway> = Option::None;
106302        #[doc = r" `Option::Some`"]
106303        pub fn Some(value: Giveaway) -> Option<Giveaway> {
106304            Option::Some(value)
106305        }
106306        #[doc = r" Return the current variant of `MyEnum`."]
106307        #[rhai_fn(global, get = "enum_type", pure)]
106308        pub fn get_type(my_enum: &mut Option<Giveaway>) -> String {
106309            match my_enum {
106310                Option::None => "None".to_string(),
106311                Option::Some(_) => "Some".to_string(),
106312            }
106313        }
106314        #[doc = r" Return the inner value."]
106315        #[rhai_fn(global, get = "value", pure)]
106316        pub fn get_value(my_enum: &mut Option<Giveaway>) -> Dynamic {
106317            match my_enum {
106318                Option::None => Dynamic::UNIT,
106319                Option::Some(x) => Dynamic::from(x.clone()),
106320            }
106321        }
106322        #[rhai_fn(global, name = "to_string", pure)]
106323        pub fn to_string(my_enum: &mut Option<Giveaway>) -> String {
106324            format!("{my_enum:?}")
106325        }
106326        #[rhai_fn(global, name = "to_debug", pure)]
106327        pub fn to_debug(my_enum: &mut Option<Giveaway>) -> String {
106328            format!("{:?}", my_enum)
106329        }
106330    }
106331    #[export_module]
106332    #[warn(non_snake_case)]
106333    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106334    mod DirectMessagesTopicModule {
106335        #[doc = r" `Option::None` with no inner data"]
106336        pub const None: Option<DirectMessagesTopic> = Option::None;
106337        #[doc = r" `Option::Some`"]
106338        pub fn Some(value: DirectMessagesTopic) -> Option<DirectMessagesTopic> {
106339            Option::Some(value)
106340        }
106341        #[doc = r" Return the current variant of `MyEnum`."]
106342        #[rhai_fn(global, get = "enum_type", pure)]
106343        pub fn get_type(my_enum: &mut Option<DirectMessagesTopic>) -> String {
106344            match my_enum {
106345                Option::None => "None".to_string(),
106346                Option::Some(_) => "Some".to_string(),
106347            }
106348        }
106349        #[doc = r" Return the inner value."]
106350        #[rhai_fn(global, get = "value", pure)]
106351        pub fn get_value(my_enum: &mut Option<DirectMessagesTopic>) -> Dynamic {
106352            match my_enum {
106353                Option::None => Dynamic::UNIT,
106354                Option::Some(x) => Dynamic::from(x.clone()),
106355            }
106356        }
106357        #[rhai_fn(global, name = "to_string", pure)]
106358        pub fn to_string(my_enum: &mut Option<DirectMessagesTopic>) -> String {
106359            format!("{my_enum:?}")
106360        }
106361        #[rhai_fn(global, name = "to_debug", pure)]
106362        pub fn to_debug(my_enum: &mut Option<DirectMessagesTopic>) -> String {
106363            format!("{:?}", my_enum)
106364        }
106365    }
106366    #[export_module]
106367    #[warn(non_snake_case)]
106368    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106369    mod RevenueWithdrawalStateSucceededModule {
106370        #[doc = r" `Option::None` with no inner data"]
106371        pub const None: Option<RevenueWithdrawalStateSucceeded> = Option::None;
106372        #[doc = r" `Option::Some`"]
106373        pub fn Some(
106374            value: RevenueWithdrawalStateSucceeded,
106375        ) -> Option<RevenueWithdrawalStateSucceeded> {
106376            Option::Some(value)
106377        }
106378        #[doc = r" Return the current variant of `MyEnum`."]
106379        #[rhai_fn(global, get = "enum_type", pure)]
106380        pub fn get_type(my_enum: &mut Option<RevenueWithdrawalStateSucceeded>) -> String {
106381            match my_enum {
106382                Option::None => "None".to_string(),
106383                Option::Some(_) => "Some".to_string(),
106384            }
106385        }
106386        #[doc = r" Return the inner value."]
106387        #[rhai_fn(global, get = "value", pure)]
106388        pub fn get_value(my_enum: &mut Option<RevenueWithdrawalStateSucceeded>) -> Dynamic {
106389            match my_enum {
106390                Option::None => Dynamic::UNIT,
106391                Option::Some(x) => Dynamic::from(x.clone()),
106392            }
106393        }
106394        #[rhai_fn(global, name = "to_string", pure)]
106395        pub fn to_string(my_enum: &mut Option<RevenueWithdrawalStateSucceeded>) -> String {
106396            format!("{my_enum:?}")
106397        }
106398        #[rhai_fn(global, name = "to_debug", pure)]
106399        pub fn to_debug(my_enum: &mut Option<RevenueWithdrawalStateSucceeded>) -> String {
106400            format!("{:?}", my_enum)
106401        }
106402    }
106403    #[export_module]
106404    #[warn(non_snake_case)]
106405    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106406    mod VideoChatEndedModule {
106407        #[doc = r" `Option::None` with no inner data"]
106408        pub const None: Option<VideoChatEnded> = Option::None;
106409        #[doc = r" `Option::Some`"]
106410        pub fn Some(value: VideoChatEnded) -> Option<VideoChatEnded> {
106411            Option::Some(value)
106412        }
106413        #[doc = r" Return the current variant of `MyEnum`."]
106414        #[rhai_fn(global, get = "enum_type", pure)]
106415        pub fn get_type(my_enum: &mut Option<VideoChatEnded>) -> String {
106416            match my_enum {
106417                Option::None => "None".to_string(),
106418                Option::Some(_) => "Some".to_string(),
106419            }
106420        }
106421        #[doc = r" Return the inner value."]
106422        #[rhai_fn(global, get = "value", pure)]
106423        pub fn get_value(my_enum: &mut Option<VideoChatEnded>) -> Dynamic {
106424            match my_enum {
106425                Option::None => Dynamic::UNIT,
106426                Option::Some(x) => Dynamic::from(x.clone()),
106427            }
106428        }
106429        #[rhai_fn(global, name = "to_string", pure)]
106430        pub fn to_string(my_enum: &mut Option<VideoChatEnded>) -> String {
106431            format!("{my_enum:?}")
106432        }
106433        #[rhai_fn(global, name = "to_debug", pure)]
106434        pub fn to_debug(my_enum: &mut Option<VideoChatEnded>) -> String {
106435            format!("{:?}", my_enum)
106436        }
106437    }
106438    #[export_module]
106439    #[warn(non_snake_case)]
106440    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106441    mod ChatMemberOwnerModule {
106442        #[doc = r" `Option::None` with no inner data"]
106443        pub const None: Option<ChatMemberOwner> = Option::None;
106444        #[doc = r" `Option::Some`"]
106445        pub fn Some(value: ChatMemberOwner) -> Option<ChatMemberOwner> {
106446            Option::Some(value)
106447        }
106448        #[doc = r" Return the current variant of `MyEnum`."]
106449        #[rhai_fn(global, get = "enum_type", pure)]
106450        pub fn get_type(my_enum: &mut Option<ChatMemberOwner>) -> String {
106451            match my_enum {
106452                Option::None => "None".to_string(),
106453                Option::Some(_) => "Some".to_string(),
106454            }
106455        }
106456        #[doc = r" Return the inner value."]
106457        #[rhai_fn(global, get = "value", pure)]
106458        pub fn get_value(my_enum: &mut Option<ChatMemberOwner>) -> Dynamic {
106459            match my_enum {
106460                Option::None => Dynamic::UNIT,
106461                Option::Some(x) => Dynamic::from(x.clone()),
106462            }
106463        }
106464        #[rhai_fn(global, name = "to_string", pure)]
106465        pub fn to_string(my_enum: &mut Option<ChatMemberOwner>) -> String {
106466            format!("{my_enum:?}")
106467        }
106468        #[rhai_fn(global, name = "to_debug", pure)]
106469        pub fn to_debug(my_enum: &mut Option<ChatMemberOwner>) -> String {
106470            format!("{:?}", my_enum)
106471        }
106472    }
106473    #[export_module]
106474    #[warn(non_snake_case)]
106475    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106476    mod PreCheckoutQueryModule {
106477        #[doc = r" `Option::None` with no inner data"]
106478        pub const None: Option<PreCheckoutQuery> = Option::None;
106479        #[doc = r" `Option::Some`"]
106480        pub fn Some(value: PreCheckoutQuery) -> Option<PreCheckoutQuery> {
106481            Option::Some(value)
106482        }
106483        #[doc = r" Return the current variant of `MyEnum`."]
106484        #[rhai_fn(global, get = "enum_type", pure)]
106485        pub fn get_type(my_enum: &mut Option<PreCheckoutQuery>) -> String {
106486            match my_enum {
106487                Option::None => "None".to_string(),
106488                Option::Some(_) => "Some".to_string(),
106489            }
106490        }
106491        #[doc = r" Return the inner value."]
106492        #[rhai_fn(global, get = "value", pure)]
106493        pub fn get_value(my_enum: &mut Option<PreCheckoutQuery>) -> Dynamic {
106494            match my_enum {
106495                Option::None => Dynamic::UNIT,
106496                Option::Some(x) => Dynamic::from(x.clone()),
106497            }
106498        }
106499        #[rhai_fn(global, name = "to_string", pure)]
106500        pub fn to_string(my_enum: &mut Option<PreCheckoutQuery>) -> String {
106501            format!("{my_enum:?}")
106502        }
106503        #[rhai_fn(global, name = "to_debug", pure)]
106504        pub fn to_debug(my_enum: &mut Option<PreCheckoutQuery>) -> String {
106505            format!("{:?}", my_enum)
106506        }
106507    }
106508    #[export_module]
106509    #[warn(non_snake_case)]
106510    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106511    mod BackgroundTypeModule {
106512        #[doc = r" `Option::None` with no inner data"]
106513        pub const None: Option<BackgroundType> = Option::None;
106514        #[doc = r" `Option::Some`"]
106515        pub fn Some(value: BackgroundType) -> Option<BackgroundType> {
106516            Option::Some(value)
106517        }
106518        #[doc = r" Return the current variant of `MyEnum`."]
106519        #[rhai_fn(global, get = "enum_type", pure)]
106520        pub fn get_type(my_enum: &mut Option<BackgroundType>) -> String {
106521            match my_enum {
106522                Option::None => "None".to_string(),
106523                Option::Some(_) => "Some".to_string(),
106524            }
106525        }
106526        #[doc = r" Return the inner value."]
106527        #[rhai_fn(global, get = "value", pure)]
106528        pub fn get_value(my_enum: &mut Option<BackgroundType>) -> Dynamic {
106529            match my_enum {
106530                Option::None => Dynamic::UNIT,
106531                Option::Some(x) => Dynamic::from(x.clone()),
106532            }
106533        }
106534        #[rhai_fn(global, name = "to_string", pure)]
106535        pub fn to_string(my_enum: &mut Option<BackgroundType>) -> String {
106536            format!("{my_enum:?}")
106537        }
106538        #[rhai_fn(global, name = "to_debug", pure)]
106539        pub fn to_debug(my_enum: &mut Option<BackgroundType>) -> String {
106540            format!("{:?}", my_enum)
106541        }
106542    }
106543    #[export_module]
106544    #[warn(non_snake_case)]
106545    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106546    mod InlineQueryResultVenueModule {
106547        #[doc = r" `Option::None` with no inner data"]
106548        pub const None: Option<InlineQueryResultVenue> = Option::None;
106549        #[doc = r" `Option::Some`"]
106550        pub fn Some(value: InlineQueryResultVenue) -> Option<InlineQueryResultVenue> {
106551            Option::Some(value)
106552        }
106553        #[doc = r" Return the current variant of `MyEnum`."]
106554        #[rhai_fn(global, get = "enum_type", pure)]
106555        pub fn get_type(my_enum: &mut Option<InlineQueryResultVenue>) -> String {
106556            match my_enum {
106557                Option::None => "None".to_string(),
106558                Option::Some(_) => "Some".to_string(),
106559            }
106560        }
106561        #[doc = r" Return the inner value."]
106562        #[rhai_fn(global, get = "value", pure)]
106563        pub fn get_value(my_enum: &mut Option<InlineQueryResultVenue>) -> Dynamic {
106564            match my_enum {
106565                Option::None => Dynamic::UNIT,
106566                Option::Some(x) => Dynamic::from(x.clone()),
106567            }
106568        }
106569        #[rhai_fn(global, name = "to_string", pure)]
106570        pub fn to_string(my_enum: &mut Option<InlineQueryResultVenue>) -> String {
106571            format!("{my_enum:?}")
106572        }
106573        #[rhai_fn(global, name = "to_debug", pure)]
106574        pub fn to_debug(my_enum: &mut Option<InlineQueryResultVenue>) -> String {
106575            format!("{:?}", my_enum)
106576        }
106577    }
106578    #[export_module]
106579    #[warn(non_snake_case)]
106580    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106581    mod PaidMediaInfoModule {
106582        #[doc = r" `Option::None` with no inner data"]
106583        pub const None: Option<PaidMediaInfo> = Option::None;
106584        #[doc = r" `Option::Some`"]
106585        pub fn Some(value: PaidMediaInfo) -> Option<PaidMediaInfo> {
106586            Option::Some(value)
106587        }
106588        #[doc = r" Return the current variant of `MyEnum`."]
106589        #[rhai_fn(global, get = "enum_type", pure)]
106590        pub fn get_type(my_enum: &mut Option<PaidMediaInfo>) -> String {
106591            match my_enum {
106592                Option::None => "None".to_string(),
106593                Option::Some(_) => "Some".to_string(),
106594            }
106595        }
106596        #[doc = r" Return the inner value."]
106597        #[rhai_fn(global, get = "value", pure)]
106598        pub fn get_value(my_enum: &mut Option<PaidMediaInfo>) -> Dynamic {
106599            match my_enum {
106600                Option::None => Dynamic::UNIT,
106601                Option::Some(x) => Dynamic::from(x.clone()),
106602            }
106603        }
106604        #[rhai_fn(global, name = "to_string", pure)]
106605        pub fn to_string(my_enum: &mut Option<PaidMediaInfo>) -> String {
106606            format!("{my_enum:?}")
106607        }
106608        #[rhai_fn(global, name = "to_debug", pure)]
106609        pub fn to_debug(my_enum: &mut Option<PaidMediaInfo>) -> String {
106610            format!("{:?}", my_enum)
106611        }
106612    }
106613    #[export_module]
106614    #[warn(non_snake_case)]
106615    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106616    mod InlineQueryResultCachedPhotoModule {
106617        #[doc = r" `Option::None` with no inner data"]
106618        pub const None: Option<InlineQueryResultCachedPhoto> = Option::None;
106619        #[doc = r" `Option::Some`"]
106620        pub fn Some(value: InlineQueryResultCachedPhoto) -> Option<InlineQueryResultCachedPhoto> {
106621            Option::Some(value)
106622        }
106623        #[doc = r" Return the current variant of `MyEnum`."]
106624        #[rhai_fn(global, get = "enum_type", pure)]
106625        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedPhoto>) -> String {
106626            match my_enum {
106627                Option::None => "None".to_string(),
106628                Option::Some(_) => "Some".to_string(),
106629            }
106630        }
106631        #[doc = r" Return the inner value."]
106632        #[rhai_fn(global, get = "value", pure)]
106633        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedPhoto>) -> Dynamic {
106634            match my_enum {
106635                Option::None => Dynamic::UNIT,
106636                Option::Some(x) => Dynamic::from(x.clone()),
106637            }
106638        }
106639        #[rhai_fn(global, name = "to_string", pure)]
106640        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedPhoto>) -> String {
106641            format!("{my_enum:?}")
106642        }
106643        #[rhai_fn(global, name = "to_debug", pure)]
106644        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedPhoto>) -> String {
106645            format!("{:?}", my_enum)
106646        }
106647    }
106648    #[export_module]
106649    #[warn(non_snake_case)]
106650    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106651    mod GeneralForumTopicUnhiddenModule {
106652        #[doc = r" `Option::None` with no inner data"]
106653        pub const None: Option<GeneralForumTopicUnhidden> = Option::None;
106654        #[doc = r" `Option::Some`"]
106655        pub fn Some(value: GeneralForumTopicUnhidden) -> Option<GeneralForumTopicUnhidden> {
106656            Option::Some(value)
106657        }
106658        #[doc = r" Return the current variant of `MyEnum`."]
106659        #[rhai_fn(global, get = "enum_type", pure)]
106660        pub fn get_type(my_enum: &mut Option<GeneralForumTopicUnhidden>) -> String {
106661            match my_enum {
106662                Option::None => "None".to_string(),
106663                Option::Some(_) => "Some".to_string(),
106664            }
106665        }
106666        #[doc = r" Return the inner value."]
106667        #[rhai_fn(global, get = "value", pure)]
106668        pub fn get_value(my_enum: &mut Option<GeneralForumTopicUnhidden>) -> Dynamic {
106669            match my_enum {
106670                Option::None => Dynamic::UNIT,
106671                Option::Some(x) => Dynamic::from(x.clone()),
106672            }
106673        }
106674        #[rhai_fn(global, name = "to_string", pure)]
106675        pub fn to_string(my_enum: &mut Option<GeneralForumTopicUnhidden>) -> String {
106676            format!("{my_enum:?}")
106677        }
106678        #[rhai_fn(global, name = "to_debug", pure)]
106679        pub fn to_debug(my_enum: &mut Option<GeneralForumTopicUnhidden>) -> String {
106680            format!("{:?}", my_enum)
106681        }
106682    }
106683    #[export_module]
106684    #[warn(non_snake_case)]
106685    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106686    mod GiveawayWinnersModule {
106687        #[doc = r" `Option::None` with no inner data"]
106688        pub const None: Option<GiveawayWinners> = Option::None;
106689        #[doc = r" `Option::Some`"]
106690        pub fn Some(value: GiveawayWinners) -> Option<GiveawayWinners> {
106691            Option::Some(value)
106692        }
106693        #[doc = r" Return the current variant of `MyEnum`."]
106694        #[rhai_fn(global, get = "enum_type", pure)]
106695        pub fn get_type(my_enum: &mut Option<GiveawayWinners>) -> String {
106696            match my_enum {
106697                Option::None => "None".to_string(),
106698                Option::Some(_) => "Some".to_string(),
106699            }
106700        }
106701        #[doc = r" Return the inner value."]
106702        #[rhai_fn(global, get = "value", pure)]
106703        pub fn get_value(my_enum: &mut Option<GiveawayWinners>) -> Dynamic {
106704            match my_enum {
106705                Option::None => Dynamic::UNIT,
106706                Option::Some(x) => Dynamic::from(x.clone()),
106707            }
106708        }
106709        #[rhai_fn(global, name = "to_string", pure)]
106710        pub fn to_string(my_enum: &mut Option<GiveawayWinners>) -> String {
106711            format!("{my_enum:?}")
106712        }
106713        #[rhai_fn(global, name = "to_debug", pure)]
106714        pub fn to_debug(my_enum: &mut Option<GiveawayWinners>) -> String {
106715            format!("{:?}", my_enum)
106716        }
106717    }
106718    #[export_module]
106719    #[warn(non_snake_case)]
106720    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106721    mod MessageOriginHiddenUserModule {
106722        #[doc = r" `Option::None` with no inner data"]
106723        pub const None: Option<MessageOriginHiddenUser> = Option::None;
106724        #[doc = r" `Option::Some`"]
106725        pub fn Some(value: MessageOriginHiddenUser) -> Option<MessageOriginHiddenUser> {
106726            Option::Some(value)
106727        }
106728        #[doc = r" Return the current variant of `MyEnum`."]
106729        #[rhai_fn(global, get = "enum_type", pure)]
106730        pub fn get_type(my_enum: &mut Option<MessageOriginHiddenUser>) -> String {
106731            match my_enum {
106732                Option::None => "None".to_string(),
106733                Option::Some(_) => "Some".to_string(),
106734            }
106735        }
106736        #[doc = r" Return the inner value."]
106737        #[rhai_fn(global, get = "value", pure)]
106738        pub fn get_value(my_enum: &mut Option<MessageOriginHiddenUser>) -> Dynamic {
106739            match my_enum {
106740                Option::None => Dynamic::UNIT,
106741                Option::Some(x) => Dynamic::from(x.clone()),
106742            }
106743        }
106744        #[rhai_fn(global, name = "to_string", pure)]
106745        pub fn to_string(my_enum: &mut Option<MessageOriginHiddenUser>) -> String {
106746            format!("{my_enum:?}")
106747        }
106748        #[rhai_fn(global, name = "to_debug", pure)]
106749        pub fn to_debug(my_enum: &mut Option<MessageOriginHiddenUser>) -> String {
106750            format!("{:?}", my_enum)
106751        }
106752    }
106753    #[export_module]
106754    #[warn(non_snake_case)]
106755    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106756    mod StoryAreaTypeLocationModule {
106757        #[doc = r" `Option::None` with no inner data"]
106758        pub const None: Option<StoryAreaTypeLocation> = Option::None;
106759        #[doc = r" `Option::Some`"]
106760        pub fn Some(value: StoryAreaTypeLocation) -> Option<StoryAreaTypeLocation> {
106761            Option::Some(value)
106762        }
106763        #[doc = r" Return the current variant of `MyEnum`."]
106764        #[rhai_fn(global, get = "enum_type", pure)]
106765        pub fn get_type(my_enum: &mut Option<StoryAreaTypeLocation>) -> String {
106766            match my_enum {
106767                Option::None => "None".to_string(),
106768                Option::Some(_) => "Some".to_string(),
106769            }
106770        }
106771        #[doc = r" Return the inner value."]
106772        #[rhai_fn(global, get = "value", pure)]
106773        pub fn get_value(my_enum: &mut Option<StoryAreaTypeLocation>) -> Dynamic {
106774            match my_enum {
106775                Option::None => Dynamic::UNIT,
106776                Option::Some(x) => Dynamic::from(x.clone()),
106777            }
106778        }
106779        #[rhai_fn(global, name = "to_string", pure)]
106780        pub fn to_string(my_enum: &mut Option<StoryAreaTypeLocation>) -> String {
106781            format!("{my_enum:?}")
106782        }
106783        #[rhai_fn(global, name = "to_debug", pure)]
106784        pub fn to_debug(my_enum: &mut Option<StoryAreaTypeLocation>) -> String {
106785            format!("{:?}", my_enum)
106786        }
106787    }
106788    #[export_module]
106789    #[warn(non_snake_case)]
106790    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106791    mod SuggestedPostParametersModule {
106792        #[doc = r" `Option::None` with no inner data"]
106793        pub const None: Option<SuggestedPostParameters> = Option::None;
106794        #[doc = r" `Option::Some`"]
106795        pub fn Some(value: SuggestedPostParameters) -> Option<SuggestedPostParameters> {
106796            Option::Some(value)
106797        }
106798        #[doc = r" Return the current variant of `MyEnum`."]
106799        #[rhai_fn(global, get = "enum_type", pure)]
106800        pub fn get_type(my_enum: &mut Option<SuggestedPostParameters>) -> String {
106801            match my_enum {
106802                Option::None => "None".to_string(),
106803                Option::Some(_) => "Some".to_string(),
106804            }
106805        }
106806        #[doc = r" Return the inner value."]
106807        #[rhai_fn(global, get = "value", pure)]
106808        pub fn get_value(my_enum: &mut Option<SuggestedPostParameters>) -> Dynamic {
106809            match my_enum {
106810                Option::None => Dynamic::UNIT,
106811                Option::Some(x) => Dynamic::from(x.clone()),
106812            }
106813        }
106814        #[rhai_fn(global, name = "to_string", pure)]
106815        pub fn to_string(my_enum: &mut Option<SuggestedPostParameters>) -> String {
106816            format!("{my_enum:?}")
106817        }
106818        #[rhai_fn(global, name = "to_debug", pure)]
106819        pub fn to_debug(my_enum: &mut Option<SuggestedPostParameters>) -> String {
106820            format!("{:?}", my_enum)
106821        }
106822    }
106823    #[export_module]
106824    #[warn(non_snake_case)]
106825    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106826    mod StickerSetModule {
106827        #[doc = r" `Option::None` with no inner data"]
106828        pub const None: Option<StickerSet> = Option::None;
106829        #[doc = r" `Option::Some`"]
106830        pub fn Some(value: StickerSet) -> Option<StickerSet> {
106831            Option::Some(value)
106832        }
106833        #[doc = r" Return the current variant of `MyEnum`."]
106834        #[rhai_fn(global, get = "enum_type", pure)]
106835        pub fn get_type(my_enum: &mut Option<StickerSet>) -> String {
106836            match my_enum {
106837                Option::None => "None".to_string(),
106838                Option::Some(_) => "Some".to_string(),
106839            }
106840        }
106841        #[doc = r" Return the inner value."]
106842        #[rhai_fn(global, get = "value", pure)]
106843        pub fn get_value(my_enum: &mut Option<StickerSet>) -> Dynamic {
106844            match my_enum {
106845                Option::None => Dynamic::UNIT,
106846                Option::Some(x) => Dynamic::from(x.clone()),
106847            }
106848        }
106849        #[rhai_fn(global, name = "to_string", pure)]
106850        pub fn to_string(my_enum: &mut Option<StickerSet>) -> String {
106851            format!("{my_enum:?}")
106852        }
106853        #[rhai_fn(global, name = "to_debug", pure)]
106854        pub fn to_debug(my_enum: &mut Option<StickerSet>) -> String {
106855            format!("{:?}", my_enum)
106856        }
106857    }
106858    #[export_module]
106859    #[warn(non_snake_case)]
106860    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106861    mod PollModule {
106862        #[doc = r" `Option::None` with no inner data"]
106863        pub const None: Option<Poll> = Option::None;
106864        #[doc = r" `Option::Some`"]
106865        pub fn Some(value: Poll) -> Option<Poll> {
106866            Option::Some(value)
106867        }
106868        #[doc = r" Return the current variant of `MyEnum`."]
106869        #[rhai_fn(global, get = "enum_type", pure)]
106870        pub fn get_type(my_enum: &mut Option<Poll>) -> String {
106871            match my_enum {
106872                Option::None => "None".to_string(),
106873                Option::Some(_) => "Some".to_string(),
106874            }
106875        }
106876        #[doc = r" Return the inner value."]
106877        #[rhai_fn(global, get = "value", pure)]
106878        pub fn get_value(my_enum: &mut Option<Poll>) -> Dynamic {
106879            match my_enum {
106880                Option::None => Dynamic::UNIT,
106881                Option::Some(x) => Dynamic::from(x.clone()),
106882            }
106883        }
106884        #[rhai_fn(global, name = "to_string", pure)]
106885        pub fn to_string(my_enum: &mut Option<Poll>) -> String {
106886            format!("{my_enum:?}")
106887        }
106888        #[rhai_fn(global, name = "to_debug", pure)]
106889        pub fn to_debug(my_enum: &mut Option<Poll>) -> String {
106890            format!("{:?}", my_enum)
106891        }
106892    }
106893    #[export_module]
106894    #[warn(non_snake_case)]
106895    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106896    mod VideoModule {
106897        #[doc = r" `Option::None` with no inner data"]
106898        pub const None: Option<Video> = Option::None;
106899        #[doc = r" `Option::Some`"]
106900        pub fn Some(value: Video) -> Option<Video> {
106901            Option::Some(value)
106902        }
106903        #[doc = r" Return the current variant of `MyEnum`."]
106904        #[rhai_fn(global, get = "enum_type", pure)]
106905        pub fn get_type(my_enum: &mut Option<Video>) -> String {
106906            match my_enum {
106907                Option::None => "None".to_string(),
106908                Option::Some(_) => "Some".to_string(),
106909            }
106910        }
106911        #[doc = r" Return the inner value."]
106912        #[rhai_fn(global, get = "value", pure)]
106913        pub fn get_value(my_enum: &mut Option<Video>) -> Dynamic {
106914            match my_enum {
106915                Option::None => Dynamic::UNIT,
106916                Option::Some(x) => Dynamic::from(x.clone()),
106917            }
106918        }
106919        #[rhai_fn(global, name = "to_string", pure)]
106920        pub fn to_string(my_enum: &mut Option<Video>) -> String {
106921            format!("{my_enum:?}")
106922        }
106923        #[rhai_fn(global, name = "to_debug", pure)]
106924        pub fn to_debug(my_enum: &mut Option<Video>) -> String {
106925            format!("{:?}", my_enum)
106926        }
106927    }
106928    #[export_module]
106929    #[warn(non_snake_case)]
106930    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106931    mod GeneralForumTopicHiddenModule {
106932        #[doc = r" `Option::None` with no inner data"]
106933        pub const None: Option<GeneralForumTopicHidden> = Option::None;
106934        #[doc = r" `Option::Some`"]
106935        pub fn Some(value: GeneralForumTopicHidden) -> Option<GeneralForumTopicHidden> {
106936            Option::Some(value)
106937        }
106938        #[doc = r" Return the current variant of `MyEnum`."]
106939        #[rhai_fn(global, get = "enum_type", pure)]
106940        pub fn get_type(my_enum: &mut Option<GeneralForumTopicHidden>) -> String {
106941            match my_enum {
106942                Option::None => "None".to_string(),
106943                Option::Some(_) => "Some".to_string(),
106944            }
106945        }
106946        #[doc = r" Return the inner value."]
106947        #[rhai_fn(global, get = "value", pure)]
106948        pub fn get_value(my_enum: &mut Option<GeneralForumTopicHidden>) -> Dynamic {
106949            match my_enum {
106950                Option::None => Dynamic::UNIT,
106951                Option::Some(x) => Dynamic::from(x.clone()),
106952            }
106953        }
106954        #[rhai_fn(global, name = "to_string", pure)]
106955        pub fn to_string(my_enum: &mut Option<GeneralForumTopicHidden>) -> String {
106956            format!("{my_enum:?}")
106957        }
106958        #[rhai_fn(global, name = "to_debug", pure)]
106959        pub fn to_debug(my_enum: &mut Option<GeneralForumTopicHidden>) -> String {
106960            format!("{:?}", my_enum)
106961        }
106962    }
106963    #[export_module]
106964    #[warn(non_snake_case)]
106965    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
106966    mod ChatAdministratorRightsModule {
106967        #[doc = r" `Option::None` with no inner data"]
106968        pub const None: Option<ChatAdministratorRights> = Option::None;
106969        #[doc = r" `Option::Some`"]
106970        pub fn Some(value: ChatAdministratorRights) -> Option<ChatAdministratorRights> {
106971            Option::Some(value)
106972        }
106973        #[doc = r" Return the current variant of `MyEnum`."]
106974        #[rhai_fn(global, get = "enum_type", pure)]
106975        pub fn get_type(my_enum: &mut Option<ChatAdministratorRights>) -> String {
106976            match my_enum {
106977                Option::None => "None".to_string(),
106978                Option::Some(_) => "Some".to_string(),
106979            }
106980        }
106981        #[doc = r" Return the inner value."]
106982        #[rhai_fn(global, get = "value", pure)]
106983        pub fn get_value(my_enum: &mut Option<ChatAdministratorRights>) -> Dynamic {
106984            match my_enum {
106985                Option::None => Dynamic::UNIT,
106986                Option::Some(x) => Dynamic::from(x.clone()),
106987            }
106988        }
106989        #[rhai_fn(global, name = "to_string", pure)]
106990        pub fn to_string(my_enum: &mut Option<ChatAdministratorRights>) -> String {
106991            format!("{my_enum:?}")
106992        }
106993        #[rhai_fn(global, name = "to_debug", pure)]
106994        pub fn to_debug(my_enum: &mut Option<ChatAdministratorRights>) -> String {
106995            format!("{:?}", my_enum)
106996        }
106997    }
106998    #[export_module]
106999    #[warn(non_snake_case)]
107000    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107001    mod ResponseParametersModule {
107002        #[doc = r" `Option::None` with no inner data"]
107003        pub const None: Option<ResponseParameters> = Option::None;
107004        #[doc = r" `Option::Some`"]
107005        pub fn Some(value: ResponseParameters) -> Option<ResponseParameters> {
107006            Option::Some(value)
107007        }
107008        #[doc = r" Return the current variant of `MyEnum`."]
107009        #[rhai_fn(global, get = "enum_type", pure)]
107010        pub fn get_type(my_enum: &mut Option<ResponseParameters>) -> String {
107011            match my_enum {
107012                Option::None => "None".to_string(),
107013                Option::Some(_) => "Some".to_string(),
107014            }
107015        }
107016        #[doc = r" Return the inner value."]
107017        #[rhai_fn(global, get = "value", pure)]
107018        pub fn get_value(my_enum: &mut Option<ResponseParameters>) -> Dynamic {
107019            match my_enum {
107020                Option::None => Dynamic::UNIT,
107021                Option::Some(x) => Dynamic::from(x.clone()),
107022            }
107023        }
107024        #[rhai_fn(global, name = "to_string", pure)]
107025        pub fn to_string(my_enum: &mut Option<ResponseParameters>) -> String {
107026            format!("{my_enum:?}")
107027        }
107028        #[rhai_fn(global, name = "to_debug", pure)]
107029        pub fn to_debug(my_enum: &mut Option<ResponseParameters>) -> String {
107030            format!("{:?}", my_enum)
107031        }
107032    }
107033    #[export_module]
107034    #[warn(non_snake_case)]
107035    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107036    mod VideoNoteModule {
107037        #[doc = r" `Option::None` with no inner data"]
107038        pub const None: Option<VideoNote> = Option::None;
107039        #[doc = r" `Option::Some`"]
107040        pub fn Some(value: VideoNote) -> Option<VideoNote> {
107041            Option::Some(value)
107042        }
107043        #[doc = r" Return the current variant of `MyEnum`."]
107044        #[rhai_fn(global, get = "enum_type", pure)]
107045        pub fn get_type(my_enum: &mut Option<VideoNote>) -> String {
107046            match my_enum {
107047                Option::None => "None".to_string(),
107048                Option::Some(_) => "Some".to_string(),
107049            }
107050        }
107051        #[doc = r" Return the inner value."]
107052        #[rhai_fn(global, get = "value", pure)]
107053        pub fn get_value(my_enum: &mut Option<VideoNote>) -> Dynamic {
107054            match my_enum {
107055                Option::None => Dynamic::UNIT,
107056                Option::Some(x) => Dynamic::from(x.clone()),
107057            }
107058        }
107059        #[rhai_fn(global, name = "to_string", pure)]
107060        pub fn to_string(my_enum: &mut Option<VideoNote>) -> String {
107061            format!("{my_enum:?}")
107062        }
107063        #[rhai_fn(global, name = "to_debug", pure)]
107064        pub fn to_debug(my_enum: &mut Option<VideoNote>) -> String {
107065            format!("{:?}", my_enum)
107066        }
107067    }
107068    #[export_module]
107069    #[warn(non_snake_case)]
107070    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107071    mod ReplyKeyboardRemoveModule {
107072        #[doc = r" `Option::None` with no inner data"]
107073        pub const None: Option<ReplyKeyboardRemove> = Option::None;
107074        #[doc = r" `Option::Some`"]
107075        pub fn Some(value: ReplyKeyboardRemove) -> Option<ReplyKeyboardRemove> {
107076            Option::Some(value)
107077        }
107078        #[doc = r" Return the current variant of `MyEnum`."]
107079        #[rhai_fn(global, get = "enum_type", pure)]
107080        pub fn get_type(my_enum: &mut Option<ReplyKeyboardRemove>) -> String {
107081            match my_enum {
107082                Option::None => "None".to_string(),
107083                Option::Some(_) => "Some".to_string(),
107084            }
107085        }
107086        #[doc = r" Return the inner value."]
107087        #[rhai_fn(global, get = "value", pure)]
107088        pub fn get_value(my_enum: &mut Option<ReplyKeyboardRemove>) -> Dynamic {
107089            match my_enum {
107090                Option::None => Dynamic::UNIT,
107091                Option::Some(x) => Dynamic::from(x.clone()),
107092            }
107093        }
107094        #[rhai_fn(global, name = "to_string", pure)]
107095        pub fn to_string(my_enum: &mut Option<ReplyKeyboardRemove>) -> String {
107096            format!("{my_enum:?}")
107097        }
107098        #[rhai_fn(global, name = "to_debug", pure)]
107099        pub fn to_debug(my_enum: &mut Option<ReplyKeyboardRemove>) -> String {
107100            format!("{:?}", my_enum)
107101        }
107102    }
107103    #[export_module]
107104    #[warn(non_snake_case)]
107105    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107106    mod LabeledPriceModule {
107107        #[doc = r" `Option::None` with no inner data"]
107108        pub const None: Option<LabeledPrice> = Option::None;
107109        #[doc = r" `Option::Some`"]
107110        pub fn Some(value: LabeledPrice) -> Option<LabeledPrice> {
107111            Option::Some(value)
107112        }
107113        #[doc = r" Return the current variant of `MyEnum`."]
107114        #[rhai_fn(global, get = "enum_type", pure)]
107115        pub fn get_type(my_enum: &mut Option<LabeledPrice>) -> String {
107116            match my_enum {
107117                Option::None => "None".to_string(),
107118                Option::Some(_) => "Some".to_string(),
107119            }
107120        }
107121        #[doc = r" Return the inner value."]
107122        #[rhai_fn(global, get = "value", pure)]
107123        pub fn get_value(my_enum: &mut Option<LabeledPrice>) -> Dynamic {
107124            match my_enum {
107125                Option::None => Dynamic::UNIT,
107126                Option::Some(x) => Dynamic::from(x.clone()),
107127            }
107128        }
107129        #[rhai_fn(global, name = "to_string", pure)]
107130        pub fn to_string(my_enum: &mut Option<LabeledPrice>) -> String {
107131            format!("{my_enum:?}")
107132        }
107133        #[rhai_fn(global, name = "to_debug", pure)]
107134        pub fn to_debug(my_enum: &mut Option<LabeledPrice>) -> String {
107135            format!("{:?}", my_enum)
107136        }
107137    }
107138    #[export_module]
107139    #[warn(non_snake_case)]
107140    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107141    mod InputPollOptionModule {
107142        #[doc = r" `Option::None` with no inner data"]
107143        pub const None: Option<InputPollOption> = Option::None;
107144        #[doc = r" `Option::Some`"]
107145        pub fn Some(value: InputPollOption) -> Option<InputPollOption> {
107146            Option::Some(value)
107147        }
107148        #[doc = r" Return the current variant of `MyEnum`."]
107149        #[rhai_fn(global, get = "enum_type", pure)]
107150        pub fn get_type(my_enum: &mut Option<InputPollOption>) -> String {
107151            match my_enum {
107152                Option::None => "None".to_string(),
107153                Option::Some(_) => "Some".to_string(),
107154            }
107155        }
107156        #[doc = r" Return the inner value."]
107157        #[rhai_fn(global, get = "value", pure)]
107158        pub fn get_value(my_enum: &mut Option<InputPollOption>) -> Dynamic {
107159            match my_enum {
107160                Option::None => Dynamic::UNIT,
107161                Option::Some(x) => Dynamic::from(x.clone()),
107162            }
107163        }
107164        #[rhai_fn(global, name = "to_string", pure)]
107165        pub fn to_string(my_enum: &mut Option<InputPollOption>) -> String {
107166            format!("{my_enum:?}")
107167        }
107168        #[rhai_fn(global, name = "to_debug", pure)]
107169        pub fn to_debug(my_enum: &mut Option<InputPollOption>) -> String {
107170            format!("{:?}", my_enum)
107171        }
107172    }
107173    #[export_module]
107174    #[warn(non_snake_case)]
107175    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107176    mod ChatBoostSourcePremiumModule {
107177        #[doc = r" `Option::None` with no inner data"]
107178        pub const None: Option<ChatBoostSourcePremium> = Option::None;
107179        #[doc = r" `Option::Some`"]
107180        pub fn Some(value: ChatBoostSourcePremium) -> Option<ChatBoostSourcePremium> {
107181            Option::Some(value)
107182        }
107183        #[doc = r" Return the current variant of `MyEnum`."]
107184        #[rhai_fn(global, get = "enum_type", pure)]
107185        pub fn get_type(my_enum: &mut Option<ChatBoostSourcePremium>) -> String {
107186            match my_enum {
107187                Option::None => "None".to_string(),
107188                Option::Some(_) => "Some".to_string(),
107189            }
107190        }
107191        #[doc = r" Return the inner value."]
107192        #[rhai_fn(global, get = "value", pure)]
107193        pub fn get_value(my_enum: &mut Option<ChatBoostSourcePremium>) -> Dynamic {
107194            match my_enum {
107195                Option::None => Dynamic::UNIT,
107196                Option::Some(x) => Dynamic::from(x.clone()),
107197            }
107198        }
107199        #[rhai_fn(global, name = "to_string", pure)]
107200        pub fn to_string(my_enum: &mut Option<ChatBoostSourcePremium>) -> String {
107201            format!("{my_enum:?}")
107202        }
107203        #[rhai_fn(global, name = "to_debug", pure)]
107204        pub fn to_debug(my_enum: &mut Option<ChatBoostSourcePremium>) -> String {
107205            format!("{:?}", my_enum)
107206        }
107207    }
107208    #[export_module]
107209    #[warn(non_snake_case)]
107210    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107211    mod InputMediaVideoModule {
107212        #[doc = r" `Option::None` with no inner data"]
107213        pub const None: Option<InputMediaVideo> = Option::None;
107214        #[doc = r" `Option::Some`"]
107215        pub fn Some(value: InputMediaVideo) -> Option<InputMediaVideo> {
107216            Option::Some(value)
107217        }
107218        #[doc = r" Return the current variant of `MyEnum`."]
107219        #[rhai_fn(global, get = "enum_type", pure)]
107220        pub fn get_type(my_enum: &mut Option<InputMediaVideo>) -> String {
107221            match my_enum {
107222                Option::None => "None".to_string(),
107223                Option::Some(_) => "Some".to_string(),
107224            }
107225        }
107226        #[doc = r" Return the inner value."]
107227        #[rhai_fn(global, get = "value", pure)]
107228        pub fn get_value(my_enum: &mut Option<InputMediaVideo>) -> Dynamic {
107229            match my_enum {
107230                Option::None => Dynamic::UNIT,
107231                Option::Some(x) => Dynamic::from(x.clone()),
107232            }
107233        }
107234        #[rhai_fn(global, name = "to_string", pure)]
107235        pub fn to_string(my_enum: &mut Option<InputMediaVideo>) -> String {
107236            format!("{my_enum:?}")
107237        }
107238        #[rhai_fn(global, name = "to_debug", pure)]
107239        pub fn to_debug(my_enum: &mut Option<InputMediaVideo>) -> String {
107240            format!("{:?}", my_enum)
107241        }
107242    }
107243    #[export_module]
107244    #[warn(non_snake_case)]
107245    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107246    mod InputMediaAudioModule {
107247        #[doc = r" `Option::None` with no inner data"]
107248        pub const None: Option<InputMediaAudio> = Option::None;
107249        #[doc = r" `Option::Some`"]
107250        pub fn Some(value: InputMediaAudio) -> Option<InputMediaAudio> {
107251            Option::Some(value)
107252        }
107253        #[doc = r" Return the current variant of `MyEnum`."]
107254        #[rhai_fn(global, get = "enum_type", pure)]
107255        pub fn get_type(my_enum: &mut Option<InputMediaAudio>) -> String {
107256            match my_enum {
107257                Option::None => "None".to_string(),
107258                Option::Some(_) => "Some".to_string(),
107259            }
107260        }
107261        #[doc = r" Return the inner value."]
107262        #[rhai_fn(global, get = "value", pure)]
107263        pub fn get_value(my_enum: &mut Option<InputMediaAudio>) -> Dynamic {
107264            match my_enum {
107265                Option::None => Dynamic::UNIT,
107266                Option::Some(x) => Dynamic::from(x.clone()),
107267            }
107268        }
107269        #[rhai_fn(global, name = "to_string", pure)]
107270        pub fn to_string(my_enum: &mut Option<InputMediaAudio>) -> String {
107271            format!("{my_enum:?}")
107272        }
107273        #[rhai_fn(global, name = "to_debug", pure)]
107274        pub fn to_debug(my_enum: &mut Option<InputMediaAudio>) -> String {
107275            format!("{:?}", my_enum)
107276        }
107277    }
107278    #[export_module]
107279    #[warn(non_snake_case)]
107280    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107281    mod ChatBoostSourceModule {
107282        #[doc = r" `Option::None` with no inner data"]
107283        pub const None: Option<ChatBoostSource> = Option::None;
107284        #[doc = r" `Option::Some`"]
107285        pub fn Some(value: ChatBoostSource) -> Option<ChatBoostSource> {
107286            Option::Some(value)
107287        }
107288        #[doc = r" Return the current variant of `MyEnum`."]
107289        #[rhai_fn(global, get = "enum_type", pure)]
107290        pub fn get_type(my_enum: &mut Option<ChatBoostSource>) -> String {
107291            match my_enum {
107292                Option::None => "None".to_string(),
107293                Option::Some(_) => "Some".to_string(),
107294            }
107295        }
107296        #[doc = r" Return the inner value."]
107297        #[rhai_fn(global, get = "value", pure)]
107298        pub fn get_value(my_enum: &mut Option<ChatBoostSource>) -> Dynamic {
107299            match my_enum {
107300                Option::None => Dynamic::UNIT,
107301                Option::Some(x) => Dynamic::from(x.clone()),
107302            }
107303        }
107304        #[rhai_fn(global, name = "to_string", pure)]
107305        pub fn to_string(my_enum: &mut Option<ChatBoostSource>) -> String {
107306            format!("{my_enum:?}")
107307        }
107308        #[rhai_fn(global, name = "to_debug", pure)]
107309        pub fn to_debug(my_enum: &mut Option<ChatBoostSource>) -> String {
107310            format!("{:?}", my_enum)
107311        }
107312    }
107313    #[export_module]
107314    #[warn(non_snake_case)]
107315    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107316    mod BotCommandScopeModule {
107317        #[doc = r" `Option::None` with no inner data"]
107318        pub const None: Option<BotCommandScope> = Option::None;
107319        #[doc = r" `Option::Some`"]
107320        pub fn Some(value: BotCommandScope) -> Option<BotCommandScope> {
107321            Option::Some(value)
107322        }
107323        #[doc = r" Return the current variant of `MyEnum`."]
107324        #[rhai_fn(global, get = "enum_type", pure)]
107325        pub fn get_type(my_enum: &mut Option<BotCommandScope>) -> String {
107326            match my_enum {
107327                Option::None => "None".to_string(),
107328                Option::Some(_) => "Some".to_string(),
107329            }
107330        }
107331        #[doc = r" Return the inner value."]
107332        #[rhai_fn(global, get = "value", pure)]
107333        pub fn get_value(my_enum: &mut Option<BotCommandScope>) -> Dynamic {
107334            match my_enum {
107335                Option::None => Dynamic::UNIT,
107336                Option::Some(x) => Dynamic::from(x.clone()),
107337            }
107338        }
107339        #[rhai_fn(global, name = "to_string", pure)]
107340        pub fn to_string(my_enum: &mut Option<BotCommandScope>) -> String {
107341            format!("{my_enum:?}")
107342        }
107343        #[rhai_fn(global, name = "to_debug", pure)]
107344        pub fn to_debug(my_enum: &mut Option<BotCommandScope>) -> String {
107345            format!("{:?}", my_enum)
107346        }
107347    }
107348    #[export_module]
107349    #[warn(non_snake_case)]
107350    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107351    mod OwnedGiftsModule {
107352        #[doc = r" `Option::None` with no inner data"]
107353        pub const None: Option<OwnedGifts> = Option::None;
107354        #[doc = r" `Option::Some`"]
107355        pub fn Some(value: OwnedGifts) -> Option<OwnedGifts> {
107356            Option::Some(value)
107357        }
107358        #[doc = r" Return the current variant of `MyEnum`."]
107359        #[rhai_fn(global, get = "enum_type", pure)]
107360        pub fn get_type(my_enum: &mut Option<OwnedGifts>) -> String {
107361            match my_enum {
107362                Option::None => "None".to_string(),
107363                Option::Some(_) => "Some".to_string(),
107364            }
107365        }
107366        #[doc = r" Return the inner value."]
107367        #[rhai_fn(global, get = "value", pure)]
107368        pub fn get_value(my_enum: &mut Option<OwnedGifts>) -> Dynamic {
107369            match my_enum {
107370                Option::None => Dynamic::UNIT,
107371                Option::Some(x) => Dynamic::from(x.clone()),
107372            }
107373        }
107374        #[rhai_fn(global, name = "to_string", pure)]
107375        pub fn to_string(my_enum: &mut Option<OwnedGifts>) -> String {
107376            format!("{my_enum:?}")
107377        }
107378        #[rhai_fn(global, name = "to_debug", pure)]
107379        pub fn to_debug(my_enum: &mut Option<OwnedGifts>) -> String {
107380            format!("{:?}", my_enum)
107381        }
107382    }
107383    #[export_module]
107384    #[warn(non_snake_case)]
107385    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107386    mod EncryptedPassportElementModule {
107387        #[doc = r" `Option::None` with no inner data"]
107388        pub const None: Option<EncryptedPassportElement> = Option::None;
107389        #[doc = r" `Option::Some`"]
107390        pub fn Some(value: EncryptedPassportElement) -> Option<EncryptedPassportElement> {
107391            Option::Some(value)
107392        }
107393        #[doc = r" Return the current variant of `MyEnum`."]
107394        #[rhai_fn(global, get = "enum_type", pure)]
107395        pub fn get_type(my_enum: &mut Option<EncryptedPassportElement>) -> String {
107396            match my_enum {
107397                Option::None => "None".to_string(),
107398                Option::Some(_) => "Some".to_string(),
107399            }
107400        }
107401        #[doc = r" Return the inner value."]
107402        #[rhai_fn(global, get = "value", pure)]
107403        pub fn get_value(my_enum: &mut Option<EncryptedPassportElement>) -> Dynamic {
107404            match my_enum {
107405                Option::None => Dynamic::UNIT,
107406                Option::Some(x) => Dynamic::from(x.clone()),
107407            }
107408        }
107409        #[rhai_fn(global, name = "to_string", pure)]
107410        pub fn to_string(my_enum: &mut Option<EncryptedPassportElement>) -> String {
107411            format!("{my_enum:?}")
107412        }
107413        #[rhai_fn(global, name = "to_debug", pure)]
107414        pub fn to_debug(my_enum: &mut Option<EncryptedPassportElement>) -> String {
107415            format!("{:?}", my_enum)
107416        }
107417    }
107418    #[export_module]
107419    #[warn(non_snake_case)]
107420    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107421    mod PaidMediaModule {
107422        #[doc = r" `Option::None` with no inner data"]
107423        pub const None: Option<PaidMedia> = Option::None;
107424        #[doc = r" `Option::Some`"]
107425        pub fn Some(value: PaidMedia) -> Option<PaidMedia> {
107426            Option::Some(value)
107427        }
107428        #[doc = r" Return the current variant of `MyEnum`."]
107429        #[rhai_fn(global, get = "enum_type", pure)]
107430        pub fn get_type(my_enum: &mut Option<PaidMedia>) -> String {
107431            match my_enum {
107432                Option::None => "None".to_string(),
107433                Option::Some(_) => "Some".to_string(),
107434            }
107435        }
107436        #[doc = r" Return the inner value."]
107437        #[rhai_fn(global, get = "value", pure)]
107438        pub fn get_value(my_enum: &mut Option<PaidMedia>) -> Dynamic {
107439            match my_enum {
107440                Option::None => Dynamic::UNIT,
107441                Option::Some(x) => Dynamic::from(x.clone()),
107442            }
107443        }
107444        #[rhai_fn(global, name = "to_string", pure)]
107445        pub fn to_string(my_enum: &mut Option<PaidMedia>) -> String {
107446            format!("{my_enum:?}")
107447        }
107448        #[rhai_fn(global, name = "to_debug", pure)]
107449        pub fn to_debug(my_enum: &mut Option<PaidMedia>) -> String {
107450            format!("{:?}", my_enum)
107451        }
107452    }
107453    #[export_module]
107454    #[warn(non_snake_case)]
107455    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107456    mod InvoiceModule {
107457        #[doc = r" `Option::None` with no inner data"]
107458        pub const None: Option<Invoice> = Option::None;
107459        #[doc = r" `Option::Some`"]
107460        pub fn Some(value: Invoice) -> Option<Invoice> {
107461            Option::Some(value)
107462        }
107463        #[doc = r" Return the current variant of `MyEnum`."]
107464        #[rhai_fn(global, get = "enum_type", pure)]
107465        pub fn get_type(my_enum: &mut Option<Invoice>) -> String {
107466            match my_enum {
107467                Option::None => "None".to_string(),
107468                Option::Some(_) => "Some".to_string(),
107469            }
107470        }
107471        #[doc = r" Return the inner value."]
107472        #[rhai_fn(global, get = "value", pure)]
107473        pub fn get_value(my_enum: &mut Option<Invoice>) -> Dynamic {
107474            match my_enum {
107475                Option::None => Dynamic::UNIT,
107476                Option::Some(x) => Dynamic::from(x.clone()),
107477            }
107478        }
107479        #[rhai_fn(global, name = "to_string", pure)]
107480        pub fn to_string(my_enum: &mut Option<Invoice>) -> String {
107481            format!("{my_enum:?}")
107482        }
107483        #[rhai_fn(global, name = "to_debug", pure)]
107484        pub fn to_debug(my_enum: &mut Option<Invoice>) -> String {
107485            format!("{:?}", my_enum)
107486        }
107487    }
107488    #[export_module]
107489    #[warn(non_snake_case)]
107490    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107491    mod OwnedGiftModule {
107492        #[doc = r" `Option::None` with no inner data"]
107493        pub const None: Option<OwnedGift> = Option::None;
107494        #[doc = r" `Option::Some`"]
107495        pub fn Some(value: OwnedGift) -> Option<OwnedGift> {
107496            Option::Some(value)
107497        }
107498        #[doc = r" Return the current variant of `MyEnum`."]
107499        #[rhai_fn(global, get = "enum_type", pure)]
107500        pub fn get_type(my_enum: &mut Option<OwnedGift>) -> String {
107501            match my_enum {
107502                Option::None => "None".to_string(),
107503                Option::Some(_) => "Some".to_string(),
107504            }
107505        }
107506        #[doc = r" Return the inner value."]
107507        #[rhai_fn(global, get = "value", pure)]
107508        pub fn get_value(my_enum: &mut Option<OwnedGift>) -> Dynamic {
107509            match my_enum {
107510                Option::None => Dynamic::UNIT,
107511                Option::Some(x) => Dynamic::from(x.clone()),
107512            }
107513        }
107514        #[rhai_fn(global, name = "to_string", pure)]
107515        pub fn to_string(my_enum: &mut Option<OwnedGift>) -> String {
107516            format!("{my_enum:?}")
107517        }
107518        #[rhai_fn(global, name = "to_debug", pure)]
107519        pub fn to_debug(my_enum: &mut Option<OwnedGift>) -> String {
107520            format!("{:?}", my_enum)
107521        }
107522    }
107523    #[export_module]
107524    #[warn(non_snake_case)]
107525    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107526    mod BotShortDescriptionModule {
107527        #[doc = r" `Option::None` with no inner data"]
107528        pub const None: Option<BotShortDescription> = Option::None;
107529        #[doc = r" `Option::Some`"]
107530        pub fn Some(value: BotShortDescription) -> Option<BotShortDescription> {
107531            Option::Some(value)
107532        }
107533        #[doc = r" Return the current variant of `MyEnum`."]
107534        #[rhai_fn(global, get = "enum_type", pure)]
107535        pub fn get_type(my_enum: &mut Option<BotShortDescription>) -> String {
107536            match my_enum {
107537                Option::None => "None".to_string(),
107538                Option::Some(_) => "Some".to_string(),
107539            }
107540        }
107541        #[doc = r" Return the inner value."]
107542        #[rhai_fn(global, get = "value", pure)]
107543        pub fn get_value(my_enum: &mut Option<BotShortDescription>) -> Dynamic {
107544            match my_enum {
107545                Option::None => Dynamic::UNIT,
107546                Option::Some(x) => Dynamic::from(x.clone()),
107547            }
107548        }
107549        #[rhai_fn(global, name = "to_string", pure)]
107550        pub fn to_string(my_enum: &mut Option<BotShortDescription>) -> String {
107551            format!("{my_enum:?}")
107552        }
107553        #[rhai_fn(global, name = "to_debug", pure)]
107554        pub fn to_debug(my_enum: &mut Option<BotShortDescription>) -> String {
107555            format!("{:?}", my_enum)
107556        }
107557    }
107558    #[export_module]
107559    #[warn(non_snake_case)]
107560    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107561    mod ChatFullInfoModule {
107562        #[doc = r" `Option::None` with no inner data"]
107563        pub const None: Option<ChatFullInfo> = Option::None;
107564        #[doc = r" `Option::Some`"]
107565        pub fn Some(value: ChatFullInfo) -> Option<ChatFullInfo> {
107566            Option::Some(value)
107567        }
107568        #[doc = r" Return the current variant of `MyEnum`."]
107569        #[rhai_fn(global, get = "enum_type", pure)]
107570        pub fn get_type(my_enum: &mut Option<ChatFullInfo>) -> String {
107571            match my_enum {
107572                Option::None => "None".to_string(),
107573                Option::Some(_) => "Some".to_string(),
107574            }
107575        }
107576        #[doc = r" Return the inner value."]
107577        #[rhai_fn(global, get = "value", pure)]
107578        pub fn get_value(my_enum: &mut Option<ChatFullInfo>) -> Dynamic {
107579            match my_enum {
107580                Option::None => Dynamic::UNIT,
107581                Option::Some(x) => Dynamic::from(x.clone()),
107582            }
107583        }
107584        #[rhai_fn(global, name = "to_string", pure)]
107585        pub fn to_string(my_enum: &mut Option<ChatFullInfo>) -> String {
107586            format!("{my_enum:?}")
107587        }
107588        #[rhai_fn(global, name = "to_debug", pure)]
107589        pub fn to_debug(my_enum: &mut Option<ChatFullInfo>) -> String {
107590            format!("{:?}", my_enum)
107591        }
107592    }
107593    #[export_module]
107594    #[warn(non_snake_case)]
107595    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107596    mod MessageOriginModule {
107597        #[doc = r" `Option::None` with no inner data"]
107598        pub const None: Option<MessageOrigin> = Option::None;
107599        #[doc = r" `Option::Some`"]
107600        pub fn Some(value: MessageOrigin) -> Option<MessageOrigin> {
107601            Option::Some(value)
107602        }
107603        #[doc = r" Return the current variant of `MyEnum`."]
107604        #[rhai_fn(global, get = "enum_type", pure)]
107605        pub fn get_type(my_enum: &mut Option<MessageOrigin>) -> String {
107606            match my_enum {
107607                Option::None => "None".to_string(),
107608                Option::Some(_) => "Some".to_string(),
107609            }
107610        }
107611        #[doc = r" Return the inner value."]
107612        #[rhai_fn(global, get = "value", pure)]
107613        pub fn get_value(my_enum: &mut Option<MessageOrigin>) -> Dynamic {
107614            match my_enum {
107615                Option::None => Dynamic::UNIT,
107616                Option::Some(x) => Dynamic::from(x.clone()),
107617            }
107618        }
107619        #[rhai_fn(global, name = "to_string", pure)]
107620        pub fn to_string(my_enum: &mut Option<MessageOrigin>) -> String {
107621            format!("{my_enum:?}")
107622        }
107623        #[rhai_fn(global, name = "to_debug", pure)]
107624        pub fn to_debug(my_enum: &mut Option<MessageOrigin>) -> String {
107625            format!("{:?}", my_enum)
107626        }
107627    }
107628    #[export_module]
107629    #[warn(non_snake_case)]
107630    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107631    mod PollAnswerModule {
107632        #[doc = r" `Option::None` with no inner data"]
107633        pub const None: Option<PollAnswer> = Option::None;
107634        #[doc = r" `Option::Some`"]
107635        pub fn Some(value: PollAnswer) -> Option<PollAnswer> {
107636            Option::Some(value)
107637        }
107638        #[doc = r" Return the current variant of `MyEnum`."]
107639        #[rhai_fn(global, get = "enum_type", pure)]
107640        pub fn get_type(my_enum: &mut Option<PollAnswer>) -> String {
107641            match my_enum {
107642                Option::None => "None".to_string(),
107643                Option::Some(_) => "Some".to_string(),
107644            }
107645        }
107646        #[doc = r" Return the inner value."]
107647        #[rhai_fn(global, get = "value", pure)]
107648        pub fn get_value(my_enum: &mut Option<PollAnswer>) -> Dynamic {
107649            match my_enum {
107650                Option::None => Dynamic::UNIT,
107651                Option::Some(x) => Dynamic::from(x.clone()),
107652            }
107653        }
107654        #[rhai_fn(global, name = "to_string", pure)]
107655        pub fn to_string(my_enum: &mut Option<PollAnswer>) -> String {
107656            format!("{my_enum:?}")
107657        }
107658        #[rhai_fn(global, name = "to_debug", pure)]
107659        pub fn to_debug(my_enum: &mut Option<PollAnswer>) -> String {
107660            format!("{:?}", my_enum)
107661        }
107662    }
107663    #[export_module]
107664    #[warn(non_snake_case)]
107665    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107666    mod WebhookInfoModule {
107667        #[doc = r" `Option::None` with no inner data"]
107668        pub const None: Option<WebhookInfo> = Option::None;
107669        #[doc = r" `Option::Some`"]
107670        pub fn Some(value: WebhookInfo) -> Option<WebhookInfo> {
107671            Option::Some(value)
107672        }
107673        #[doc = r" Return the current variant of `MyEnum`."]
107674        #[rhai_fn(global, get = "enum_type", pure)]
107675        pub fn get_type(my_enum: &mut Option<WebhookInfo>) -> String {
107676            match my_enum {
107677                Option::None => "None".to_string(),
107678                Option::Some(_) => "Some".to_string(),
107679            }
107680        }
107681        #[doc = r" Return the inner value."]
107682        #[rhai_fn(global, get = "value", pure)]
107683        pub fn get_value(my_enum: &mut Option<WebhookInfo>) -> Dynamic {
107684            match my_enum {
107685                Option::None => Dynamic::UNIT,
107686                Option::Some(x) => Dynamic::from(x.clone()),
107687            }
107688        }
107689        #[rhai_fn(global, name = "to_string", pure)]
107690        pub fn to_string(my_enum: &mut Option<WebhookInfo>) -> String {
107691            format!("{my_enum:?}")
107692        }
107693        #[rhai_fn(global, name = "to_debug", pure)]
107694        pub fn to_debug(my_enum: &mut Option<WebhookInfo>) -> String {
107695            format!("{:?}", my_enum)
107696        }
107697    }
107698    #[export_module]
107699    #[warn(non_snake_case)]
107700    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107701    mod BusinessMessagesDeletedModule {
107702        #[doc = r" `Option::None` with no inner data"]
107703        pub const None: Option<BusinessMessagesDeleted> = Option::None;
107704        #[doc = r" `Option::Some`"]
107705        pub fn Some(value: BusinessMessagesDeleted) -> Option<BusinessMessagesDeleted> {
107706            Option::Some(value)
107707        }
107708        #[doc = r" Return the current variant of `MyEnum`."]
107709        #[rhai_fn(global, get = "enum_type", pure)]
107710        pub fn get_type(my_enum: &mut Option<BusinessMessagesDeleted>) -> String {
107711            match my_enum {
107712                Option::None => "None".to_string(),
107713                Option::Some(_) => "Some".to_string(),
107714            }
107715        }
107716        #[doc = r" Return the inner value."]
107717        #[rhai_fn(global, get = "value", pure)]
107718        pub fn get_value(my_enum: &mut Option<BusinessMessagesDeleted>) -> Dynamic {
107719            match my_enum {
107720                Option::None => Dynamic::UNIT,
107721                Option::Some(x) => Dynamic::from(x.clone()),
107722            }
107723        }
107724        #[rhai_fn(global, name = "to_string", pure)]
107725        pub fn to_string(my_enum: &mut Option<BusinessMessagesDeleted>) -> String {
107726            format!("{my_enum:?}")
107727        }
107728        #[rhai_fn(global, name = "to_debug", pure)]
107729        pub fn to_debug(my_enum: &mut Option<BusinessMessagesDeleted>) -> String {
107730            format!("{:?}", my_enum)
107731        }
107732    }
107733    #[export_module]
107734    #[warn(non_snake_case)]
107735    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107736    mod BotCommandScopeDefaultModule {
107737        #[doc = r" `Option::None` with no inner data"]
107738        pub const None: Option<BotCommandScopeDefault> = Option::None;
107739        #[doc = r" `Option::Some`"]
107740        pub fn Some(value: BotCommandScopeDefault) -> Option<BotCommandScopeDefault> {
107741            Option::Some(value)
107742        }
107743        #[doc = r" Return the current variant of `MyEnum`."]
107744        #[rhai_fn(global, get = "enum_type", pure)]
107745        pub fn get_type(my_enum: &mut Option<BotCommandScopeDefault>) -> String {
107746            match my_enum {
107747                Option::None => "None".to_string(),
107748                Option::Some(_) => "Some".to_string(),
107749            }
107750        }
107751        #[doc = r" Return the inner value."]
107752        #[rhai_fn(global, get = "value", pure)]
107753        pub fn get_value(my_enum: &mut Option<BotCommandScopeDefault>) -> Dynamic {
107754            match my_enum {
107755                Option::None => Dynamic::UNIT,
107756                Option::Some(x) => Dynamic::from(x.clone()),
107757            }
107758        }
107759        #[rhai_fn(global, name = "to_string", pure)]
107760        pub fn to_string(my_enum: &mut Option<BotCommandScopeDefault>) -> String {
107761            format!("{my_enum:?}")
107762        }
107763        #[rhai_fn(global, name = "to_debug", pure)]
107764        pub fn to_debug(my_enum: &mut Option<BotCommandScopeDefault>) -> String {
107765            format!("{:?}", my_enum)
107766        }
107767    }
107768    #[export_module]
107769    #[warn(non_snake_case)]
107770    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107771    mod ChatInviteLinkModule {
107772        #[doc = r" `Option::None` with no inner data"]
107773        pub const None: Option<ChatInviteLink> = Option::None;
107774        #[doc = r" `Option::Some`"]
107775        pub fn Some(value: ChatInviteLink) -> Option<ChatInviteLink> {
107776            Option::Some(value)
107777        }
107778        #[doc = r" Return the current variant of `MyEnum`."]
107779        #[rhai_fn(global, get = "enum_type", pure)]
107780        pub fn get_type(my_enum: &mut Option<ChatInviteLink>) -> String {
107781            match my_enum {
107782                Option::None => "None".to_string(),
107783                Option::Some(_) => "Some".to_string(),
107784            }
107785        }
107786        #[doc = r" Return the inner value."]
107787        #[rhai_fn(global, get = "value", pure)]
107788        pub fn get_value(my_enum: &mut Option<ChatInviteLink>) -> Dynamic {
107789            match my_enum {
107790                Option::None => Dynamic::UNIT,
107791                Option::Some(x) => Dynamic::from(x.clone()),
107792            }
107793        }
107794        #[rhai_fn(global, name = "to_string", pure)]
107795        pub fn to_string(my_enum: &mut Option<ChatInviteLink>) -> String {
107796            format!("{my_enum:?}")
107797        }
107798        #[rhai_fn(global, name = "to_debug", pure)]
107799        pub fn to_debug(my_enum: &mut Option<ChatInviteLink>) -> String {
107800            format!("{:?}", my_enum)
107801        }
107802    }
107803    #[export_module]
107804    #[warn(non_snake_case)]
107805    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107806    mod InlineQueryResultCachedVoiceModule {
107807        #[doc = r" `Option::None` with no inner data"]
107808        pub const None: Option<InlineQueryResultCachedVoice> = Option::None;
107809        #[doc = r" `Option::Some`"]
107810        pub fn Some(value: InlineQueryResultCachedVoice) -> Option<InlineQueryResultCachedVoice> {
107811            Option::Some(value)
107812        }
107813        #[doc = r" Return the current variant of `MyEnum`."]
107814        #[rhai_fn(global, get = "enum_type", pure)]
107815        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedVoice>) -> String {
107816            match my_enum {
107817                Option::None => "None".to_string(),
107818                Option::Some(_) => "Some".to_string(),
107819            }
107820        }
107821        #[doc = r" Return the inner value."]
107822        #[rhai_fn(global, get = "value", pure)]
107823        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedVoice>) -> Dynamic {
107824            match my_enum {
107825                Option::None => Dynamic::UNIT,
107826                Option::Some(x) => Dynamic::from(x.clone()),
107827            }
107828        }
107829        #[rhai_fn(global, name = "to_string", pure)]
107830        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedVoice>) -> String {
107831            format!("{my_enum:?}")
107832        }
107833        #[rhai_fn(global, name = "to_debug", pure)]
107834        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedVoice>) -> String {
107835            format!("{:?}", my_enum)
107836        }
107837    }
107838    #[export_module]
107839    #[warn(non_snake_case)]
107840    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107841    mod PassportElementErrorTranslationFilesModule {
107842        #[doc = r" `Option::None` with no inner data"]
107843        pub const None: Option<PassportElementErrorTranslationFiles> = Option::None;
107844        #[doc = r" `Option::Some`"]
107845        pub fn Some(
107846            value: PassportElementErrorTranslationFiles,
107847        ) -> Option<PassportElementErrorTranslationFiles> {
107848            Option::Some(value)
107849        }
107850        #[doc = r" Return the current variant of `MyEnum`."]
107851        #[rhai_fn(global, get = "enum_type", pure)]
107852        pub fn get_type(my_enum: &mut Option<PassportElementErrorTranslationFiles>) -> String {
107853            match my_enum {
107854                Option::None => "None".to_string(),
107855                Option::Some(_) => "Some".to_string(),
107856            }
107857        }
107858        #[doc = r" Return the inner value."]
107859        #[rhai_fn(global, get = "value", pure)]
107860        pub fn get_value(my_enum: &mut Option<PassportElementErrorTranslationFiles>) -> Dynamic {
107861            match my_enum {
107862                Option::None => Dynamic::UNIT,
107863                Option::Some(x) => Dynamic::from(x.clone()),
107864            }
107865        }
107866        #[rhai_fn(global, name = "to_string", pure)]
107867        pub fn to_string(my_enum: &mut Option<PassportElementErrorTranslationFiles>) -> String {
107868            format!("{my_enum:?}")
107869        }
107870        #[rhai_fn(global, name = "to_debug", pure)]
107871        pub fn to_debug(my_enum: &mut Option<PassportElementErrorTranslationFiles>) -> String {
107872            format!("{:?}", my_enum)
107873        }
107874    }
107875    #[export_module]
107876    #[warn(non_snake_case)]
107877    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107878    mod AnimationModule {
107879        #[doc = r" `Option::None` with no inner data"]
107880        pub const None: Option<Animation> = Option::None;
107881        #[doc = r" `Option::Some`"]
107882        pub fn Some(value: Animation) -> Option<Animation> {
107883            Option::Some(value)
107884        }
107885        #[doc = r" Return the current variant of `MyEnum`."]
107886        #[rhai_fn(global, get = "enum_type", pure)]
107887        pub fn get_type(my_enum: &mut Option<Animation>) -> String {
107888            match my_enum {
107889                Option::None => "None".to_string(),
107890                Option::Some(_) => "Some".to_string(),
107891            }
107892        }
107893        #[doc = r" Return the inner value."]
107894        #[rhai_fn(global, get = "value", pure)]
107895        pub fn get_value(my_enum: &mut Option<Animation>) -> Dynamic {
107896            match my_enum {
107897                Option::None => Dynamic::UNIT,
107898                Option::Some(x) => Dynamic::from(x.clone()),
107899            }
107900        }
107901        #[rhai_fn(global, name = "to_string", pure)]
107902        pub fn to_string(my_enum: &mut Option<Animation>) -> String {
107903            format!("{my_enum:?}")
107904        }
107905        #[rhai_fn(global, name = "to_debug", pure)]
107906        pub fn to_debug(my_enum: &mut Option<Animation>) -> String {
107907            format!("{:?}", my_enum)
107908        }
107909    }
107910    #[export_module]
107911    #[warn(non_snake_case)]
107912    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107913    mod AudioModule {
107914        #[doc = r" `Option::None` with no inner data"]
107915        pub const None: Option<Audio> = Option::None;
107916        #[doc = r" `Option::Some`"]
107917        pub fn Some(value: Audio) -> Option<Audio> {
107918            Option::Some(value)
107919        }
107920        #[doc = r" Return the current variant of `MyEnum`."]
107921        #[rhai_fn(global, get = "enum_type", pure)]
107922        pub fn get_type(my_enum: &mut Option<Audio>) -> String {
107923            match my_enum {
107924                Option::None => "None".to_string(),
107925                Option::Some(_) => "Some".to_string(),
107926            }
107927        }
107928        #[doc = r" Return the inner value."]
107929        #[rhai_fn(global, get = "value", pure)]
107930        pub fn get_value(my_enum: &mut Option<Audio>) -> Dynamic {
107931            match my_enum {
107932                Option::None => Dynamic::UNIT,
107933                Option::Some(x) => Dynamic::from(x.clone()),
107934            }
107935        }
107936        #[rhai_fn(global, name = "to_string", pure)]
107937        pub fn to_string(my_enum: &mut Option<Audio>) -> String {
107938            format!("{my_enum:?}")
107939        }
107940        #[rhai_fn(global, name = "to_debug", pure)]
107941        pub fn to_debug(my_enum: &mut Option<Audio>) -> String {
107942            format!("{:?}", my_enum)
107943        }
107944    }
107945    #[export_module]
107946    #[warn(non_snake_case)]
107947    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107948    mod RefundedPaymentModule {
107949        #[doc = r" `Option::None` with no inner data"]
107950        pub const None: Option<RefundedPayment> = Option::None;
107951        #[doc = r" `Option::Some`"]
107952        pub fn Some(value: RefundedPayment) -> Option<RefundedPayment> {
107953            Option::Some(value)
107954        }
107955        #[doc = r" Return the current variant of `MyEnum`."]
107956        #[rhai_fn(global, get = "enum_type", pure)]
107957        pub fn get_type(my_enum: &mut Option<RefundedPayment>) -> String {
107958            match my_enum {
107959                Option::None => "None".to_string(),
107960                Option::Some(_) => "Some".to_string(),
107961            }
107962        }
107963        #[doc = r" Return the inner value."]
107964        #[rhai_fn(global, get = "value", pure)]
107965        pub fn get_value(my_enum: &mut Option<RefundedPayment>) -> Dynamic {
107966            match my_enum {
107967                Option::None => Dynamic::UNIT,
107968                Option::Some(x) => Dynamic::from(x.clone()),
107969            }
107970        }
107971        #[rhai_fn(global, name = "to_string", pure)]
107972        pub fn to_string(my_enum: &mut Option<RefundedPayment>) -> String {
107973            format!("{my_enum:?}")
107974        }
107975        #[rhai_fn(global, name = "to_debug", pure)]
107976        pub fn to_debug(my_enum: &mut Option<RefundedPayment>) -> String {
107977            format!("{:?}", my_enum)
107978        }
107979    }
107980    #[export_module]
107981    #[warn(non_snake_case)]
107982    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
107983    mod InputMediaAnimationModule {
107984        #[doc = r" `Option::None` with no inner data"]
107985        pub const None: Option<InputMediaAnimation> = Option::None;
107986        #[doc = r" `Option::Some`"]
107987        pub fn Some(value: InputMediaAnimation) -> Option<InputMediaAnimation> {
107988            Option::Some(value)
107989        }
107990        #[doc = r" Return the current variant of `MyEnum`."]
107991        #[rhai_fn(global, get = "enum_type", pure)]
107992        pub fn get_type(my_enum: &mut Option<InputMediaAnimation>) -> String {
107993            match my_enum {
107994                Option::None => "None".to_string(),
107995                Option::Some(_) => "Some".to_string(),
107996            }
107997        }
107998        #[doc = r" Return the inner value."]
107999        #[rhai_fn(global, get = "value", pure)]
108000        pub fn get_value(my_enum: &mut Option<InputMediaAnimation>) -> Dynamic {
108001            match my_enum {
108002                Option::None => Dynamic::UNIT,
108003                Option::Some(x) => Dynamic::from(x.clone()),
108004            }
108005        }
108006        #[rhai_fn(global, name = "to_string", pure)]
108007        pub fn to_string(my_enum: &mut Option<InputMediaAnimation>) -> String {
108008            format!("{my_enum:?}")
108009        }
108010        #[rhai_fn(global, name = "to_debug", pure)]
108011        pub fn to_debug(my_enum: &mut Option<InputMediaAnimation>) -> String {
108012            format!("{:?}", my_enum)
108013        }
108014    }
108015    #[export_module]
108016    #[warn(non_snake_case)]
108017    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108018    mod GameModule {
108019        #[doc = r" `Option::None` with no inner data"]
108020        pub const None: Option<Game> = Option::None;
108021        #[doc = r" `Option::Some`"]
108022        pub fn Some(value: Game) -> Option<Game> {
108023            Option::Some(value)
108024        }
108025        #[doc = r" Return the current variant of `MyEnum`."]
108026        #[rhai_fn(global, get = "enum_type", pure)]
108027        pub fn get_type(my_enum: &mut Option<Game>) -> String {
108028            match my_enum {
108029                Option::None => "None".to_string(),
108030                Option::Some(_) => "Some".to_string(),
108031            }
108032        }
108033        #[doc = r" Return the inner value."]
108034        #[rhai_fn(global, get = "value", pure)]
108035        pub fn get_value(my_enum: &mut Option<Game>) -> Dynamic {
108036            match my_enum {
108037                Option::None => Dynamic::UNIT,
108038                Option::Some(x) => Dynamic::from(x.clone()),
108039            }
108040        }
108041        #[rhai_fn(global, name = "to_string", pure)]
108042        pub fn to_string(my_enum: &mut Option<Game>) -> String {
108043            format!("{my_enum:?}")
108044        }
108045        #[rhai_fn(global, name = "to_debug", pure)]
108046        pub fn to_debug(my_enum: &mut Option<Game>) -> String {
108047            format!("{:?}", my_enum)
108048        }
108049    }
108050    #[export_module]
108051    #[warn(non_snake_case)]
108052    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108053    mod ChatMemberMemberModule {
108054        #[doc = r" `Option::None` with no inner data"]
108055        pub const None: Option<ChatMemberMember> = Option::None;
108056        #[doc = r" `Option::Some`"]
108057        pub fn Some(value: ChatMemberMember) -> Option<ChatMemberMember> {
108058            Option::Some(value)
108059        }
108060        #[doc = r" Return the current variant of `MyEnum`."]
108061        #[rhai_fn(global, get = "enum_type", pure)]
108062        pub fn get_type(my_enum: &mut Option<ChatMemberMember>) -> String {
108063            match my_enum {
108064                Option::None => "None".to_string(),
108065                Option::Some(_) => "Some".to_string(),
108066            }
108067        }
108068        #[doc = r" Return the inner value."]
108069        #[rhai_fn(global, get = "value", pure)]
108070        pub fn get_value(my_enum: &mut Option<ChatMemberMember>) -> Dynamic {
108071            match my_enum {
108072                Option::None => Dynamic::UNIT,
108073                Option::Some(x) => Dynamic::from(x.clone()),
108074            }
108075        }
108076        #[rhai_fn(global, name = "to_string", pure)]
108077        pub fn to_string(my_enum: &mut Option<ChatMemberMember>) -> String {
108078            format!("{my_enum:?}")
108079        }
108080        #[rhai_fn(global, name = "to_debug", pure)]
108081        pub fn to_debug(my_enum: &mut Option<ChatMemberMember>) -> String {
108082            format!("{:?}", my_enum)
108083        }
108084    }
108085    #[export_module]
108086    #[warn(non_snake_case)]
108087    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108088    mod ChatPermissionsModule {
108089        #[doc = r" `Option::None` with no inner data"]
108090        pub const None: Option<ChatPermissions> = Option::None;
108091        #[doc = r" `Option::Some`"]
108092        pub fn Some(value: ChatPermissions) -> Option<ChatPermissions> {
108093            Option::Some(value)
108094        }
108095        #[doc = r" Return the current variant of `MyEnum`."]
108096        #[rhai_fn(global, get = "enum_type", pure)]
108097        pub fn get_type(my_enum: &mut Option<ChatPermissions>) -> String {
108098            match my_enum {
108099                Option::None => "None".to_string(),
108100                Option::Some(_) => "Some".to_string(),
108101            }
108102        }
108103        #[doc = r" Return the inner value."]
108104        #[rhai_fn(global, get = "value", pure)]
108105        pub fn get_value(my_enum: &mut Option<ChatPermissions>) -> Dynamic {
108106            match my_enum {
108107                Option::None => Dynamic::UNIT,
108108                Option::Some(x) => Dynamic::from(x.clone()),
108109            }
108110        }
108111        #[rhai_fn(global, name = "to_string", pure)]
108112        pub fn to_string(my_enum: &mut Option<ChatPermissions>) -> String {
108113            format!("{my_enum:?}")
108114        }
108115        #[rhai_fn(global, name = "to_debug", pure)]
108116        pub fn to_debug(my_enum: &mut Option<ChatPermissions>) -> String {
108117            format!("{:?}", my_enum)
108118        }
108119    }
108120    #[export_module]
108121    #[warn(non_snake_case)]
108122    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108123    mod StarTransactionsModule {
108124        #[doc = r" `Option::None` with no inner data"]
108125        pub const None: Option<StarTransactions> = Option::None;
108126        #[doc = r" `Option::Some`"]
108127        pub fn Some(value: StarTransactions) -> Option<StarTransactions> {
108128            Option::Some(value)
108129        }
108130        #[doc = r" Return the current variant of `MyEnum`."]
108131        #[rhai_fn(global, get = "enum_type", pure)]
108132        pub fn get_type(my_enum: &mut Option<StarTransactions>) -> String {
108133            match my_enum {
108134                Option::None => "None".to_string(),
108135                Option::Some(_) => "Some".to_string(),
108136            }
108137        }
108138        #[doc = r" Return the inner value."]
108139        #[rhai_fn(global, get = "value", pure)]
108140        pub fn get_value(my_enum: &mut Option<StarTransactions>) -> Dynamic {
108141            match my_enum {
108142                Option::None => Dynamic::UNIT,
108143                Option::Some(x) => Dynamic::from(x.clone()),
108144            }
108145        }
108146        #[rhai_fn(global, name = "to_string", pure)]
108147        pub fn to_string(my_enum: &mut Option<StarTransactions>) -> String {
108148            format!("{my_enum:?}")
108149        }
108150        #[rhai_fn(global, name = "to_debug", pure)]
108151        pub fn to_debug(my_enum: &mut Option<StarTransactions>) -> String {
108152            format!("{:?}", my_enum)
108153        }
108154    }
108155    #[export_module]
108156    #[warn(non_snake_case)]
108157    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108158    mod EncryptedCredentialsModule {
108159        #[doc = r" `Option::None` with no inner data"]
108160        pub const None: Option<EncryptedCredentials> = Option::None;
108161        #[doc = r" `Option::Some`"]
108162        pub fn Some(value: EncryptedCredentials) -> Option<EncryptedCredentials> {
108163            Option::Some(value)
108164        }
108165        #[doc = r" Return the current variant of `MyEnum`."]
108166        #[rhai_fn(global, get = "enum_type", pure)]
108167        pub fn get_type(my_enum: &mut Option<EncryptedCredentials>) -> String {
108168            match my_enum {
108169                Option::None => "None".to_string(),
108170                Option::Some(_) => "Some".to_string(),
108171            }
108172        }
108173        #[doc = r" Return the inner value."]
108174        #[rhai_fn(global, get = "value", pure)]
108175        pub fn get_value(my_enum: &mut Option<EncryptedCredentials>) -> Dynamic {
108176            match my_enum {
108177                Option::None => Dynamic::UNIT,
108178                Option::Some(x) => Dynamic::from(x.clone()),
108179            }
108180        }
108181        #[rhai_fn(global, name = "to_string", pure)]
108182        pub fn to_string(my_enum: &mut Option<EncryptedCredentials>) -> String {
108183            format!("{my_enum:?}")
108184        }
108185        #[rhai_fn(global, name = "to_debug", pure)]
108186        pub fn to_debug(my_enum: &mut Option<EncryptedCredentials>) -> String {
108187            format!("{:?}", my_enum)
108188        }
108189    }
108190    #[export_module]
108191    #[warn(non_snake_case)]
108192    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108193    mod StoryAreaTypeSuggestedReactionModule {
108194        #[doc = r" `Option::None` with no inner data"]
108195        pub const None: Option<StoryAreaTypeSuggestedReaction> = Option::None;
108196        #[doc = r" `Option::Some`"]
108197        pub fn Some(
108198            value: StoryAreaTypeSuggestedReaction,
108199        ) -> Option<StoryAreaTypeSuggestedReaction> {
108200            Option::Some(value)
108201        }
108202        #[doc = r" Return the current variant of `MyEnum`."]
108203        #[rhai_fn(global, get = "enum_type", pure)]
108204        pub fn get_type(my_enum: &mut Option<StoryAreaTypeSuggestedReaction>) -> String {
108205            match my_enum {
108206                Option::None => "None".to_string(),
108207                Option::Some(_) => "Some".to_string(),
108208            }
108209        }
108210        #[doc = r" Return the inner value."]
108211        #[rhai_fn(global, get = "value", pure)]
108212        pub fn get_value(my_enum: &mut Option<StoryAreaTypeSuggestedReaction>) -> Dynamic {
108213            match my_enum {
108214                Option::None => Dynamic::UNIT,
108215                Option::Some(x) => Dynamic::from(x.clone()),
108216            }
108217        }
108218        #[rhai_fn(global, name = "to_string", pure)]
108219        pub fn to_string(my_enum: &mut Option<StoryAreaTypeSuggestedReaction>) -> String {
108220            format!("{my_enum:?}")
108221        }
108222        #[rhai_fn(global, name = "to_debug", pure)]
108223        pub fn to_debug(my_enum: &mut Option<StoryAreaTypeSuggestedReaction>) -> String {
108224            format!("{:?}", my_enum)
108225        }
108226    }
108227    #[export_module]
108228    #[warn(non_snake_case)]
108229    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108230    mod ChecklistTasksAddedModule {
108231        #[doc = r" `Option::None` with no inner data"]
108232        pub const None: Option<ChecklistTasksAdded> = Option::None;
108233        #[doc = r" `Option::Some`"]
108234        pub fn Some(value: ChecklistTasksAdded) -> Option<ChecklistTasksAdded> {
108235            Option::Some(value)
108236        }
108237        #[doc = r" Return the current variant of `MyEnum`."]
108238        #[rhai_fn(global, get = "enum_type", pure)]
108239        pub fn get_type(my_enum: &mut Option<ChecklistTasksAdded>) -> String {
108240            match my_enum {
108241                Option::None => "None".to_string(),
108242                Option::Some(_) => "Some".to_string(),
108243            }
108244        }
108245        #[doc = r" Return the inner value."]
108246        #[rhai_fn(global, get = "value", pure)]
108247        pub fn get_value(my_enum: &mut Option<ChecklistTasksAdded>) -> Dynamic {
108248            match my_enum {
108249                Option::None => Dynamic::UNIT,
108250                Option::Some(x) => Dynamic::from(x.clone()),
108251            }
108252        }
108253        #[rhai_fn(global, name = "to_string", pure)]
108254        pub fn to_string(my_enum: &mut Option<ChecklistTasksAdded>) -> String {
108255            format!("{my_enum:?}")
108256        }
108257        #[rhai_fn(global, name = "to_debug", pure)]
108258        pub fn to_debug(my_enum: &mut Option<ChecklistTasksAdded>) -> String {
108259            format!("{:?}", my_enum)
108260        }
108261    }
108262    #[export_module]
108263    #[warn(non_snake_case)]
108264    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108265    mod InputMessageContentModule {
108266        #[doc = r" `Option::None` with no inner data"]
108267        pub const None: Option<InputMessageContent> = Option::None;
108268        #[doc = r" `Option::Some`"]
108269        pub fn Some(value: InputMessageContent) -> Option<InputMessageContent> {
108270            Option::Some(value)
108271        }
108272        #[doc = r" Return the current variant of `MyEnum`."]
108273        #[rhai_fn(global, get = "enum_type", pure)]
108274        pub fn get_type(my_enum: &mut Option<InputMessageContent>) -> String {
108275            match my_enum {
108276                Option::None => "None".to_string(),
108277                Option::Some(_) => "Some".to_string(),
108278            }
108279        }
108280        #[doc = r" Return the inner value."]
108281        #[rhai_fn(global, get = "value", pure)]
108282        pub fn get_value(my_enum: &mut Option<InputMessageContent>) -> Dynamic {
108283            match my_enum {
108284                Option::None => Dynamic::UNIT,
108285                Option::Some(x) => Dynamic::from(x.clone()),
108286            }
108287        }
108288        #[rhai_fn(global, name = "to_string", pure)]
108289        pub fn to_string(my_enum: &mut Option<InputMessageContent>) -> String {
108290            format!("{my_enum:?}")
108291        }
108292        #[rhai_fn(global, name = "to_debug", pure)]
108293        pub fn to_debug(my_enum: &mut Option<InputMessageContent>) -> String {
108294            format!("{:?}", my_enum)
108295        }
108296    }
108297    #[export_module]
108298    #[warn(non_snake_case)]
108299    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108300    mod BackgroundFillGradientModule {
108301        #[doc = r" `Option::None` with no inner data"]
108302        pub const None: Option<BackgroundFillGradient> = Option::None;
108303        #[doc = r" `Option::Some`"]
108304        pub fn Some(value: BackgroundFillGradient) -> Option<BackgroundFillGradient> {
108305            Option::Some(value)
108306        }
108307        #[doc = r" Return the current variant of `MyEnum`."]
108308        #[rhai_fn(global, get = "enum_type", pure)]
108309        pub fn get_type(my_enum: &mut Option<BackgroundFillGradient>) -> String {
108310            match my_enum {
108311                Option::None => "None".to_string(),
108312                Option::Some(_) => "Some".to_string(),
108313            }
108314        }
108315        #[doc = r" Return the inner value."]
108316        #[rhai_fn(global, get = "value", pure)]
108317        pub fn get_value(my_enum: &mut Option<BackgroundFillGradient>) -> Dynamic {
108318            match my_enum {
108319                Option::None => Dynamic::UNIT,
108320                Option::Some(x) => Dynamic::from(x.clone()),
108321            }
108322        }
108323        #[rhai_fn(global, name = "to_string", pure)]
108324        pub fn to_string(my_enum: &mut Option<BackgroundFillGradient>) -> String {
108325            format!("{my_enum:?}")
108326        }
108327        #[rhai_fn(global, name = "to_debug", pure)]
108328        pub fn to_debug(my_enum: &mut Option<BackgroundFillGradient>) -> String {
108329            format!("{:?}", my_enum)
108330        }
108331    }
108332    #[export_module]
108333    #[warn(non_snake_case)]
108334    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108335    mod SuggestedPostRefundedModule {
108336        #[doc = r" `Option::None` with no inner data"]
108337        pub const None: Option<SuggestedPostRefunded> = Option::None;
108338        #[doc = r" `Option::Some`"]
108339        pub fn Some(value: SuggestedPostRefunded) -> Option<SuggestedPostRefunded> {
108340            Option::Some(value)
108341        }
108342        #[doc = r" Return the current variant of `MyEnum`."]
108343        #[rhai_fn(global, get = "enum_type", pure)]
108344        pub fn get_type(my_enum: &mut Option<SuggestedPostRefunded>) -> String {
108345            match my_enum {
108346                Option::None => "None".to_string(),
108347                Option::Some(_) => "Some".to_string(),
108348            }
108349        }
108350        #[doc = r" Return the inner value."]
108351        #[rhai_fn(global, get = "value", pure)]
108352        pub fn get_value(my_enum: &mut Option<SuggestedPostRefunded>) -> Dynamic {
108353            match my_enum {
108354                Option::None => Dynamic::UNIT,
108355                Option::Some(x) => Dynamic::from(x.clone()),
108356            }
108357        }
108358        #[rhai_fn(global, name = "to_string", pure)]
108359        pub fn to_string(my_enum: &mut Option<SuggestedPostRefunded>) -> String {
108360            format!("{my_enum:?}")
108361        }
108362        #[rhai_fn(global, name = "to_debug", pure)]
108363        pub fn to_debug(my_enum: &mut Option<SuggestedPostRefunded>) -> String {
108364            format!("{:?}", my_enum)
108365        }
108366    }
108367    #[export_module]
108368    #[warn(non_snake_case)]
108369    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108370    mod CallbackQueryModule {
108371        #[doc = r" `Option::None` with no inner data"]
108372        pub const None: Option<CallbackQuery> = Option::None;
108373        #[doc = r" `Option::Some`"]
108374        pub fn Some(value: CallbackQuery) -> Option<CallbackQuery> {
108375            Option::Some(value)
108376        }
108377        #[doc = r" Return the current variant of `MyEnum`."]
108378        #[rhai_fn(global, get = "enum_type", pure)]
108379        pub fn get_type(my_enum: &mut Option<CallbackQuery>) -> String {
108380            match my_enum {
108381                Option::None => "None".to_string(),
108382                Option::Some(_) => "Some".to_string(),
108383            }
108384        }
108385        #[doc = r" Return the inner value."]
108386        #[rhai_fn(global, get = "value", pure)]
108387        pub fn get_value(my_enum: &mut Option<CallbackQuery>) -> Dynamic {
108388            match my_enum {
108389                Option::None => Dynamic::UNIT,
108390                Option::Some(x) => Dynamic::from(x.clone()),
108391            }
108392        }
108393        #[rhai_fn(global, name = "to_string", pure)]
108394        pub fn to_string(my_enum: &mut Option<CallbackQuery>) -> String {
108395            format!("{my_enum:?}")
108396        }
108397        #[rhai_fn(global, name = "to_debug", pure)]
108398        pub fn to_debug(my_enum: &mut Option<CallbackQuery>) -> String {
108399            format!("{:?}", my_enum)
108400        }
108401    }
108402    #[export_module]
108403    #[warn(non_snake_case)]
108404    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108405    mod PassportElementErrorFilesModule {
108406        #[doc = r" `Option::None` with no inner data"]
108407        pub const None: Option<PassportElementErrorFiles> = Option::None;
108408        #[doc = r" `Option::Some`"]
108409        pub fn Some(value: PassportElementErrorFiles) -> Option<PassportElementErrorFiles> {
108410            Option::Some(value)
108411        }
108412        #[doc = r" Return the current variant of `MyEnum`."]
108413        #[rhai_fn(global, get = "enum_type", pure)]
108414        pub fn get_type(my_enum: &mut Option<PassportElementErrorFiles>) -> String {
108415            match my_enum {
108416                Option::None => "None".to_string(),
108417                Option::Some(_) => "Some".to_string(),
108418            }
108419        }
108420        #[doc = r" Return the inner value."]
108421        #[rhai_fn(global, get = "value", pure)]
108422        pub fn get_value(my_enum: &mut Option<PassportElementErrorFiles>) -> Dynamic {
108423            match my_enum {
108424                Option::None => Dynamic::UNIT,
108425                Option::Some(x) => Dynamic::from(x.clone()),
108426            }
108427        }
108428        #[rhai_fn(global, name = "to_string", pure)]
108429        pub fn to_string(my_enum: &mut Option<PassportElementErrorFiles>) -> String {
108430            format!("{my_enum:?}")
108431        }
108432        #[rhai_fn(global, name = "to_debug", pure)]
108433        pub fn to_debug(my_enum: &mut Option<PassportElementErrorFiles>) -> String {
108434            format!("{:?}", my_enum)
108435        }
108436    }
108437    #[export_module]
108438    #[warn(non_snake_case)]
108439    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108440    mod MenuButtonDefaultModule {
108441        #[doc = r" `Option::None` with no inner data"]
108442        pub const None: Option<MenuButtonDefault> = Option::None;
108443        #[doc = r" `Option::Some`"]
108444        pub fn Some(value: MenuButtonDefault) -> Option<MenuButtonDefault> {
108445            Option::Some(value)
108446        }
108447        #[doc = r" Return the current variant of `MyEnum`."]
108448        #[rhai_fn(global, get = "enum_type", pure)]
108449        pub fn get_type(my_enum: &mut Option<MenuButtonDefault>) -> String {
108450            match my_enum {
108451                Option::None => "None".to_string(),
108452                Option::Some(_) => "Some".to_string(),
108453            }
108454        }
108455        #[doc = r" Return the inner value."]
108456        #[rhai_fn(global, get = "value", pure)]
108457        pub fn get_value(my_enum: &mut Option<MenuButtonDefault>) -> Dynamic {
108458            match my_enum {
108459                Option::None => Dynamic::UNIT,
108460                Option::Some(x) => Dynamic::from(x.clone()),
108461            }
108462        }
108463        #[rhai_fn(global, name = "to_string", pure)]
108464        pub fn to_string(my_enum: &mut Option<MenuButtonDefault>) -> String {
108465            format!("{my_enum:?}")
108466        }
108467        #[rhai_fn(global, name = "to_debug", pure)]
108468        pub fn to_debug(my_enum: &mut Option<MenuButtonDefault>) -> String {
108469            format!("{:?}", my_enum)
108470        }
108471    }
108472    #[export_module]
108473    #[warn(non_snake_case)]
108474    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108475    mod ForumTopicEditedModule {
108476        #[doc = r" `Option::None` with no inner data"]
108477        pub const None: Option<ForumTopicEdited> = Option::None;
108478        #[doc = r" `Option::Some`"]
108479        pub fn Some(value: ForumTopicEdited) -> Option<ForumTopicEdited> {
108480            Option::Some(value)
108481        }
108482        #[doc = r" Return the current variant of `MyEnum`."]
108483        #[rhai_fn(global, get = "enum_type", pure)]
108484        pub fn get_type(my_enum: &mut Option<ForumTopicEdited>) -> String {
108485            match my_enum {
108486                Option::None => "None".to_string(),
108487                Option::Some(_) => "Some".to_string(),
108488            }
108489        }
108490        #[doc = r" Return the inner value."]
108491        #[rhai_fn(global, get = "value", pure)]
108492        pub fn get_value(my_enum: &mut Option<ForumTopicEdited>) -> Dynamic {
108493            match my_enum {
108494                Option::None => Dynamic::UNIT,
108495                Option::Some(x) => Dynamic::from(x.clone()),
108496            }
108497        }
108498        #[rhai_fn(global, name = "to_string", pure)]
108499        pub fn to_string(my_enum: &mut Option<ForumTopicEdited>) -> String {
108500            format!("{my_enum:?}")
108501        }
108502        #[rhai_fn(global, name = "to_debug", pure)]
108503        pub fn to_debug(my_enum: &mut Option<ForumTopicEdited>) -> String {
108504            format!("{:?}", my_enum)
108505        }
108506    }
108507    #[export_module]
108508    #[warn(non_snake_case)]
108509    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108510    mod GiveawayCompletedModule {
108511        #[doc = r" `Option::None` with no inner data"]
108512        pub const None: Option<GiveawayCompleted> = Option::None;
108513        #[doc = r" `Option::Some`"]
108514        pub fn Some(value: GiveawayCompleted) -> Option<GiveawayCompleted> {
108515            Option::Some(value)
108516        }
108517        #[doc = r" Return the current variant of `MyEnum`."]
108518        #[rhai_fn(global, get = "enum_type", pure)]
108519        pub fn get_type(my_enum: &mut Option<GiveawayCompleted>) -> String {
108520            match my_enum {
108521                Option::None => "None".to_string(),
108522                Option::Some(_) => "Some".to_string(),
108523            }
108524        }
108525        #[doc = r" Return the inner value."]
108526        #[rhai_fn(global, get = "value", pure)]
108527        pub fn get_value(my_enum: &mut Option<GiveawayCompleted>) -> Dynamic {
108528            match my_enum {
108529                Option::None => Dynamic::UNIT,
108530                Option::Some(x) => Dynamic::from(x.clone()),
108531            }
108532        }
108533        #[rhai_fn(global, name = "to_string", pure)]
108534        pub fn to_string(my_enum: &mut Option<GiveawayCompleted>) -> String {
108535            format!("{my_enum:?}")
108536        }
108537        #[rhai_fn(global, name = "to_debug", pure)]
108538        pub fn to_debug(my_enum: &mut Option<GiveawayCompleted>) -> String {
108539            format!("{:?}", my_enum)
108540        }
108541    }
108542    #[export_module]
108543    #[warn(non_snake_case)]
108544    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108545    mod ReplyKeyboardMarkupModule {
108546        #[doc = r" `Option::None` with no inner data"]
108547        pub const None: Option<ReplyKeyboardMarkup> = Option::None;
108548        #[doc = r" `Option::Some`"]
108549        pub fn Some(value: ReplyKeyboardMarkup) -> Option<ReplyKeyboardMarkup> {
108550            Option::Some(value)
108551        }
108552        #[doc = r" Return the current variant of `MyEnum`."]
108553        #[rhai_fn(global, get = "enum_type", pure)]
108554        pub fn get_type(my_enum: &mut Option<ReplyKeyboardMarkup>) -> String {
108555            match my_enum {
108556                Option::None => "None".to_string(),
108557                Option::Some(_) => "Some".to_string(),
108558            }
108559        }
108560        #[doc = r" Return the inner value."]
108561        #[rhai_fn(global, get = "value", pure)]
108562        pub fn get_value(my_enum: &mut Option<ReplyKeyboardMarkup>) -> Dynamic {
108563            match my_enum {
108564                Option::None => Dynamic::UNIT,
108565                Option::Some(x) => Dynamic::from(x.clone()),
108566            }
108567        }
108568        #[rhai_fn(global, name = "to_string", pure)]
108569        pub fn to_string(my_enum: &mut Option<ReplyKeyboardMarkup>) -> String {
108570            format!("{my_enum:?}")
108571        }
108572        #[rhai_fn(global, name = "to_debug", pure)]
108573        pub fn to_debug(my_enum: &mut Option<ReplyKeyboardMarkup>) -> String {
108574            format!("{:?}", my_enum)
108575        }
108576    }
108577    #[export_module]
108578    #[warn(non_snake_case)]
108579    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108580    mod InlineQueryResultCachedAudioModule {
108581        #[doc = r" `Option::None` with no inner data"]
108582        pub const None: Option<InlineQueryResultCachedAudio> = Option::None;
108583        #[doc = r" `Option::Some`"]
108584        pub fn Some(value: InlineQueryResultCachedAudio) -> Option<InlineQueryResultCachedAudio> {
108585            Option::Some(value)
108586        }
108587        #[doc = r" Return the current variant of `MyEnum`."]
108588        #[rhai_fn(global, get = "enum_type", pure)]
108589        pub fn get_type(my_enum: &mut Option<InlineQueryResultCachedAudio>) -> String {
108590            match my_enum {
108591                Option::None => "None".to_string(),
108592                Option::Some(_) => "Some".to_string(),
108593            }
108594        }
108595        #[doc = r" Return the inner value."]
108596        #[rhai_fn(global, get = "value", pure)]
108597        pub fn get_value(my_enum: &mut Option<InlineQueryResultCachedAudio>) -> Dynamic {
108598            match my_enum {
108599                Option::None => Dynamic::UNIT,
108600                Option::Some(x) => Dynamic::from(x.clone()),
108601            }
108602        }
108603        #[rhai_fn(global, name = "to_string", pure)]
108604        pub fn to_string(my_enum: &mut Option<InlineQueryResultCachedAudio>) -> String {
108605            format!("{my_enum:?}")
108606        }
108607        #[rhai_fn(global, name = "to_debug", pure)]
108608        pub fn to_debug(my_enum: &mut Option<InlineQueryResultCachedAudio>) -> String {
108609            format!("{:?}", my_enum)
108610        }
108611    }
108612    #[export_module]
108613    #[warn(non_snake_case)]
108614    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108615    mod CopyTextButtonModule {
108616        #[doc = r" `Option::None` with no inner data"]
108617        pub const None: Option<CopyTextButton> = Option::None;
108618        #[doc = r" `Option::Some`"]
108619        pub fn Some(value: CopyTextButton) -> Option<CopyTextButton> {
108620            Option::Some(value)
108621        }
108622        #[doc = r" Return the current variant of `MyEnum`."]
108623        #[rhai_fn(global, get = "enum_type", pure)]
108624        pub fn get_type(my_enum: &mut Option<CopyTextButton>) -> String {
108625            match my_enum {
108626                Option::None => "None".to_string(),
108627                Option::Some(_) => "Some".to_string(),
108628            }
108629        }
108630        #[doc = r" Return the inner value."]
108631        #[rhai_fn(global, get = "value", pure)]
108632        pub fn get_value(my_enum: &mut Option<CopyTextButton>) -> Dynamic {
108633            match my_enum {
108634                Option::None => Dynamic::UNIT,
108635                Option::Some(x) => Dynamic::from(x.clone()),
108636            }
108637        }
108638        #[rhai_fn(global, name = "to_string", pure)]
108639        pub fn to_string(my_enum: &mut Option<CopyTextButton>) -> String {
108640            format!("{my_enum:?}")
108641        }
108642        #[rhai_fn(global, name = "to_debug", pure)]
108643        pub fn to_debug(my_enum: &mut Option<CopyTextButton>) -> String {
108644            format!("{:?}", my_enum)
108645        }
108646    }
108647    #[export_module]
108648    #[warn(non_snake_case)]
108649    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108650    mod BackgroundTypeWallpaperModule {
108651        #[doc = r" `Option::None` with no inner data"]
108652        pub const None: Option<BackgroundTypeWallpaper> = Option::None;
108653        #[doc = r" `Option::Some`"]
108654        pub fn Some(value: BackgroundTypeWallpaper) -> Option<BackgroundTypeWallpaper> {
108655            Option::Some(value)
108656        }
108657        #[doc = r" Return the current variant of `MyEnum`."]
108658        #[rhai_fn(global, get = "enum_type", pure)]
108659        pub fn get_type(my_enum: &mut Option<BackgroundTypeWallpaper>) -> String {
108660            match my_enum {
108661                Option::None => "None".to_string(),
108662                Option::Some(_) => "Some".to_string(),
108663            }
108664        }
108665        #[doc = r" Return the inner value."]
108666        #[rhai_fn(global, get = "value", pure)]
108667        pub fn get_value(my_enum: &mut Option<BackgroundTypeWallpaper>) -> Dynamic {
108668            match my_enum {
108669                Option::None => Dynamic::UNIT,
108670                Option::Some(x) => Dynamic::from(x.clone()),
108671            }
108672        }
108673        #[rhai_fn(global, name = "to_string", pure)]
108674        pub fn to_string(my_enum: &mut Option<BackgroundTypeWallpaper>) -> String {
108675            format!("{my_enum:?}")
108676        }
108677        #[rhai_fn(global, name = "to_debug", pure)]
108678        pub fn to_debug(my_enum: &mut Option<BackgroundTypeWallpaper>) -> String {
108679            format!("{:?}", my_enum)
108680        }
108681    }
108682    #[export_module]
108683    #[warn(non_snake_case)]
108684    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108685    mod ForumTopicModule {
108686        #[doc = r" `Option::None` with no inner data"]
108687        pub const None: Option<ForumTopic> = Option::None;
108688        #[doc = r" `Option::Some`"]
108689        pub fn Some(value: ForumTopic) -> Option<ForumTopic> {
108690            Option::Some(value)
108691        }
108692        #[doc = r" Return the current variant of `MyEnum`."]
108693        #[rhai_fn(global, get = "enum_type", pure)]
108694        pub fn get_type(my_enum: &mut Option<ForumTopic>) -> String {
108695            match my_enum {
108696                Option::None => "None".to_string(),
108697                Option::Some(_) => "Some".to_string(),
108698            }
108699        }
108700        #[doc = r" Return the inner value."]
108701        #[rhai_fn(global, get = "value", pure)]
108702        pub fn get_value(my_enum: &mut Option<ForumTopic>) -> Dynamic {
108703            match my_enum {
108704                Option::None => Dynamic::UNIT,
108705                Option::Some(x) => Dynamic::from(x.clone()),
108706            }
108707        }
108708        #[rhai_fn(global, name = "to_string", pure)]
108709        pub fn to_string(my_enum: &mut Option<ForumTopic>) -> String {
108710            format!("{my_enum:?}")
108711        }
108712        #[rhai_fn(global, name = "to_debug", pure)]
108713        pub fn to_debug(my_enum: &mut Option<ForumTopic>) -> String {
108714            format!("{:?}", my_enum)
108715        }
108716    }
108717    #[export_module]
108718    #[warn(non_snake_case)]
108719    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108720    mod InputContactMessageContentModule {
108721        #[doc = r" `Option::None` with no inner data"]
108722        pub const None: Option<InputContactMessageContent> = Option::None;
108723        #[doc = r" `Option::Some`"]
108724        pub fn Some(value: InputContactMessageContent) -> Option<InputContactMessageContent> {
108725            Option::Some(value)
108726        }
108727        #[doc = r" Return the current variant of `MyEnum`."]
108728        #[rhai_fn(global, get = "enum_type", pure)]
108729        pub fn get_type(my_enum: &mut Option<InputContactMessageContent>) -> String {
108730            match my_enum {
108731                Option::None => "None".to_string(),
108732                Option::Some(_) => "Some".to_string(),
108733            }
108734        }
108735        #[doc = r" Return the inner value."]
108736        #[rhai_fn(global, get = "value", pure)]
108737        pub fn get_value(my_enum: &mut Option<InputContactMessageContent>) -> Dynamic {
108738            match my_enum {
108739                Option::None => Dynamic::UNIT,
108740                Option::Some(x) => Dynamic::from(x.clone()),
108741            }
108742        }
108743        #[rhai_fn(global, name = "to_string", pure)]
108744        pub fn to_string(my_enum: &mut Option<InputContactMessageContent>) -> String {
108745            format!("{my_enum:?}")
108746        }
108747        #[rhai_fn(global, name = "to_debug", pure)]
108748        pub fn to_debug(my_enum: &mut Option<InputContactMessageContent>) -> String {
108749            format!("{:?}", my_enum)
108750        }
108751    }
108752    #[export_module]
108753    #[warn(non_snake_case)]
108754    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108755    mod ReplyParametersModule {
108756        #[doc = r" `Option::None` with no inner data"]
108757        pub const None: Option<ReplyParameters> = Option::None;
108758        #[doc = r" `Option::Some`"]
108759        pub fn Some(value: ReplyParameters) -> Option<ReplyParameters> {
108760            Option::Some(value)
108761        }
108762        #[doc = r" Return the current variant of `MyEnum`."]
108763        #[rhai_fn(global, get = "enum_type", pure)]
108764        pub fn get_type(my_enum: &mut Option<ReplyParameters>) -> String {
108765            match my_enum {
108766                Option::None => "None".to_string(),
108767                Option::Some(_) => "Some".to_string(),
108768            }
108769        }
108770        #[doc = r" Return the inner value."]
108771        #[rhai_fn(global, get = "value", pure)]
108772        pub fn get_value(my_enum: &mut Option<ReplyParameters>) -> Dynamic {
108773            match my_enum {
108774                Option::None => Dynamic::UNIT,
108775                Option::Some(x) => Dynamic::from(x.clone()),
108776            }
108777        }
108778        #[rhai_fn(global, name = "to_string", pure)]
108779        pub fn to_string(my_enum: &mut Option<ReplyParameters>) -> String {
108780            format!("{my_enum:?}")
108781        }
108782        #[rhai_fn(global, name = "to_debug", pure)]
108783        pub fn to_debug(my_enum: &mut Option<ReplyParameters>) -> String {
108784            format!("{:?}", my_enum)
108785        }
108786    }
108787    #[export_module]
108788    #[warn(non_snake_case)]
108789    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108790    mod InputMediaDocumentModule {
108791        #[doc = r" `Option::None` with no inner data"]
108792        pub const None: Option<InputMediaDocument> = Option::None;
108793        #[doc = r" `Option::Some`"]
108794        pub fn Some(value: InputMediaDocument) -> Option<InputMediaDocument> {
108795            Option::Some(value)
108796        }
108797        #[doc = r" Return the current variant of `MyEnum`."]
108798        #[rhai_fn(global, get = "enum_type", pure)]
108799        pub fn get_type(my_enum: &mut Option<InputMediaDocument>) -> String {
108800            match my_enum {
108801                Option::None => "None".to_string(),
108802                Option::Some(_) => "Some".to_string(),
108803            }
108804        }
108805        #[doc = r" Return the inner value."]
108806        #[rhai_fn(global, get = "value", pure)]
108807        pub fn get_value(my_enum: &mut Option<InputMediaDocument>) -> Dynamic {
108808            match my_enum {
108809                Option::None => Dynamic::UNIT,
108810                Option::Some(x) => Dynamic::from(x.clone()),
108811            }
108812        }
108813        #[rhai_fn(global, name = "to_string", pure)]
108814        pub fn to_string(my_enum: &mut Option<InputMediaDocument>) -> String {
108815            format!("{my_enum:?}")
108816        }
108817        #[rhai_fn(global, name = "to_debug", pure)]
108818        pub fn to_debug(my_enum: &mut Option<InputMediaDocument>) -> String {
108819            format!("{:?}", my_enum)
108820        }
108821    }
108822    #[export_module]
108823    #[warn(non_snake_case)]
108824    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108825    mod BusinessIntroModule {
108826        #[doc = r" `Option::None` with no inner data"]
108827        pub const None: Option<BusinessIntro> = Option::None;
108828        #[doc = r" `Option::Some`"]
108829        pub fn Some(value: BusinessIntro) -> Option<BusinessIntro> {
108830            Option::Some(value)
108831        }
108832        #[doc = r" Return the current variant of `MyEnum`."]
108833        #[rhai_fn(global, get = "enum_type", pure)]
108834        pub fn get_type(my_enum: &mut Option<BusinessIntro>) -> String {
108835            match my_enum {
108836                Option::None => "None".to_string(),
108837                Option::Some(_) => "Some".to_string(),
108838            }
108839        }
108840        #[doc = r" Return the inner value."]
108841        #[rhai_fn(global, get = "value", pure)]
108842        pub fn get_value(my_enum: &mut Option<BusinessIntro>) -> Dynamic {
108843            match my_enum {
108844                Option::None => Dynamic::UNIT,
108845                Option::Some(x) => Dynamic::from(x.clone()),
108846            }
108847        }
108848        #[rhai_fn(global, name = "to_string", pure)]
108849        pub fn to_string(my_enum: &mut Option<BusinessIntro>) -> String {
108850            format!("{my_enum:?}")
108851        }
108852        #[rhai_fn(global, name = "to_debug", pure)]
108853        pub fn to_debug(my_enum: &mut Option<BusinessIntro>) -> String {
108854            format!("{:?}", my_enum)
108855        }
108856    }
108857    #[export_module]
108858    #[warn(non_snake_case)]
108859    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108860    mod GiveawayCreatedModule {
108861        #[doc = r" `Option::None` with no inner data"]
108862        pub const None: Option<GiveawayCreated> = Option::None;
108863        #[doc = r" `Option::Some`"]
108864        pub fn Some(value: GiveawayCreated) -> Option<GiveawayCreated> {
108865            Option::Some(value)
108866        }
108867        #[doc = r" Return the current variant of `MyEnum`."]
108868        #[rhai_fn(global, get = "enum_type", pure)]
108869        pub fn get_type(my_enum: &mut Option<GiveawayCreated>) -> String {
108870            match my_enum {
108871                Option::None => "None".to_string(),
108872                Option::Some(_) => "Some".to_string(),
108873            }
108874        }
108875        #[doc = r" Return the inner value."]
108876        #[rhai_fn(global, get = "value", pure)]
108877        pub fn get_value(my_enum: &mut Option<GiveawayCreated>) -> Dynamic {
108878            match my_enum {
108879                Option::None => Dynamic::UNIT,
108880                Option::Some(x) => Dynamic::from(x.clone()),
108881            }
108882        }
108883        #[rhai_fn(global, name = "to_string", pure)]
108884        pub fn to_string(my_enum: &mut Option<GiveawayCreated>) -> String {
108885            format!("{my_enum:?}")
108886        }
108887        #[rhai_fn(global, name = "to_debug", pure)]
108888        pub fn to_debug(my_enum: &mut Option<GiveawayCreated>) -> String {
108889            format!("{:?}", my_enum)
108890        }
108891    }
108892    #[export_module]
108893    #[warn(non_snake_case)]
108894    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108895    mod InputProfilePhotoModule {
108896        #[doc = r" `Option::None` with no inner data"]
108897        pub const None: Option<InputProfilePhoto> = Option::None;
108898        #[doc = r" `Option::Some`"]
108899        pub fn Some(value: InputProfilePhoto) -> Option<InputProfilePhoto> {
108900            Option::Some(value)
108901        }
108902        #[doc = r" Return the current variant of `MyEnum`."]
108903        #[rhai_fn(global, get = "enum_type", pure)]
108904        pub fn get_type(my_enum: &mut Option<InputProfilePhoto>) -> String {
108905            match my_enum {
108906                Option::None => "None".to_string(),
108907                Option::Some(_) => "Some".to_string(),
108908            }
108909        }
108910        #[doc = r" Return the inner value."]
108911        #[rhai_fn(global, get = "value", pure)]
108912        pub fn get_value(my_enum: &mut Option<InputProfilePhoto>) -> Dynamic {
108913            match my_enum {
108914                Option::None => Dynamic::UNIT,
108915                Option::Some(x) => Dynamic::from(x.clone()),
108916            }
108917        }
108918        #[rhai_fn(global, name = "to_string", pure)]
108919        pub fn to_string(my_enum: &mut Option<InputProfilePhoto>) -> String {
108920            format!("{my_enum:?}")
108921        }
108922        #[rhai_fn(global, name = "to_debug", pure)]
108923        pub fn to_debug(my_enum: &mut Option<InputProfilePhoto>) -> String {
108924            format!("{:?}", my_enum)
108925        }
108926    }
108927    #[export_module]
108928    #[warn(non_snake_case)]
108929    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108930    mod ChatMemberAdministratorModule {
108931        #[doc = r" `Option::None` with no inner data"]
108932        pub const None: Option<ChatMemberAdministrator> = Option::None;
108933        #[doc = r" `Option::Some`"]
108934        pub fn Some(value: ChatMemberAdministrator) -> Option<ChatMemberAdministrator> {
108935            Option::Some(value)
108936        }
108937        #[doc = r" Return the current variant of `MyEnum`."]
108938        #[rhai_fn(global, get = "enum_type", pure)]
108939        pub fn get_type(my_enum: &mut Option<ChatMemberAdministrator>) -> String {
108940            match my_enum {
108941                Option::None => "None".to_string(),
108942                Option::Some(_) => "Some".to_string(),
108943            }
108944        }
108945        #[doc = r" Return the inner value."]
108946        #[rhai_fn(global, get = "value", pure)]
108947        pub fn get_value(my_enum: &mut Option<ChatMemberAdministrator>) -> Dynamic {
108948            match my_enum {
108949                Option::None => Dynamic::UNIT,
108950                Option::Some(x) => Dynamic::from(x.clone()),
108951            }
108952        }
108953        #[rhai_fn(global, name = "to_string", pure)]
108954        pub fn to_string(my_enum: &mut Option<ChatMemberAdministrator>) -> String {
108955            format!("{my_enum:?}")
108956        }
108957        #[rhai_fn(global, name = "to_debug", pure)]
108958        pub fn to_debug(my_enum: &mut Option<ChatMemberAdministrator>) -> String {
108959            format!("{:?}", my_enum)
108960        }
108961    }
108962    #[export_module]
108963    #[warn(non_snake_case)]
108964    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
108965    mod InlineQueryResultGifModule {
108966        #[doc = r" `Option::None` with no inner data"]
108967        pub const None: Option<InlineQueryResultGif> = Option::None;
108968        #[doc = r" `Option::Some`"]
108969        pub fn Some(value: InlineQueryResultGif) -> Option<InlineQueryResultGif> {
108970            Option::Some(value)
108971        }
108972        #[doc = r" Return the current variant of `MyEnum`."]
108973        #[rhai_fn(global, get = "enum_type", pure)]
108974        pub fn get_type(my_enum: &mut Option<InlineQueryResultGif>) -> String {
108975            match my_enum {
108976                Option::None => "None".to_string(),
108977                Option::Some(_) => "Some".to_string(),
108978            }
108979        }
108980        #[doc = r" Return the inner value."]
108981        #[rhai_fn(global, get = "value", pure)]
108982        pub fn get_value(my_enum: &mut Option<InlineQueryResultGif>) -> Dynamic {
108983            match my_enum {
108984                Option::None => Dynamic::UNIT,
108985                Option::Some(x) => Dynamic::from(x.clone()),
108986            }
108987        }
108988        #[rhai_fn(global, name = "to_string", pure)]
108989        pub fn to_string(my_enum: &mut Option<InlineQueryResultGif>) -> String {
108990            format!("{my_enum:?}")
108991        }
108992        #[rhai_fn(global, name = "to_debug", pure)]
108993        pub fn to_debug(my_enum: &mut Option<InlineQueryResultGif>) -> String {
108994            format!("{:?}", my_enum)
108995        }
108996    }
108997    #[export_module]
108998    #[warn(non_snake_case)]
108999    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109000    mod InputProfilePhotoAnimatedModule {
109001        #[doc = r" `Option::None` with no inner data"]
109002        pub const None: Option<InputProfilePhotoAnimated> = Option::None;
109003        #[doc = r" `Option::Some`"]
109004        pub fn Some(value: InputProfilePhotoAnimated) -> Option<InputProfilePhotoAnimated> {
109005            Option::Some(value)
109006        }
109007        #[doc = r" Return the current variant of `MyEnum`."]
109008        #[rhai_fn(global, get = "enum_type", pure)]
109009        pub fn get_type(my_enum: &mut Option<InputProfilePhotoAnimated>) -> String {
109010            match my_enum {
109011                Option::None => "None".to_string(),
109012                Option::Some(_) => "Some".to_string(),
109013            }
109014        }
109015        #[doc = r" Return the inner value."]
109016        #[rhai_fn(global, get = "value", pure)]
109017        pub fn get_value(my_enum: &mut Option<InputProfilePhotoAnimated>) -> Dynamic {
109018            match my_enum {
109019                Option::None => Dynamic::UNIT,
109020                Option::Some(x) => Dynamic::from(x.clone()),
109021            }
109022        }
109023        #[rhai_fn(global, name = "to_string", pure)]
109024        pub fn to_string(my_enum: &mut Option<InputProfilePhotoAnimated>) -> String {
109025            format!("{my_enum:?}")
109026        }
109027        #[rhai_fn(global, name = "to_debug", pure)]
109028        pub fn to_debug(my_enum: &mut Option<InputProfilePhotoAnimated>) -> String {
109029            format!("{:?}", my_enum)
109030        }
109031    }
109032    #[export_module]
109033    #[warn(non_snake_case)]
109034    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109035    mod VideoChatParticipantsInvitedModule {
109036        #[doc = r" `Option::None` with no inner data"]
109037        pub const None: Option<VideoChatParticipantsInvited> = Option::None;
109038        #[doc = r" `Option::Some`"]
109039        pub fn Some(value: VideoChatParticipantsInvited) -> Option<VideoChatParticipantsInvited> {
109040            Option::Some(value)
109041        }
109042        #[doc = r" Return the current variant of `MyEnum`."]
109043        #[rhai_fn(global, get = "enum_type", pure)]
109044        pub fn get_type(my_enum: &mut Option<VideoChatParticipantsInvited>) -> String {
109045            match my_enum {
109046                Option::None => "None".to_string(),
109047                Option::Some(_) => "Some".to_string(),
109048            }
109049        }
109050        #[doc = r" Return the inner value."]
109051        #[rhai_fn(global, get = "value", pure)]
109052        pub fn get_value(my_enum: &mut Option<VideoChatParticipantsInvited>) -> Dynamic {
109053            match my_enum {
109054                Option::None => Dynamic::UNIT,
109055                Option::Some(x) => Dynamic::from(x.clone()),
109056            }
109057        }
109058        #[rhai_fn(global, name = "to_string", pure)]
109059        pub fn to_string(my_enum: &mut Option<VideoChatParticipantsInvited>) -> String {
109060            format!("{my_enum:?}")
109061        }
109062        #[rhai_fn(global, name = "to_debug", pure)]
109063        pub fn to_debug(my_enum: &mut Option<VideoChatParticipantsInvited>) -> String {
109064            format!("{:?}", my_enum)
109065        }
109066    }
109067    #[export_module]
109068    #[warn(non_snake_case)]
109069    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109070    mod LoginUrlModule {
109071        #[doc = r" `Option::None` with no inner data"]
109072        pub const None: Option<LoginUrl> = Option::None;
109073        #[doc = r" `Option::Some`"]
109074        pub fn Some(value: LoginUrl) -> Option<LoginUrl> {
109075            Option::Some(value)
109076        }
109077        #[doc = r" Return the current variant of `MyEnum`."]
109078        #[rhai_fn(global, get = "enum_type", pure)]
109079        pub fn get_type(my_enum: &mut Option<LoginUrl>) -> String {
109080            match my_enum {
109081                Option::None => "None".to_string(),
109082                Option::Some(_) => "Some".to_string(),
109083            }
109084        }
109085        #[doc = r" Return the inner value."]
109086        #[rhai_fn(global, get = "value", pure)]
109087        pub fn get_value(my_enum: &mut Option<LoginUrl>) -> Dynamic {
109088            match my_enum {
109089                Option::None => Dynamic::UNIT,
109090                Option::Some(x) => Dynamic::from(x.clone()),
109091            }
109092        }
109093        #[rhai_fn(global, name = "to_string", pure)]
109094        pub fn to_string(my_enum: &mut Option<LoginUrl>) -> String {
109095            format!("{my_enum:?}")
109096        }
109097        #[rhai_fn(global, name = "to_debug", pure)]
109098        pub fn to_debug(my_enum: &mut Option<LoginUrl>) -> String {
109099            format!("{:?}", my_enum)
109100        }
109101    }
109102    #[export_module]
109103    #[warn(non_snake_case)]
109104    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109105    mod ChosenInlineResultModule {
109106        #[doc = r" `Option::None` with no inner data"]
109107        pub const None: Option<ChosenInlineResult> = Option::None;
109108        #[doc = r" `Option::Some`"]
109109        pub fn Some(value: ChosenInlineResult) -> Option<ChosenInlineResult> {
109110            Option::Some(value)
109111        }
109112        #[doc = r" Return the current variant of `MyEnum`."]
109113        #[rhai_fn(global, get = "enum_type", pure)]
109114        pub fn get_type(my_enum: &mut Option<ChosenInlineResult>) -> String {
109115            match my_enum {
109116                Option::None => "None".to_string(),
109117                Option::Some(_) => "Some".to_string(),
109118            }
109119        }
109120        #[doc = r" Return the inner value."]
109121        #[rhai_fn(global, get = "value", pure)]
109122        pub fn get_value(my_enum: &mut Option<ChosenInlineResult>) -> Dynamic {
109123            match my_enum {
109124                Option::None => Dynamic::UNIT,
109125                Option::Some(x) => Dynamic::from(x.clone()),
109126            }
109127        }
109128        #[rhai_fn(global, name = "to_string", pure)]
109129        pub fn to_string(my_enum: &mut Option<ChosenInlineResult>) -> String {
109130            format!("{my_enum:?}")
109131        }
109132        #[rhai_fn(global, name = "to_debug", pure)]
109133        pub fn to_debug(my_enum: &mut Option<ChosenInlineResult>) -> String {
109134            format!("{:?}", my_enum)
109135        }
109136    }
109137    #[export_module]
109138    #[warn(non_snake_case)]
109139    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109140    mod PassportElementErrorUnspecifiedModule {
109141        #[doc = r" `Option::None` with no inner data"]
109142        pub const None: Option<PassportElementErrorUnspecified> = Option::None;
109143        #[doc = r" `Option::Some`"]
109144        pub fn Some(
109145            value: PassportElementErrorUnspecified,
109146        ) -> Option<PassportElementErrorUnspecified> {
109147            Option::Some(value)
109148        }
109149        #[doc = r" Return the current variant of `MyEnum`."]
109150        #[rhai_fn(global, get = "enum_type", pure)]
109151        pub fn get_type(my_enum: &mut Option<PassportElementErrorUnspecified>) -> String {
109152            match my_enum {
109153                Option::None => "None".to_string(),
109154                Option::Some(_) => "Some".to_string(),
109155            }
109156        }
109157        #[doc = r" Return the inner value."]
109158        #[rhai_fn(global, get = "value", pure)]
109159        pub fn get_value(my_enum: &mut Option<PassportElementErrorUnspecified>) -> Dynamic {
109160            match my_enum {
109161                Option::None => Dynamic::UNIT,
109162                Option::Some(x) => Dynamic::from(x.clone()),
109163            }
109164        }
109165        #[rhai_fn(global, name = "to_string", pure)]
109166        pub fn to_string(my_enum: &mut Option<PassportElementErrorUnspecified>) -> String {
109167            format!("{my_enum:?}")
109168        }
109169        #[rhai_fn(global, name = "to_debug", pure)]
109170        pub fn to_debug(my_enum: &mut Option<PassportElementErrorUnspecified>) -> String {
109171            format!("{:?}", my_enum)
109172        }
109173    }
109174    #[export_module]
109175    #[warn(non_snake_case)]
109176    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109177    mod MenuButtonWebAppModule {
109178        #[doc = r" `Option::None` with no inner data"]
109179        pub const None: Option<MenuButtonWebApp> = Option::None;
109180        #[doc = r" `Option::Some`"]
109181        pub fn Some(value: MenuButtonWebApp) -> Option<MenuButtonWebApp> {
109182            Option::Some(value)
109183        }
109184        #[doc = r" Return the current variant of `MyEnum`."]
109185        #[rhai_fn(global, get = "enum_type", pure)]
109186        pub fn get_type(my_enum: &mut Option<MenuButtonWebApp>) -> String {
109187            match my_enum {
109188                Option::None => "None".to_string(),
109189                Option::Some(_) => "Some".to_string(),
109190            }
109191        }
109192        #[doc = r" Return the inner value."]
109193        #[rhai_fn(global, get = "value", pure)]
109194        pub fn get_value(my_enum: &mut Option<MenuButtonWebApp>) -> Dynamic {
109195            match my_enum {
109196                Option::None => Dynamic::UNIT,
109197                Option::Some(x) => Dynamic::from(x.clone()),
109198            }
109199        }
109200        #[rhai_fn(global, name = "to_string", pure)]
109201        pub fn to_string(my_enum: &mut Option<MenuButtonWebApp>) -> String {
109202            format!("{my_enum:?}")
109203        }
109204        #[rhai_fn(global, name = "to_debug", pure)]
109205        pub fn to_debug(my_enum: &mut Option<MenuButtonWebApp>) -> String {
109206            format!("{:?}", my_enum)
109207        }
109208    }
109209    #[export_module]
109210    #[warn(non_snake_case)]
109211    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109212    mod UserChatBoostsModule {
109213        #[doc = r" `Option::None` with no inner data"]
109214        pub const None: Option<UserChatBoosts> = Option::None;
109215        #[doc = r" `Option::Some`"]
109216        pub fn Some(value: UserChatBoosts) -> Option<UserChatBoosts> {
109217            Option::Some(value)
109218        }
109219        #[doc = r" Return the current variant of `MyEnum`."]
109220        #[rhai_fn(global, get = "enum_type", pure)]
109221        pub fn get_type(my_enum: &mut Option<UserChatBoosts>) -> String {
109222            match my_enum {
109223                Option::None => "None".to_string(),
109224                Option::Some(_) => "Some".to_string(),
109225            }
109226        }
109227        #[doc = r" Return the inner value."]
109228        #[rhai_fn(global, get = "value", pure)]
109229        pub fn get_value(my_enum: &mut Option<UserChatBoosts>) -> Dynamic {
109230            match my_enum {
109231                Option::None => Dynamic::UNIT,
109232                Option::Some(x) => Dynamic::from(x.clone()),
109233            }
109234        }
109235        #[rhai_fn(global, name = "to_string", pure)]
109236        pub fn to_string(my_enum: &mut Option<UserChatBoosts>) -> String {
109237            format!("{my_enum:?}")
109238        }
109239        #[rhai_fn(global, name = "to_debug", pure)]
109240        pub fn to_debug(my_enum: &mut Option<UserChatBoosts>) -> String {
109241            format!("{:?}", my_enum)
109242        }
109243    }
109244    #[export_module]
109245    #[warn(non_snake_case)]
109246    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109247    mod GiftInfoModule {
109248        #[doc = r" `Option::None` with no inner data"]
109249        pub const None: Option<GiftInfo> = Option::None;
109250        #[doc = r" `Option::Some`"]
109251        pub fn Some(value: GiftInfo) -> Option<GiftInfo> {
109252            Option::Some(value)
109253        }
109254        #[doc = r" Return the current variant of `MyEnum`."]
109255        #[rhai_fn(global, get = "enum_type", pure)]
109256        pub fn get_type(my_enum: &mut Option<GiftInfo>) -> String {
109257            match my_enum {
109258                Option::None => "None".to_string(),
109259                Option::Some(_) => "Some".to_string(),
109260            }
109261        }
109262        #[doc = r" Return the inner value."]
109263        #[rhai_fn(global, get = "value", pure)]
109264        pub fn get_value(my_enum: &mut Option<GiftInfo>) -> Dynamic {
109265            match my_enum {
109266                Option::None => Dynamic::UNIT,
109267                Option::Some(x) => Dynamic::from(x.clone()),
109268            }
109269        }
109270        #[rhai_fn(global, name = "to_string", pure)]
109271        pub fn to_string(my_enum: &mut Option<GiftInfo>) -> String {
109272            format!("{my_enum:?}")
109273        }
109274        #[rhai_fn(global, name = "to_debug", pure)]
109275        pub fn to_debug(my_enum: &mut Option<GiftInfo>) -> String {
109276            format!("{:?}", my_enum)
109277        }
109278    }
109279    #[export_module]
109280    #[warn(non_snake_case)]
109281    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109282    mod ShippingAddressModule {
109283        #[doc = r" `Option::None` with no inner data"]
109284        pub const None: Option<ShippingAddress> = Option::None;
109285        #[doc = r" `Option::Some`"]
109286        pub fn Some(value: ShippingAddress) -> Option<ShippingAddress> {
109287            Option::Some(value)
109288        }
109289        #[doc = r" Return the current variant of `MyEnum`."]
109290        #[rhai_fn(global, get = "enum_type", pure)]
109291        pub fn get_type(my_enum: &mut Option<ShippingAddress>) -> String {
109292            match my_enum {
109293                Option::None => "None".to_string(),
109294                Option::Some(_) => "Some".to_string(),
109295            }
109296        }
109297        #[doc = r" Return the inner value."]
109298        #[rhai_fn(global, get = "value", pure)]
109299        pub fn get_value(my_enum: &mut Option<ShippingAddress>) -> Dynamic {
109300            match my_enum {
109301                Option::None => Dynamic::UNIT,
109302                Option::Some(x) => Dynamic::from(x.clone()),
109303            }
109304        }
109305        #[rhai_fn(global, name = "to_string", pure)]
109306        pub fn to_string(my_enum: &mut Option<ShippingAddress>) -> String {
109307            format!("{my_enum:?}")
109308        }
109309        #[rhai_fn(global, name = "to_debug", pure)]
109310        pub fn to_debug(my_enum: &mut Option<ShippingAddress>) -> String {
109311            format!("{:?}", my_enum)
109312        }
109313    }
109314    #[export_module]
109315    #[warn(non_snake_case)]
109316    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109317    mod MessageAutoDeleteTimerChangedModule {
109318        #[doc = r" `Option::None` with no inner data"]
109319        pub const None: Option<MessageAutoDeleteTimerChanged> = Option::None;
109320        #[doc = r" `Option::Some`"]
109321        pub fn Some(value: MessageAutoDeleteTimerChanged) -> Option<MessageAutoDeleteTimerChanged> {
109322            Option::Some(value)
109323        }
109324        #[doc = r" Return the current variant of `MyEnum`."]
109325        #[rhai_fn(global, get = "enum_type", pure)]
109326        pub fn get_type(my_enum: &mut Option<MessageAutoDeleteTimerChanged>) -> String {
109327            match my_enum {
109328                Option::None => "None".to_string(),
109329                Option::Some(_) => "Some".to_string(),
109330            }
109331        }
109332        #[doc = r" Return the inner value."]
109333        #[rhai_fn(global, get = "value", pure)]
109334        pub fn get_value(my_enum: &mut Option<MessageAutoDeleteTimerChanged>) -> Dynamic {
109335            match my_enum {
109336                Option::None => Dynamic::UNIT,
109337                Option::Some(x) => Dynamic::from(x.clone()),
109338            }
109339        }
109340        #[rhai_fn(global, name = "to_string", pure)]
109341        pub fn to_string(my_enum: &mut Option<MessageAutoDeleteTimerChanged>) -> String {
109342            format!("{my_enum:?}")
109343        }
109344        #[rhai_fn(global, name = "to_debug", pure)]
109345        pub fn to_debug(my_enum: &mut Option<MessageAutoDeleteTimerChanged>) -> String {
109346            format!("{:?}", my_enum)
109347        }
109348    }
109349    #[export_module]
109350    #[warn(non_snake_case)]
109351    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109352    mod BackgroundFillModule {
109353        #[doc = r" `Option::None` with no inner data"]
109354        pub const None: Option<BackgroundFill> = Option::None;
109355        #[doc = r" `Option::Some`"]
109356        pub fn Some(value: BackgroundFill) -> Option<BackgroundFill> {
109357            Option::Some(value)
109358        }
109359        #[doc = r" Return the current variant of `MyEnum`."]
109360        #[rhai_fn(global, get = "enum_type", pure)]
109361        pub fn get_type(my_enum: &mut Option<BackgroundFill>) -> String {
109362            match my_enum {
109363                Option::None => "None".to_string(),
109364                Option::Some(_) => "Some".to_string(),
109365            }
109366        }
109367        #[doc = r" Return the inner value."]
109368        #[rhai_fn(global, get = "value", pure)]
109369        pub fn get_value(my_enum: &mut Option<BackgroundFill>) -> Dynamic {
109370            match my_enum {
109371                Option::None => Dynamic::UNIT,
109372                Option::Some(x) => Dynamic::from(x.clone()),
109373            }
109374        }
109375        #[rhai_fn(global, name = "to_string", pure)]
109376        pub fn to_string(my_enum: &mut Option<BackgroundFill>) -> String {
109377            format!("{my_enum:?}")
109378        }
109379        #[rhai_fn(global, name = "to_debug", pure)]
109380        pub fn to_debug(my_enum: &mut Option<BackgroundFill>) -> String {
109381            format!("{:?}", my_enum)
109382        }
109383    }
109384    #[export_module]
109385    #[warn(non_snake_case)]
109386    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109387    mod InlineQueryResultsButtonModule {
109388        #[doc = r" `Option::None` with no inner data"]
109389        pub const None: Option<InlineQueryResultsButton> = Option::None;
109390        #[doc = r" `Option::Some`"]
109391        pub fn Some(value: InlineQueryResultsButton) -> Option<InlineQueryResultsButton> {
109392            Option::Some(value)
109393        }
109394        #[doc = r" Return the current variant of `MyEnum`."]
109395        #[rhai_fn(global, get = "enum_type", pure)]
109396        pub fn get_type(my_enum: &mut Option<InlineQueryResultsButton>) -> String {
109397            match my_enum {
109398                Option::None => "None".to_string(),
109399                Option::Some(_) => "Some".to_string(),
109400            }
109401        }
109402        #[doc = r" Return the inner value."]
109403        #[rhai_fn(global, get = "value", pure)]
109404        pub fn get_value(my_enum: &mut Option<InlineQueryResultsButton>) -> Dynamic {
109405            match my_enum {
109406                Option::None => Dynamic::UNIT,
109407                Option::Some(x) => Dynamic::from(x.clone()),
109408            }
109409        }
109410        #[rhai_fn(global, name = "to_string", pure)]
109411        pub fn to_string(my_enum: &mut Option<InlineQueryResultsButton>) -> String {
109412            format!("{my_enum:?}")
109413        }
109414        #[rhai_fn(global, name = "to_debug", pure)]
109415        pub fn to_debug(my_enum: &mut Option<InlineQueryResultsButton>) -> String {
109416            format!("{:?}", my_enum)
109417        }
109418    }
109419    #[export_module]
109420    #[warn(non_snake_case)]
109421    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109422    mod BackgroundFillSolidModule {
109423        #[doc = r" `Option::None` with no inner data"]
109424        pub const None: Option<BackgroundFillSolid> = Option::None;
109425        #[doc = r" `Option::Some`"]
109426        pub fn Some(value: BackgroundFillSolid) -> Option<BackgroundFillSolid> {
109427            Option::Some(value)
109428        }
109429        #[doc = r" Return the current variant of `MyEnum`."]
109430        #[rhai_fn(global, get = "enum_type", pure)]
109431        pub fn get_type(my_enum: &mut Option<BackgroundFillSolid>) -> String {
109432            match my_enum {
109433                Option::None => "None".to_string(),
109434                Option::Some(_) => "Some".to_string(),
109435            }
109436        }
109437        #[doc = r" Return the inner value."]
109438        #[rhai_fn(global, get = "value", pure)]
109439        pub fn get_value(my_enum: &mut Option<BackgroundFillSolid>) -> Dynamic {
109440            match my_enum {
109441                Option::None => Dynamic::UNIT,
109442                Option::Some(x) => Dynamic::from(x.clone()),
109443            }
109444        }
109445        #[rhai_fn(global, name = "to_string", pure)]
109446        pub fn to_string(my_enum: &mut Option<BackgroundFillSolid>) -> String {
109447            format!("{my_enum:?}")
109448        }
109449        #[rhai_fn(global, name = "to_debug", pure)]
109450        pub fn to_debug(my_enum: &mut Option<BackgroundFillSolid>) -> String {
109451            format!("{:?}", my_enum)
109452        }
109453    }
109454    #[export_module]
109455    #[warn(non_snake_case)]
109456    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109457    mod BotCommandScopeAllGroupChatsModule {
109458        #[doc = r" `Option::None` with no inner data"]
109459        pub const None: Option<BotCommandScopeAllGroupChats> = Option::None;
109460        #[doc = r" `Option::Some`"]
109461        pub fn Some(value: BotCommandScopeAllGroupChats) -> Option<BotCommandScopeAllGroupChats> {
109462            Option::Some(value)
109463        }
109464        #[doc = r" Return the current variant of `MyEnum`."]
109465        #[rhai_fn(global, get = "enum_type", pure)]
109466        pub fn get_type(my_enum: &mut Option<BotCommandScopeAllGroupChats>) -> String {
109467            match my_enum {
109468                Option::None => "None".to_string(),
109469                Option::Some(_) => "Some".to_string(),
109470            }
109471        }
109472        #[doc = r" Return the inner value."]
109473        #[rhai_fn(global, get = "value", pure)]
109474        pub fn get_value(my_enum: &mut Option<BotCommandScopeAllGroupChats>) -> Dynamic {
109475            match my_enum {
109476                Option::None => Dynamic::UNIT,
109477                Option::Some(x) => Dynamic::from(x.clone()),
109478            }
109479        }
109480        #[rhai_fn(global, name = "to_string", pure)]
109481        pub fn to_string(my_enum: &mut Option<BotCommandScopeAllGroupChats>) -> String {
109482            format!("{my_enum:?}")
109483        }
109484        #[rhai_fn(global, name = "to_debug", pure)]
109485        pub fn to_debug(my_enum: &mut Option<BotCommandScopeAllGroupChats>) -> String {
109486            format!("{:?}", my_enum)
109487        }
109488    }
109489    #[export_module]
109490    #[warn(non_snake_case)]
109491    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109492    mod ChatBoostUpdatedModule {
109493        #[doc = r" `Option::None` with no inner data"]
109494        pub const None: Option<ChatBoostUpdated> = Option::None;
109495        #[doc = r" `Option::Some`"]
109496        pub fn Some(value: ChatBoostUpdated) -> Option<ChatBoostUpdated> {
109497            Option::Some(value)
109498        }
109499        #[doc = r" Return the current variant of `MyEnum`."]
109500        #[rhai_fn(global, get = "enum_type", pure)]
109501        pub fn get_type(my_enum: &mut Option<ChatBoostUpdated>) -> String {
109502            match my_enum {
109503                Option::None => "None".to_string(),
109504                Option::Some(_) => "Some".to_string(),
109505            }
109506        }
109507        #[doc = r" Return the inner value."]
109508        #[rhai_fn(global, get = "value", pure)]
109509        pub fn get_value(my_enum: &mut Option<ChatBoostUpdated>) -> Dynamic {
109510            match my_enum {
109511                Option::None => Dynamic::UNIT,
109512                Option::Some(x) => Dynamic::from(x.clone()),
109513            }
109514        }
109515        #[rhai_fn(global, name = "to_string", pure)]
109516        pub fn to_string(my_enum: &mut Option<ChatBoostUpdated>) -> String {
109517            format!("{my_enum:?}")
109518        }
109519        #[rhai_fn(global, name = "to_debug", pure)]
109520        pub fn to_debug(my_enum: &mut Option<ChatBoostUpdated>) -> String {
109521            format!("{:?}", my_enum)
109522        }
109523    }
109524    #[export_module]
109525    #[warn(non_snake_case)]
109526    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109527    mod MaskPositionModule {
109528        #[doc = r" `Option::None` with no inner data"]
109529        pub const None: Option<MaskPosition> = Option::None;
109530        #[doc = r" `Option::Some`"]
109531        pub fn Some(value: MaskPosition) -> Option<MaskPosition> {
109532            Option::Some(value)
109533        }
109534        #[doc = r" Return the current variant of `MyEnum`."]
109535        #[rhai_fn(global, get = "enum_type", pure)]
109536        pub fn get_type(my_enum: &mut Option<MaskPosition>) -> String {
109537            match my_enum {
109538                Option::None => "None".to_string(),
109539                Option::Some(_) => "Some".to_string(),
109540            }
109541        }
109542        #[doc = r" Return the inner value."]
109543        #[rhai_fn(global, get = "value", pure)]
109544        pub fn get_value(my_enum: &mut Option<MaskPosition>) -> Dynamic {
109545            match my_enum {
109546                Option::None => Dynamic::UNIT,
109547                Option::Some(x) => Dynamic::from(x.clone()),
109548            }
109549        }
109550        #[rhai_fn(global, name = "to_string", pure)]
109551        pub fn to_string(my_enum: &mut Option<MaskPosition>) -> String {
109552            format!("{my_enum:?}")
109553        }
109554        #[rhai_fn(global, name = "to_debug", pure)]
109555        pub fn to_debug(my_enum: &mut Option<MaskPosition>) -> String {
109556            format!("{:?}", my_enum)
109557        }
109558    }
109559    #[export_module]
109560    #[warn(non_snake_case)]
109561    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109562    mod PassportElementErrorFileModule {
109563        #[doc = r" `Option::None` with no inner data"]
109564        pub const None: Option<PassportElementErrorFile> = Option::None;
109565        #[doc = r" `Option::Some`"]
109566        pub fn Some(value: PassportElementErrorFile) -> Option<PassportElementErrorFile> {
109567            Option::Some(value)
109568        }
109569        #[doc = r" Return the current variant of `MyEnum`."]
109570        #[rhai_fn(global, get = "enum_type", pure)]
109571        pub fn get_type(my_enum: &mut Option<PassportElementErrorFile>) -> String {
109572            match my_enum {
109573                Option::None => "None".to_string(),
109574                Option::Some(_) => "Some".to_string(),
109575            }
109576        }
109577        #[doc = r" Return the inner value."]
109578        #[rhai_fn(global, get = "value", pure)]
109579        pub fn get_value(my_enum: &mut Option<PassportElementErrorFile>) -> Dynamic {
109580            match my_enum {
109581                Option::None => Dynamic::UNIT,
109582                Option::Some(x) => Dynamic::from(x.clone()),
109583            }
109584        }
109585        #[rhai_fn(global, name = "to_string", pure)]
109586        pub fn to_string(my_enum: &mut Option<PassportElementErrorFile>) -> String {
109587            format!("{my_enum:?}")
109588        }
109589        #[rhai_fn(global, name = "to_debug", pure)]
109590        pub fn to_debug(my_enum: &mut Option<PassportElementErrorFile>) -> String {
109591            format!("{:?}", my_enum)
109592        }
109593    }
109594    #[export_module]
109595    #[warn(non_snake_case)]
109596    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109597    mod StickerModule {
109598        #[doc = r" `Option::None` with no inner data"]
109599        pub const None: Option<Sticker> = Option::None;
109600        #[doc = r" `Option::Some`"]
109601        pub fn Some(value: Sticker) -> Option<Sticker> {
109602            Option::Some(value)
109603        }
109604        #[doc = r" Return the current variant of `MyEnum`."]
109605        #[rhai_fn(global, get = "enum_type", pure)]
109606        pub fn get_type(my_enum: &mut Option<Sticker>) -> String {
109607            match my_enum {
109608                Option::None => "None".to_string(),
109609                Option::Some(_) => "Some".to_string(),
109610            }
109611        }
109612        #[doc = r" Return the inner value."]
109613        #[rhai_fn(global, get = "value", pure)]
109614        pub fn get_value(my_enum: &mut Option<Sticker>) -> Dynamic {
109615            match my_enum {
109616                Option::None => Dynamic::UNIT,
109617                Option::Some(x) => Dynamic::from(x.clone()),
109618            }
109619        }
109620        #[rhai_fn(global, name = "to_string", pure)]
109621        pub fn to_string(my_enum: &mut Option<Sticker>) -> String {
109622            format!("{my_enum:?}")
109623        }
109624        #[rhai_fn(global, name = "to_debug", pure)]
109625        pub fn to_debug(my_enum: &mut Option<Sticker>) -> String {
109626            format!("{:?}", my_enum)
109627        }
109628    }
109629    #[export_module]
109630    #[warn(non_snake_case)]
109631    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109632    mod PassportElementErrorSelfieModule {
109633        #[doc = r" `Option::None` with no inner data"]
109634        pub const None: Option<PassportElementErrorSelfie> = Option::None;
109635        #[doc = r" `Option::Some`"]
109636        pub fn Some(value: PassportElementErrorSelfie) -> Option<PassportElementErrorSelfie> {
109637            Option::Some(value)
109638        }
109639        #[doc = r" Return the current variant of `MyEnum`."]
109640        #[rhai_fn(global, get = "enum_type", pure)]
109641        pub fn get_type(my_enum: &mut Option<PassportElementErrorSelfie>) -> String {
109642            match my_enum {
109643                Option::None => "None".to_string(),
109644                Option::Some(_) => "Some".to_string(),
109645            }
109646        }
109647        #[doc = r" Return the inner value."]
109648        #[rhai_fn(global, get = "value", pure)]
109649        pub fn get_value(my_enum: &mut Option<PassportElementErrorSelfie>) -> Dynamic {
109650            match my_enum {
109651                Option::None => Dynamic::UNIT,
109652                Option::Some(x) => Dynamic::from(x.clone()),
109653            }
109654        }
109655        #[rhai_fn(global, name = "to_string", pure)]
109656        pub fn to_string(my_enum: &mut Option<PassportElementErrorSelfie>) -> String {
109657            format!("{my_enum:?}")
109658        }
109659        #[rhai_fn(global, name = "to_debug", pure)]
109660        pub fn to_debug(my_enum: &mut Option<PassportElementErrorSelfie>) -> String {
109661            format!("{:?}", my_enum)
109662        }
109663    }
109664    #[export_module]
109665    #[warn(non_snake_case)]
109666    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109667    mod BackgroundTypePatternModule {
109668        #[doc = r" `Option::None` with no inner data"]
109669        pub const None: Option<BackgroundTypePattern> = Option::None;
109670        #[doc = r" `Option::Some`"]
109671        pub fn Some(value: BackgroundTypePattern) -> Option<BackgroundTypePattern> {
109672            Option::Some(value)
109673        }
109674        #[doc = r" Return the current variant of `MyEnum`."]
109675        #[rhai_fn(global, get = "enum_type", pure)]
109676        pub fn get_type(my_enum: &mut Option<BackgroundTypePattern>) -> String {
109677            match my_enum {
109678                Option::None => "None".to_string(),
109679                Option::Some(_) => "Some".to_string(),
109680            }
109681        }
109682        #[doc = r" Return the inner value."]
109683        #[rhai_fn(global, get = "value", pure)]
109684        pub fn get_value(my_enum: &mut Option<BackgroundTypePattern>) -> Dynamic {
109685            match my_enum {
109686                Option::None => Dynamic::UNIT,
109687                Option::Some(x) => Dynamic::from(x.clone()),
109688            }
109689        }
109690        #[rhai_fn(global, name = "to_string", pure)]
109691        pub fn to_string(my_enum: &mut Option<BackgroundTypePattern>) -> String {
109692            format!("{my_enum:?}")
109693        }
109694        #[rhai_fn(global, name = "to_debug", pure)]
109695        pub fn to_debug(my_enum: &mut Option<BackgroundTypePattern>) -> String {
109696            format!("{:?}", my_enum)
109697        }
109698    }
109699    #[export_module]
109700    #[warn(non_snake_case)]
109701    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109702    mod StarAmountModule {
109703        #[doc = r" `Option::None` with no inner data"]
109704        pub const None: Option<StarAmount> = Option::None;
109705        #[doc = r" `Option::Some`"]
109706        pub fn Some(value: StarAmount) -> Option<StarAmount> {
109707            Option::Some(value)
109708        }
109709        #[doc = r" Return the current variant of `MyEnum`."]
109710        #[rhai_fn(global, get = "enum_type", pure)]
109711        pub fn get_type(my_enum: &mut Option<StarAmount>) -> String {
109712            match my_enum {
109713                Option::None => "None".to_string(),
109714                Option::Some(_) => "Some".to_string(),
109715            }
109716        }
109717        #[doc = r" Return the inner value."]
109718        #[rhai_fn(global, get = "value", pure)]
109719        pub fn get_value(my_enum: &mut Option<StarAmount>) -> Dynamic {
109720            match my_enum {
109721                Option::None => Dynamic::UNIT,
109722                Option::Some(x) => Dynamic::from(x.clone()),
109723            }
109724        }
109725        #[rhai_fn(global, name = "to_string", pure)]
109726        pub fn to_string(my_enum: &mut Option<StarAmount>) -> String {
109727            format!("{my_enum:?}")
109728        }
109729        #[rhai_fn(global, name = "to_debug", pure)]
109730        pub fn to_debug(my_enum: &mut Option<StarAmount>) -> String {
109731            format!("{:?}", my_enum)
109732        }
109733    }
109734    #[export_module]
109735    #[warn(non_snake_case)]
109736    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109737    mod TransactionPartnerFragmentModule {
109738        #[doc = r" `Option::None` with no inner data"]
109739        pub const None: Option<TransactionPartnerFragment> = Option::None;
109740        #[doc = r" `Option::Some`"]
109741        pub fn Some(value: TransactionPartnerFragment) -> Option<TransactionPartnerFragment> {
109742            Option::Some(value)
109743        }
109744        #[doc = r" Return the current variant of `MyEnum`."]
109745        #[rhai_fn(global, get = "enum_type", pure)]
109746        pub fn get_type(my_enum: &mut Option<TransactionPartnerFragment>) -> String {
109747            match my_enum {
109748                Option::None => "None".to_string(),
109749                Option::Some(_) => "Some".to_string(),
109750            }
109751        }
109752        #[doc = r" Return the inner value."]
109753        #[rhai_fn(global, get = "value", pure)]
109754        pub fn get_value(my_enum: &mut Option<TransactionPartnerFragment>) -> Dynamic {
109755            match my_enum {
109756                Option::None => Dynamic::UNIT,
109757                Option::Some(x) => Dynamic::from(x.clone()),
109758            }
109759        }
109760        #[rhai_fn(global, name = "to_string", pure)]
109761        pub fn to_string(my_enum: &mut Option<TransactionPartnerFragment>) -> String {
109762            format!("{my_enum:?}")
109763        }
109764        #[rhai_fn(global, name = "to_debug", pure)]
109765        pub fn to_debug(my_enum: &mut Option<TransactionPartnerFragment>) -> String {
109766            format!("{:?}", my_enum)
109767        }
109768    }
109769    #[export_module]
109770    #[warn(non_snake_case)]
109771    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109772    mod ChatMemberLeftModule {
109773        #[doc = r" `Option::None` with no inner data"]
109774        pub const None: Option<ChatMemberLeft> = Option::None;
109775        #[doc = r" `Option::Some`"]
109776        pub fn Some(value: ChatMemberLeft) -> Option<ChatMemberLeft> {
109777            Option::Some(value)
109778        }
109779        #[doc = r" Return the current variant of `MyEnum`."]
109780        #[rhai_fn(global, get = "enum_type", pure)]
109781        pub fn get_type(my_enum: &mut Option<ChatMemberLeft>) -> String {
109782            match my_enum {
109783                Option::None => "None".to_string(),
109784                Option::Some(_) => "Some".to_string(),
109785            }
109786        }
109787        #[doc = r" Return the inner value."]
109788        #[rhai_fn(global, get = "value", pure)]
109789        pub fn get_value(my_enum: &mut Option<ChatMemberLeft>) -> Dynamic {
109790            match my_enum {
109791                Option::None => Dynamic::UNIT,
109792                Option::Some(x) => Dynamic::from(x.clone()),
109793            }
109794        }
109795        #[rhai_fn(global, name = "to_string", pure)]
109796        pub fn to_string(my_enum: &mut Option<ChatMemberLeft>) -> String {
109797            format!("{my_enum:?}")
109798        }
109799        #[rhai_fn(global, name = "to_debug", pure)]
109800        pub fn to_debug(my_enum: &mut Option<ChatMemberLeft>) -> String {
109801            format!("{:?}", my_enum)
109802        }
109803    }
109804    #[export_module]
109805    #[warn(non_snake_case)]
109806    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109807    mod PaidMediaPhotoModule {
109808        #[doc = r" `Option::None` with no inner data"]
109809        pub const None: Option<PaidMediaPhoto> = Option::None;
109810        #[doc = r" `Option::Some`"]
109811        pub fn Some(value: PaidMediaPhoto) -> Option<PaidMediaPhoto> {
109812            Option::Some(value)
109813        }
109814        #[doc = r" Return the current variant of `MyEnum`."]
109815        #[rhai_fn(global, get = "enum_type", pure)]
109816        pub fn get_type(my_enum: &mut Option<PaidMediaPhoto>) -> String {
109817            match my_enum {
109818                Option::None => "None".to_string(),
109819                Option::Some(_) => "Some".to_string(),
109820            }
109821        }
109822        #[doc = r" Return the inner value."]
109823        #[rhai_fn(global, get = "value", pure)]
109824        pub fn get_value(my_enum: &mut Option<PaidMediaPhoto>) -> Dynamic {
109825            match my_enum {
109826                Option::None => Dynamic::UNIT,
109827                Option::Some(x) => Dynamic::from(x.clone()),
109828            }
109829        }
109830        #[rhai_fn(global, name = "to_string", pure)]
109831        pub fn to_string(my_enum: &mut Option<PaidMediaPhoto>) -> String {
109832            format!("{my_enum:?}")
109833        }
109834        #[rhai_fn(global, name = "to_debug", pure)]
109835        pub fn to_debug(my_enum: &mut Option<PaidMediaPhoto>) -> String {
109836            format!("{:?}", my_enum)
109837        }
109838    }
109839    #[export_module]
109840    #[warn(non_snake_case)]
109841    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109842    mod UniqueGiftModule {
109843        #[doc = r" `Option::None` with no inner data"]
109844        pub const None: Option<UniqueGift> = Option::None;
109845        #[doc = r" `Option::Some`"]
109846        pub fn Some(value: UniqueGift) -> Option<UniqueGift> {
109847            Option::Some(value)
109848        }
109849        #[doc = r" Return the current variant of `MyEnum`."]
109850        #[rhai_fn(global, get = "enum_type", pure)]
109851        pub fn get_type(my_enum: &mut Option<UniqueGift>) -> String {
109852            match my_enum {
109853                Option::None => "None".to_string(),
109854                Option::Some(_) => "Some".to_string(),
109855            }
109856        }
109857        #[doc = r" Return the inner value."]
109858        #[rhai_fn(global, get = "value", pure)]
109859        pub fn get_value(my_enum: &mut Option<UniqueGift>) -> Dynamic {
109860            match my_enum {
109861                Option::None => Dynamic::UNIT,
109862                Option::Some(x) => Dynamic::from(x.clone()),
109863            }
109864        }
109865        #[rhai_fn(global, name = "to_string", pure)]
109866        pub fn to_string(my_enum: &mut Option<UniqueGift>) -> String {
109867            format!("{my_enum:?}")
109868        }
109869        #[rhai_fn(global, name = "to_debug", pure)]
109870        pub fn to_debug(my_enum: &mut Option<UniqueGift>) -> String {
109871            format!("{:?}", my_enum)
109872        }
109873    }
109874    #[export_module]
109875    #[warn(non_snake_case)]
109876    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109877    mod MenuButtonCommandsModule {
109878        #[doc = r" `Option::None` with no inner data"]
109879        pub const None: Option<MenuButtonCommands> = Option::None;
109880        #[doc = r" `Option::Some`"]
109881        pub fn Some(value: MenuButtonCommands) -> Option<MenuButtonCommands> {
109882            Option::Some(value)
109883        }
109884        #[doc = r" Return the current variant of `MyEnum`."]
109885        #[rhai_fn(global, get = "enum_type", pure)]
109886        pub fn get_type(my_enum: &mut Option<MenuButtonCommands>) -> String {
109887            match my_enum {
109888                Option::None => "None".to_string(),
109889                Option::Some(_) => "Some".to_string(),
109890            }
109891        }
109892        #[doc = r" Return the inner value."]
109893        #[rhai_fn(global, get = "value", pure)]
109894        pub fn get_value(my_enum: &mut Option<MenuButtonCommands>) -> Dynamic {
109895            match my_enum {
109896                Option::None => Dynamic::UNIT,
109897                Option::Some(x) => Dynamic::from(x.clone()),
109898            }
109899        }
109900        #[rhai_fn(global, name = "to_string", pure)]
109901        pub fn to_string(my_enum: &mut Option<MenuButtonCommands>) -> String {
109902            format!("{my_enum:?}")
109903        }
109904        #[rhai_fn(global, name = "to_debug", pure)]
109905        pub fn to_debug(my_enum: &mut Option<MenuButtonCommands>) -> String {
109906            format!("{:?}", my_enum)
109907        }
109908    }
109909    #[export_module]
109910    #[warn(non_snake_case)]
109911    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109912    mod TransactionPartnerOtherModule {
109913        #[doc = r" `Option::None` with no inner data"]
109914        pub const None: Option<TransactionPartnerOther> = Option::None;
109915        #[doc = r" `Option::Some`"]
109916        pub fn Some(value: TransactionPartnerOther) -> Option<TransactionPartnerOther> {
109917            Option::Some(value)
109918        }
109919        #[doc = r" Return the current variant of `MyEnum`."]
109920        #[rhai_fn(global, get = "enum_type", pure)]
109921        pub fn get_type(my_enum: &mut Option<TransactionPartnerOther>) -> String {
109922            match my_enum {
109923                Option::None => "None".to_string(),
109924                Option::Some(_) => "Some".to_string(),
109925            }
109926        }
109927        #[doc = r" Return the inner value."]
109928        #[rhai_fn(global, get = "value", pure)]
109929        pub fn get_value(my_enum: &mut Option<TransactionPartnerOther>) -> Dynamic {
109930            match my_enum {
109931                Option::None => Dynamic::UNIT,
109932                Option::Some(x) => Dynamic::from(x.clone()),
109933            }
109934        }
109935        #[rhai_fn(global, name = "to_string", pure)]
109936        pub fn to_string(my_enum: &mut Option<TransactionPartnerOther>) -> String {
109937            format!("{my_enum:?}")
109938        }
109939        #[rhai_fn(global, name = "to_debug", pure)]
109940        pub fn to_debug(my_enum: &mut Option<TransactionPartnerOther>) -> String {
109941            format!("{:?}", my_enum)
109942        }
109943    }
109944    #[export_module]
109945    #[warn(non_snake_case)]
109946    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109947    mod GiftsModule {
109948        #[doc = r" `Option::None` with no inner data"]
109949        pub const None: Option<Gifts> = Option::None;
109950        #[doc = r" `Option::Some`"]
109951        pub fn Some(value: Gifts) -> Option<Gifts> {
109952            Option::Some(value)
109953        }
109954        #[doc = r" Return the current variant of `MyEnum`."]
109955        #[rhai_fn(global, get = "enum_type", pure)]
109956        pub fn get_type(my_enum: &mut Option<Gifts>) -> String {
109957            match my_enum {
109958                Option::None => "None".to_string(),
109959                Option::Some(_) => "Some".to_string(),
109960            }
109961        }
109962        #[doc = r" Return the inner value."]
109963        #[rhai_fn(global, get = "value", pure)]
109964        pub fn get_value(my_enum: &mut Option<Gifts>) -> Dynamic {
109965            match my_enum {
109966                Option::None => Dynamic::UNIT,
109967                Option::Some(x) => Dynamic::from(x.clone()),
109968            }
109969        }
109970        #[rhai_fn(global, name = "to_string", pure)]
109971        pub fn to_string(my_enum: &mut Option<Gifts>) -> String {
109972            format!("{my_enum:?}")
109973        }
109974        #[rhai_fn(global, name = "to_debug", pure)]
109975        pub fn to_debug(my_enum: &mut Option<Gifts>) -> String {
109976            format!("{:?}", my_enum)
109977        }
109978    }
109979    #[export_module]
109980    #[warn(non_snake_case)]
109981    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
109982    mod FileModule {
109983        #[doc = r" `Option::None` with no inner data"]
109984        pub const None: Option<File> = Option::None;
109985        #[doc = r" `Option::Some`"]
109986        pub fn Some(value: File) -> Option<File> {
109987            Option::Some(value)
109988        }
109989        #[doc = r" Return the current variant of `MyEnum`."]
109990        #[rhai_fn(global, get = "enum_type", pure)]
109991        pub fn get_type(my_enum: &mut Option<File>) -> String {
109992            match my_enum {
109993                Option::None => "None".to_string(),
109994                Option::Some(_) => "Some".to_string(),
109995            }
109996        }
109997        #[doc = r" Return the inner value."]
109998        #[rhai_fn(global, get = "value", pure)]
109999        pub fn get_value(my_enum: &mut Option<File>) -> Dynamic {
110000            match my_enum {
110001                Option::None => Dynamic::UNIT,
110002                Option::Some(x) => Dynamic::from(x.clone()),
110003            }
110004        }
110005        #[rhai_fn(global, name = "to_string", pure)]
110006        pub fn to_string(my_enum: &mut Option<File>) -> String {
110007            format!("{my_enum:?}")
110008        }
110009        #[rhai_fn(global, name = "to_debug", pure)]
110010        pub fn to_debug(my_enum: &mut Option<File>) -> String {
110011            format!("{:?}", my_enum)
110012        }
110013    }
110014    #[export_module]
110015    #[warn(non_snake_case)]
110016    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110017    mod BirthdateModule {
110018        #[doc = r" `Option::None` with no inner data"]
110019        pub const None: Option<Birthdate> = Option::None;
110020        #[doc = r" `Option::Some`"]
110021        pub fn Some(value: Birthdate) -> Option<Birthdate> {
110022            Option::Some(value)
110023        }
110024        #[doc = r" Return the current variant of `MyEnum`."]
110025        #[rhai_fn(global, get = "enum_type", pure)]
110026        pub fn get_type(my_enum: &mut Option<Birthdate>) -> String {
110027            match my_enum {
110028                Option::None => "None".to_string(),
110029                Option::Some(_) => "Some".to_string(),
110030            }
110031        }
110032        #[doc = r" Return the inner value."]
110033        #[rhai_fn(global, get = "value", pure)]
110034        pub fn get_value(my_enum: &mut Option<Birthdate>) -> Dynamic {
110035            match my_enum {
110036                Option::None => Dynamic::UNIT,
110037                Option::Some(x) => Dynamic::from(x.clone()),
110038            }
110039        }
110040        #[rhai_fn(global, name = "to_string", pure)]
110041        pub fn to_string(my_enum: &mut Option<Birthdate>) -> String {
110042            format!("{my_enum:?}")
110043        }
110044        #[rhai_fn(global, name = "to_debug", pure)]
110045        pub fn to_debug(my_enum: &mut Option<Birthdate>) -> String {
110046            format!("{:?}", my_enum)
110047        }
110048    }
110049    #[export_module]
110050    #[warn(non_snake_case)]
110051    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110052    mod TransactionPartnerTelegramAdsModule {
110053        #[doc = r" `Option::None` with no inner data"]
110054        pub const None: Option<TransactionPartnerTelegramAds> = Option::None;
110055        #[doc = r" `Option::Some`"]
110056        pub fn Some(value: TransactionPartnerTelegramAds) -> Option<TransactionPartnerTelegramAds> {
110057            Option::Some(value)
110058        }
110059        #[doc = r" Return the current variant of `MyEnum`."]
110060        #[rhai_fn(global, get = "enum_type", pure)]
110061        pub fn get_type(my_enum: &mut Option<TransactionPartnerTelegramAds>) -> String {
110062            match my_enum {
110063                Option::None => "None".to_string(),
110064                Option::Some(_) => "Some".to_string(),
110065            }
110066        }
110067        #[doc = r" Return the inner value."]
110068        #[rhai_fn(global, get = "value", pure)]
110069        pub fn get_value(my_enum: &mut Option<TransactionPartnerTelegramAds>) -> Dynamic {
110070            match my_enum {
110071                Option::None => Dynamic::UNIT,
110072                Option::Some(x) => Dynamic::from(x.clone()),
110073            }
110074        }
110075        #[rhai_fn(global, name = "to_string", pure)]
110076        pub fn to_string(my_enum: &mut Option<TransactionPartnerTelegramAds>) -> String {
110077            format!("{my_enum:?}")
110078        }
110079        #[rhai_fn(global, name = "to_debug", pure)]
110080        pub fn to_debug(my_enum: &mut Option<TransactionPartnerTelegramAds>) -> String {
110081            format!("{:?}", my_enum)
110082        }
110083    }
110084    #[export_module]
110085    #[warn(non_snake_case)]
110086    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110087    mod InlineQueryResultContactModule {
110088        #[doc = r" `Option::None` with no inner data"]
110089        pub const None: Option<InlineQueryResultContact> = Option::None;
110090        #[doc = r" `Option::Some`"]
110091        pub fn Some(value: InlineQueryResultContact) -> Option<InlineQueryResultContact> {
110092            Option::Some(value)
110093        }
110094        #[doc = r" Return the current variant of `MyEnum`."]
110095        #[rhai_fn(global, get = "enum_type", pure)]
110096        pub fn get_type(my_enum: &mut Option<InlineQueryResultContact>) -> String {
110097            match my_enum {
110098                Option::None => "None".to_string(),
110099                Option::Some(_) => "Some".to_string(),
110100            }
110101        }
110102        #[doc = r" Return the inner value."]
110103        #[rhai_fn(global, get = "value", pure)]
110104        pub fn get_value(my_enum: &mut Option<InlineQueryResultContact>) -> Dynamic {
110105            match my_enum {
110106                Option::None => Dynamic::UNIT,
110107                Option::Some(x) => Dynamic::from(x.clone()),
110108            }
110109        }
110110        #[rhai_fn(global, name = "to_string", pure)]
110111        pub fn to_string(my_enum: &mut Option<InlineQueryResultContact>) -> String {
110112            format!("{my_enum:?}")
110113        }
110114        #[rhai_fn(global, name = "to_debug", pure)]
110115        pub fn to_debug(my_enum: &mut Option<InlineQueryResultContact>) -> String {
110116            format!("{:?}", my_enum)
110117        }
110118    }
110119    #[export_module]
110120    #[warn(non_snake_case)]
110121    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110122    mod ChatMemberRestrictedModule {
110123        #[doc = r" `Option::None` with no inner data"]
110124        pub const None: Option<ChatMemberRestricted> = Option::None;
110125        #[doc = r" `Option::Some`"]
110126        pub fn Some(value: ChatMemberRestricted) -> Option<ChatMemberRestricted> {
110127            Option::Some(value)
110128        }
110129        #[doc = r" Return the current variant of `MyEnum`."]
110130        #[rhai_fn(global, get = "enum_type", pure)]
110131        pub fn get_type(my_enum: &mut Option<ChatMemberRestricted>) -> String {
110132            match my_enum {
110133                Option::None => "None".to_string(),
110134                Option::Some(_) => "Some".to_string(),
110135            }
110136        }
110137        #[doc = r" Return the inner value."]
110138        #[rhai_fn(global, get = "value", pure)]
110139        pub fn get_value(my_enum: &mut Option<ChatMemberRestricted>) -> Dynamic {
110140            match my_enum {
110141                Option::None => Dynamic::UNIT,
110142                Option::Some(x) => Dynamic::from(x.clone()),
110143            }
110144        }
110145        #[rhai_fn(global, name = "to_string", pure)]
110146        pub fn to_string(my_enum: &mut Option<ChatMemberRestricted>) -> String {
110147            format!("{my_enum:?}")
110148        }
110149        #[rhai_fn(global, name = "to_debug", pure)]
110150        pub fn to_debug(my_enum: &mut Option<ChatMemberRestricted>) -> String {
110151            format!("{:?}", my_enum)
110152        }
110153    }
110154    #[export_module]
110155    #[warn(non_snake_case)]
110156    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110157    mod LinkPreviewOptionsModule {
110158        #[doc = r" `Option::None` with no inner data"]
110159        pub const None: Option<LinkPreviewOptions> = Option::None;
110160        #[doc = r" `Option::Some`"]
110161        pub fn Some(value: LinkPreviewOptions) -> Option<LinkPreviewOptions> {
110162            Option::Some(value)
110163        }
110164        #[doc = r" Return the current variant of `MyEnum`."]
110165        #[rhai_fn(global, get = "enum_type", pure)]
110166        pub fn get_type(my_enum: &mut Option<LinkPreviewOptions>) -> String {
110167            match my_enum {
110168                Option::None => "None".to_string(),
110169                Option::Some(_) => "Some".to_string(),
110170            }
110171        }
110172        #[doc = r" Return the inner value."]
110173        #[rhai_fn(global, get = "value", pure)]
110174        pub fn get_value(my_enum: &mut Option<LinkPreviewOptions>) -> Dynamic {
110175            match my_enum {
110176                Option::None => Dynamic::UNIT,
110177                Option::Some(x) => Dynamic::from(x.clone()),
110178            }
110179        }
110180        #[rhai_fn(global, name = "to_string", pure)]
110181        pub fn to_string(my_enum: &mut Option<LinkPreviewOptions>) -> String {
110182            format!("{my_enum:?}")
110183        }
110184        #[rhai_fn(global, name = "to_debug", pure)]
110185        pub fn to_debug(my_enum: &mut Option<LinkPreviewOptions>) -> String {
110186            format!("{:?}", my_enum)
110187        }
110188    }
110189    #[export_module]
110190    #[warn(non_snake_case)]
110191    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110192    mod PreparedInlineMessageModule {
110193        #[doc = r" `Option::None` with no inner data"]
110194        pub const None: Option<PreparedInlineMessage> = Option::None;
110195        #[doc = r" `Option::Some`"]
110196        pub fn Some(value: PreparedInlineMessage) -> Option<PreparedInlineMessage> {
110197            Option::Some(value)
110198        }
110199        #[doc = r" Return the current variant of `MyEnum`."]
110200        #[rhai_fn(global, get = "enum_type", pure)]
110201        pub fn get_type(my_enum: &mut Option<PreparedInlineMessage>) -> String {
110202            match my_enum {
110203                Option::None => "None".to_string(),
110204                Option::Some(_) => "Some".to_string(),
110205            }
110206        }
110207        #[doc = r" Return the inner value."]
110208        #[rhai_fn(global, get = "value", pure)]
110209        pub fn get_value(my_enum: &mut Option<PreparedInlineMessage>) -> Dynamic {
110210            match my_enum {
110211                Option::None => Dynamic::UNIT,
110212                Option::Some(x) => Dynamic::from(x.clone()),
110213            }
110214        }
110215        #[rhai_fn(global, name = "to_string", pure)]
110216        pub fn to_string(my_enum: &mut Option<PreparedInlineMessage>) -> String {
110217            format!("{my_enum:?}")
110218        }
110219        #[rhai_fn(global, name = "to_debug", pure)]
110220        pub fn to_debug(my_enum: &mut Option<PreparedInlineMessage>) -> String {
110221            format!("{:?}", my_enum)
110222        }
110223    }
110224    #[export_module]
110225    #[warn(non_snake_case)]
110226    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110227    mod TextQuoteModule {
110228        #[doc = r" `Option::None` with no inner data"]
110229        pub const None: Option<TextQuote> = Option::None;
110230        #[doc = r" `Option::Some`"]
110231        pub fn Some(value: TextQuote) -> Option<TextQuote> {
110232            Option::Some(value)
110233        }
110234        #[doc = r" Return the current variant of `MyEnum`."]
110235        #[rhai_fn(global, get = "enum_type", pure)]
110236        pub fn get_type(my_enum: &mut Option<TextQuote>) -> String {
110237            match my_enum {
110238                Option::None => "None".to_string(),
110239                Option::Some(_) => "Some".to_string(),
110240            }
110241        }
110242        #[doc = r" Return the inner value."]
110243        #[rhai_fn(global, get = "value", pure)]
110244        pub fn get_value(my_enum: &mut Option<TextQuote>) -> Dynamic {
110245            match my_enum {
110246                Option::None => Dynamic::UNIT,
110247                Option::Some(x) => Dynamic::from(x.clone()),
110248            }
110249        }
110250        #[rhai_fn(global, name = "to_string", pure)]
110251        pub fn to_string(my_enum: &mut Option<TextQuote>) -> String {
110252            format!("{my_enum:?}")
110253        }
110254        #[rhai_fn(global, name = "to_debug", pure)]
110255        pub fn to_debug(my_enum: &mut Option<TextQuote>) -> String {
110256            format!("{:?}", my_enum)
110257        }
110258    }
110259    #[export_module]
110260    #[warn(non_snake_case)]
110261    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110262    mod ChecklistTasksDoneModule {
110263        #[doc = r" `Option::None` with no inner data"]
110264        pub const None: Option<ChecklistTasksDone> = Option::None;
110265        #[doc = r" `Option::Some`"]
110266        pub fn Some(value: ChecklistTasksDone) -> Option<ChecklistTasksDone> {
110267            Option::Some(value)
110268        }
110269        #[doc = r" Return the current variant of `MyEnum`."]
110270        #[rhai_fn(global, get = "enum_type", pure)]
110271        pub fn get_type(my_enum: &mut Option<ChecklistTasksDone>) -> String {
110272            match my_enum {
110273                Option::None => "None".to_string(),
110274                Option::Some(_) => "Some".to_string(),
110275            }
110276        }
110277        #[doc = r" Return the inner value."]
110278        #[rhai_fn(global, get = "value", pure)]
110279        pub fn get_value(my_enum: &mut Option<ChecklistTasksDone>) -> Dynamic {
110280            match my_enum {
110281                Option::None => Dynamic::UNIT,
110282                Option::Some(x) => Dynamic::from(x.clone()),
110283            }
110284        }
110285        #[rhai_fn(global, name = "to_string", pure)]
110286        pub fn to_string(my_enum: &mut Option<ChecklistTasksDone>) -> String {
110287            format!("{my_enum:?}")
110288        }
110289        #[rhai_fn(global, name = "to_debug", pure)]
110290        pub fn to_debug(my_enum: &mut Option<ChecklistTasksDone>) -> String {
110291            format!("{:?}", my_enum)
110292        }
110293    }
110294    #[export_module]
110295    #[warn(non_snake_case)]
110296    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110297    mod InputStoryContentVideoModule {
110298        #[doc = r" `Option::None` with no inner data"]
110299        pub const None: Option<InputStoryContentVideo> = Option::None;
110300        #[doc = r" `Option::Some`"]
110301        pub fn Some(value: InputStoryContentVideo) -> Option<InputStoryContentVideo> {
110302            Option::Some(value)
110303        }
110304        #[doc = r" Return the current variant of `MyEnum`."]
110305        #[rhai_fn(global, get = "enum_type", pure)]
110306        pub fn get_type(my_enum: &mut Option<InputStoryContentVideo>) -> String {
110307            match my_enum {
110308                Option::None => "None".to_string(),
110309                Option::Some(_) => "Some".to_string(),
110310            }
110311        }
110312        #[doc = r" Return the inner value."]
110313        #[rhai_fn(global, get = "value", pure)]
110314        pub fn get_value(my_enum: &mut Option<InputStoryContentVideo>) -> Dynamic {
110315            match my_enum {
110316                Option::None => Dynamic::UNIT,
110317                Option::Some(x) => Dynamic::from(x.clone()),
110318            }
110319        }
110320        #[rhai_fn(global, name = "to_string", pure)]
110321        pub fn to_string(my_enum: &mut Option<InputStoryContentVideo>) -> String {
110322            format!("{my_enum:?}")
110323        }
110324        #[rhai_fn(global, name = "to_debug", pure)]
110325        pub fn to_debug(my_enum: &mut Option<InputStoryContentVideo>) -> String {
110326            format!("{:?}", my_enum)
110327        }
110328    }
110329    #[export_module]
110330    #[warn(non_snake_case)]
110331    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110332    mod BackgroundTypeChatThemeModule {
110333        #[doc = r" `Option::None` with no inner data"]
110334        pub const None: Option<BackgroundTypeChatTheme> = Option::None;
110335        #[doc = r" `Option::Some`"]
110336        pub fn Some(value: BackgroundTypeChatTheme) -> Option<BackgroundTypeChatTheme> {
110337            Option::Some(value)
110338        }
110339        #[doc = r" Return the current variant of `MyEnum`."]
110340        #[rhai_fn(global, get = "enum_type", pure)]
110341        pub fn get_type(my_enum: &mut Option<BackgroundTypeChatTheme>) -> String {
110342            match my_enum {
110343                Option::None => "None".to_string(),
110344                Option::Some(_) => "Some".to_string(),
110345            }
110346        }
110347        #[doc = r" Return the inner value."]
110348        #[rhai_fn(global, get = "value", pure)]
110349        pub fn get_value(my_enum: &mut Option<BackgroundTypeChatTheme>) -> Dynamic {
110350            match my_enum {
110351                Option::None => Dynamic::UNIT,
110352                Option::Some(x) => Dynamic::from(x.clone()),
110353            }
110354        }
110355        #[rhai_fn(global, name = "to_string", pure)]
110356        pub fn to_string(my_enum: &mut Option<BackgroundTypeChatTheme>) -> String {
110357            format!("{my_enum:?}")
110358        }
110359        #[rhai_fn(global, name = "to_debug", pure)]
110360        pub fn to_debug(my_enum: &mut Option<BackgroundTypeChatTheme>) -> String {
110361            format!("{:?}", my_enum)
110362        }
110363    }
110364    #[export_module]
110365    #[warn(non_snake_case)]
110366    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110367    mod InaccessibleMessageModule {
110368        #[doc = r" `Option::None` with no inner data"]
110369        pub const None: Option<InaccessibleMessage> = Option::None;
110370        #[doc = r" `Option::Some`"]
110371        pub fn Some(value: InaccessibleMessage) -> Option<InaccessibleMessage> {
110372            Option::Some(value)
110373        }
110374        #[doc = r" Return the current variant of `MyEnum`."]
110375        #[rhai_fn(global, get = "enum_type", pure)]
110376        pub fn get_type(my_enum: &mut Option<InaccessibleMessage>) -> String {
110377            match my_enum {
110378                Option::None => "None".to_string(),
110379                Option::Some(_) => "Some".to_string(),
110380            }
110381        }
110382        #[doc = r" Return the inner value."]
110383        #[rhai_fn(global, get = "value", pure)]
110384        pub fn get_value(my_enum: &mut Option<InaccessibleMessage>) -> Dynamic {
110385            match my_enum {
110386                Option::None => Dynamic::UNIT,
110387                Option::Some(x) => Dynamic::from(x.clone()),
110388            }
110389        }
110390        #[rhai_fn(global, name = "to_string", pure)]
110391        pub fn to_string(my_enum: &mut Option<InaccessibleMessage>) -> String {
110392            format!("{my_enum:?}")
110393        }
110394        #[rhai_fn(global, name = "to_debug", pure)]
110395        pub fn to_debug(my_enum: &mut Option<InaccessibleMessage>) -> String {
110396            format!("{:?}", my_enum)
110397        }
110398    }
110399    #[export_module]
110400    #[warn(non_snake_case)]
110401    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110402    mod InputChecklistModule {
110403        #[doc = r" `Option::None` with no inner data"]
110404        pub const None: Option<InputChecklist> = Option::None;
110405        #[doc = r" `Option::Some`"]
110406        pub fn Some(value: InputChecklist) -> Option<InputChecklist> {
110407            Option::Some(value)
110408        }
110409        #[doc = r" Return the current variant of `MyEnum`."]
110410        #[rhai_fn(global, get = "enum_type", pure)]
110411        pub fn get_type(my_enum: &mut Option<InputChecklist>) -> String {
110412            match my_enum {
110413                Option::None => "None".to_string(),
110414                Option::Some(_) => "Some".to_string(),
110415            }
110416        }
110417        #[doc = r" Return the inner value."]
110418        #[rhai_fn(global, get = "value", pure)]
110419        pub fn get_value(my_enum: &mut Option<InputChecklist>) -> Dynamic {
110420            match my_enum {
110421                Option::None => Dynamic::UNIT,
110422                Option::Some(x) => Dynamic::from(x.clone()),
110423            }
110424        }
110425        #[rhai_fn(global, name = "to_string", pure)]
110426        pub fn to_string(my_enum: &mut Option<InputChecklist>) -> String {
110427            format!("{my_enum:?}")
110428        }
110429        #[rhai_fn(global, name = "to_debug", pure)]
110430        pub fn to_debug(my_enum: &mut Option<InputChecklist>) -> String {
110431            format!("{:?}", my_enum)
110432        }
110433    }
110434    #[export_module]
110435    #[warn(non_snake_case)]
110436    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110437    mod SuggestedPostInfoModule {
110438        #[doc = r" `Option::None` with no inner data"]
110439        pub const None: Option<SuggestedPostInfo> = Option::None;
110440        #[doc = r" `Option::Some`"]
110441        pub fn Some(value: SuggestedPostInfo) -> Option<SuggestedPostInfo> {
110442            Option::Some(value)
110443        }
110444        #[doc = r" Return the current variant of `MyEnum`."]
110445        #[rhai_fn(global, get = "enum_type", pure)]
110446        pub fn get_type(my_enum: &mut Option<SuggestedPostInfo>) -> String {
110447            match my_enum {
110448                Option::None => "None".to_string(),
110449                Option::Some(_) => "Some".to_string(),
110450            }
110451        }
110452        #[doc = r" Return the inner value."]
110453        #[rhai_fn(global, get = "value", pure)]
110454        pub fn get_value(my_enum: &mut Option<SuggestedPostInfo>) -> Dynamic {
110455            match my_enum {
110456                Option::None => Dynamic::UNIT,
110457                Option::Some(x) => Dynamic::from(x.clone()),
110458            }
110459        }
110460        #[rhai_fn(global, name = "to_string", pure)]
110461        pub fn to_string(my_enum: &mut Option<SuggestedPostInfo>) -> String {
110462            format!("{my_enum:?}")
110463        }
110464        #[rhai_fn(global, name = "to_debug", pure)]
110465        pub fn to_debug(my_enum: &mut Option<SuggestedPostInfo>) -> String {
110466            format!("{:?}", my_enum)
110467        }
110468    }
110469    #[export_module]
110470    #[warn(non_snake_case)]
110471    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110472    mod SwitchInlineQueryChosenChatModule {
110473        #[doc = r" `Option::None` with no inner data"]
110474        pub const None: Option<SwitchInlineQueryChosenChat> = Option::None;
110475        #[doc = r" `Option::Some`"]
110476        pub fn Some(value: SwitchInlineQueryChosenChat) -> Option<SwitchInlineQueryChosenChat> {
110477            Option::Some(value)
110478        }
110479        #[doc = r" Return the current variant of `MyEnum`."]
110480        #[rhai_fn(global, get = "enum_type", pure)]
110481        pub fn get_type(my_enum: &mut Option<SwitchInlineQueryChosenChat>) -> String {
110482            match my_enum {
110483                Option::None => "None".to_string(),
110484                Option::Some(_) => "Some".to_string(),
110485            }
110486        }
110487        #[doc = r" Return the inner value."]
110488        #[rhai_fn(global, get = "value", pure)]
110489        pub fn get_value(my_enum: &mut Option<SwitchInlineQueryChosenChat>) -> Dynamic {
110490            match my_enum {
110491                Option::None => Dynamic::UNIT,
110492                Option::Some(x) => Dynamic::from(x.clone()),
110493            }
110494        }
110495        #[rhai_fn(global, name = "to_string", pure)]
110496        pub fn to_string(my_enum: &mut Option<SwitchInlineQueryChosenChat>) -> String {
110497            format!("{my_enum:?}")
110498        }
110499        #[rhai_fn(global, name = "to_debug", pure)]
110500        pub fn to_debug(my_enum: &mut Option<SwitchInlineQueryChosenChat>) -> String {
110501            format!("{:?}", my_enum)
110502        }
110503    }
110504    #[export_module]
110505    #[warn(non_snake_case)]
110506    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110507    mod AcceptedGiftTypesModule {
110508        #[doc = r" `Option::None` with no inner data"]
110509        pub const None: Option<AcceptedGiftTypes> = Option::None;
110510        #[doc = r" `Option::Some`"]
110511        pub fn Some(value: AcceptedGiftTypes) -> Option<AcceptedGiftTypes> {
110512            Option::Some(value)
110513        }
110514        #[doc = r" Return the current variant of `MyEnum`."]
110515        #[rhai_fn(global, get = "enum_type", pure)]
110516        pub fn get_type(my_enum: &mut Option<AcceptedGiftTypes>) -> String {
110517            match my_enum {
110518                Option::None => "None".to_string(),
110519                Option::Some(_) => "Some".to_string(),
110520            }
110521        }
110522        #[doc = r" Return the inner value."]
110523        #[rhai_fn(global, get = "value", pure)]
110524        pub fn get_value(my_enum: &mut Option<AcceptedGiftTypes>) -> Dynamic {
110525            match my_enum {
110526                Option::None => Dynamic::UNIT,
110527                Option::Some(x) => Dynamic::from(x.clone()),
110528            }
110529        }
110530        #[rhai_fn(global, name = "to_string", pure)]
110531        pub fn to_string(my_enum: &mut Option<AcceptedGiftTypes>) -> String {
110532            format!("{my_enum:?}")
110533        }
110534        #[rhai_fn(global, name = "to_debug", pure)]
110535        pub fn to_debug(my_enum: &mut Option<AcceptedGiftTypes>) -> String {
110536            format!("{:?}", my_enum)
110537        }
110538    }
110539    #[export_module]
110540    #[warn(non_snake_case)]
110541    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110542    mod PassportElementErrorTranslationFileModule {
110543        #[doc = r" `Option::None` with no inner data"]
110544        pub const None: Option<PassportElementErrorTranslationFile> = Option::None;
110545        #[doc = r" `Option::Some`"]
110546        pub fn Some(
110547            value: PassportElementErrorTranslationFile,
110548        ) -> Option<PassportElementErrorTranslationFile> {
110549            Option::Some(value)
110550        }
110551        #[doc = r" Return the current variant of `MyEnum`."]
110552        #[rhai_fn(global, get = "enum_type", pure)]
110553        pub fn get_type(my_enum: &mut Option<PassportElementErrorTranslationFile>) -> String {
110554            match my_enum {
110555                Option::None => "None".to_string(),
110556                Option::Some(_) => "Some".to_string(),
110557            }
110558        }
110559        #[doc = r" Return the inner value."]
110560        #[rhai_fn(global, get = "value", pure)]
110561        pub fn get_value(my_enum: &mut Option<PassportElementErrorTranslationFile>) -> Dynamic {
110562            match my_enum {
110563                Option::None => Dynamic::UNIT,
110564                Option::Some(x) => Dynamic::from(x.clone()),
110565            }
110566        }
110567        #[rhai_fn(global, name = "to_string", pure)]
110568        pub fn to_string(my_enum: &mut Option<PassportElementErrorTranslationFile>) -> String {
110569            format!("{my_enum:?}")
110570        }
110571        #[rhai_fn(global, name = "to_debug", pure)]
110572        pub fn to_debug(my_enum: &mut Option<PassportElementErrorTranslationFile>) -> String {
110573            format!("{:?}", my_enum)
110574        }
110575    }
110576    #[export_module]
110577    #[warn(non_snake_case)]
110578    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110579    mod BusinessLocationModule {
110580        #[doc = r" `Option::None` with no inner data"]
110581        pub const None: Option<BusinessLocation> = Option::None;
110582        #[doc = r" `Option::Some`"]
110583        pub fn Some(value: BusinessLocation) -> Option<BusinessLocation> {
110584            Option::Some(value)
110585        }
110586        #[doc = r" Return the current variant of `MyEnum`."]
110587        #[rhai_fn(global, get = "enum_type", pure)]
110588        pub fn get_type(my_enum: &mut Option<BusinessLocation>) -> String {
110589            match my_enum {
110590                Option::None => "None".to_string(),
110591                Option::Some(_) => "Some".to_string(),
110592            }
110593        }
110594        #[doc = r" Return the inner value."]
110595        #[rhai_fn(global, get = "value", pure)]
110596        pub fn get_value(my_enum: &mut Option<BusinessLocation>) -> Dynamic {
110597            match my_enum {
110598                Option::None => Dynamic::UNIT,
110599                Option::Some(x) => Dynamic::from(x.clone()),
110600            }
110601        }
110602        #[rhai_fn(global, name = "to_string", pure)]
110603        pub fn to_string(my_enum: &mut Option<BusinessLocation>) -> String {
110604            format!("{my_enum:?}")
110605        }
110606        #[rhai_fn(global, name = "to_debug", pure)]
110607        pub fn to_debug(my_enum: &mut Option<BusinessLocation>) -> String {
110608            format!("{:?}", my_enum)
110609        }
110610    }
110611    #[export_module]
110612    #[warn(non_snake_case)]
110613    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110614    mod AffiliateInfoModule {
110615        #[doc = r" `Option::None` with no inner data"]
110616        pub const None: Option<AffiliateInfo> = Option::None;
110617        #[doc = r" `Option::Some`"]
110618        pub fn Some(value: AffiliateInfo) -> Option<AffiliateInfo> {
110619            Option::Some(value)
110620        }
110621        #[doc = r" Return the current variant of `MyEnum`."]
110622        #[rhai_fn(global, get = "enum_type", pure)]
110623        pub fn get_type(my_enum: &mut Option<AffiliateInfo>) -> String {
110624            match my_enum {
110625                Option::None => "None".to_string(),
110626                Option::Some(_) => "Some".to_string(),
110627            }
110628        }
110629        #[doc = r" Return the inner value."]
110630        #[rhai_fn(global, get = "value", pure)]
110631        pub fn get_value(my_enum: &mut Option<AffiliateInfo>) -> Dynamic {
110632            match my_enum {
110633                Option::None => Dynamic::UNIT,
110634                Option::Some(x) => Dynamic::from(x.clone()),
110635            }
110636        }
110637        #[rhai_fn(global, name = "to_string", pure)]
110638        pub fn to_string(my_enum: &mut Option<AffiliateInfo>) -> String {
110639            format!("{my_enum:?}")
110640        }
110641        #[rhai_fn(global, name = "to_debug", pure)]
110642        pub fn to_debug(my_enum: &mut Option<AffiliateInfo>) -> String {
110643            format!("{:?}", my_enum)
110644        }
110645    }
110646    #[export_module]
110647    #[warn(non_snake_case)]
110648    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110649    mod MessageOriginChatModule {
110650        #[doc = r" `Option::None` with no inner data"]
110651        pub const None: Option<MessageOriginChat> = Option::None;
110652        #[doc = r" `Option::Some`"]
110653        pub fn Some(value: MessageOriginChat) -> Option<MessageOriginChat> {
110654            Option::Some(value)
110655        }
110656        #[doc = r" Return the current variant of `MyEnum`."]
110657        #[rhai_fn(global, get = "enum_type", pure)]
110658        pub fn get_type(my_enum: &mut Option<MessageOriginChat>) -> String {
110659            match my_enum {
110660                Option::None => "None".to_string(),
110661                Option::Some(_) => "Some".to_string(),
110662            }
110663        }
110664        #[doc = r" Return the inner value."]
110665        #[rhai_fn(global, get = "value", pure)]
110666        pub fn get_value(my_enum: &mut Option<MessageOriginChat>) -> Dynamic {
110667            match my_enum {
110668                Option::None => Dynamic::UNIT,
110669                Option::Some(x) => Dynamic::from(x.clone()),
110670            }
110671        }
110672        #[rhai_fn(global, name = "to_string", pure)]
110673        pub fn to_string(my_enum: &mut Option<MessageOriginChat>) -> String {
110674            format!("{my_enum:?}")
110675        }
110676        #[rhai_fn(global, name = "to_debug", pure)]
110677        pub fn to_debug(my_enum: &mut Option<MessageOriginChat>) -> String {
110678            format!("{:?}", my_enum)
110679        }
110680    }
110681    #[export_module]
110682    #[warn(non_snake_case)]
110683    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110684    mod BotCommandScopeChatModule {
110685        #[doc = r" `Option::None` with no inner data"]
110686        pub const None: Option<BotCommandScopeChat> = Option::None;
110687        #[doc = r" `Option::Some`"]
110688        pub fn Some(value: BotCommandScopeChat) -> Option<BotCommandScopeChat> {
110689            Option::Some(value)
110690        }
110691        #[doc = r" Return the current variant of `MyEnum`."]
110692        #[rhai_fn(global, get = "enum_type", pure)]
110693        pub fn get_type(my_enum: &mut Option<BotCommandScopeChat>) -> String {
110694            match my_enum {
110695                Option::None => "None".to_string(),
110696                Option::Some(_) => "Some".to_string(),
110697            }
110698        }
110699        #[doc = r" Return the inner value."]
110700        #[rhai_fn(global, get = "value", pure)]
110701        pub fn get_value(my_enum: &mut Option<BotCommandScopeChat>) -> Dynamic {
110702            match my_enum {
110703                Option::None => Dynamic::UNIT,
110704                Option::Some(x) => Dynamic::from(x.clone()),
110705            }
110706        }
110707        #[rhai_fn(global, name = "to_string", pure)]
110708        pub fn to_string(my_enum: &mut Option<BotCommandScopeChat>) -> String {
110709            format!("{my_enum:?}")
110710        }
110711        #[rhai_fn(global, name = "to_debug", pure)]
110712        pub fn to_debug(my_enum: &mut Option<BotCommandScopeChat>) -> String {
110713            format!("{:?}", my_enum)
110714        }
110715    }
110716    #[export_module]
110717    #[warn(non_snake_case)]
110718    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110719    mod PassportElementErrorReverseSideModule {
110720        #[doc = r" `Option::None` with no inner data"]
110721        pub const None: Option<PassportElementErrorReverseSide> = Option::None;
110722        #[doc = r" `Option::Some`"]
110723        pub fn Some(
110724            value: PassportElementErrorReverseSide,
110725        ) -> Option<PassportElementErrorReverseSide> {
110726            Option::Some(value)
110727        }
110728        #[doc = r" Return the current variant of `MyEnum`."]
110729        #[rhai_fn(global, get = "enum_type", pure)]
110730        pub fn get_type(my_enum: &mut Option<PassportElementErrorReverseSide>) -> String {
110731            match my_enum {
110732                Option::None => "None".to_string(),
110733                Option::Some(_) => "Some".to_string(),
110734            }
110735        }
110736        #[doc = r" Return the inner value."]
110737        #[rhai_fn(global, get = "value", pure)]
110738        pub fn get_value(my_enum: &mut Option<PassportElementErrorReverseSide>) -> Dynamic {
110739            match my_enum {
110740                Option::None => Dynamic::UNIT,
110741                Option::Some(x) => Dynamic::from(x.clone()),
110742            }
110743        }
110744        #[rhai_fn(global, name = "to_string", pure)]
110745        pub fn to_string(my_enum: &mut Option<PassportElementErrorReverseSide>) -> String {
110746            format!("{my_enum:?}")
110747        }
110748        #[rhai_fn(global, name = "to_debug", pure)]
110749        pub fn to_debug(my_enum: &mut Option<PassportElementErrorReverseSide>) -> String {
110750            format!("{:?}", my_enum)
110751        }
110752    }
110753    #[export_module]
110754    #[warn(non_snake_case)]
110755    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110756    mod InlineQueryResultPhotoModule {
110757        #[doc = r" `Option::None` with no inner data"]
110758        pub const None: Option<InlineQueryResultPhoto> = Option::None;
110759        #[doc = r" `Option::Some`"]
110760        pub fn Some(value: InlineQueryResultPhoto) -> Option<InlineQueryResultPhoto> {
110761            Option::Some(value)
110762        }
110763        #[doc = r" Return the current variant of `MyEnum`."]
110764        #[rhai_fn(global, get = "enum_type", pure)]
110765        pub fn get_type(my_enum: &mut Option<InlineQueryResultPhoto>) -> String {
110766            match my_enum {
110767                Option::None => "None".to_string(),
110768                Option::Some(_) => "Some".to_string(),
110769            }
110770        }
110771        #[doc = r" Return the inner value."]
110772        #[rhai_fn(global, get = "value", pure)]
110773        pub fn get_value(my_enum: &mut Option<InlineQueryResultPhoto>) -> Dynamic {
110774            match my_enum {
110775                Option::None => Dynamic::UNIT,
110776                Option::Some(x) => Dynamic::from(x.clone()),
110777            }
110778        }
110779        #[rhai_fn(global, name = "to_string", pure)]
110780        pub fn to_string(my_enum: &mut Option<InlineQueryResultPhoto>) -> String {
110781            format!("{my_enum:?}")
110782        }
110783        #[rhai_fn(global, name = "to_debug", pure)]
110784        pub fn to_debug(my_enum: &mut Option<InlineQueryResultPhoto>) -> String {
110785            format!("{:?}", my_enum)
110786        }
110787    }
110788    #[export_module]
110789    #[warn(non_snake_case)]
110790    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110791    mod StoryAreaTypeLinkModule {
110792        #[doc = r" `Option::None` with no inner data"]
110793        pub const None: Option<StoryAreaTypeLink> = Option::None;
110794        #[doc = r" `Option::Some`"]
110795        pub fn Some(value: StoryAreaTypeLink) -> Option<StoryAreaTypeLink> {
110796            Option::Some(value)
110797        }
110798        #[doc = r" Return the current variant of `MyEnum`."]
110799        #[rhai_fn(global, get = "enum_type", pure)]
110800        pub fn get_type(my_enum: &mut Option<StoryAreaTypeLink>) -> String {
110801            match my_enum {
110802                Option::None => "None".to_string(),
110803                Option::Some(_) => "Some".to_string(),
110804            }
110805        }
110806        #[doc = r" Return the inner value."]
110807        #[rhai_fn(global, get = "value", pure)]
110808        pub fn get_value(my_enum: &mut Option<StoryAreaTypeLink>) -> Dynamic {
110809            match my_enum {
110810                Option::None => Dynamic::UNIT,
110811                Option::Some(x) => Dynamic::from(x.clone()),
110812            }
110813        }
110814        #[rhai_fn(global, name = "to_string", pure)]
110815        pub fn to_string(my_enum: &mut Option<StoryAreaTypeLink>) -> String {
110816            format!("{my_enum:?}")
110817        }
110818        #[rhai_fn(global, name = "to_debug", pure)]
110819        pub fn to_debug(my_enum: &mut Option<StoryAreaTypeLink>) -> String {
110820            format!("{:?}", my_enum)
110821        }
110822    }
110823    #[export_module]
110824    #[warn(non_snake_case)]
110825    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110826    mod InputStickerModule {
110827        #[doc = r" `Option::None` with no inner data"]
110828        pub const None: Option<InputSticker> = Option::None;
110829        #[doc = r" `Option::Some`"]
110830        pub fn Some(value: InputSticker) -> Option<InputSticker> {
110831            Option::Some(value)
110832        }
110833        #[doc = r" Return the current variant of `MyEnum`."]
110834        #[rhai_fn(global, get = "enum_type", pure)]
110835        pub fn get_type(my_enum: &mut Option<InputSticker>) -> String {
110836            match my_enum {
110837                Option::None => "None".to_string(),
110838                Option::Some(_) => "Some".to_string(),
110839            }
110840        }
110841        #[doc = r" Return the inner value."]
110842        #[rhai_fn(global, get = "value", pure)]
110843        pub fn get_value(my_enum: &mut Option<InputSticker>) -> Dynamic {
110844            match my_enum {
110845                Option::None => Dynamic::UNIT,
110846                Option::Some(x) => Dynamic::from(x.clone()),
110847            }
110848        }
110849        #[rhai_fn(global, name = "to_string", pure)]
110850        pub fn to_string(my_enum: &mut Option<InputSticker>) -> String {
110851            format!("{my_enum:?}")
110852        }
110853        #[rhai_fn(global, name = "to_debug", pure)]
110854        pub fn to_debug(my_enum: &mut Option<InputSticker>) -> String {
110855            format!("{:?}", my_enum)
110856        }
110857    }
110858    #[export_module]
110859    #[warn(non_snake_case)]
110860    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110861    mod InputPaidMediaPhotoModule {
110862        #[doc = r" `Option::None` with no inner data"]
110863        pub const None: Option<InputPaidMediaPhoto> = Option::None;
110864        #[doc = r" `Option::Some`"]
110865        pub fn Some(value: InputPaidMediaPhoto) -> Option<InputPaidMediaPhoto> {
110866            Option::Some(value)
110867        }
110868        #[doc = r" Return the current variant of `MyEnum`."]
110869        #[rhai_fn(global, get = "enum_type", pure)]
110870        pub fn get_type(my_enum: &mut Option<InputPaidMediaPhoto>) -> String {
110871            match my_enum {
110872                Option::None => "None".to_string(),
110873                Option::Some(_) => "Some".to_string(),
110874            }
110875        }
110876        #[doc = r" Return the inner value."]
110877        #[rhai_fn(global, get = "value", pure)]
110878        pub fn get_value(my_enum: &mut Option<InputPaidMediaPhoto>) -> Dynamic {
110879            match my_enum {
110880                Option::None => Dynamic::UNIT,
110881                Option::Some(x) => Dynamic::from(x.clone()),
110882            }
110883        }
110884        #[rhai_fn(global, name = "to_string", pure)]
110885        pub fn to_string(my_enum: &mut Option<InputPaidMediaPhoto>) -> String {
110886            format!("{my_enum:?}")
110887        }
110888        #[rhai_fn(global, name = "to_debug", pure)]
110889        pub fn to_debug(my_enum: &mut Option<InputPaidMediaPhoto>) -> String {
110890            format!("{:?}", my_enum)
110891        }
110892    }
110893    #[export_module]
110894    #[warn(non_snake_case)]
110895    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110896    mod InputProfilePhotoStaticModule {
110897        #[doc = r" `Option::None` with no inner data"]
110898        pub const None: Option<InputProfilePhotoStatic> = Option::None;
110899        #[doc = r" `Option::Some`"]
110900        pub fn Some(value: InputProfilePhotoStatic) -> Option<InputProfilePhotoStatic> {
110901            Option::Some(value)
110902        }
110903        #[doc = r" Return the current variant of `MyEnum`."]
110904        #[rhai_fn(global, get = "enum_type", pure)]
110905        pub fn get_type(my_enum: &mut Option<InputProfilePhotoStatic>) -> String {
110906            match my_enum {
110907                Option::None => "None".to_string(),
110908                Option::Some(_) => "Some".to_string(),
110909            }
110910        }
110911        #[doc = r" Return the inner value."]
110912        #[rhai_fn(global, get = "value", pure)]
110913        pub fn get_value(my_enum: &mut Option<InputProfilePhotoStatic>) -> Dynamic {
110914            match my_enum {
110915                Option::None => Dynamic::UNIT,
110916                Option::Some(x) => Dynamic::from(x.clone()),
110917            }
110918        }
110919        #[rhai_fn(global, name = "to_string", pure)]
110920        pub fn to_string(my_enum: &mut Option<InputProfilePhotoStatic>) -> String {
110921            format!("{my_enum:?}")
110922        }
110923        #[rhai_fn(global, name = "to_debug", pure)]
110924        pub fn to_debug(my_enum: &mut Option<InputProfilePhotoStatic>) -> String {
110925            format!("{:?}", my_enum)
110926        }
110927    }
110928    #[export_module]
110929    #[warn(non_snake_case)]
110930    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110931    mod TransactionPartnerChatModule {
110932        #[doc = r" `Option::None` with no inner data"]
110933        pub const None: Option<TransactionPartnerChat> = Option::None;
110934        #[doc = r" `Option::Some`"]
110935        pub fn Some(value: TransactionPartnerChat) -> Option<TransactionPartnerChat> {
110936            Option::Some(value)
110937        }
110938        #[doc = r" Return the current variant of `MyEnum`."]
110939        #[rhai_fn(global, get = "enum_type", pure)]
110940        pub fn get_type(my_enum: &mut Option<TransactionPartnerChat>) -> String {
110941            match my_enum {
110942                Option::None => "None".to_string(),
110943                Option::Some(_) => "Some".to_string(),
110944            }
110945        }
110946        #[doc = r" Return the inner value."]
110947        #[rhai_fn(global, get = "value", pure)]
110948        pub fn get_value(my_enum: &mut Option<TransactionPartnerChat>) -> Dynamic {
110949            match my_enum {
110950                Option::None => Dynamic::UNIT,
110951                Option::Some(x) => Dynamic::from(x.clone()),
110952            }
110953        }
110954        #[rhai_fn(global, name = "to_string", pure)]
110955        pub fn to_string(my_enum: &mut Option<TransactionPartnerChat>) -> String {
110956            format!("{my_enum:?}")
110957        }
110958        #[rhai_fn(global, name = "to_debug", pure)]
110959        pub fn to_debug(my_enum: &mut Option<TransactionPartnerChat>) -> String {
110960            format!("{:?}", my_enum)
110961        }
110962    }
110963    #[export_module]
110964    #[warn(non_snake_case)]
110965    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
110966    mod BotCommandScopeChatAdministratorsModule {
110967        #[doc = r" `Option::None` with no inner data"]
110968        pub const None: Option<BotCommandScopeChatAdministrators> = Option::None;
110969        #[doc = r" `Option::Some`"]
110970        pub fn Some(
110971            value: BotCommandScopeChatAdministrators,
110972        ) -> Option<BotCommandScopeChatAdministrators> {
110973            Option::Some(value)
110974        }
110975        #[doc = r" Return the current variant of `MyEnum`."]
110976        #[rhai_fn(global, get = "enum_type", pure)]
110977        pub fn get_type(my_enum: &mut Option<BotCommandScopeChatAdministrators>) -> String {
110978            match my_enum {
110979                Option::None => "None".to_string(),
110980                Option::Some(_) => "Some".to_string(),
110981            }
110982        }
110983        #[doc = r" Return the inner value."]
110984        #[rhai_fn(global, get = "value", pure)]
110985        pub fn get_value(my_enum: &mut Option<BotCommandScopeChatAdministrators>) -> Dynamic {
110986            match my_enum {
110987                Option::None => Dynamic::UNIT,
110988                Option::Some(x) => Dynamic::from(x.clone()),
110989            }
110990        }
110991        #[rhai_fn(global, name = "to_string", pure)]
110992        pub fn to_string(my_enum: &mut Option<BotCommandScopeChatAdministrators>) -> String {
110993            format!("{my_enum:?}")
110994        }
110995        #[rhai_fn(global, name = "to_debug", pure)]
110996        pub fn to_debug(my_enum: &mut Option<BotCommandScopeChatAdministrators>) -> String {
110997            format!("{:?}", my_enum)
110998        }
110999    }
111000    #[export_module]
111001    #[warn(non_snake_case)]
111002    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111003    mod ForumTopicClosedModule {
111004        #[doc = r" `Option::None` with no inner data"]
111005        pub const None: Option<ForumTopicClosed> = Option::None;
111006        #[doc = r" `Option::Some`"]
111007        pub fn Some(value: ForumTopicClosed) -> Option<ForumTopicClosed> {
111008            Option::Some(value)
111009        }
111010        #[doc = r" Return the current variant of `MyEnum`."]
111011        #[rhai_fn(global, get = "enum_type", pure)]
111012        pub fn get_type(my_enum: &mut Option<ForumTopicClosed>) -> String {
111013            match my_enum {
111014                Option::None => "None".to_string(),
111015                Option::Some(_) => "Some".to_string(),
111016            }
111017        }
111018        #[doc = r" Return the inner value."]
111019        #[rhai_fn(global, get = "value", pure)]
111020        pub fn get_value(my_enum: &mut Option<ForumTopicClosed>) -> Dynamic {
111021            match my_enum {
111022                Option::None => Dynamic::UNIT,
111023                Option::Some(x) => Dynamic::from(x.clone()),
111024            }
111025        }
111026        #[rhai_fn(global, name = "to_string", pure)]
111027        pub fn to_string(my_enum: &mut Option<ForumTopicClosed>) -> String {
111028            format!("{my_enum:?}")
111029        }
111030        #[rhai_fn(global, name = "to_debug", pure)]
111031        pub fn to_debug(my_enum: &mut Option<ForumTopicClosed>) -> String {
111032            format!("{:?}", my_enum)
111033        }
111034    }
111035    #[export_module]
111036    #[warn(non_snake_case)]
111037    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111038    mod PaidMediaPurchasedModule {
111039        #[doc = r" `Option::None` with no inner data"]
111040        pub const None: Option<PaidMediaPurchased> = Option::None;
111041        #[doc = r" `Option::Some`"]
111042        pub fn Some(value: PaidMediaPurchased) -> Option<PaidMediaPurchased> {
111043            Option::Some(value)
111044        }
111045        #[doc = r" Return the current variant of `MyEnum`."]
111046        #[rhai_fn(global, get = "enum_type", pure)]
111047        pub fn get_type(my_enum: &mut Option<PaidMediaPurchased>) -> String {
111048            match my_enum {
111049                Option::None => "None".to_string(),
111050                Option::Some(_) => "Some".to_string(),
111051            }
111052        }
111053        #[doc = r" Return the inner value."]
111054        #[rhai_fn(global, get = "value", pure)]
111055        pub fn get_value(my_enum: &mut Option<PaidMediaPurchased>) -> Dynamic {
111056            match my_enum {
111057                Option::None => Dynamic::UNIT,
111058                Option::Some(x) => Dynamic::from(x.clone()),
111059            }
111060        }
111061        #[rhai_fn(global, name = "to_string", pure)]
111062        pub fn to_string(my_enum: &mut Option<PaidMediaPurchased>) -> String {
111063            format!("{my_enum:?}")
111064        }
111065        #[rhai_fn(global, name = "to_debug", pure)]
111066        pub fn to_debug(my_enum: &mut Option<PaidMediaPurchased>) -> String {
111067            format!("{:?}", my_enum)
111068        }
111069    }
111070    #[export_module]
111071    #[warn(non_snake_case)]
111072    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111073    mod ChatLocationModule {
111074        #[doc = r" `Option::None` with no inner data"]
111075        pub const None: Option<ChatLocation> = Option::None;
111076        #[doc = r" `Option::Some`"]
111077        pub fn Some(value: ChatLocation) -> Option<ChatLocation> {
111078            Option::Some(value)
111079        }
111080        #[doc = r" Return the current variant of `MyEnum`."]
111081        #[rhai_fn(global, get = "enum_type", pure)]
111082        pub fn get_type(my_enum: &mut Option<ChatLocation>) -> String {
111083            match my_enum {
111084                Option::None => "None".to_string(),
111085                Option::Some(_) => "Some".to_string(),
111086            }
111087        }
111088        #[doc = r" Return the inner value."]
111089        #[rhai_fn(global, get = "value", pure)]
111090        pub fn get_value(my_enum: &mut Option<ChatLocation>) -> Dynamic {
111091            match my_enum {
111092                Option::None => Dynamic::UNIT,
111093                Option::Some(x) => Dynamic::from(x.clone()),
111094            }
111095        }
111096        #[rhai_fn(global, name = "to_string", pure)]
111097        pub fn to_string(my_enum: &mut Option<ChatLocation>) -> String {
111098            format!("{my_enum:?}")
111099        }
111100        #[rhai_fn(global, name = "to_debug", pure)]
111101        pub fn to_debug(my_enum: &mut Option<ChatLocation>) -> String {
111102            format!("{:?}", my_enum)
111103        }
111104    }
111105    #[export_module]
111106    #[warn(non_snake_case)]
111107    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111108    mod VideoChatStartedModule {
111109        #[doc = r" `Option::None` with no inner data"]
111110        pub const None: Option<VideoChatStarted> = Option::None;
111111        #[doc = r" `Option::Some`"]
111112        pub fn Some(value: VideoChatStarted) -> Option<VideoChatStarted> {
111113            Option::Some(value)
111114        }
111115        #[doc = r" Return the current variant of `MyEnum`."]
111116        #[rhai_fn(global, get = "enum_type", pure)]
111117        pub fn get_type(my_enum: &mut Option<VideoChatStarted>) -> String {
111118            match my_enum {
111119                Option::None => "None".to_string(),
111120                Option::Some(_) => "Some".to_string(),
111121            }
111122        }
111123        #[doc = r" Return the inner value."]
111124        #[rhai_fn(global, get = "value", pure)]
111125        pub fn get_value(my_enum: &mut Option<VideoChatStarted>) -> Dynamic {
111126            match my_enum {
111127                Option::None => Dynamic::UNIT,
111128                Option::Some(x) => Dynamic::from(x.clone()),
111129            }
111130        }
111131        #[rhai_fn(global, name = "to_string", pure)]
111132        pub fn to_string(my_enum: &mut Option<VideoChatStarted>) -> String {
111133            format!("{my_enum:?}")
111134        }
111135        #[rhai_fn(global, name = "to_debug", pure)]
111136        pub fn to_debug(my_enum: &mut Option<VideoChatStarted>) -> String {
111137            format!("{:?}", my_enum)
111138        }
111139    }
111140    #[export_module]
111141    #[warn(non_snake_case)]
111142    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111143    mod ChatMemberUpdatedModule {
111144        #[doc = r" `Option::None` with no inner data"]
111145        pub const None: Option<ChatMemberUpdated> = Option::None;
111146        #[doc = r" `Option::Some`"]
111147        pub fn Some(value: ChatMemberUpdated) -> Option<ChatMemberUpdated> {
111148            Option::Some(value)
111149        }
111150        #[doc = r" Return the current variant of `MyEnum`."]
111151        #[rhai_fn(global, get = "enum_type", pure)]
111152        pub fn get_type(my_enum: &mut Option<ChatMemberUpdated>) -> String {
111153            match my_enum {
111154                Option::None => "None".to_string(),
111155                Option::Some(_) => "Some".to_string(),
111156            }
111157        }
111158        #[doc = r" Return the inner value."]
111159        #[rhai_fn(global, get = "value", pure)]
111160        pub fn get_value(my_enum: &mut Option<ChatMemberUpdated>) -> Dynamic {
111161            match my_enum {
111162                Option::None => Dynamic::UNIT,
111163                Option::Some(x) => Dynamic::from(x.clone()),
111164            }
111165        }
111166        #[rhai_fn(global, name = "to_string", pure)]
111167        pub fn to_string(my_enum: &mut Option<ChatMemberUpdated>) -> String {
111168            format!("{my_enum:?}")
111169        }
111170        #[rhai_fn(global, name = "to_debug", pure)]
111171        pub fn to_debug(my_enum: &mut Option<ChatMemberUpdated>) -> String {
111172            format!("{:?}", my_enum)
111173        }
111174    }
111175    #[export_module]
111176    #[warn(non_snake_case)]
111177    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111178    mod VenueModule {
111179        #[doc = r" `Option::None` with no inner data"]
111180        pub const None: Option<Venue> = Option::None;
111181        #[doc = r" `Option::Some`"]
111182        pub fn Some(value: Venue) -> Option<Venue> {
111183            Option::Some(value)
111184        }
111185        #[doc = r" Return the current variant of `MyEnum`."]
111186        #[rhai_fn(global, get = "enum_type", pure)]
111187        pub fn get_type(my_enum: &mut Option<Venue>) -> String {
111188            match my_enum {
111189                Option::None => "None".to_string(),
111190                Option::Some(_) => "Some".to_string(),
111191            }
111192        }
111193        #[doc = r" Return the inner value."]
111194        #[rhai_fn(global, get = "value", pure)]
111195        pub fn get_value(my_enum: &mut Option<Venue>) -> Dynamic {
111196            match my_enum {
111197                Option::None => Dynamic::UNIT,
111198                Option::Some(x) => Dynamic::from(x.clone()),
111199            }
111200        }
111201        #[rhai_fn(global, name = "to_string", pure)]
111202        pub fn to_string(my_enum: &mut Option<Venue>) -> String {
111203            format!("{my_enum:?}")
111204        }
111205        #[rhai_fn(global, name = "to_debug", pure)]
111206        pub fn to_debug(my_enum: &mut Option<Venue>) -> String {
111207            format!("{:?}", my_enum)
111208        }
111209    }
111210    #[export_module]
111211    #[warn(non_snake_case)]
111212    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111213    mod ChatBoostAddedModule {
111214        #[doc = r" `Option::None` with no inner data"]
111215        pub const None: Option<ChatBoostAdded> = Option::None;
111216        #[doc = r" `Option::Some`"]
111217        pub fn Some(value: ChatBoostAdded) -> Option<ChatBoostAdded> {
111218            Option::Some(value)
111219        }
111220        #[doc = r" Return the current variant of `MyEnum`."]
111221        #[rhai_fn(global, get = "enum_type", pure)]
111222        pub fn get_type(my_enum: &mut Option<ChatBoostAdded>) -> String {
111223            match my_enum {
111224                Option::None => "None".to_string(),
111225                Option::Some(_) => "Some".to_string(),
111226            }
111227        }
111228        #[doc = r" Return the inner value."]
111229        #[rhai_fn(global, get = "value", pure)]
111230        pub fn get_value(my_enum: &mut Option<ChatBoostAdded>) -> Dynamic {
111231            match my_enum {
111232                Option::None => Dynamic::UNIT,
111233                Option::Some(x) => Dynamic::from(x.clone()),
111234            }
111235        }
111236        #[rhai_fn(global, name = "to_string", pure)]
111237        pub fn to_string(my_enum: &mut Option<ChatBoostAdded>) -> String {
111238            format!("{my_enum:?}")
111239        }
111240        #[rhai_fn(global, name = "to_debug", pure)]
111241        pub fn to_debug(my_enum: &mut Option<ChatBoostAdded>) -> String {
111242            format!("{:?}", my_enum)
111243        }
111244    }
111245    #[export_module]
111246    #[warn(non_snake_case)]
111247    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111248    mod ReactionTypeCustomEmojiModule {
111249        #[doc = r" `Option::None` with no inner data"]
111250        pub const None: Option<ReactionTypeCustomEmoji> = Option::None;
111251        #[doc = r" `Option::Some`"]
111252        pub fn Some(value: ReactionTypeCustomEmoji) -> Option<ReactionTypeCustomEmoji> {
111253            Option::Some(value)
111254        }
111255        #[doc = r" Return the current variant of `MyEnum`."]
111256        #[rhai_fn(global, get = "enum_type", pure)]
111257        pub fn get_type(my_enum: &mut Option<ReactionTypeCustomEmoji>) -> String {
111258            match my_enum {
111259                Option::None => "None".to_string(),
111260                Option::Some(_) => "Some".to_string(),
111261            }
111262        }
111263        #[doc = r" Return the inner value."]
111264        #[rhai_fn(global, get = "value", pure)]
111265        pub fn get_value(my_enum: &mut Option<ReactionTypeCustomEmoji>) -> Dynamic {
111266            match my_enum {
111267                Option::None => Dynamic::UNIT,
111268                Option::Some(x) => Dynamic::from(x.clone()),
111269            }
111270        }
111271        #[rhai_fn(global, name = "to_string", pure)]
111272        pub fn to_string(my_enum: &mut Option<ReactionTypeCustomEmoji>) -> String {
111273            format!("{my_enum:?}")
111274        }
111275        #[rhai_fn(global, name = "to_debug", pure)]
111276        pub fn to_debug(my_enum: &mut Option<ReactionTypeCustomEmoji>) -> String {
111277            format!("{:?}", my_enum)
111278        }
111279    }
111280    #[export_module]
111281    #[warn(non_snake_case)]
111282    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111283    mod LocationAddressModule {
111284        #[doc = r" `Option::None` with no inner data"]
111285        pub const None: Option<LocationAddress> = Option::None;
111286        #[doc = r" `Option::Some`"]
111287        pub fn Some(value: LocationAddress) -> Option<LocationAddress> {
111288            Option::Some(value)
111289        }
111290        #[doc = r" Return the current variant of `MyEnum`."]
111291        #[rhai_fn(global, get = "enum_type", pure)]
111292        pub fn get_type(my_enum: &mut Option<LocationAddress>) -> String {
111293            match my_enum {
111294                Option::None => "None".to_string(),
111295                Option::Some(_) => "Some".to_string(),
111296            }
111297        }
111298        #[doc = r" Return the inner value."]
111299        #[rhai_fn(global, get = "value", pure)]
111300        pub fn get_value(my_enum: &mut Option<LocationAddress>) -> Dynamic {
111301            match my_enum {
111302                Option::None => Dynamic::UNIT,
111303                Option::Some(x) => Dynamic::from(x.clone()),
111304            }
111305        }
111306        #[rhai_fn(global, name = "to_string", pure)]
111307        pub fn to_string(my_enum: &mut Option<LocationAddress>) -> String {
111308            format!("{my_enum:?}")
111309        }
111310        #[rhai_fn(global, name = "to_debug", pure)]
111311        pub fn to_debug(my_enum: &mut Option<LocationAddress>) -> String {
111312            format!("{:?}", my_enum)
111313        }
111314    }
111315    #[export_module]
111316    #[warn(non_snake_case)]
111317    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111318    mod PassportElementErrorModule {
111319        #[doc = r" `Option::None` with no inner data"]
111320        pub const None: Option<PassportElementError> = Option::None;
111321        #[doc = r" `Option::Some`"]
111322        pub fn Some(value: PassportElementError) -> Option<PassportElementError> {
111323            Option::Some(value)
111324        }
111325        #[doc = r" Return the current variant of `MyEnum`."]
111326        #[rhai_fn(global, get = "enum_type", pure)]
111327        pub fn get_type(my_enum: &mut Option<PassportElementError>) -> String {
111328            match my_enum {
111329                Option::None => "None".to_string(),
111330                Option::Some(_) => "Some".to_string(),
111331            }
111332        }
111333        #[doc = r" Return the inner value."]
111334        #[rhai_fn(global, get = "value", pure)]
111335        pub fn get_value(my_enum: &mut Option<PassportElementError>) -> Dynamic {
111336            match my_enum {
111337                Option::None => Dynamic::UNIT,
111338                Option::Some(x) => Dynamic::from(x.clone()),
111339            }
111340        }
111341        #[rhai_fn(global, name = "to_string", pure)]
111342        pub fn to_string(my_enum: &mut Option<PassportElementError>) -> String {
111343            format!("{my_enum:?}")
111344        }
111345        #[rhai_fn(global, name = "to_debug", pure)]
111346        pub fn to_debug(my_enum: &mut Option<PassportElementError>) -> String {
111347            format!("{:?}", my_enum)
111348        }
111349    }
111350    #[export_module]
111351    #[warn(non_snake_case)]
111352    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111353    mod OwnedGiftRegularModule {
111354        #[doc = r" `Option::None` with no inner data"]
111355        pub const None: Option<OwnedGiftRegular> = Option::None;
111356        #[doc = r" `Option::Some`"]
111357        pub fn Some(value: OwnedGiftRegular) -> Option<OwnedGiftRegular> {
111358            Option::Some(value)
111359        }
111360        #[doc = r" Return the current variant of `MyEnum`."]
111361        #[rhai_fn(global, get = "enum_type", pure)]
111362        pub fn get_type(my_enum: &mut Option<OwnedGiftRegular>) -> String {
111363            match my_enum {
111364                Option::None => "None".to_string(),
111365                Option::Some(_) => "Some".to_string(),
111366            }
111367        }
111368        #[doc = r" Return the inner value."]
111369        #[rhai_fn(global, get = "value", pure)]
111370        pub fn get_value(my_enum: &mut Option<OwnedGiftRegular>) -> Dynamic {
111371            match my_enum {
111372                Option::None => Dynamic::UNIT,
111373                Option::Some(x) => Dynamic::from(x.clone()),
111374            }
111375        }
111376        #[rhai_fn(global, name = "to_string", pure)]
111377        pub fn to_string(my_enum: &mut Option<OwnedGiftRegular>) -> String {
111378            format!("{my_enum:?}")
111379        }
111380        #[rhai_fn(global, name = "to_debug", pure)]
111381        pub fn to_debug(my_enum: &mut Option<OwnedGiftRegular>) -> String {
111382            format!("{:?}", my_enum)
111383        }
111384    }
111385    #[export_module]
111386    #[warn(non_snake_case)]
111387    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111388    mod InlineKeyboardMarkupModule {
111389        #[doc = r" `Option::None` with no inner data"]
111390        pub const None: Option<InlineKeyboardMarkup> = Option::None;
111391        #[doc = r" `Option::Some`"]
111392        pub fn Some(value: InlineKeyboardMarkup) -> Option<InlineKeyboardMarkup> {
111393            Option::Some(value)
111394        }
111395        #[doc = r" Return the current variant of `MyEnum`."]
111396        #[rhai_fn(global, get = "enum_type", pure)]
111397        pub fn get_type(my_enum: &mut Option<InlineKeyboardMarkup>) -> String {
111398            match my_enum {
111399                Option::None => "None".to_string(),
111400                Option::Some(_) => "Some".to_string(),
111401            }
111402        }
111403        #[doc = r" Return the inner value."]
111404        #[rhai_fn(global, get = "value", pure)]
111405        pub fn get_value(my_enum: &mut Option<InlineKeyboardMarkup>) -> Dynamic {
111406            match my_enum {
111407                Option::None => Dynamic::UNIT,
111408                Option::Some(x) => Dynamic::from(x.clone()),
111409            }
111410        }
111411        #[rhai_fn(global, name = "to_string", pure)]
111412        pub fn to_string(my_enum: &mut Option<InlineKeyboardMarkup>) -> String {
111413            format!("{my_enum:?}")
111414        }
111415        #[rhai_fn(global, name = "to_debug", pure)]
111416        pub fn to_debug(my_enum: &mut Option<InlineKeyboardMarkup>) -> String {
111417            format!("{:?}", my_enum)
111418        }
111419    }
111420    #[export_module]
111421    #[warn(non_snake_case)]
111422    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111423    mod StoryAreaModule {
111424        #[doc = r" `Option::None` with no inner data"]
111425        pub const None: Option<StoryArea> = Option::None;
111426        #[doc = r" `Option::Some`"]
111427        pub fn Some(value: StoryArea) -> Option<StoryArea> {
111428            Option::Some(value)
111429        }
111430        #[doc = r" Return the current variant of `MyEnum`."]
111431        #[rhai_fn(global, get = "enum_type", pure)]
111432        pub fn get_type(my_enum: &mut Option<StoryArea>) -> String {
111433            match my_enum {
111434                Option::None => "None".to_string(),
111435                Option::Some(_) => "Some".to_string(),
111436            }
111437        }
111438        #[doc = r" Return the inner value."]
111439        #[rhai_fn(global, get = "value", pure)]
111440        pub fn get_value(my_enum: &mut Option<StoryArea>) -> Dynamic {
111441            match my_enum {
111442                Option::None => Dynamic::UNIT,
111443                Option::Some(x) => Dynamic::from(x.clone()),
111444            }
111445        }
111446        #[rhai_fn(global, name = "to_string", pure)]
111447        pub fn to_string(my_enum: &mut Option<StoryArea>) -> String {
111448            format!("{my_enum:?}")
111449        }
111450        #[rhai_fn(global, name = "to_debug", pure)]
111451        pub fn to_debug(my_enum: &mut Option<StoryArea>) -> String {
111452            format!("{:?}", my_enum)
111453        }
111454    }
111455    #[export_module]
111456    #[warn(non_snake_case)]
111457    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111458    mod MaybeInaccessibleMessageModule {
111459        #[doc = r" `Option::None` with no inner data"]
111460        pub const None: Option<MaybeInaccessibleMessage> = Option::None;
111461        #[doc = r" `Option::Some`"]
111462        pub fn Some(value: MaybeInaccessibleMessage) -> Option<MaybeInaccessibleMessage> {
111463            Option::Some(value)
111464        }
111465        #[doc = r" Return the current variant of `MyEnum`."]
111466        #[rhai_fn(global, get = "enum_type", pure)]
111467        pub fn get_type(my_enum: &mut Option<MaybeInaccessibleMessage>) -> String {
111468            match my_enum {
111469                Option::None => "None".to_string(),
111470                Option::Some(_) => "Some".to_string(),
111471            }
111472        }
111473        #[doc = r" Return the inner value."]
111474        #[rhai_fn(global, get = "value", pure)]
111475        pub fn get_value(my_enum: &mut Option<MaybeInaccessibleMessage>) -> Dynamic {
111476            match my_enum {
111477                Option::None => Dynamic::UNIT,
111478                Option::Some(x) => Dynamic::from(x.clone()),
111479            }
111480        }
111481        #[rhai_fn(global, name = "to_string", pure)]
111482        pub fn to_string(my_enum: &mut Option<MaybeInaccessibleMessage>) -> String {
111483            format!("{my_enum:?}")
111484        }
111485        #[rhai_fn(global, name = "to_debug", pure)]
111486        pub fn to_debug(my_enum: &mut Option<MaybeInaccessibleMessage>) -> String {
111487            format!("{:?}", my_enum)
111488        }
111489    }
111490    #[export_module]
111491    #[warn(non_snake_case)]
111492    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111493    mod StoryAreaTypeUniqueGiftModule {
111494        #[doc = r" `Option::None` with no inner data"]
111495        pub const None: Option<StoryAreaTypeUniqueGift> = Option::None;
111496        #[doc = r" `Option::Some`"]
111497        pub fn Some(value: StoryAreaTypeUniqueGift) -> Option<StoryAreaTypeUniqueGift> {
111498            Option::Some(value)
111499        }
111500        #[doc = r" Return the current variant of `MyEnum`."]
111501        #[rhai_fn(global, get = "enum_type", pure)]
111502        pub fn get_type(my_enum: &mut Option<StoryAreaTypeUniqueGift>) -> String {
111503            match my_enum {
111504                Option::None => "None".to_string(),
111505                Option::Some(_) => "Some".to_string(),
111506            }
111507        }
111508        #[doc = r" Return the inner value."]
111509        #[rhai_fn(global, get = "value", pure)]
111510        pub fn get_value(my_enum: &mut Option<StoryAreaTypeUniqueGift>) -> Dynamic {
111511            match my_enum {
111512                Option::None => Dynamic::UNIT,
111513                Option::Some(x) => Dynamic::from(x.clone()),
111514            }
111515        }
111516        #[rhai_fn(global, name = "to_string", pure)]
111517        pub fn to_string(my_enum: &mut Option<StoryAreaTypeUniqueGift>) -> String {
111518            format!("{my_enum:?}")
111519        }
111520        #[rhai_fn(global, name = "to_debug", pure)]
111521        pub fn to_debug(my_enum: &mut Option<StoryAreaTypeUniqueGift>) -> String {
111522            format!("{:?}", my_enum)
111523        }
111524    }
111525    #[export_module]
111526    #[warn(non_snake_case)]
111527    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111528    mod PassportDataModule {
111529        #[doc = r" `Option::None` with no inner data"]
111530        pub const None: Option<PassportData> = Option::None;
111531        #[doc = r" `Option::Some`"]
111532        pub fn Some(value: PassportData) -> Option<PassportData> {
111533            Option::Some(value)
111534        }
111535        #[doc = r" Return the current variant of `MyEnum`."]
111536        #[rhai_fn(global, get = "enum_type", pure)]
111537        pub fn get_type(my_enum: &mut Option<PassportData>) -> String {
111538            match my_enum {
111539                Option::None => "None".to_string(),
111540                Option::Some(_) => "Some".to_string(),
111541            }
111542        }
111543        #[doc = r" Return the inner value."]
111544        #[rhai_fn(global, get = "value", pure)]
111545        pub fn get_value(my_enum: &mut Option<PassportData>) -> Dynamic {
111546            match my_enum {
111547                Option::None => Dynamic::UNIT,
111548                Option::Some(x) => Dynamic::from(x.clone()),
111549            }
111550        }
111551        #[rhai_fn(global, name = "to_string", pure)]
111552        pub fn to_string(my_enum: &mut Option<PassportData>) -> String {
111553            format!("{my_enum:?}")
111554        }
111555        #[rhai_fn(global, name = "to_debug", pure)]
111556        pub fn to_debug(my_enum: &mut Option<PassportData>) -> String {
111557            format!("{:?}", my_enum)
111558        }
111559    }
111560    #[export_module]
111561    #[warn(non_snake_case)]
111562    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111563    mod i64Module {
111564        #[doc = r" `Option::None` with no inner data"]
111565        pub const None: Option<i64> = Option::None;
111566        #[doc = r" `Option::Some`"]
111567        pub fn Some(value: i64) -> Option<i64> {
111568            Option::Some(value)
111569        }
111570        #[doc = r" Return the current variant of `MyEnum`."]
111571        #[rhai_fn(global, get = "enum_type", pure)]
111572        pub fn get_type(my_enum: &mut Option<i64>) -> String {
111573            match my_enum {
111574                Option::None => "None".to_string(),
111575                Option::Some(_) => "Some".to_string(),
111576            }
111577        }
111578        #[doc = r" Return the inner value."]
111579        #[rhai_fn(global, get = "value", pure)]
111580        pub fn get_value(my_enum: &mut Option<i64>) -> Dynamic {
111581            match my_enum {
111582                Option::None => Dynamic::UNIT,
111583                Option::Some(x) => Dynamic::from(*x),
111584            }
111585        }
111586        #[rhai_fn(global, name = "to_string", pure)]
111587        pub fn to_string(my_enum: &mut Option<i64>) -> String {
111588            format!("{my_enum:?}")
111589        }
111590        #[rhai_fn(global, name = "to_debug", pure)]
111591        pub fn to_debug(my_enum: &mut Option<i64>) -> String {
111592            format!("{:?}", my_enum)
111593        }
111594    }
111595    #[export_module]
111596    #[warn(non_snake_case)]
111597    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111598    mod f64Module {
111599        #[doc = r" `Option::None` with no inner data"]
111600        pub const None: Option<f64> = Option::None;
111601        #[doc = r" `Option::Some`"]
111602        pub fn Some(value: f64) -> Option<f64> {
111603            Option::Some(value)
111604        }
111605        #[doc = r" Return the current variant of `MyEnum`."]
111606        #[rhai_fn(global, get = "enum_type", pure)]
111607        pub fn get_type(my_enum: &mut Option<f64>) -> String {
111608            match my_enum {
111609                Option::None => "None".to_string(),
111610                Option::Some(_) => "Some".to_string(),
111611            }
111612        }
111613        #[doc = r" Return the inner value."]
111614        #[rhai_fn(global, get = "value", pure)]
111615        pub fn get_value(my_enum: &mut Option<f64>) -> Dynamic {
111616            match my_enum {
111617                Option::None => Dynamic::UNIT,
111618                Option::Some(x) => Dynamic::from(*x),
111619            }
111620        }
111621        #[rhai_fn(global, name = "to_string", pure)]
111622        pub fn to_string(my_enum: &mut Option<f64>) -> String {
111623            format!("{my_enum:?}")
111624        }
111625        #[rhai_fn(global, name = "to_debug", pure)]
111626        pub fn to_debug(my_enum: &mut Option<f64>) -> String {
111627            format!("{:?}", my_enum)
111628        }
111629    }
111630    #[export_module]
111631    #[warn(non_snake_case)]
111632    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111633    mod StringModule {
111634        #[doc = r" `Option::None` with no inner data"]
111635        pub const None: Option<String> = Option::None;
111636        #[doc = r" `Option::Some`"]
111637        pub fn Some(value: String) -> Option<String> {
111638            Option::Some(value)
111639        }
111640        #[doc = r" Return the current variant of `MyEnum`."]
111641        #[rhai_fn(global, get = "enum_type", pure)]
111642        pub fn get_type(my_enum: &mut Option<String>) -> String {
111643            match my_enum {
111644                Option::None => "None".to_string(),
111645                Option::Some(_) => "Some".to_string(),
111646            }
111647        }
111648        #[doc = r" Return the inner value."]
111649        #[rhai_fn(global, get = "value", pure)]
111650        pub fn get_value(my_enum: &mut Option<String>) -> Dynamic {
111651            match my_enum {
111652                Option::None => Dynamic::UNIT,
111653                Option::Some(x) => Dynamic::from(x.clone()),
111654            }
111655        }
111656        #[rhai_fn(global, name = "to_string", pure)]
111657        pub fn to_string(my_enum: &mut Option<String>) -> String {
111658            format!("{my_enum:?}")
111659        }
111660        #[rhai_fn(global, name = "to_debug", pure)]
111661        pub fn to_debug(my_enum: &mut Option<String>) -> String {
111662            format!("{:?}", my_enum)
111663        }
111664    }
111665    #[export_module]
111666    #[warn(non_snake_case)]
111667    #[allow(dead_code, non_snake_case, non_upper_case_globals)]
111668    mod boolModule {
111669        #[doc = r" `Option::None` with no inner data"]
111670        pub const None: Option<bool> = Option::None;
111671        #[doc = r" `Option::Some`"]
111672        pub fn Some(value: bool) -> Option<bool> {
111673            Option::Some(value)
111674        }
111675        #[doc = r" Return the current variant of `MyEnum`."]
111676        #[rhai_fn(global, get = "enum_type", pure)]
111677        pub fn get_type(my_enum: &mut Option<bool>) -> String {
111678            match my_enum {
111679                Option::None => "None".to_string(),
111680                Option::Some(_) => "Some".to_string(),
111681            }
111682        }
111683        #[doc = r" Return the inner value."]
111684        #[rhai_fn(global, get = "value", pure)]
111685        pub fn get_value(my_enum: &mut Option<bool>) -> Dynamic {
111686            match my_enum {
111687                Option::None => Dynamic::UNIT,
111688                Option::Some(x) => Dynamic::from(*x),
111689            }
111690        }
111691        #[rhai_fn(global, name = "to_string", pure)]
111692        pub fn to_string(my_enum: &mut Option<bool>) -> String {
111693            format!("{my_enum:?}")
111694        }
111695        #[rhai_fn(global, name = "to_debug", pure)]
111696        pub fn to_debug(my_enum: &mut Option<bool>) -> String {
111697            format!("{:?}", my_enum)
111698        }
111699    }
111700    #[cfg(feature = "rhai")]
111701    impl SetupRhai for OrderInfo {
111702        fn setup_rhai(engine: &mut rhai::Engine) {
111703            engine.build_type::<OrderInfo>();
111704            engine
111705                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
111706                .build_type::<ShippingAddress>()
111707                .register_static_module(
111708                    "Option<ShippingAddress>",
111709                    exported_module!(ShippingAddressModule).into(),
111710                );
111711            engine
111712                .register_type_with_name::<Option<String>>("Option<String>")
111713                .register_static_module("Option<String>", exported_module!(StringModule).into());
111714        }
111715    }
111716    #[cfg(feature = "rhai")]
111717    #[allow(unused_mut)]
111718    impl rhai::CustomType for OrderInfo {
111719        fn build(mut builder: rhai::TypeBuilder<Self>) {
111720            builder.with_get("name", Self::rhai_get_name);
111721            builder.with_get("phone_number", Self::rhai_get_phone_number);
111722            builder.with_get("email", Self::rhai_get_email);
111723            builder.with_get("shipping_address", Self::rhai_get_shipping_address);
111724            builder.on_debug(|t| format!("{:?}", t));
111725            drop(builder);
111726        }
111727    }
111728    #[cfg(feature = "rhai")]
111729    impl SetupRhai for SuggestedPostPrice {
111730        fn setup_rhai(engine: &mut rhai::Engine) {
111731            engine.build_type::<SuggestedPostPrice>();
111732            engine
111733                .register_type_with_name::<Option<i64>>("Option<i64>")
111734                .register_static_module("Option<i64>", exported_module!(i64Module).into());
111735            engine
111736                .register_type_with_name::<Option<String>>("Option<String>")
111737                .register_static_module("Option<String>", exported_module!(StringModule).into());
111738        }
111739    }
111740    #[cfg(feature = "rhai")]
111741    #[allow(unused_mut)]
111742    impl rhai::CustomType for SuggestedPostPrice {
111743        fn build(mut builder: rhai::TypeBuilder<Self>) {
111744            builder.with_get("currency", Self::rhai_get_currency);
111745            builder.with_get("amount", Self::rhai_get_amount);
111746            builder.on_debug(|t| format!("{:?}", t));
111747            drop(builder);
111748        }
111749    }
111750    #[cfg(feature = "rhai")]
111751    impl SetupRhai for Chat {
111752        fn setup_rhai(engine: &mut rhai::Engine) {
111753            engine.build_type::<Chat>();
111754            engine
111755                .register_type_with_name::<Option<bool>>("Option<bool>")
111756                .register_static_module("Option<bool>", exported_module!(boolModule).into());
111757            engine
111758                .register_type_with_name::<Option<i64>>("Option<i64>")
111759                .register_static_module("Option<i64>", exported_module!(i64Module).into());
111760            engine
111761                .register_type_with_name::<Option<String>>("Option<String>")
111762                .register_static_module("Option<String>", exported_module!(StringModule).into());
111763        }
111764    }
111765    #[cfg(feature = "rhai")]
111766    #[allow(unused_mut)]
111767    impl rhai::CustomType for Chat {
111768        fn build(mut builder: rhai::TypeBuilder<Self>) {
111769            builder.with_get("id", Self::rhai_get_id);
111770            builder.with_get("tg_type", Self::rhai_get_tg_type);
111771            builder.with_get("title", Self::rhai_get_title);
111772            builder.with_get("username", Self::rhai_get_username);
111773            builder.with_get("first_name", Self::rhai_get_first_name);
111774            builder.with_get("last_name", Self::rhai_get_last_name);
111775            builder.with_get("is_forum", Self::rhai_get_is_forum);
111776            builder.with_get("is_direct_messages", Self::rhai_get_is_direct_messages);
111777            builder.on_debug(|t| format!("{:?}", t));
111778            drop(builder);
111779        }
111780    }
111781    #[cfg(feature = "rhai")]
111782    impl SetupRhai for CallbackGame {
111783        fn setup_rhai(engine: &mut rhai::Engine) {
111784            engine.build_type::<CallbackGame>();
111785        }
111786    }
111787    #[cfg(feature = "rhai")]
111788    #[allow(unused_mut)]
111789    impl rhai::CustomType for CallbackGame {
111790        fn build(mut builder: rhai::TypeBuilder<Self>) {
111791            builder.on_debug(|t| format!("{:?}", t));
111792            drop(builder);
111793        }
111794    }
111795    #[cfg(feature = "rhai")]
111796    impl SetupRhai for Update {
111797        fn setup_rhai(engine: &mut rhai::Engine) {
111798            engine.build_type::<Update>();
111799            engine
111800                .register_type_with_name::<Option<Animation>>("Option<Animation>")
111801                .build_type::<Animation>()
111802                .register_static_module(
111803                    "Option<Animation>",
111804                    exported_module!(AnimationModule).into(),
111805                );
111806            engine
111807                .register_type_with_name::<Option<Audio>>("Option<Audio>")
111808                .build_type::<Audio>()
111809                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
111810            engine
111811                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
111812                .register_static_module(
111813                    "Option<BackgroundType>",
111814                    exported_module!(BackgroundTypeModule).into(),
111815                );
111816            engine
111817                .register_type_with_name::<Option<bool>>("Option<bool>")
111818                .register_static_module("Option<bool>", exported_module!(boolModule).into());
111819            engine
111820                .register_type_with_name::<Option<BusinessBotRights>>("Option<BusinessBotRights>")
111821                .build_type::<BusinessBotRights>()
111822                .register_static_module(
111823                    "Option<BusinessBotRights>",
111824                    exported_module!(BusinessBotRightsModule).into(),
111825                );
111826            engine
111827                .register_type_with_name::<Option<BusinessConnection>>("Option<BusinessConnection>")
111828                .build_type::<BusinessConnection>()
111829                .register_static_module(
111830                    "Option<BusinessConnection>",
111831                    exported_module!(BusinessConnectionModule).into(),
111832                );
111833            engine
111834                .register_type_with_name::<Option<BusinessMessagesDeleted>>(
111835                    "Option<BusinessMessagesDeleted>",
111836                )
111837                .build_type::<BusinessMessagesDeleted>()
111838                .register_static_module(
111839                    "Option<BusinessMessagesDeleted>",
111840                    exported_module!(BusinessMessagesDeletedModule).into(),
111841                );
111842            engine
111843                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
111844                .build_type::<CallbackGame>()
111845                .register_static_module(
111846                    "Option<CallbackGame>",
111847                    exported_module!(CallbackGameModule).into(),
111848                );
111849            engine
111850                .register_type_with_name::<Option<CallbackQuery>>("Option<CallbackQuery>")
111851                .build_type::<CallbackQuery>()
111852                .register_static_module(
111853                    "Option<CallbackQuery>",
111854                    exported_module!(CallbackQueryModule).into(),
111855                );
111856            engine
111857                .register_type_with_name::<Option<Chat>>("Option<Chat>")
111858                .build_type::<Chat>()
111859                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
111860            engine
111861                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
111862                .build_type::<ChatBackground>()
111863                .register_static_module(
111864                    "Option<ChatBackground>",
111865                    exported_module!(ChatBackgroundModule).into(),
111866                );
111867            engine
111868                .register_type_with_name::<Option<ChatBoost>>("Option<ChatBoost>")
111869                .build_type::<ChatBoost>()
111870                .register_static_module(
111871                    "Option<ChatBoost>",
111872                    exported_module!(ChatBoostModule).into(),
111873                );
111874            engine
111875                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
111876                .build_type::<ChatBoostAdded>()
111877                .register_static_module(
111878                    "Option<ChatBoostAdded>",
111879                    exported_module!(ChatBoostAddedModule).into(),
111880                );
111881            engine
111882                .register_type_with_name::<Option<ChatBoostRemoved>>("Option<ChatBoostRemoved>")
111883                .build_type::<ChatBoostRemoved>()
111884                .register_static_module(
111885                    "Option<ChatBoostRemoved>",
111886                    exported_module!(ChatBoostRemovedModule).into(),
111887                );
111888            engine
111889                .register_type_with_name::<Option<ChatBoostSource>>("Option<ChatBoostSource>")
111890                .register_static_module(
111891                    "Option<ChatBoostSource>",
111892                    exported_module!(ChatBoostSourceModule).into(),
111893                );
111894            engine
111895                .register_type_with_name::<Option<ChatBoostUpdated>>("Option<ChatBoostUpdated>")
111896                .build_type::<ChatBoostUpdated>()
111897                .register_static_module(
111898                    "Option<ChatBoostUpdated>",
111899                    exported_module!(ChatBoostUpdatedModule).into(),
111900                );
111901            engine
111902                .register_type_with_name::<Option<ChatInviteLink>>("Option<ChatInviteLink>")
111903                .build_type::<ChatInviteLink>()
111904                .register_static_module(
111905                    "Option<ChatInviteLink>",
111906                    exported_module!(ChatInviteLinkModule).into(),
111907                );
111908            engine
111909                .register_type_with_name::<Option<ChatJoinRequest>>("Option<ChatJoinRequest>")
111910                .build_type::<ChatJoinRequest>()
111911                .register_static_module(
111912                    "Option<ChatJoinRequest>",
111913                    exported_module!(ChatJoinRequestModule).into(),
111914                );
111915            engine
111916                .register_type_with_name::<Option<ChatMember>>("Option<ChatMember>")
111917                .register_static_module(
111918                    "Option<ChatMember>",
111919                    exported_module!(ChatMemberModule).into(),
111920                );
111921            engine
111922                .register_type_with_name::<Option<ChatMemberUpdated>>("Option<ChatMemberUpdated>")
111923                .build_type::<ChatMemberUpdated>()
111924                .register_static_module(
111925                    "Option<ChatMemberUpdated>",
111926                    exported_module!(ChatMemberUpdatedModule).into(),
111927                );
111928            engine
111929                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
111930                .build_type::<ChatShared>()
111931                .register_static_module(
111932                    "Option<ChatShared>",
111933                    exported_module!(ChatSharedModule).into(),
111934                );
111935            engine
111936                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
111937                .build_type::<Checklist>()
111938                .register_static_module(
111939                    "Option<Checklist>",
111940                    exported_module!(ChecklistModule).into(),
111941                );
111942            engine
111943                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
111944                .build_type::<ChecklistTask>()
111945                .register_static_module(
111946                    "Option<ChecklistTask>",
111947                    exported_module!(ChecklistTaskModule).into(),
111948                );
111949            engine
111950                .register_type_with_name::<Option<ChecklistTasksAdded>>(
111951                    "Option<ChecklistTasksAdded>",
111952                )
111953                .build_type::<ChecklistTasksAdded>()
111954                .register_static_module(
111955                    "Option<ChecklistTasksAdded>",
111956                    exported_module!(ChecklistTasksAddedModule).into(),
111957                );
111958            engine
111959                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
111960                .build_type::<ChecklistTasksDone>()
111961                .register_static_module(
111962                    "Option<ChecklistTasksDone>",
111963                    exported_module!(ChecklistTasksDoneModule).into(),
111964                );
111965            engine
111966                .register_type_with_name::<Option<ChosenInlineResult>>("Option<ChosenInlineResult>")
111967                .build_type::<ChosenInlineResult>()
111968                .register_static_module(
111969                    "Option<ChosenInlineResult>",
111970                    exported_module!(ChosenInlineResultModule).into(),
111971                );
111972            engine
111973                .register_type_with_name::<Option<Contact>>("Option<Contact>")
111974                .build_type::<Contact>()
111975                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
111976            engine
111977                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
111978                .build_type::<CopyTextButton>()
111979                .register_static_module(
111980                    "Option<CopyTextButton>",
111981                    exported_module!(CopyTextButtonModule).into(),
111982                );
111983            engine
111984                .register_type_with_name::<Option<Dice>>("Option<Dice>")
111985                .build_type::<Dice>()
111986                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
111987            engine
111988                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
111989                    "Option<DirectMessagePriceChanged>",
111990                )
111991                .build_type::<DirectMessagePriceChanged>()
111992                .register_static_module(
111993                    "Option<DirectMessagePriceChanged>",
111994                    exported_module!(DirectMessagePriceChangedModule).into(),
111995                );
111996            engine
111997                .register_type_with_name::<Option<DirectMessagesTopic>>(
111998                    "Option<DirectMessagesTopic>",
111999                )
112000                .build_type::<DirectMessagesTopic>()
112001                .register_static_module(
112002                    "Option<DirectMessagesTopic>",
112003                    exported_module!(DirectMessagesTopicModule).into(),
112004                );
112005            engine
112006                .register_type_with_name::<Option<Document>>("Option<Document>")
112007                .build_type::<Document>()
112008                .register_static_module(
112009                    "Option<Document>",
112010                    exported_module!(DocumentModule).into(),
112011                );
112012            engine
112013                .register_type_with_name::<Option<EncryptedCredentials>>(
112014                    "Option<EncryptedCredentials>",
112015                )
112016                .build_type::<EncryptedCredentials>()
112017                .register_static_module(
112018                    "Option<EncryptedCredentials>",
112019                    exported_module!(EncryptedCredentialsModule).into(),
112020                );
112021            engine
112022                .register_type_with_name::<Option<EncryptedPassportElement>>(
112023                    "Option<EncryptedPassportElement>",
112024                )
112025                .build_type::<EncryptedPassportElement>()
112026                .register_static_module(
112027                    "Option<EncryptedPassportElement>",
112028                    exported_module!(EncryptedPassportElementModule).into(),
112029                );
112030            engine
112031                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
112032                .build_type::<ExternalReplyInfo>()
112033                .register_static_module(
112034                    "Option<ExternalReplyInfo>",
112035                    exported_module!(ExternalReplyInfoModule).into(),
112036                );
112037            engine
112038                .register_type_with_name::<Option<File>>("Option<File>")
112039                .build_type::<File>()
112040                .register_static_module("Option<File>", exported_module!(FileModule).into());
112041            engine
112042                .register_type_with_name::<Option<f64>>("Option<f64>")
112043                .register_static_module("Option<f64>", exported_module!(f64Module).into());
112044            engine
112045                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
112046                .build_type::<ForumTopicClosed>()
112047                .register_static_module(
112048                    "Option<ForumTopicClosed>",
112049                    exported_module!(ForumTopicClosedModule).into(),
112050                );
112051            engine
112052                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
112053                .build_type::<ForumTopicCreated>()
112054                .register_static_module(
112055                    "Option<ForumTopicCreated>",
112056                    exported_module!(ForumTopicCreatedModule).into(),
112057                );
112058            engine
112059                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
112060                .build_type::<ForumTopicEdited>()
112061                .register_static_module(
112062                    "Option<ForumTopicEdited>",
112063                    exported_module!(ForumTopicEditedModule).into(),
112064                );
112065            engine
112066                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
112067                .build_type::<ForumTopicReopened>()
112068                .register_static_module(
112069                    "Option<ForumTopicReopened>",
112070                    exported_module!(ForumTopicReopenedModule).into(),
112071                );
112072            engine
112073                .register_type_with_name::<Option<Game>>("Option<Game>")
112074                .build_type::<Game>()
112075                .register_static_module("Option<Game>", exported_module!(GameModule).into());
112076            engine
112077                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
112078                    "Option<GeneralForumTopicHidden>",
112079                )
112080                .build_type::<GeneralForumTopicHidden>()
112081                .register_static_module(
112082                    "Option<GeneralForumTopicHidden>",
112083                    exported_module!(GeneralForumTopicHiddenModule).into(),
112084                );
112085            engine
112086                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
112087                    "Option<GeneralForumTopicUnhidden>",
112088                )
112089                .build_type::<GeneralForumTopicUnhidden>()
112090                .register_static_module(
112091                    "Option<GeneralForumTopicUnhidden>",
112092                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
112093                );
112094            engine
112095                .register_type_with_name::<Option<Gift>>("Option<Gift>")
112096                .build_type::<Gift>()
112097                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
112098            engine
112099                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
112100                .build_type::<GiftInfo>()
112101                .register_static_module(
112102                    "Option<GiftInfo>",
112103                    exported_module!(GiftInfoModule).into(),
112104                );
112105            engine
112106                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
112107                .build_type::<Giveaway>()
112108                .register_static_module(
112109                    "Option<Giveaway>",
112110                    exported_module!(GiveawayModule).into(),
112111                );
112112            engine
112113                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
112114                .build_type::<GiveawayCompleted>()
112115                .register_static_module(
112116                    "Option<GiveawayCompleted>",
112117                    exported_module!(GiveawayCompletedModule).into(),
112118                );
112119            engine
112120                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
112121                .build_type::<GiveawayCreated>()
112122                .register_static_module(
112123                    "Option<GiveawayCreated>",
112124                    exported_module!(GiveawayCreatedModule).into(),
112125                );
112126            engine
112127                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
112128                .build_type::<GiveawayWinners>()
112129                .register_static_module(
112130                    "Option<GiveawayWinners>",
112131                    exported_module!(GiveawayWinnersModule).into(),
112132                );
112133            engine
112134                .register_type_with_name::<Option<InlineKeyboardButton>>(
112135                    "Option<InlineKeyboardButton>",
112136                )
112137                .build_type::<InlineKeyboardButton>()
112138                .register_static_module(
112139                    "Option<InlineKeyboardButton>",
112140                    exported_module!(InlineKeyboardButtonModule).into(),
112141                );
112142            engine
112143                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
112144                    "Option<InlineKeyboardMarkup>",
112145                )
112146                .build_type::<InlineKeyboardMarkup>()
112147                .register_static_module(
112148                    "Option<InlineKeyboardMarkup>",
112149                    exported_module!(InlineKeyboardMarkupModule).into(),
112150                );
112151            engine
112152                .register_type_with_name::<Option<InlineQuery>>("Option<InlineQuery>")
112153                .build_type::<InlineQuery>()
112154                .register_static_module(
112155                    "Option<InlineQuery>",
112156                    exported_module!(InlineQueryModule).into(),
112157                );
112158            engine
112159                .register_type_with_name::<Option<i64>>("Option<i64>")
112160                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112161            engine
112162                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
112163                .build_type::<Invoice>()
112164                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
112165            engine
112166                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
112167                .build_type::<LinkPreviewOptions>()
112168                .register_static_module(
112169                    "Option<LinkPreviewOptions>",
112170                    exported_module!(LinkPreviewOptionsModule).into(),
112171                );
112172            engine
112173                .register_type_with_name::<Option<Location>>("Option<Location>")
112174                .build_type::<Location>()
112175                .register_static_module(
112176                    "Option<Location>",
112177                    exported_module!(LocationModule).into(),
112178                );
112179            engine
112180                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
112181                .build_type::<LoginUrl>()
112182                .register_static_module(
112183                    "Option<LoginUrl>",
112184                    exported_module!(LoginUrlModule).into(),
112185                );
112186            engine
112187                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
112188                .build_type::<MaskPosition>()
112189                .register_static_module(
112190                    "Option<MaskPosition>",
112191                    exported_module!(MaskPositionModule).into(),
112192                );
112193            engine
112194                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
112195                    "Option<MaybeInaccessibleMessage>",
112196                )
112197                .register_static_module(
112198                    "Option<MaybeInaccessibleMessage>",
112199                    exported_module!(MaybeInaccessibleMessageModule).into(),
112200                );
112201            engine
112202                .register_type_with_name::<Option<Message>>("Option<Message>")
112203                .build_type::<Message>()
112204                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
112205            engine
112206                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
112207                    "Option<MessageAutoDeleteTimerChanged>",
112208                )
112209                .build_type::<MessageAutoDeleteTimerChanged>()
112210                .register_static_module(
112211                    "Option<MessageAutoDeleteTimerChanged>",
112212                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
112213                );
112214            engine
112215                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
112216                .build_type::<MessageEntity>()
112217                .register_static_module(
112218                    "Option<MessageEntity>",
112219                    exported_module!(MessageEntityModule).into(),
112220                );
112221            engine
112222                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
112223                .register_static_module(
112224                    "Option<MessageOrigin>",
112225                    exported_module!(MessageOriginModule).into(),
112226                );
112227            engine
112228                .register_type_with_name::<Option<MessageReactionCountUpdated>>(
112229                    "Option<MessageReactionCountUpdated>",
112230                )
112231                .build_type::<MessageReactionCountUpdated>()
112232                .register_static_module(
112233                    "Option<MessageReactionCountUpdated>",
112234                    exported_module!(MessageReactionCountUpdatedModule).into(),
112235                );
112236            engine
112237                .register_type_with_name::<Option<MessageReactionUpdated>>(
112238                    "Option<MessageReactionUpdated>",
112239                )
112240                .build_type::<MessageReactionUpdated>()
112241                .register_static_module(
112242                    "Option<MessageReactionUpdated>",
112243                    exported_module!(MessageReactionUpdatedModule).into(),
112244                );
112245            engine
112246                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
112247                .build_type::<OrderInfo>()
112248                .register_static_module(
112249                    "Option<OrderInfo>",
112250                    exported_module!(OrderInfoModule).into(),
112251                );
112252            engine
112253                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
112254                .register_static_module(
112255                    "Option<PaidMedia>",
112256                    exported_module!(PaidMediaModule).into(),
112257                );
112258            engine
112259                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
112260                .build_type::<PaidMediaInfo>()
112261                .register_static_module(
112262                    "Option<PaidMediaInfo>",
112263                    exported_module!(PaidMediaInfoModule).into(),
112264                );
112265            engine
112266                .register_type_with_name::<Option<PaidMediaPurchased>>("Option<PaidMediaPurchased>")
112267                .build_type::<PaidMediaPurchased>()
112268                .register_static_module(
112269                    "Option<PaidMediaPurchased>",
112270                    exported_module!(PaidMediaPurchasedModule).into(),
112271                );
112272            engine
112273                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
112274                    "Option<PaidMessagePriceChanged>",
112275                )
112276                .build_type::<PaidMessagePriceChanged>()
112277                .register_static_module(
112278                    "Option<PaidMessagePriceChanged>",
112279                    exported_module!(PaidMessagePriceChangedModule).into(),
112280                );
112281            engine
112282                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
112283                .build_type::<PassportData>()
112284                .register_static_module(
112285                    "Option<PassportData>",
112286                    exported_module!(PassportDataModule).into(),
112287                );
112288            engine
112289                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
112290                .build_type::<PassportFile>()
112291                .register_static_module(
112292                    "Option<PassportFile>",
112293                    exported_module!(PassportFileModule).into(),
112294                );
112295            engine
112296                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
112297                .build_type::<PhotoSize>()
112298                .register_static_module(
112299                    "Option<PhotoSize>",
112300                    exported_module!(PhotoSizeModule).into(),
112301                );
112302            engine
112303                .register_type_with_name::<Option<Poll>>("Option<Poll>")
112304                .build_type::<Poll>()
112305                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
112306            engine
112307                .register_type_with_name::<Option<PollAnswer>>("Option<PollAnswer>")
112308                .build_type::<PollAnswer>()
112309                .register_static_module(
112310                    "Option<PollAnswer>",
112311                    exported_module!(PollAnswerModule).into(),
112312                );
112313            engine
112314                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
112315                .build_type::<PollOption>()
112316                .register_static_module(
112317                    "Option<PollOption>",
112318                    exported_module!(PollOptionModule).into(),
112319                );
112320            engine
112321                .register_type_with_name::<Option<PreCheckoutQuery>>("Option<PreCheckoutQuery>")
112322                .build_type::<PreCheckoutQuery>()
112323                .register_static_module(
112324                    "Option<PreCheckoutQuery>",
112325                    exported_module!(PreCheckoutQueryModule).into(),
112326                );
112327            engine
112328                .register_type_with_name::<Option<ProximityAlertTriggered>>(
112329                    "Option<ProximityAlertTriggered>",
112330                )
112331                .build_type::<ProximityAlertTriggered>()
112332                .register_static_module(
112333                    "Option<ProximityAlertTriggered>",
112334                    exported_module!(ProximityAlertTriggeredModule).into(),
112335                );
112336            engine
112337                .register_type_with_name::<Option<ReactionCount>>("Option<ReactionCount>")
112338                .build_type::<ReactionCount>()
112339                .register_static_module(
112340                    "Option<ReactionCount>",
112341                    exported_module!(ReactionCountModule).into(),
112342                );
112343            engine
112344                .register_type_with_name::<Option<ReactionType>>("Option<ReactionType>")
112345                .register_static_module(
112346                    "Option<ReactionType>",
112347                    exported_module!(ReactionTypeModule).into(),
112348                );
112349            engine
112350                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
112351                .build_type::<RefundedPayment>()
112352                .register_static_module(
112353                    "Option<RefundedPayment>",
112354                    exported_module!(RefundedPaymentModule).into(),
112355                );
112356            engine
112357                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
112358                .build_type::<SharedUser>()
112359                .register_static_module(
112360                    "Option<SharedUser>",
112361                    exported_module!(SharedUserModule).into(),
112362                );
112363            engine
112364                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
112365                .build_type::<ShippingAddress>()
112366                .register_static_module(
112367                    "Option<ShippingAddress>",
112368                    exported_module!(ShippingAddressModule).into(),
112369                );
112370            engine
112371                .register_type_with_name::<Option<ShippingQuery>>("Option<ShippingQuery>")
112372                .build_type::<ShippingQuery>()
112373                .register_static_module(
112374                    "Option<ShippingQuery>",
112375                    exported_module!(ShippingQueryModule).into(),
112376                );
112377            engine
112378                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
112379                .build_type::<StarAmount>()
112380                .register_static_module(
112381                    "Option<StarAmount>",
112382                    exported_module!(StarAmountModule).into(),
112383                );
112384            engine
112385                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
112386                .build_type::<Sticker>()
112387                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
112388            engine
112389                .register_type_with_name::<Option<Story>>("Option<Story>")
112390                .build_type::<Story>()
112391                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
112392            engine
112393                .register_type_with_name::<Option<String>>("Option<String>")
112394                .register_static_module("Option<String>", exported_module!(StringModule).into());
112395            engine
112396                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
112397                .build_type::<SuccessfulPayment>()
112398                .register_static_module(
112399                    "Option<SuccessfulPayment>",
112400                    exported_module!(SuccessfulPaymentModule).into(),
112401                );
112402            engine
112403                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
112404                    "Option<SuggestedPostApprovalFailed>",
112405                )
112406                .build_type::<SuggestedPostApprovalFailed>()
112407                .register_static_module(
112408                    "Option<SuggestedPostApprovalFailed>",
112409                    exported_module!(SuggestedPostApprovalFailedModule).into(),
112410                );
112411            engine
112412                .register_type_with_name::<Option<SuggestedPostApproved>>(
112413                    "Option<SuggestedPostApproved>",
112414                )
112415                .build_type::<SuggestedPostApproved>()
112416                .register_static_module(
112417                    "Option<SuggestedPostApproved>",
112418                    exported_module!(SuggestedPostApprovedModule).into(),
112419                );
112420            engine
112421                .register_type_with_name::<Option<SuggestedPostDeclined>>(
112422                    "Option<SuggestedPostDeclined>",
112423                )
112424                .build_type::<SuggestedPostDeclined>()
112425                .register_static_module(
112426                    "Option<SuggestedPostDeclined>",
112427                    exported_module!(SuggestedPostDeclinedModule).into(),
112428                );
112429            engine
112430                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
112431                .build_type::<SuggestedPostInfo>()
112432                .register_static_module(
112433                    "Option<SuggestedPostInfo>",
112434                    exported_module!(SuggestedPostInfoModule).into(),
112435                );
112436            engine
112437                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
112438                .build_type::<SuggestedPostPaid>()
112439                .register_static_module(
112440                    "Option<SuggestedPostPaid>",
112441                    exported_module!(SuggestedPostPaidModule).into(),
112442                );
112443            engine
112444                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
112445                .build_type::<SuggestedPostPrice>()
112446                .register_static_module(
112447                    "Option<SuggestedPostPrice>",
112448                    exported_module!(SuggestedPostPriceModule).into(),
112449                );
112450            engine
112451                .register_type_with_name::<Option<SuggestedPostRefunded>>(
112452                    "Option<SuggestedPostRefunded>",
112453                )
112454                .build_type::<SuggestedPostRefunded>()
112455                .register_static_module(
112456                    "Option<SuggestedPostRefunded>",
112457                    exported_module!(SuggestedPostRefundedModule).into(),
112458                );
112459            engine
112460                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
112461                    "Option<SwitchInlineQueryChosenChat>",
112462                )
112463                .build_type::<SwitchInlineQueryChosenChat>()
112464                .register_static_module(
112465                    "Option<SwitchInlineQueryChosenChat>",
112466                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
112467                );
112468            engine
112469                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
112470                .build_type::<TextQuote>()
112471                .register_static_module(
112472                    "Option<TextQuote>",
112473                    exported_module!(TextQuoteModule).into(),
112474                );
112475            engine
112476                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
112477                .build_type::<UniqueGift>()
112478                .register_static_module(
112479                    "Option<UniqueGift>",
112480                    exported_module!(UniqueGiftModule).into(),
112481                );
112482            engine
112483                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
112484                .build_type::<UniqueGiftBackdrop>()
112485                .register_static_module(
112486                    "Option<UniqueGiftBackdrop>",
112487                    exported_module!(UniqueGiftBackdropModule).into(),
112488                );
112489            engine
112490                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
112491                    "Option<UniqueGiftBackdropColors>",
112492                )
112493                .build_type::<UniqueGiftBackdropColors>()
112494                .register_static_module(
112495                    "Option<UniqueGiftBackdropColors>",
112496                    exported_module!(UniqueGiftBackdropColorsModule).into(),
112497                );
112498            engine
112499                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
112500                .build_type::<UniqueGiftInfo>()
112501                .register_static_module(
112502                    "Option<UniqueGiftInfo>",
112503                    exported_module!(UniqueGiftInfoModule).into(),
112504                );
112505            engine
112506                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
112507                .build_type::<UniqueGiftModel>()
112508                .register_static_module(
112509                    "Option<UniqueGiftModel>",
112510                    exported_module!(UniqueGiftModelModule).into(),
112511                );
112512            engine
112513                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
112514                .build_type::<UniqueGiftSymbol>()
112515                .register_static_module(
112516                    "Option<UniqueGiftSymbol>",
112517                    exported_module!(UniqueGiftSymbolModule).into(),
112518                );
112519            engine
112520                .register_type_with_name::<Option<User>>("Option<User>")
112521                .build_type::<User>()
112522                .register_static_module("Option<User>", exported_module!(UserModule).into());
112523            engine
112524                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
112525                .build_type::<UsersShared>()
112526                .register_static_module(
112527                    "Option<UsersShared>",
112528                    exported_module!(UsersSharedModule).into(),
112529                );
112530            engine
112531                .register_type_with_name::<Option<Venue>>("Option<Venue>")
112532                .build_type::<Venue>()
112533                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
112534            engine
112535                .register_type_with_name::<Option<Video>>("Option<Video>")
112536                .build_type::<Video>()
112537                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
112538            engine
112539                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
112540                .build_type::<VideoChatEnded>()
112541                .register_static_module(
112542                    "Option<VideoChatEnded>",
112543                    exported_module!(VideoChatEndedModule).into(),
112544                );
112545            engine
112546                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
112547                    "Option<VideoChatParticipantsInvited>",
112548                )
112549                .build_type::<VideoChatParticipantsInvited>()
112550                .register_static_module(
112551                    "Option<VideoChatParticipantsInvited>",
112552                    exported_module!(VideoChatParticipantsInvitedModule).into(),
112553                );
112554            engine
112555                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
112556                .build_type::<VideoChatScheduled>()
112557                .register_static_module(
112558                    "Option<VideoChatScheduled>",
112559                    exported_module!(VideoChatScheduledModule).into(),
112560                );
112561            engine
112562                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
112563                .build_type::<VideoChatStarted>()
112564                .register_static_module(
112565                    "Option<VideoChatStarted>",
112566                    exported_module!(VideoChatStartedModule).into(),
112567                );
112568            engine
112569                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
112570                .build_type::<VideoNote>()
112571                .register_static_module(
112572                    "Option<VideoNote>",
112573                    exported_module!(VideoNoteModule).into(),
112574                );
112575            engine
112576                .register_type_with_name::<Option<Voice>>("Option<Voice>")
112577                .build_type::<Voice>()
112578                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
112579            engine
112580                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
112581                .build_type::<WebAppData>()
112582                .register_static_module(
112583                    "Option<WebAppData>",
112584                    exported_module!(WebAppDataModule).into(),
112585                );
112586            engine
112587                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
112588                .build_type::<WebAppInfo>()
112589                .register_static_module(
112590                    "Option<WebAppInfo>",
112591                    exported_module!(WebAppInfoModule).into(),
112592                );
112593            engine
112594                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
112595                .build_type::<WriteAccessAllowed>()
112596                .register_static_module(
112597                    "Option<WriteAccessAllowed>",
112598                    exported_module!(WriteAccessAllowedModule).into(),
112599                );
112600        }
112601    }
112602    #[cfg(feature = "rhai")]
112603    #[allow(unused_mut)]
112604    impl rhai::CustomType for Update {
112605        fn build(mut builder: rhai::TypeBuilder<Self>) {
112606            builder.with_get("update_id", Self::rhai_get_update_id);
112607            builder.with_get("message", Self::rhai_get_message);
112608            builder.with_get("edited_message", Self::rhai_get_edited_message);
112609            builder.with_get("channel_post", Self::rhai_get_channel_post);
112610            builder.with_get("edited_channel_post", Self::rhai_get_edited_channel_post);
112611            builder.with_get("business_connection", Self::rhai_get_business_connection);
112612            builder.with_get("business_message", Self::rhai_get_business_message);
112613            builder.with_get(
112614                "edited_business_message",
112615                Self::rhai_get_edited_business_message,
112616            );
112617            builder.with_get(
112618                "deleted_business_messages",
112619                Self::rhai_get_deleted_business_messages,
112620            );
112621            builder.with_get("message_reaction", Self::rhai_get_message_reaction);
112622            builder.with_get(
112623                "message_reaction_count",
112624                Self::rhai_get_message_reaction_count,
112625            );
112626            builder.with_get("inline_query", Self::rhai_get_inline_query);
112627            builder.with_get("chosen_inline_result", Self::rhai_get_chosen_inline_result);
112628            builder.with_get("callback_query", Self::rhai_get_callback_query);
112629            builder.with_get("shipping_query", Self::rhai_get_shipping_query);
112630            builder.with_get("pre_checkout_query", Self::rhai_get_pre_checkout_query);
112631            builder.with_get("purchased_paid_media", Self::rhai_get_purchased_paid_media);
112632            builder.with_get("poll", Self::rhai_get_poll);
112633            builder.with_get("poll_answer", Self::rhai_get_poll_answer);
112634            builder.with_get("my_chat_member", Self::rhai_get_my_chat_member);
112635            builder.with_get("chat_member", Self::rhai_get_chat_member);
112636            builder.with_get("chat_join_request", Self::rhai_get_chat_join_request);
112637            builder.with_get("chat_boost", Self::rhai_get_chat_boost);
112638            builder.with_get("removed_chat_boost", Self::rhai_get_removed_chat_boost);
112639            builder.on_debug(|t| format!("{:?}", t));
112640            drop(builder);
112641        }
112642    }
112643    #[cfg(feature = "rhai")]
112644    impl SetupRhai for PhotoSize {
112645        fn setup_rhai(engine: &mut rhai::Engine) {
112646            engine.build_type::<PhotoSize>();
112647            engine
112648                .register_type_with_name::<Option<i64>>("Option<i64>")
112649                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112650            engine
112651                .register_type_with_name::<Option<String>>("Option<String>")
112652                .register_static_module("Option<String>", exported_module!(StringModule).into());
112653        }
112654    }
112655    #[cfg(feature = "rhai")]
112656    #[allow(unused_mut)]
112657    impl rhai::CustomType for PhotoSize {
112658        fn build(mut builder: rhai::TypeBuilder<Self>) {
112659            builder.with_get("file_id", Self::rhai_get_file_id);
112660            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
112661            builder.with_get("width", Self::rhai_get_width);
112662            builder.with_get("height", Self::rhai_get_height);
112663            builder.with_get("file_size", Self::rhai_get_file_size);
112664            builder.on_debug(|t| format!("{:?}", t));
112665            drop(builder);
112666        }
112667    }
112668    #[cfg(feature = "rhai")]
112669    impl SetupRhai for ChatBoostSourceGiftCode {
112670        fn setup_rhai(engine: &mut rhai::Engine) {
112671            engine.build_type::<ChatBoostSourceGiftCode>();
112672            engine
112673                .register_type_with_name::<Option<bool>>("Option<bool>")
112674                .register_static_module("Option<bool>", exported_module!(boolModule).into());
112675            engine
112676                .register_type_with_name::<Option<i64>>("Option<i64>")
112677                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112678            engine
112679                .register_type_with_name::<Option<String>>("Option<String>")
112680                .register_static_module("Option<String>", exported_module!(StringModule).into());
112681            engine
112682                .register_type_with_name::<Option<User>>("Option<User>")
112683                .build_type::<User>()
112684                .register_static_module("Option<User>", exported_module!(UserModule).into());
112685        }
112686    }
112687    #[cfg(feature = "rhai")]
112688    #[allow(unused_mut)]
112689    impl rhai::CustomType for ChatBoostSourceGiftCode {
112690        fn build(mut builder: rhai::TypeBuilder<Self>) {
112691            builder.with_get("source", Self::rhai_get_source);
112692            builder.with_get("user", Self::rhai_get_user);
112693            builder.on_debug(|t| format!("{:?}", t));
112694            drop(builder);
112695        }
112696    }
112697    #[cfg(feature = "rhai")]
112698    impl SetupRhai for PollOption {
112699        fn setup_rhai(engine: &mut rhai::Engine) {
112700            engine.build_type::<PollOption>();
112701            engine
112702                .register_type_with_name::<Option<bool>>("Option<bool>")
112703                .register_static_module("Option<bool>", exported_module!(boolModule).into());
112704            engine
112705                .register_type_with_name::<Option<i64>>("Option<i64>")
112706                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112707            engine
112708                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
112709                .build_type::<MessageEntity>()
112710                .register_static_module(
112711                    "Option<MessageEntity>",
112712                    exported_module!(MessageEntityModule).into(),
112713                );
112714            engine
112715                .register_type_with_name::<Option<String>>("Option<String>")
112716                .register_static_module("Option<String>", exported_module!(StringModule).into());
112717            engine
112718                .register_type_with_name::<Option<User>>("Option<User>")
112719                .build_type::<User>()
112720                .register_static_module("Option<User>", exported_module!(UserModule).into());
112721        }
112722    }
112723    #[cfg(feature = "rhai")]
112724    #[allow(unused_mut)]
112725    impl rhai::CustomType for PollOption {
112726        fn build(mut builder: rhai::TypeBuilder<Self>) {
112727            builder.with_get("text", Self::rhai_get_text);
112728            builder.with_get("text_entities", Self::rhai_get_text_entities);
112729            builder.with_get("voter_count", Self::rhai_get_voter_count);
112730            builder.on_debug(|t| format!("{:?}", t));
112731            drop(builder);
112732        }
112733    }
112734    #[cfg(feature = "rhai")]
112735    impl SetupRhai for InlineQuery {
112736        fn setup_rhai(engine: &mut rhai::Engine) {
112737            engine.build_type::<InlineQuery>();
112738            engine
112739                .register_type_with_name::<Option<bool>>("Option<bool>")
112740                .register_static_module("Option<bool>", exported_module!(boolModule).into());
112741            engine
112742                .register_type_with_name::<Option<f64>>("Option<f64>")
112743                .register_static_module("Option<f64>", exported_module!(f64Module).into());
112744            engine
112745                .register_type_with_name::<Option<i64>>("Option<i64>")
112746                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112747            engine
112748                .register_type_with_name::<Option<Location>>("Option<Location>")
112749                .build_type::<Location>()
112750                .register_static_module(
112751                    "Option<Location>",
112752                    exported_module!(LocationModule).into(),
112753                );
112754            engine
112755                .register_type_with_name::<Option<String>>("Option<String>")
112756                .register_static_module("Option<String>", exported_module!(StringModule).into());
112757            engine
112758                .register_type_with_name::<Option<User>>("Option<User>")
112759                .build_type::<User>()
112760                .register_static_module("Option<User>", exported_module!(UserModule).into());
112761        }
112762    }
112763    #[cfg(feature = "rhai")]
112764    #[allow(unused_mut)]
112765    impl rhai::CustomType for InlineQuery {
112766        fn build(mut builder: rhai::TypeBuilder<Self>) {
112767            builder.with_get("id", Self::rhai_get_id);
112768            builder.with_get("from", Self::rhai_get_from);
112769            builder.with_get("query", Self::rhai_get_query);
112770            builder.with_get("offset", Self::rhai_get_offset);
112771            builder.with_get("chat_type", Self::rhai_get_chat_type);
112772            builder.with_get("location", Self::rhai_get_location);
112773            builder.on_debug(|t| format!("{:?}", t));
112774            drop(builder);
112775        }
112776    }
112777    #[cfg(feature = "rhai")]
112778    impl SetupRhai for TransactionPartnerUser {
112779        fn setup_rhai(engine: &mut rhai::Engine) {
112780            engine.build_type::<TransactionPartnerUser>();
112781            engine
112782                .register_type_with_name::<Option<AffiliateInfo>>("Option<AffiliateInfo>")
112783                .build_type::<AffiliateInfo>()
112784                .register_static_module(
112785                    "Option<AffiliateInfo>",
112786                    exported_module!(AffiliateInfoModule).into(),
112787                );
112788            engine
112789                .register_type_with_name::<Option<bool>>("Option<bool>")
112790                .register_static_module("Option<bool>", exported_module!(boolModule).into());
112791            engine
112792                .register_type_with_name::<Option<Chat>>("Option<Chat>")
112793                .build_type::<Chat>()
112794                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
112795            engine
112796                .register_type_with_name::<Option<File>>("Option<File>")
112797                .build_type::<File>()
112798                .register_static_module("Option<File>", exported_module!(FileModule).into());
112799            engine
112800                .register_type_with_name::<Option<f64>>("Option<f64>")
112801                .register_static_module("Option<f64>", exported_module!(f64Module).into());
112802            engine
112803                .register_type_with_name::<Option<Gift>>("Option<Gift>")
112804                .build_type::<Gift>()
112805                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
112806            engine
112807                .register_type_with_name::<Option<i64>>("Option<i64>")
112808                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112809            engine
112810                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
112811                .build_type::<MaskPosition>()
112812                .register_static_module(
112813                    "Option<MaskPosition>",
112814                    exported_module!(MaskPositionModule).into(),
112815                );
112816            engine
112817                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
112818                .register_static_module(
112819                    "Option<PaidMedia>",
112820                    exported_module!(PaidMediaModule).into(),
112821                );
112822            engine
112823                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
112824                .build_type::<PhotoSize>()
112825                .register_static_module(
112826                    "Option<PhotoSize>",
112827                    exported_module!(PhotoSizeModule).into(),
112828                );
112829            engine
112830                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
112831                .build_type::<Sticker>()
112832                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
112833            engine
112834                .register_type_with_name::<Option<String>>("Option<String>")
112835                .register_static_module("Option<String>", exported_module!(StringModule).into());
112836            engine
112837                .register_type_with_name::<Option<User>>("Option<User>")
112838                .build_type::<User>()
112839                .register_static_module("Option<User>", exported_module!(UserModule).into());
112840        }
112841    }
112842    #[cfg(feature = "rhai")]
112843    #[allow(unused_mut)]
112844    impl rhai::CustomType for TransactionPartnerUser {
112845        fn build(mut builder: rhai::TypeBuilder<Self>) {
112846            builder.with_get("tg_type", Self::rhai_get_tg_type);
112847            builder.with_get("transaction_type", Self::rhai_get_transaction_type);
112848            builder.with_get("user", Self::rhai_get_user);
112849            builder.with_get("affiliate", Self::rhai_get_affiliate);
112850            builder.with_get("invoice_payload", Self::rhai_get_invoice_payload);
112851            builder.with_get("subscription_period", Self::rhai_get_subscription_period);
112852            builder.with_get("paid_media", Self::rhai_get_paid_media);
112853            builder.with_get("paid_media_payload", Self::rhai_get_paid_media_payload);
112854            builder.with_get("gift", Self::rhai_get_gift);
112855            builder.with_get(
112856                "premium_subscription_duration",
112857                Self::rhai_get_premium_subscription_duration,
112858            );
112859            builder.on_debug(|t| format!("{:?}", t));
112860            drop(builder);
112861        }
112862    }
112863    #[cfg(feature = "rhai")]
112864    impl SetupRhai for InputMediaPhoto {
112865        fn setup_rhai(engine: &mut rhai::Engine) {
112866            engine.build_type::<InputMediaPhoto>();
112867            engine
112868                .register_type_with_name::<Option<bool>>("Option<bool>")
112869                .register_static_module("Option<bool>", exported_module!(boolModule).into());
112870            engine
112871                .register_type_with_name::<Option<i64>>("Option<i64>")
112872                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112873            engine
112874                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
112875                .build_type::<MessageEntity>()
112876                .register_static_module(
112877                    "Option<MessageEntity>",
112878                    exported_module!(MessageEntityModule).into(),
112879                );
112880            engine
112881                .register_type_with_name::<Option<String>>("Option<String>")
112882                .register_static_module("Option<String>", exported_module!(StringModule).into());
112883            engine
112884                .register_type_with_name::<Option<User>>("Option<User>")
112885                .build_type::<User>()
112886                .register_static_module("Option<User>", exported_module!(UserModule).into());
112887        }
112888    }
112889    #[cfg(feature = "rhai")]
112890    #[allow(unused_mut)]
112891    impl rhai::CustomType for InputMediaPhoto {
112892        fn build(mut builder: rhai::TypeBuilder<Self>) {
112893            builder.with_get("tg_type", Self::rhai_get_tg_type);
112894            builder.with_get("media", Self::rhai_get_media);
112895            builder.with_get("caption", Self::rhai_get_caption);
112896            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
112897            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
112898            builder.with_get(
112899                "show_caption_above_media",
112900                Self::rhai_get_show_caption_above_media,
112901            );
112902            builder.with_get("has_spoiler", Self::rhai_get_has_spoiler);
112903            builder.on_debug(|t| format!("{:?}", t));
112904            drop(builder);
112905        }
112906    }
112907    #[cfg(feature = "rhai")]
112908    impl SetupRhai for VideoChatScheduled {
112909        fn setup_rhai(engine: &mut rhai::Engine) {
112910            engine.build_type::<VideoChatScheduled>();
112911            engine
112912                .register_type_with_name::<Option<i64>>("Option<i64>")
112913                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112914        }
112915    }
112916    #[cfg(feature = "rhai")]
112917    #[allow(unused_mut)]
112918    impl rhai::CustomType for VideoChatScheduled {
112919        fn build(mut builder: rhai::TypeBuilder<Self>) {
112920            builder.with_get("start_date", Self::rhai_get_start_date);
112921            builder.on_debug(|t| format!("{:?}", t));
112922            drop(builder);
112923        }
112924    }
112925    #[cfg(feature = "rhai")]
112926    impl SetupRhai for ForumTopicCreated {
112927        fn setup_rhai(engine: &mut rhai::Engine) {
112928            engine.build_type::<ForumTopicCreated>();
112929            engine
112930                .register_type_with_name::<Option<i64>>("Option<i64>")
112931                .register_static_module("Option<i64>", exported_module!(i64Module).into());
112932            engine
112933                .register_type_with_name::<Option<String>>("Option<String>")
112934                .register_static_module("Option<String>", exported_module!(StringModule).into());
112935        }
112936    }
112937    #[cfg(feature = "rhai")]
112938    #[allow(unused_mut)]
112939    impl rhai::CustomType for ForumTopicCreated {
112940        fn build(mut builder: rhai::TypeBuilder<Self>) {
112941            builder.with_get("name", Self::rhai_get_name);
112942            builder.with_get("icon_color", Self::rhai_get_icon_color);
112943            builder.with_get("icon_custom_emoji_id", Self::rhai_get_icon_custom_emoji_id);
112944            builder.on_debug(|t| format!("{:?}", t));
112945            drop(builder);
112946        }
112947    }
112948    #[cfg(feature = "rhai")]
112949    impl SetupRhai for InlineKeyboardButton {
112950        fn setup_rhai(engine: &mut rhai::Engine) {
112951            engine.build_type::<InlineKeyboardButton>();
112952            engine
112953                .register_type_with_name::<Option<bool>>("Option<bool>")
112954                .register_static_module("Option<bool>", exported_module!(boolModule).into());
112955            engine
112956                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
112957                .build_type::<CallbackGame>()
112958                .register_static_module(
112959                    "Option<CallbackGame>",
112960                    exported_module!(CallbackGameModule).into(),
112961                );
112962            engine
112963                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
112964                .build_type::<CopyTextButton>()
112965                .register_static_module(
112966                    "Option<CopyTextButton>",
112967                    exported_module!(CopyTextButtonModule).into(),
112968                );
112969            engine
112970                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
112971                .build_type::<LoginUrl>()
112972                .register_static_module(
112973                    "Option<LoginUrl>",
112974                    exported_module!(LoginUrlModule).into(),
112975                );
112976            engine
112977                .register_type_with_name::<Option<String>>("Option<String>")
112978                .register_static_module("Option<String>", exported_module!(StringModule).into());
112979            engine
112980                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
112981                    "Option<SwitchInlineQueryChosenChat>",
112982                )
112983                .build_type::<SwitchInlineQueryChosenChat>()
112984                .register_static_module(
112985                    "Option<SwitchInlineQueryChosenChat>",
112986                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
112987                );
112988            engine
112989                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
112990                .build_type::<WebAppInfo>()
112991                .register_static_module(
112992                    "Option<WebAppInfo>",
112993                    exported_module!(WebAppInfoModule).into(),
112994                );
112995        }
112996    }
112997    #[cfg(feature = "rhai")]
112998    #[allow(unused_mut)]
112999    impl rhai::CustomType for InlineKeyboardButton {
113000        fn build(mut builder: rhai::TypeBuilder<Self>) {
113001            builder.with_get("text", Self::rhai_get_text);
113002            builder.with_get("url", Self::rhai_get_url);
113003            builder.with_get("callback_data", Self::rhai_get_callback_data);
113004            builder.with_get("web_app", Self::rhai_get_web_app);
113005            builder.with_get("login_url", Self::rhai_get_login_url);
113006            builder.with_get("switch_inline_query", Self::rhai_get_switch_inline_query);
113007            builder.with_get(
113008                "switch_inline_query_current_chat",
113009                Self::rhai_get_switch_inline_query_current_chat,
113010            );
113011            builder.with_get(
113012                "switch_inline_query_chosen_chat",
113013                Self::rhai_get_switch_inline_query_chosen_chat,
113014            );
113015            builder.with_get("copy_text", Self::rhai_get_copy_text);
113016            builder.with_get("callback_game", Self::rhai_get_callback_game);
113017            builder.with_get("pay", Self::rhai_get_pay);
113018            builder.on_debug(|t| format!("{:?}", t));
113019            drop(builder);
113020        }
113021    }
113022    #[cfg(feature = "rhai")]
113023    impl SetupRhai for PaidMediaVideo {
113024        fn setup_rhai(engine: &mut rhai::Engine) {
113025            engine.build_type::<PaidMediaVideo>();
113026            engine
113027                .register_type_with_name::<Option<i64>>("Option<i64>")
113028                .register_static_module("Option<i64>", exported_module!(i64Module).into());
113029            engine
113030                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
113031                .build_type::<PhotoSize>()
113032                .register_static_module(
113033                    "Option<PhotoSize>",
113034                    exported_module!(PhotoSizeModule).into(),
113035                );
113036            engine
113037                .register_type_with_name::<Option<String>>("Option<String>")
113038                .register_static_module("Option<String>", exported_module!(StringModule).into());
113039            engine
113040                .register_type_with_name::<Option<Video>>("Option<Video>")
113041                .build_type::<Video>()
113042                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
113043        }
113044    }
113045    #[cfg(feature = "rhai")]
113046    #[allow(unused_mut)]
113047    impl rhai::CustomType for PaidMediaVideo {
113048        fn build(mut builder: rhai::TypeBuilder<Self>) {
113049            builder.with_get("tg_type", Self::rhai_get_tg_type);
113050            builder.with_get("video", Self::rhai_get_video);
113051            builder.on_debug(|t| format!("{:?}", t));
113052            drop(builder);
113053        }
113054    }
113055    #[cfg(feature = "rhai")]
113056    impl SetupRhai for ChatJoinRequest {
113057        fn setup_rhai(engine: &mut rhai::Engine) {
113058            engine.build_type::<ChatJoinRequest>();
113059            engine
113060                .register_type_with_name::<Option<bool>>("Option<bool>")
113061                .register_static_module("Option<bool>", exported_module!(boolModule).into());
113062            engine
113063                .register_type_with_name::<Option<Chat>>("Option<Chat>")
113064                .build_type::<Chat>()
113065                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
113066            engine
113067                .register_type_with_name::<Option<ChatInviteLink>>("Option<ChatInviteLink>")
113068                .build_type::<ChatInviteLink>()
113069                .register_static_module(
113070                    "Option<ChatInviteLink>",
113071                    exported_module!(ChatInviteLinkModule).into(),
113072                );
113073            engine
113074                .register_type_with_name::<Option<i64>>("Option<i64>")
113075                .register_static_module("Option<i64>", exported_module!(i64Module).into());
113076            engine
113077                .register_type_with_name::<Option<String>>("Option<String>")
113078                .register_static_module("Option<String>", exported_module!(StringModule).into());
113079            engine
113080                .register_type_with_name::<Option<User>>("Option<User>")
113081                .build_type::<User>()
113082                .register_static_module("Option<User>", exported_module!(UserModule).into());
113083        }
113084    }
113085    #[cfg(feature = "rhai")]
113086    #[allow(unused_mut)]
113087    impl rhai::CustomType for ChatJoinRequest {
113088        fn build(mut builder: rhai::TypeBuilder<Self>) {
113089            builder.with_get("chat", Self::rhai_get_chat);
113090            builder.with_get("from", Self::rhai_get_from);
113091            builder.with_get("user_chat_id", Self::rhai_get_user_chat_id);
113092            builder.with_get("date", Self::rhai_get_date);
113093            builder.with_get("bio", Self::rhai_get_bio);
113094            builder.with_get("invite_link", Self::rhai_get_invite_link);
113095            builder.on_debug(|t| format!("{:?}", t));
113096            drop(builder);
113097        }
113098    }
113099    #[cfg(feature = "rhai")]
113100    impl SetupRhai for StoryAreaPosition {
113101        fn setup_rhai(engine: &mut rhai::Engine) {
113102            engine.build_type::<StoryAreaPosition>();
113103            engine
113104                .register_type_with_name::<Option<f64>>("Option<f64>")
113105                .register_static_module("Option<f64>", exported_module!(f64Module).into());
113106        }
113107    }
113108    #[cfg(feature = "rhai")]
113109    #[allow(unused_mut)]
113110    impl rhai::CustomType for StoryAreaPosition {
113111        fn build(mut builder: rhai::TypeBuilder<Self>) {
113112            builder.with_get("x_percentage", Self::rhai_get_x_percentage);
113113            builder.with_get("y_percentage", Self::rhai_get_y_percentage);
113114            builder.with_get("width_percentage", Self::rhai_get_width_percentage);
113115            builder.with_get("height_percentage", Self::rhai_get_height_percentage);
113116            builder.with_get("rotation_angle", Self::rhai_get_rotation_angle);
113117            builder.with_get(
113118                "corner_radius_percentage",
113119                Self::rhai_get_corner_radius_percentage,
113120            );
113121            builder.on_debug(|t| format!("{:?}", t));
113122            drop(builder);
113123        }
113124    }
113125    #[cfg(feature = "rhai")]
113126    impl SetupRhai for BotCommand {
113127        fn setup_rhai(engine: &mut rhai::Engine) {
113128            engine.build_type::<BotCommand>();
113129            engine
113130                .register_type_with_name::<Option<String>>("Option<String>")
113131                .register_static_module("Option<String>", exported_module!(StringModule).into());
113132        }
113133    }
113134    #[cfg(feature = "rhai")]
113135    #[allow(unused_mut)]
113136    impl rhai::CustomType for BotCommand {
113137        fn build(mut builder: rhai::TypeBuilder<Self>) {
113138            builder.with_get("command", Self::rhai_get_command);
113139            builder.with_get("description", Self::rhai_get_description);
113140            builder.on_debug(|t| format!("{:?}", t));
113141            drop(builder);
113142        }
113143    }
113144    #[cfg(feature = "rhai")]
113145    impl SetupRhai for SuggestedPostPaid {
113146        fn setup_rhai(engine: &mut rhai::Engine) {
113147            engine.build_type::<SuggestedPostPaid>();
113148            engine
113149                .register_type_with_name::<Option<Animation>>("Option<Animation>")
113150                .build_type::<Animation>()
113151                .register_static_module(
113152                    "Option<Animation>",
113153                    exported_module!(AnimationModule).into(),
113154                );
113155            engine
113156                .register_type_with_name::<Option<Audio>>("Option<Audio>")
113157                .build_type::<Audio>()
113158                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
113159            engine
113160                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
113161                .register_static_module(
113162                    "Option<BackgroundType>",
113163                    exported_module!(BackgroundTypeModule).into(),
113164                );
113165            engine
113166                .register_type_with_name::<Option<bool>>("Option<bool>")
113167                .register_static_module("Option<bool>", exported_module!(boolModule).into());
113168            engine
113169                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
113170                .build_type::<CallbackGame>()
113171                .register_static_module(
113172                    "Option<CallbackGame>",
113173                    exported_module!(CallbackGameModule).into(),
113174                );
113175            engine
113176                .register_type_with_name::<Option<Chat>>("Option<Chat>")
113177                .build_type::<Chat>()
113178                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
113179            engine
113180                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
113181                .build_type::<ChatBackground>()
113182                .register_static_module(
113183                    "Option<ChatBackground>",
113184                    exported_module!(ChatBackgroundModule).into(),
113185                );
113186            engine
113187                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
113188                .build_type::<ChatBoostAdded>()
113189                .register_static_module(
113190                    "Option<ChatBoostAdded>",
113191                    exported_module!(ChatBoostAddedModule).into(),
113192                );
113193            engine
113194                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
113195                .build_type::<ChatShared>()
113196                .register_static_module(
113197                    "Option<ChatShared>",
113198                    exported_module!(ChatSharedModule).into(),
113199                );
113200            engine
113201                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
113202                .build_type::<Checklist>()
113203                .register_static_module(
113204                    "Option<Checklist>",
113205                    exported_module!(ChecklistModule).into(),
113206                );
113207            engine
113208                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
113209                .build_type::<ChecklistTask>()
113210                .register_static_module(
113211                    "Option<ChecklistTask>",
113212                    exported_module!(ChecklistTaskModule).into(),
113213                );
113214            engine
113215                .register_type_with_name::<Option<ChecklistTasksAdded>>(
113216                    "Option<ChecklistTasksAdded>",
113217                )
113218                .build_type::<ChecklistTasksAdded>()
113219                .register_static_module(
113220                    "Option<ChecklistTasksAdded>",
113221                    exported_module!(ChecklistTasksAddedModule).into(),
113222                );
113223            engine
113224                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
113225                .build_type::<ChecklistTasksDone>()
113226                .register_static_module(
113227                    "Option<ChecklistTasksDone>",
113228                    exported_module!(ChecklistTasksDoneModule).into(),
113229                );
113230            engine
113231                .register_type_with_name::<Option<Contact>>("Option<Contact>")
113232                .build_type::<Contact>()
113233                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
113234            engine
113235                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
113236                .build_type::<CopyTextButton>()
113237                .register_static_module(
113238                    "Option<CopyTextButton>",
113239                    exported_module!(CopyTextButtonModule).into(),
113240                );
113241            engine
113242                .register_type_with_name::<Option<Dice>>("Option<Dice>")
113243                .build_type::<Dice>()
113244                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
113245            engine
113246                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
113247                    "Option<DirectMessagePriceChanged>",
113248                )
113249                .build_type::<DirectMessagePriceChanged>()
113250                .register_static_module(
113251                    "Option<DirectMessagePriceChanged>",
113252                    exported_module!(DirectMessagePriceChangedModule).into(),
113253                );
113254            engine
113255                .register_type_with_name::<Option<DirectMessagesTopic>>(
113256                    "Option<DirectMessagesTopic>",
113257                )
113258                .build_type::<DirectMessagesTopic>()
113259                .register_static_module(
113260                    "Option<DirectMessagesTopic>",
113261                    exported_module!(DirectMessagesTopicModule).into(),
113262                );
113263            engine
113264                .register_type_with_name::<Option<Document>>("Option<Document>")
113265                .build_type::<Document>()
113266                .register_static_module(
113267                    "Option<Document>",
113268                    exported_module!(DocumentModule).into(),
113269                );
113270            engine
113271                .register_type_with_name::<Option<EncryptedCredentials>>(
113272                    "Option<EncryptedCredentials>",
113273                )
113274                .build_type::<EncryptedCredentials>()
113275                .register_static_module(
113276                    "Option<EncryptedCredentials>",
113277                    exported_module!(EncryptedCredentialsModule).into(),
113278                );
113279            engine
113280                .register_type_with_name::<Option<EncryptedPassportElement>>(
113281                    "Option<EncryptedPassportElement>",
113282                )
113283                .build_type::<EncryptedPassportElement>()
113284                .register_static_module(
113285                    "Option<EncryptedPassportElement>",
113286                    exported_module!(EncryptedPassportElementModule).into(),
113287                );
113288            engine
113289                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
113290                .build_type::<ExternalReplyInfo>()
113291                .register_static_module(
113292                    "Option<ExternalReplyInfo>",
113293                    exported_module!(ExternalReplyInfoModule).into(),
113294                );
113295            engine
113296                .register_type_with_name::<Option<File>>("Option<File>")
113297                .build_type::<File>()
113298                .register_static_module("Option<File>", exported_module!(FileModule).into());
113299            engine
113300                .register_type_with_name::<Option<f64>>("Option<f64>")
113301                .register_static_module("Option<f64>", exported_module!(f64Module).into());
113302            engine
113303                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
113304                .build_type::<ForumTopicClosed>()
113305                .register_static_module(
113306                    "Option<ForumTopicClosed>",
113307                    exported_module!(ForumTopicClosedModule).into(),
113308                );
113309            engine
113310                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
113311                .build_type::<ForumTopicCreated>()
113312                .register_static_module(
113313                    "Option<ForumTopicCreated>",
113314                    exported_module!(ForumTopicCreatedModule).into(),
113315                );
113316            engine
113317                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
113318                .build_type::<ForumTopicEdited>()
113319                .register_static_module(
113320                    "Option<ForumTopicEdited>",
113321                    exported_module!(ForumTopicEditedModule).into(),
113322                );
113323            engine
113324                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
113325                .build_type::<ForumTopicReopened>()
113326                .register_static_module(
113327                    "Option<ForumTopicReopened>",
113328                    exported_module!(ForumTopicReopenedModule).into(),
113329                );
113330            engine
113331                .register_type_with_name::<Option<Game>>("Option<Game>")
113332                .build_type::<Game>()
113333                .register_static_module("Option<Game>", exported_module!(GameModule).into());
113334            engine
113335                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
113336                    "Option<GeneralForumTopicHidden>",
113337                )
113338                .build_type::<GeneralForumTopicHidden>()
113339                .register_static_module(
113340                    "Option<GeneralForumTopicHidden>",
113341                    exported_module!(GeneralForumTopicHiddenModule).into(),
113342                );
113343            engine
113344                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
113345                    "Option<GeneralForumTopicUnhidden>",
113346                )
113347                .build_type::<GeneralForumTopicUnhidden>()
113348                .register_static_module(
113349                    "Option<GeneralForumTopicUnhidden>",
113350                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
113351                );
113352            engine
113353                .register_type_with_name::<Option<Gift>>("Option<Gift>")
113354                .build_type::<Gift>()
113355                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
113356            engine
113357                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
113358                .build_type::<GiftInfo>()
113359                .register_static_module(
113360                    "Option<GiftInfo>",
113361                    exported_module!(GiftInfoModule).into(),
113362                );
113363            engine
113364                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
113365                .build_type::<Giveaway>()
113366                .register_static_module(
113367                    "Option<Giveaway>",
113368                    exported_module!(GiveawayModule).into(),
113369                );
113370            engine
113371                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
113372                .build_type::<GiveawayCompleted>()
113373                .register_static_module(
113374                    "Option<GiveawayCompleted>",
113375                    exported_module!(GiveawayCompletedModule).into(),
113376                );
113377            engine
113378                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
113379                .build_type::<GiveawayCreated>()
113380                .register_static_module(
113381                    "Option<GiveawayCreated>",
113382                    exported_module!(GiveawayCreatedModule).into(),
113383                );
113384            engine
113385                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
113386                .build_type::<GiveawayWinners>()
113387                .register_static_module(
113388                    "Option<GiveawayWinners>",
113389                    exported_module!(GiveawayWinnersModule).into(),
113390                );
113391            engine
113392                .register_type_with_name::<Option<InlineKeyboardButton>>(
113393                    "Option<InlineKeyboardButton>",
113394                )
113395                .build_type::<InlineKeyboardButton>()
113396                .register_static_module(
113397                    "Option<InlineKeyboardButton>",
113398                    exported_module!(InlineKeyboardButtonModule).into(),
113399                );
113400            engine
113401                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
113402                    "Option<InlineKeyboardMarkup>",
113403                )
113404                .build_type::<InlineKeyboardMarkup>()
113405                .register_static_module(
113406                    "Option<InlineKeyboardMarkup>",
113407                    exported_module!(InlineKeyboardMarkupModule).into(),
113408                );
113409            engine
113410                .register_type_with_name::<Option<i64>>("Option<i64>")
113411                .register_static_module("Option<i64>", exported_module!(i64Module).into());
113412            engine
113413                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
113414                .build_type::<Invoice>()
113415                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
113416            engine
113417                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
113418                .build_type::<LinkPreviewOptions>()
113419                .register_static_module(
113420                    "Option<LinkPreviewOptions>",
113421                    exported_module!(LinkPreviewOptionsModule).into(),
113422                );
113423            engine
113424                .register_type_with_name::<Option<Location>>("Option<Location>")
113425                .build_type::<Location>()
113426                .register_static_module(
113427                    "Option<Location>",
113428                    exported_module!(LocationModule).into(),
113429                );
113430            engine
113431                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
113432                .build_type::<LoginUrl>()
113433                .register_static_module(
113434                    "Option<LoginUrl>",
113435                    exported_module!(LoginUrlModule).into(),
113436                );
113437            engine
113438                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
113439                .build_type::<MaskPosition>()
113440                .register_static_module(
113441                    "Option<MaskPosition>",
113442                    exported_module!(MaskPositionModule).into(),
113443                );
113444            engine
113445                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
113446                    "Option<MaybeInaccessibleMessage>",
113447                )
113448                .register_static_module(
113449                    "Option<MaybeInaccessibleMessage>",
113450                    exported_module!(MaybeInaccessibleMessageModule).into(),
113451                );
113452            engine
113453                .register_type_with_name::<Option<Message>>("Option<Message>")
113454                .build_type::<Message>()
113455                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
113456            engine
113457                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
113458                    "Option<MessageAutoDeleteTimerChanged>",
113459                )
113460                .build_type::<MessageAutoDeleteTimerChanged>()
113461                .register_static_module(
113462                    "Option<MessageAutoDeleteTimerChanged>",
113463                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
113464                );
113465            engine
113466                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
113467                .build_type::<MessageEntity>()
113468                .register_static_module(
113469                    "Option<MessageEntity>",
113470                    exported_module!(MessageEntityModule).into(),
113471                );
113472            engine
113473                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
113474                .register_static_module(
113475                    "Option<MessageOrigin>",
113476                    exported_module!(MessageOriginModule).into(),
113477                );
113478            engine
113479                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
113480                .build_type::<OrderInfo>()
113481                .register_static_module(
113482                    "Option<OrderInfo>",
113483                    exported_module!(OrderInfoModule).into(),
113484                );
113485            engine
113486                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
113487                .register_static_module(
113488                    "Option<PaidMedia>",
113489                    exported_module!(PaidMediaModule).into(),
113490                );
113491            engine
113492                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
113493                .build_type::<PaidMediaInfo>()
113494                .register_static_module(
113495                    "Option<PaidMediaInfo>",
113496                    exported_module!(PaidMediaInfoModule).into(),
113497                );
113498            engine
113499                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
113500                    "Option<PaidMessagePriceChanged>",
113501                )
113502                .build_type::<PaidMessagePriceChanged>()
113503                .register_static_module(
113504                    "Option<PaidMessagePriceChanged>",
113505                    exported_module!(PaidMessagePriceChangedModule).into(),
113506                );
113507            engine
113508                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
113509                .build_type::<PassportData>()
113510                .register_static_module(
113511                    "Option<PassportData>",
113512                    exported_module!(PassportDataModule).into(),
113513                );
113514            engine
113515                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
113516                .build_type::<PassportFile>()
113517                .register_static_module(
113518                    "Option<PassportFile>",
113519                    exported_module!(PassportFileModule).into(),
113520                );
113521            engine
113522                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
113523                .build_type::<PhotoSize>()
113524                .register_static_module(
113525                    "Option<PhotoSize>",
113526                    exported_module!(PhotoSizeModule).into(),
113527                );
113528            engine
113529                .register_type_with_name::<Option<Poll>>("Option<Poll>")
113530                .build_type::<Poll>()
113531                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
113532            engine
113533                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
113534                .build_type::<PollOption>()
113535                .register_static_module(
113536                    "Option<PollOption>",
113537                    exported_module!(PollOptionModule).into(),
113538                );
113539            engine
113540                .register_type_with_name::<Option<ProximityAlertTriggered>>(
113541                    "Option<ProximityAlertTriggered>",
113542                )
113543                .build_type::<ProximityAlertTriggered>()
113544                .register_static_module(
113545                    "Option<ProximityAlertTriggered>",
113546                    exported_module!(ProximityAlertTriggeredModule).into(),
113547                );
113548            engine
113549                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
113550                .build_type::<RefundedPayment>()
113551                .register_static_module(
113552                    "Option<RefundedPayment>",
113553                    exported_module!(RefundedPaymentModule).into(),
113554                );
113555            engine
113556                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
113557                .build_type::<SharedUser>()
113558                .register_static_module(
113559                    "Option<SharedUser>",
113560                    exported_module!(SharedUserModule).into(),
113561                );
113562            engine
113563                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
113564                .build_type::<ShippingAddress>()
113565                .register_static_module(
113566                    "Option<ShippingAddress>",
113567                    exported_module!(ShippingAddressModule).into(),
113568                );
113569            engine
113570                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
113571                .build_type::<StarAmount>()
113572                .register_static_module(
113573                    "Option<StarAmount>",
113574                    exported_module!(StarAmountModule).into(),
113575                );
113576            engine
113577                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
113578                .build_type::<Sticker>()
113579                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
113580            engine
113581                .register_type_with_name::<Option<Story>>("Option<Story>")
113582                .build_type::<Story>()
113583                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
113584            engine
113585                .register_type_with_name::<Option<String>>("Option<String>")
113586                .register_static_module("Option<String>", exported_module!(StringModule).into());
113587            engine
113588                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
113589                .build_type::<SuccessfulPayment>()
113590                .register_static_module(
113591                    "Option<SuccessfulPayment>",
113592                    exported_module!(SuccessfulPaymentModule).into(),
113593                );
113594            engine
113595                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
113596                    "Option<SuggestedPostApprovalFailed>",
113597                )
113598                .build_type::<SuggestedPostApprovalFailed>()
113599                .register_static_module(
113600                    "Option<SuggestedPostApprovalFailed>",
113601                    exported_module!(SuggestedPostApprovalFailedModule).into(),
113602                );
113603            engine
113604                .register_type_with_name::<Option<SuggestedPostApproved>>(
113605                    "Option<SuggestedPostApproved>",
113606                )
113607                .build_type::<SuggestedPostApproved>()
113608                .register_static_module(
113609                    "Option<SuggestedPostApproved>",
113610                    exported_module!(SuggestedPostApprovedModule).into(),
113611                );
113612            engine
113613                .register_type_with_name::<Option<SuggestedPostDeclined>>(
113614                    "Option<SuggestedPostDeclined>",
113615                )
113616                .build_type::<SuggestedPostDeclined>()
113617                .register_static_module(
113618                    "Option<SuggestedPostDeclined>",
113619                    exported_module!(SuggestedPostDeclinedModule).into(),
113620                );
113621            engine
113622                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
113623                .build_type::<SuggestedPostInfo>()
113624                .register_static_module(
113625                    "Option<SuggestedPostInfo>",
113626                    exported_module!(SuggestedPostInfoModule).into(),
113627                );
113628            engine
113629                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
113630                .build_type::<SuggestedPostPaid>()
113631                .register_static_module(
113632                    "Option<SuggestedPostPaid>",
113633                    exported_module!(SuggestedPostPaidModule).into(),
113634                );
113635            engine
113636                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
113637                .build_type::<SuggestedPostPrice>()
113638                .register_static_module(
113639                    "Option<SuggestedPostPrice>",
113640                    exported_module!(SuggestedPostPriceModule).into(),
113641                );
113642            engine
113643                .register_type_with_name::<Option<SuggestedPostRefunded>>(
113644                    "Option<SuggestedPostRefunded>",
113645                )
113646                .build_type::<SuggestedPostRefunded>()
113647                .register_static_module(
113648                    "Option<SuggestedPostRefunded>",
113649                    exported_module!(SuggestedPostRefundedModule).into(),
113650                );
113651            engine
113652                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
113653                    "Option<SwitchInlineQueryChosenChat>",
113654                )
113655                .build_type::<SwitchInlineQueryChosenChat>()
113656                .register_static_module(
113657                    "Option<SwitchInlineQueryChosenChat>",
113658                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
113659                );
113660            engine
113661                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
113662                .build_type::<TextQuote>()
113663                .register_static_module(
113664                    "Option<TextQuote>",
113665                    exported_module!(TextQuoteModule).into(),
113666                );
113667            engine
113668                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
113669                .build_type::<UniqueGift>()
113670                .register_static_module(
113671                    "Option<UniqueGift>",
113672                    exported_module!(UniqueGiftModule).into(),
113673                );
113674            engine
113675                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
113676                .build_type::<UniqueGiftBackdrop>()
113677                .register_static_module(
113678                    "Option<UniqueGiftBackdrop>",
113679                    exported_module!(UniqueGiftBackdropModule).into(),
113680                );
113681            engine
113682                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
113683                    "Option<UniqueGiftBackdropColors>",
113684                )
113685                .build_type::<UniqueGiftBackdropColors>()
113686                .register_static_module(
113687                    "Option<UniqueGiftBackdropColors>",
113688                    exported_module!(UniqueGiftBackdropColorsModule).into(),
113689                );
113690            engine
113691                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
113692                .build_type::<UniqueGiftInfo>()
113693                .register_static_module(
113694                    "Option<UniqueGiftInfo>",
113695                    exported_module!(UniqueGiftInfoModule).into(),
113696                );
113697            engine
113698                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
113699                .build_type::<UniqueGiftModel>()
113700                .register_static_module(
113701                    "Option<UniqueGiftModel>",
113702                    exported_module!(UniqueGiftModelModule).into(),
113703                );
113704            engine
113705                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
113706                .build_type::<UniqueGiftSymbol>()
113707                .register_static_module(
113708                    "Option<UniqueGiftSymbol>",
113709                    exported_module!(UniqueGiftSymbolModule).into(),
113710                );
113711            engine
113712                .register_type_with_name::<Option<User>>("Option<User>")
113713                .build_type::<User>()
113714                .register_static_module("Option<User>", exported_module!(UserModule).into());
113715            engine
113716                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
113717                .build_type::<UsersShared>()
113718                .register_static_module(
113719                    "Option<UsersShared>",
113720                    exported_module!(UsersSharedModule).into(),
113721                );
113722            engine
113723                .register_type_with_name::<Option<Venue>>("Option<Venue>")
113724                .build_type::<Venue>()
113725                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
113726            engine
113727                .register_type_with_name::<Option<Video>>("Option<Video>")
113728                .build_type::<Video>()
113729                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
113730            engine
113731                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
113732                .build_type::<VideoChatEnded>()
113733                .register_static_module(
113734                    "Option<VideoChatEnded>",
113735                    exported_module!(VideoChatEndedModule).into(),
113736                );
113737            engine
113738                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
113739                    "Option<VideoChatParticipantsInvited>",
113740                )
113741                .build_type::<VideoChatParticipantsInvited>()
113742                .register_static_module(
113743                    "Option<VideoChatParticipantsInvited>",
113744                    exported_module!(VideoChatParticipantsInvitedModule).into(),
113745                );
113746            engine
113747                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
113748                .build_type::<VideoChatScheduled>()
113749                .register_static_module(
113750                    "Option<VideoChatScheduled>",
113751                    exported_module!(VideoChatScheduledModule).into(),
113752                );
113753            engine
113754                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
113755                .build_type::<VideoChatStarted>()
113756                .register_static_module(
113757                    "Option<VideoChatStarted>",
113758                    exported_module!(VideoChatStartedModule).into(),
113759                );
113760            engine
113761                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
113762                .build_type::<VideoNote>()
113763                .register_static_module(
113764                    "Option<VideoNote>",
113765                    exported_module!(VideoNoteModule).into(),
113766                );
113767            engine
113768                .register_type_with_name::<Option<Voice>>("Option<Voice>")
113769                .build_type::<Voice>()
113770                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
113771            engine
113772                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
113773                .build_type::<WebAppData>()
113774                .register_static_module(
113775                    "Option<WebAppData>",
113776                    exported_module!(WebAppDataModule).into(),
113777                );
113778            engine
113779                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
113780                .build_type::<WebAppInfo>()
113781                .register_static_module(
113782                    "Option<WebAppInfo>",
113783                    exported_module!(WebAppInfoModule).into(),
113784                );
113785            engine
113786                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
113787                .build_type::<WriteAccessAllowed>()
113788                .register_static_module(
113789                    "Option<WriteAccessAllowed>",
113790                    exported_module!(WriteAccessAllowedModule).into(),
113791                );
113792        }
113793    }
113794    #[cfg(feature = "rhai")]
113795    #[allow(unused_mut)]
113796    impl rhai::CustomType for SuggestedPostPaid {
113797        fn build(mut builder: rhai::TypeBuilder<Self>) {
113798            builder.with_get(
113799                "suggested_post_message",
113800                Self::rhai_get_suggested_post_message,
113801            );
113802            builder.with_get("currency", Self::rhai_get_currency);
113803            builder.with_get("amount", Self::rhai_get_amount);
113804            builder.with_get("star_amount", Self::rhai_get_star_amount);
113805            builder.on_debug(|t| format!("{:?}", t));
113806            drop(builder);
113807        }
113808    }
113809    #[cfg(feature = "rhai")]
113810    impl SetupRhai for Contact {
113811        fn setup_rhai(engine: &mut rhai::Engine) {
113812            engine.build_type::<Contact>();
113813            engine
113814                .register_type_with_name::<Option<i64>>("Option<i64>")
113815                .register_static_module("Option<i64>", exported_module!(i64Module).into());
113816            engine
113817                .register_type_with_name::<Option<String>>("Option<String>")
113818                .register_static_module("Option<String>", exported_module!(StringModule).into());
113819        }
113820    }
113821    #[cfg(feature = "rhai")]
113822    #[allow(unused_mut)]
113823    impl rhai::CustomType for Contact {
113824        fn build(mut builder: rhai::TypeBuilder<Self>) {
113825            builder.with_get("phone_number", Self::rhai_get_phone_number);
113826            builder.with_get("first_name", Self::rhai_get_first_name);
113827            builder.with_get("last_name", Self::rhai_get_last_name);
113828            builder.with_get("user_id", Self::rhai_get_user_id);
113829            builder.with_get("vcard", Self::rhai_get_vcard);
113830            builder.on_debug(|t| format!("{:?}", t));
113831            drop(builder);
113832        }
113833    }
113834    #[cfg(feature = "rhai")]
113835    impl SetupRhai for ChatBoostSourceGiveaway {
113836        fn setup_rhai(engine: &mut rhai::Engine) {
113837            engine.build_type::<ChatBoostSourceGiveaway>();
113838            engine
113839                .register_type_with_name::<Option<bool>>("Option<bool>")
113840                .register_static_module("Option<bool>", exported_module!(boolModule).into());
113841            engine
113842                .register_type_with_name::<Option<i64>>("Option<i64>")
113843                .register_static_module("Option<i64>", exported_module!(i64Module).into());
113844            engine
113845                .register_type_with_name::<Option<String>>("Option<String>")
113846                .register_static_module("Option<String>", exported_module!(StringModule).into());
113847            engine
113848                .register_type_with_name::<Option<User>>("Option<User>")
113849                .build_type::<User>()
113850                .register_static_module("Option<User>", exported_module!(UserModule).into());
113851        }
113852    }
113853    #[cfg(feature = "rhai")]
113854    #[allow(unused_mut)]
113855    impl rhai::CustomType for ChatBoostSourceGiveaway {
113856        fn build(mut builder: rhai::TypeBuilder<Self>) {
113857            builder.with_get("source", Self::rhai_get_source);
113858            builder.with_get("giveaway_message_id", Self::rhai_get_giveaway_message_id);
113859            builder.with_get("user", Self::rhai_get_user);
113860            builder.with_get("prize_star_count", Self::rhai_get_prize_star_count);
113861            builder.with_get("is_unclaimed", Self::rhai_get_is_unclaimed);
113862            builder.on_debug(|t| format!("{:?}", t));
113863            drop(builder);
113864        }
113865    }
113866    #[cfg(feature = "rhai")]
113867    impl SetupRhai for BotName {
113868        fn setup_rhai(engine: &mut rhai::Engine) {
113869            engine.build_type::<BotName>();
113870            engine
113871                .register_type_with_name::<Option<String>>("Option<String>")
113872                .register_static_module("Option<String>", exported_module!(StringModule).into());
113873        }
113874    }
113875    #[cfg(feature = "rhai")]
113876    #[allow(unused_mut)]
113877    impl rhai::CustomType for BotName {
113878        fn build(mut builder: rhai::TypeBuilder<Self>) {
113879            builder.with_get("name", Self::rhai_get_name);
113880            builder.on_debug(|t| format!("{:?}", t));
113881            drop(builder);
113882        }
113883    }
113884    #[cfg(feature = "rhai")]
113885    impl SetupRhai for SuggestedPostDeclined {
113886        fn setup_rhai(engine: &mut rhai::Engine) {
113887            engine.build_type::<SuggestedPostDeclined>();
113888            engine
113889                .register_type_with_name::<Option<Animation>>("Option<Animation>")
113890                .build_type::<Animation>()
113891                .register_static_module(
113892                    "Option<Animation>",
113893                    exported_module!(AnimationModule).into(),
113894                );
113895            engine
113896                .register_type_with_name::<Option<Audio>>("Option<Audio>")
113897                .build_type::<Audio>()
113898                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
113899            engine
113900                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
113901                .register_static_module(
113902                    "Option<BackgroundType>",
113903                    exported_module!(BackgroundTypeModule).into(),
113904                );
113905            engine
113906                .register_type_with_name::<Option<bool>>("Option<bool>")
113907                .register_static_module("Option<bool>", exported_module!(boolModule).into());
113908            engine
113909                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
113910                .build_type::<CallbackGame>()
113911                .register_static_module(
113912                    "Option<CallbackGame>",
113913                    exported_module!(CallbackGameModule).into(),
113914                );
113915            engine
113916                .register_type_with_name::<Option<Chat>>("Option<Chat>")
113917                .build_type::<Chat>()
113918                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
113919            engine
113920                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
113921                .build_type::<ChatBackground>()
113922                .register_static_module(
113923                    "Option<ChatBackground>",
113924                    exported_module!(ChatBackgroundModule).into(),
113925                );
113926            engine
113927                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
113928                .build_type::<ChatBoostAdded>()
113929                .register_static_module(
113930                    "Option<ChatBoostAdded>",
113931                    exported_module!(ChatBoostAddedModule).into(),
113932                );
113933            engine
113934                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
113935                .build_type::<ChatShared>()
113936                .register_static_module(
113937                    "Option<ChatShared>",
113938                    exported_module!(ChatSharedModule).into(),
113939                );
113940            engine
113941                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
113942                .build_type::<Checklist>()
113943                .register_static_module(
113944                    "Option<Checklist>",
113945                    exported_module!(ChecklistModule).into(),
113946                );
113947            engine
113948                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
113949                .build_type::<ChecklistTask>()
113950                .register_static_module(
113951                    "Option<ChecklistTask>",
113952                    exported_module!(ChecklistTaskModule).into(),
113953                );
113954            engine
113955                .register_type_with_name::<Option<ChecklistTasksAdded>>(
113956                    "Option<ChecklistTasksAdded>",
113957                )
113958                .build_type::<ChecklistTasksAdded>()
113959                .register_static_module(
113960                    "Option<ChecklistTasksAdded>",
113961                    exported_module!(ChecklistTasksAddedModule).into(),
113962                );
113963            engine
113964                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
113965                .build_type::<ChecklistTasksDone>()
113966                .register_static_module(
113967                    "Option<ChecklistTasksDone>",
113968                    exported_module!(ChecklistTasksDoneModule).into(),
113969                );
113970            engine
113971                .register_type_with_name::<Option<Contact>>("Option<Contact>")
113972                .build_type::<Contact>()
113973                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
113974            engine
113975                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
113976                .build_type::<CopyTextButton>()
113977                .register_static_module(
113978                    "Option<CopyTextButton>",
113979                    exported_module!(CopyTextButtonModule).into(),
113980                );
113981            engine
113982                .register_type_with_name::<Option<Dice>>("Option<Dice>")
113983                .build_type::<Dice>()
113984                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
113985            engine
113986                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
113987                    "Option<DirectMessagePriceChanged>",
113988                )
113989                .build_type::<DirectMessagePriceChanged>()
113990                .register_static_module(
113991                    "Option<DirectMessagePriceChanged>",
113992                    exported_module!(DirectMessagePriceChangedModule).into(),
113993                );
113994            engine
113995                .register_type_with_name::<Option<DirectMessagesTopic>>(
113996                    "Option<DirectMessagesTopic>",
113997                )
113998                .build_type::<DirectMessagesTopic>()
113999                .register_static_module(
114000                    "Option<DirectMessagesTopic>",
114001                    exported_module!(DirectMessagesTopicModule).into(),
114002                );
114003            engine
114004                .register_type_with_name::<Option<Document>>("Option<Document>")
114005                .build_type::<Document>()
114006                .register_static_module(
114007                    "Option<Document>",
114008                    exported_module!(DocumentModule).into(),
114009                );
114010            engine
114011                .register_type_with_name::<Option<EncryptedCredentials>>(
114012                    "Option<EncryptedCredentials>",
114013                )
114014                .build_type::<EncryptedCredentials>()
114015                .register_static_module(
114016                    "Option<EncryptedCredentials>",
114017                    exported_module!(EncryptedCredentialsModule).into(),
114018                );
114019            engine
114020                .register_type_with_name::<Option<EncryptedPassportElement>>(
114021                    "Option<EncryptedPassportElement>",
114022                )
114023                .build_type::<EncryptedPassportElement>()
114024                .register_static_module(
114025                    "Option<EncryptedPassportElement>",
114026                    exported_module!(EncryptedPassportElementModule).into(),
114027                );
114028            engine
114029                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
114030                .build_type::<ExternalReplyInfo>()
114031                .register_static_module(
114032                    "Option<ExternalReplyInfo>",
114033                    exported_module!(ExternalReplyInfoModule).into(),
114034                );
114035            engine
114036                .register_type_with_name::<Option<File>>("Option<File>")
114037                .build_type::<File>()
114038                .register_static_module("Option<File>", exported_module!(FileModule).into());
114039            engine
114040                .register_type_with_name::<Option<f64>>("Option<f64>")
114041                .register_static_module("Option<f64>", exported_module!(f64Module).into());
114042            engine
114043                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
114044                .build_type::<ForumTopicClosed>()
114045                .register_static_module(
114046                    "Option<ForumTopicClosed>",
114047                    exported_module!(ForumTopicClosedModule).into(),
114048                );
114049            engine
114050                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
114051                .build_type::<ForumTopicCreated>()
114052                .register_static_module(
114053                    "Option<ForumTopicCreated>",
114054                    exported_module!(ForumTopicCreatedModule).into(),
114055                );
114056            engine
114057                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
114058                .build_type::<ForumTopicEdited>()
114059                .register_static_module(
114060                    "Option<ForumTopicEdited>",
114061                    exported_module!(ForumTopicEditedModule).into(),
114062                );
114063            engine
114064                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
114065                .build_type::<ForumTopicReopened>()
114066                .register_static_module(
114067                    "Option<ForumTopicReopened>",
114068                    exported_module!(ForumTopicReopenedModule).into(),
114069                );
114070            engine
114071                .register_type_with_name::<Option<Game>>("Option<Game>")
114072                .build_type::<Game>()
114073                .register_static_module("Option<Game>", exported_module!(GameModule).into());
114074            engine
114075                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
114076                    "Option<GeneralForumTopicHidden>",
114077                )
114078                .build_type::<GeneralForumTopicHidden>()
114079                .register_static_module(
114080                    "Option<GeneralForumTopicHidden>",
114081                    exported_module!(GeneralForumTopicHiddenModule).into(),
114082                );
114083            engine
114084                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
114085                    "Option<GeneralForumTopicUnhidden>",
114086                )
114087                .build_type::<GeneralForumTopicUnhidden>()
114088                .register_static_module(
114089                    "Option<GeneralForumTopicUnhidden>",
114090                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
114091                );
114092            engine
114093                .register_type_with_name::<Option<Gift>>("Option<Gift>")
114094                .build_type::<Gift>()
114095                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
114096            engine
114097                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
114098                .build_type::<GiftInfo>()
114099                .register_static_module(
114100                    "Option<GiftInfo>",
114101                    exported_module!(GiftInfoModule).into(),
114102                );
114103            engine
114104                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
114105                .build_type::<Giveaway>()
114106                .register_static_module(
114107                    "Option<Giveaway>",
114108                    exported_module!(GiveawayModule).into(),
114109                );
114110            engine
114111                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
114112                .build_type::<GiveawayCompleted>()
114113                .register_static_module(
114114                    "Option<GiveawayCompleted>",
114115                    exported_module!(GiveawayCompletedModule).into(),
114116                );
114117            engine
114118                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
114119                .build_type::<GiveawayCreated>()
114120                .register_static_module(
114121                    "Option<GiveawayCreated>",
114122                    exported_module!(GiveawayCreatedModule).into(),
114123                );
114124            engine
114125                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
114126                .build_type::<GiveawayWinners>()
114127                .register_static_module(
114128                    "Option<GiveawayWinners>",
114129                    exported_module!(GiveawayWinnersModule).into(),
114130                );
114131            engine
114132                .register_type_with_name::<Option<InlineKeyboardButton>>(
114133                    "Option<InlineKeyboardButton>",
114134                )
114135                .build_type::<InlineKeyboardButton>()
114136                .register_static_module(
114137                    "Option<InlineKeyboardButton>",
114138                    exported_module!(InlineKeyboardButtonModule).into(),
114139                );
114140            engine
114141                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
114142                    "Option<InlineKeyboardMarkup>",
114143                )
114144                .build_type::<InlineKeyboardMarkup>()
114145                .register_static_module(
114146                    "Option<InlineKeyboardMarkup>",
114147                    exported_module!(InlineKeyboardMarkupModule).into(),
114148                );
114149            engine
114150                .register_type_with_name::<Option<i64>>("Option<i64>")
114151                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114152            engine
114153                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
114154                .build_type::<Invoice>()
114155                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
114156            engine
114157                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
114158                .build_type::<LinkPreviewOptions>()
114159                .register_static_module(
114160                    "Option<LinkPreviewOptions>",
114161                    exported_module!(LinkPreviewOptionsModule).into(),
114162                );
114163            engine
114164                .register_type_with_name::<Option<Location>>("Option<Location>")
114165                .build_type::<Location>()
114166                .register_static_module(
114167                    "Option<Location>",
114168                    exported_module!(LocationModule).into(),
114169                );
114170            engine
114171                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
114172                .build_type::<LoginUrl>()
114173                .register_static_module(
114174                    "Option<LoginUrl>",
114175                    exported_module!(LoginUrlModule).into(),
114176                );
114177            engine
114178                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
114179                .build_type::<MaskPosition>()
114180                .register_static_module(
114181                    "Option<MaskPosition>",
114182                    exported_module!(MaskPositionModule).into(),
114183                );
114184            engine
114185                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
114186                    "Option<MaybeInaccessibleMessage>",
114187                )
114188                .register_static_module(
114189                    "Option<MaybeInaccessibleMessage>",
114190                    exported_module!(MaybeInaccessibleMessageModule).into(),
114191                );
114192            engine
114193                .register_type_with_name::<Option<Message>>("Option<Message>")
114194                .build_type::<Message>()
114195                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
114196            engine
114197                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
114198                    "Option<MessageAutoDeleteTimerChanged>",
114199                )
114200                .build_type::<MessageAutoDeleteTimerChanged>()
114201                .register_static_module(
114202                    "Option<MessageAutoDeleteTimerChanged>",
114203                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
114204                );
114205            engine
114206                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
114207                .build_type::<MessageEntity>()
114208                .register_static_module(
114209                    "Option<MessageEntity>",
114210                    exported_module!(MessageEntityModule).into(),
114211                );
114212            engine
114213                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
114214                .register_static_module(
114215                    "Option<MessageOrigin>",
114216                    exported_module!(MessageOriginModule).into(),
114217                );
114218            engine
114219                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
114220                .build_type::<OrderInfo>()
114221                .register_static_module(
114222                    "Option<OrderInfo>",
114223                    exported_module!(OrderInfoModule).into(),
114224                );
114225            engine
114226                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
114227                .register_static_module(
114228                    "Option<PaidMedia>",
114229                    exported_module!(PaidMediaModule).into(),
114230                );
114231            engine
114232                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
114233                .build_type::<PaidMediaInfo>()
114234                .register_static_module(
114235                    "Option<PaidMediaInfo>",
114236                    exported_module!(PaidMediaInfoModule).into(),
114237                );
114238            engine
114239                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
114240                    "Option<PaidMessagePriceChanged>",
114241                )
114242                .build_type::<PaidMessagePriceChanged>()
114243                .register_static_module(
114244                    "Option<PaidMessagePriceChanged>",
114245                    exported_module!(PaidMessagePriceChangedModule).into(),
114246                );
114247            engine
114248                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
114249                .build_type::<PassportData>()
114250                .register_static_module(
114251                    "Option<PassportData>",
114252                    exported_module!(PassportDataModule).into(),
114253                );
114254            engine
114255                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
114256                .build_type::<PassportFile>()
114257                .register_static_module(
114258                    "Option<PassportFile>",
114259                    exported_module!(PassportFileModule).into(),
114260                );
114261            engine
114262                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
114263                .build_type::<PhotoSize>()
114264                .register_static_module(
114265                    "Option<PhotoSize>",
114266                    exported_module!(PhotoSizeModule).into(),
114267                );
114268            engine
114269                .register_type_with_name::<Option<Poll>>("Option<Poll>")
114270                .build_type::<Poll>()
114271                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
114272            engine
114273                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
114274                .build_type::<PollOption>()
114275                .register_static_module(
114276                    "Option<PollOption>",
114277                    exported_module!(PollOptionModule).into(),
114278                );
114279            engine
114280                .register_type_with_name::<Option<ProximityAlertTriggered>>(
114281                    "Option<ProximityAlertTriggered>",
114282                )
114283                .build_type::<ProximityAlertTriggered>()
114284                .register_static_module(
114285                    "Option<ProximityAlertTriggered>",
114286                    exported_module!(ProximityAlertTriggeredModule).into(),
114287                );
114288            engine
114289                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
114290                .build_type::<RefundedPayment>()
114291                .register_static_module(
114292                    "Option<RefundedPayment>",
114293                    exported_module!(RefundedPaymentModule).into(),
114294                );
114295            engine
114296                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
114297                .build_type::<SharedUser>()
114298                .register_static_module(
114299                    "Option<SharedUser>",
114300                    exported_module!(SharedUserModule).into(),
114301                );
114302            engine
114303                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
114304                .build_type::<ShippingAddress>()
114305                .register_static_module(
114306                    "Option<ShippingAddress>",
114307                    exported_module!(ShippingAddressModule).into(),
114308                );
114309            engine
114310                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
114311                .build_type::<StarAmount>()
114312                .register_static_module(
114313                    "Option<StarAmount>",
114314                    exported_module!(StarAmountModule).into(),
114315                );
114316            engine
114317                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
114318                .build_type::<Sticker>()
114319                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
114320            engine
114321                .register_type_with_name::<Option<Story>>("Option<Story>")
114322                .build_type::<Story>()
114323                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
114324            engine
114325                .register_type_with_name::<Option<String>>("Option<String>")
114326                .register_static_module("Option<String>", exported_module!(StringModule).into());
114327            engine
114328                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
114329                .build_type::<SuccessfulPayment>()
114330                .register_static_module(
114331                    "Option<SuccessfulPayment>",
114332                    exported_module!(SuccessfulPaymentModule).into(),
114333                );
114334            engine
114335                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
114336                    "Option<SuggestedPostApprovalFailed>",
114337                )
114338                .build_type::<SuggestedPostApprovalFailed>()
114339                .register_static_module(
114340                    "Option<SuggestedPostApprovalFailed>",
114341                    exported_module!(SuggestedPostApprovalFailedModule).into(),
114342                );
114343            engine
114344                .register_type_with_name::<Option<SuggestedPostApproved>>(
114345                    "Option<SuggestedPostApproved>",
114346                )
114347                .build_type::<SuggestedPostApproved>()
114348                .register_static_module(
114349                    "Option<SuggestedPostApproved>",
114350                    exported_module!(SuggestedPostApprovedModule).into(),
114351                );
114352            engine
114353                .register_type_with_name::<Option<SuggestedPostDeclined>>(
114354                    "Option<SuggestedPostDeclined>",
114355                )
114356                .build_type::<SuggestedPostDeclined>()
114357                .register_static_module(
114358                    "Option<SuggestedPostDeclined>",
114359                    exported_module!(SuggestedPostDeclinedModule).into(),
114360                );
114361            engine
114362                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
114363                .build_type::<SuggestedPostInfo>()
114364                .register_static_module(
114365                    "Option<SuggestedPostInfo>",
114366                    exported_module!(SuggestedPostInfoModule).into(),
114367                );
114368            engine
114369                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
114370                .build_type::<SuggestedPostPaid>()
114371                .register_static_module(
114372                    "Option<SuggestedPostPaid>",
114373                    exported_module!(SuggestedPostPaidModule).into(),
114374                );
114375            engine
114376                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
114377                .build_type::<SuggestedPostPrice>()
114378                .register_static_module(
114379                    "Option<SuggestedPostPrice>",
114380                    exported_module!(SuggestedPostPriceModule).into(),
114381                );
114382            engine
114383                .register_type_with_name::<Option<SuggestedPostRefunded>>(
114384                    "Option<SuggestedPostRefunded>",
114385                )
114386                .build_type::<SuggestedPostRefunded>()
114387                .register_static_module(
114388                    "Option<SuggestedPostRefunded>",
114389                    exported_module!(SuggestedPostRefundedModule).into(),
114390                );
114391            engine
114392                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
114393                    "Option<SwitchInlineQueryChosenChat>",
114394                )
114395                .build_type::<SwitchInlineQueryChosenChat>()
114396                .register_static_module(
114397                    "Option<SwitchInlineQueryChosenChat>",
114398                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
114399                );
114400            engine
114401                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
114402                .build_type::<TextQuote>()
114403                .register_static_module(
114404                    "Option<TextQuote>",
114405                    exported_module!(TextQuoteModule).into(),
114406                );
114407            engine
114408                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
114409                .build_type::<UniqueGift>()
114410                .register_static_module(
114411                    "Option<UniqueGift>",
114412                    exported_module!(UniqueGiftModule).into(),
114413                );
114414            engine
114415                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
114416                .build_type::<UniqueGiftBackdrop>()
114417                .register_static_module(
114418                    "Option<UniqueGiftBackdrop>",
114419                    exported_module!(UniqueGiftBackdropModule).into(),
114420                );
114421            engine
114422                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
114423                    "Option<UniqueGiftBackdropColors>",
114424                )
114425                .build_type::<UniqueGiftBackdropColors>()
114426                .register_static_module(
114427                    "Option<UniqueGiftBackdropColors>",
114428                    exported_module!(UniqueGiftBackdropColorsModule).into(),
114429                );
114430            engine
114431                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
114432                .build_type::<UniqueGiftInfo>()
114433                .register_static_module(
114434                    "Option<UniqueGiftInfo>",
114435                    exported_module!(UniqueGiftInfoModule).into(),
114436                );
114437            engine
114438                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
114439                .build_type::<UniqueGiftModel>()
114440                .register_static_module(
114441                    "Option<UniqueGiftModel>",
114442                    exported_module!(UniqueGiftModelModule).into(),
114443                );
114444            engine
114445                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
114446                .build_type::<UniqueGiftSymbol>()
114447                .register_static_module(
114448                    "Option<UniqueGiftSymbol>",
114449                    exported_module!(UniqueGiftSymbolModule).into(),
114450                );
114451            engine
114452                .register_type_with_name::<Option<User>>("Option<User>")
114453                .build_type::<User>()
114454                .register_static_module("Option<User>", exported_module!(UserModule).into());
114455            engine
114456                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
114457                .build_type::<UsersShared>()
114458                .register_static_module(
114459                    "Option<UsersShared>",
114460                    exported_module!(UsersSharedModule).into(),
114461                );
114462            engine
114463                .register_type_with_name::<Option<Venue>>("Option<Venue>")
114464                .build_type::<Venue>()
114465                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
114466            engine
114467                .register_type_with_name::<Option<Video>>("Option<Video>")
114468                .build_type::<Video>()
114469                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
114470            engine
114471                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
114472                .build_type::<VideoChatEnded>()
114473                .register_static_module(
114474                    "Option<VideoChatEnded>",
114475                    exported_module!(VideoChatEndedModule).into(),
114476                );
114477            engine
114478                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
114479                    "Option<VideoChatParticipantsInvited>",
114480                )
114481                .build_type::<VideoChatParticipantsInvited>()
114482                .register_static_module(
114483                    "Option<VideoChatParticipantsInvited>",
114484                    exported_module!(VideoChatParticipantsInvitedModule).into(),
114485                );
114486            engine
114487                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
114488                .build_type::<VideoChatScheduled>()
114489                .register_static_module(
114490                    "Option<VideoChatScheduled>",
114491                    exported_module!(VideoChatScheduledModule).into(),
114492                );
114493            engine
114494                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
114495                .build_type::<VideoChatStarted>()
114496                .register_static_module(
114497                    "Option<VideoChatStarted>",
114498                    exported_module!(VideoChatStartedModule).into(),
114499                );
114500            engine
114501                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
114502                .build_type::<VideoNote>()
114503                .register_static_module(
114504                    "Option<VideoNote>",
114505                    exported_module!(VideoNoteModule).into(),
114506                );
114507            engine
114508                .register_type_with_name::<Option<Voice>>("Option<Voice>")
114509                .build_type::<Voice>()
114510                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
114511            engine
114512                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
114513                .build_type::<WebAppData>()
114514                .register_static_module(
114515                    "Option<WebAppData>",
114516                    exported_module!(WebAppDataModule).into(),
114517                );
114518            engine
114519                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
114520                .build_type::<WebAppInfo>()
114521                .register_static_module(
114522                    "Option<WebAppInfo>",
114523                    exported_module!(WebAppInfoModule).into(),
114524                );
114525            engine
114526                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
114527                .build_type::<WriteAccessAllowed>()
114528                .register_static_module(
114529                    "Option<WriteAccessAllowed>",
114530                    exported_module!(WriteAccessAllowedModule).into(),
114531                );
114532        }
114533    }
114534    #[cfg(feature = "rhai")]
114535    #[allow(unused_mut)]
114536    impl rhai::CustomType for SuggestedPostDeclined {
114537        fn build(mut builder: rhai::TypeBuilder<Self>) {
114538            builder.with_get(
114539                "suggested_post_message",
114540                Self::rhai_get_suggested_post_message,
114541            );
114542            builder.with_get("comment", Self::rhai_get_comment);
114543            builder.on_debug(|t| format!("{:?}", t));
114544            drop(builder);
114545        }
114546    }
114547    #[cfg(feature = "rhai")]
114548    impl SetupRhai for BusinessOpeningHoursInterval {
114549        fn setup_rhai(engine: &mut rhai::Engine) {
114550            engine.build_type::<BusinessOpeningHoursInterval>();
114551            engine
114552                .register_type_with_name::<Option<i64>>("Option<i64>")
114553                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114554        }
114555    }
114556    #[cfg(feature = "rhai")]
114557    #[allow(unused_mut)]
114558    impl rhai::CustomType for BusinessOpeningHoursInterval {
114559        fn build(mut builder: rhai::TypeBuilder<Self>) {
114560            builder.with_get("opening_minute", Self::rhai_get_opening_minute);
114561            builder.with_get("closing_minute", Self::rhai_get_closing_minute);
114562            builder.on_debug(|t| format!("{:?}", t));
114563            drop(builder);
114564        }
114565    }
114566    #[cfg(feature = "rhai")]
114567    impl SetupRhai for Dice {
114568        fn setup_rhai(engine: &mut rhai::Engine) {
114569            engine.build_type::<Dice>();
114570            engine
114571                .register_type_with_name::<Option<i64>>("Option<i64>")
114572                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114573            engine
114574                .register_type_with_name::<Option<String>>("Option<String>")
114575                .register_static_module("Option<String>", exported_module!(StringModule).into());
114576        }
114577    }
114578    #[cfg(feature = "rhai")]
114579    #[allow(unused_mut)]
114580    impl rhai::CustomType for Dice {
114581        fn build(mut builder: rhai::TypeBuilder<Self>) {
114582            builder.with_get("emoji", Self::rhai_get_emoji);
114583            builder.with_get("value", Self::rhai_get_value);
114584            builder.on_debug(|t| format!("{:?}", t));
114585            drop(builder);
114586        }
114587    }
114588    #[cfg(feature = "rhai")]
114589    impl SetupRhai for InlineQueryResultArticle {
114590        fn setup_rhai(engine: &mut rhai::Engine) {
114591            engine.build_type::<InlineQueryResultArticle>();
114592            engine
114593                .register_type_with_name::<Option<bool>>("Option<bool>")
114594                .register_static_module("Option<bool>", exported_module!(boolModule).into());
114595            engine
114596                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
114597                .build_type::<CallbackGame>()
114598                .register_static_module(
114599                    "Option<CallbackGame>",
114600                    exported_module!(CallbackGameModule).into(),
114601                );
114602            engine
114603                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
114604                .build_type::<CopyTextButton>()
114605                .register_static_module(
114606                    "Option<CopyTextButton>",
114607                    exported_module!(CopyTextButtonModule).into(),
114608                );
114609            engine
114610                .register_type_with_name::<Option<InlineKeyboardButton>>(
114611                    "Option<InlineKeyboardButton>",
114612                )
114613                .build_type::<InlineKeyboardButton>()
114614                .register_static_module(
114615                    "Option<InlineKeyboardButton>",
114616                    exported_module!(InlineKeyboardButtonModule).into(),
114617                );
114618            engine
114619                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
114620                    "Option<InlineKeyboardMarkup>",
114621                )
114622                .build_type::<InlineKeyboardMarkup>()
114623                .register_static_module(
114624                    "Option<InlineKeyboardMarkup>",
114625                    exported_module!(InlineKeyboardMarkupModule).into(),
114626                );
114627            engine
114628                .register_type_with_name::<Option<InputMessageContent>>(
114629                    "Option<InputMessageContent>",
114630                )
114631                .register_static_module(
114632                    "Option<InputMessageContent>",
114633                    exported_module!(InputMessageContentModule).into(),
114634                );
114635            engine
114636                .register_type_with_name::<Option<i64>>("Option<i64>")
114637                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114638            engine
114639                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
114640                .build_type::<LoginUrl>()
114641                .register_static_module(
114642                    "Option<LoginUrl>",
114643                    exported_module!(LoginUrlModule).into(),
114644                );
114645            engine
114646                .register_type_with_name::<Option<String>>("Option<String>")
114647                .register_static_module("Option<String>", exported_module!(StringModule).into());
114648            engine
114649                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
114650                    "Option<SwitchInlineQueryChosenChat>",
114651                )
114652                .build_type::<SwitchInlineQueryChosenChat>()
114653                .register_static_module(
114654                    "Option<SwitchInlineQueryChosenChat>",
114655                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
114656                );
114657            engine
114658                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
114659                .build_type::<WebAppInfo>()
114660                .register_static_module(
114661                    "Option<WebAppInfo>",
114662                    exported_module!(WebAppInfoModule).into(),
114663                );
114664        }
114665    }
114666    #[cfg(feature = "rhai")]
114667    #[allow(unused_mut)]
114668    impl rhai::CustomType for InlineQueryResultArticle {
114669        fn build(mut builder: rhai::TypeBuilder<Self>) {
114670            builder.with_get("tg_type", Self::rhai_get_tg_type);
114671            builder.with_get("id", Self::rhai_get_id);
114672            builder.with_get("title", Self::rhai_get_title);
114673            builder.with_get(
114674                "input_message_content",
114675                Self::rhai_get_input_message_content,
114676            );
114677            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
114678            builder.with_get("url", Self::rhai_get_url);
114679            builder.with_get("description", Self::rhai_get_description);
114680            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
114681            builder.with_get("thumbnail_width", Self::rhai_get_thumbnail_width);
114682            builder.with_get("thumbnail_height", Self::rhai_get_thumbnail_height);
114683            builder.on_debug(|t| format!("{:?}", t));
114684            drop(builder);
114685        }
114686    }
114687    #[cfg(feature = "rhai")]
114688    impl SetupRhai for InputLocationMessageContent {
114689        fn setup_rhai(engine: &mut rhai::Engine) {
114690            engine.build_type::<InputLocationMessageContent>();
114691            engine
114692                .register_type_with_name::<Option<f64>>("Option<f64>")
114693                .register_static_module("Option<f64>", exported_module!(f64Module).into());
114694            engine
114695                .register_type_with_name::<Option<i64>>("Option<i64>")
114696                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114697        }
114698    }
114699    #[cfg(feature = "rhai")]
114700    #[allow(unused_mut)]
114701    impl rhai::CustomType for InputLocationMessageContent {
114702        fn build(mut builder: rhai::TypeBuilder<Self>) {
114703            builder.with_get("latitude", Self::rhai_get_latitude);
114704            builder.with_get("longitude", Self::rhai_get_longitude);
114705            builder.with_get("horizontal_accuracy", Self::rhai_get_horizontal_accuracy);
114706            builder.with_get("live_period", Self::rhai_get_live_period);
114707            builder.with_get("heading", Self::rhai_get_heading);
114708            builder.with_get(
114709                "proximity_alert_radius",
114710                Self::rhai_get_proximity_alert_radius,
114711            );
114712            builder.on_debug(|t| format!("{:?}", t));
114713            drop(builder);
114714        }
114715    }
114716    #[cfg(feature = "rhai")]
114717    impl SetupRhai for InlineQueryResultCachedSticker {
114718        fn setup_rhai(engine: &mut rhai::Engine) {
114719            engine.build_type::<InlineQueryResultCachedSticker>();
114720            engine
114721                .register_type_with_name::<Option<bool>>("Option<bool>")
114722                .register_static_module("Option<bool>", exported_module!(boolModule).into());
114723            engine
114724                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
114725                .build_type::<CallbackGame>()
114726                .register_static_module(
114727                    "Option<CallbackGame>",
114728                    exported_module!(CallbackGameModule).into(),
114729                );
114730            engine
114731                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
114732                .build_type::<CopyTextButton>()
114733                .register_static_module(
114734                    "Option<CopyTextButton>",
114735                    exported_module!(CopyTextButtonModule).into(),
114736                );
114737            engine
114738                .register_type_with_name::<Option<InlineKeyboardButton>>(
114739                    "Option<InlineKeyboardButton>",
114740                )
114741                .build_type::<InlineKeyboardButton>()
114742                .register_static_module(
114743                    "Option<InlineKeyboardButton>",
114744                    exported_module!(InlineKeyboardButtonModule).into(),
114745                );
114746            engine
114747                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
114748                    "Option<InlineKeyboardMarkup>",
114749                )
114750                .build_type::<InlineKeyboardMarkup>()
114751                .register_static_module(
114752                    "Option<InlineKeyboardMarkup>",
114753                    exported_module!(InlineKeyboardMarkupModule).into(),
114754                );
114755            engine
114756                .register_type_with_name::<Option<InputMessageContent>>(
114757                    "Option<InputMessageContent>",
114758                )
114759                .register_static_module(
114760                    "Option<InputMessageContent>",
114761                    exported_module!(InputMessageContentModule).into(),
114762                );
114763            engine
114764                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
114765                .build_type::<LoginUrl>()
114766                .register_static_module(
114767                    "Option<LoginUrl>",
114768                    exported_module!(LoginUrlModule).into(),
114769                );
114770            engine
114771                .register_type_with_name::<Option<String>>("Option<String>")
114772                .register_static_module("Option<String>", exported_module!(StringModule).into());
114773            engine
114774                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
114775                    "Option<SwitchInlineQueryChosenChat>",
114776                )
114777                .build_type::<SwitchInlineQueryChosenChat>()
114778                .register_static_module(
114779                    "Option<SwitchInlineQueryChosenChat>",
114780                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
114781                );
114782            engine
114783                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
114784                .build_type::<WebAppInfo>()
114785                .register_static_module(
114786                    "Option<WebAppInfo>",
114787                    exported_module!(WebAppInfoModule).into(),
114788                );
114789        }
114790    }
114791    #[cfg(feature = "rhai")]
114792    #[allow(unused_mut)]
114793    impl rhai::CustomType for InlineQueryResultCachedSticker {
114794        fn build(mut builder: rhai::TypeBuilder<Self>) {
114795            builder.with_get("tg_type", Self::rhai_get_tg_type);
114796            builder.with_get("id", Self::rhai_get_id);
114797            builder.with_get("sticker_file_id", Self::rhai_get_sticker_file_id);
114798            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
114799            builder.with_get(
114800                "input_message_content",
114801                Self::rhai_get_input_message_content,
114802            );
114803            builder.on_debug(|t| format!("{:?}", t));
114804            drop(builder);
114805        }
114806    }
114807    #[cfg(feature = "rhai")]
114808    impl SetupRhai for InputPaidMediaVideo {
114809        fn setup_rhai(engine: &mut rhai::Engine) {
114810            engine.build_type::<InputPaidMediaVideo>();
114811            engine
114812                .register_type_with_name::<Option<bool>>("Option<bool>")
114813                .register_static_module("Option<bool>", exported_module!(boolModule).into());
114814            engine
114815                .register_type_with_name::<Option<i64>>("Option<i64>")
114816                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114817            engine
114818                .register_type_with_name::<Option<String>>("Option<String>")
114819                .register_static_module("Option<String>", exported_module!(StringModule).into());
114820        }
114821    }
114822    #[cfg(feature = "rhai")]
114823    #[allow(unused_mut)]
114824    impl rhai::CustomType for InputPaidMediaVideo {
114825        fn build(mut builder: rhai::TypeBuilder<Self>) {
114826            builder.with_get("tg_type", Self::rhai_get_tg_type);
114827            builder.with_get("media", Self::rhai_get_media);
114828            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
114829            builder.with_get("cover", Self::rhai_get_cover);
114830            builder.with_get("start_timestamp", Self::rhai_get_start_timestamp);
114831            builder.with_get("width", Self::rhai_get_width);
114832            builder.with_get("height", Self::rhai_get_height);
114833            builder.with_get("duration", Self::rhai_get_duration);
114834            builder.with_get("supports_streaming", Self::rhai_get_supports_streaming);
114835            builder.on_debug(|t| format!("{:?}", t));
114836            drop(builder);
114837        }
114838    }
114839    #[cfg(feature = "rhai")]
114840    impl SetupRhai for Gift {
114841        fn setup_rhai(engine: &mut rhai::Engine) {
114842            engine.build_type::<Gift>();
114843            engine
114844                .register_type_with_name::<Option<bool>>("Option<bool>")
114845                .register_static_module("Option<bool>", exported_module!(boolModule).into());
114846            engine
114847                .register_type_with_name::<Option<Chat>>("Option<Chat>")
114848                .build_type::<Chat>()
114849                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
114850            engine
114851                .register_type_with_name::<Option<File>>("Option<File>")
114852                .build_type::<File>()
114853                .register_static_module("Option<File>", exported_module!(FileModule).into());
114854            engine
114855                .register_type_with_name::<Option<f64>>("Option<f64>")
114856                .register_static_module("Option<f64>", exported_module!(f64Module).into());
114857            engine
114858                .register_type_with_name::<Option<i64>>("Option<i64>")
114859                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114860            engine
114861                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
114862                .build_type::<MaskPosition>()
114863                .register_static_module(
114864                    "Option<MaskPosition>",
114865                    exported_module!(MaskPositionModule).into(),
114866                );
114867            engine
114868                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
114869                .build_type::<PhotoSize>()
114870                .register_static_module(
114871                    "Option<PhotoSize>",
114872                    exported_module!(PhotoSizeModule).into(),
114873                );
114874            engine
114875                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
114876                .build_type::<Sticker>()
114877                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
114878            engine
114879                .register_type_with_name::<Option<String>>("Option<String>")
114880                .register_static_module("Option<String>", exported_module!(StringModule).into());
114881        }
114882    }
114883    #[cfg(feature = "rhai")]
114884    #[allow(unused_mut)]
114885    impl rhai::CustomType for Gift {
114886        fn build(mut builder: rhai::TypeBuilder<Self>) {
114887            builder.with_get("id", Self::rhai_get_id);
114888            builder.with_get("sticker", Self::rhai_get_sticker);
114889            builder.with_get("star_count", Self::rhai_get_star_count);
114890            builder.with_get("upgrade_star_count", Self::rhai_get_upgrade_star_count);
114891            builder.with_get("total_count", Self::rhai_get_total_count);
114892            builder.with_get("remaining_count", Self::rhai_get_remaining_count);
114893            builder.with_get("publisher_chat", Self::rhai_get_publisher_chat);
114894            builder.on_debug(|t| format!("{:?}", t));
114895            drop(builder);
114896        }
114897    }
114898    #[cfg(feature = "rhai")]
114899    impl SetupRhai for MessageOriginUser {
114900        fn setup_rhai(engine: &mut rhai::Engine) {
114901            engine.build_type::<MessageOriginUser>();
114902            engine
114903                .register_type_with_name::<Option<bool>>("Option<bool>")
114904                .register_static_module("Option<bool>", exported_module!(boolModule).into());
114905            engine
114906                .register_type_with_name::<Option<i64>>("Option<i64>")
114907                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114908            engine
114909                .register_type_with_name::<Option<String>>("Option<String>")
114910                .register_static_module("Option<String>", exported_module!(StringModule).into());
114911            engine
114912                .register_type_with_name::<Option<User>>("Option<User>")
114913                .build_type::<User>()
114914                .register_static_module("Option<User>", exported_module!(UserModule).into());
114915        }
114916    }
114917    #[cfg(feature = "rhai")]
114918    #[allow(unused_mut)]
114919    impl rhai::CustomType for MessageOriginUser {
114920        fn build(mut builder: rhai::TypeBuilder<Self>) {
114921            builder.with_get("tg_type", Self::rhai_get_tg_type);
114922            builder.with_get("date", Self::rhai_get_date);
114923            builder.with_get("sender_user", Self::rhai_get_sender_user);
114924            builder.on_debug(|t| format!("{:?}", t));
114925            drop(builder);
114926        }
114927    }
114928    #[cfg(feature = "rhai")]
114929    impl SetupRhai for KeyboardButton {
114930        fn setup_rhai(engine: &mut rhai::Engine) {
114931            engine.build_type::<KeyboardButton>();
114932            engine
114933                .register_type_with_name::<Option<bool>>("Option<bool>")
114934                .register_static_module("Option<bool>", exported_module!(boolModule).into());
114935            engine
114936                .register_type_with_name::<Option<ChatAdministratorRights>>(
114937                    "Option<ChatAdministratorRights>",
114938                )
114939                .build_type::<ChatAdministratorRights>()
114940                .register_static_module(
114941                    "Option<ChatAdministratorRights>",
114942                    exported_module!(ChatAdministratorRightsModule).into(),
114943                );
114944            engine
114945                .register_type_with_name::<Option<i64>>("Option<i64>")
114946                .register_static_module("Option<i64>", exported_module!(i64Module).into());
114947            engine
114948                .register_type_with_name::<Option<KeyboardButtonPollType>>(
114949                    "Option<KeyboardButtonPollType>",
114950                )
114951                .build_type::<KeyboardButtonPollType>()
114952                .register_static_module(
114953                    "Option<KeyboardButtonPollType>",
114954                    exported_module!(KeyboardButtonPollTypeModule).into(),
114955                );
114956            engine
114957                .register_type_with_name::<Option<KeyboardButtonRequestChat>>(
114958                    "Option<KeyboardButtonRequestChat>",
114959                )
114960                .build_type::<KeyboardButtonRequestChat>()
114961                .register_static_module(
114962                    "Option<KeyboardButtonRequestChat>",
114963                    exported_module!(KeyboardButtonRequestChatModule).into(),
114964                );
114965            engine
114966                .register_type_with_name::<Option<KeyboardButtonRequestUsers>>(
114967                    "Option<KeyboardButtonRequestUsers>",
114968                )
114969                .build_type::<KeyboardButtonRequestUsers>()
114970                .register_static_module(
114971                    "Option<KeyboardButtonRequestUsers>",
114972                    exported_module!(KeyboardButtonRequestUsersModule).into(),
114973                );
114974            engine
114975                .register_type_with_name::<Option<String>>("Option<String>")
114976                .register_static_module("Option<String>", exported_module!(StringModule).into());
114977            engine
114978                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
114979                .build_type::<WebAppInfo>()
114980                .register_static_module(
114981                    "Option<WebAppInfo>",
114982                    exported_module!(WebAppInfoModule).into(),
114983                );
114984        }
114985    }
114986    #[cfg(feature = "rhai")]
114987    #[allow(unused_mut)]
114988    impl rhai::CustomType for KeyboardButton {
114989        fn build(mut builder: rhai::TypeBuilder<Self>) {
114990            builder.with_get("text", Self::rhai_get_text);
114991            builder.with_get("request_users", Self::rhai_get_request_users);
114992            builder.with_get("request_chat", Self::rhai_get_request_chat);
114993            builder.with_get("request_contact", Self::rhai_get_request_contact);
114994            builder.with_get("request_location", Self::rhai_get_request_location);
114995            builder.with_get("request_poll", Self::rhai_get_request_poll);
114996            builder.with_get("web_app", Self::rhai_get_web_app);
114997            builder.on_debug(|t| format!("{:?}", t));
114998            drop(builder);
114999        }
115000    }
115001    #[cfg(feature = "rhai")]
115002    impl SetupRhai for InlineQueryResultCachedMpeg4Gif {
115003        fn setup_rhai(engine: &mut rhai::Engine) {
115004            engine.build_type::<InlineQueryResultCachedMpeg4Gif>();
115005            engine
115006                .register_type_with_name::<Option<bool>>("Option<bool>")
115007                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115008            engine
115009                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
115010                .build_type::<CallbackGame>()
115011                .register_static_module(
115012                    "Option<CallbackGame>",
115013                    exported_module!(CallbackGameModule).into(),
115014                );
115015            engine
115016                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
115017                .build_type::<CopyTextButton>()
115018                .register_static_module(
115019                    "Option<CopyTextButton>",
115020                    exported_module!(CopyTextButtonModule).into(),
115021                );
115022            engine
115023                .register_type_with_name::<Option<InlineKeyboardButton>>(
115024                    "Option<InlineKeyboardButton>",
115025                )
115026                .build_type::<InlineKeyboardButton>()
115027                .register_static_module(
115028                    "Option<InlineKeyboardButton>",
115029                    exported_module!(InlineKeyboardButtonModule).into(),
115030                );
115031            engine
115032                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
115033                    "Option<InlineKeyboardMarkup>",
115034                )
115035                .build_type::<InlineKeyboardMarkup>()
115036                .register_static_module(
115037                    "Option<InlineKeyboardMarkup>",
115038                    exported_module!(InlineKeyboardMarkupModule).into(),
115039                );
115040            engine
115041                .register_type_with_name::<Option<InputMessageContent>>(
115042                    "Option<InputMessageContent>",
115043                )
115044                .register_static_module(
115045                    "Option<InputMessageContent>",
115046                    exported_module!(InputMessageContentModule).into(),
115047                );
115048            engine
115049                .register_type_with_name::<Option<i64>>("Option<i64>")
115050                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115051            engine
115052                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
115053                .build_type::<LoginUrl>()
115054                .register_static_module(
115055                    "Option<LoginUrl>",
115056                    exported_module!(LoginUrlModule).into(),
115057                );
115058            engine
115059                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
115060                .build_type::<MessageEntity>()
115061                .register_static_module(
115062                    "Option<MessageEntity>",
115063                    exported_module!(MessageEntityModule).into(),
115064                );
115065            engine
115066                .register_type_with_name::<Option<String>>("Option<String>")
115067                .register_static_module("Option<String>", exported_module!(StringModule).into());
115068            engine
115069                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
115070                    "Option<SwitchInlineQueryChosenChat>",
115071                )
115072                .build_type::<SwitchInlineQueryChosenChat>()
115073                .register_static_module(
115074                    "Option<SwitchInlineQueryChosenChat>",
115075                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
115076                );
115077            engine
115078                .register_type_with_name::<Option<User>>("Option<User>")
115079                .build_type::<User>()
115080                .register_static_module("Option<User>", exported_module!(UserModule).into());
115081            engine
115082                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
115083                .build_type::<WebAppInfo>()
115084                .register_static_module(
115085                    "Option<WebAppInfo>",
115086                    exported_module!(WebAppInfoModule).into(),
115087                );
115088        }
115089    }
115090    #[cfg(feature = "rhai")]
115091    #[allow(unused_mut)]
115092    impl rhai::CustomType for InlineQueryResultCachedMpeg4Gif {
115093        fn build(mut builder: rhai::TypeBuilder<Self>) {
115094            builder.with_get("tg_type", Self::rhai_get_tg_type);
115095            builder.with_get("id", Self::rhai_get_id);
115096            builder.with_get("mpeg_4_file_id", Self::rhai_get_mpeg_4_file_id);
115097            builder.with_get("title", Self::rhai_get_title);
115098            builder.with_get("caption", Self::rhai_get_caption);
115099            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
115100            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
115101            builder.with_get(
115102                "show_caption_above_media",
115103                Self::rhai_get_show_caption_above_media,
115104            );
115105            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
115106            builder.with_get(
115107                "input_message_content",
115108                Self::rhai_get_input_message_content,
115109            );
115110            builder.on_debug(|t| format!("{:?}", t));
115111            drop(builder);
115112        }
115113    }
115114    #[cfg(feature = "rhai")]
115115    impl SetupRhai for InputInvoiceMessageContent {
115116        fn setup_rhai(engine: &mut rhai::Engine) {
115117            engine.build_type::<InputInvoiceMessageContent>();
115118            engine
115119                .register_type_with_name::<Option<bool>>("Option<bool>")
115120                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115121            engine
115122                .register_type_with_name::<Option<i64>>("Option<i64>")
115123                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115124            engine
115125                .register_type_with_name::<Option<LabeledPrice>>("Option<LabeledPrice>")
115126                .build_type::<LabeledPrice>()
115127                .register_static_module(
115128                    "Option<LabeledPrice>",
115129                    exported_module!(LabeledPriceModule).into(),
115130                );
115131            engine
115132                .register_type_with_name::<Option<String>>("Option<String>")
115133                .register_static_module("Option<String>", exported_module!(StringModule).into());
115134        }
115135    }
115136    #[cfg(feature = "rhai")]
115137    #[allow(unused_mut)]
115138    impl rhai::CustomType for InputInvoiceMessageContent {
115139        fn build(mut builder: rhai::TypeBuilder<Self>) {
115140            builder.with_get("title", Self::rhai_get_title);
115141            builder.with_get("description", Self::rhai_get_description);
115142            builder.with_get("payload", Self::rhai_get_payload);
115143            builder.with_get("provider_token", Self::rhai_get_provider_token);
115144            builder.with_get("currency", Self::rhai_get_currency);
115145            builder.with_get("prices", Self::rhai_get_prices);
115146            builder.with_get("max_tip_amount", Self::rhai_get_max_tip_amount);
115147            builder.with_get(
115148                "suggested_tip_amounts",
115149                Self::rhai_get_suggested_tip_amounts,
115150            );
115151            builder.with_get("provider_data", Self::rhai_get_provider_data);
115152            builder.with_get("photo_url", Self::rhai_get_photo_url);
115153            builder.with_get("photo_size", Self::rhai_get_photo_size);
115154            builder.with_get("photo_width", Self::rhai_get_photo_width);
115155            builder.with_get("photo_height", Self::rhai_get_photo_height);
115156            builder.with_get("need_name", Self::rhai_get_need_name);
115157            builder.with_get("need_phone_number", Self::rhai_get_need_phone_number);
115158            builder.with_get("need_email", Self::rhai_get_need_email);
115159            builder.with_get(
115160                "need_shipping_address",
115161                Self::rhai_get_need_shipping_address,
115162            );
115163            builder.with_get(
115164                "send_phone_number_to_provider",
115165                Self::rhai_get_send_phone_number_to_provider,
115166            );
115167            builder.with_get(
115168                "send_email_to_provider",
115169                Self::rhai_get_send_email_to_provider,
115170            );
115171            builder.with_get("is_flexible", Self::rhai_get_is_flexible);
115172            builder.on_debug(|t| format!("{:?}", t));
115173            drop(builder);
115174        }
115175    }
115176    #[cfg(feature = "rhai")]
115177    impl SetupRhai for BusinessBotRights {
115178        fn setup_rhai(engine: &mut rhai::Engine) {
115179            engine.build_type::<BusinessBotRights>();
115180            engine
115181                .register_type_with_name::<Option<bool>>("Option<bool>")
115182                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115183        }
115184    }
115185    #[cfg(feature = "rhai")]
115186    #[allow(unused_mut)]
115187    impl rhai::CustomType for BusinessBotRights {
115188        fn build(mut builder: rhai::TypeBuilder<Self>) {
115189            builder.with_get("can_reply", Self::rhai_get_can_reply);
115190            builder.with_get("can_read_messages", Self::rhai_get_can_read_messages);
115191            builder.with_get(
115192                "can_delete_sent_messages",
115193                Self::rhai_get_can_delete_sent_messages,
115194            );
115195            builder.with_get(
115196                "can_delete_all_messages",
115197                Self::rhai_get_can_delete_all_messages,
115198            );
115199            builder.with_get("can_edit_name", Self::rhai_get_can_edit_name);
115200            builder.with_get("can_edit_bio", Self::rhai_get_can_edit_bio);
115201            builder.with_get(
115202                "can_edit_profile_photo",
115203                Self::rhai_get_can_edit_profile_photo,
115204            );
115205            builder.with_get("can_edit_username", Self::rhai_get_can_edit_username);
115206            builder.with_get(
115207                "can_change_gift_settings",
115208                Self::rhai_get_can_change_gift_settings,
115209            );
115210            builder.with_get(
115211                "can_view_gifts_and_stars",
115212                Self::rhai_get_can_view_gifts_and_stars,
115213            );
115214            builder.with_get(
115215                "can_convert_gifts_to_stars",
115216                Self::rhai_get_can_convert_gifts_to_stars,
115217            );
115218            builder.with_get(
115219                "can_transfer_and_upgrade_gifts",
115220                Self::rhai_get_can_transfer_and_upgrade_gifts,
115221            );
115222            builder.with_get("can_transfer_stars", Self::rhai_get_can_transfer_stars);
115223            builder.with_get("can_manage_stories", Self::rhai_get_can_manage_stories);
115224            builder.on_debug(|t| format!("{:?}", t));
115225            drop(builder);
115226        }
115227    }
115228    #[cfg(feature = "rhai")]
115229    impl SetupRhai for InputStoryContentPhoto {
115230        fn setup_rhai(engine: &mut rhai::Engine) {
115231            engine.build_type::<InputStoryContentPhoto>();
115232            engine
115233                .register_type_with_name::<Option<String>>("Option<String>")
115234                .register_static_module("Option<String>", exported_module!(StringModule).into());
115235        }
115236    }
115237    #[cfg(feature = "rhai")]
115238    #[allow(unused_mut)]
115239    impl rhai::CustomType for InputStoryContentPhoto {
115240        fn build(mut builder: rhai::TypeBuilder<Self>) {
115241            builder.with_get("tg_type", Self::rhai_get_tg_type);
115242            builder.with_get("photo", Self::rhai_get_photo);
115243            builder.on_debug(|t| format!("{:?}", t));
115244            drop(builder);
115245        }
115246    }
115247    #[cfg(feature = "rhai")]
115248    impl SetupRhai for InputVenueMessageContent {
115249        fn setup_rhai(engine: &mut rhai::Engine) {
115250            engine.build_type::<InputVenueMessageContent>();
115251            engine
115252                .register_type_with_name::<Option<f64>>("Option<f64>")
115253                .register_static_module("Option<f64>", exported_module!(f64Module).into());
115254            engine
115255                .register_type_with_name::<Option<String>>("Option<String>")
115256                .register_static_module("Option<String>", exported_module!(StringModule).into());
115257        }
115258    }
115259    #[cfg(feature = "rhai")]
115260    #[allow(unused_mut)]
115261    impl rhai::CustomType for InputVenueMessageContent {
115262        fn build(mut builder: rhai::TypeBuilder<Self>) {
115263            builder.with_get("latitude", Self::rhai_get_latitude);
115264            builder.with_get("longitude", Self::rhai_get_longitude);
115265            builder.with_get("title", Self::rhai_get_title);
115266            builder.with_get("address", Self::rhai_get_address);
115267            builder.with_get("foursquare_id", Self::rhai_get_foursquare_id);
115268            builder.with_get("foursquare_type", Self::rhai_get_foursquare_type);
115269            builder.with_get("google_place_id", Self::rhai_get_google_place_id);
115270            builder.with_get("google_place_type", Self::rhai_get_google_place_type);
115271            builder.on_debug(|t| format!("{:?}", t));
115272            drop(builder);
115273        }
115274    }
115275    #[cfg(feature = "rhai")]
115276    impl SetupRhai for UniqueGiftSymbol {
115277        fn setup_rhai(engine: &mut rhai::Engine) {
115278            engine.build_type::<UniqueGiftSymbol>();
115279            engine
115280                .register_type_with_name::<Option<bool>>("Option<bool>")
115281                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115282            engine
115283                .register_type_with_name::<Option<File>>("Option<File>")
115284                .build_type::<File>()
115285                .register_static_module("Option<File>", exported_module!(FileModule).into());
115286            engine
115287                .register_type_with_name::<Option<f64>>("Option<f64>")
115288                .register_static_module("Option<f64>", exported_module!(f64Module).into());
115289            engine
115290                .register_type_with_name::<Option<i64>>("Option<i64>")
115291                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115292            engine
115293                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
115294                .build_type::<MaskPosition>()
115295                .register_static_module(
115296                    "Option<MaskPosition>",
115297                    exported_module!(MaskPositionModule).into(),
115298                );
115299            engine
115300                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
115301                .build_type::<PhotoSize>()
115302                .register_static_module(
115303                    "Option<PhotoSize>",
115304                    exported_module!(PhotoSizeModule).into(),
115305                );
115306            engine
115307                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
115308                .build_type::<Sticker>()
115309                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
115310            engine
115311                .register_type_with_name::<Option<String>>("Option<String>")
115312                .register_static_module("Option<String>", exported_module!(StringModule).into());
115313        }
115314    }
115315    #[cfg(feature = "rhai")]
115316    #[allow(unused_mut)]
115317    impl rhai::CustomType for UniqueGiftSymbol {
115318        fn build(mut builder: rhai::TypeBuilder<Self>) {
115319            builder.with_get("name", Self::rhai_get_name);
115320            builder.with_get("sticker", Self::rhai_get_sticker);
115321            builder.with_get("rarity_per_mille", Self::rhai_get_rarity_per_mille);
115322            builder.on_debug(|t| format!("{:?}", t));
115323            drop(builder);
115324        }
115325    }
115326    #[cfg(feature = "rhai")]
115327    impl SetupRhai for InputChecklistTask {
115328        fn setup_rhai(engine: &mut rhai::Engine) {
115329            engine.build_type::<InputChecklistTask>();
115330            engine
115331                .register_type_with_name::<Option<bool>>("Option<bool>")
115332                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115333            engine
115334                .register_type_with_name::<Option<i64>>("Option<i64>")
115335                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115336            engine
115337                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
115338                .build_type::<MessageEntity>()
115339                .register_static_module(
115340                    "Option<MessageEntity>",
115341                    exported_module!(MessageEntityModule).into(),
115342                );
115343            engine
115344                .register_type_with_name::<Option<String>>("Option<String>")
115345                .register_static_module("Option<String>", exported_module!(StringModule).into());
115346            engine
115347                .register_type_with_name::<Option<User>>("Option<User>")
115348                .build_type::<User>()
115349                .register_static_module("Option<User>", exported_module!(UserModule).into());
115350        }
115351    }
115352    #[cfg(feature = "rhai")]
115353    #[allow(unused_mut)]
115354    impl rhai::CustomType for InputChecklistTask {
115355        fn build(mut builder: rhai::TypeBuilder<Self>) {
115356            builder.with_get("id", Self::rhai_get_id);
115357            builder.with_get("text", Self::rhai_get_text);
115358            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
115359            builder.with_get("text_entities", Self::rhai_get_text_entities);
115360            builder.on_debug(|t| format!("{:?}", t));
115361            drop(builder);
115362        }
115363    }
115364    #[cfg(feature = "rhai")]
115365    impl SetupRhai for PaidMessagePriceChanged {
115366        fn setup_rhai(engine: &mut rhai::Engine) {
115367            engine.build_type::<PaidMessagePriceChanged>();
115368            engine
115369                .register_type_with_name::<Option<i64>>("Option<i64>")
115370                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115371        }
115372    }
115373    #[cfg(feature = "rhai")]
115374    #[allow(unused_mut)]
115375    impl rhai::CustomType for PaidMessagePriceChanged {
115376        fn build(mut builder: rhai::TypeBuilder<Self>) {
115377            builder.with_get(
115378                "paid_message_star_count",
115379                Self::rhai_get_paid_message_star_count,
115380            );
115381            builder.on_debug(|t| format!("{:?}", t));
115382            drop(builder);
115383        }
115384    }
115385    #[cfg(feature = "rhai")]
115386    impl SetupRhai for MessageReactionCountUpdated {
115387        fn setup_rhai(engine: &mut rhai::Engine) {
115388            engine.build_type::<MessageReactionCountUpdated>();
115389            engine
115390                .register_type_with_name::<Option<bool>>("Option<bool>")
115391                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115392            engine
115393                .register_type_with_name::<Option<Chat>>("Option<Chat>")
115394                .build_type::<Chat>()
115395                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
115396            engine
115397                .register_type_with_name::<Option<i64>>("Option<i64>")
115398                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115399            engine
115400                .register_type_with_name::<Option<ReactionCount>>("Option<ReactionCount>")
115401                .build_type::<ReactionCount>()
115402                .register_static_module(
115403                    "Option<ReactionCount>",
115404                    exported_module!(ReactionCountModule).into(),
115405                );
115406            engine
115407                .register_type_with_name::<Option<ReactionType>>("Option<ReactionType>")
115408                .register_static_module(
115409                    "Option<ReactionType>",
115410                    exported_module!(ReactionTypeModule).into(),
115411                );
115412            engine
115413                .register_type_with_name::<Option<String>>("Option<String>")
115414                .register_static_module("Option<String>", exported_module!(StringModule).into());
115415        }
115416    }
115417    #[cfg(feature = "rhai")]
115418    #[allow(unused_mut)]
115419    impl rhai::CustomType for MessageReactionCountUpdated {
115420        fn build(mut builder: rhai::TypeBuilder<Self>) {
115421            builder.with_get("chat", Self::rhai_get_chat);
115422            builder.with_get("message_id", Self::rhai_get_message_id);
115423            builder.with_get("date", Self::rhai_get_date);
115424            builder.with_get("reactions", Self::rhai_get_reactions);
115425            builder.on_debug(|t| format!("{:?}", t));
115426            drop(builder);
115427        }
115428    }
115429    #[cfg(feature = "rhai")]
115430    impl SetupRhai for Location {
115431        fn setup_rhai(engine: &mut rhai::Engine) {
115432            engine.build_type::<Location>();
115433            engine
115434                .register_type_with_name::<Option<f64>>("Option<f64>")
115435                .register_static_module("Option<f64>", exported_module!(f64Module).into());
115436            engine
115437                .register_type_with_name::<Option<i64>>("Option<i64>")
115438                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115439        }
115440    }
115441    #[cfg(feature = "rhai")]
115442    #[allow(unused_mut)]
115443    impl rhai::CustomType for Location {
115444        fn build(mut builder: rhai::TypeBuilder<Self>) {
115445            builder.with_get("latitude", Self::rhai_get_latitude);
115446            builder.with_get("longitude", Self::rhai_get_longitude);
115447            builder.with_get("horizontal_accuracy", Self::rhai_get_horizontal_accuracy);
115448            builder.with_get("live_period", Self::rhai_get_live_period);
115449            builder.with_get("heading", Self::rhai_get_heading);
115450            builder.with_get(
115451                "proximity_alert_radius",
115452                Self::rhai_get_proximity_alert_radius,
115453            );
115454            builder.on_debug(|t| format!("{:?}", t));
115455            drop(builder);
115456        }
115457    }
115458    #[cfg(feature = "rhai")]
115459    impl SetupRhai for GameHighScore {
115460        fn setup_rhai(engine: &mut rhai::Engine) {
115461            engine.build_type::<GameHighScore>();
115462            engine
115463                .register_type_with_name::<Option<bool>>("Option<bool>")
115464                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115465            engine
115466                .register_type_with_name::<Option<i64>>("Option<i64>")
115467                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115468            engine
115469                .register_type_with_name::<Option<String>>("Option<String>")
115470                .register_static_module("Option<String>", exported_module!(StringModule).into());
115471            engine
115472                .register_type_with_name::<Option<User>>("Option<User>")
115473                .build_type::<User>()
115474                .register_static_module("Option<User>", exported_module!(UserModule).into());
115475        }
115476    }
115477    #[cfg(feature = "rhai")]
115478    #[allow(unused_mut)]
115479    impl rhai::CustomType for GameHighScore {
115480        fn build(mut builder: rhai::TypeBuilder<Self>) {
115481            builder.with_get("position", Self::rhai_get_position);
115482            builder.with_get("user", Self::rhai_get_user);
115483            builder.with_get("score", Self::rhai_get_score);
115484            builder.on_debug(|t| format!("{:?}", t));
115485            drop(builder);
115486        }
115487    }
115488    #[cfg(feature = "rhai")]
115489    impl SetupRhai for MessageReactionUpdated {
115490        fn setup_rhai(engine: &mut rhai::Engine) {
115491            engine.build_type::<MessageReactionUpdated>();
115492            engine
115493                .register_type_with_name::<Option<bool>>("Option<bool>")
115494                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115495            engine
115496                .register_type_with_name::<Option<Chat>>("Option<Chat>")
115497                .build_type::<Chat>()
115498                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
115499            engine
115500                .register_type_with_name::<Option<i64>>("Option<i64>")
115501                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115502            engine
115503                .register_type_with_name::<Option<ReactionType>>("Option<ReactionType>")
115504                .register_static_module(
115505                    "Option<ReactionType>",
115506                    exported_module!(ReactionTypeModule).into(),
115507                );
115508            engine
115509                .register_type_with_name::<Option<String>>("Option<String>")
115510                .register_static_module("Option<String>", exported_module!(StringModule).into());
115511            engine
115512                .register_type_with_name::<Option<User>>("Option<User>")
115513                .build_type::<User>()
115514                .register_static_module("Option<User>", exported_module!(UserModule).into());
115515        }
115516    }
115517    #[cfg(feature = "rhai")]
115518    #[allow(unused_mut)]
115519    impl rhai::CustomType for MessageReactionUpdated {
115520        fn build(mut builder: rhai::TypeBuilder<Self>) {
115521            builder.with_get("chat", Self::rhai_get_chat);
115522            builder.with_get("message_id", Self::rhai_get_message_id);
115523            builder.with_get("user", Self::rhai_get_user);
115524            builder.with_get("actor_chat", Self::rhai_get_actor_chat);
115525            builder.with_get("date", Self::rhai_get_date);
115526            builder.with_get("old_reaction", Self::rhai_get_old_reaction);
115527            builder.with_get("new_reaction", Self::rhai_get_new_reaction);
115528            builder.on_debug(|t| format!("{:?}", t));
115529            drop(builder);
115530        }
115531    }
115532    #[cfg(feature = "rhai")]
115533    impl SetupRhai for SuccessfulPayment {
115534        fn setup_rhai(engine: &mut rhai::Engine) {
115535            engine.build_type::<SuccessfulPayment>();
115536            engine
115537                .register_type_with_name::<Option<bool>>("Option<bool>")
115538                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115539            engine
115540                .register_type_with_name::<Option<i64>>("Option<i64>")
115541                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115542            engine
115543                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
115544                .build_type::<OrderInfo>()
115545                .register_static_module(
115546                    "Option<OrderInfo>",
115547                    exported_module!(OrderInfoModule).into(),
115548                );
115549            engine
115550                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
115551                .build_type::<ShippingAddress>()
115552                .register_static_module(
115553                    "Option<ShippingAddress>",
115554                    exported_module!(ShippingAddressModule).into(),
115555                );
115556            engine
115557                .register_type_with_name::<Option<String>>("Option<String>")
115558                .register_static_module("Option<String>", exported_module!(StringModule).into());
115559        }
115560    }
115561    #[cfg(feature = "rhai")]
115562    #[allow(unused_mut)]
115563    impl rhai::CustomType for SuccessfulPayment {
115564        fn build(mut builder: rhai::TypeBuilder<Self>) {
115565            builder.with_get("currency", Self::rhai_get_currency);
115566            builder.with_get("total_amount", Self::rhai_get_total_amount);
115567            builder.with_get("invoice_payload", Self::rhai_get_invoice_payload);
115568            builder.with_get(
115569                "subscription_expiration_date",
115570                Self::rhai_get_subscription_expiration_date,
115571            );
115572            builder.with_get("is_recurring", Self::rhai_get_is_recurring);
115573            builder.with_get("is_first_recurring", Self::rhai_get_is_first_recurring);
115574            builder.with_get("shipping_option_id", Self::rhai_get_shipping_option_id);
115575            builder.with_get("order_info", Self::rhai_get_order_info);
115576            builder.with_get(
115577                "telegram_payment_charge_id",
115578                Self::rhai_get_telegram_payment_charge_id,
115579            );
115580            builder.with_get(
115581                "provider_payment_charge_id",
115582                Self::rhai_get_provider_payment_charge_id,
115583            );
115584            builder.on_debug(|t| format!("{:?}", t));
115585            drop(builder);
115586        }
115587    }
115588    #[cfg(feature = "rhai")]
115589    impl SetupRhai for InlineQueryResultDocument {
115590        fn setup_rhai(engine: &mut rhai::Engine) {
115591            engine.build_type::<InlineQueryResultDocument>();
115592            engine
115593                .register_type_with_name::<Option<bool>>("Option<bool>")
115594                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115595            engine
115596                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
115597                .build_type::<CallbackGame>()
115598                .register_static_module(
115599                    "Option<CallbackGame>",
115600                    exported_module!(CallbackGameModule).into(),
115601                );
115602            engine
115603                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
115604                .build_type::<CopyTextButton>()
115605                .register_static_module(
115606                    "Option<CopyTextButton>",
115607                    exported_module!(CopyTextButtonModule).into(),
115608                );
115609            engine
115610                .register_type_with_name::<Option<InlineKeyboardButton>>(
115611                    "Option<InlineKeyboardButton>",
115612                )
115613                .build_type::<InlineKeyboardButton>()
115614                .register_static_module(
115615                    "Option<InlineKeyboardButton>",
115616                    exported_module!(InlineKeyboardButtonModule).into(),
115617                );
115618            engine
115619                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
115620                    "Option<InlineKeyboardMarkup>",
115621                )
115622                .build_type::<InlineKeyboardMarkup>()
115623                .register_static_module(
115624                    "Option<InlineKeyboardMarkup>",
115625                    exported_module!(InlineKeyboardMarkupModule).into(),
115626                );
115627            engine
115628                .register_type_with_name::<Option<InputMessageContent>>(
115629                    "Option<InputMessageContent>",
115630                )
115631                .register_static_module(
115632                    "Option<InputMessageContent>",
115633                    exported_module!(InputMessageContentModule).into(),
115634                );
115635            engine
115636                .register_type_with_name::<Option<i64>>("Option<i64>")
115637                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115638            engine
115639                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
115640                .build_type::<LoginUrl>()
115641                .register_static_module(
115642                    "Option<LoginUrl>",
115643                    exported_module!(LoginUrlModule).into(),
115644                );
115645            engine
115646                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
115647                .build_type::<MessageEntity>()
115648                .register_static_module(
115649                    "Option<MessageEntity>",
115650                    exported_module!(MessageEntityModule).into(),
115651                );
115652            engine
115653                .register_type_with_name::<Option<String>>("Option<String>")
115654                .register_static_module("Option<String>", exported_module!(StringModule).into());
115655            engine
115656                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
115657                    "Option<SwitchInlineQueryChosenChat>",
115658                )
115659                .build_type::<SwitchInlineQueryChosenChat>()
115660                .register_static_module(
115661                    "Option<SwitchInlineQueryChosenChat>",
115662                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
115663                );
115664            engine
115665                .register_type_with_name::<Option<User>>("Option<User>")
115666                .build_type::<User>()
115667                .register_static_module("Option<User>", exported_module!(UserModule).into());
115668            engine
115669                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
115670                .build_type::<WebAppInfo>()
115671                .register_static_module(
115672                    "Option<WebAppInfo>",
115673                    exported_module!(WebAppInfoModule).into(),
115674                );
115675        }
115676    }
115677    #[cfg(feature = "rhai")]
115678    #[allow(unused_mut)]
115679    impl rhai::CustomType for InlineQueryResultDocument {
115680        fn build(mut builder: rhai::TypeBuilder<Self>) {
115681            builder.with_get("tg_type", Self::rhai_get_tg_type);
115682            builder.with_get("id", Self::rhai_get_id);
115683            builder.with_get("title", Self::rhai_get_title);
115684            builder.with_get("caption", Self::rhai_get_caption);
115685            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
115686            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
115687            builder.with_get("document_url", Self::rhai_get_document_url);
115688            builder.with_get("mime_type", Self::rhai_get_mime_type);
115689            builder.with_get("description", Self::rhai_get_description);
115690            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
115691            builder.with_get(
115692                "input_message_content",
115693                Self::rhai_get_input_message_content,
115694            );
115695            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
115696            builder.with_get("thumbnail_width", Self::rhai_get_thumbnail_width);
115697            builder.with_get("thumbnail_height", Self::rhai_get_thumbnail_height);
115698            builder.on_debug(|t| format!("{:?}", t));
115699            drop(builder);
115700        }
115701    }
115702    #[cfg(feature = "rhai")]
115703    impl SetupRhai for SuggestedPostApproved {
115704        fn setup_rhai(engine: &mut rhai::Engine) {
115705            engine.build_type::<SuggestedPostApproved>();
115706            engine
115707                .register_type_with_name::<Option<Animation>>("Option<Animation>")
115708                .build_type::<Animation>()
115709                .register_static_module(
115710                    "Option<Animation>",
115711                    exported_module!(AnimationModule).into(),
115712                );
115713            engine
115714                .register_type_with_name::<Option<Audio>>("Option<Audio>")
115715                .build_type::<Audio>()
115716                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
115717            engine
115718                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
115719                .register_static_module(
115720                    "Option<BackgroundType>",
115721                    exported_module!(BackgroundTypeModule).into(),
115722                );
115723            engine
115724                .register_type_with_name::<Option<bool>>("Option<bool>")
115725                .register_static_module("Option<bool>", exported_module!(boolModule).into());
115726            engine
115727                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
115728                .build_type::<CallbackGame>()
115729                .register_static_module(
115730                    "Option<CallbackGame>",
115731                    exported_module!(CallbackGameModule).into(),
115732                );
115733            engine
115734                .register_type_with_name::<Option<Chat>>("Option<Chat>")
115735                .build_type::<Chat>()
115736                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
115737            engine
115738                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
115739                .build_type::<ChatBackground>()
115740                .register_static_module(
115741                    "Option<ChatBackground>",
115742                    exported_module!(ChatBackgroundModule).into(),
115743                );
115744            engine
115745                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
115746                .build_type::<ChatBoostAdded>()
115747                .register_static_module(
115748                    "Option<ChatBoostAdded>",
115749                    exported_module!(ChatBoostAddedModule).into(),
115750                );
115751            engine
115752                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
115753                .build_type::<ChatShared>()
115754                .register_static_module(
115755                    "Option<ChatShared>",
115756                    exported_module!(ChatSharedModule).into(),
115757                );
115758            engine
115759                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
115760                .build_type::<Checklist>()
115761                .register_static_module(
115762                    "Option<Checklist>",
115763                    exported_module!(ChecklistModule).into(),
115764                );
115765            engine
115766                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
115767                .build_type::<ChecklistTask>()
115768                .register_static_module(
115769                    "Option<ChecklistTask>",
115770                    exported_module!(ChecklistTaskModule).into(),
115771                );
115772            engine
115773                .register_type_with_name::<Option<ChecklistTasksAdded>>(
115774                    "Option<ChecklistTasksAdded>",
115775                )
115776                .build_type::<ChecklistTasksAdded>()
115777                .register_static_module(
115778                    "Option<ChecklistTasksAdded>",
115779                    exported_module!(ChecklistTasksAddedModule).into(),
115780                );
115781            engine
115782                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
115783                .build_type::<ChecklistTasksDone>()
115784                .register_static_module(
115785                    "Option<ChecklistTasksDone>",
115786                    exported_module!(ChecklistTasksDoneModule).into(),
115787                );
115788            engine
115789                .register_type_with_name::<Option<Contact>>("Option<Contact>")
115790                .build_type::<Contact>()
115791                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
115792            engine
115793                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
115794                .build_type::<CopyTextButton>()
115795                .register_static_module(
115796                    "Option<CopyTextButton>",
115797                    exported_module!(CopyTextButtonModule).into(),
115798                );
115799            engine
115800                .register_type_with_name::<Option<Dice>>("Option<Dice>")
115801                .build_type::<Dice>()
115802                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
115803            engine
115804                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
115805                    "Option<DirectMessagePriceChanged>",
115806                )
115807                .build_type::<DirectMessagePriceChanged>()
115808                .register_static_module(
115809                    "Option<DirectMessagePriceChanged>",
115810                    exported_module!(DirectMessagePriceChangedModule).into(),
115811                );
115812            engine
115813                .register_type_with_name::<Option<DirectMessagesTopic>>(
115814                    "Option<DirectMessagesTopic>",
115815                )
115816                .build_type::<DirectMessagesTopic>()
115817                .register_static_module(
115818                    "Option<DirectMessagesTopic>",
115819                    exported_module!(DirectMessagesTopicModule).into(),
115820                );
115821            engine
115822                .register_type_with_name::<Option<Document>>("Option<Document>")
115823                .build_type::<Document>()
115824                .register_static_module(
115825                    "Option<Document>",
115826                    exported_module!(DocumentModule).into(),
115827                );
115828            engine
115829                .register_type_with_name::<Option<EncryptedCredentials>>(
115830                    "Option<EncryptedCredentials>",
115831                )
115832                .build_type::<EncryptedCredentials>()
115833                .register_static_module(
115834                    "Option<EncryptedCredentials>",
115835                    exported_module!(EncryptedCredentialsModule).into(),
115836                );
115837            engine
115838                .register_type_with_name::<Option<EncryptedPassportElement>>(
115839                    "Option<EncryptedPassportElement>",
115840                )
115841                .build_type::<EncryptedPassportElement>()
115842                .register_static_module(
115843                    "Option<EncryptedPassportElement>",
115844                    exported_module!(EncryptedPassportElementModule).into(),
115845                );
115846            engine
115847                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
115848                .build_type::<ExternalReplyInfo>()
115849                .register_static_module(
115850                    "Option<ExternalReplyInfo>",
115851                    exported_module!(ExternalReplyInfoModule).into(),
115852                );
115853            engine
115854                .register_type_with_name::<Option<File>>("Option<File>")
115855                .build_type::<File>()
115856                .register_static_module("Option<File>", exported_module!(FileModule).into());
115857            engine
115858                .register_type_with_name::<Option<f64>>("Option<f64>")
115859                .register_static_module("Option<f64>", exported_module!(f64Module).into());
115860            engine
115861                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
115862                .build_type::<ForumTopicClosed>()
115863                .register_static_module(
115864                    "Option<ForumTopicClosed>",
115865                    exported_module!(ForumTopicClosedModule).into(),
115866                );
115867            engine
115868                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
115869                .build_type::<ForumTopicCreated>()
115870                .register_static_module(
115871                    "Option<ForumTopicCreated>",
115872                    exported_module!(ForumTopicCreatedModule).into(),
115873                );
115874            engine
115875                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
115876                .build_type::<ForumTopicEdited>()
115877                .register_static_module(
115878                    "Option<ForumTopicEdited>",
115879                    exported_module!(ForumTopicEditedModule).into(),
115880                );
115881            engine
115882                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
115883                .build_type::<ForumTopicReopened>()
115884                .register_static_module(
115885                    "Option<ForumTopicReopened>",
115886                    exported_module!(ForumTopicReopenedModule).into(),
115887                );
115888            engine
115889                .register_type_with_name::<Option<Game>>("Option<Game>")
115890                .build_type::<Game>()
115891                .register_static_module("Option<Game>", exported_module!(GameModule).into());
115892            engine
115893                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
115894                    "Option<GeneralForumTopicHidden>",
115895                )
115896                .build_type::<GeneralForumTopicHidden>()
115897                .register_static_module(
115898                    "Option<GeneralForumTopicHidden>",
115899                    exported_module!(GeneralForumTopicHiddenModule).into(),
115900                );
115901            engine
115902                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
115903                    "Option<GeneralForumTopicUnhidden>",
115904                )
115905                .build_type::<GeneralForumTopicUnhidden>()
115906                .register_static_module(
115907                    "Option<GeneralForumTopicUnhidden>",
115908                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
115909                );
115910            engine
115911                .register_type_with_name::<Option<Gift>>("Option<Gift>")
115912                .build_type::<Gift>()
115913                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
115914            engine
115915                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
115916                .build_type::<GiftInfo>()
115917                .register_static_module(
115918                    "Option<GiftInfo>",
115919                    exported_module!(GiftInfoModule).into(),
115920                );
115921            engine
115922                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
115923                .build_type::<Giveaway>()
115924                .register_static_module(
115925                    "Option<Giveaway>",
115926                    exported_module!(GiveawayModule).into(),
115927                );
115928            engine
115929                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
115930                .build_type::<GiveawayCompleted>()
115931                .register_static_module(
115932                    "Option<GiveawayCompleted>",
115933                    exported_module!(GiveawayCompletedModule).into(),
115934                );
115935            engine
115936                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
115937                .build_type::<GiveawayCreated>()
115938                .register_static_module(
115939                    "Option<GiveawayCreated>",
115940                    exported_module!(GiveawayCreatedModule).into(),
115941                );
115942            engine
115943                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
115944                .build_type::<GiveawayWinners>()
115945                .register_static_module(
115946                    "Option<GiveawayWinners>",
115947                    exported_module!(GiveawayWinnersModule).into(),
115948                );
115949            engine
115950                .register_type_with_name::<Option<InlineKeyboardButton>>(
115951                    "Option<InlineKeyboardButton>",
115952                )
115953                .build_type::<InlineKeyboardButton>()
115954                .register_static_module(
115955                    "Option<InlineKeyboardButton>",
115956                    exported_module!(InlineKeyboardButtonModule).into(),
115957                );
115958            engine
115959                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
115960                    "Option<InlineKeyboardMarkup>",
115961                )
115962                .build_type::<InlineKeyboardMarkup>()
115963                .register_static_module(
115964                    "Option<InlineKeyboardMarkup>",
115965                    exported_module!(InlineKeyboardMarkupModule).into(),
115966                );
115967            engine
115968                .register_type_with_name::<Option<i64>>("Option<i64>")
115969                .register_static_module("Option<i64>", exported_module!(i64Module).into());
115970            engine
115971                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
115972                .build_type::<Invoice>()
115973                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
115974            engine
115975                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
115976                .build_type::<LinkPreviewOptions>()
115977                .register_static_module(
115978                    "Option<LinkPreviewOptions>",
115979                    exported_module!(LinkPreviewOptionsModule).into(),
115980                );
115981            engine
115982                .register_type_with_name::<Option<Location>>("Option<Location>")
115983                .build_type::<Location>()
115984                .register_static_module(
115985                    "Option<Location>",
115986                    exported_module!(LocationModule).into(),
115987                );
115988            engine
115989                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
115990                .build_type::<LoginUrl>()
115991                .register_static_module(
115992                    "Option<LoginUrl>",
115993                    exported_module!(LoginUrlModule).into(),
115994                );
115995            engine
115996                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
115997                .build_type::<MaskPosition>()
115998                .register_static_module(
115999                    "Option<MaskPosition>",
116000                    exported_module!(MaskPositionModule).into(),
116001                );
116002            engine
116003                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
116004                    "Option<MaybeInaccessibleMessage>",
116005                )
116006                .register_static_module(
116007                    "Option<MaybeInaccessibleMessage>",
116008                    exported_module!(MaybeInaccessibleMessageModule).into(),
116009                );
116010            engine
116011                .register_type_with_name::<Option<Message>>("Option<Message>")
116012                .build_type::<Message>()
116013                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
116014            engine
116015                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
116016                    "Option<MessageAutoDeleteTimerChanged>",
116017                )
116018                .build_type::<MessageAutoDeleteTimerChanged>()
116019                .register_static_module(
116020                    "Option<MessageAutoDeleteTimerChanged>",
116021                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
116022                );
116023            engine
116024                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
116025                .build_type::<MessageEntity>()
116026                .register_static_module(
116027                    "Option<MessageEntity>",
116028                    exported_module!(MessageEntityModule).into(),
116029                );
116030            engine
116031                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
116032                .register_static_module(
116033                    "Option<MessageOrigin>",
116034                    exported_module!(MessageOriginModule).into(),
116035                );
116036            engine
116037                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
116038                .build_type::<OrderInfo>()
116039                .register_static_module(
116040                    "Option<OrderInfo>",
116041                    exported_module!(OrderInfoModule).into(),
116042                );
116043            engine
116044                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
116045                .register_static_module(
116046                    "Option<PaidMedia>",
116047                    exported_module!(PaidMediaModule).into(),
116048                );
116049            engine
116050                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
116051                .build_type::<PaidMediaInfo>()
116052                .register_static_module(
116053                    "Option<PaidMediaInfo>",
116054                    exported_module!(PaidMediaInfoModule).into(),
116055                );
116056            engine
116057                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
116058                    "Option<PaidMessagePriceChanged>",
116059                )
116060                .build_type::<PaidMessagePriceChanged>()
116061                .register_static_module(
116062                    "Option<PaidMessagePriceChanged>",
116063                    exported_module!(PaidMessagePriceChangedModule).into(),
116064                );
116065            engine
116066                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
116067                .build_type::<PassportData>()
116068                .register_static_module(
116069                    "Option<PassportData>",
116070                    exported_module!(PassportDataModule).into(),
116071                );
116072            engine
116073                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
116074                .build_type::<PassportFile>()
116075                .register_static_module(
116076                    "Option<PassportFile>",
116077                    exported_module!(PassportFileModule).into(),
116078                );
116079            engine
116080                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
116081                .build_type::<PhotoSize>()
116082                .register_static_module(
116083                    "Option<PhotoSize>",
116084                    exported_module!(PhotoSizeModule).into(),
116085                );
116086            engine
116087                .register_type_with_name::<Option<Poll>>("Option<Poll>")
116088                .build_type::<Poll>()
116089                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
116090            engine
116091                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
116092                .build_type::<PollOption>()
116093                .register_static_module(
116094                    "Option<PollOption>",
116095                    exported_module!(PollOptionModule).into(),
116096                );
116097            engine
116098                .register_type_with_name::<Option<ProximityAlertTriggered>>(
116099                    "Option<ProximityAlertTriggered>",
116100                )
116101                .build_type::<ProximityAlertTriggered>()
116102                .register_static_module(
116103                    "Option<ProximityAlertTriggered>",
116104                    exported_module!(ProximityAlertTriggeredModule).into(),
116105                );
116106            engine
116107                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
116108                .build_type::<RefundedPayment>()
116109                .register_static_module(
116110                    "Option<RefundedPayment>",
116111                    exported_module!(RefundedPaymentModule).into(),
116112                );
116113            engine
116114                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
116115                .build_type::<SharedUser>()
116116                .register_static_module(
116117                    "Option<SharedUser>",
116118                    exported_module!(SharedUserModule).into(),
116119                );
116120            engine
116121                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
116122                .build_type::<ShippingAddress>()
116123                .register_static_module(
116124                    "Option<ShippingAddress>",
116125                    exported_module!(ShippingAddressModule).into(),
116126                );
116127            engine
116128                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
116129                .build_type::<StarAmount>()
116130                .register_static_module(
116131                    "Option<StarAmount>",
116132                    exported_module!(StarAmountModule).into(),
116133                );
116134            engine
116135                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
116136                .build_type::<Sticker>()
116137                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
116138            engine
116139                .register_type_with_name::<Option<Story>>("Option<Story>")
116140                .build_type::<Story>()
116141                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
116142            engine
116143                .register_type_with_name::<Option<String>>("Option<String>")
116144                .register_static_module("Option<String>", exported_module!(StringModule).into());
116145            engine
116146                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
116147                .build_type::<SuccessfulPayment>()
116148                .register_static_module(
116149                    "Option<SuccessfulPayment>",
116150                    exported_module!(SuccessfulPaymentModule).into(),
116151                );
116152            engine
116153                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
116154                    "Option<SuggestedPostApprovalFailed>",
116155                )
116156                .build_type::<SuggestedPostApprovalFailed>()
116157                .register_static_module(
116158                    "Option<SuggestedPostApprovalFailed>",
116159                    exported_module!(SuggestedPostApprovalFailedModule).into(),
116160                );
116161            engine
116162                .register_type_with_name::<Option<SuggestedPostApproved>>(
116163                    "Option<SuggestedPostApproved>",
116164                )
116165                .build_type::<SuggestedPostApproved>()
116166                .register_static_module(
116167                    "Option<SuggestedPostApproved>",
116168                    exported_module!(SuggestedPostApprovedModule).into(),
116169                );
116170            engine
116171                .register_type_with_name::<Option<SuggestedPostDeclined>>(
116172                    "Option<SuggestedPostDeclined>",
116173                )
116174                .build_type::<SuggestedPostDeclined>()
116175                .register_static_module(
116176                    "Option<SuggestedPostDeclined>",
116177                    exported_module!(SuggestedPostDeclinedModule).into(),
116178                );
116179            engine
116180                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
116181                .build_type::<SuggestedPostInfo>()
116182                .register_static_module(
116183                    "Option<SuggestedPostInfo>",
116184                    exported_module!(SuggestedPostInfoModule).into(),
116185                );
116186            engine
116187                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
116188                .build_type::<SuggestedPostPaid>()
116189                .register_static_module(
116190                    "Option<SuggestedPostPaid>",
116191                    exported_module!(SuggestedPostPaidModule).into(),
116192                );
116193            engine
116194                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
116195                .build_type::<SuggestedPostPrice>()
116196                .register_static_module(
116197                    "Option<SuggestedPostPrice>",
116198                    exported_module!(SuggestedPostPriceModule).into(),
116199                );
116200            engine
116201                .register_type_with_name::<Option<SuggestedPostRefunded>>(
116202                    "Option<SuggestedPostRefunded>",
116203                )
116204                .build_type::<SuggestedPostRefunded>()
116205                .register_static_module(
116206                    "Option<SuggestedPostRefunded>",
116207                    exported_module!(SuggestedPostRefundedModule).into(),
116208                );
116209            engine
116210                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
116211                    "Option<SwitchInlineQueryChosenChat>",
116212                )
116213                .build_type::<SwitchInlineQueryChosenChat>()
116214                .register_static_module(
116215                    "Option<SwitchInlineQueryChosenChat>",
116216                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
116217                );
116218            engine
116219                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
116220                .build_type::<TextQuote>()
116221                .register_static_module(
116222                    "Option<TextQuote>",
116223                    exported_module!(TextQuoteModule).into(),
116224                );
116225            engine
116226                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
116227                .build_type::<UniqueGift>()
116228                .register_static_module(
116229                    "Option<UniqueGift>",
116230                    exported_module!(UniqueGiftModule).into(),
116231                );
116232            engine
116233                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
116234                .build_type::<UniqueGiftBackdrop>()
116235                .register_static_module(
116236                    "Option<UniqueGiftBackdrop>",
116237                    exported_module!(UniqueGiftBackdropModule).into(),
116238                );
116239            engine
116240                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
116241                    "Option<UniqueGiftBackdropColors>",
116242                )
116243                .build_type::<UniqueGiftBackdropColors>()
116244                .register_static_module(
116245                    "Option<UniqueGiftBackdropColors>",
116246                    exported_module!(UniqueGiftBackdropColorsModule).into(),
116247                );
116248            engine
116249                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
116250                .build_type::<UniqueGiftInfo>()
116251                .register_static_module(
116252                    "Option<UniqueGiftInfo>",
116253                    exported_module!(UniqueGiftInfoModule).into(),
116254                );
116255            engine
116256                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
116257                .build_type::<UniqueGiftModel>()
116258                .register_static_module(
116259                    "Option<UniqueGiftModel>",
116260                    exported_module!(UniqueGiftModelModule).into(),
116261                );
116262            engine
116263                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
116264                .build_type::<UniqueGiftSymbol>()
116265                .register_static_module(
116266                    "Option<UniqueGiftSymbol>",
116267                    exported_module!(UniqueGiftSymbolModule).into(),
116268                );
116269            engine
116270                .register_type_with_name::<Option<User>>("Option<User>")
116271                .build_type::<User>()
116272                .register_static_module("Option<User>", exported_module!(UserModule).into());
116273            engine
116274                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
116275                .build_type::<UsersShared>()
116276                .register_static_module(
116277                    "Option<UsersShared>",
116278                    exported_module!(UsersSharedModule).into(),
116279                );
116280            engine
116281                .register_type_with_name::<Option<Venue>>("Option<Venue>")
116282                .build_type::<Venue>()
116283                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
116284            engine
116285                .register_type_with_name::<Option<Video>>("Option<Video>")
116286                .build_type::<Video>()
116287                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
116288            engine
116289                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
116290                .build_type::<VideoChatEnded>()
116291                .register_static_module(
116292                    "Option<VideoChatEnded>",
116293                    exported_module!(VideoChatEndedModule).into(),
116294                );
116295            engine
116296                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
116297                    "Option<VideoChatParticipantsInvited>",
116298                )
116299                .build_type::<VideoChatParticipantsInvited>()
116300                .register_static_module(
116301                    "Option<VideoChatParticipantsInvited>",
116302                    exported_module!(VideoChatParticipantsInvitedModule).into(),
116303                );
116304            engine
116305                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
116306                .build_type::<VideoChatScheduled>()
116307                .register_static_module(
116308                    "Option<VideoChatScheduled>",
116309                    exported_module!(VideoChatScheduledModule).into(),
116310                );
116311            engine
116312                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
116313                .build_type::<VideoChatStarted>()
116314                .register_static_module(
116315                    "Option<VideoChatStarted>",
116316                    exported_module!(VideoChatStartedModule).into(),
116317                );
116318            engine
116319                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
116320                .build_type::<VideoNote>()
116321                .register_static_module(
116322                    "Option<VideoNote>",
116323                    exported_module!(VideoNoteModule).into(),
116324                );
116325            engine
116326                .register_type_with_name::<Option<Voice>>("Option<Voice>")
116327                .build_type::<Voice>()
116328                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
116329            engine
116330                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
116331                .build_type::<WebAppData>()
116332                .register_static_module(
116333                    "Option<WebAppData>",
116334                    exported_module!(WebAppDataModule).into(),
116335                );
116336            engine
116337                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
116338                .build_type::<WebAppInfo>()
116339                .register_static_module(
116340                    "Option<WebAppInfo>",
116341                    exported_module!(WebAppInfoModule).into(),
116342                );
116343            engine
116344                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
116345                .build_type::<WriteAccessAllowed>()
116346                .register_static_module(
116347                    "Option<WriteAccessAllowed>",
116348                    exported_module!(WriteAccessAllowedModule).into(),
116349                );
116350        }
116351    }
116352    #[cfg(feature = "rhai")]
116353    #[allow(unused_mut)]
116354    impl rhai::CustomType for SuggestedPostApproved {
116355        fn build(mut builder: rhai::TypeBuilder<Self>) {
116356            builder.with_get(
116357                "suggested_post_message",
116358                Self::rhai_get_suggested_post_message,
116359            );
116360            builder.with_get("price", Self::rhai_get_price);
116361            builder.with_get("send_date", Self::rhai_get_send_date);
116362            builder.on_debug(|t| format!("{:?}", t));
116363            drop(builder);
116364        }
116365    }
116366    #[cfg(feature = "rhai")]
116367    impl SetupRhai for User {
116368        fn setup_rhai(engine: &mut rhai::Engine) {
116369            engine.build_type::<User>();
116370            engine
116371                .register_type_with_name::<Option<bool>>("Option<bool>")
116372                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116373            engine
116374                .register_type_with_name::<Option<i64>>("Option<i64>")
116375                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116376            engine
116377                .register_type_with_name::<Option<String>>("Option<String>")
116378                .register_static_module("Option<String>", exported_module!(StringModule).into());
116379        }
116380    }
116381    #[cfg(feature = "rhai")]
116382    #[allow(unused_mut)]
116383    impl rhai::CustomType for User {
116384        fn build(mut builder: rhai::TypeBuilder<Self>) {
116385            builder.with_get("id", Self::rhai_get_id);
116386            builder.with_get("is_bot", Self::rhai_get_is_bot);
116387            builder.with_get("first_name", Self::rhai_get_first_name);
116388            builder.with_get("last_name", Self::rhai_get_last_name);
116389            builder.with_get("username", Self::rhai_get_username);
116390            builder.with_get("language_code", Self::rhai_get_language_code);
116391            builder.with_get("is_premium", Self::rhai_get_is_premium);
116392            builder.with_get(
116393                "added_to_attachment_menu",
116394                Self::rhai_get_added_to_attachment_menu,
116395            );
116396            builder.with_get("can_join_groups", Self::rhai_get_can_join_groups);
116397            builder.with_get(
116398                "can_read_all_group_messages",
116399                Self::rhai_get_can_read_all_group_messages,
116400            );
116401            builder.with_get(
116402                "supports_inline_queries",
116403                Self::rhai_get_supports_inline_queries,
116404            );
116405            builder.with_get(
116406                "can_connect_to_business",
116407                Self::rhai_get_can_connect_to_business,
116408            );
116409            builder.with_get("has_main_web_app", Self::rhai_get_has_main_web_app);
116410            builder.on_debug(|t| format!("{:?}", t));
116411            drop(builder);
116412        }
116413    }
116414    #[cfg(feature = "rhai")]
116415    impl SetupRhai for RevenueWithdrawalStatePending {
116416        fn setup_rhai(engine: &mut rhai::Engine) {
116417            engine.build_type::<RevenueWithdrawalStatePending>();
116418            engine
116419                .register_type_with_name::<Option<String>>("Option<String>")
116420                .register_static_module("Option<String>", exported_module!(StringModule).into());
116421        }
116422    }
116423    #[cfg(feature = "rhai")]
116424    #[allow(unused_mut)]
116425    impl rhai::CustomType for RevenueWithdrawalStatePending {
116426        fn build(mut builder: rhai::TypeBuilder<Self>) {
116427            builder.with_get("tg_type", Self::rhai_get_tg_type);
116428            builder.on_debug(|t| format!("{:?}", t));
116429            drop(builder);
116430        }
116431    }
116432    #[cfg(feature = "rhai")]
116433    impl SetupRhai for BotDescription {
116434        fn setup_rhai(engine: &mut rhai::Engine) {
116435            engine.build_type::<BotDescription>();
116436            engine
116437                .register_type_with_name::<Option<String>>("Option<String>")
116438                .register_static_module("Option<String>", exported_module!(StringModule).into());
116439        }
116440    }
116441    #[cfg(feature = "rhai")]
116442    #[allow(unused_mut)]
116443    impl rhai::CustomType for BotDescription {
116444        fn build(mut builder: rhai::TypeBuilder<Self>) {
116445            builder.with_get("description", Self::rhai_get_description);
116446            builder.on_debug(|t| format!("{:?}", t));
116447            drop(builder);
116448        }
116449    }
116450    #[cfg(feature = "rhai")]
116451    impl SetupRhai for TransactionPartnerAffiliateProgram {
116452        fn setup_rhai(engine: &mut rhai::Engine) {
116453            engine.build_type::<TransactionPartnerAffiliateProgram>();
116454            engine
116455                .register_type_with_name::<Option<bool>>("Option<bool>")
116456                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116457            engine
116458                .register_type_with_name::<Option<i64>>("Option<i64>")
116459                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116460            engine
116461                .register_type_with_name::<Option<String>>("Option<String>")
116462                .register_static_module("Option<String>", exported_module!(StringModule).into());
116463            engine
116464                .register_type_with_name::<Option<User>>("Option<User>")
116465                .build_type::<User>()
116466                .register_static_module("Option<User>", exported_module!(UserModule).into());
116467        }
116468    }
116469    #[cfg(feature = "rhai")]
116470    #[allow(unused_mut)]
116471    impl rhai::CustomType for TransactionPartnerAffiliateProgram {
116472        fn build(mut builder: rhai::TypeBuilder<Self>) {
116473            builder.with_get("tg_type", Self::rhai_get_tg_type);
116474            builder.with_get("sponsor_user", Self::rhai_get_sponsor_user);
116475            builder.with_get("commission_per_mille", Self::rhai_get_commission_per_mille);
116476            builder.on_debug(|t| format!("{:?}", t));
116477            drop(builder);
116478        }
116479    }
116480    #[cfg(feature = "rhai")]
116481    impl SetupRhai for InlineQueryResultCachedVideo {
116482        fn setup_rhai(engine: &mut rhai::Engine) {
116483            engine.build_type::<InlineQueryResultCachedVideo>();
116484            engine
116485                .register_type_with_name::<Option<bool>>("Option<bool>")
116486                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116487            engine
116488                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
116489                .build_type::<CallbackGame>()
116490                .register_static_module(
116491                    "Option<CallbackGame>",
116492                    exported_module!(CallbackGameModule).into(),
116493                );
116494            engine
116495                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
116496                .build_type::<CopyTextButton>()
116497                .register_static_module(
116498                    "Option<CopyTextButton>",
116499                    exported_module!(CopyTextButtonModule).into(),
116500                );
116501            engine
116502                .register_type_with_name::<Option<InlineKeyboardButton>>(
116503                    "Option<InlineKeyboardButton>",
116504                )
116505                .build_type::<InlineKeyboardButton>()
116506                .register_static_module(
116507                    "Option<InlineKeyboardButton>",
116508                    exported_module!(InlineKeyboardButtonModule).into(),
116509                );
116510            engine
116511                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
116512                    "Option<InlineKeyboardMarkup>",
116513                )
116514                .build_type::<InlineKeyboardMarkup>()
116515                .register_static_module(
116516                    "Option<InlineKeyboardMarkup>",
116517                    exported_module!(InlineKeyboardMarkupModule).into(),
116518                );
116519            engine
116520                .register_type_with_name::<Option<InputMessageContent>>(
116521                    "Option<InputMessageContent>",
116522                )
116523                .register_static_module(
116524                    "Option<InputMessageContent>",
116525                    exported_module!(InputMessageContentModule).into(),
116526                );
116527            engine
116528                .register_type_with_name::<Option<i64>>("Option<i64>")
116529                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116530            engine
116531                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
116532                .build_type::<LoginUrl>()
116533                .register_static_module(
116534                    "Option<LoginUrl>",
116535                    exported_module!(LoginUrlModule).into(),
116536                );
116537            engine
116538                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
116539                .build_type::<MessageEntity>()
116540                .register_static_module(
116541                    "Option<MessageEntity>",
116542                    exported_module!(MessageEntityModule).into(),
116543                );
116544            engine
116545                .register_type_with_name::<Option<String>>("Option<String>")
116546                .register_static_module("Option<String>", exported_module!(StringModule).into());
116547            engine
116548                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
116549                    "Option<SwitchInlineQueryChosenChat>",
116550                )
116551                .build_type::<SwitchInlineQueryChosenChat>()
116552                .register_static_module(
116553                    "Option<SwitchInlineQueryChosenChat>",
116554                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
116555                );
116556            engine
116557                .register_type_with_name::<Option<User>>("Option<User>")
116558                .build_type::<User>()
116559                .register_static_module("Option<User>", exported_module!(UserModule).into());
116560            engine
116561                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
116562                .build_type::<WebAppInfo>()
116563                .register_static_module(
116564                    "Option<WebAppInfo>",
116565                    exported_module!(WebAppInfoModule).into(),
116566                );
116567        }
116568    }
116569    #[cfg(feature = "rhai")]
116570    #[allow(unused_mut)]
116571    impl rhai::CustomType for InlineQueryResultCachedVideo {
116572        fn build(mut builder: rhai::TypeBuilder<Self>) {
116573            builder.with_get("tg_type", Self::rhai_get_tg_type);
116574            builder.with_get("id", Self::rhai_get_id);
116575            builder.with_get("video_file_id", Self::rhai_get_video_file_id);
116576            builder.with_get("title", Self::rhai_get_title);
116577            builder.with_get("description", Self::rhai_get_description);
116578            builder.with_get("caption", Self::rhai_get_caption);
116579            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
116580            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
116581            builder.with_get(
116582                "show_caption_above_media",
116583                Self::rhai_get_show_caption_above_media,
116584            );
116585            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
116586            builder.with_get(
116587                "input_message_content",
116588                Self::rhai_get_input_message_content,
116589            );
116590            builder.on_debug(|t| format!("{:?}", t));
116591            drop(builder);
116592        }
116593    }
116594    #[cfg(feature = "rhai")]
116595    impl SetupRhai for BusinessConnection {
116596        fn setup_rhai(engine: &mut rhai::Engine) {
116597            engine.build_type::<BusinessConnection>();
116598            engine
116599                .register_type_with_name::<Option<bool>>("Option<bool>")
116600                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116601            engine
116602                .register_type_with_name::<Option<BusinessBotRights>>("Option<BusinessBotRights>")
116603                .build_type::<BusinessBotRights>()
116604                .register_static_module(
116605                    "Option<BusinessBotRights>",
116606                    exported_module!(BusinessBotRightsModule).into(),
116607                );
116608            engine
116609                .register_type_with_name::<Option<i64>>("Option<i64>")
116610                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116611            engine
116612                .register_type_with_name::<Option<String>>("Option<String>")
116613                .register_static_module("Option<String>", exported_module!(StringModule).into());
116614            engine
116615                .register_type_with_name::<Option<User>>("Option<User>")
116616                .build_type::<User>()
116617                .register_static_module("Option<User>", exported_module!(UserModule).into());
116618        }
116619    }
116620    #[cfg(feature = "rhai")]
116621    #[allow(unused_mut)]
116622    impl rhai::CustomType for BusinessConnection {
116623        fn build(mut builder: rhai::TypeBuilder<Self>) {
116624            builder.with_get("id", Self::rhai_get_id);
116625            builder.with_get("user", Self::rhai_get_user);
116626            builder.with_get("user_chat_id", Self::rhai_get_user_chat_id);
116627            builder.with_get("date", Self::rhai_get_date);
116628            builder.with_get("rights", Self::rhai_get_rights);
116629            builder.with_get("is_enabled", Self::rhai_get_is_enabled);
116630            builder.on_debug(|t| format!("{:?}", t));
116631            drop(builder);
116632        }
116633    }
116634    #[cfg(feature = "rhai")]
116635    impl SetupRhai for UserProfilePhotos {
116636        fn setup_rhai(engine: &mut rhai::Engine) {
116637            engine.build_type::<UserProfilePhotos>();
116638            engine
116639                .register_type_with_name::<Option<i64>>("Option<i64>")
116640                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116641            engine
116642                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
116643                .build_type::<PhotoSize>()
116644                .register_static_module(
116645                    "Option<PhotoSize>",
116646                    exported_module!(PhotoSizeModule).into(),
116647                );
116648            engine
116649                .register_type_with_name::<Option<String>>("Option<String>")
116650                .register_static_module("Option<String>", exported_module!(StringModule).into());
116651        }
116652    }
116653    #[cfg(feature = "rhai")]
116654    #[allow(unused_mut)]
116655    impl rhai::CustomType for UserProfilePhotos {
116656        fn build(mut builder: rhai::TypeBuilder<Self>) {
116657            builder.with_get("total_count", Self::rhai_get_total_count);
116658            builder.with_get("photos", Self::rhai_get_photos);
116659            builder.on_debug(|t| format!("{:?}", t));
116660            drop(builder);
116661        }
116662    }
116663    #[cfg(feature = "rhai")]
116664    impl SetupRhai for ReactionTypePaid {
116665        fn setup_rhai(engine: &mut rhai::Engine) {
116666            engine.build_type::<ReactionTypePaid>();
116667            engine
116668                .register_type_with_name::<Option<String>>("Option<String>")
116669                .register_static_module("Option<String>", exported_module!(StringModule).into());
116670        }
116671    }
116672    #[cfg(feature = "rhai")]
116673    #[allow(unused_mut)]
116674    impl rhai::CustomType for ReactionTypePaid {
116675        fn build(mut builder: rhai::TypeBuilder<Self>) {
116676            builder.with_get("tg_type", Self::rhai_get_tg_type);
116677            builder.on_debug(|t| format!("{:?}", t));
116678            drop(builder);
116679        }
116680    }
116681    #[cfg(feature = "rhai")]
116682    impl SetupRhai for ChatMemberBanned {
116683        fn setup_rhai(engine: &mut rhai::Engine) {
116684            engine.build_type::<ChatMemberBanned>();
116685            engine
116686                .register_type_with_name::<Option<bool>>("Option<bool>")
116687                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116688            engine
116689                .register_type_with_name::<Option<i64>>("Option<i64>")
116690                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116691            engine
116692                .register_type_with_name::<Option<String>>("Option<String>")
116693                .register_static_module("Option<String>", exported_module!(StringModule).into());
116694            engine
116695                .register_type_with_name::<Option<User>>("Option<User>")
116696                .build_type::<User>()
116697                .register_static_module("Option<User>", exported_module!(UserModule).into());
116698        }
116699    }
116700    #[cfg(feature = "rhai")]
116701    #[allow(unused_mut)]
116702    impl rhai::CustomType for ChatMemberBanned {
116703        fn build(mut builder: rhai::TypeBuilder<Self>) {
116704            builder.with_get("user", Self::rhai_get_user);
116705            builder.with_get("until_date", Self::rhai_get_until_date);
116706            builder.on_debug(|t| format!("{:?}", t));
116707            drop(builder);
116708        }
116709    }
116710    #[cfg(feature = "rhai")]
116711    impl SetupRhai for UsersShared {
116712        fn setup_rhai(engine: &mut rhai::Engine) {
116713            engine.build_type::<UsersShared>();
116714            engine
116715                .register_type_with_name::<Option<i64>>("Option<i64>")
116716                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116717            engine
116718                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
116719                .build_type::<PhotoSize>()
116720                .register_static_module(
116721                    "Option<PhotoSize>",
116722                    exported_module!(PhotoSizeModule).into(),
116723                );
116724            engine
116725                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
116726                .build_type::<SharedUser>()
116727                .register_static_module(
116728                    "Option<SharedUser>",
116729                    exported_module!(SharedUserModule).into(),
116730                );
116731            engine
116732                .register_type_with_name::<Option<String>>("Option<String>")
116733                .register_static_module("Option<String>", exported_module!(StringModule).into());
116734        }
116735    }
116736    #[cfg(feature = "rhai")]
116737    #[allow(unused_mut)]
116738    impl rhai::CustomType for UsersShared {
116739        fn build(mut builder: rhai::TypeBuilder<Self>) {
116740            builder.with_get("request_id", Self::rhai_get_request_id);
116741            builder.with_get("users", Self::rhai_get_users);
116742            builder.on_debug(|t| format!("{:?}", t));
116743            drop(builder);
116744        }
116745    }
116746    #[cfg(feature = "rhai")]
116747    impl SetupRhai for InlineQueryResultMpeg4Gif {
116748        fn setup_rhai(engine: &mut rhai::Engine) {
116749            engine.build_type::<InlineQueryResultMpeg4Gif>();
116750            engine
116751                .register_type_with_name::<Option<bool>>("Option<bool>")
116752                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116753            engine
116754                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
116755                .build_type::<CallbackGame>()
116756                .register_static_module(
116757                    "Option<CallbackGame>",
116758                    exported_module!(CallbackGameModule).into(),
116759                );
116760            engine
116761                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
116762                .build_type::<CopyTextButton>()
116763                .register_static_module(
116764                    "Option<CopyTextButton>",
116765                    exported_module!(CopyTextButtonModule).into(),
116766                );
116767            engine
116768                .register_type_with_name::<Option<InlineKeyboardButton>>(
116769                    "Option<InlineKeyboardButton>",
116770                )
116771                .build_type::<InlineKeyboardButton>()
116772                .register_static_module(
116773                    "Option<InlineKeyboardButton>",
116774                    exported_module!(InlineKeyboardButtonModule).into(),
116775                );
116776            engine
116777                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
116778                    "Option<InlineKeyboardMarkup>",
116779                )
116780                .build_type::<InlineKeyboardMarkup>()
116781                .register_static_module(
116782                    "Option<InlineKeyboardMarkup>",
116783                    exported_module!(InlineKeyboardMarkupModule).into(),
116784                );
116785            engine
116786                .register_type_with_name::<Option<InputMessageContent>>(
116787                    "Option<InputMessageContent>",
116788                )
116789                .register_static_module(
116790                    "Option<InputMessageContent>",
116791                    exported_module!(InputMessageContentModule).into(),
116792                );
116793            engine
116794                .register_type_with_name::<Option<i64>>("Option<i64>")
116795                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116796            engine
116797                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
116798                .build_type::<LoginUrl>()
116799                .register_static_module(
116800                    "Option<LoginUrl>",
116801                    exported_module!(LoginUrlModule).into(),
116802                );
116803            engine
116804                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
116805                .build_type::<MessageEntity>()
116806                .register_static_module(
116807                    "Option<MessageEntity>",
116808                    exported_module!(MessageEntityModule).into(),
116809                );
116810            engine
116811                .register_type_with_name::<Option<String>>("Option<String>")
116812                .register_static_module("Option<String>", exported_module!(StringModule).into());
116813            engine
116814                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
116815                    "Option<SwitchInlineQueryChosenChat>",
116816                )
116817                .build_type::<SwitchInlineQueryChosenChat>()
116818                .register_static_module(
116819                    "Option<SwitchInlineQueryChosenChat>",
116820                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
116821                );
116822            engine
116823                .register_type_with_name::<Option<User>>("Option<User>")
116824                .build_type::<User>()
116825                .register_static_module("Option<User>", exported_module!(UserModule).into());
116826            engine
116827                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
116828                .build_type::<WebAppInfo>()
116829                .register_static_module(
116830                    "Option<WebAppInfo>",
116831                    exported_module!(WebAppInfoModule).into(),
116832                );
116833        }
116834    }
116835    #[cfg(feature = "rhai")]
116836    #[allow(unused_mut)]
116837    impl rhai::CustomType for InlineQueryResultMpeg4Gif {
116838        fn build(mut builder: rhai::TypeBuilder<Self>) {
116839            builder.with_get("tg_type", Self::rhai_get_tg_type);
116840            builder.with_get("id", Self::rhai_get_id);
116841            builder.with_get("mpeg_4_url", Self::rhai_get_mpeg_4_url);
116842            builder.with_get("mpeg_4_width", Self::rhai_get_mpeg_4_width);
116843            builder.with_get("mpeg_4_height", Self::rhai_get_mpeg_4_height);
116844            builder.with_get("mpeg_4_duration", Self::rhai_get_mpeg_4_duration);
116845            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
116846            builder.with_get("thumbnail_mime_type", Self::rhai_get_thumbnail_mime_type);
116847            builder.with_get("title", Self::rhai_get_title);
116848            builder.with_get("caption", Self::rhai_get_caption);
116849            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
116850            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
116851            builder.with_get(
116852                "show_caption_above_media",
116853                Self::rhai_get_show_caption_above_media,
116854            );
116855            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
116856            builder.with_get(
116857                "input_message_content",
116858                Self::rhai_get_input_message_content,
116859            );
116860            builder.on_debug(|t| format!("{:?}", t));
116861            drop(builder);
116862        }
116863    }
116864    #[cfg(feature = "rhai")]
116865    impl SetupRhai for ChecklistTask {
116866        fn setup_rhai(engine: &mut rhai::Engine) {
116867            engine.build_type::<ChecklistTask>();
116868            engine
116869                .register_type_with_name::<Option<bool>>("Option<bool>")
116870                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116871            engine
116872                .register_type_with_name::<Option<i64>>("Option<i64>")
116873                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116874            engine
116875                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
116876                .build_type::<MessageEntity>()
116877                .register_static_module(
116878                    "Option<MessageEntity>",
116879                    exported_module!(MessageEntityModule).into(),
116880                );
116881            engine
116882                .register_type_with_name::<Option<String>>("Option<String>")
116883                .register_static_module("Option<String>", exported_module!(StringModule).into());
116884            engine
116885                .register_type_with_name::<Option<User>>("Option<User>")
116886                .build_type::<User>()
116887                .register_static_module("Option<User>", exported_module!(UserModule).into());
116888        }
116889    }
116890    #[cfg(feature = "rhai")]
116891    #[allow(unused_mut)]
116892    impl rhai::CustomType for ChecklistTask {
116893        fn build(mut builder: rhai::TypeBuilder<Self>) {
116894            builder.with_get("id", Self::rhai_get_id);
116895            builder.with_get("text", Self::rhai_get_text);
116896            builder.with_get("text_entities", Self::rhai_get_text_entities);
116897            builder.with_get("completed_by_user", Self::rhai_get_completed_by_user);
116898            builder.with_get("completion_date", Self::rhai_get_completion_date);
116899            builder.on_debug(|t| format!("{:?}", t));
116900            drop(builder);
116901        }
116902    }
116903    #[cfg(feature = "rhai")]
116904    impl SetupRhai for Checklist {
116905        fn setup_rhai(engine: &mut rhai::Engine) {
116906            engine.build_type::<Checklist>();
116907            engine
116908                .register_type_with_name::<Option<bool>>("Option<bool>")
116909                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116910            engine
116911                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
116912                .build_type::<ChecklistTask>()
116913                .register_static_module(
116914                    "Option<ChecklistTask>",
116915                    exported_module!(ChecklistTaskModule).into(),
116916                );
116917            engine
116918                .register_type_with_name::<Option<i64>>("Option<i64>")
116919                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116920            engine
116921                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
116922                .build_type::<MessageEntity>()
116923                .register_static_module(
116924                    "Option<MessageEntity>",
116925                    exported_module!(MessageEntityModule).into(),
116926                );
116927            engine
116928                .register_type_with_name::<Option<String>>("Option<String>")
116929                .register_static_module("Option<String>", exported_module!(StringModule).into());
116930            engine
116931                .register_type_with_name::<Option<User>>("Option<User>")
116932                .build_type::<User>()
116933                .register_static_module("Option<User>", exported_module!(UserModule).into());
116934        }
116935    }
116936    #[cfg(feature = "rhai")]
116937    #[allow(unused_mut)]
116938    impl rhai::CustomType for Checklist {
116939        fn build(mut builder: rhai::TypeBuilder<Self>) {
116940            builder.with_get("title", Self::rhai_get_title);
116941            builder.with_get("title_entities", Self::rhai_get_title_entities);
116942            builder.with_get("tasks", Self::rhai_get_tasks);
116943            builder.with_get("others_can_add_tasks", Self::rhai_get_others_can_add_tasks);
116944            builder.with_get(
116945                "others_can_mark_tasks_as_done",
116946                Self::rhai_get_others_can_mark_tasks_as_done,
116947            );
116948            builder.on_debug(|t| format!("{:?}", t));
116949            drop(builder);
116950        }
116951    }
116952    #[cfg(feature = "rhai")]
116953    impl SetupRhai for BackgroundFillFreeformGradient {
116954        fn setup_rhai(engine: &mut rhai::Engine) {
116955            engine.build_type::<BackgroundFillFreeformGradient>();
116956            engine
116957                .register_type_with_name::<Option<i64>>("Option<i64>")
116958                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116959            engine
116960                .register_type_with_name::<Option<String>>("Option<String>")
116961                .register_static_module("Option<String>", exported_module!(StringModule).into());
116962        }
116963    }
116964    #[cfg(feature = "rhai")]
116965    #[allow(unused_mut)]
116966    impl rhai::CustomType for BackgroundFillFreeformGradient {
116967        fn build(mut builder: rhai::TypeBuilder<Self>) {
116968            builder.with_get("tg_type", Self::rhai_get_tg_type);
116969            builder.with_get("colors", Self::rhai_get_colors);
116970            builder.on_debug(|t| format!("{:?}", t));
116971            drop(builder);
116972        }
116973    }
116974    #[cfg(feature = "rhai")]
116975    impl SetupRhai for OwnedGiftUnique {
116976        fn setup_rhai(engine: &mut rhai::Engine) {
116977            engine.build_type::<OwnedGiftUnique>();
116978            engine
116979                .register_type_with_name::<Option<bool>>("Option<bool>")
116980                .register_static_module("Option<bool>", exported_module!(boolModule).into());
116981            engine
116982                .register_type_with_name::<Option<Chat>>("Option<Chat>")
116983                .build_type::<Chat>()
116984                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
116985            engine
116986                .register_type_with_name::<Option<File>>("Option<File>")
116987                .build_type::<File>()
116988                .register_static_module("Option<File>", exported_module!(FileModule).into());
116989            engine
116990                .register_type_with_name::<Option<f64>>("Option<f64>")
116991                .register_static_module("Option<f64>", exported_module!(f64Module).into());
116992            engine
116993                .register_type_with_name::<Option<i64>>("Option<i64>")
116994                .register_static_module("Option<i64>", exported_module!(i64Module).into());
116995            engine
116996                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
116997                .build_type::<MaskPosition>()
116998                .register_static_module(
116999                    "Option<MaskPosition>",
117000                    exported_module!(MaskPositionModule).into(),
117001                );
117002            engine
117003                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
117004                .build_type::<PhotoSize>()
117005                .register_static_module(
117006                    "Option<PhotoSize>",
117007                    exported_module!(PhotoSizeModule).into(),
117008                );
117009            engine
117010                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
117011                .build_type::<Sticker>()
117012                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
117013            engine
117014                .register_type_with_name::<Option<String>>("Option<String>")
117015                .register_static_module("Option<String>", exported_module!(StringModule).into());
117016            engine
117017                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
117018                .build_type::<UniqueGift>()
117019                .register_static_module(
117020                    "Option<UniqueGift>",
117021                    exported_module!(UniqueGiftModule).into(),
117022                );
117023            engine
117024                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
117025                .build_type::<UniqueGiftBackdrop>()
117026                .register_static_module(
117027                    "Option<UniqueGiftBackdrop>",
117028                    exported_module!(UniqueGiftBackdropModule).into(),
117029                );
117030            engine
117031                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
117032                    "Option<UniqueGiftBackdropColors>",
117033                )
117034                .build_type::<UniqueGiftBackdropColors>()
117035                .register_static_module(
117036                    "Option<UniqueGiftBackdropColors>",
117037                    exported_module!(UniqueGiftBackdropColorsModule).into(),
117038                );
117039            engine
117040                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
117041                .build_type::<UniqueGiftModel>()
117042                .register_static_module(
117043                    "Option<UniqueGiftModel>",
117044                    exported_module!(UniqueGiftModelModule).into(),
117045                );
117046            engine
117047                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
117048                .build_type::<UniqueGiftSymbol>()
117049                .register_static_module(
117050                    "Option<UniqueGiftSymbol>",
117051                    exported_module!(UniqueGiftSymbolModule).into(),
117052                );
117053            engine
117054                .register_type_with_name::<Option<User>>("Option<User>")
117055                .build_type::<User>()
117056                .register_static_module("Option<User>", exported_module!(UserModule).into());
117057        }
117058    }
117059    #[cfg(feature = "rhai")]
117060    #[allow(unused_mut)]
117061    impl rhai::CustomType for OwnedGiftUnique {
117062        fn build(mut builder: rhai::TypeBuilder<Self>) {
117063            builder.with_get("tg_type", Self::rhai_get_tg_type);
117064            builder.with_get("gift", Self::rhai_get_gift);
117065            builder.with_get("owned_gift_id", Self::rhai_get_owned_gift_id);
117066            builder.with_get("sender_user", Self::rhai_get_sender_user);
117067            builder.with_get("send_date", Self::rhai_get_send_date);
117068            builder.with_get("is_saved", Self::rhai_get_is_saved);
117069            builder.with_get("can_be_transferred", Self::rhai_get_can_be_transferred);
117070            builder.with_get("transfer_star_count", Self::rhai_get_transfer_star_count);
117071            builder.with_get("next_transfer_date", Self::rhai_get_next_transfer_date);
117072            builder.on_debug(|t| format!("{:?}", t));
117073            drop(builder);
117074        }
117075    }
117076    #[cfg(feature = "rhai")]
117077    impl SetupRhai for PaidMediaPreview {
117078        fn setup_rhai(engine: &mut rhai::Engine) {
117079            engine.build_type::<PaidMediaPreview>();
117080            engine
117081                .register_type_with_name::<Option<i64>>("Option<i64>")
117082                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117083            engine
117084                .register_type_with_name::<Option<String>>("Option<String>")
117085                .register_static_module("Option<String>", exported_module!(StringModule).into());
117086        }
117087    }
117088    #[cfg(feature = "rhai")]
117089    #[allow(unused_mut)]
117090    impl rhai::CustomType for PaidMediaPreview {
117091        fn build(mut builder: rhai::TypeBuilder<Self>) {
117092            builder.with_get("tg_type", Self::rhai_get_tg_type);
117093            builder.with_get("width", Self::rhai_get_width);
117094            builder.with_get("height", Self::rhai_get_height);
117095            builder.with_get("duration", Self::rhai_get_duration);
117096            builder.on_debug(|t| format!("{:?}", t));
117097            drop(builder);
117098        }
117099    }
117100    #[cfg(feature = "rhai")]
117101    impl SetupRhai for InputTextMessageContent {
117102        fn setup_rhai(engine: &mut rhai::Engine) {
117103            engine.build_type::<InputTextMessageContent>();
117104            engine
117105                .register_type_with_name::<Option<bool>>("Option<bool>")
117106                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117107            engine
117108                .register_type_with_name::<Option<i64>>("Option<i64>")
117109                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117110            engine
117111                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
117112                .build_type::<LinkPreviewOptions>()
117113                .register_static_module(
117114                    "Option<LinkPreviewOptions>",
117115                    exported_module!(LinkPreviewOptionsModule).into(),
117116                );
117117            engine
117118                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
117119                .build_type::<MessageEntity>()
117120                .register_static_module(
117121                    "Option<MessageEntity>",
117122                    exported_module!(MessageEntityModule).into(),
117123                );
117124            engine
117125                .register_type_with_name::<Option<String>>("Option<String>")
117126                .register_static_module("Option<String>", exported_module!(StringModule).into());
117127            engine
117128                .register_type_with_name::<Option<User>>("Option<User>")
117129                .build_type::<User>()
117130                .register_static_module("Option<User>", exported_module!(UserModule).into());
117131        }
117132    }
117133    #[cfg(feature = "rhai")]
117134    #[allow(unused_mut)]
117135    impl rhai::CustomType for InputTextMessageContent {
117136        fn build(mut builder: rhai::TypeBuilder<Self>) {
117137            builder.with_get("message_text", Self::rhai_get_message_text);
117138            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
117139            builder.with_get("entities", Self::rhai_get_entities);
117140            builder.with_get("link_preview_options", Self::rhai_get_link_preview_options);
117141            builder.on_debug(|t| format!("{:?}", t));
117142            drop(builder);
117143        }
117144    }
117145    #[cfg(feature = "rhai")]
117146    impl SetupRhai for BotCommandScopeAllPrivateChats {
117147        fn setup_rhai(engine: &mut rhai::Engine) {
117148            engine.build_type::<BotCommandScopeAllPrivateChats>();
117149            engine
117150                .register_type_with_name::<Option<String>>("Option<String>")
117151                .register_static_module("Option<String>", exported_module!(StringModule).into());
117152        }
117153    }
117154    #[cfg(feature = "rhai")]
117155    #[allow(unused_mut)]
117156    impl rhai::CustomType for BotCommandScopeAllPrivateChats {
117157        fn build(mut builder: rhai::TypeBuilder<Self>) {
117158            builder.with_get("tg_type", Self::rhai_get_tg_type);
117159            builder.on_debug(|t| format!("{:?}", t));
117160            drop(builder);
117161        }
117162    }
117163    #[cfg(feature = "rhai")]
117164    impl SetupRhai for Voice {
117165        fn setup_rhai(engine: &mut rhai::Engine) {
117166            engine.build_type::<Voice>();
117167            engine
117168                .register_type_with_name::<Option<i64>>("Option<i64>")
117169                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117170            engine
117171                .register_type_with_name::<Option<String>>("Option<String>")
117172                .register_static_module("Option<String>", exported_module!(StringModule).into());
117173        }
117174    }
117175    #[cfg(feature = "rhai")]
117176    #[allow(unused_mut)]
117177    impl rhai::CustomType for Voice {
117178        fn build(mut builder: rhai::TypeBuilder<Self>) {
117179            builder.with_get("file_id", Self::rhai_get_file_id);
117180            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
117181            builder.with_get("duration", Self::rhai_get_duration);
117182            builder.with_get("mime_type", Self::rhai_get_mime_type);
117183            builder.with_get("file_size", Self::rhai_get_file_size);
117184            builder.on_debug(|t| format!("{:?}", t));
117185            drop(builder);
117186        }
117187    }
117188    #[cfg(feature = "rhai")]
117189    impl SetupRhai for KeyboardButtonRequestUsers {
117190        fn setup_rhai(engine: &mut rhai::Engine) {
117191            engine.build_type::<KeyboardButtonRequestUsers>();
117192            engine
117193                .register_type_with_name::<Option<bool>>("Option<bool>")
117194                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117195            engine
117196                .register_type_with_name::<Option<i64>>("Option<i64>")
117197                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117198        }
117199    }
117200    #[cfg(feature = "rhai")]
117201    #[allow(unused_mut)]
117202    impl rhai::CustomType for KeyboardButtonRequestUsers {
117203        fn build(mut builder: rhai::TypeBuilder<Self>) {
117204            builder.with_get("request_id", Self::rhai_get_request_id);
117205            builder.with_get("user_is_bot", Self::rhai_get_user_is_bot);
117206            builder.with_get("user_is_premium", Self::rhai_get_user_is_premium);
117207            builder.with_get("max_quantity", Self::rhai_get_max_quantity);
117208            builder.with_get("request_name", Self::rhai_get_request_name);
117209            builder.with_get("request_username", Self::rhai_get_request_username);
117210            builder.with_get("request_photo", Self::rhai_get_request_photo);
117211            builder.on_debug(|t| format!("{:?}", t));
117212            drop(builder);
117213        }
117214    }
117215    #[cfg(feature = "rhai")]
117216    impl SetupRhai for InlineQueryResultLocation {
117217        fn setup_rhai(engine: &mut rhai::Engine) {
117218            engine.build_type::<InlineQueryResultLocation>();
117219            engine
117220                .register_type_with_name::<Option<bool>>("Option<bool>")
117221                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117222            engine
117223                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
117224                .build_type::<CallbackGame>()
117225                .register_static_module(
117226                    "Option<CallbackGame>",
117227                    exported_module!(CallbackGameModule).into(),
117228                );
117229            engine
117230                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
117231                .build_type::<CopyTextButton>()
117232                .register_static_module(
117233                    "Option<CopyTextButton>",
117234                    exported_module!(CopyTextButtonModule).into(),
117235                );
117236            engine
117237                .register_type_with_name::<Option<f64>>("Option<f64>")
117238                .register_static_module("Option<f64>", exported_module!(f64Module).into());
117239            engine
117240                .register_type_with_name::<Option<InlineKeyboardButton>>(
117241                    "Option<InlineKeyboardButton>",
117242                )
117243                .build_type::<InlineKeyboardButton>()
117244                .register_static_module(
117245                    "Option<InlineKeyboardButton>",
117246                    exported_module!(InlineKeyboardButtonModule).into(),
117247                );
117248            engine
117249                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
117250                    "Option<InlineKeyboardMarkup>",
117251                )
117252                .build_type::<InlineKeyboardMarkup>()
117253                .register_static_module(
117254                    "Option<InlineKeyboardMarkup>",
117255                    exported_module!(InlineKeyboardMarkupModule).into(),
117256                );
117257            engine
117258                .register_type_with_name::<Option<InputMessageContent>>(
117259                    "Option<InputMessageContent>",
117260                )
117261                .register_static_module(
117262                    "Option<InputMessageContent>",
117263                    exported_module!(InputMessageContentModule).into(),
117264                );
117265            engine
117266                .register_type_with_name::<Option<i64>>("Option<i64>")
117267                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117268            engine
117269                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
117270                .build_type::<LoginUrl>()
117271                .register_static_module(
117272                    "Option<LoginUrl>",
117273                    exported_module!(LoginUrlModule).into(),
117274                );
117275            engine
117276                .register_type_with_name::<Option<String>>("Option<String>")
117277                .register_static_module("Option<String>", exported_module!(StringModule).into());
117278            engine
117279                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
117280                    "Option<SwitchInlineQueryChosenChat>",
117281                )
117282                .build_type::<SwitchInlineQueryChosenChat>()
117283                .register_static_module(
117284                    "Option<SwitchInlineQueryChosenChat>",
117285                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
117286                );
117287            engine
117288                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
117289                .build_type::<WebAppInfo>()
117290                .register_static_module(
117291                    "Option<WebAppInfo>",
117292                    exported_module!(WebAppInfoModule).into(),
117293                );
117294        }
117295    }
117296    #[cfg(feature = "rhai")]
117297    #[allow(unused_mut)]
117298    impl rhai::CustomType for InlineQueryResultLocation {
117299        fn build(mut builder: rhai::TypeBuilder<Self>) {
117300            builder.with_get("tg_type", Self::rhai_get_tg_type);
117301            builder.with_get("id", Self::rhai_get_id);
117302            builder.with_get("latitude", Self::rhai_get_latitude);
117303            builder.with_get("longitude", Self::rhai_get_longitude);
117304            builder.with_get("title", Self::rhai_get_title);
117305            builder.with_get("horizontal_accuracy", Self::rhai_get_horizontal_accuracy);
117306            builder.with_get("live_period", Self::rhai_get_live_period);
117307            builder.with_get("heading", Self::rhai_get_heading);
117308            builder.with_get(
117309                "proximity_alert_radius",
117310                Self::rhai_get_proximity_alert_radius,
117311            );
117312            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
117313            builder.with_get(
117314                "input_message_content",
117315                Self::rhai_get_input_message_content,
117316            );
117317            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
117318            builder.with_get("thumbnail_width", Self::rhai_get_thumbnail_width);
117319            builder.with_get("thumbnail_height", Self::rhai_get_thumbnail_height);
117320            builder.on_debug(|t| format!("{:?}", t));
117321            drop(builder);
117322        }
117323    }
117324    #[cfg(feature = "rhai")]
117325    impl SetupRhai for KeyboardButtonPollType {
117326        fn setup_rhai(engine: &mut rhai::Engine) {
117327            engine.build_type::<KeyboardButtonPollType>();
117328            engine
117329                .register_type_with_name::<Option<String>>("Option<String>")
117330                .register_static_module("Option<String>", exported_module!(StringModule).into());
117331        }
117332    }
117333    #[cfg(feature = "rhai")]
117334    #[allow(unused_mut)]
117335    impl rhai::CustomType for KeyboardButtonPollType {
117336        fn build(mut builder: rhai::TypeBuilder<Self>) {
117337            builder.with_get("tg_type", Self::rhai_get_tg_type);
117338            builder.on_debug(|t| format!("{:?}", t));
117339            drop(builder);
117340        }
117341    }
117342    #[cfg(feature = "rhai")]
117343    impl SetupRhai for WebAppData {
117344        fn setup_rhai(engine: &mut rhai::Engine) {
117345            engine.build_type::<WebAppData>();
117346            engine
117347                .register_type_with_name::<Option<String>>("Option<String>")
117348                .register_static_module("Option<String>", exported_module!(StringModule).into());
117349        }
117350    }
117351    #[cfg(feature = "rhai")]
117352    #[allow(unused_mut)]
117353    impl rhai::CustomType for WebAppData {
117354        fn build(mut builder: rhai::TypeBuilder<Self>) {
117355            builder.with_get("data", Self::rhai_get_data);
117356            builder.with_get("button_text", Self::rhai_get_button_text);
117357            builder.on_debug(|t| format!("{:?}", t));
117358            drop(builder);
117359        }
117360    }
117361    #[cfg(feature = "rhai")]
117362    impl SetupRhai for ForumTopicReopened {
117363        fn setup_rhai(engine: &mut rhai::Engine) {
117364            engine.build_type::<ForumTopicReopened>();
117365        }
117366    }
117367    #[cfg(feature = "rhai")]
117368    #[allow(unused_mut)]
117369    impl rhai::CustomType for ForumTopicReopened {
117370        fn build(mut builder: rhai::TypeBuilder<Self>) {
117371            builder.on_debug(|t| format!("{:?}", t));
117372            drop(builder);
117373        }
117374    }
117375    #[cfg(feature = "rhai")]
117376    impl SetupRhai for InlineQueryResultCachedDocument {
117377        fn setup_rhai(engine: &mut rhai::Engine) {
117378            engine.build_type::<InlineQueryResultCachedDocument>();
117379            engine
117380                .register_type_with_name::<Option<bool>>("Option<bool>")
117381                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117382            engine
117383                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
117384                .build_type::<CallbackGame>()
117385                .register_static_module(
117386                    "Option<CallbackGame>",
117387                    exported_module!(CallbackGameModule).into(),
117388                );
117389            engine
117390                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
117391                .build_type::<CopyTextButton>()
117392                .register_static_module(
117393                    "Option<CopyTextButton>",
117394                    exported_module!(CopyTextButtonModule).into(),
117395                );
117396            engine
117397                .register_type_with_name::<Option<InlineKeyboardButton>>(
117398                    "Option<InlineKeyboardButton>",
117399                )
117400                .build_type::<InlineKeyboardButton>()
117401                .register_static_module(
117402                    "Option<InlineKeyboardButton>",
117403                    exported_module!(InlineKeyboardButtonModule).into(),
117404                );
117405            engine
117406                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
117407                    "Option<InlineKeyboardMarkup>",
117408                )
117409                .build_type::<InlineKeyboardMarkup>()
117410                .register_static_module(
117411                    "Option<InlineKeyboardMarkup>",
117412                    exported_module!(InlineKeyboardMarkupModule).into(),
117413                );
117414            engine
117415                .register_type_with_name::<Option<InputMessageContent>>(
117416                    "Option<InputMessageContent>",
117417                )
117418                .register_static_module(
117419                    "Option<InputMessageContent>",
117420                    exported_module!(InputMessageContentModule).into(),
117421                );
117422            engine
117423                .register_type_with_name::<Option<i64>>("Option<i64>")
117424                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117425            engine
117426                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
117427                .build_type::<LoginUrl>()
117428                .register_static_module(
117429                    "Option<LoginUrl>",
117430                    exported_module!(LoginUrlModule).into(),
117431                );
117432            engine
117433                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
117434                .build_type::<MessageEntity>()
117435                .register_static_module(
117436                    "Option<MessageEntity>",
117437                    exported_module!(MessageEntityModule).into(),
117438                );
117439            engine
117440                .register_type_with_name::<Option<String>>("Option<String>")
117441                .register_static_module("Option<String>", exported_module!(StringModule).into());
117442            engine
117443                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
117444                    "Option<SwitchInlineQueryChosenChat>",
117445                )
117446                .build_type::<SwitchInlineQueryChosenChat>()
117447                .register_static_module(
117448                    "Option<SwitchInlineQueryChosenChat>",
117449                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
117450                );
117451            engine
117452                .register_type_with_name::<Option<User>>("Option<User>")
117453                .build_type::<User>()
117454                .register_static_module("Option<User>", exported_module!(UserModule).into());
117455            engine
117456                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
117457                .build_type::<WebAppInfo>()
117458                .register_static_module(
117459                    "Option<WebAppInfo>",
117460                    exported_module!(WebAppInfoModule).into(),
117461                );
117462        }
117463    }
117464    #[cfg(feature = "rhai")]
117465    #[allow(unused_mut)]
117466    impl rhai::CustomType for InlineQueryResultCachedDocument {
117467        fn build(mut builder: rhai::TypeBuilder<Self>) {
117468            builder.with_get("tg_type", Self::rhai_get_tg_type);
117469            builder.with_get("id", Self::rhai_get_id);
117470            builder.with_get("title", Self::rhai_get_title);
117471            builder.with_get("document_file_id", Self::rhai_get_document_file_id);
117472            builder.with_get("description", Self::rhai_get_description);
117473            builder.with_get("caption", Self::rhai_get_caption);
117474            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
117475            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
117476            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
117477            builder.with_get(
117478                "input_message_content",
117479                Self::rhai_get_input_message_content,
117480            );
117481            builder.on_debug(|t| format!("{:?}", t));
117482            drop(builder);
117483        }
117484    }
117485    #[cfg(feature = "rhai")]
117486    impl SetupRhai for InlineQueryResultVoice {
117487        fn setup_rhai(engine: &mut rhai::Engine) {
117488            engine.build_type::<InlineQueryResultVoice>();
117489            engine
117490                .register_type_with_name::<Option<bool>>("Option<bool>")
117491                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117492            engine
117493                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
117494                .build_type::<CallbackGame>()
117495                .register_static_module(
117496                    "Option<CallbackGame>",
117497                    exported_module!(CallbackGameModule).into(),
117498                );
117499            engine
117500                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
117501                .build_type::<CopyTextButton>()
117502                .register_static_module(
117503                    "Option<CopyTextButton>",
117504                    exported_module!(CopyTextButtonModule).into(),
117505                );
117506            engine
117507                .register_type_with_name::<Option<InlineKeyboardButton>>(
117508                    "Option<InlineKeyboardButton>",
117509                )
117510                .build_type::<InlineKeyboardButton>()
117511                .register_static_module(
117512                    "Option<InlineKeyboardButton>",
117513                    exported_module!(InlineKeyboardButtonModule).into(),
117514                );
117515            engine
117516                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
117517                    "Option<InlineKeyboardMarkup>",
117518                )
117519                .build_type::<InlineKeyboardMarkup>()
117520                .register_static_module(
117521                    "Option<InlineKeyboardMarkup>",
117522                    exported_module!(InlineKeyboardMarkupModule).into(),
117523                );
117524            engine
117525                .register_type_with_name::<Option<InputMessageContent>>(
117526                    "Option<InputMessageContent>",
117527                )
117528                .register_static_module(
117529                    "Option<InputMessageContent>",
117530                    exported_module!(InputMessageContentModule).into(),
117531                );
117532            engine
117533                .register_type_with_name::<Option<i64>>("Option<i64>")
117534                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117535            engine
117536                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
117537                .build_type::<LoginUrl>()
117538                .register_static_module(
117539                    "Option<LoginUrl>",
117540                    exported_module!(LoginUrlModule).into(),
117541                );
117542            engine
117543                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
117544                .build_type::<MessageEntity>()
117545                .register_static_module(
117546                    "Option<MessageEntity>",
117547                    exported_module!(MessageEntityModule).into(),
117548                );
117549            engine
117550                .register_type_with_name::<Option<String>>("Option<String>")
117551                .register_static_module("Option<String>", exported_module!(StringModule).into());
117552            engine
117553                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
117554                    "Option<SwitchInlineQueryChosenChat>",
117555                )
117556                .build_type::<SwitchInlineQueryChosenChat>()
117557                .register_static_module(
117558                    "Option<SwitchInlineQueryChosenChat>",
117559                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
117560                );
117561            engine
117562                .register_type_with_name::<Option<User>>("Option<User>")
117563                .build_type::<User>()
117564                .register_static_module("Option<User>", exported_module!(UserModule).into());
117565            engine
117566                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
117567                .build_type::<WebAppInfo>()
117568                .register_static_module(
117569                    "Option<WebAppInfo>",
117570                    exported_module!(WebAppInfoModule).into(),
117571                );
117572        }
117573    }
117574    #[cfg(feature = "rhai")]
117575    #[allow(unused_mut)]
117576    impl rhai::CustomType for InlineQueryResultVoice {
117577        fn build(mut builder: rhai::TypeBuilder<Self>) {
117578            builder.with_get("tg_type", Self::rhai_get_tg_type);
117579            builder.with_get("id", Self::rhai_get_id);
117580            builder.with_get("voice_url", Self::rhai_get_voice_url);
117581            builder.with_get("title", Self::rhai_get_title);
117582            builder.with_get("caption", Self::rhai_get_caption);
117583            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
117584            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
117585            builder.with_get("voice_duration", Self::rhai_get_voice_duration);
117586            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
117587            builder.with_get(
117588                "input_message_content",
117589                Self::rhai_get_input_message_content,
117590            );
117591            builder.on_debug(|t| format!("{:?}", t));
117592            drop(builder);
117593        }
117594    }
117595    #[cfg(feature = "rhai")]
117596    impl SetupRhai for UniqueGiftBackdrop {
117597        fn setup_rhai(engine: &mut rhai::Engine) {
117598            engine.build_type::<UniqueGiftBackdrop>();
117599            engine
117600                .register_type_with_name::<Option<i64>>("Option<i64>")
117601                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117602            engine
117603                .register_type_with_name::<Option<String>>("Option<String>")
117604                .register_static_module("Option<String>", exported_module!(StringModule).into());
117605            engine
117606                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
117607                    "Option<UniqueGiftBackdropColors>",
117608                )
117609                .build_type::<UniqueGiftBackdropColors>()
117610                .register_static_module(
117611                    "Option<UniqueGiftBackdropColors>",
117612                    exported_module!(UniqueGiftBackdropColorsModule).into(),
117613                );
117614        }
117615    }
117616    #[cfg(feature = "rhai")]
117617    #[allow(unused_mut)]
117618    impl rhai::CustomType for UniqueGiftBackdrop {
117619        fn build(mut builder: rhai::TypeBuilder<Self>) {
117620            builder.with_get("name", Self::rhai_get_name);
117621            builder.with_get("colors", Self::rhai_get_colors);
117622            builder.with_get("rarity_per_mille", Self::rhai_get_rarity_per_mille);
117623            builder.on_debug(|t| format!("{:?}", t));
117624            drop(builder);
117625        }
117626    }
117627    #[cfg(feature = "rhai")]
117628    impl SetupRhai for StoryAreaTypeWeather {
117629        fn setup_rhai(engine: &mut rhai::Engine) {
117630            engine.build_type::<StoryAreaTypeWeather>();
117631            engine
117632                .register_type_with_name::<Option<f64>>("Option<f64>")
117633                .register_static_module("Option<f64>", exported_module!(f64Module).into());
117634            engine
117635                .register_type_with_name::<Option<i64>>("Option<i64>")
117636                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117637            engine
117638                .register_type_with_name::<Option<String>>("Option<String>")
117639                .register_static_module("Option<String>", exported_module!(StringModule).into());
117640        }
117641    }
117642    #[cfg(feature = "rhai")]
117643    #[allow(unused_mut)]
117644    impl rhai::CustomType for StoryAreaTypeWeather {
117645        fn build(mut builder: rhai::TypeBuilder<Self>) {
117646            builder.with_get("tg_type", Self::rhai_get_tg_type);
117647            builder.with_get("temperature", Self::rhai_get_temperature);
117648            builder.with_get("emoji", Self::rhai_get_emoji);
117649            builder.with_get("background_color", Self::rhai_get_background_color);
117650            builder.on_debug(|t| format!("{:?}", t));
117651            drop(builder);
117652        }
117653    }
117654    #[cfg(feature = "rhai")]
117655    impl SetupRhai for UniqueGiftModel {
117656        fn setup_rhai(engine: &mut rhai::Engine) {
117657            engine.build_type::<UniqueGiftModel>();
117658            engine
117659                .register_type_with_name::<Option<bool>>("Option<bool>")
117660                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117661            engine
117662                .register_type_with_name::<Option<File>>("Option<File>")
117663                .build_type::<File>()
117664                .register_static_module("Option<File>", exported_module!(FileModule).into());
117665            engine
117666                .register_type_with_name::<Option<f64>>("Option<f64>")
117667                .register_static_module("Option<f64>", exported_module!(f64Module).into());
117668            engine
117669                .register_type_with_name::<Option<i64>>("Option<i64>")
117670                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117671            engine
117672                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
117673                .build_type::<MaskPosition>()
117674                .register_static_module(
117675                    "Option<MaskPosition>",
117676                    exported_module!(MaskPositionModule).into(),
117677                );
117678            engine
117679                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
117680                .build_type::<PhotoSize>()
117681                .register_static_module(
117682                    "Option<PhotoSize>",
117683                    exported_module!(PhotoSizeModule).into(),
117684                );
117685            engine
117686                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
117687                .build_type::<Sticker>()
117688                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
117689            engine
117690                .register_type_with_name::<Option<String>>("Option<String>")
117691                .register_static_module("Option<String>", exported_module!(StringModule).into());
117692        }
117693    }
117694    #[cfg(feature = "rhai")]
117695    #[allow(unused_mut)]
117696    impl rhai::CustomType for UniqueGiftModel {
117697        fn build(mut builder: rhai::TypeBuilder<Self>) {
117698            builder.with_get("name", Self::rhai_get_name);
117699            builder.with_get("sticker", Self::rhai_get_sticker);
117700            builder.with_get("rarity_per_mille", Self::rhai_get_rarity_per_mille);
117701            builder.on_debug(|t| format!("{:?}", t));
117702            drop(builder);
117703        }
117704    }
117705    #[cfg(feature = "rhai")]
117706    impl SetupRhai for ForceReply {
117707        fn setup_rhai(engine: &mut rhai::Engine) {
117708            engine.build_type::<ForceReply>();
117709            engine
117710                .register_type_with_name::<Option<bool>>("Option<bool>")
117711                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117712            engine
117713                .register_type_with_name::<Option<String>>("Option<String>")
117714                .register_static_module("Option<String>", exported_module!(StringModule).into());
117715        }
117716    }
117717    #[cfg(feature = "rhai")]
117718    #[allow(unused_mut)]
117719    impl rhai::CustomType for ForceReply {
117720        fn build(mut builder: rhai::TypeBuilder<Self>) {
117721            builder.with_get("force_reply", Self::rhai_get_force_reply);
117722            builder.with_get(
117723                "input_field_placeholder",
117724                Self::rhai_get_input_field_placeholder,
117725            );
117726            builder.with_get("selective", Self::rhai_get_selective);
117727            builder.on_debug(|t| format!("{:?}", t));
117728            drop(builder);
117729        }
117730    }
117731    #[cfg(feature = "rhai")]
117732    impl SetupRhai for StarTransaction {
117733        fn setup_rhai(engine: &mut rhai::Engine) {
117734            engine.build_type::<StarTransaction>();
117735            engine
117736                .register_type_with_name::<Option<i64>>("Option<i64>")
117737                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117738            engine
117739                .register_type_with_name::<Option<String>>("Option<String>")
117740                .register_static_module("Option<String>", exported_module!(StringModule).into());
117741            engine
117742                .register_type_with_name::<Option<TransactionPartner>>("Option<TransactionPartner>")
117743                .register_static_module(
117744                    "Option<TransactionPartner>",
117745                    exported_module!(TransactionPartnerModule).into(),
117746                );
117747        }
117748    }
117749    #[cfg(feature = "rhai")]
117750    #[allow(unused_mut)]
117751    impl rhai::CustomType for StarTransaction {
117752        fn build(mut builder: rhai::TypeBuilder<Self>) {
117753            builder.with_get("id", Self::rhai_get_id);
117754            builder.with_get("amount", Self::rhai_get_amount);
117755            builder.with_get("nanostar_amount", Self::rhai_get_nanostar_amount);
117756            builder.with_get("date", Self::rhai_get_date);
117757            builder.with_get("source", Self::rhai_get_source);
117758            builder.with_get("receiver", Self::rhai_get_receiver);
117759            builder.on_debug(|t| format!("{:?}", t));
117760            drop(builder);
117761        }
117762    }
117763    #[cfg(feature = "rhai")]
117764    impl SetupRhai for PassportElementErrorDataField {
117765        fn setup_rhai(engine: &mut rhai::Engine) {
117766            engine.build_type::<PassportElementErrorDataField>();
117767            engine
117768                .register_type_with_name::<Option<String>>("Option<String>")
117769                .register_static_module("Option<String>", exported_module!(StringModule).into());
117770        }
117771    }
117772    #[cfg(feature = "rhai")]
117773    #[allow(unused_mut)]
117774    impl rhai::CustomType for PassportElementErrorDataField {
117775        fn build(mut builder: rhai::TypeBuilder<Self>) {
117776            builder.with_get("source", Self::rhai_get_source);
117777            builder.with_get("tg_type", Self::rhai_get_tg_type);
117778            builder.with_get("field_name", Self::rhai_get_field_name);
117779            builder.with_get("data_hash", Self::rhai_get_data_hash);
117780            builder.with_get("message", Self::rhai_get_message);
117781            builder.on_debug(|t| format!("{:?}", t));
117782            drop(builder);
117783        }
117784    }
117785    #[cfg(feature = "rhai")]
117786    impl SetupRhai for ChatBoost {
117787        fn setup_rhai(engine: &mut rhai::Engine) {
117788            engine.build_type::<ChatBoost>();
117789            engine
117790                .register_type_with_name::<Option<ChatBoostSource>>("Option<ChatBoostSource>")
117791                .register_static_module(
117792                    "Option<ChatBoostSource>",
117793                    exported_module!(ChatBoostSourceModule).into(),
117794                );
117795            engine
117796                .register_type_with_name::<Option<i64>>("Option<i64>")
117797                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117798            engine
117799                .register_type_with_name::<Option<String>>("Option<String>")
117800                .register_static_module("Option<String>", exported_module!(StringModule).into());
117801        }
117802    }
117803    #[cfg(feature = "rhai")]
117804    #[allow(unused_mut)]
117805    impl rhai::CustomType for ChatBoost {
117806        fn build(mut builder: rhai::TypeBuilder<Self>) {
117807            builder.with_get("boost_id", Self::rhai_get_boost_id);
117808            builder.with_get("add_date", Self::rhai_get_add_date);
117809            builder.with_get("expiration_date", Self::rhai_get_expiration_date);
117810            builder.with_get("source", Self::rhai_get_source);
117811            builder.on_debug(|t| format!("{:?}", t));
117812            drop(builder);
117813        }
117814    }
117815    #[cfg(feature = "rhai")]
117816    impl SetupRhai for ShippingOption {
117817        fn setup_rhai(engine: &mut rhai::Engine) {
117818            engine.build_type::<ShippingOption>();
117819            engine
117820                .register_type_with_name::<Option<i64>>("Option<i64>")
117821                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117822            engine
117823                .register_type_with_name::<Option<LabeledPrice>>("Option<LabeledPrice>")
117824                .build_type::<LabeledPrice>()
117825                .register_static_module(
117826                    "Option<LabeledPrice>",
117827                    exported_module!(LabeledPriceModule).into(),
117828                );
117829            engine
117830                .register_type_with_name::<Option<String>>("Option<String>")
117831                .register_static_module("Option<String>", exported_module!(StringModule).into());
117832        }
117833    }
117834    #[cfg(feature = "rhai")]
117835    #[allow(unused_mut)]
117836    impl rhai::CustomType for ShippingOption {
117837        fn build(mut builder: rhai::TypeBuilder<Self>) {
117838            builder.with_get("id", Self::rhai_get_id);
117839            builder.with_get("title", Self::rhai_get_title);
117840            builder.with_get("prices", Self::rhai_get_prices);
117841            builder.on_debug(|t| format!("{:?}", t));
117842            drop(builder);
117843        }
117844    }
117845    #[cfg(feature = "rhai")]
117846    impl SetupRhai for PassportElementErrorFrontSide {
117847        fn setup_rhai(engine: &mut rhai::Engine) {
117848            engine.build_type::<PassportElementErrorFrontSide>();
117849            engine
117850                .register_type_with_name::<Option<String>>("Option<String>")
117851                .register_static_module("Option<String>", exported_module!(StringModule).into());
117852        }
117853    }
117854    #[cfg(feature = "rhai")]
117855    #[allow(unused_mut)]
117856    impl rhai::CustomType for PassportElementErrorFrontSide {
117857        fn build(mut builder: rhai::TypeBuilder<Self>) {
117858            builder.with_get("source", Self::rhai_get_source);
117859            builder.with_get("tg_type", Self::rhai_get_tg_type);
117860            builder.with_get("file_hash", Self::rhai_get_file_hash);
117861            builder.with_get("message", Self::rhai_get_message);
117862            builder.on_debug(|t| format!("{:?}", t));
117863            drop(builder);
117864        }
117865    }
117866    #[cfg(feature = "rhai")]
117867    impl SetupRhai for BusinessOpeningHours {
117868        fn setup_rhai(engine: &mut rhai::Engine) {
117869            engine.build_type::<BusinessOpeningHours>();
117870            engine
117871                .register_type_with_name::<Option<BusinessOpeningHoursInterval>>(
117872                    "Option<BusinessOpeningHoursInterval>",
117873                )
117874                .build_type::<BusinessOpeningHoursInterval>()
117875                .register_static_module(
117876                    "Option<BusinessOpeningHoursInterval>",
117877                    exported_module!(BusinessOpeningHoursIntervalModule).into(),
117878                );
117879            engine
117880                .register_type_with_name::<Option<i64>>("Option<i64>")
117881                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117882            engine
117883                .register_type_with_name::<Option<String>>("Option<String>")
117884                .register_static_module("Option<String>", exported_module!(StringModule).into());
117885        }
117886    }
117887    #[cfg(feature = "rhai")]
117888    #[allow(unused_mut)]
117889    impl rhai::CustomType for BusinessOpeningHours {
117890        fn build(mut builder: rhai::TypeBuilder<Self>) {
117891            builder.with_get("time_zone_name", Self::rhai_get_time_zone_name);
117892            builder.with_get("opening_hours", Self::rhai_get_opening_hours);
117893            builder.on_debug(|t| format!("{:?}", t));
117894            drop(builder);
117895        }
117896    }
117897    #[cfg(feature = "rhai")]
117898    impl SetupRhai for Story {
117899        fn setup_rhai(engine: &mut rhai::Engine) {
117900            engine.build_type::<Story>();
117901            engine
117902                .register_type_with_name::<Option<bool>>("Option<bool>")
117903                .register_static_module("Option<bool>", exported_module!(boolModule).into());
117904            engine
117905                .register_type_with_name::<Option<Chat>>("Option<Chat>")
117906                .build_type::<Chat>()
117907                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
117908            engine
117909                .register_type_with_name::<Option<i64>>("Option<i64>")
117910                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117911            engine
117912                .register_type_with_name::<Option<String>>("Option<String>")
117913                .register_static_module("Option<String>", exported_module!(StringModule).into());
117914        }
117915    }
117916    #[cfg(feature = "rhai")]
117917    #[allow(unused_mut)]
117918    impl rhai::CustomType for Story {
117919        fn build(mut builder: rhai::TypeBuilder<Self>) {
117920            builder.with_get("chat", Self::rhai_get_chat);
117921            builder.with_get("id", Self::rhai_get_id);
117922            builder.on_debug(|t| format!("{:?}", t));
117923            drop(builder);
117924        }
117925    }
117926    #[cfg(feature = "rhai")]
117927    impl SetupRhai for WebAppInfo {
117928        fn setup_rhai(engine: &mut rhai::Engine) {
117929            engine.build_type::<WebAppInfo>();
117930            engine
117931                .register_type_with_name::<Option<String>>("Option<String>")
117932                .register_static_module("Option<String>", exported_module!(StringModule).into());
117933        }
117934    }
117935    #[cfg(feature = "rhai")]
117936    #[allow(unused_mut)]
117937    impl rhai::CustomType for WebAppInfo {
117938        fn build(mut builder: rhai::TypeBuilder<Self>) {
117939            builder.with_get("url", Self::rhai_get_url);
117940            builder.on_debug(|t| format!("{:?}", t));
117941            drop(builder);
117942        }
117943    }
117944    #[cfg(feature = "rhai")]
117945    impl SetupRhai for BotCommandScopeChatMember {
117946        fn setup_rhai(engine: &mut rhai::Engine) {
117947            engine.build_type::<BotCommandScopeChatMember>();
117948            engine
117949                .register_type_with_name::<Option<i64>>("Option<i64>")
117950                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117951            engine
117952                .register_type_with_name::<Option<String>>("Option<String>")
117953                .register_static_module("Option<String>", exported_module!(StringModule).into());
117954        }
117955    }
117956    #[cfg(feature = "rhai")]
117957    #[allow(unused_mut)]
117958    impl rhai::CustomType for BotCommandScopeChatMember {
117959        fn build(mut builder: rhai::TypeBuilder<Self>) {
117960            builder.with_get("tg_type", Self::rhai_get_tg_type);
117961            builder.with_get("chat_id", Self::rhai_get_chat_id);
117962            builder.with_get("user_id", Self::rhai_get_user_id);
117963            builder.on_debug(|t| format!("{:?}", t));
117964            drop(builder);
117965        }
117966    }
117967    #[cfg(feature = "rhai")]
117968    impl SetupRhai for ChatBackground {
117969        fn setup_rhai(engine: &mut rhai::Engine) {
117970            engine.build_type::<ChatBackground>();
117971            engine
117972                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
117973                .register_static_module(
117974                    "Option<BackgroundType>",
117975                    exported_module!(BackgroundTypeModule).into(),
117976                );
117977        }
117978    }
117979    #[cfg(feature = "rhai")]
117980    #[allow(unused_mut)]
117981    impl rhai::CustomType for ChatBackground {
117982        fn build(mut builder: rhai::TypeBuilder<Self>) {
117983            builder.with_get("tg_type", Self::rhai_get_tg_type);
117984            builder.on_debug(|t| format!("{:?}", t));
117985            drop(builder);
117986        }
117987    }
117988    #[cfg(feature = "rhai")]
117989    impl SetupRhai for PassportFile {
117990        fn setup_rhai(engine: &mut rhai::Engine) {
117991            engine.build_type::<PassportFile>();
117992            engine
117993                .register_type_with_name::<Option<i64>>("Option<i64>")
117994                .register_static_module("Option<i64>", exported_module!(i64Module).into());
117995            engine
117996                .register_type_with_name::<Option<String>>("Option<String>")
117997                .register_static_module("Option<String>", exported_module!(StringModule).into());
117998        }
117999    }
118000    #[cfg(feature = "rhai")]
118001    #[allow(unused_mut)]
118002    impl rhai::CustomType for PassportFile {
118003        fn build(mut builder: rhai::TypeBuilder<Self>) {
118004            builder.with_get("file_id", Self::rhai_get_file_id);
118005            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
118006            builder.with_get("file_size", Self::rhai_get_file_size);
118007            builder.with_get("file_date", Self::rhai_get_file_date);
118008            builder.on_debug(|t| format!("{:?}", t));
118009            drop(builder);
118010        }
118011    }
118012    #[cfg(feature = "rhai")]
118013    impl SetupRhai for BotCommandScopeAllChatAdministrators {
118014        fn setup_rhai(engine: &mut rhai::Engine) {
118015            engine.build_type::<BotCommandScopeAllChatAdministrators>();
118016            engine
118017                .register_type_with_name::<Option<String>>("Option<String>")
118018                .register_static_module("Option<String>", exported_module!(StringModule).into());
118019        }
118020    }
118021    #[cfg(feature = "rhai")]
118022    #[allow(unused_mut)]
118023    impl rhai::CustomType for BotCommandScopeAllChatAdministrators {
118024        fn build(mut builder: rhai::TypeBuilder<Self>) {
118025            builder.with_get("tg_type", Self::rhai_get_tg_type);
118026            builder.on_debug(|t| format!("{:?}", t));
118027            drop(builder);
118028        }
118029    }
118030    #[cfg(feature = "rhai")]
118031    impl SetupRhai for ExternalReplyInfo {
118032        fn setup_rhai(engine: &mut rhai::Engine) {
118033            engine.build_type::<ExternalReplyInfo>();
118034            engine
118035                .register_type_with_name::<Option<Animation>>("Option<Animation>")
118036                .build_type::<Animation>()
118037                .register_static_module(
118038                    "Option<Animation>",
118039                    exported_module!(AnimationModule).into(),
118040                );
118041            engine
118042                .register_type_with_name::<Option<Audio>>("Option<Audio>")
118043                .build_type::<Audio>()
118044                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
118045            engine
118046                .register_type_with_name::<Option<bool>>("Option<bool>")
118047                .register_static_module("Option<bool>", exported_module!(boolModule).into());
118048            engine
118049                .register_type_with_name::<Option<Chat>>("Option<Chat>")
118050                .build_type::<Chat>()
118051                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
118052            engine
118053                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
118054                .build_type::<Checklist>()
118055                .register_static_module(
118056                    "Option<Checklist>",
118057                    exported_module!(ChecklistModule).into(),
118058                );
118059            engine
118060                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
118061                .build_type::<ChecklistTask>()
118062                .register_static_module(
118063                    "Option<ChecklistTask>",
118064                    exported_module!(ChecklistTaskModule).into(),
118065                );
118066            engine
118067                .register_type_with_name::<Option<Contact>>("Option<Contact>")
118068                .build_type::<Contact>()
118069                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
118070            engine
118071                .register_type_with_name::<Option<Dice>>("Option<Dice>")
118072                .build_type::<Dice>()
118073                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
118074            engine
118075                .register_type_with_name::<Option<Document>>("Option<Document>")
118076                .build_type::<Document>()
118077                .register_static_module(
118078                    "Option<Document>",
118079                    exported_module!(DocumentModule).into(),
118080                );
118081            engine
118082                .register_type_with_name::<Option<File>>("Option<File>")
118083                .build_type::<File>()
118084                .register_static_module("Option<File>", exported_module!(FileModule).into());
118085            engine
118086                .register_type_with_name::<Option<f64>>("Option<f64>")
118087                .register_static_module("Option<f64>", exported_module!(f64Module).into());
118088            engine
118089                .register_type_with_name::<Option<Game>>("Option<Game>")
118090                .build_type::<Game>()
118091                .register_static_module("Option<Game>", exported_module!(GameModule).into());
118092            engine
118093                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
118094                .build_type::<Giveaway>()
118095                .register_static_module(
118096                    "Option<Giveaway>",
118097                    exported_module!(GiveawayModule).into(),
118098                );
118099            engine
118100                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
118101                .build_type::<GiveawayWinners>()
118102                .register_static_module(
118103                    "Option<GiveawayWinners>",
118104                    exported_module!(GiveawayWinnersModule).into(),
118105                );
118106            engine
118107                .register_type_with_name::<Option<i64>>("Option<i64>")
118108                .register_static_module("Option<i64>", exported_module!(i64Module).into());
118109            engine
118110                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
118111                .build_type::<Invoice>()
118112                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
118113            engine
118114                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
118115                .build_type::<LinkPreviewOptions>()
118116                .register_static_module(
118117                    "Option<LinkPreviewOptions>",
118118                    exported_module!(LinkPreviewOptionsModule).into(),
118119                );
118120            engine
118121                .register_type_with_name::<Option<Location>>("Option<Location>")
118122                .build_type::<Location>()
118123                .register_static_module(
118124                    "Option<Location>",
118125                    exported_module!(LocationModule).into(),
118126                );
118127            engine
118128                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
118129                .build_type::<MaskPosition>()
118130                .register_static_module(
118131                    "Option<MaskPosition>",
118132                    exported_module!(MaskPositionModule).into(),
118133                );
118134            engine
118135                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
118136                .build_type::<MessageEntity>()
118137                .register_static_module(
118138                    "Option<MessageEntity>",
118139                    exported_module!(MessageEntityModule).into(),
118140                );
118141            engine
118142                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
118143                .register_static_module(
118144                    "Option<MessageOrigin>",
118145                    exported_module!(MessageOriginModule).into(),
118146                );
118147            engine
118148                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
118149                .register_static_module(
118150                    "Option<PaidMedia>",
118151                    exported_module!(PaidMediaModule).into(),
118152                );
118153            engine
118154                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
118155                .build_type::<PaidMediaInfo>()
118156                .register_static_module(
118157                    "Option<PaidMediaInfo>",
118158                    exported_module!(PaidMediaInfoModule).into(),
118159                );
118160            engine
118161                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
118162                .build_type::<PhotoSize>()
118163                .register_static_module(
118164                    "Option<PhotoSize>",
118165                    exported_module!(PhotoSizeModule).into(),
118166                );
118167            engine
118168                .register_type_with_name::<Option<Poll>>("Option<Poll>")
118169                .build_type::<Poll>()
118170                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
118171            engine
118172                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
118173                .build_type::<PollOption>()
118174                .register_static_module(
118175                    "Option<PollOption>",
118176                    exported_module!(PollOptionModule).into(),
118177                );
118178            engine
118179                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
118180                .build_type::<Sticker>()
118181                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
118182            engine
118183                .register_type_with_name::<Option<Story>>("Option<Story>")
118184                .build_type::<Story>()
118185                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
118186            engine
118187                .register_type_with_name::<Option<String>>("Option<String>")
118188                .register_static_module("Option<String>", exported_module!(StringModule).into());
118189            engine
118190                .register_type_with_name::<Option<User>>("Option<User>")
118191                .build_type::<User>()
118192                .register_static_module("Option<User>", exported_module!(UserModule).into());
118193            engine
118194                .register_type_with_name::<Option<Venue>>("Option<Venue>")
118195                .build_type::<Venue>()
118196                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
118197            engine
118198                .register_type_with_name::<Option<Video>>("Option<Video>")
118199                .build_type::<Video>()
118200                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
118201            engine
118202                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
118203                .build_type::<VideoNote>()
118204                .register_static_module(
118205                    "Option<VideoNote>",
118206                    exported_module!(VideoNoteModule).into(),
118207                );
118208            engine
118209                .register_type_with_name::<Option<Voice>>("Option<Voice>")
118210                .build_type::<Voice>()
118211                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
118212        }
118213    }
118214    #[cfg(feature = "rhai")]
118215    #[allow(unused_mut)]
118216    impl rhai::CustomType for ExternalReplyInfo {
118217        fn build(mut builder: rhai::TypeBuilder<Self>) {
118218            builder.with_get("origin", Self::rhai_get_origin);
118219            builder.with_get("chat", Self::rhai_get_chat);
118220            builder.with_get("message_id", Self::rhai_get_message_id);
118221            builder.with_get("link_preview_options", Self::rhai_get_link_preview_options);
118222            builder.with_get("animation", Self::rhai_get_animation);
118223            builder.with_get("audio", Self::rhai_get_audio);
118224            builder.with_get("document", Self::rhai_get_document);
118225            builder.with_get("paid_media", Self::rhai_get_paid_media);
118226            builder.with_get("photo", Self::rhai_get_photo);
118227            builder.with_get("sticker", Self::rhai_get_sticker);
118228            builder.with_get("story", Self::rhai_get_story);
118229            builder.with_get("video", Self::rhai_get_video);
118230            builder.with_get("video_note", Self::rhai_get_video_note);
118231            builder.with_get("voice", Self::rhai_get_voice);
118232            builder.with_get("has_media_spoiler", Self::rhai_get_has_media_spoiler);
118233            builder.with_get("checklist", Self::rhai_get_checklist);
118234            builder.with_get("contact", Self::rhai_get_contact);
118235            builder.with_get("dice", Self::rhai_get_dice);
118236            builder.with_get("game", Self::rhai_get_game);
118237            builder.with_get("giveaway", Self::rhai_get_giveaway);
118238            builder.with_get("giveaway_winners", Self::rhai_get_giveaway_winners);
118239            builder.with_get("invoice", Self::rhai_get_invoice);
118240            builder.with_get("location", Self::rhai_get_location);
118241            builder.with_get("poll", Self::rhai_get_poll);
118242            builder.with_get("venue", Self::rhai_get_venue);
118243            builder.on_debug(|t| format!("{:?}", t));
118244            drop(builder);
118245        }
118246    }
118247    #[cfg(feature = "rhai")]
118248    impl SetupRhai for InlineQueryResultCachedGif {
118249        fn setup_rhai(engine: &mut rhai::Engine) {
118250            engine.build_type::<InlineQueryResultCachedGif>();
118251            engine
118252                .register_type_with_name::<Option<bool>>("Option<bool>")
118253                .register_static_module("Option<bool>", exported_module!(boolModule).into());
118254            engine
118255                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
118256                .build_type::<CallbackGame>()
118257                .register_static_module(
118258                    "Option<CallbackGame>",
118259                    exported_module!(CallbackGameModule).into(),
118260                );
118261            engine
118262                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
118263                .build_type::<CopyTextButton>()
118264                .register_static_module(
118265                    "Option<CopyTextButton>",
118266                    exported_module!(CopyTextButtonModule).into(),
118267                );
118268            engine
118269                .register_type_with_name::<Option<InlineKeyboardButton>>(
118270                    "Option<InlineKeyboardButton>",
118271                )
118272                .build_type::<InlineKeyboardButton>()
118273                .register_static_module(
118274                    "Option<InlineKeyboardButton>",
118275                    exported_module!(InlineKeyboardButtonModule).into(),
118276                );
118277            engine
118278                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
118279                    "Option<InlineKeyboardMarkup>",
118280                )
118281                .build_type::<InlineKeyboardMarkup>()
118282                .register_static_module(
118283                    "Option<InlineKeyboardMarkup>",
118284                    exported_module!(InlineKeyboardMarkupModule).into(),
118285                );
118286            engine
118287                .register_type_with_name::<Option<InputMessageContent>>(
118288                    "Option<InputMessageContent>",
118289                )
118290                .register_static_module(
118291                    "Option<InputMessageContent>",
118292                    exported_module!(InputMessageContentModule).into(),
118293                );
118294            engine
118295                .register_type_with_name::<Option<i64>>("Option<i64>")
118296                .register_static_module("Option<i64>", exported_module!(i64Module).into());
118297            engine
118298                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
118299                .build_type::<LoginUrl>()
118300                .register_static_module(
118301                    "Option<LoginUrl>",
118302                    exported_module!(LoginUrlModule).into(),
118303                );
118304            engine
118305                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
118306                .build_type::<MessageEntity>()
118307                .register_static_module(
118308                    "Option<MessageEntity>",
118309                    exported_module!(MessageEntityModule).into(),
118310                );
118311            engine
118312                .register_type_with_name::<Option<String>>("Option<String>")
118313                .register_static_module("Option<String>", exported_module!(StringModule).into());
118314            engine
118315                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
118316                    "Option<SwitchInlineQueryChosenChat>",
118317                )
118318                .build_type::<SwitchInlineQueryChosenChat>()
118319                .register_static_module(
118320                    "Option<SwitchInlineQueryChosenChat>",
118321                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
118322                );
118323            engine
118324                .register_type_with_name::<Option<User>>("Option<User>")
118325                .build_type::<User>()
118326                .register_static_module("Option<User>", exported_module!(UserModule).into());
118327            engine
118328                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
118329                .build_type::<WebAppInfo>()
118330                .register_static_module(
118331                    "Option<WebAppInfo>",
118332                    exported_module!(WebAppInfoModule).into(),
118333                );
118334        }
118335    }
118336    #[cfg(feature = "rhai")]
118337    #[allow(unused_mut)]
118338    impl rhai::CustomType for InlineQueryResultCachedGif {
118339        fn build(mut builder: rhai::TypeBuilder<Self>) {
118340            builder.with_get("tg_type", Self::rhai_get_tg_type);
118341            builder.with_get("id", Self::rhai_get_id);
118342            builder.with_get("gif_file_id", Self::rhai_get_gif_file_id);
118343            builder.with_get("title", Self::rhai_get_title);
118344            builder.with_get("caption", Self::rhai_get_caption);
118345            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
118346            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
118347            builder.with_get(
118348                "show_caption_above_media",
118349                Self::rhai_get_show_caption_above_media,
118350            );
118351            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
118352            builder.with_get(
118353                "input_message_content",
118354                Self::rhai_get_input_message_content,
118355            );
118356            builder.on_debug(|t| format!("{:?}", t));
118357            drop(builder);
118358        }
118359    }
118360    #[cfg(feature = "rhai")]
118361    impl SetupRhai for WriteAccessAllowed {
118362        fn setup_rhai(engine: &mut rhai::Engine) {
118363            engine.build_type::<WriteAccessAllowed>();
118364            engine
118365                .register_type_with_name::<Option<bool>>("Option<bool>")
118366                .register_static_module("Option<bool>", exported_module!(boolModule).into());
118367            engine
118368                .register_type_with_name::<Option<String>>("Option<String>")
118369                .register_static_module("Option<String>", exported_module!(StringModule).into());
118370        }
118371    }
118372    #[cfg(feature = "rhai")]
118373    #[allow(unused_mut)]
118374    impl rhai::CustomType for WriteAccessAllowed {
118375        fn build(mut builder: rhai::TypeBuilder<Self>) {
118376            builder.with_get("from_request", Self::rhai_get_from_request);
118377            builder.with_get("web_app_name", Self::rhai_get_web_app_name);
118378            builder.with_get("from_attachment_menu", Self::rhai_get_from_attachment_menu);
118379            builder.on_debug(|t| format!("{:?}", t));
118380            drop(builder);
118381        }
118382    }
118383    #[cfg(feature = "rhai")]
118384    impl SetupRhai for TransactionPartnerTelegramApi {
118385        fn setup_rhai(engine: &mut rhai::Engine) {
118386            engine.build_type::<TransactionPartnerTelegramApi>();
118387            engine
118388                .register_type_with_name::<Option<i64>>("Option<i64>")
118389                .register_static_module("Option<i64>", exported_module!(i64Module).into());
118390            engine
118391                .register_type_with_name::<Option<String>>("Option<String>")
118392                .register_static_module("Option<String>", exported_module!(StringModule).into());
118393        }
118394    }
118395    #[cfg(feature = "rhai")]
118396    #[allow(unused_mut)]
118397    impl rhai::CustomType for TransactionPartnerTelegramApi {
118398        fn build(mut builder: rhai::TypeBuilder<Self>) {
118399            builder.with_get("tg_type", Self::rhai_get_tg_type);
118400            builder.with_get("request_count", Self::rhai_get_request_count);
118401            builder.on_debug(|t| format!("{:?}", t));
118402            drop(builder);
118403        }
118404    }
118405    #[cfg(feature = "rhai")]
118406    impl SetupRhai for ProximityAlertTriggered {
118407        fn setup_rhai(engine: &mut rhai::Engine) {
118408            engine.build_type::<ProximityAlertTriggered>();
118409            engine
118410                .register_type_with_name::<Option<bool>>("Option<bool>")
118411                .register_static_module("Option<bool>", exported_module!(boolModule).into());
118412            engine
118413                .register_type_with_name::<Option<i64>>("Option<i64>")
118414                .register_static_module("Option<i64>", exported_module!(i64Module).into());
118415            engine
118416                .register_type_with_name::<Option<String>>("Option<String>")
118417                .register_static_module("Option<String>", exported_module!(StringModule).into());
118418            engine
118419                .register_type_with_name::<Option<User>>("Option<User>")
118420                .build_type::<User>()
118421                .register_static_module("Option<User>", exported_module!(UserModule).into());
118422        }
118423    }
118424    #[cfg(feature = "rhai")]
118425    #[allow(unused_mut)]
118426    impl rhai::CustomType for ProximityAlertTriggered {
118427        fn build(mut builder: rhai::TypeBuilder<Self>) {
118428            builder.with_get("traveler", Self::rhai_get_traveler);
118429            builder.with_get("watcher", Self::rhai_get_watcher);
118430            builder.with_get("distance", Self::rhai_get_distance);
118431            builder.on_debug(|t| format!("{:?}", t));
118432            drop(builder);
118433        }
118434    }
118435    #[cfg(feature = "rhai")]
118436    impl SetupRhai for InlineQueryResultAudio {
118437        fn setup_rhai(engine: &mut rhai::Engine) {
118438            engine.build_type::<InlineQueryResultAudio>();
118439            engine
118440                .register_type_with_name::<Option<bool>>("Option<bool>")
118441                .register_static_module("Option<bool>", exported_module!(boolModule).into());
118442            engine
118443                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
118444                .build_type::<CallbackGame>()
118445                .register_static_module(
118446                    "Option<CallbackGame>",
118447                    exported_module!(CallbackGameModule).into(),
118448                );
118449            engine
118450                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
118451                .build_type::<CopyTextButton>()
118452                .register_static_module(
118453                    "Option<CopyTextButton>",
118454                    exported_module!(CopyTextButtonModule).into(),
118455                );
118456            engine
118457                .register_type_with_name::<Option<InlineKeyboardButton>>(
118458                    "Option<InlineKeyboardButton>",
118459                )
118460                .build_type::<InlineKeyboardButton>()
118461                .register_static_module(
118462                    "Option<InlineKeyboardButton>",
118463                    exported_module!(InlineKeyboardButtonModule).into(),
118464                );
118465            engine
118466                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
118467                    "Option<InlineKeyboardMarkup>",
118468                )
118469                .build_type::<InlineKeyboardMarkup>()
118470                .register_static_module(
118471                    "Option<InlineKeyboardMarkup>",
118472                    exported_module!(InlineKeyboardMarkupModule).into(),
118473                );
118474            engine
118475                .register_type_with_name::<Option<InputMessageContent>>(
118476                    "Option<InputMessageContent>",
118477                )
118478                .register_static_module(
118479                    "Option<InputMessageContent>",
118480                    exported_module!(InputMessageContentModule).into(),
118481                );
118482            engine
118483                .register_type_with_name::<Option<i64>>("Option<i64>")
118484                .register_static_module("Option<i64>", exported_module!(i64Module).into());
118485            engine
118486                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
118487                .build_type::<LoginUrl>()
118488                .register_static_module(
118489                    "Option<LoginUrl>",
118490                    exported_module!(LoginUrlModule).into(),
118491                );
118492            engine
118493                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
118494                .build_type::<MessageEntity>()
118495                .register_static_module(
118496                    "Option<MessageEntity>",
118497                    exported_module!(MessageEntityModule).into(),
118498                );
118499            engine
118500                .register_type_with_name::<Option<String>>("Option<String>")
118501                .register_static_module("Option<String>", exported_module!(StringModule).into());
118502            engine
118503                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
118504                    "Option<SwitchInlineQueryChosenChat>",
118505                )
118506                .build_type::<SwitchInlineQueryChosenChat>()
118507                .register_static_module(
118508                    "Option<SwitchInlineQueryChosenChat>",
118509                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
118510                );
118511            engine
118512                .register_type_with_name::<Option<User>>("Option<User>")
118513                .build_type::<User>()
118514                .register_static_module("Option<User>", exported_module!(UserModule).into());
118515            engine
118516                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
118517                .build_type::<WebAppInfo>()
118518                .register_static_module(
118519                    "Option<WebAppInfo>",
118520                    exported_module!(WebAppInfoModule).into(),
118521                );
118522        }
118523    }
118524    #[cfg(feature = "rhai")]
118525    #[allow(unused_mut)]
118526    impl rhai::CustomType for InlineQueryResultAudio {
118527        fn build(mut builder: rhai::TypeBuilder<Self>) {
118528            builder.with_get("tg_type", Self::rhai_get_tg_type);
118529            builder.with_get("id", Self::rhai_get_id);
118530            builder.with_get("audio_url", Self::rhai_get_audio_url);
118531            builder.with_get("title", Self::rhai_get_title);
118532            builder.with_get("caption", Self::rhai_get_caption);
118533            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
118534            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
118535            builder.with_get("performer", Self::rhai_get_performer);
118536            builder.with_get("audio_duration", Self::rhai_get_audio_duration);
118537            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
118538            builder.with_get(
118539                "input_message_content",
118540                Self::rhai_get_input_message_content,
118541            );
118542            builder.on_debug(|t| format!("{:?}", t));
118543            drop(builder);
118544        }
118545    }
118546    #[cfg(feature = "rhai")]
118547    impl SetupRhai for Message {
118548        fn setup_rhai(engine: &mut rhai::Engine) {
118549            engine.build_type::<Message>();
118550            engine
118551                .register_type_with_name::<Option<Animation>>("Option<Animation>")
118552                .build_type::<Animation>()
118553                .register_static_module(
118554                    "Option<Animation>",
118555                    exported_module!(AnimationModule).into(),
118556                );
118557            engine
118558                .register_type_with_name::<Option<Audio>>("Option<Audio>")
118559                .build_type::<Audio>()
118560                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
118561            engine
118562                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
118563                .register_static_module(
118564                    "Option<BackgroundType>",
118565                    exported_module!(BackgroundTypeModule).into(),
118566                );
118567            engine
118568                .register_type_with_name::<Option<bool>>("Option<bool>")
118569                .register_static_module("Option<bool>", exported_module!(boolModule).into());
118570            engine
118571                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
118572                .build_type::<CallbackGame>()
118573                .register_static_module(
118574                    "Option<CallbackGame>",
118575                    exported_module!(CallbackGameModule).into(),
118576                );
118577            engine
118578                .register_type_with_name::<Option<Chat>>("Option<Chat>")
118579                .build_type::<Chat>()
118580                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
118581            engine
118582                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
118583                .build_type::<ChatBackground>()
118584                .register_static_module(
118585                    "Option<ChatBackground>",
118586                    exported_module!(ChatBackgroundModule).into(),
118587                );
118588            engine
118589                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
118590                .build_type::<ChatBoostAdded>()
118591                .register_static_module(
118592                    "Option<ChatBoostAdded>",
118593                    exported_module!(ChatBoostAddedModule).into(),
118594                );
118595            engine
118596                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
118597                .build_type::<ChatShared>()
118598                .register_static_module(
118599                    "Option<ChatShared>",
118600                    exported_module!(ChatSharedModule).into(),
118601                );
118602            engine
118603                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
118604                .build_type::<Checklist>()
118605                .register_static_module(
118606                    "Option<Checklist>",
118607                    exported_module!(ChecklistModule).into(),
118608                );
118609            engine
118610                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
118611                .build_type::<ChecklistTask>()
118612                .register_static_module(
118613                    "Option<ChecklistTask>",
118614                    exported_module!(ChecklistTaskModule).into(),
118615                );
118616            engine
118617                .register_type_with_name::<Option<ChecklistTasksAdded>>(
118618                    "Option<ChecklistTasksAdded>",
118619                )
118620                .build_type::<ChecklistTasksAdded>()
118621                .register_static_module(
118622                    "Option<ChecklistTasksAdded>",
118623                    exported_module!(ChecklistTasksAddedModule).into(),
118624                );
118625            engine
118626                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
118627                .build_type::<ChecklistTasksDone>()
118628                .register_static_module(
118629                    "Option<ChecklistTasksDone>",
118630                    exported_module!(ChecklistTasksDoneModule).into(),
118631                );
118632            engine
118633                .register_type_with_name::<Option<Contact>>("Option<Contact>")
118634                .build_type::<Contact>()
118635                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
118636            engine
118637                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
118638                .build_type::<CopyTextButton>()
118639                .register_static_module(
118640                    "Option<CopyTextButton>",
118641                    exported_module!(CopyTextButtonModule).into(),
118642                );
118643            engine
118644                .register_type_with_name::<Option<Dice>>("Option<Dice>")
118645                .build_type::<Dice>()
118646                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
118647            engine
118648                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
118649                    "Option<DirectMessagePriceChanged>",
118650                )
118651                .build_type::<DirectMessagePriceChanged>()
118652                .register_static_module(
118653                    "Option<DirectMessagePriceChanged>",
118654                    exported_module!(DirectMessagePriceChangedModule).into(),
118655                );
118656            engine
118657                .register_type_with_name::<Option<DirectMessagesTopic>>(
118658                    "Option<DirectMessagesTopic>",
118659                )
118660                .build_type::<DirectMessagesTopic>()
118661                .register_static_module(
118662                    "Option<DirectMessagesTopic>",
118663                    exported_module!(DirectMessagesTopicModule).into(),
118664                );
118665            engine
118666                .register_type_with_name::<Option<Document>>("Option<Document>")
118667                .build_type::<Document>()
118668                .register_static_module(
118669                    "Option<Document>",
118670                    exported_module!(DocumentModule).into(),
118671                );
118672            engine
118673                .register_type_with_name::<Option<EncryptedCredentials>>(
118674                    "Option<EncryptedCredentials>",
118675                )
118676                .build_type::<EncryptedCredentials>()
118677                .register_static_module(
118678                    "Option<EncryptedCredentials>",
118679                    exported_module!(EncryptedCredentialsModule).into(),
118680                );
118681            engine
118682                .register_type_with_name::<Option<EncryptedPassportElement>>(
118683                    "Option<EncryptedPassportElement>",
118684                )
118685                .build_type::<EncryptedPassportElement>()
118686                .register_static_module(
118687                    "Option<EncryptedPassportElement>",
118688                    exported_module!(EncryptedPassportElementModule).into(),
118689                );
118690            engine
118691                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
118692                .build_type::<ExternalReplyInfo>()
118693                .register_static_module(
118694                    "Option<ExternalReplyInfo>",
118695                    exported_module!(ExternalReplyInfoModule).into(),
118696                );
118697            engine
118698                .register_type_with_name::<Option<File>>("Option<File>")
118699                .build_type::<File>()
118700                .register_static_module("Option<File>", exported_module!(FileModule).into());
118701            engine
118702                .register_type_with_name::<Option<f64>>("Option<f64>")
118703                .register_static_module("Option<f64>", exported_module!(f64Module).into());
118704            engine
118705                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
118706                .build_type::<ForumTopicClosed>()
118707                .register_static_module(
118708                    "Option<ForumTopicClosed>",
118709                    exported_module!(ForumTopicClosedModule).into(),
118710                );
118711            engine
118712                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
118713                .build_type::<ForumTopicCreated>()
118714                .register_static_module(
118715                    "Option<ForumTopicCreated>",
118716                    exported_module!(ForumTopicCreatedModule).into(),
118717                );
118718            engine
118719                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
118720                .build_type::<ForumTopicEdited>()
118721                .register_static_module(
118722                    "Option<ForumTopicEdited>",
118723                    exported_module!(ForumTopicEditedModule).into(),
118724                );
118725            engine
118726                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
118727                .build_type::<ForumTopicReopened>()
118728                .register_static_module(
118729                    "Option<ForumTopicReopened>",
118730                    exported_module!(ForumTopicReopenedModule).into(),
118731                );
118732            engine
118733                .register_type_with_name::<Option<Game>>("Option<Game>")
118734                .build_type::<Game>()
118735                .register_static_module("Option<Game>", exported_module!(GameModule).into());
118736            engine
118737                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
118738                    "Option<GeneralForumTopicHidden>",
118739                )
118740                .build_type::<GeneralForumTopicHidden>()
118741                .register_static_module(
118742                    "Option<GeneralForumTopicHidden>",
118743                    exported_module!(GeneralForumTopicHiddenModule).into(),
118744                );
118745            engine
118746                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
118747                    "Option<GeneralForumTopicUnhidden>",
118748                )
118749                .build_type::<GeneralForumTopicUnhidden>()
118750                .register_static_module(
118751                    "Option<GeneralForumTopicUnhidden>",
118752                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
118753                );
118754            engine
118755                .register_type_with_name::<Option<Gift>>("Option<Gift>")
118756                .build_type::<Gift>()
118757                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
118758            engine
118759                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
118760                .build_type::<GiftInfo>()
118761                .register_static_module(
118762                    "Option<GiftInfo>",
118763                    exported_module!(GiftInfoModule).into(),
118764                );
118765            engine
118766                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
118767                .build_type::<Giveaway>()
118768                .register_static_module(
118769                    "Option<Giveaway>",
118770                    exported_module!(GiveawayModule).into(),
118771                );
118772            engine
118773                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
118774                .build_type::<GiveawayCompleted>()
118775                .register_static_module(
118776                    "Option<GiveawayCompleted>",
118777                    exported_module!(GiveawayCompletedModule).into(),
118778                );
118779            engine
118780                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
118781                .build_type::<GiveawayCreated>()
118782                .register_static_module(
118783                    "Option<GiveawayCreated>",
118784                    exported_module!(GiveawayCreatedModule).into(),
118785                );
118786            engine
118787                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
118788                .build_type::<GiveawayWinners>()
118789                .register_static_module(
118790                    "Option<GiveawayWinners>",
118791                    exported_module!(GiveawayWinnersModule).into(),
118792                );
118793            engine
118794                .register_type_with_name::<Option<InlineKeyboardButton>>(
118795                    "Option<InlineKeyboardButton>",
118796                )
118797                .build_type::<InlineKeyboardButton>()
118798                .register_static_module(
118799                    "Option<InlineKeyboardButton>",
118800                    exported_module!(InlineKeyboardButtonModule).into(),
118801                );
118802            engine
118803                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
118804                    "Option<InlineKeyboardMarkup>",
118805                )
118806                .build_type::<InlineKeyboardMarkup>()
118807                .register_static_module(
118808                    "Option<InlineKeyboardMarkup>",
118809                    exported_module!(InlineKeyboardMarkupModule).into(),
118810                );
118811            engine
118812                .register_type_with_name::<Option<i64>>("Option<i64>")
118813                .register_static_module("Option<i64>", exported_module!(i64Module).into());
118814            engine
118815                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
118816                .build_type::<Invoice>()
118817                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
118818            engine
118819                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
118820                .build_type::<LinkPreviewOptions>()
118821                .register_static_module(
118822                    "Option<LinkPreviewOptions>",
118823                    exported_module!(LinkPreviewOptionsModule).into(),
118824                );
118825            engine
118826                .register_type_with_name::<Option<Location>>("Option<Location>")
118827                .build_type::<Location>()
118828                .register_static_module(
118829                    "Option<Location>",
118830                    exported_module!(LocationModule).into(),
118831                );
118832            engine
118833                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
118834                .build_type::<LoginUrl>()
118835                .register_static_module(
118836                    "Option<LoginUrl>",
118837                    exported_module!(LoginUrlModule).into(),
118838                );
118839            engine
118840                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
118841                .build_type::<MaskPosition>()
118842                .register_static_module(
118843                    "Option<MaskPosition>",
118844                    exported_module!(MaskPositionModule).into(),
118845                );
118846            engine
118847                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
118848                    "Option<MaybeInaccessibleMessage>",
118849                )
118850                .register_static_module(
118851                    "Option<MaybeInaccessibleMessage>",
118852                    exported_module!(MaybeInaccessibleMessageModule).into(),
118853                );
118854            engine
118855                .register_type_with_name::<Option<Message>>("Option<Message>")
118856                .build_type::<Message>()
118857                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
118858            engine
118859                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
118860                    "Option<MessageAutoDeleteTimerChanged>",
118861                )
118862                .build_type::<MessageAutoDeleteTimerChanged>()
118863                .register_static_module(
118864                    "Option<MessageAutoDeleteTimerChanged>",
118865                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
118866                );
118867            engine
118868                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
118869                .build_type::<MessageEntity>()
118870                .register_static_module(
118871                    "Option<MessageEntity>",
118872                    exported_module!(MessageEntityModule).into(),
118873                );
118874            engine
118875                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
118876                .register_static_module(
118877                    "Option<MessageOrigin>",
118878                    exported_module!(MessageOriginModule).into(),
118879                );
118880            engine
118881                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
118882                .build_type::<OrderInfo>()
118883                .register_static_module(
118884                    "Option<OrderInfo>",
118885                    exported_module!(OrderInfoModule).into(),
118886                );
118887            engine
118888                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
118889                .register_static_module(
118890                    "Option<PaidMedia>",
118891                    exported_module!(PaidMediaModule).into(),
118892                );
118893            engine
118894                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
118895                .build_type::<PaidMediaInfo>()
118896                .register_static_module(
118897                    "Option<PaidMediaInfo>",
118898                    exported_module!(PaidMediaInfoModule).into(),
118899                );
118900            engine
118901                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
118902                    "Option<PaidMessagePriceChanged>",
118903                )
118904                .build_type::<PaidMessagePriceChanged>()
118905                .register_static_module(
118906                    "Option<PaidMessagePriceChanged>",
118907                    exported_module!(PaidMessagePriceChangedModule).into(),
118908                );
118909            engine
118910                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
118911                .build_type::<PassportData>()
118912                .register_static_module(
118913                    "Option<PassportData>",
118914                    exported_module!(PassportDataModule).into(),
118915                );
118916            engine
118917                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
118918                .build_type::<PassportFile>()
118919                .register_static_module(
118920                    "Option<PassportFile>",
118921                    exported_module!(PassportFileModule).into(),
118922                );
118923            engine
118924                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
118925                .build_type::<PhotoSize>()
118926                .register_static_module(
118927                    "Option<PhotoSize>",
118928                    exported_module!(PhotoSizeModule).into(),
118929                );
118930            engine
118931                .register_type_with_name::<Option<Poll>>("Option<Poll>")
118932                .build_type::<Poll>()
118933                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
118934            engine
118935                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
118936                .build_type::<PollOption>()
118937                .register_static_module(
118938                    "Option<PollOption>",
118939                    exported_module!(PollOptionModule).into(),
118940                );
118941            engine
118942                .register_type_with_name::<Option<ProximityAlertTriggered>>(
118943                    "Option<ProximityAlertTriggered>",
118944                )
118945                .build_type::<ProximityAlertTriggered>()
118946                .register_static_module(
118947                    "Option<ProximityAlertTriggered>",
118948                    exported_module!(ProximityAlertTriggeredModule).into(),
118949                );
118950            engine
118951                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
118952                .build_type::<RefundedPayment>()
118953                .register_static_module(
118954                    "Option<RefundedPayment>",
118955                    exported_module!(RefundedPaymentModule).into(),
118956                );
118957            engine
118958                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
118959                .build_type::<SharedUser>()
118960                .register_static_module(
118961                    "Option<SharedUser>",
118962                    exported_module!(SharedUserModule).into(),
118963                );
118964            engine
118965                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
118966                .build_type::<ShippingAddress>()
118967                .register_static_module(
118968                    "Option<ShippingAddress>",
118969                    exported_module!(ShippingAddressModule).into(),
118970                );
118971            engine
118972                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
118973                .build_type::<StarAmount>()
118974                .register_static_module(
118975                    "Option<StarAmount>",
118976                    exported_module!(StarAmountModule).into(),
118977                );
118978            engine
118979                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
118980                .build_type::<Sticker>()
118981                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
118982            engine
118983                .register_type_with_name::<Option<Story>>("Option<Story>")
118984                .build_type::<Story>()
118985                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
118986            engine
118987                .register_type_with_name::<Option<String>>("Option<String>")
118988                .register_static_module("Option<String>", exported_module!(StringModule).into());
118989            engine
118990                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
118991                .build_type::<SuccessfulPayment>()
118992                .register_static_module(
118993                    "Option<SuccessfulPayment>",
118994                    exported_module!(SuccessfulPaymentModule).into(),
118995                );
118996            engine
118997                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
118998                    "Option<SuggestedPostApprovalFailed>",
118999                )
119000                .build_type::<SuggestedPostApprovalFailed>()
119001                .register_static_module(
119002                    "Option<SuggestedPostApprovalFailed>",
119003                    exported_module!(SuggestedPostApprovalFailedModule).into(),
119004                );
119005            engine
119006                .register_type_with_name::<Option<SuggestedPostApproved>>(
119007                    "Option<SuggestedPostApproved>",
119008                )
119009                .build_type::<SuggestedPostApproved>()
119010                .register_static_module(
119011                    "Option<SuggestedPostApproved>",
119012                    exported_module!(SuggestedPostApprovedModule).into(),
119013                );
119014            engine
119015                .register_type_with_name::<Option<SuggestedPostDeclined>>(
119016                    "Option<SuggestedPostDeclined>",
119017                )
119018                .build_type::<SuggestedPostDeclined>()
119019                .register_static_module(
119020                    "Option<SuggestedPostDeclined>",
119021                    exported_module!(SuggestedPostDeclinedModule).into(),
119022                );
119023            engine
119024                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
119025                .build_type::<SuggestedPostInfo>()
119026                .register_static_module(
119027                    "Option<SuggestedPostInfo>",
119028                    exported_module!(SuggestedPostInfoModule).into(),
119029                );
119030            engine
119031                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
119032                .build_type::<SuggestedPostPaid>()
119033                .register_static_module(
119034                    "Option<SuggestedPostPaid>",
119035                    exported_module!(SuggestedPostPaidModule).into(),
119036                );
119037            engine
119038                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
119039                .build_type::<SuggestedPostPrice>()
119040                .register_static_module(
119041                    "Option<SuggestedPostPrice>",
119042                    exported_module!(SuggestedPostPriceModule).into(),
119043                );
119044            engine
119045                .register_type_with_name::<Option<SuggestedPostRefunded>>(
119046                    "Option<SuggestedPostRefunded>",
119047                )
119048                .build_type::<SuggestedPostRefunded>()
119049                .register_static_module(
119050                    "Option<SuggestedPostRefunded>",
119051                    exported_module!(SuggestedPostRefundedModule).into(),
119052                );
119053            engine
119054                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
119055                    "Option<SwitchInlineQueryChosenChat>",
119056                )
119057                .build_type::<SwitchInlineQueryChosenChat>()
119058                .register_static_module(
119059                    "Option<SwitchInlineQueryChosenChat>",
119060                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
119061                );
119062            engine
119063                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
119064                .build_type::<TextQuote>()
119065                .register_static_module(
119066                    "Option<TextQuote>",
119067                    exported_module!(TextQuoteModule).into(),
119068                );
119069            engine
119070                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
119071                .build_type::<UniqueGift>()
119072                .register_static_module(
119073                    "Option<UniqueGift>",
119074                    exported_module!(UniqueGiftModule).into(),
119075                );
119076            engine
119077                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
119078                .build_type::<UniqueGiftBackdrop>()
119079                .register_static_module(
119080                    "Option<UniqueGiftBackdrop>",
119081                    exported_module!(UniqueGiftBackdropModule).into(),
119082                );
119083            engine
119084                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
119085                    "Option<UniqueGiftBackdropColors>",
119086                )
119087                .build_type::<UniqueGiftBackdropColors>()
119088                .register_static_module(
119089                    "Option<UniqueGiftBackdropColors>",
119090                    exported_module!(UniqueGiftBackdropColorsModule).into(),
119091                );
119092            engine
119093                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
119094                .build_type::<UniqueGiftInfo>()
119095                .register_static_module(
119096                    "Option<UniqueGiftInfo>",
119097                    exported_module!(UniqueGiftInfoModule).into(),
119098                );
119099            engine
119100                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
119101                .build_type::<UniqueGiftModel>()
119102                .register_static_module(
119103                    "Option<UniqueGiftModel>",
119104                    exported_module!(UniqueGiftModelModule).into(),
119105                );
119106            engine
119107                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
119108                .build_type::<UniqueGiftSymbol>()
119109                .register_static_module(
119110                    "Option<UniqueGiftSymbol>",
119111                    exported_module!(UniqueGiftSymbolModule).into(),
119112                );
119113            engine
119114                .register_type_with_name::<Option<User>>("Option<User>")
119115                .build_type::<User>()
119116                .register_static_module("Option<User>", exported_module!(UserModule).into());
119117            engine
119118                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
119119                .build_type::<UsersShared>()
119120                .register_static_module(
119121                    "Option<UsersShared>",
119122                    exported_module!(UsersSharedModule).into(),
119123                );
119124            engine
119125                .register_type_with_name::<Option<Venue>>("Option<Venue>")
119126                .build_type::<Venue>()
119127                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
119128            engine
119129                .register_type_with_name::<Option<Video>>("Option<Video>")
119130                .build_type::<Video>()
119131                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
119132            engine
119133                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
119134                .build_type::<VideoChatEnded>()
119135                .register_static_module(
119136                    "Option<VideoChatEnded>",
119137                    exported_module!(VideoChatEndedModule).into(),
119138                );
119139            engine
119140                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
119141                    "Option<VideoChatParticipantsInvited>",
119142                )
119143                .build_type::<VideoChatParticipantsInvited>()
119144                .register_static_module(
119145                    "Option<VideoChatParticipantsInvited>",
119146                    exported_module!(VideoChatParticipantsInvitedModule).into(),
119147                );
119148            engine
119149                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
119150                .build_type::<VideoChatScheduled>()
119151                .register_static_module(
119152                    "Option<VideoChatScheduled>",
119153                    exported_module!(VideoChatScheduledModule).into(),
119154                );
119155            engine
119156                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
119157                .build_type::<VideoChatStarted>()
119158                .register_static_module(
119159                    "Option<VideoChatStarted>",
119160                    exported_module!(VideoChatStartedModule).into(),
119161                );
119162            engine
119163                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
119164                .build_type::<VideoNote>()
119165                .register_static_module(
119166                    "Option<VideoNote>",
119167                    exported_module!(VideoNoteModule).into(),
119168                );
119169            engine
119170                .register_type_with_name::<Option<Voice>>("Option<Voice>")
119171                .build_type::<Voice>()
119172                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
119173            engine
119174                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
119175                .build_type::<WebAppData>()
119176                .register_static_module(
119177                    "Option<WebAppData>",
119178                    exported_module!(WebAppDataModule).into(),
119179                );
119180            engine
119181                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
119182                .build_type::<WebAppInfo>()
119183                .register_static_module(
119184                    "Option<WebAppInfo>",
119185                    exported_module!(WebAppInfoModule).into(),
119186                );
119187            engine
119188                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
119189                .build_type::<WriteAccessAllowed>()
119190                .register_static_module(
119191                    "Option<WriteAccessAllowed>",
119192                    exported_module!(WriteAccessAllowedModule).into(),
119193                );
119194        }
119195    }
119196    #[cfg(feature = "rhai")]
119197    #[allow(unused_mut)]
119198    impl rhai::CustomType for Message {
119199        fn build(mut builder: rhai::TypeBuilder<Self>) {
119200            builder.with_get("message_id", Self::rhai_get_message_id);
119201            builder.with_get("message_thread_id", Self::rhai_get_message_thread_id);
119202            builder.with_get(
119203                "direct_messages_topic",
119204                Self::rhai_get_direct_messages_topic,
119205            );
119206            builder.with_get("from", Self::rhai_get_from);
119207            builder.with_get("sender_chat", Self::rhai_get_sender_chat);
119208            builder.with_get("sender_boost_count", Self::rhai_get_sender_boost_count);
119209            builder.with_get("sender_business_bot", Self::rhai_get_sender_business_bot);
119210            builder.with_get("date", Self::rhai_get_date);
119211            builder.with_get(
119212                "business_connection_id",
119213                Self::rhai_get_business_connection_id,
119214            );
119215            builder.with_get("chat", Self::rhai_get_chat);
119216            builder.with_get("forward_origin", Self::rhai_get_forward_origin);
119217            builder.with_get("is_topic_message", Self::rhai_get_is_topic_message);
119218            builder.with_get("is_automatic_forward", Self::rhai_get_is_automatic_forward);
119219            builder.with_get("reply_to_message", Self::rhai_get_reply_to_message);
119220            builder.with_get("external_reply", Self::rhai_get_external_reply);
119221            builder.with_get("quote", Self::rhai_get_quote);
119222            builder.with_get("reply_to_story", Self::rhai_get_reply_to_story);
119223            builder.with_get(
119224                "reply_to_checklist_task_id",
119225                Self::rhai_get_reply_to_checklist_task_id,
119226            );
119227            builder.with_get("via_bot", Self::rhai_get_via_bot);
119228            builder.with_get("edit_date", Self::rhai_get_edit_date);
119229            builder.with_get(
119230                "has_protected_content",
119231                Self::rhai_get_has_protected_content,
119232            );
119233            builder.with_get("is_from_offline", Self::rhai_get_is_from_offline);
119234            builder.with_get("is_paid_post", Self::rhai_get_is_paid_post);
119235            builder.with_get("media_group_id", Self::rhai_get_media_group_id);
119236            builder.with_get("author_signature", Self::rhai_get_author_signature);
119237            builder.with_get("paid_star_count", Self::rhai_get_paid_star_count);
119238            builder.with_get("text", Self::rhai_get_text);
119239            builder.with_get("entities", Self::rhai_get_entities);
119240            builder.with_get("link_preview_options", Self::rhai_get_link_preview_options);
119241            builder.with_get("suggested_post_info", Self::rhai_get_suggested_post_info);
119242            builder.with_get("effect_id", Self::rhai_get_effect_id);
119243            builder.with_get("animation", Self::rhai_get_animation);
119244            builder.with_get("audio", Self::rhai_get_audio);
119245            builder.with_get("document", Self::rhai_get_document);
119246            builder.with_get("paid_media", Self::rhai_get_paid_media);
119247            builder.with_get("photo", Self::rhai_get_photo);
119248            builder.with_get("sticker", Self::rhai_get_sticker);
119249            builder.with_get("story", Self::rhai_get_story);
119250            builder.with_get("video", Self::rhai_get_video);
119251            builder.with_get("video_note", Self::rhai_get_video_note);
119252            builder.with_get("voice", Self::rhai_get_voice);
119253            builder.with_get("caption", Self::rhai_get_caption);
119254            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
119255            builder.with_get(
119256                "show_caption_above_media",
119257                Self::rhai_get_show_caption_above_media,
119258            );
119259            builder.with_get("has_media_spoiler", Self::rhai_get_has_media_spoiler);
119260            builder.with_get("checklist", Self::rhai_get_checklist);
119261            builder.with_get("contact", Self::rhai_get_contact);
119262            builder.with_get("dice", Self::rhai_get_dice);
119263            builder.with_get("game", Self::rhai_get_game);
119264            builder.with_get("poll", Self::rhai_get_poll);
119265            builder.with_get("venue", Self::rhai_get_venue);
119266            builder.with_get("location", Self::rhai_get_location);
119267            builder.with_get("new_chat_members", Self::rhai_get_new_chat_members);
119268            builder.with_get("left_chat_member", Self::rhai_get_left_chat_member);
119269            builder.with_get("new_chat_title", Self::rhai_get_new_chat_title);
119270            builder.with_get("new_chat_photo", Self::rhai_get_new_chat_photo);
119271            builder.with_get("delete_chat_photo", Self::rhai_get_delete_chat_photo);
119272            builder.with_get("group_chat_created", Self::rhai_get_group_chat_created);
119273            builder.with_get(
119274                "supergroup_chat_created",
119275                Self::rhai_get_supergroup_chat_created,
119276            );
119277            builder.with_get("channel_chat_created", Self::rhai_get_channel_chat_created);
119278            builder.with_get(
119279                "message_auto_delete_timer_changed",
119280                Self::rhai_get_message_auto_delete_timer_changed,
119281            );
119282            builder.with_get("migrate_to_chat_id", Self::rhai_get_migrate_to_chat_id);
119283            builder.with_get("migrate_from_chat_id", Self::rhai_get_migrate_from_chat_id);
119284            builder.with_get("pinned_message", Self::rhai_get_pinned_message);
119285            builder.with_get("invoice", Self::rhai_get_invoice);
119286            builder.with_get("successful_payment", Self::rhai_get_successful_payment);
119287            builder.with_get("refunded_payment", Self::rhai_get_refunded_payment);
119288            builder.with_get("users_shared", Self::rhai_get_users_shared);
119289            builder.with_get("chat_shared", Self::rhai_get_chat_shared);
119290            builder.with_get("gift", Self::rhai_get_gift);
119291            builder.with_get("unique_gift", Self::rhai_get_unique_gift);
119292            builder.with_get("connected_website", Self::rhai_get_connected_website);
119293            builder.with_get("write_access_allowed", Self::rhai_get_write_access_allowed);
119294            builder.with_get("passport_data", Self::rhai_get_passport_data);
119295            builder.with_get(
119296                "proximity_alert_triggered",
119297                Self::rhai_get_proximity_alert_triggered,
119298            );
119299            builder.with_get("boost_added", Self::rhai_get_boost_added);
119300            builder.with_get("chat_background_set", Self::rhai_get_chat_background_set);
119301            builder.with_get("checklist_tasks_done", Self::rhai_get_checklist_tasks_done);
119302            builder.with_get(
119303                "checklist_tasks_added",
119304                Self::rhai_get_checklist_tasks_added,
119305            );
119306            builder.with_get(
119307                "direct_message_price_changed",
119308                Self::rhai_get_direct_message_price_changed,
119309            );
119310            builder.with_get("forum_topic_created", Self::rhai_get_forum_topic_created);
119311            builder.with_get("forum_topic_edited", Self::rhai_get_forum_topic_edited);
119312            builder.with_get("forum_topic_closed", Self::rhai_get_forum_topic_closed);
119313            builder.with_get("forum_topic_reopened", Self::rhai_get_forum_topic_reopened);
119314            builder.with_get(
119315                "general_forum_topic_hidden",
119316                Self::rhai_get_general_forum_topic_hidden,
119317            );
119318            builder.with_get(
119319                "general_forum_topic_unhidden",
119320                Self::rhai_get_general_forum_topic_unhidden,
119321            );
119322            builder.with_get("giveaway_created", Self::rhai_get_giveaway_created);
119323            builder.with_get("giveaway", Self::rhai_get_giveaway);
119324            builder.with_get("giveaway_winners", Self::rhai_get_giveaway_winners);
119325            builder.with_get("giveaway_completed", Self::rhai_get_giveaway_completed);
119326            builder.with_get(
119327                "paid_message_price_changed",
119328                Self::rhai_get_paid_message_price_changed,
119329            );
119330            builder.with_get(
119331                "suggested_post_approved",
119332                Self::rhai_get_suggested_post_approved,
119333            );
119334            builder.with_get(
119335                "suggested_post_approval_failed",
119336                Self::rhai_get_suggested_post_approval_failed,
119337            );
119338            builder.with_get(
119339                "suggested_post_declined",
119340                Self::rhai_get_suggested_post_declined,
119341            );
119342            builder.with_get("suggested_post_paid", Self::rhai_get_suggested_post_paid);
119343            builder.with_get(
119344                "suggested_post_refunded",
119345                Self::rhai_get_suggested_post_refunded,
119346            );
119347            builder.with_get("video_chat_scheduled", Self::rhai_get_video_chat_scheduled);
119348            builder.with_get("video_chat_started", Self::rhai_get_video_chat_started);
119349            builder.with_get("video_chat_ended", Self::rhai_get_video_chat_ended);
119350            builder.with_get(
119351                "video_chat_participants_invited",
119352                Self::rhai_get_video_chat_participants_invited,
119353            );
119354            builder.with_get("web_app_data", Self::rhai_get_web_app_data);
119355            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
119356            builder.on_debug(|t| format!("{:?}", t));
119357            drop(builder);
119358        }
119359    }
119360    #[cfg(feature = "rhai")]
119361    impl SetupRhai for ChatPhoto {
119362        fn setup_rhai(engine: &mut rhai::Engine) {
119363            engine.build_type::<ChatPhoto>();
119364            engine
119365                .register_type_with_name::<Option<String>>("Option<String>")
119366                .register_static_module("Option<String>", exported_module!(StringModule).into());
119367        }
119368    }
119369    #[cfg(feature = "rhai")]
119370    #[allow(unused_mut)]
119371    impl rhai::CustomType for ChatPhoto {
119372        fn build(mut builder: rhai::TypeBuilder<Self>) {
119373            builder.with_get("small_file_id", Self::rhai_get_small_file_id);
119374            builder.with_get("small_file_unique_id", Self::rhai_get_small_file_unique_id);
119375            builder.with_get("big_file_id", Self::rhai_get_big_file_id);
119376            builder.with_get("big_file_unique_id", Self::rhai_get_big_file_unique_id);
119377            builder.on_debug(|t| format!("{:?}", t));
119378            drop(builder);
119379        }
119380    }
119381    #[cfg(feature = "rhai")]
119382    impl SetupRhai for InlineQueryResultGame {
119383        fn setup_rhai(engine: &mut rhai::Engine) {
119384            engine.build_type::<InlineQueryResultGame>();
119385            engine
119386                .register_type_with_name::<Option<bool>>("Option<bool>")
119387                .register_static_module("Option<bool>", exported_module!(boolModule).into());
119388            engine
119389                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
119390                .build_type::<CallbackGame>()
119391                .register_static_module(
119392                    "Option<CallbackGame>",
119393                    exported_module!(CallbackGameModule).into(),
119394                );
119395            engine
119396                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
119397                .build_type::<CopyTextButton>()
119398                .register_static_module(
119399                    "Option<CopyTextButton>",
119400                    exported_module!(CopyTextButtonModule).into(),
119401                );
119402            engine
119403                .register_type_with_name::<Option<InlineKeyboardButton>>(
119404                    "Option<InlineKeyboardButton>",
119405                )
119406                .build_type::<InlineKeyboardButton>()
119407                .register_static_module(
119408                    "Option<InlineKeyboardButton>",
119409                    exported_module!(InlineKeyboardButtonModule).into(),
119410                );
119411            engine
119412                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
119413                    "Option<InlineKeyboardMarkup>",
119414                )
119415                .build_type::<InlineKeyboardMarkup>()
119416                .register_static_module(
119417                    "Option<InlineKeyboardMarkup>",
119418                    exported_module!(InlineKeyboardMarkupModule).into(),
119419                );
119420            engine
119421                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
119422                .build_type::<LoginUrl>()
119423                .register_static_module(
119424                    "Option<LoginUrl>",
119425                    exported_module!(LoginUrlModule).into(),
119426                );
119427            engine
119428                .register_type_with_name::<Option<String>>("Option<String>")
119429                .register_static_module("Option<String>", exported_module!(StringModule).into());
119430            engine
119431                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
119432                    "Option<SwitchInlineQueryChosenChat>",
119433                )
119434                .build_type::<SwitchInlineQueryChosenChat>()
119435                .register_static_module(
119436                    "Option<SwitchInlineQueryChosenChat>",
119437                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
119438                );
119439            engine
119440                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
119441                .build_type::<WebAppInfo>()
119442                .register_static_module(
119443                    "Option<WebAppInfo>",
119444                    exported_module!(WebAppInfoModule).into(),
119445                );
119446        }
119447    }
119448    #[cfg(feature = "rhai")]
119449    #[allow(unused_mut)]
119450    impl rhai::CustomType for InlineQueryResultGame {
119451        fn build(mut builder: rhai::TypeBuilder<Self>) {
119452            builder.with_get("tg_type", Self::rhai_get_tg_type);
119453            builder.with_get("id", Self::rhai_get_id);
119454            builder.with_get("game_short_name", Self::rhai_get_game_short_name);
119455            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
119456            builder.on_debug(|t| format!("{:?}", t));
119457            drop(builder);
119458        }
119459    }
119460    #[cfg(feature = "rhai")]
119461    impl SetupRhai for RevenueWithdrawalStateFailed {
119462        fn setup_rhai(engine: &mut rhai::Engine) {
119463            engine.build_type::<RevenueWithdrawalStateFailed>();
119464            engine
119465                .register_type_with_name::<Option<String>>("Option<String>")
119466                .register_static_module("Option<String>", exported_module!(StringModule).into());
119467        }
119468    }
119469    #[cfg(feature = "rhai")]
119470    #[allow(unused_mut)]
119471    impl rhai::CustomType for RevenueWithdrawalStateFailed {
119472        fn build(mut builder: rhai::TypeBuilder<Self>) {
119473            builder.with_get("tg_type", Self::rhai_get_tg_type);
119474            builder.on_debug(|t| format!("{:?}", t));
119475            drop(builder);
119476        }
119477    }
119478    #[cfg(feature = "rhai")]
119479    impl SetupRhai for MessageEntity {
119480        fn setup_rhai(engine: &mut rhai::Engine) {
119481            engine.build_type::<MessageEntity>();
119482            engine
119483                .register_type_with_name::<Option<bool>>("Option<bool>")
119484                .register_static_module("Option<bool>", exported_module!(boolModule).into());
119485            engine
119486                .register_type_with_name::<Option<i64>>("Option<i64>")
119487                .register_static_module("Option<i64>", exported_module!(i64Module).into());
119488            engine
119489                .register_type_with_name::<Option<String>>("Option<String>")
119490                .register_static_module("Option<String>", exported_module!(StringModule).into());
119491            engine
119492                .register_type_with_name::<Option<User>>("Option<User>")
119493                .build_type::<User>()
119494                .register_static_module("Option<User>", exported_module!(UserModule).into());
119495        }
119496    }
119497    #[cfg(feature = "rhai")]
119498    #[allow(unused_mut)]
119499    impl rhai::CustomType for MessageEntity {
119500        fn build(mut builder: rhai::TypeBuilder<Self>) {
119501            builder.with_get("tg_type", Self::rhai_get_tg_type);
119502            builder.with_get("offset", Self::rhai_get_offset);
119503            builder.with_get("length", Self::rhai_get_length);
119504            builder.with_get("url", Self::rhai_get_url);
119505            builder.with_get("user", Self::rhai_get_user);
119506            builder.with_get("language", Self::rhai_get_language);
119507            builder.with_get("custom_emoji_id", Self::rhai_get_custom_emoji_id);
119508            builder.on_debug(|t| format!("{:?}", t));
119509            drop(builder);
119510        }
119511    }
119512    #[cfg(feature = "rhai")]
119513    impl SetupRhai for UniqueGiftBackdropColors {
119514        fn setup_rhai(engine: &mut rhai::Engine) {
119515            engine.build_type::<UniqueGiftBackdropColors>();
119516            engine
119517                .register_type_with_name::<Option<i64>>("Option<i64>")
119518                .register_static_module("Option<i64>", exported_module!(i64Module).into());
119519        }
119520    }
119521    #[cfg(feature = "rhai")]
119522    #[allow(unused_mut)]
119523    impl rhai::CustomType for UniqueGiftBackdropColors {
119524        fn build(mut builder: rhai::TypeBuilder<Self>) {
119525            builder.with_get("center_color", Self::rhai_get_center_color);
119526            builder.with_get("edge_color", Self::rhai_get_edge_color);
119527            builder.with_get("symbol_color", Self::rhai_get_symbol_color);
119528            builder.with_get("text_color", Self::rhai_get_text_color);
119529            builder.on_debug(|t| format!("{:?}", t));
119530            drop(builder);
119531        }
119532    }
119533    #[cfg(feature = "rhai")]
119534    impl SetupRhai for SuggestedPostApprovalFailed {
119535        fn setup_rhai(engine: &mut rhai::Engine) {
119536            engine.build_type::<SuggestedPostApprovalFailed>();
119537            engine
119538                .register_type_with_name::<Option<Animation>>("Option<Animation>")
119539                .build_type::<Animation>()
119540                .register_static_module(
119541                    "Option<Animation>",
119542                    exported_module!(AnimationModule).into(),
119543                );
119544            engine
119545                .register_type_with_name::<Option<Audio>>("Option<Audio>")
119546                .build_type::<Audio>()
119547                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
119548            engine
119549                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
119550                .register_static_module(
119551                    "Option<BackgroundType>",
119552                    exported_module!(BackgroundTypeModule).into(),
119553                );
119554            engine
119555                .register_type_with_name::<Option<bool>>("Option<bool>")
119556                .register_static_module("Option<bool>", exported_module!(boolModule).into());
119557            engine
119558                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
119559                .build_type::<CallbackGame>()
119560                .register_static_module(
119561                    "Option<CallbackGame>",
119562                    exported_module!(CallbackGameModule).into(),
119563                );
119564            engine
119565                .register_type_with_name::<Option<Chat>>("Option<Chat>")
119566                .build_type::<Chat>()
119567                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
119568            engine
119569                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
119570                .build_type::<ChatBackground>()
119571                .register_static_module(
119572                    "Option<ChatBackground>",
119573                    exported_module!(ChatBackgroundModule).into(),
119574                );
119575            engine
119576                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
119577                .build_type::<ChatBoostAdded>()
119578                .register_static_module(
119579                    "Option<ChatBoostAdded>",
119580                    exported_module!(ChatBoostAddedModule).into(),
119581                );
119582            engine
119583                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
119584                .build_type::<ChatShared>()
119585                .register_static_module(
119586                    "Option<ChatShared>",
119587                    exported_module!(ChatSharedModule).into(),
119588                );
119589            engine
119590                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
119591                .build_type::<Checklist>()
119592                .register_static_module(
119593                    "Option<Checklist>",
119594                    exported_module!(ChecklistModule).into(),
119595                );
119596            engine
119597                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
119598                .build_type::<ChecklistTask>()
119599                .register_static_module(
119600                    "Option<ChecklistTask>",
119601                    exported_module!(ChecklistTaskModule).into(),
119602                );
119603            engine
119604                .register_type_with_name::<Option<ChecklistTasksAdded>>(
119605                    "Option<ChecklistTasksAdded>",
119606                )
119607                .build_type::<ChecklistTasksAdded>()
119608                .register_static_module(
119609                    "Option<ChecklistTasksAdded>",
119610                    exported_module!(ChecklistTasksAddedModule).into(),
119611                );
119612            engine
119613                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
119614                .build_type::<ChecklistTasksDone>()
119615                .register_static_module(
119616                    "Option<ChecklistTasksDone>",
119617                    exported_module!(ChecklistTasksDoneModule).into(),
119618                );
119619            engine
119620                .register_type_with_name::<Option<Contact>>("Option<Contact>")
119621                .build_type::<Contact>()
119622                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
119623            engine
119624                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
119625                .build_type::<CopyTextButton>()
119626                .register_static_module(
119627                    "Option<CopyTextButton>",
119628                    exported_module!(CopyTextButtonModule).into(),
119629                );
119630            engine
119631                .register_type_with_name::<Option<Dice>>("Option<Dice>")
119632                .build_type::<Dice>()
119633                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
119634            engine
119635                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
119636                    "Option<DirectMessagePriceChanged>",
119637                )
119638                .build_type::<DirectMessagePriceChanged>()
119639                .register_static_module(
119640                    "Option<DirectMessagePriceChanged>",
119641                    exported_module!(DirectMessagePriceChangedModule).into(),
119642                );
119643            engine
119644                .register_type_with_name::<Option<DirectMessagesTopic>>(
119645                    "Option<DirectMessagesTopic>",
119646                )
119647                .build_type::<DirectMessagesTopic>()
119648                .register_static_module(
119649                    "Option<DirectMessagesTopic>",
119650                    exported_module!(DirectMessagesTopicModule).into(),
119651                );
119652            engine
119653                .register_type_with_name::<Option<Document>>("Option<Document>")
119654                .build_type::<Document>()
119655                .register_static_module(
119656                    "Option<Document>",
119657                    exported_module!(DocumentModule).into(),
119658                );
119659            engine
119660                .register_type_with_name::<Option<EncryptedCredentials>>(
119661                    "Option<EncryptedCredentials>",
119662                )
119663                .build_type::<EncryptedCredentials>()
119664                .register_static_module(
119665                    "Option<EncryptedCredentials>",
119666                    exported_module!(EncryptedCredentialsModule).into(),
119667                );
119668            engine
119669                .register_type_with_name::<Option<EncryptedPassportElement>>(
119670                    "Option<EncryptedPassportElement>",
119671                )
119672                .build_type::<EncryptedPassportElement>()
119673                .register_static_module(
119674                    "Option<EncryptedPassportElement>",
119675                    exported_module!(EncryptedPassportElementModule).into(),
119676                );
119677            engine
119678                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
119679                .build_type::<ExternalReplyInfo>()
119680                .register_static_module(
119681                    "Option<ExternalReplyInfo>",
119682                    exported_module!(ExternalReplyInfoModule).into(),
119683                );
119684            engine
119685                .register_type_with_name::<Option<File>>("Option<File>")
119686                .build_type::<File>()
119687                .register_static_module("Option<File>", exported_module!(FileModule).into());
119688            engine
119689                .register_type_with_name::<Option<f64>>("Option<f64>")
119690                .register_static_module("Option<f64>", exported_module!(f64Module).into());
119691            engine
119692                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
119693                .build_type::<ForumTopicClosed>()
119694                .register_static_module(
119695                    "Option<ForumTopicClosed>",
119696                    exported_module!(ForumTopicClosedModule).into(),
119697                );
119698            engine
119699                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
119700                .build_type::<ForumTopicCreated>()
119701                .register_static_module(
119702                    "Option<ForumTopicCreated>",
119703                    exported_module!(ForumTopicCreatedModule).into(),
119704                );
119705            engine
119706                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
119707                .build_type::<ForumTopicEdited>()
119708                .register_static_module(
119709                    "Option<ForumTopicEdited>",
119710                    exported_module!(ForumTopicEditedModule).into(),
119711                );
119712            engine
119713                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
119714                .build_type::<ForumTopicReopened>()
119715                .register_static_module(
119716                    "Option<ForumTopicReopened>",
119717                    exported_module!(ForumTopicReopenedModule).into(),
119718                );
119719            engine
119720                .register_type_with_name::<Option<Game>>("Option<Game>")
119721                .build_type::<Game>()
119722                .register_static_module("Option<Game>", exported_module!(GameModule).into());
119723            engine
119724                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
119725                    "Option<GeneralForumTopicHidden>",
119726                )
119727                .build_type::<GeneralForumTopicHidden>()
119728                .register_static_module(
119729                    "Option<GeneralForumTopicHidden>",
119730                    exported_module!(GeneralForumTopicHiddenModule).into(),
119731                );
119732            engine
119733                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
119734                    "Option<GeneralForumTopicUnhidden>",
119735                )
119736                .build_type::<GeneralForumTopicUnhidden>()
119737                .register_static_module(
119738                    "Option<GeneralForumTopicUnhidden>",
119739                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
119740                );
119741            engine
119742                .register_type_with_name::<Option<Gift>>("Option<Gift>")
119743                .build_type::<Gift>()
119744                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
119745            engine
119746                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
119747                .build_type::<GiftInfo>()
119748                .register_static_module(
119749                    "Option<GiftInfo>",
119750                    exported_module!(GiftInfoModule).into(),
119751                );
119752            engine
119753                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
119754                .build_type::<Giveaway>()
119755                .register_static_module(
119756                    "Option<Giveaway>",
119757                    exported_module!(GiveawayModule).into(),
119758                );
119759            engine
119760                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
119761                .build_type::<GiveawayCompleted>()
119762                .register_static_module(
119763                    "Option<GiveawayCompleted>",
119764                    exported_module!(GiveawayCompletedModule).into(),
119765                );
119766            engine
119767                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
119768                .build_type::<GiveawayCreated>()
119769                .register_static_module(
119770                    "Option<GiveawayCreated>",
119771                    exported_module!(GiveawayCreatedModule).into(),
119772                );
119773            engine
119774                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
119775                .build_type::<GiveawayWinners>()
119776                .register_static_module(
119777                    "Option<GiveawayWinners>",
119778                    exported_module!(GiveawayWinnersModule).into(),
119779                );
119780            engine
119781                .register_type_with_name::<Option<InlineKeyboardButton>>(
119782                    "Option<InlineKeyboardButton>",
119783                )
119784                .build_type::<InlineKeyboardButton>()
119785                .register_static_module(
119786                    "Option<InlineKeyboardButton>",
119787                    exported_module!(InlineKeyboardButtonModule).into(),
119788                );
119789            engine
119790                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
119791                    "Option<InlineKeyboardMarkup>",
119792                )
119793                .build_type::<InlineKeyboardMarkup>()
119794                .register_static_module(
119795                    "Option<InlineKeyboardMarkup>",
119796                    exported_module!(InlineKeyboardMarkupModule).into(),
119797                );
119798            engine
119799                .register_type_with_name::<Option<i64>>("Option<i64>")
119800                .register_static_module("Option<i64>", exported_module!(i64Module).into());
119801            engine
119802                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
119803                .build_type::<Invoice>()
119804                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
119805            engine
119806                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
119807                .build_type::<LinkPreviewOptions>()
119808                .register_static_module(
119809                    "Option<LinkPreviewOptions>",
119810                    exported_module!(LinkPreviewOptionsModule).into(),
119811                );
119812            engine
119813                .register_type_with_name::<Option<Location>>("Option<Location>")
119814                .build_type::<Location>()
119815                .register_static_module(
119816                    "Option<Location>",
119817                    exported_module!(LocationModule).into(),
119818                );
119819            engine
119820                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
119821                .build_type::<LoginUrl>()
119822                .register_static_module(
119823                    "Option<LoginUrl>",
119824                    exported_module!(LoginUrlModule).into(),
119825                );
119826            engine
119827                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
119828                .build_type::<MaskPosition>()
119829                .register_static_module(
119830                    "Option<MaskPosition>",
119831                    exported_module!(MaskPositionModule).into(),
119832                );
119833            engine
119834                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
119835                    "Option<MaybeInaccessibleMessage>",
119836                )
119837                .register_static_module(
119838                    "Option<MaybeInaccessibleMessage>",
119839                    exported_module!(MaybeInaccessibleMessageModule).into(),
119840                );
119841            engine
119842                .register_type_with_name::<Option<Message>>("Option<Message>")
119843                .build_type::<Message>()
119844                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
119845            engine
119846                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
119847                    "Option<MessageAutoDeleteTimerChanged>",
119848                )
119849                .build_type::<MessageAutoDeleteTimerChanged>()
119850                .register_static_module(
119851                    "Option<MessageAutoDeleteTimerChanged>",
119852                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
119853                );
119854            engine
119855                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
119856                .build_type::<MessageEntity>()
119857                .register_static_module(
119858                    "Option<MessageEntity>",
119859                    exported_module!(MessageEntityModule).into(),
119860                );
119861            engine
119862                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
119863                .register_static_module(
119864                    "Option<MessageOrigin>",
119865                    exported_module!(MessageOriginModule).into(),
119866                );
119867            engine
119868                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
119869                .build_type::<OrderInfo>()
119870                .register_static_module(
119871                    "Option<OrderInfo>",
119872                    exported_module!(OrderInfoModule).into(),
119873                );
119874            engine
119875                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
119876                .register_static_module(
119877                    "Option<PaidMedia>",
119878                    exported_module!(PaidMediaModule).into(),
119879                );
119880            engine
119881                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
119882                .build_type::<PaidMediaInfo>()
119883                .register_static_module(
119884                    "Option<PaidMediaInfo>",
119885                    exported_module!(PaidMediaInfoModule).into(),
119886                );
119887            engine
119888                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
119889                    "Option<PaidMessagePriceChanged>",
119890                )
119891                .build_type::<PaidMessagePriceChanged>()
119892                .register_static_module(
119893                    "Option<PaidMessagePriceChanged>",
119894                    exported_module!(PaidMessagePriceChangedModule).into(),
119895                );
119896            engine
119897                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
119898                .build_type::<PassportData>()
119899                .register_static_module(
119900                    "Option<PassportData>",
119901                    exported_module!(PassportDataModule).into(),
119902                );
119903            engine
119904                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
119905                .build_type::<PassportFile>()
119906                .register_static_module(
119907                    "Option<PassportFile>",
119908                    exported_module!(PassportFileModule).into(),
119909                );
119910            engine
119911                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
119912                .build_type::<PhotoSize>()
119913                .register_static_module(
119914                    "Option<PhotoSize>",
119915                    exported_module!(PhotoSizeModule).into(),
119916                );
119917            engine
119918                .register_type_with_name::<Option<Poll>>("Option<Poll>")
119919                .build_type::<Poll>()
119920                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
119921            engine
119922                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
119923                .build_type::<PollOption>()
119924                .register_static_module(
119925                    "Option<PollOption>",
119926                    exported_module!(PollOptionModule).into(),
119927                );
119928            engine
119929                .register_type_with_name::<Option<ProximityAlertTriggered>>(
119930                    "Option<ProximityAlertTriggered>",
119931                )
119932                .build_type::<ProximityAlertTriggered>()
119933                .register_static_module(
119934                    "Option<ProximityAlertTriggered>",
119935                    exported_module!(ProximityAlertTriggeredModule).into(),
119936                );
119937            engine
119938                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
119939                .build_type::<RefundedPayment>()
119940                .register_static_module(
119941                    "Option<RefundedPayment>",
119942                    exported_module!(RefundedPaymentModule).into(),
119943                );
119944            engine
119945                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
119946                .build_type::<SharedUser>()
119947                .register_static_module(
119948                    "Option<SharedUser>",
119949                    exported_module!(SharedUserModule).into(),
119950                );
119951            engine
119952                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
119953                .build_type::<ShippingAddress>()
119954                .register_static_module(
119955                    "Option<ShippingAddress>",
119956                    exported_module!(ShippingAddressModule).into(),
119957                );
119958            engine
119959                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
119960                .build_type::<StarAmount>()
119961                .register_static_module(
119962                    "Option<StarAmount>",
119963                    exported_module!(StarAmountModule).into(),
119964                );
119965            engine
119966                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
119967                .build_type::<Sticker>()
119968                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
119969            engine
119970                .register_type_with_name::<Option<Story>>("Option<Story>")
119971                .build_type::<Story>()
119972                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
119973            engine
119974                .register_type_with_name::<Option<String>>("Option<String>")
119975                .register_static_module("Option<String>", exported_module!(StringModule).into());
119976            engine
119977                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
119978                .build_type::<SuccessfulPayment>()
119979                .register_static_module(
119980                    "Option<SuccessfulPayment>",
119981                    exported_module!(SuccessfulPaymentModule).into(),
119982                );
119983            engine
119984                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
119985                    "Option<SuggestedPostApprovalFailed>",
119986                )
119987                .build_type::<SuggestedPostApprovalFailed>()
119988                .register_static_module(
119989                    "Option<SuggestedPostApprovalFailed>",
119990                    exported_module!(SuggestedPostApprovalFailedModule).into(),
119991                );
119992            engine
119993                .register_type_with_name::<Option<SuggestedPostApproved>>(
119994                    "Option<SuggestedPostApproved>",
119995                )
119996                .build_type::<SuggestedPostApproved>()
119997                .register_static_module(
119998                    "Option<SuggestedPostApproved>",
119999                    exported_module!(SuggestedPostApprovedModule).into(),
120000                );
120001            engine
120002                .register_type_with_name::<Option<SuggestedPostDeclined>>(
120003                    "Option<SuggestedPostDeclined>",
120004                )
120005                .build_type::<SuggestedPostDeclined>()
120006                .register_static_module(
120007                    "Option<SuggestedPostDeclined>",
120008                    exported_module!(SuggestedPostDeclinedModule).into(),
120009                );
120010            engine
120011                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
120012                .build_type::<SuggestedPostInfo>()
120013                .register_static_module(
120014                    "Option<SuggestedPostInfo>",
120015                    exported_module!(SuggestedPostInfoModule).into(),
120016                );
120017            engine
120018                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
120019                .build_type::<SuggestedPostPaid>()
120020                .register_static_module(
120021                    "Option<SuggestedPostPaid>",
120022                    exported_module!(SuggestedPostPaidModule).into(),
120023                );
120024            engine
120025                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
120026                .build_type::<SuggestedPostPrice>()
120027                .register_static_module(
120028                    "Option<SuggestedPostPrice>",
120029                    exported_module!(SuggestedPostPriceModule).into(),
120030                );
120031            engine
120032                .register_type_with_name::<Option<SuggestedPostRefunded>>(
120033                    "Option<SuggestedPostRefunded>",
120034                )
120035                .build_type::<SuggestedPostRefunded>()
120036                .register_static_module(
120037                    "Option<SuggestedPostRefunded>",
120038                    exported_module!(SuggestedPostRefundedModule).into(),
120039                );
120040            engine
120041                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
120042                    "Option<SwitchInlineQueryChosenChat>",
120043                )
120044                .build_type::<SwitchInlineQueryChosenChat>()
120045                .register_static_module(
120046                    "Option<SwitchInlineQueryChosenChat>",
120047                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
120048                );
120049            engine
120050                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
120051                .build_type::<TextQuote>()
120052                .register_static_module(
120053                    "Option<TextQuote>",
120054                    exported_module!(TextQuoteModule).into(),
120055                );
120056            engine
120057                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
120058                .build_type::<UniqueGift>()
120059                .register_static_module(
120060                    "Option<UniqueGift>",
120061                    exported_module!(UniqueGiftModule).into(),
120062                );
120063            engine
120064                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
120065                .build_type::<UniqueGiftBackdrop>()
120066                .register_static_module(
120067                    "Option<UniqueGiftBackdrop>",
120068                    exported_module!(UniqueGiftBackdropModule).into(),
120069                );
120070            engine
120071                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
120072                    "Option<UniqueGiftBackdropColors>",
120073                )
120074                .build_type::<UniqueGiftBackdropColors>()
120075                .register_static_module(
120076                    "Option<UniqueGiftBackdropColors>",
120077                    exported_module!(UniqueGiftBackdropColorsModule).into(),
120078                );
120079            engine
120080                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
120081                .build_type::<UniqueGiftInfo>()
120082                .register_static_module(
120083                    "Option<UniqueGiftInfo>",
120084                    exported_module!(UniqueGiftInfoModule).into(),
120085                );
120086            engine
120087                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
120088                .build_type::<UniqueGiftModel>()
120089                .register_static_module(
120090                    "Option<UniqueGiftModel>",
120091                    exported_module!(UniqueGiftModelModule).into(),
120092                );
120093            engine
120094                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
120095                .build_type::<UniqueGiftSymbol>()
120096                .register_static_module(
120097                    "Option<UniqueGiftSymbol>",
120098                    exported_module!(UniqueGiftSymbolModule).into(),
120099                );
120100            engine
120101                .register_type_with_name::<Option<User>>("Option<User>")
120102                .build_type::<User>()
120103                .register_static_module("Option<User>", exported_module!(UserModule).into());
120104            engine
120105                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
120106                .build_type::<UsersShared>()
120107                .register_static_module(
120108                    "Option<UsersShared>",
120109                    exported_module!(UsersSharedModule).into(),
120110                );
120111            engine
120112                .register_type_with_name::<Option<Venue>>("Option<Venue>")
120113                .build_type::<Venue>()
120114                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
120115            engine
120116                .register_type_with_name::<Option<Video>>("Option<Video>")
120117                .build_type::<Video>()
120118                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
120119            engine
120120                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
120121                .build_type::<VideoChatEnded>()
120122                .register_static_module(
120123                    "Option<VideoChatEnded>",
120124                    exported_module!(VideoChatEndedModule).into(),
120125                );
120126            engine
120127                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
120128                    "Option<VideoChatParticipantsInvited>",
120129                )
120130                .build_type::<VideoChatParticipantsInvited>()
120131                .register_static_module(
120132                    "Option<VideoChatParticipantsInvited>",
120133                    exported_module!(VideoChatParticipantsInvitedModule).into(),
120134                );
120135            engine
120136                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
120137                .build_type::<VideoChatScheduled>()
120138                .register_static_module(
120139                    "Option<VideoChatScheduled>",
120140                    exported_module!(VideoChatScheduledModule).into(),
120141                );
120142            engine
120143                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
120144                .build_type::<VideoChatStarted>()
120145                .register_static_module(
120146                    "Option<VideoChatStarted>",
120147                    exported_module!(VideoChatStartedModule).into(),
120148                );
120149            engine
120150                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
120151                .build_type::<VideoNote>()
120152                .register_static_module(
120153                    "Option<VideoNote>",
120154                    exported_module!(VideoNoteModule).into(),
120155                );
120156            engine
120157                .register_type_with_name::<Option<Voice>>("Option<Voice>")
120158                .build_type::<Voice>()
120159                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
120160            engine
120161                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
120162                .build_type::<WebAppData>()
120163                .register_static_module(
120164                    "Option<WebAppData>",
120165                    exported_module!(WebAppDataModule).into(),
120166                );
120167            engine
120168                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
120169                .build_type::<WebAppInfo>()
120170                .register_static_module(
120171                    "Option<WebAppInfo>",
120172                    exported_module!(WebAppInfoModule).into(),
120173                );
120174            engine
120175                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
120176                .build_type::<WriteAccessAllowed>()
120177                .register_static_module(
120178                    "Option<WriteAccessAllowed>",
120179                    exported_module!(WriteAccessAllowedModule).into(),
120180                );
120181        }
120182    }
120183    #[cfg(feature = "rhai")]
120184    #[allow(unused_mut)]
120185    impl rhai::CustomType for SuggestedPostApprovalFailed {
120186        fn build(mut builder: rhai::TypeBuilder<Self>) {
120187            builder.with_get(
120188                "suggested_post_message",
120189                Self::rhai_get_suggested_post_message,
120190            );
120191            builder.with_get("price", Self::rhai_get_price);
120192            builder.on_debug(|t| format!("{:?}", t));
120193            drop(builder);
120194        }
120195    }
120196    #[cfg(feature = "rhai")]
120197    impl SetupRhai for Document {
120198        fn setup_rhai(engine: &mut rhai::Engine) {
120199            engine.build_type::<Document>();
120200            engine
120201                .register_type_with_name::<Option<i64>>("Option<i64>")
120202                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120203            engine
120204                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
120205                .build_type::<PhotoSize>()
120206                .register_static_module(
120207                    "Option<PhotoSize>",
120208                    exported_module!(PhotoSizeModule).into(),
120209                );
120210            engine
120211                .register_type_with_name::<Option<String>>("Option<String>")
120212                .register_static_module("Option<String>", exported_module!(StringModule).into());
120213        }
120214    }
120215    #[cfg(feature = "rhai")]
120216    #[allow(unused_mut)]
120217    impl rhai::CustomType for Document {
120218        fn build(mut builder: rhai::TypeBuilder<Self>) {
120219            builder.with_get("file_id", Self::rhai_get_file_id);
120220            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
120221            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
120222            builder.with_get("file_name", Self::rhai_get_file_name);
120223            builder.with_get("mime_type", Self::rhai_get_mime_type);
120224            builder.with_get("file_size", Self::rhai_get_file_size);
120225            builder.on_debug(|t| format!("{:?}", t));
120226            drop(builder);
120227        }
120228    }
120229    #[cfg(feature = "rhai")]
120230    impl SetupRhai for SharedUser {
120231        fn setup_rhai(engine: &mut rhai::Engine) {
120232            engine.build_type::<SharedUser>();
120233            engine
120234                .register_type_with_name::<Option<i64>>("Option<i64>")
120235                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120236            engine
120237                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
120238                .build_type::<PhotoSize>()
120239                .register_static_module(
120240                    "Option<PhotoSize>",
120241                    exported_module!(PhotoSizeModule).into(),
120242                );
120243            engine
120244                .register_type_with_name::<Option<String>>("Option<String>")
120245                .register_static_module("Option<String>", exported_module!(StringModule).into());
120246        }
120247    }
120248    #[cfg(feature = "rhai")]
120249    #[allow(unused_mut)]
120250    impl rhai::CustomType for SharedUser {
120251        fn build(mut builder: rhai::TypeBuilder<Self>) {
120252            builder.with_get("user_id", Self::rhai_get_user_id);
120253            builder.with_get("first_name", Self::rhai_get_first_name);
120254            builder.with_get("last_name", Self::rhai_get_last_name);
120255            builder.with_get("username", Self::rhai_get_username);
120256            builder.with_get("photo", Self::rhai_get_photo);
120257            builder.on_debug(|t| format!("{:?}", t));
120258            drop(builder);
120259        }
120260    }
120261    #[cfg(feature = "rhai")]
120262    impl SetupRhai for UniqueGiftInfo {
120263        fn setup_rhai(engine: &mut rhai::Engine) {
120264            engine.build_type::<UniqueGiftInfo>();
120265            engine
120266                .register_type_with_name::<Option<bool>>("Option<bool>")
120267                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120268            engine
120269                .register_type_with_name::<Option<Chat>>("Option<Chat>")
120270                .build_type::<Chat>()
120271                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
120272            engine
120273                .register_type_with_name::<Option<File>>("Option<File>")
120274                .build_type::<File>()
120275                .register_static_module("Option<File>", exported_module!(FileModule).into());
120276            engine
120277                .register_type_with_name::<Option<f64>>("Option<f64>")
120278                .register_static_module("Option<f64>", exported_module!(f64Module).into());
120279            engine
120280                .register_type_with_name::<Option<i64>>("Option<i64>")
120281                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120282            engine
120283                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
120284                .build_type::<MaskPosition>()
120285                .register_static_module(
120286                    "Option<MaskPosition>",
120287                    exported_module!(MaskPositionModule).into(),
120288                );
120289            engine
120290                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
120291                .build_type::<PhotoSize>()
120292                .register_static_module(
120293                    "Option<PhotoSize>",
120294                    exported_module!(PhotoSizeModule).into(),
120295                );
120296            engine
120297                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
120298                .build_type::<Sticker>()
120299                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
120300            engine
120301                .register_type_with_name::<Option<String>>("Option<String>")
120302                .register_static_module("Option<String>", exported_module!(StringModule).into());
120303            engine
120304                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
120305                .build_type::<UniqueGift>()
120306                .register_static_module(
120307                    "Option<UniqueGift>",
120308                    exported_module!(UniqueGiftModule).into(),
120309                );
120310            engine
120311                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
120312                .build_type::<UniqueGiftBackdrop>()
120313                .register_static_module(
120314                    "Option<UniqueGiftBackdrop>",
120315                    exported_module!(UniqueGiftBackdropModule).into(),
120316                );
120317            engine
120318                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
120319                    "Option<UniqueGiftBackdropColors>",
120320                )
120321                .build_type::<UniqueGiftBackdropColors>()
120322                .register_static_module(
120323                    "Option<UniqueGiftBackdropColors>",
120324                    exported_module!(UniqueGiftBackdropColorsModule).into(),
120325                );
120326            engine
120327                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
120328                .build_type::<UniqueGiftModel>()
120329                .register_static_module(
120330                    "Option<UniqueGiftModel>",
120331                    exported_module!(UniqueGiftModelModule).into(),
120332                );
120333            engine
120334                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
120335                .build_type::<UniqueGiftSymbol>()
120336                .register_static_module(
120337                    "Option<UniqueGiftSymbol>",
120338                    exported_module!(UniqueGiftSymbolModule).into(),
120339                );
120340        }
120341    }
120342    #[cfg(feature = "rhai")]
120343    #[allow(unused_mut)]
120344    impl rhai::CustomType for UniqueGiftInfo {
120345        fn build(mut builder: rhai::TypeBuilder<Self>) {
120346            builder.with_get("gift", Self::rhai_get_gift);
120347            builder.with_get("origin", Self::rhai_get_origin);
120348            builder.with_get(
120349                "last_resale_star_count",
120350                Self::rhai_get_last_resale_star_count,
120351            );
120352            builder.with_get("owned_gift_id", Self::rhai_get_owned_gift_id);
120353            builder.with_get("transfer_star_count", Self::rhai_get_transfer_star_count);
120354            builder.with_get("next_transfer_date", Self::rhai_get_next_transfer_date);
120355            builder.on_debug(|t| format!("{:?}", t));
120356            drop(builder);
120357        }
120358    }
120359    #[cfg(feature = "rhai")]
120360    impl SetupRhai for ShippingQuery {
120361        fn setup_rhai(engine: &mut rhai::Engine) {
120362            engine.build_type::<ShippingQuery>();
120363            engine
120364                .register_type_with_name::<Option<bool>>("Option<bool>")
120365                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120366            engine
120367                .register_type_with_name::<Option<i64>>("Option<i64>")
120368                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120369            engine
120370                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
120371                .build_type::<ShippingAddress>()
120372                .register_static_module(
120373                    "Option<ShippingAddress>",
120374                    exported_module!(ShippingAddressModule).into(),
120375                );
120376            engine
120377                .register_type_with_name::<Option<String>>("Option<String>")
120378                .register_static_module("Option<String>", exported_module!(StringModule).into());
120379            engine
120380                .register_type_with_name::<Option<User>>("Option<User>")
120381                .build_type::<User>()
120382                .register_static_module("Option<User>", exported_module!(UserModule).into());
120383        }
120384    }
120385    #[cfg(feature = "rhai")]
120386    #[allow(unused_mut)]
120387    impl rhai::CustomType for ShippingQuery {
120388        fn build(mut builder: rhai::TypeBuilder<Self>) {
120389            builder.with_get("id", Self::rhai_get_id);
120390            builder.with_get("from", Self::rhai_get_from);
120391            builder.with_get("invoice_payload", Self::rhai_get_invoice_payload);
120392            builder.with_get("shipping_address", Self::rhai_get_shipping_address);
120393            builder.on_debug(|t| format!("{:?}", t));
120394            drop(builder);
120395        }
120396    }
120397    #[cfg(feature = "rhai")]
120398    impl SetupRhai for InlineQueryResultVideo {
120399        fn setup_rhai(engine: &mut rhai::Engine) {
120400            engine.build_type::<InlineQueryResultVideo>();
120401            engine
120402                .register_type_with_name::<Option<bool>>("Option<bool>")
120403                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120404            engine
120405                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
120406                .build_type::<CallbackGame>()
120407                .register_static_module(
120408                    "Option<CallbackGame>",
120409                    exported_module!(CallbackGameModule).into(),
120410                );
120411            engine
120412                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
120413                .build_type::<CopyTextButton>()
120414                .register_static_module(
120415                    "Option<CopyTextButton>",
120416                    exported_module!(CopyTextButtonModule).into(),
120417                );
120418            engine
120419                .register_type_with_name::<Option<InlineKeyboardButton>>(
120420                    "Option<InlineKeyboardButton>",
120421                )
120422                .build_type::<InlineKeyboardButton>()
120423                .register_static_module(
120424                    "Option<InlineKeyboardButton>",
120425                    exported_module!(InlineKeyboardButtonModule).into(),
120426                );
120427            engine
120428                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
120429                    "Option<InlineKeyboardMarkup>",
120430                )
120431                .build_type::<InlineKeyboardMarkup>()
120432                .register_static_module(
120433                    "Option<InlineKeyboardMarkup>",
120434                    exported_module!(InlineKeyboardMarkupModule).into(),
120435                );
120436            engine
120437                .register_type_with_name::<Option<InputMessageContent>>(
120438                    "Option<InputMessageContent>",
120439                )
120440                .register_static_module(
120441                    "Option<InputMessageContent>",
120442                    exported_module!(InputMessageContentModule).into(),
120443                );
120444            engine
120445                .register_type_with_name::<Option<i64>>("Option<i64>")
120446                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120447            engine
120448                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
120449                .build_type::<LoginUrl>()
120450                .register_static_module(
120451                    "Option<LoginUrl>",
120452                    exported_module!(LoginUrlModule).into(),
120453                );
120454            engine
120455                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
120456                .build_type::<MessageEntity>()
120457                .register_static_module(
120458                    "Option<MessageEntity>",
120459                    exported_module!(MessageEntityModule).into(),
120460                );
120461            engine
120462                .register_type_with_name::<Option<String>>("Option<String>")
120463                .register_static_module("Option<String>", exported_module!(StringModule).into());
120464            engine
120465                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
120466                    "Option<SwitchInlineQueryChosenChat>",
120467                )
120468                .build_type::<SwitchInlineQueryChosenChat>()
120469                .register_static_module(
120470                    "Option<SwitchInlineQueryChosenChat>",
120471                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
120472                );
120473            engine
120474                .register_type_with_name::<Option<User>>("Option<User>")
120475                .build_type::<User>()
120476                .register_static_module("Option<User>", exported_module!(UserModule).into());
120477            engine
120478                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
120479                .build_type::<WebAppInfo>()
120480                .register_static_module(
120481                    "Option<WebAppInfo>",
120482                    exported_module!(WebAppInfoModule).into(),
120483                );
120484        }
120485    }
120486    #[cfg(feature = "rhai")]
120487    #[allow(unused_mut)]
120488    impl rhai::CustomType for InlineQueryResultVideo {
120489        fn build(mut builder: rhai::TypeBuilder<Self>) {
120490            builder.with_get("tg_type", Self::rhai_get_tg_type);
120491            builder.with_get("id", Self::rhai_get_id);
120492            builder.with_get("video_url", Self::rhai_get_video_url);
120493            builder.with_get("mime_type", Self::rhai_get_mime_type);
120494            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
120495            builder.with_get("title", Self::rhai_get_title);
120496            builder.with_get("caption", Self::rhai_get_caption);
120497            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
120498            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
120499            builder.with_get(
120500                "show_caption_above_media",
120501                Self::rhai_get_show_caption_above_media,
120502            );
120503            builder.with_get("video_width", Self::rhai_get_video_width);
120504            builder.with_get("video_height", Self::rhai_get_video_height);
120505            builder.with_get("video_duration", Self::rhai_get_video_duration);
120506            builder.with_get("description", Self::rhai_get_description);
120507            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
120508            builder.with_get(
120509                "input_message_content",
120510                Self::rhai_get_input_message_content,
120511            );
120512            builder.on_debug(|t| format!("{:?}", t));
120513            drop(builder);
120514        }
120515    }
120516    #[cfg(feature = "rhai")]
120517    impl SetupRhai for DirectMessagePriceChanged {
120518        fn setup_rhai(engine: &mut rhai::Engine) {
120519            engine.build_type::<DirectMessagePriceChanged>();
120520            engine
120521                .register_type_with_name::<Option<bool>>("Option<bool>")
120522                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120523            engine
120524                .register_type_with_name::<Option<i64>>("Option<i64>")
120525                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120526        }
120527    }
120528    #[cfg(feature = "rhai")]
120529    #[allow(unused_mut)]
120530    impl rhai::CustomType for DirectMessagePriceChanged {
120531        fn build(mut builder: rhai::TypeBuilder<Self>) {
120532            builder.with_get(
120533                "are_direct_messages_enabled",
120534                Self::rhai_get_are_direct_messages_enabled,
120535            );
120536            builder.with_get(
120537                "direct_message_star_count",
120538                Self::rhai_get_direct_message_star_count,
120539            );
120540            builder.on_debug(|t| format!("{:?}", t));
120541            drop(builder);
120542        }
120543    }
120544    #[cfg(feature = "rhai")]
120545    impl SetupRhai for ReactionCount {
120546        fn setup_rhai(engine: &mut rhai::Engine) {
120547            engine.build_type::<ReactionCount>();
120548            engine
120549                .register_type_with_name::<Option<i64>>("Option<i64>")
120550                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120551            engine
120552                .register_type_with_name::<Option<ReactionType>>("Option<ReactionType>")
120553                .register_static_module(
120554                    "Option<ReactionType>",
120555                    exported_module!(ReactionTypeModule).into(),
120556                );
120557        }
120558    }
120559    #[cfg(feature = "rhai")]
120560    #[allow(unused_mut)]
120561    impl rhai::CustomType for ReactionCount {
120562        fn build(mut builder: rhai::TypeBuilder<Self>) {
120563            builder.with_get("tg_type", Self::rhai_get_tg_type);
120564            builder.with_get("total_count", Self::rhai_get_total_count);
120565            builder.on_debug(|t| format!("{:?}", t));
120566            drop(builder);
120567        }
120568    }
120569    #[cfg(feature = "rhai")]
120570    impl SetupRhai for ChatShared {
120571        fn setup_rhai(engine: &mut rhai::Engine) {
120572            engine.build_type::<ChatShared>();
120573            engine
120574                .register_type_with_name::<Option<i64>>("Option<i64>")
120575                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120576            engine
120577                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
120578                .build_type::<PhotoSize>()
120579                .register_static_module(
120580                    "Option<PhotoSize>",
120581                    exported_module!(PhotoSizeModule).into(),
120582                );
120583            engine
120584                .register_type_with_name::<Option<String>>("Option<String>")
120585                .register_static_module("Option<String>", exported_module!(StringModule).into());
120586        }
120587    }
120588    #[cfg(feature = "rhai")]
120589    #[allow(unused_mut)]
120590    impl rhai::CustomType for ChatShared {
120591        fn build(mut builder: rhai::TypeBuilder<Self>) {
120592            builder.with_get("request_id", Self::rhai_get_request_id);
120593            builder.with_get("chat_id", Self::rhai_get_chat_id);
120594            builder.with_get("title", Self::rhai_get_title);
120595            builder.with_get("username", Self::rhai_get_username);
120596            builder.with_get("photo", Self::rhai_get_photo);
120597            builder.on_debug(|t| format!("{:?}", t));
120598            drop(builder);
120599        }
120600    }
120601    #[cfg(feature = "rhai")]
120602    impl SetupRhai for MessageOriginChannel {
120603        fn setup_rhai(engine: &mut rhai::Engine) {
120604            engine.build_type::<MessageOriginChannel>();
120605            engine
120606                .register_type_with_name::<Option<bool>>("Option<bool>")
120607                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120608            engine
120609                .register_type_with_name::<Option<Chat>>("Option<Chat>")
120610                .build_type::<Chat>()
120611                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
120612            engine
120613                .register_type_with_name::<Option<i64>>("Option<i64>")
120614                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120615            engine
120616                .register_type_with_name::<Option<String>>("Option<String>")
120617                .register_static_module("Option<String>", exported_module!(StringModule).into());
120618        }
120619    }
120620    #[cfg(feature = "rhai")]
120621    #[allow(unused_mut)]
120622    impl rhai::CustomType for MessageOriginChannel {
120623        fn build(mut builder: rhai::TypeBuilder<Self>) {
120624            builder.with_get("tg_type", Self::rhai_get_tg_type);
120625            builder.with_get("date", Self::rhai_get_date);
120626            builder.with_get("chat", Self::rhai_get_chat);
120627            builder.with_get("message_id", Self::rhai_get_message_id);
120628            builder.with_get("author_signature", Self::rhai_get_author_signature);
120629            builder.on_debug(|t| format!("{:?}", t));
120630            drop(builder);
120631        }
120632    }
120633    #[cfg(feature = "rhai")]
120634    impl SetupRhai for ChatBoostRemoved {
120635        fn setup_rhai(engine: &mut rhai::Engine) {
120636            engine.build_type::<ChatBoostRemoved>();
120637            engine
120638                .register_type_with_name::<Option<bool>>("Option<bool>")
120639                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120640            engine
120641                .register_type_with_name::<Option<Chat>>("Option<Chat>")
120642                .build_type::<Chat>()
120643                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
120644            engine
120645                .register_type_with_name::<Option<ChatBoostSource>>("Option<ChatBoostSource>")
120646                .register_static_module(
120647                    "Option<ChatBoostSource>",
120648                    exported_module!(ChatBoostSourceModule).into(),
120649                );
120650            engine
120651                .register_type_with_name::<Option<i64>>("Option<i64>")
120652                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120653            engine
120654                .register_type_with_name::<Option<String>>("Option<String>")
120655                .register_static_module("Option<String>", exported_module!(StringModule).into());
120656        }
120657    }
120658    #[cfg(feature = "rhai")]
120659    #[allow(unused_mut)]
120660    impl rhai::CustomType for ChatBoostRemoved {
120661        fn build(mut builder: rhai::TypeBuilder<Self>) {
120662            builder.with_get("chat", Self::rhai_get_chat);
120663            builder.with_get("boost_id", Self::rhai_get_boost_id);
120664            builder.with_get("remove_date", Self::rhai_get_remove_date);
120665            builder.with_get("source", Self::rhai_get_source);
120666            builder.on_debug(|t| format!("{:?}", t));
120667            drop(builder);
120668        }
120669    }
120670    #[cfg(feature = "rhai")]
120671    impl SetupRhai for BackgroundTypeFill {
120672        fn setup_rhai(engine: &mut rhai::Engine) {
120673            engine.build_type::<BackgroundTypeFill>();
120674            engine
120675                .register_type_with_name::<Option<BackgroundFill>>("Option<BackgroundFill>")
120676                .register_static_module(
120677                    "Option<BackgroundFill>",
120678                    exported_module!(BackgroundFillModule).into(),
120679                );
120680            engine
120681                .register_type_with_name::<Option<i64>>("Option<i64>")
120682                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120683            engine
120684                .register_type_with_name::<Option<String>>("Option<String>")
120685                .register_static_module("Option<String>", exported_module!(StringModule).into());
120686        }
120687    }
120688    #[cfg(feature = "rhai")]
120689    #[allow(unused_mut)]
120690    impl rhai::CustomType for BackgroundTypeFill {
120691        fn build(mut builder: rhai::TypeBuilder<Self>) {
120692            builder.with_get("tg_type", Self::rhai_get_tg_type);
120693            builder.with_get("fill", Self::rhai_get_fill);
120694            builder.with_get("dark_theme_dimming", Self::rhai_get_dark_theme_dimming);
120695            builder.on_debug(|t| format!("{:?}", t));
120696            drop(builder);
120697        }
120698    }
120699    #[cfg(feature = "rhai")]
120700    impl SetupRhai for MessageId {
120701        fn setup_rhai(engine: &mut rhai::Engine) {
120702            engine.build_type::<MessageId>();
120703            engine
120704                .register_type_with_name::<Option<i64>>("Option<i64>")
120705                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120706        }
120707    }
120708    #[cfg(feature = "rhai")]
120709    #[allow(unused_mut)]
120710    impl rhai::CustomType for MessageId {
120711        fn build(mut builder: rhai::TypeBuilder<Self>) {
120712            builder.with_get("message_id", Self::rhai_get_message_id);
120713            builder.on_debug(|t| format!("{:?}", t));
120714            drop(builder);
120715        }
120716    }
120717    #[cfg(feature = "rhai")]
120718    impl SetupRhai for KeyboardButtonRequestChat {
120719        fn setup_rhai(engine: &mut rhai::Engine) {
120720            engine.build_type::<KeyboardButtonRequestChat>();
120721            engine
120722                .register_type_with_name::<Option<bool>>("Option<bool>")
120723                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120724            engine
120725                .register_type_with_name::<Option<ChatAdministratorRights>>(
120726                    "Option<ChatAdministratorRights>",
120727                )
120728                .build_type::<ChatAdministratorRights>()
120729                .register_static_module(
120730                    "Option<ChatAdministratorRights>",
120731                    exported_module!(ChatAdministratorRightsModule).into(),
120732                );
120733            engine
120734                .register_type_with_name::<Option<i64>>("Option<i64>")
120735                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120736        }
120737    }
120738    #[cfg(feature = "rhai")]
120739    #[allow(unused_mut)]
120740    impl rhai::CustomType for KeyboardButtonRequestChat {
120741        fn build(mut builder: rhai::TypeBuilder<Self>) {
120742            builder.with_get("request_id", Self::rhai_get_request_id);
120743            builder.with_get("chat_is_channel", Self::rhai_get_chat_is_channel);
120744            builder.with_get("chat_is_forum", Self::rhai_get_chat_is_forum);
120745            builder.with_get("chat_has_username", Self::rhai_get_chat_has_username);
120746            builder.with_get("chat_is_created", Self::rhai_get_chat_is_created);
120747            builder.with_get(
120748                "user_administrator_rights",
120749                Self::rhai_get_user_administrator_rights,
120750            );
120751            builder.with_get(
120752                "bot_administrator_rights",
120753                Self::rhai_get_bot_administrator_rights,
120754            );
120755            builder.with_get("bot_is_member", Self::rhai_get_bot_is_member);
120756            builder.with_get("request_title", Self::rhai_get_request_title);
120757            builder.with_get("request_username", Self::rhai_get_request_username);
120758            builder.with_get("request_photo", Self::rhai_get_request_photo);
120759            builder.on_debug(|t| format!("{:?}", t));
120760            drop(builder);
120761        }
120762    }
120763    #[cfg(feature = "rhai")]
120764    impl SetupRhai for ReactionTypeEmoji {
120765        fn setup_rhai(engine: &mut rhai::Engine) {
120766            engine.build_type::<ReactionTypeEmoji>();
120767            engine
120768                .register_type_with_name::<Option<String>>("Option<String>")
120769                .register_static_module("Option<String>", exported_module!(StringModule).into());
120770        }
120771    }
120772    #[cfg(feature = "rhai")]
120773    #[allow(unused_mut)]
120774    impl rhai::CustomType for ReactionTypeEmoji {
120775        fn build(mut builder: rhai::TypeBuilder<Self>) {
120776            builder.with_get("tg_type", Self::rhai_get_tg_type);
120777            builder.with_get("emoji", Self::rhai_get_emoji);
120778            builder.on_debug(|t| format!("{:?}", t));
120779            drop(builder);
120780        }
120781    }
120782    #[cfg(feature = "rhai")]
120783    impl SetupRhai for SentWebAppMessage {
120784        fn setup_rhai(engine: &mut rhai::Engine) {
120785            engine.build_type::<SentWebAppMessage>();
120786            engine
120787                .register_type_with_name::<Option<String>>("Option<String>")
120788                .register_static_module("Option<String>", exported_module!(StringModule).into());
120789        }
120790    }
120791    #[cfg(feature = "rhai")]
120792    #[allow(unused_mut)]
120793    impl rhai::CustomType for SentWebAppMessage {
120794        fn build(mut builder: rhai::TypeBuilder<Self>) {
120795            builder.with_get("inline_message_id", Self::rhai_get_inline_message_id);
120796            builder.on_debug(|t| format!("{:?}", t));
120797            drop(builder);
120798        }
120799    }
120800    #[cfg(feature = "rhai")]
120801    impl SetupRhai for Giveaway {
120802        fn setup_rhai(engine: &mut rhai::Engine) {
120803            engine.build_type::<Giveaway>();
120804            engine
120805                .register_type_with_name::<Option<bool>>("Option<bool>")
120806                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120807            engine
120808                .register_type_with_name::<Option<Chat>>("Option<Chat>")
120809                .build_type::<Chat>()
120810                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
120811            engine
120812                .register_type_with_name::<Option<i64>>("Option<i64>")
120813                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120814            engine
120815                .register_type_with_name::<Option<String>>("Option<String>")
120816                .register_static_module("Option<String>", exported_module!(StringModule).into());
120817        }
120818    }
120819    #[cfg(feature = "rhai")]
120820    #[allow(unused_mut)]
120821    impl rhai::CustomType for Giveaway {
120822        fn build(mut builder: rhai::TypeBuilder<Self>) {
120823            builder.with_get("chats", Self::rhai_get_chats);
120824            builder.with_get(
120825                "winners_selection_date",
120826                Self::rhai_get_winners_selection_date,
120827            );
120828            builder.with_get("winner_count", Self::rhai_get_winner_count);
120829            builder.with_get("only_new_members", Self::rhai_get_only_new_members);
120830            builder.with_get("has_public_winners", Self::rhai_get_has_public_winners);
120831            builder.with_get("prize_description", Self::rhai_get_prize_description);
120832            builder.with_get("country_codes", Self::rhai_get_country_codes);
120833            builder.with_get("prize_star_count", Self::rhai_get_prize_star_count);
120834            builder.with_get(
120835                "premium_subscription_month_count",
120836                Self::rhai_get_premium_subscription_month_count,
120837            );
120838            builder.on_debug(|t| format!("{:?}", t));
120839            drop(builder);
120840        }
120841    }
120842    #[cfg(feature = "rhai")]
120843    impl SetupRhai for DirectMessagesTopic {
120844        fn setup_rhai(engine: &mut rhai::Engine) {
120845            engine.build_type::<DirectMessagesTopic>();
120846            engine
120847                .register_type_with_name::<Option<bool>>("Option<bool>")
120848                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120849            engine
120850                .register_type_with_name::<Option<i64>>("Option<i64>")
120851                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120852            engine
120853                .register_type_with_name::<Option<String>>("Option<String>")
120854                .register_static_module("Option<String>", exported_module!(StringModule).into());
120855            engine
120856                .register_type_with_name::<Option<User>>("Option<User>")
120857                .build_type::<User>()
120858                .register_static_module("Option<User>", exported_module!(UserModule).into());
120859        }
120860    }
120861    #[cfg(feature = "rhai")]
120862    #[allow(unused_mut)]
120863    impl rhai::CustomType for DirectMessagesTopic {
120864        fn build(mut builder: rhai::TypeBuilder<Self>) {
120865            builder.with_get("topic_id", Self::rhai_get_topic_id);
120866            builder.with_get("user", Self::rhai_get_user);
120867            builder.on_debug(|t| format!("{:?}", t));
120868            drop(builder);
120869        }
120870    }
120871    #[cfg(feature = "rhai")]
120872    impl SetupRhai for RevenueWithdrawalStateSucceeded {
120873        fn setup_rhai(engine: &mut rhai::Engine) {
120874            engine.build_type::<RevenueWithdrawalStateSucceeded>();
120875            engine
120876                .register_type_with_name::<Option<i64>>("Option<i64>")
120877                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120878            engine
120879                .register_type_with_name::<Option<String>>("Option<String>")
120880                .register_static_module("Option<String>", exported_module!(StringModule).into());
120881        }
120882    }
120883    #[cfg(feature = "rhai")]
120884    #[allow(unused_mut)]
120885    impl rhai::CustomType for RevenueWithdrawalStateSucceeded {
120886        fn build(mut builder: rhai::TypeBuilder<Self>) {
120887            builder.with_get("tg_type", Self::rhai_get_tg_type);
120888            builder.with_get("date", Self::rhai_get_date);
120889            builder.with_get("url", Self::rhai_get_url);
120890            builder.on_debug(|t| format!("{:?}", t));
120891            drop(builder);
120892        }
120893    }
120894    #[cfg(feature = "rhai")]
120895    impl SetupRhai for VideoChatEnded {
120896        fn setup_rhai(engine: &mut rhai::Engine) {
120897            engine.build_type::<VideoChatEnded>();
120898            engine
120899                .register_type_with_name::<Option<i64>>("Option<i64>")
120900                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120901        }
120902    }
120903    #[cfg(feature = "rhai")]
120904    #[allow(unused_mut)]
120905    impl rhai::CustomType for VideoChatEnded {
120906        fn build(mut builder: rhai::TypeBuilder<Self>) {
120907            builder.with_get("duration", Self::rhai_get_duration);
120908            builder.on_debug(|t| format!("{:?}", t));
120909            drop(builder);
120910        }
120911    }
120912    #[cfg(feature = "rhai")]
120913    impl SetupRhai for ChatMemberOwner {
120914        fn setup_rhai(engine: &mut rhai::Engine) {
120915            engine.build_type::<ChatMemberOwner>();
120916            engine
120917                .register_type_with_name::<Option<bool>>("Option<bool>")
120918                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120919            engine
120920                .register_type_with_name::<Option<i64>>("Option<i64>")
120921                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120922            engine
120923                .register_type_with_name::<Option<String>>("Option<String>")
120924                .register_static_module("Option<String>", exported_module!(StringModule).into());
120925            engine
120926                .register_type_with_name::<Option<User>>("Option<User>")
120927                .build_type::<User>()
120928                .register_static_module("Option<User>", exported_module!(UserModule).into());
120929        }
120930    }
120931    #[cfg(feature = "rhai")]
120932    #[allow(unused_mut)]
120933    impl rhai::CustomType for ChatMemberOwner {
120934        fn build(mut builder: rhai::TypeBuilder<Self>) {
120935            builder.with_get("user", Self::rhai_get_user);
120936            builder.with_get("is_anonymous", Self::rhai_get_is_anonymous);
120937            builder.with_get("custom_title", Self::rhai_get_custom_title);
120938            builder.on_debug(|t| format!("{:?}", t));
120939            drop(builder);
120940        }
120941    }
120942    #[cfg(feature = "rhai")]
120943    impl SetupRhai for PreCheckoutQuery {
120944        fn setup_rhai(engine: &mut rhai::Engine) {
120945            engine.build_type::<PreCheckoutQuery>();
120946            engine
120947                .register_type_with_name::<Option<bool>>("Option<bool>")
120948                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120949            engine
120950                .register_type_with_name::<Option<i64>>("Option<i64>")
120951                .register_static_module("Option<i64>", exported_module!(i64Module).into());
120952            engine
120953                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
120954                .build_type::<OrderInfo>()
120955                .register_static_module(
120956                    "Option<OrderInfo>",
120957                    exported_module!(OrderInfoModule).into(),
120958                );
120959            engine
120960                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
120961                .build_type::<ShippingAddress>()
120962                .register_static_module(
120963                    "Option<ShippingAddress>",
120964                    exported_module!(ShippingAddressModule).into(),
120965                );
120966            engine
120967                .register_type_with_name::<Option<String>>("Option<String>")
120968                .register_static_module("Option<String>", exported_module!(StringModule).into());
120969            engine
120970                .register_type_with_name::<Option<User>>("Option<User>")
120971                .build_type::<User>()
120972                .register_static_module("Option<User>", exported_module!(UserModule).into());
120973        }
120974    }
120975    #[cfg(feature = "rhai")]
120976    #[allow(unused_mut)]
120977    impl rhai::CustomType for PreCheckoutQuery {
120978        fn build(mut builder: rhai::TypeBuilder<Self>) {
120979            builder.with_get("id", Self::rhai_get_id);
120980            builder.with_get("from", Self::rhai_get_from);
120981            builder.with_get("currency", Self::rhai_get_currency);
120982            builder.with_get("total_amount", Self::rhai_get_total_amount);
120983            builder.with_get("invoice_payload", Self::rhai_get_invoice_payload);
120984            builder.with_get("shipping_option_id", Self::rhai_get_shipping_option_id);
120985            builder.with_get("order_info", Self::rhai_get_order_info);
120986            builder.on_debug(|t| format!("{:?}", t));
120987            drop(builder);
120988        }
120989    }
120990    #[cfg(feature = "rhai")]
120991    impl SetupRhai for InlineQueryResultVenue {
120992        fn setup_rhai(engine: &mut rhai::Engine) {
120993            engine.build_type::<InlineQueryResultVenue>();
120994            engine
120995                .register_type_with_name::<Option<bool>>("Option<bool>")
120996                .register_static_module("Option<bool>", exported_module!(boolModule).into());
120997            engine
120998                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
120999                .build_type::<CallbackGame>()
121000                .register_static_module(
121001                    "Option<CallbackGame>",
121002                    exported_module!(CallbackGameModule).into(),
121003                );
121004            engine
121005                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
121006                .build_type::<CopyTextButton>()
121007                .register_static_module(
121008                    "Option<CopyTextButton>",
121009                    exported_module!(CopyTextButtonModule).into(),
121010                );
121011            engine
121012                .register_type_with_name::<Option<f64>>("Option<f64>")
121013                .register_static_module("Option<f64>", exported_module!(f64Module).into());
121014            engine
121015                .register_type_with_name::<Option<InlineKeyboardButton>>(
121016                    "Option<InlineKeyboardButton>",
121017                )
121018                .build_type::<InlineKeyboardButton>()
121019                .register_static_module(
121020                    "Option<InlineKeyboardButton>",
121021                    exported_module!(InlineKeyboardButtonModule).into(),
121022                );
121023            engine
121024                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
121025                    "Option<InlineKeyboardMarkup>",
121026                )
121027                .build_type::<InlineKeyboardMarkup>()
121028                .register_static_module(
121029                    "Option<InlineKeyboardMarkup>",
121030                    exported_module!(InlineKeyboardMarkupModule).into(),
121031                );
121032            engine
121033                .register_type_with_name::<Option<InputMessageContent>>(
121034                    "Option<InputMessageContent>",
121035                )
121036                .register_static_module(
121037                    "Option<InputMessageContent>",
121038                    exported_module!(InputMessageContentModule).into(),
121039                );
121040            engine
121041                .register_type_with_name::<Option<i64>>("Option<i64>")
121042                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121043            engine
121044                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
121045                .build_type::<LoginUrl>()
121046                .register_static_module(
121047                    "Option<LoginUrl>",
121048                    exported_module!(LoginUrlModule).into(),
121049                );
121050            engine
121051                .register_type_with_name::<Option<String>>("Option<String>")
121052                .register_static_module("Option<String>", exported_module!(StringModule).into());
121053            engine
121054                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
121055                    "Option<SwitchInlineQueryChosenChat>",
121056                )
121057                .build_type::<SwitchInlineQueryChosenChat>()
121058                .register_static_module(
121059                    "Option<SwitchInlineQueryChosenChat>",
121060                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
121061                );
121062            engine
121063                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
121064                .build_type::<WebAppInfo>()
121065                .register_static_module(
121066                    "Option<WebAppInfo>",
121067                    exported_module!(WebAppInfoModule).into(),
121068                );
121069        }
121070    }
121071    #[cfg(feature = "rhai")]
121072    #[allow(unused_mut)]
121073    impl rhai::CustomType for InlineQueryResultVenue {
121074        fn build(mut builder: rhai::TypeBuilder<Self>) {
121075            builder.with_get("tg_type", Self::rhai_get_tg_type);
121076            builder.with_get("id", Self::rhai_get_id);
121077            builder.with_get("latitude", Self::rhai_get_latitude);
121078            builder.with_get("longitude", Self::rhai_get_longitude);
121079            builder.with_get("title", Self::rhai_get_title);
121080            builder.with_get("address", Self::rhai_get_address);
121081            builder.with_get("foursquare_id", Self::rhai_get_foursquare_id);
121082            builder.with_get("foursquare_type", Self::rhai_get_foursquare_type);
121083            builder.with_get("google_place_id", Self::rhai_get_google_place_id);
121084            builder.with_get("google_place_type", Self::rhai_get_google_place_type);
121085            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
121086            builder.with_get(
121087                "input_message_content",
121088                Self::rhai_get_input_message_content,
121089            );
121090            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
121091            builder.with_get("thumbnail_width", Self::rhai_get_thumbnail_width);
121092            builder.with_get("thumbnail_height", Self::rhai_get_thumbnail_height);
121093            builder.on_debug(|t| format!("{:?}", t));
121094            drop(builder);
121095        }
121096    }
121097    #[cfg(feature = "rhai")]
121098    impl SetupRhai for PaidMediaInfo {
121099        fn setup_rhai(engine: &mut rhai::Engine) {
121100            engine.build_type::<PaidMediaInfo>();
121101            engine
121102                .register_type_with_name::<Option<i64>>("Option<i64>")
121103                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121104            engine
121105                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
121106                .register_static_module(
121107                    "Option<PaidMedia>",
121108                    exported_module!(PaidMediaModule).into(),
121109                );
121110        }
121111    }
121112    #[cfg(feature = "rhai")]
121113    #[allow(unused_mut)]
121114    impl rhai::CustomType for PaidMediaInfo {
121115        fn build(mut builder: rhai::TypeBuilder<Self>) {
121116            builder.with_get("star_count", Self::rhai_get_star_count);
121117            builder.with_get("paid_media", Self::rhai_get_paid_media);
121118            builder.on_debug(|t| format!("{:?}", t));
121119            drop(builder);
121120        }
121121    }
121122    #[cfg(feature = "rhai")]
121123    impl SetupRhai for InlineQueryResultCachedPhoto {
121124        fn setup_rhai(engine: &mut rhai::Engine) {
121125            engine.build_type::<InlineQueryResultCachedPhoto>();
121126            engine
121127                .register_type_with_name::<Option<bool>>("Option<bool>")
121128                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121129            engine
121130                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
121131                .build_type::<CallbackGame>()
121132                .register_static_module(
121133                    "Option<CallbackGame>",
121134                    exported_module!(CallbackGameModule).into(),
121135                );
121136            engine
121137                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
121138                .build_type::<CopyTextButton>()
121139                .register_static_module(
121140                    "Option<CopyTextButton>",
121141                    exported_module!(CopyTextButtonModule).into(),
121142                );
121143            engine
121144                .register_type_with_name::<Option<InlineKeyboardButton>>(
121145                    "Option<InlineKeyboardButton>",
121146                )
121147                .build_type::<InlineKeyboardButton>()
121148                .register_static_module(
121149                    "Option<InlineKeyboardButton>",
121150                    exported_module!(InlineKeyboardButtonModule).into(),
121151                );
121152            engine
121153                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
121154                    "Option<InlineKeyboardMarkup>",
121155                )
121156                .build_type::<InlineKeyboardMarkup>()
121157                .register_static_module(
121158                    "Option<InlineKeyboardMarkup>",
121159                    exported_module!(InlineKeyboardMarkupModule).into(),
121160                );
121161            engine
121162                .register_type_with_name::<Option<InputMessageContent>>(
121163                    "Option<InputMessageContent>",
121164                )
121165                .register_static_module(
121166                    "Option<InputMessageContent>",
121167                    exported_module!(InputMessageContentModule).into(),
121168                );
121169            engine
121170                .register_type_with_name::<Option<i64>>("Option<i64>")
121171                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121172            engine
121173                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
121174                .build_type::<LoginUrl>()
121175                .register_static_module(
121176                    "Option<LoginUrl>",
121177                    exported_module!(LoginUrlModule).into(),
121178                );
121179            engine
121180                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
121181                .build_type::<MessageEntity>()
121182                .register_static_module(
121183                    "Option<MessageEntity>",
121184                    exported_module!(MessageEntityModule).into(),
121185                );
121186            engine
121187                .register_type_with_name::<Option<String>>("Option<String>")
121188                .register_static_module("Option<String>", exported_module!(StringModule).into());
121189            engine
121190                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
121191                    "Option<SwitchInlineQueryChosenChat>",
121192                )
121193                .build_type::<SwitchInlineQueryChosenChat>()
121194                .register_static_module(
121195                    "Option<SwitchInlineQueryChosenChat>",
121196                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
121197                );
121198            engine
121199                .register_type_with_name::<Option<User>>("Option<User>")
121200                .build_type::<User>()
121201                .register_static_module("Option<User>", exported_module!(UserModule).into());
121202            engine
121203                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
121204                .build_type::<WebAppInfo>()
121205                .register_static_module(
121206                    "Option<WebAppInfo>",
121207                    exported_module!(WebAppInfoModule).into(),
121208                );
121209        }
121210    }
121211    #[cfg(feature = "rhai")]
121212    #[allow(unused_mut)]
121213    impl rhai::CustomType for InlineQueryResultCachedPhoto {
121214        fn build(mut builder: rhai::TypeBuilder<Self>) {
121215            builder.with_get("tg_type", Self::rhai_get_tg_type);
121216            builder.with_get("id", Self::rhai_get_id);
121217            builder.with_get("photo_file_id", Self::rhai_get_photo_file_id);
121218            builder.with_get("title", Self::rhai_get_title);
121219            builder.with_get("description", Self::rhai_get_description);
121220            builder.with_get("caption", Self::rhai_get_caption);
121221            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
121222            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
121223            builder.with_get(
121224                "show_caption_above_media",
121225                Self::rhai_get_show_caption_above_media,
121226            );
121227            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
121228            builder.with_get(
121229                "input_message_content",
121230                Self::rhai_get_input_message_content,
121231            );
121232            builder.on_debug(|t| format!("{:?}", t));
121233            drop(builder);
121234        }
121235    }
121236    #[cfg(feature = "rhai")]
121237    impl SetupRhai for GeneralForumTopicUnhidden {
121238        fn setup_rhai(engine: &mut rhai::Engine) {
121239            engine.build_type::<GeneralForumTopicUnhidden>();
121240        }
121241    }
121242    #[cfg(feature = "rhai")]
121243    #[allow(unused_mut)]
121244    impl rhai::CustomType for GeneralForumTopicUnhidden {
121245        fn build(mut builder: rhai::TypeBuilder<Self>) {
121246            builder.on_debug(|t| format!("{:?}", t));
121247            drop(builder);
121248        }
121249    }
121250    #[cfg(feature = "rhai")]
121251    impl SetupRhai for GiveawayWinners {
121252        fn setup_rhai(engine: &mut rhai::Engine) {
121253            engine.build_type::<GiveawayWinners>();
121254            engine
121255                .register_type_with_name::<Option<bool>>("Option<bool>")
121256                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121257            engine
121258                .register_type_with_name::<Option<Chat>>("Option<Chat>")
121259                .build_type::<Chat>()
121260                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
121261            engine
121262                .register_type_with_name::<Option<i64>>("Option<i64>")
121263                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121264            engine
121265                .register_type_with_name::<Option<String>>("Option<String>")
121266                .register_static_module("Option<String>", exported_module!(StringModule).into());
121267            engine
121268                .register_type_with_name::<Option<User>>("Option<User>")
121269                .build_type::<User>()
121270                .register_static_module("Option<User>", exported_module!(UserModule).into());
121271        }
121272    }
121273    #[cfg(feature = "rhai")]
121274    #[allow(unused_mut)]
121275    impl rhai::CustomType for GiveawayWinners {
121276        fn build(mut builder: rhai::TypeBuilder<Self>) {
121277            builder.with_get("chat", Self::rhai_get_chat);
121278            builder.with_get("giveaway_message_id", Self::rhai_get_giveaway_message_id);
121279            builder.with_get(
121280                "winners_selection_date",
121281                Self::rhai_get_winners_selection_date,
121282            );
121283            builder.with_get("winner_count", Self::rhai_get_winner_count);
121284            builder.with_get("winners", Self::rhai_get_winners);
121285            builder.with_get(
121286                "additional_chat_count",
121287                Self::rhai_get_additional_chat_count,
121288            );
121289            builder.with_get("prize_star_count", Self::rhai_get_prize_star_count);
121290            builder.with_get(
121291                "premium_subscription_month_count",
121292                Self::rhai_get_premium_subscription_month_count,
121293            );
121294            builder.with_get(
121295                "unclaimed_prize_count",
121296                Self::rhai_get_unclaimed_prize_count,
121297            );
121298            builder.with_get("only_new_members", Self::rhai_get_only_new_members);
121299            builder.with_get("was_refunded", Self::rhai_get_was_refunded);
121300            builder.with_get("prize_description", Self::rhai_get_prize_description);
121301            builder.on_debug(|t| format!("{:?}", t));
121302            drop(builder);
121303        }
121304    }
121305    #[cfg(feature = "rhai")]
121306    impl SetupRhai for MessageOriginHiddenUser {
121307        fn setup_rhai(engine: &mut rhai::Engine) {
121308            engine.build_type::<MessageOriginHiddenUser>();
121309            engine
121310                .register_type_with_name::<Option<i64>>("Option<i64>")
121311                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121312            engine
121313                .register_type_with_name::<Option<String>>("Option<String>")
121314                .register_static_module("Option<String>", exported_module!(StringModule).into());
121315        }
121316    }
121317    #[cfg(feature = "rhai")]
121318    #[allow(unused_mut)]
121319    impl rhai::CustomType for MessageOriginHiddenUser {
121320        fn build(mut builder: rhai::TypeBuilder<Self>) {
121321            builder.with_get("tg_type", Self::rhai_get_tg_type);
121322            builder.with_get("date", Self::rhai_get_date);
121323            builder.with_get("sender_user_name", Self::rhai_get_sender_user_name);
121324            builder.on_debug(|t| format!("{:?}", t));
121325            drop(builder);
121326        }
121327    }
121328    #[cfg(feature = "rhai")]
121329    impl SetupRhai for StoryAreaTypeLocation {
121330        fn setup_rhai(engine: &mut rhai::Engine) {
121331            engine.build_type::<StoryAreaTypeLocation>();
121332            engine
121333                .register_type_with_name::<Option<f64>>("Option<f64>")
121334                .register_static_module("Option<f64>", exported_module!(f64Module).into());
121335            engine
121336                .register_type_with_name::<Option<LocationAddress>>("Option<LocationAddress>")
121337                .build_type::<LocationAddress>()
121338                .register_static_module(
121339                    "Option<LocationAddress>",
121340                    exported_module!(LocationAddressModule).into(),
121341                );
121342            engine
121343                .register_type_with_name::<Option<String>>("Option<String>")
121344                .register_static_module("Option<String>", exported_module!(StringModule).into());
121345        }
121346    }
121347    #[cfg(feature = "rhai")]
121348    #[allow(unused_mut)]
121349    impl rhai::CustomType for StoryAreaTypeLocation {
121350        fn build(mut builder: rhai::TypeBuilder<Self>) {
121351            builder.with_get("tg_type", Self::rhai_get_tg_type);
121352            builder.with_get("latitude", Self::rhai_get_latitude);
121353            builder.with_get("longitude", Self::rhai_get_longitude);
121354            builder.with_get("address", Self::rhai_get_address);
121355            builder.on_debug(|t| format!("{:?}", t));
121356            drop(builder);
121357        }
121358    }
121359    #[cfg(feature = "rhai")]
121360    impl SetupRhai for SuggestedPostParameters {
121361        fn setup_rhai(engine: &mut rhai::Engine) {
121362            engine.build_type::<SuggestedPostParameters>();
121363            engine
121364                .register_type_with_name::<Option<i64>>("Option<i64>")
121365                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121366            engine
121367                .register_type_with_name::<Option<String>>("Option<String>")
121368                .register_static_module("Option<String>", exported_module!(StringModule).into());
121369            engine
121370                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
121371                .build_type::<SuggestedPostPrice>()
121372                .register_static_module(
121373                    "Option<SuggestedPostPrice>",
121374                    exported_module!(SuggestedPostPriceModule).into(),
121375                );
121376        }
121377    }
121378    #[cfg(feature = "rhai")]
121379    #[allow(unused_mut)]
121380    impl rhai::CustomType for SuggestedPostParameters {
121381        fn build(mut builder: rhai::TypeBuilder<Self>) {
121382            builder.with_get("price", Self::rhai_get_price);
121383            builder.with_get("send_date", Self::rhai_get_send_date);
121384            builder.on_debug(|t| format!("{:?}", t));
121385            drop(builder);
121386        }
121387    }
121388    #[cfg(feature = "rhai")]
121389    impl SetupRhai for StickerSet {
121390        fn setup_rhai(engine: &mut rhai::Engine) {
121391            engine.build_type::<StickerSet>();
121392            engine
121393                .register_type_with_name::<Option<bool>>("Option<bool>")
121394                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121395            engine
121396                .register_type_with_name::<Option<File>>("Option<File>")
121397                .build_type::<File>()
121398                .register_static_module("Option<File>", exported_module!(FileModule).into());
121399            engine
121400                .register_type_with_name::<Option<f64>>("Option<f64>")
121401                .register_static_module("Option<f64>", exported_module!(f64Module).into());
121402            engine
121403                .register_type_with_name::<Option<i64>>("Option<i64>")
121404                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121405            engine
121406                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
121407                .build_type::<MaskPosition>()
121408                .register_static_module(
121409                    "Option<MaskPosition>",
121410                    exported_module!(MaskPositionModule).into(),
121411                );
121412            engine
121413                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
121414                .build_type::<PhotoSize>()
121415                .register_static_module(
121416                    "Option<PhotoSize>",
121417                    exported_module!(PhotoSizeModule).into(),
121418                );
121419            engine
121420                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
121421                .build_type::<Sticker>()
121422                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
121423            engine
121424                .register_type_with_name::<Option<String>>("Option<String>")
121425                .register_static_module("Option<String>", exported_module!(StringModule).into());
121426        }
121427    }
121428    #[cfg(feature = "rhai")]
121429    #[allow(unused_mut)]
121430    impl rhai::CustomType for StickerSet {
121431        fn build(mut builder: rhai::TypeBuilder<Self>) {
121432            builder.with_get("name", Self::rhai_get_name);
121433            builder.with_get("title", Self::rhai_get_title);
121434            builder.with_get("sticker_type", Self::rhai_get_sticker_type);
121435            builder.with_get("stickers", Self::rhai_get_stickers);
121436            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
121437            builder.on_debug(|t| format!("{:?}", t));
121438            drop(builder);
121439        }
121440    }
121441    #[cfg(feature = "rhai")]
121442    impl SetupRhai for Poll {
121443        fn setup_rhai(engine: &mut rhai::Engine) {
121444            engine.build_type::<Poll>();
121445            engine
121446                .register_type_with_name::<Option<bool>>("Option<bool>")
121447                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121448            engine
121449                .register_type_with_name::<Option<i64>>("Option<i64>")
121450                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121451            engine
121452                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
121453                .build_type::<MessageEntity>()
121454                .register_static_module(
121455                    "Option<MessageEntity>",
121456                    exported_module!(MessageEntityModule).into(),
121457                );
121458            engine
121459                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
121460                .build_type::<PollOption>()
121461                .register_static_module(
121462                    "Option<PollOption>",
121463                    exported_module!(PollOptionModule).into(),
121464                );
121465            engine
121466                .register_type_with_name::<Option<String>>("Option<String>")
121467                .register_static_module("Option<String>", exported_module!(StringModule).into());
121468            engine
121469                .register_type_with_name::<Option<User>>("Option<User>")
121470                .build_type::<User>()
121471                .register_static_module("Option<User>", exported_module!(UserModule).into());
121472        }
121473    }
121474    #[cfg(feature = "rhai")]
121475    #[allow(unused_mut)]
121476    impl rhai::CustomType for Poll {
121477        fn build(mut builder: rhai::TypeBuilder<Self>) {
121478            builder.with_get("id", Self::rhai_get_id);
121479            builder.with_get("question", Self::rhai_get_question);
121480            builder.with_get("question_entities", Self::rhai_get_question_entities);
121481            builder.with_get("options", Self::rhai_get_options);
121482            builder.with_get("total_voter_count", Self::rhai_get_total_voter_count);
121483            builder.with_get("is_closed", Self::rhai_get_is_closed);
121484            builder.with_get("is_anonymous", Self::rhai_get_is_anonymous);
121485            builder.with_get("tg_type", Self::rhai_get_tg_type);
121486            builder.with_get(
121487                "allows_multiple_answers",
121488                Self::rhai_get_allows_multiple_answers,
121489            );
121490            builder.with_get("correct_option_id", Self::rhai_get_correct_option_id);
121491            builder.with_get("explanation", Self::rhai_get_explanation);
121492            builder.with_get("explanation_entities", Self::rhai_get_explanation_entities);
121493            builder.with_get("open_period", Self::rhai_get_open_period);
121494            builder.with_get("close_date", Self::rhai_get_close_date);
121495            builder.on_debug(|t| format!("{:?}", t));
121496            drop(builder);
121497        }
121498    }
121499    #[cfg(feature = "rhai")]
121500    impl SetupRhai for Video {
121501        fn setup_rhai(engine: &mut rhai::Engine) {
121502            engine.build_type::<Video>();
121503            engine
121504                .register_type_with_name::<Option<i64>>("Option<i64>")
121505                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121506            engine
121507                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
121508                .build_type::<PhotoSize>()
121509                .register_static_module(
121510                    "Option<PhotoSize>",
121511                    exported_module!(PhotoSizeModule).into(),
121512                );
121513            engine
121514                .register_type_with_name::<Option<String>>("Option<String>")
121515                .register_static_module("Option<String>", exported_module!(StringModule).into());
121516        }
121517    }
121518    #[cfg(feature = "rhai")]
121519    #[allow(unused_mut)]
121520    impl rhai::CustomType for Video {
121521        fn build(mut builder: rhai::TypeBuilder<Self>) {
121522            builder.with_get("file_id", Self::rhai_get_file_id);
121523            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
121524            builder.with_get("width", Self::rhai_get_width);
121525            builder.with_get("height", Self::rhai_get_height);
121526            builder.with_get("duration", Self::rhai_get_duration);
121527            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
121528            builder.with_get("cover", Self::rhai_get_cover);
121529            builder.with_get("start_timestamp", Self::rhai_get_start_timestamp);
121530            builder.with_get("file_name", Self::rhai_get_file_name);
121531            builder.with_get("mime_type", Self::rhai_get_mime_type);
121532            builder.with_get("file_size", Self::rhai_get_file_size);
121533            builder.on_debug(|t| format!("{:?}", t));
121534            drop(builder);
121535        }
121536    }
121537    #[cfg(feature = "rhai")]
121538    impl SetupRhai for GeneralForumTopicHidden {
121539        fn setup_rhai(engine: &mut rhai::Engine) {
121540            engine.build_type::<GeneralForumTopicHidden>();
121541        }
121542    }
121543    #[cfg(feature = "rhai")]
121544    #[allow(unused_mut)]
121545    impl rhai::CustomType for GeneralForumTopicHidden {
121546        fn build(mut builder: rhai::TypeBuilder<Self>) {
121547            builder.on_debug(|t| format!("{:?}", t));
121548            drop(builder);
121549        }
121550    }
121551    #[cfg(feature = "rhai")]
121552    impl SetupRhai for ChatAdministratorRights {
121553        fn setup_rhai(engine: &mut rhai::Engine) {
121554            engine.build_type::<ChatAdministratorRights>();
121555            engine
121556                .register_type_with_name::<Option<bool>>("Option<bool>")
121557                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121558        }
121559    }
121560    #[cfg(feature = "rhai")]
121561    #[allow(unused_mut)]
121562    impl rhai::CustomType for ChatAdministratorRights {
121563        fn build(mut builder: rhai::TypeBuilder<Self>) {
121564            builder.with_get("is_anonymous", Self::rhai_get_is_anonymous);
121565            builder.with_get("can_manage_chat", Self::rhai_get_can_manage_chat);
121566            builder.with_get("can_delete_messages", Self::rhai_get_can_delete_messages);
121567            builder.with_get(
121568                "can_manage_video_chats",
121569                Self::rhai_get_can_manage_video_chats,
121570            );
121571            builder.with_get("can_restrict_members", Self::rhai_get_can_restrict_members);
121572            builder.with_get("can_promote_members", Self::rhai_get_can_promote_members);
121573            builder.with_get("can_change_info", Self::rhai_get_can_change_info);
121574            builder.with_get("can_invite_users", Self::rhai_get_can_invite_users);
121575            builder.with_get("can_post_stories", Self::rhai_get_can_post_stories);
121576            builder.with_get("can_edit_stories", Self::rhai_get_can_edit_stories);
121577            builder.with_get("can_delete_stories", Self::rhai_get_can_delete_stories);
121578            builder.with_get("can_post_messages", Self::rhai_get_can_post_messages);
121579            builder.with_get("can_edit_messages", Self::rhai_get_can_edit_messages);
121580            builder.with_get("can_pin_messages", Self::rhai_get_can_pin_messages);
121581            builder.with_get("can_manage_topics", Self::rhai_get_can_manage_topics);
121582            builder.with_get(
121583                "can_manage_direct_messages",
121584                Self::rhai_get_can_manage_direct_messages,
121585            );
121586            builder.on_debug(|t| format!("{:?}", t));
121587            drop(builder);
121588        }
121589    }
121590    #[cfg(feature = "rhai")]
121591    impl SetupRhai for ResponseParameters {
121592        fn setup_rhai(engine: &mut rhai::Engine) {
121593            engine.build_type::<ResponseParameters>();
121594            engine
121595                .register_type_with_name::<Option<i64>>("Option<i64>")
121596                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121597        }
121598    }
121599    #[cfg(feature = "rhai")]
121600    #[allow(unused_mut)]
121601    impl rhai::CustomType for ResponseParameters {
121602        fn build(mut builder: rhai::TypeBuilder<Self>) {
121603            builder.with_get("migrate_to_chat_id", Self::rhai_get_migrate_to_chat_id);
121604            builder.with_get("retry_after", Self::rhai_get_retry_after);
121605            builder.on_debug(|t| format!("{:?}", t));
121606            drop(builder);
121607        }
121608    }
121609    #[cfg(feature = "rhai")]
121610    impl SetupRhai for VideoNote {
121611        fn setup_rhai(engine: &mut rhai::Engine) {
121612            engine.build_type::<VideoNote>();
121613            engine
121614                .register_type_with_name::<Option<i64>>("Option<i64>")
121615                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121616            engine
121617                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
121618                .build_type::<PhotoSize>()
121619                .register_static_module(
121620                    "Option<PhotoSize>",
121621                    exported_module!(PhotoSizeModule).into(),
121622                );
121623            engine
121624                .register_type_with_name::<Option<String>>("Option<String>")
121625                .register_static_module("Option<String>", exported_module!(StringModule).into());
121626        }
121627    }
121628    #[cfg(feature = "rhai")]
121629    #[allow(unused_mut)]
121630    impl rhai::CustomType for VideoNote {
121631        fn build(mut builder: rhai::TypeBuilder<Self>) {
121632            builder.with_get("file_id", Self::rhai_get_file_id);
121633            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
121634            builder.with_get("length", Self::rhai_get_length);
121635            builder.with_get("duration", Self::rhai_get_duration);
121636            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
121637            builder.with_get("file_size", Self::rhai_get_file_size);
121638            builder.on_debug(|t| format!("{:?}", t));
121639            drop(builder);
121640        }
121641    }
121642    #[cfg(feature = "rhai")]
121643    impl SetupRhai for ReplyKeyboardRemove {
121644        fn setup_rhai(engine: &mut rhai::Engine) {
121645            engine.build_type::<ReplyKeyboardRemove>();
121646            engine
121647                .register_type_with_name::<Option<bool>>("Option<bool>")
121648                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121649        }
121650    }
121651    #[cfg(feature = "rhai")]
121652    #[allow(unused_mut)]
121653    impl rhai::CustomType for ReplyKeyboardRemove {
121654        fn build(mut builder: rhai::TypeBuilder<Self>) {
121655            builder.with_get("remove_keyboard", Self::rhai_get_remove_keyboard);
121656            builder.with_get("selective", Self::rhai_get_selective);
121657            builder.on_debug(|t| format!("{:?}", t));
121658            drop(builder);
121659        }
121660    }
121661    #[cfg(feature = "rhai")]
121662    impl SetupRhai for LabeledPrice {
121663        fn setup_rhai(engine: &mut rhai::Engine) {
121664            engine.build_type::<LabeledPrice>();
121665            engine
121666                .register_type_with_name::<Option<i64>>("Option<i64>")
121667                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121668            engine
121669                .register_type_with_name::<Option<String>>("Option<String>")
121670                .register_static_module("Option<String>", exported_module!(StringModule).into());
121671        }
121672    }
121673    #[cfg(feature = "rhai")]
121674    #[allow(unused_mut)]
121675    impl rhai::CustomType for LabeledPrice {
121676        fn build(mut builder: rhai::TypeBuilder<Self>) {
121677            builder.with_get("label", Self::rhai_get_label);
121678            builder.with_get("amount", Self::rhai_get_amount);
121679            builder.on_debug(|t| format!("{:?}", t));
121680            drop(builder);
121681        }
121682    }
121683    #[cfg(feature = "rhai")]
121684    impl SetupRhai for InputPollOption {
121685        fn setup_rhai(engine: &mut rhai::Engine) {
121686            engine.build_type::<InputPollOption>();
121687            engine
121688                .register_type_with_name::<Option<bool>>("Option<bool>")
121689                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121690            engine
121691                .register_type_with_name::<Option<i64>>("Option<i64>")
121692                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121693            engine
121694                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
121695                .build_type::<MessageEntity>()
121696                .register_static_module(
121697                    "Option<MessageEntity>",
121698                    exported_module!(MessageEntityModule).into(),
121699                );
121700            engine
121701                .register_type_with_name::<Option<String>>("Option<String>")
121702                .register_static_module("Option<String>", exported_module!(StringModule).into());
121703            engine
121704                .register_type_with_name::<Option<User>>("Option<User>")
121705                .build_type::<User>()
121706                .register_static_module("Option<User>", exported_module!(UserModule).into());
121707        }
121708    }
121709    #[cfg(feature = "rhai")]
121710    #[allow(unused_mut)]
121711    impl rhai::CustomType for InputPollOption {
121712        fn build(mut builder: rhai::TypeBuilder<Self>) {
121713            builder.with_get("text", Self::rhai_get_text);
121714            builder.with_get("text_parse_mode", Self::rhai_get_text_parse_mode);
121715            builder.with_get("text_entities", Self::rhai_get_text_entities);
121716            builder.on_debug(|t| format!("{:?}", t));
121717            drop(builder);
121718        }
121719    }
121720    #[cfg(feature = "rhai")]
121721    impl SetupRhai for ChatBoostSourcePremium {
121722        fn setup_rhai(engine: &mut rhai::Engine) {
121723            engine.build_type::<ChatBoostSourcePremium>();
121724            engine
121725                .register_type_with_name::<Option<bool>>("Option<bool>")
121726                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121727            engine
121728                .register_type_with_name::<Option<i64>>("Option<i64>")
121729                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121730            engine
121731                .register_type_with_name::<Option<String>>("Option<String>")
121732                .register_static_module("Option<String>", exported_module!(StringModule).into());
121733            engine
121734                .register_type_with_name::<Option<User>>("Option<User>")
121735                .build_type::<User>()
121736                .register_static_module("Option<User>", exported_module!(UserModule).into());
121737        }
121738    }
121739    #[cfg(feature = "rhai")]
121740    #[allow(unused_mut)]
121741    impl rhai::CustomType for ChatBoostSourcePremium {
121742        fn build(mut builder: rhai::TypeBuilder<Self>) {
121743            builder.with_get("source", Self::rhai_get_source);
121744            builder.with_get("user", Self::rhai_get_user);
121745            builder.on_debug(|t| format!("{:?}", t));
121746            drop(builder);
121747        }
121748    }
121749    #[cfg(feature = "rhai")]
121750    impl SetupRhai for InputMediaVideo {
121751        fn setup_rhai(engine: &mut rhai::Engine) {
121752            engine.build_type::<InputMediaVideo>();
121753            engine
121754                .register_type_with_name::<Option<bool>>("Option<bool>")
121755                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121756            engine
121757                .register_type_with_name::<Option<i64>>("Option<i64>")
121758                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121759            engine
121760                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
121761                .build_type::<MessageEntity>()
121762                .register_static_module(
121763                    "Option<MessageEntity>",
121764                    exported_module!(MessageEntityModule).into(),
121765                );
121766            engine
121767                .register_type_with_name::<Option<String>>("Option<String>")
121768                .register_static_module("Option<String>", exported_module!(StringModule).into());
121769            engine
121770                .register_type_with_name::<Option<User>>("Option<User>")
121771                .build_type::<User>()
121772                .register_static_module("Option<User>", exported_module!(UserModule).into());
121773        }
121774    }
121775    #[cfg(feature = "rhai")]
121776    #[allow(unused_mut)]
121777    impl rhai::CustomType for InputMediaVideo {
121778        fn build(mut builder: rhai::TypeBuilder<Self>) {
121779            builder.with_get("tg_type", Self::rhai_get_tg_type);
121780            builder.with_get("media", Self::rhai_get_media);
121781            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
121782            builder.with_get("cover", Self::rhai_get_cover);
121783            builder.with_get("start_timestamp", Self::rhai_get_start_timestamp);
121784            builder.with_get("caption", Self::rhai_get_caption);
121785            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
121786            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
121787            builder.with_get(
121788                "show_caption_above_media",
121789                Self::rhai_get_show_caption_above_media,
121790            );
121791            builder.with_get("width", Self::rhai_get_width);
121792            builder.with_get("height", Self::rhai_get_height);
121793            builder.with_get("duration", Self::rhai_get_duration);
121794            builder.with_get("supports_streaming", Self::rhai_get_supports_streaming);
121795            builder.with_get("has_spoiler", Self::rhai_get_has_spoiler);
121796            builder.on_debug(|t| format!("{:?}", t));
121797            drop(builder);
121798        }
121799    }
121800    #[cfg(feature = "rhai")]
121801    impl SetupRhai for InputMediaAudio {
121802        fn setup_rhai(engine: &mut rhai::Engine) {
121803            engine.build_type::<InputMediaAudio>();
121804            engine
121805                .register_type_with_name::<Option<bool>>("Option<bool>")
121806                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121807            engine
121808                .register_type_with_name::<Option<i64>>("Option<i64>")
121809                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121810            engine
121811                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
121812                .build_type::<MessageEntity>()
121813                .register_static_module(
121814                    "Option<MessageEntity>",
121815                    exported_module!(MessageEntityModule).into(),
121816                );
121817            engine
121818                .register_type_with_name::<Option<String>>("Option<String>")
121819                .register_static_module("Option<String>", exported_module!(StringModule).into());
121820            engine
121821                .register_type_with_name::<Option<User>>("Option<User>")
121822                .build_type::<User>()
121823                .register_static_module("Option<User>", exported_module!(UserModule).into());
121824        }
121825    }
121826    #[cfg(feature = "rhai")]
121827    #[allow(unused_mut)]
121828    impl rhai::CustomType for InputMediaAudio {
121829        fn build(mut builder: rhai::TypeBuilder<Self>) {
121830            builder.with_get("tg_type", Self::rhai_get_tg_type);
121831            builder.with_get("media", Self::rhai_get_media);
121832            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
121833            builder.with_get("caption", Self::rhai_get_caption);
121834            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
121835            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
121836            builder.with_get("duration", Self::rhai_get_duration);
121837            builder.with_get("performer", Self::rhai_get_performer);
121838            builder.with_get("title", Self::rhai_get_title);
121839            builder.on_debug(|t| format!("{:?}", t));
121840            drop(builder);
121841        }
121842    }
121843    #[cfg(feature = "rhai")]
121844    impl SetupRhai for OwnedGifts {
121845        fn setup_rhai(engine: &mut rhai::Engine) {
121846            engine.build_type::<OwnedGifts>();
121847            engine
121848                .register_type_with_name::<Option<i64>>("Option<i64>")
121849                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121850            engine
121851                .register_type_with_name::<Option<OwnedGift>>("Option<OwnedGift>")
121852                .register_static_module(
121853                    "Option<OwnedGift>",
121854                    exported_module!(OwnedGiftModule).into(),
121855                );
121856            engine
121857                .register_type_with_name::<Option<String>>("Option<String>")
121858                .register_static_module("Option<String>", exported_module!(StringModule).into());
121859        }
121860    }
121861    #[cfg(feature = "rhai")]
121862    #[allow(unused_mut)]
121863    impl rhai::CustomType for OwnedGifts {
121864        fn build(mut builder: rhai::TypeBuilder<Self>) {
121865            builder.with_get("total_count", Self::rhai_get_total_count);
121866            builder.with_get("gifts", Self::rhai_get_gifts);
121867            builder.with_get("next_offset", Self::rhai_get_next_offset);
121868            builder.on_debug(|t| format!("{:?}", t));
121869            drop(builder);
121870        }
121871    }
121872    #[cfg(feature = "rhai")]
121873    impl SetupRhai for EncryptedPassportElement {
121874        fn setup_rhai(engine: &mut rhai::Engine) {
121875            engine.build_type::<EncryptedPassportElement>();
121876            engine
121877                .register_type_with_name::<Option<i64>>("Option<i64>")
121878                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121879            engine
121880                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
121881                .build_type::<PassportFile>()
121882                .register_static_module(
121883                    "Option<PassportFile>",
121884                    exported_module!(PassportFileModule).into(),
121885                );
121886            engine
121887                .register_type_with_name::<Option<String>>("Option<String>")
121888                .register_static_module("Option<String>", exported_module!(StringModule).into());
121889        }
121890    }
121891    #[cfg(feature = "rhai")]
121892    #[allow(unused_mut)]
121893    impl rhai::CustomType for EncryptedPassportElement {
121894        fn build(mut builder: rhai::TypeBuilder<Self>) {
121895            builder.with_get("tg_type", Self::rhai_get_tg_type);
121896            builder.with_get("data", Self::rhai_get_data);
121897            builder.with_get("phone_number", Self::rhai_get_phone_number);
121898            builder.with_get("email", Self::rhai_get_email);
121899            builder.with_get("files", Self::rhai_get_files);
121900            builder.with_get("front_side", Self::rhai_get_front_side);
121901            builder.with_get("reverse_side", Self::rhai_get_reverse_side);
121902            builder.with_get("selfie", Self::rhai_get_selfie);
121903            builder.with_get("translation", Self::rhai_get_translation);
121904            builder.with_get("hash", Self::rhai_get_hash);
121905            builder.on_debug(|t| format!("{:?}", t));
121906            drop(builder);
121907        }
121908    }
121909    #[cfg(feature = "rhai")]
121910    impl SetupRhai for Invoice {
121911        fn setup_rhai(engine: &mut rhai::Engine) {
121912            engine.build_type::<Invoice>();
121913            engine
121914                .register_type_with_name::<Option<i64>>("Option<i64>")
121915                .register_static_module("Option<i64>", exported_module!(i64Module).into());
121916            engine
121917                .register_type_with_name::<Option<String>>("Option<String>")
121918                .register_static_module("Option<String>", exported_module!(StringModule).into());
121919        }
121920    }
121921    #[cfg(feature = "rhai")]
121922    #[allow(unused_mut)]
121923    impl rhai::CustomType for Invoice {
121924        fn build(mut builder: rhai::TypeBuilder<Self>) {
121925            builder.with_get("title", Self::rhai_get_title);
121926            builder.with_get("description", Self::rhai_get_description);
121927            builder.with_get("start_parameter", Self::rhai_get_start_parameter);
121928            builder.with_get("currency", Self::rhai_get_currency);
121929            builder.with_get("total_amount", Self::rhai_get_total_amount);
121930            builder.on_debug(|t| format!("{:?}", t));
121931            drop(builder);
121932        }
121933    }
121934    #[cfg(feature = "rhai")]
121935    impl SetupRhai for BotShortDescription {
121936        fn setup_rhai(engine: &mut rhai::Engine) {
121937            engine.build_type::<BotShortDescription>();
121938            engine
121939                .register_type_with_name::<Option<String>>("Option<String>")
121940                .register_static_module("Option<String>", exported_module!(StringModule).into());
121941        }
121942    }
121943    #[cfg(feature = "rhai")]
121944    #[allow(unused_mut)]
121945    impl rhai::CustomType for BotShortDescription {
121946        fn build(mut builder: rhai::TypeBuilder<Self>) {
121947            builder.with_get("short_description", Self::rhai_get_short_description);
121948            builder.on_debug(|t| format!("{:?}", t));
121949            drop(builder);
121950        }
121951    }
121952    #[cfg(feature = "rhai")]
121953    impl SetupRhai for ChatFullInfo {
121954        fn setup_rhai(engine: &mut rhai::Engine) {
121955            engine.build_type::<ChatFullInfo>();
121956            engine
121957                .register_type_with_name::<Option<AcceptedGiftTypes>>("Option<AcceptedGiftTypes>")
121958                .build_type::<AcceptedGiftTypes>()
121959                .register_static_module(
121960                    "Option<AcceptedGiftTypes>",
121961                    exported_module!(AcceptedGiftTypesModule).into(),
121962                );
121963            engine
121964                .register_type_with_name::<Option<Animation>>("Option<Animation>")
121965                .build_type::<Animation>()
121966                .register_static_module(
121967                    "Option<Animation>",
121968                    exported_module!(AnimationModule).into(),
121969                );
121970            engine
121971                .register_type_with_name::<Option<Audio>>("Option<Audio>")
121972                .build_type::<Audio>()
121973                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
121974            engine
121975                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
121976                .register_static_module(
121977                    "Option<BackgroundType>",
121978                    exported_module!(BackgroundTypeModule).into(),
121979                );
121980            engine
121981                .register_type_with_name::<Option<Birthdate>>("Option<Birthdate>")
121982                .build_type::<Birthdate>()
121983                .register_static_module(
121984                    "Option<Birthdate>",
121985                    exported_module!(BirthdateModule).into(),
121986                );
121987            engine
121988                .register_type_with_name::<Option<bool>>("Option<bool>")
121989                .register_static_module("Option<bool>", exported_module!(boolModule).into());
121990            engine
121991                .register_type_with_name::<Option<BusinessIntro>>("Option<BusinessIntro>")
121992                .build_type::<BusinessIntro>()
121993                .register_static_module(
121994                    "Option<BusinessIntro>",
121995                    exported_module!(BusinessIntroModule).into(),
121996                );
121997            engine
121998                .register_type_with_name::<Option<BusinessLocation>>("Option<BusinessLocation>")
121999                .build_type::<BusinessLocation>()
122000                .register_static_module(
122001                    "Option<BusinessLocation>",
122002                    exported_module!(BusinessLocationModule).into(),
122003                );
122004            engine
122005                .register_type_with_name::<Option<BusinessOpeningHours>>(
122006                    "Option<BusinessOpeningHours>",
122007                )
122008                .build_type::<BusinessOpeningHours>()
122009                .register_static_module(
122010                    "Option<BusinessOpeningHours>",
122011                    exported_module!(BusinessOpeningHoursModule).into(),
122012                );
122013            engine
122014                .register_type_with_name::<Option<BusinessOpeningHoursInterval>>(
122015                    "Option<BusinessOpeningHoursInterval>",
122016                )
122017                .build_type::<BusinessOpeningHoursInterval>()
122018                .register_static_module(
122019                    "Option<BusinessOpeningHoursInterval>",
122020                    exported_module!(BusinessOpeningHoursIntervalModule).into(),
122021                );
122022            engine
122023                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
122024                .build_type::<CallbackGame>()
122025                .register_static_module(
122026                    "Option<CallbackGame>",
122027                    exported_module!(CallbackGameModule).into(),
122028                );
122029            engine
122030                .register_type_with_name::<Option<Chat>>("Option<Chat>")
122031                .build_type::<Chat>()
122032                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
122033            engine
122034                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
122035                .build_type::<ChatBackground>()
122036                .register_static_module(
122037                    "Option<ChatBackground>",
122038                    exported_module!(ChatBackgroundModule).into(),
122039                );
122040            engine
122041                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
122042                .build_type::<ChatBoostAdded>()
122043                .register_static_module(
122044                    "Option<ChatBoostAdded>",
122045                    exported_module!(ChatBoostAddedModule).into(),
122046                );
122047            engine
122048                .register_type_with_name::<Option<ChatLocation>>("Option<ChatLocation>")
122049                .build_type::<ChatLocation>()
122050                .register_static_module(
122051                    "Option<ChatLocation>",
122052                    exported_module!(ChatLocationModule).into(),
122053                );
122054            engine
122055                .register_type_with_name::<Option<ChatPermissions>>("Option<ChatPermissions>")
122056                .build_type::<ChatPermissions>()
122057                .register_static_module(
122058                    "Option<ChatPermissions>",
122059                    exported_module!(ChatPermissionsModule).into(),
122060                );
122061            engine
122062                .register_type_with_name::<Option<ChatPhoto>>("Option<ChatPhoto>")
122063                .build_type::<ChatPhoto>()
122064                .register_static_module(
122065                    "Option<ChatPhoto>",
122066                    exported_module!(ChatPhotoModule).into(),
122067                );
122068            engine
122069                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
122070                .build_type::<ChatShared>()
122071                .register_static_module(
122072                    "Option<ChatShared>",
122073                    exported_module!(ChatSharedModule).into(),
122074                );
122075            engine
122076                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
122077                .build_type::<Checklist>()
122078                .register_static_module(
122079                    "Option<Checklist>",
122080                    exported_module!(ChecklistModule).into(),
122081                );
122082            engine
122083                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
122084                .build_type::<ChecklistTask>()
122085                .register_static_module(
122086                    "Option<ChecklistTask>",
122087                    exported_module!(ChecklistTaskModule).into(),
122088                );
122089            engine
122090                .register_type_with_name::<Option<ChecklistTasksAdded>>(
122091                    "Option<ChecklistTasksAdded>",
122092                )
122093                .build_type::<ChecklistTasksAdded>()
122094                .register_static_module(
122095                    "Option<ChecklistTasksAdded>",
122096                    exported_module!(ChecklistTasksAddedModule).into(),
122097                );
122098            engine
122099                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
122100                .build_type::<ChecklistTasksDone>()
122101                .register_static_module(
122102                    "Option<ChecklistTasksDone>",
122103                    exported_module!(ChecklistTasksDoneModule).into(),
122104                );
122105            engine
122106                .register_type_with_name::<Option<Contact>>("Option<Contact>")
122107                .build_type::<Contact>()
122108                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
122109            engine
122110                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
122111                .build_type::<CopyTextButton>()
122112                .register_static_module(
122113                    "Option<CopyTextButton>",
122114                    exported_module!(CopyTextButtonModule).into(),
122115                );
122116            engine
122117                .register_type_with_name::<Option<Dice>>("Option<Dice>")
122118                .build_type::<Dice>()
122119                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
122120            engine
122121                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
122122                    "Option<DirectMessagePriceChanged>",
122123                )
122124                .build_type::<DirectMessagePriceChanged>()
122125                .register_static_module(
122126                    "Option<DirectMessagePriceChanged>",
122127                    exported_module!(DirectMessagePriceChangedModule).into(),
122128                );
122129            engine
122130                .register_type_with_name::<Option<DirectMessagesTopic>>(
122131                    "Option<DirectMessagesTopic>",
122132                )
122133                .build_type::<DirectMessagesTopic>()
122134                .register_static_module(
122135                    "Option<DirectMessagesTopic>",
122136                    exported_module!(DirectMessagesTopicModule).into(),
122137                );
122138            engine
122139                .register_type_with_name::<Option<Document>>("Option<Document>")
122140                .build_type::<Document>()
122141                .register_static_module(
122142                    "Option<Document>",
122143                    exported_module!(DocumentModule).into(),
122144                );
122145            engine
122146                .register_type_with_name::<Option<EncryptedCredentials>>(
122147                    "Option<EncryptedCredentials>",
122148                )
122149                .build_type::<EncryptedCredentials>()
122150                .register_static_module(
122151                    "Option<EncryptedCredentials>",
122152                    exported_module!(EncryptedCredentialsModule).into(),
122153                );
122154            engine
122155                .register_type_with_name::<Option<EncryptedPassportElement>>(
122156                    "Option<EncryptedPassportElement>",
122157                )
122158                .build_type::<EncryptedPassportElement>()
122159                .register_static_module(
122160                    "Option<EncryptedPassportElement>",
122161                    exported_module!(EncryptedPassportElementModule).into(),
122162                );
122163            engine
122164                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
122165                .build_type::<ExternalReplyInfo>()
122166                .register_static_module(
122167                    "Option<ExternalReplyInfo>",
122168                    exported_module!(ExternalReplyInfoModule).into(),
122169                );
122170            engine
122171                .register_type_with_name::<Option<File>>("Option<File>")
122172                .build_type::<File>()
122173                .register_static_module("Option<File>", exported_module!(FileModule).into());
122174            engine
122175                .register_type_with_name::<Option<f64>>("Option<f64>")
122176                .register_static_module("Option<f64>", exported_module!(f64Module).into());
122177            engine
122178                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
122179                .build_type::<ForumTopicClosed>()
122180                .register_static_module(
122181                    "Option<ForumTopicClosed>",
122182                    exported_module!(ForumTopicClosedModule).into(),
122183                );
122184            engine
122185                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
122186                .build_type::<ForumTopicCreated>()
122187                .register_static_module(
122188                    "Option<ForumTopicCreated>",
122189                    exported_module!(ForumTopicCreatedModule).into(),
122190                );
122191            engine
122192                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
122193                .build_type::<ForumTopicEdited>()
122194                .register_static_module(
122195                    "Option<ForumTopicEdited>",
122196                    exported_module!(ForumTopicEditedModule).into(),
122197                );
122198            engine
122199                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
122200                .build_type::<ForumTopicReopened>()
122201                .register_static_module(
122202                    "Option<ForumTopicReopened>",
122203                    exported_module!(ForumTopicReopenedModule).into(),
122204                );
122205            engine
122206                .register_type_with_name::<Option<Game>>("Option<Game>")
122207                .build_type::<Game>()
122208                .register_static_module("Option<Game>", exported_module!(GameModule).into());
122209            engine
122210                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
122211                    "Option<GeneralForumTopicHidden>",
122212                )
122213                .build_type::<GeneralForumTopicHidden>()
122214                .register_static_module(
122215                    "Option<GeneralForumTopicHidden>",
122216                    exported_module!(GeneralForumTopicHiddenModule).into(),
122217                );
122218            engine
122219                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
122220                    "Option<GeneralForumTopicUnhidden>",
122221                )
122222                .build_type::<GeneralForumTopicUnhidden>()
122223                .register_static_module(
122224                    "Option<GeneralForumTopicUnhidden>",
122225                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
122226                );
122227            engine
122228                .register_type_with_name::<Option<Gift>>("Option<Gift>")
122229                .build_type::<Gift>()
122230                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
122231            engine
122232                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
122233                .build_type::<GiftInfo>()
122234                .register_static_module(
122235                    "Option<GiftInfo>",
122236                    exported_module!(GiftInfoModule).into(),
122237                );
122238            engine
122239                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
122240                .build_type::<Giveaway>()
122241                .register_static_module(
122242                    "Option<Giveaway>",
122243                    exported_module!(GiveawayModule).into(),
122244                );
122245            engine
122246                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
122247                .build_type::<GiveawayCompleted>()
122248                .register_static_module(
122249                    "Option<GiveawayCompleted>",
122250                    exported_module!(GiveawayCompletedModule).into(),
122251                );
122252            engine
122253                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
122254                .build_type::<GiveawayCreated>()
122255                .register_static_module(
122256                    "Option<GiveawayCreated>",
122257                    exported_module!(GiveawayCreatedModule).into(),
122258                );
122259            engine
122260                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
122261                .build_type::<GiveawayWinners>()
122262                .register_static_module(
122263                    "Option<GiveawayWinners>",
122264                    exported_module!(GiveawayWinnersModule).into(),
122265                );
122266            engine
122267                .register_type_with_name::<Option<InlineKeyboardButton>>(
122268                    "Option<InlineKeyboardButton>",
122269                )
122270                .build_type::<InlineKeyboardButton>()
122271                .register_static_module(
122272                    "Option<InlineKeyboardButton>",
122273                    exported_module!(InlineKeyboardButtonModule).into(),
122274                );
122275            engine
122276                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
122277                    "Option<InlineKeyboardMarkup>",
122278                )
122279                .build_type::<InlineKeyboardMarkup>()
122280                .register_static_module(
122281                    "Option<InlineKeyboardMarkup>",
122282                    exported_module!(InlineKeyboardMarkupModule).into(),
122283                );
122284            engine
122285                .register_type_with_name::<Option<i64>>("Option<i64>")
122286                .register_static_module("Option<i64>", exported_module!(i64Module).into());
122287            engine
122288                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
122289                .build_type::<Invoice>()
122290                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
122291            engine
122292                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
122293                .build_type::<LinkPreviewOptions>()
122294                .register_static_module(
122295                    "Option<LinkPreviewOptions>",
122296                    exported_module!(LinkPreviewOptionsModule).into(),
122297                );
122298            engine
122299                .register_type_with_name::<Option<Location>>("Option<Location>")
122300                .build_type::<Location>()
122301                .register_static_module(
122302                    "Option<Location>",
122303                    exported_module!(LocationModule).into(),
122304                );
122305            engine
122306                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
122307                .build_type::<LoginUrl>()
122308                .register_static_module(
122309                    "Option<LoginUrl>",
122310                    exported_module!(LoginUrlModule).into(),
122311                );
122312            engine
122313                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
122314                .build_type::<MaskPosition>()
122315                .register_static_module(
122316                    "Option<MaskPosition>",
122317                    exported_module!(MaskPositionModule).into(),
122318                );
122319            engine
122320                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
122321                    "Option<MaybeInaccessibleMessage>",
122322                )
122323                .register_static_module(
122324                    "Option<MaybeInaccessibleMessage>",
122325                    exported_module!(MaybeInaccessibleMessageModule).into(),
122326                );
122327            engine
122328                .register_type_with_name::<Option<Message>>("Option<Message>")
122329                .build_type::<Message>()
122330                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
122331            engine
122332                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
122333                    "Option<MessageAutoDeleteTimerChanged>",
122334                )
122335                .build_type::<MessageAutoDeleteTimerChanged>()
122336                .register_static_module(
122337                    "Option<MessageAutoDeleteTimerChanged>",
122338                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
122339                );
122340            engine
122341                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
122342                .build_type::<MessageEntity>()
122343                .register_static_module(
122344                    "Option<MessageEntity>",
122345                    exported_module!(MessageEntityModule).into(),
122346                );
122347            engine
122348                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
122349                .register_static_module(
122350                    "Option<MessageOrigin>",
122351                    exported_module!(MessageOriginModule).into(),
122352                );
122353            engine
122354                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
122355                .build_type::<OrderInfo>()
122356                .register_static_module(
122357                    "Option<OrderInfo>",
122358                    exported_module!(OrderInfoModule).into(),
122359                );
122360            engine
122361                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
122362                .register_static_module(
122363                    "Option<PaidMedia>",
122364                    exported_module!(PaidMediaModule).into(),
122365                );
122366            engine
122367                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
122368                .build_type::<PaidMediaInfo>()
122369                .register_static_module(
122370                    "Option<PaidMediaInfo>",
122371                    exported_module!(PaidMediaInfoModule).into(),
122372                );
122373            engine
122374                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
122375                    "Option<PaidMessagePriceChanged>",
122376                )
122377                .build_type::<PaidMessagePriceChanged>()
122378                .register_static_module(
122379                    "Option<PaidMessagePriceChanged>",
122380                    exported_module!(PaidMessagePriceChangedModule).into(),
122381                );
122382            engine
122383                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
122384                .build_type::<PassportData>()
122385                .register_static_module(
122386                    "Option<PassportData>",
122387                    exported_module!(PassportDataModule).into(),
122388                );
122389            engine
122390                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
122391                .build_type::<PassportFile>()
122392                .register_static_module(
122393                    "Option<PassportFile>",
122394                    exported_module!(PassportFileModule).into(),
122395                );
122396            engine
122397                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
122398                .build_type::<PhotoSize>()
122399                .register_static_module(
122400                    "Option<PhotoSize>",
122401                    exported_module!(PhotoSizeModule).into(),
122402                );
122403            engine
122404                .register_type_with_name::<Option<Poll>>("Option<Poll>")
122405                .build_type::<Poll>()
122406                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
122407            engine
122408                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
122409                .build_type::<PollOption>()
122410                .register_static_module(
122411                    "Option<PollOption>",
122412                    exported_module!(PollOptionModule).into(),
122413                );
122414            engine
122415                .register_type_with_name::<Option<ProximityAlertTriggered>>(
122416                    "Option<ProximityAlertTriggered>",
122417                )
122418                .build_type::<ProximityAlertTriggered>()
122419                .register_static_module(
122420                    "Option<ProximityAlertTriggered>",
122421                    exported_module!(ProximityAlertTriggeredModule).into(),
122422                );
122423            engine
122424                .register_type_with_name::<Option<ReactionType>>("Option<ReactionType>")
122425                .register_static_module(
122426                    "Option<ReactionType>",
122427                    exported_module!(ReactionTypeModule).into(),
122428                );
122429            engine
122430                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
122431                .build_type::<RefundedPayment>()
122432                .register_static_module(
122433                    "Option<RefundedPayment>",
122434                    exported_module!(RefundedPaymentModule).into(),
122435                );
122436            engine
122437                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
122438                .build_type::<SharedUser>()
122439                .register_static_module(
122440                    "Option<SharedUser>",
122441                    exported_module!(SharedUserModule).into(),
122442                );
122443            engine
122444                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
122445                .build_type::<ShippingAddress>()
122446                .register_static_module(
122447                    "Option<ShippingAddress>",
122448                    exported_module!(ShippingAddressModule).into(),
122449                );
122450            engine
122451                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
122452                .build_type::<StarAmount>()
122453                .register_static_module(
122454                    "Option<StarAmount>",
122455                    exported_module!(StarAmountModule).into(),
122456                );
122457            engine
122458                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
122459                .build_type::<Sticker>()
122460                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
122461            engine
122462                .register_type_with_name::<Option<Story>>("Option<Story>")
122463                .build_type::<Story>()
122464                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
122465            engine
122466                .register_type_with_name::<Option<String>>("Option<String>")
122467                .register_static_module("Option<String>", exported_module!(StringModule).into());
122468            engine
122469                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
122470                .build_type::<SuccessfulPayment>()
122471                .register_static_module(
122472                    "Option<SuccessfulPayment>",
122473                    exported_module!(SuccessfulPaymentModule).into(),
122474                );
122475            engine
122476                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
122477                    "Option<SuggestedPostApprovalFailed>",
122478                )
122479                .build_type::<SuggestedPostApprovalFailed>()
122480                .register_static_module(
122481                    "Option<SuggestedPostApprovalFailed>",
122482                    exported_module!(SuggestedPostApprovalFailedModule).into(),
122483                );
122484            engine
122485                .register_type_with_name::<Option<SuggestedPostApproved>>(
122486                    "Option<SuggestedPostApproved>",
122487                )
122488                .build_type::<SuggestedPostApproved>()
122489                .register_static_module(
122490                    "Option<SuggestedPostApproved>",
122491                    exported_module!(SuggestedPostApprovedModule).into(),
122492                );
122493            engine
122494                .register_type_with_name::<Option<SuggestedPostDeclined>>(
122495                    "Option<SuggestedPostDeclined>",
122496                )
122497                .build_type::<SuggestedPostDeclined>()
122498                .register_static_module(
122499                    "Option<SuggestedPostDeclined>",
122500                    exported_module!(SuggestedPostDeclinedModule).into(),
122501                );
122502            engine
122503                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
122504                .build_type::<SuggestedPostInfo>()
122505                .register_static_module(
122506                    "Option<SuggestedPostInfo>",
122507                    exported_module!(SuggestedPostInfoModule).into(),
122508                );
122509            engine
122510                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
122511                .build_type::<SuggestedPostPaid>()
122512                .register_static_module(
122513                    "Option<SuggestedPostPaid>",
122514                    exported_module!(SuggestedPostPaidModule).into(),
122515                );
122516            engine
122517                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
122518                .build_type::<SuggestedPostPrice>()
122519                .register_static_module(
122520                    "Option<SuggestedPostPrice>",
122521                    exported_module!(SuggestedPostPriceModule).into(),
122522                );
122523            engine
122524                .register_type_with_name::<Option<SuggestedPostRefunded>>(
122525                    "Option<SuggestedPostRefunded>",
122526                )
122527                .build_type::<SuggestedPostRefunded>()
122528                .register_static_module(
122529                    "Option<SuggestedPostRefunded>",
122530                    exported_module!(SuggestedPostRefundedModule).into(),
122531                );
122532            engine
122533                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
122534                    "Option<SwitchInlineQueryChosenChat>",
122535                )
122536                .build_type::<SwitchInlineQueryChosenChat>()
122537                .register_static_module(
122538                    "Option<SwitchInlineQueryChosenChat>",
122539                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
122540                );
122541            engine
122542                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
122543                .build_type::<TextQuote>()
122544                .register_static_module(
122545                    "Option<TextQuote>",
122546                    exported_module!(TextQuoteModule).into(),
122547                );
122548            engine
122549                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
122550                .build_type::<UniqueGift>()
122551                .register_static_module(
122552                    "Option<UniqueGift>",
122553                    exported_module!(UniqueGiftModule).into(),
122554                );
122555            engine
122556                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
122557                .build_type::<UniqueGiftBackdrop>()
122558                .register_static_module(
122559                    "Option<UniqueGiftBackdrop>",
122560                    exported_module!(UniqueGiftBackdropModule).into(),
122561                );
122562            engine
122563                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
122564                    "Option<UniqueGiftBackdropColors>",
122565                )
122566                .build_type::<UniqueGiftBackdropColors>()
122567                .register_static_module(
122568                    "Option<UniqueGiftBackdropColors>",
122569                    exported_module!(UniqueGiftBackdropColorsModule).into(),
122570                );
122571            engine
122572                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
122573                .build_type::<UniqueGiftInfo>()
122574                .register_static_module(
122575                    "Option<UniqueGiftInfo>",
122576                    exported_module!(UniqueGiftInfoModule).into(),
122577                );
122578            engine
122579                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
122580                .build_type::<UniqueGiftModel>()
122581                .register_static_module(
122582                    "Option<UniqueGiftModel>",
122583                    exported_module!(UniqueGiftModelModule).into(),
122584                );
122585            engine
122586                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
122587                .build_type::<UniqueGiftSymbol>()
122588                .register_static_module(
122589                    "Option<UniqueGiftSymbol>",
122590                    exported_module!(UniqueGiftSymbolModule).into(),
122591                );
122592            engine
122593                .register_type_with_name::<Option<User>>("Option<User>")
122594                .build_type::<User>()
122595                .register_static_module("Option<User>", exported_module!(UserModule).into());
122596            engine
122597                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
122598                .build_type::<UsersShared>()
122599                .register_static_module(
122600                    "Option<UsersShared>",
122601                    exported_module!(UsersSharedModule).into(),
122602                );
122603            engine
122604                .register_type_with_name::<Option<Venue>>("Option<Venue>")
122605                .build_type::<Venue>()
122606                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
122607            engine
122608                .register_type_with_name::<Option<Video>>("Option<Video>")
122609                .build_type::<Video>()
122610                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
122611            engine
122612                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
122613                .build_type::<VideoChatEnded>()
122614                .register_static_module(
122615                    "Option<VideoChatEnded>",
122616                    exported_module!(VideoChatEndedModule).into(),
122617                );
122618            engine
122619                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
122620                    "Option<VideoChatParticipantsInvited>",
122621                )
122622                .build_type::<VideoChatParticipantsInvited>()
122623                .register_static_module(
122624                    "Option<VideoChatParticipantsInvited>",
122625                    exported_module!(VideoChatParticipantsInvitedModule).into(),
122626                );
122627            engine
122628                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
122629                .build_type::<VideoChatScheduled>()
122630                .register_static_module(
122631                    "Option<VideoChatScheduled>",
122632                    exported_module!(VideoChatScheduledModule).into(),
122633                );
122634            engine
122635                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
122636                .build_type::<VideoChatStarted>()
122637                .register_static_module(
122638                    "Option<VideoChatStarted>",
122639                    exported_module!(VideoChatStartedModule).into(),
122640                );
122641            engine
122642                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
122643                .build_type::<VideoNote>()
122644                .register_static_module(
122645                    "Option<VideoNote>",
122646                    exported_module!(VideoNoteModule).into(),
122647                );
122648            engine
122649                .register_type_with_name::<Option<Voice>>("Option<Voice>")
122650                .build_type::<Voice>()
122651                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
122652            engine
122653                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
122654                .build_type::<WebAppData>()
122655                .register_static_module(
122656                    "Option<WebAppData>",
122657                    exported_module!(WebAppDataModule).into(),
122658                );
122659            engine
122660                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
122661                .build_type::<WebAppInfo>()
122662                .register_static_module(
122663                    "Option<WebAppInfo>",
122664                    exported_module!(WebAppInfoModule).into(),
122665                );
122666            engine
122667                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
122668                .build_type::<WriteAccessAllowed>()
122669                .register_static_module(
122670                    "Option<WriteAccessAllowed>",
122671                    exported_module!(WriteAccessAllowedModule).into(),
122672                );
122673        }
122674    }
122675    #[cfg(feature = "rhai")]
122676    #[allow(unused_mut)]
122677    impl rhai::CustomType for ChatFullInfo {
122678        fn build(mut builder: rhai::TypeBuilder<Self>) {
122679            builder.with_get("id", Self::rhai_get_id);
122680            builder.with_get("tg_type", Self::rhai_get_tg_type);
122681            builder.with_get("title", Self::rhai_get_title);
122682            builder.with_get("username", Self::rhai_get_username);
122683            builder.with_get("first_name", Self::rhai_get_first_name);
122684            builder.with_get("last_name", Self::rhai_get_last_name);
122685            builder.with_get("is_forum", Self::rhai_get_is_forum);
122686            builder.with_get("is_direct_messages", Self::rhai_get_is_direct_messages);
122687            builder.with_get("accent_color_id", Self::rhai_get_accent_color_id);
122688            builder.with_get("max_reaction_count", Self::rhai_get_max_reaction_count);
122689            builder.with_get("photo", Self::rhai_get_photo);
122690            builder.with_get("active_usernames", Self::rhai_get_active_usernames);
122691            builder.with_get("birthdate", Self::rhai_get_birthdate);
122692            builder.with_get("business_intro", Self::rhai_get_business_intro);
122693            builder.with_get("business_location", Self::rhai_get_business_location);
122694            builder.with_get(
122695                "business_opening_hours",
122696                Self::rhai_get_business_opening_hours,
122697            );
122698            builder.with_get("personal_chat", Self::rhai_get_personal_chat);
122699            builder.with_get("parent_chat", Self::rhai_get_parent_chat);
122700            builder.with_get("available_reactions", Self::rhai_get_available_reactions);
122701            builder.with_get(
122702                "background_custom_emoji_id",
122703                Self::rhai_get_background_custom_emoji_id,
122704            );
122705            builder.with_get(
122706                "profile_accent_color_id",
122707                Self::rhai_get_profile_accent_color_id,
122708            );
122709            builder.with_get(
122710                "profile_background_custom_emoji_id",
122711                Self::rhai_get_profile_background_custom_emoji_id,
122712            );
122713            builder.with_get(
122714                "emoji_status_custom_emoji_id",
122715                Self::rhai_get_emoji_status_custom_emoji_id,
122716            );
122717            builder.with_get(
122718                "emoji_status_expiration_date",
122719                Self::rhai_get_emoji_status_expiration_date,
122720            );
122721            builder.with_get("bio", Self::rhai_get_bio);
122722            builder.with_get("has_private_forwards", Self::rhai_get_has_private_forwards);
122723            builder.with_get(
122724                "has_restricted_voice_and_video_messages",
122725                Self::rhai_get_has_restricted_voice_and_video_messages,
122726            );
122727            builder.with_get(
122728                "join_to_send_messages",
122729                Self::rhai_get_join_to_send_messages,
122730            );
122731            builder.with_get("join_by_request", Self::rhai_get_join_by_request);
122732            builder.with_get("description", Self::rhai_get_description);
122733            builder.with_get("invite_link", Self::rhai_get_invite_link);
122734            builder.with_get("pinned_message", Self::rhai_get_pinned_message);
122735            builder.with_get("permissions", Self::rhai_get_permissions);
122736            builder.with_get("accepted_gift_types", Self::rhai_get_accepted_gift_types);
122737            builder.with_get("can_send_paid_media", Self::rhai_get_can_send_paid_media);
122738            builder.with_get("slow_mode_delay", Self::rhai_get_slow_mode_delay);
122739            builder.with_get(
122740                "unrestrict_boost_count",
122741                Self::rhai_get_unrestrict_boost_count,
122742            );
122743            builder.with_get(
122744                "message_auto_delete_time",
122745                Self::rhai_get_message_auto_delete_time,
122746            );
122747            builder.with_get(
122748                "has_aggressive_anti_spam_enabled",
122749                Self::rhai_get_has_aggressive_anti_spam_enabled,
122750            );
122751            builder.with_get("has_hidden_members", Self::rhai_get_has_hidden_members);
122752            builder.with_get(
122753                "has_protected_content",
122754                Self::rhai_get_has_protected_content,
122755            );
122756            builder.with_get("has_visible_history", Self::rhai_get_has_visible_history);
122757            builder.with_get("sticker_set_name", Self::rhai_get_sticker_set_name);
122758            builder.with_get("can_set_sticker_set", Self::rhai_get_can_set_sticker_set);
122759            builder.with_get(
122760                "custom_emoji_sticker_set_name",
122761                Self::rhai_get_custom_emoji_sticker_set_name,
122762            );
122763            builder.with_get("linked_chat_id", Self::rhai_get_linked_chat_id);
122764            builder.with_get("location", Self::rhai_get_location);
122765            builder.on_debug(|t| format!("{:?}", t));
122766            drop(builder);
122767        }
122768    }
122769    #[cfg(feature = "rhai")]
122770    impl SetupRhai for PollAnswer {
122771        fn setup_rhai(engine: &mut rhai::Engine) {
122772            engine.build_type::<PollAnswer>();
122773            engine
122774                .register_type_with_name::<Option<bool>>("Option<bool>")
122775                .register_static_module("Option<bool>", exported_module!(boolModule).into());
122776            engine
122777                .register_type_with_name::<Option<Chat>>("Option<Chat>")
122778                .build_type::<Chat>()
122779                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
122780            engine
122781                .register_type_with_name::<Option<i64>>("Option<i64>")
122782                .register_static_module("Option<i64>", exported_module!(i64Module).into());
122783            engine
122784                .register_type_with_name::<Option<String>>("Option<String>")
122785                .register_static_module("Option<String>", exported_module!(StringModule).into());
122786            engine
122787                .register_type_with_name::<Option<User>>("Option<User>")
122788                .build_type::<User>()
122789                .register_static_module("Option<User>", exported_module!(UserModule).into());
122790        }
122791    }
122792    #[cfg(feature = "rhai")]
122793    #[allow(unused_mut)]
122794    impl rhai::CustomType for PollAnswer {
122795        fn build(mut builder: rhai::TypeBuilder<Self>) {
122796            builder.with_get("poll_id", Self::rhai_get_poll_id);
122797            builder.with_get("voter_chat", Self::rhai_get_voter_chat);
122798            builder.with_get("user", Self::rhai_get_user);
122799            builder.with_get("option_ids", Self::rhai_get_option_ids);
122800            builder.on_debug(|t| format!("{:?}", t));
122801            drop(builder);
122802        }
122803    }
122804    #[cfg(feature = "rhai")]
122805    impl SetupRhai for WebhookInfo {
122806        fn setup_rhai(engine: &mut rhai::Engine) {
122807            engine.build_type::<WebhookInfo>();
122808            engine
122809                .register_type_with_name::<Option<bool>>("Option<bool>")
122810                .register_static_module("Option<bool>", exported_module!(boolModule).into());
122811            engine
122812                .register_type_with_name::<Option<i64>>("Option<i64>")
122813                .register_static_module("Option<i64>", exported_module!(i64Module).into());
122814            engine
122815                .register_type_with_name::<Option<String>>("Option<String>")
122816                .register_static_module("Option<String>", exported_module!(StringModule).into());
122817        }
122818    }
122819    #[cfg(feature = "rhai")]
122820    #[allow(unused_mut)]
122821    impl rhai::CustomType for WebhookInfo {
122822        fn build(mut builder: rhai::TypeBuilder<Self>) {
122823            builder.with_get("url", Self::rhai_get_url);
122824            builder.with_get(
122825                "has_custom_certificate",
122826                Self::rhai_get_has_custom_certificate,
122827            );
122828            builder.with_get("pending_update_count", Self::rhai_get_pending_update_count);
122829            builder.with_get("ip_address", Self::rhai_get_ip_address);
122830            builder.with_get("last_error_date", Self::rhai_get_last_error_date);
122831            builder.with_get("last_error_message", Self::rhai_get_last_error_message);
122832            builder.with_get(
122833                "last_synchronization_error_date",
122834                Self::rhai_get_last_synchronization_error_date,
122835            );
122836            builder.with_get("max_connections", Self::rhai_get_max_connections);
122837            builder.with_get("allowed_updates", Self::rhai_get_allowed_updates);
122838            builder.on_debug(|t| format!("{:?}", t));
122839            drop(builder);
122840        }
122841    }
122842    #[cfg(feature = "rhai")]
122843    impl SetupRhai for BusinessMessagesDeleted {
122844        fn setup_rhai(engine: &mut rhai::Engine) {
122845            engine.build_type::<BusinessMessagesDeleted>();
122846            engine
122847                .register_type_with_name::<Option<bool>>("Option<bool>")
122848                .register_static_module("Option<bool>", exported_module!(boolModule).into());
122849            engine
122850                .register_type_with_name::<Option<Chat>>("Option<Chat>")
122851                .build_type::<Chat>()
122852                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
122853            engine
122854                .register_type_with_name::<Option<i64>>("Option<i64>")
122855                .register_static_module("Option<i64>", exported_module!(i64Module).into());
122856            engine
122857                .register_type_with_name::<Option<String>>("Option<String>")
122858                .register_static_module("Option<String>", exported_module!(StringModule).into());
122859        }
122860    }
122861    #[cfg(feature = "rhai")]
122862    #[allow(unused_mut)]
122863    impl rhai::CustomType for BusinessMessagesDeleted {
122864        fn build(mut builder: rhai::TypeBuilder<Self>) {
122865            builder.with_get(
122866                "business_connection_id",
122867                Self::rhai_get_business_connection_id,
122868            );
122869            builder.with_get("chat", Self::rhai_get_chat);
122870            builder.with_get("message_ids", Self::rhai_get_message_ids);
122871            builder.on_debug(|t| format!("{:?}", t));
122872            drop(builder);
122873        }
122874    }
122875    #[cfg(feature = "rhai")]
122876    impl SetupRhai for BotCommandScopeDefault {
122877        fn setup_rhai(engine: &mut rhai::Engine) {
122878            engine.build_type::<BotCommandScopeDefault>();
122879            engine
122880                .register_type_with_name::<Option<String>>("Option<String>")
122881                .register_static_module("Option<String>", exported_module!(StringModule).into());
122882        }
122883    }
122884    #[cfg(feature = "rhai")]
122885    #[allow(unused_mut)]
122886    impl rhai::CustomType for BotCommandScopeDefault {
122887        fn build(mut builder: rhai::TypeBuilder<Self>) {
122888            builder.with_get("tg_type", Self::rhai_get_tg_type);
122889            builder.on_debug(|t| format!("{:?}", t));
122890            drop(builder);
122891        }
122892    }
122893    #[cfg(feature = "rhai")]
122894    impl SetupRhai for ChatInviteLink {
122895        fn setup_rhai(engine: &mut rhai::Engine) {
122896            engine.build_type::<ChatInviteLink>();
122897            engine
122898                .register_type_with_name::<Option<bool>>("Option<bool>")
122899                .register_static_module("Option<bool>", exported_module!(boolModule).into());
122900            engine
122901                .register_type_with_name::<Option<i64>>("Option<i64>")
122902                .register_static_module("Option<i64>", exported_module!(i64Module).into());
122903            engine
122904                .register_type_with_name::<Option<String>>("Option<String>")
122905                .register_static_module("Option<String>", exported_module!(StringModule).into());
122906            engine
122907                .register_type_with_name::<Option<User>>("Option<User>")
122908                .build_type::<User>()
122909                .register_static_module("Option<User>", exported_module!(UserModule).into());
122910        }
122911    }
122912    #[cfg(feature = "rhai")]
122913    #[allow(unused_mut)]
122914    impl rhai::CustomType for ChatInviteLink {
122915        fn build(mut builder: rhai::TypeBuilder<Self>) {
122916            builder.with_get("invite_link", Self::rhai_get_invite_link);
122917            builder.with_get("creator", Self::rhai_get_creator);
122918            builder.with_get("creates_join_request", Self::rhai_get_creates_join_request);
122919            builder.with_get("is_primary", Self::rhai_get_is_primary);
122920            builder.with_get("is_revoked", Self::rhai_get_is_revoked);
122921            builder.with_get("name", Self::rhai_get_name);
122922            builder.with_get("expire_date", Self::rhai_get_expire_date);
122923            builder.with_get("member_limit", Self::rhai_get_member_limit);
122924            builder.with_get(
122925                "pending_join_request_count",
122926                Self::rhai_get_pending_join_request_count,
122927            );
122928            builder.with_get("subscription_period", Self::rhai_get_subscription_period);
122929            builder.with_get("subscription_price", Self::rhai_get_subscription_price);
122930            builder.on_debug(|t| format!("{:?}", t));
122931            drop(builder);
122932        }
122933    }
122934    #[cfg(feature = "rhai")]
122935    impl SetupRhai for InlineQueryResultCachedVoice {
122936        fn setup_rhai(engine: &mut rhai::Engine) {
122937            engine.build_type::<InlineQueryResultCachedVoice>();
122938            engine
122939                .register_type_with_name::<Option<bool>>("Option<bool>")
122940                .register_static_module("Option<bool>", exported_module!(boolModule).into());
122941            engine
122942                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
122943                .build_type::<CallbackGame>()
122944                .register_static_module(
122945                    "Option<CallbackGame>",
122946                    exported_module!(CallbackGameModule).into(),
122947                );
122948            engine
122949                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
122950                .build_type::<CopyTextButton>()
122951                .register_static_module(
122952                    "Option<CopyTextButton>",
122953                    exported_module!(CopyTextButtonModule).into(),
122954                );
122955            engine
122956                .register_type_with_name::<Option<InlineKeyboardButton>>(
122957                    "Option<InlineKeyboardButton>",
122958                )
122959                .build_type::<InlineKeyboardButton>()
122960                .register_static_module(
122961                    "Option<InlineKeyboardButton>",
122962                    exported_module!(InlineKeyboardButtonModule).into(),
122963                );
122964            engine
122965                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
122966                    "Option<InlineKeyboardMarkup>",
122967                )
122968                .build_type::<InlineKeyboardMarkup>()
122969                .register_static_module(
122970                    "Option<InlineKeyboardMarkup>",
122971                    exported_module!(InlineKeyboardMarkupModule).into(),
122972                );
122973            engine
122974                .register_type_with_name::<Option<InputMessageContent>>(
122975                    "Option<InputMessageContent>",
122976                )
122977                .register_static_module(
122978                    "Option<InputMessageContent>",
122979                    exported_module!(InputMessageContentModule).into(),
122980                );
122981            engine
122982                .register_type_with_name::<Option<i64>>("Option<i64>")
122983                .register_static_module("Option<i64>", exported_module!(i64Module).into());
122984            engine
122985                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
122986                .build_type::<LoginUrl>()
122987                .register_static_module(
122988                    "Option<LoginUrl>",
122989                    exported_module!(LoginUrlModule).into(),
122990                );
122991            engine
122992                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
122993                .build_type::<MessageEntity>()
122994                .register_static_module(
122995                    "Option<MessageEntity>",
122996                    exported_module!(MessageEntityModule).into(),
122997                );
122998            engine
122999                .register_type_with_name::<Option<String>>("Option<String>")
123000                .register_static_module("Option<String>", exported_module!(StringModule).into());
123001            engine
123002                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
123003                    "Option<SwitchInlineQueryChosenChat>",
123004                )
123005                .build_type::<SwitchInlineQueryChosenChat>()
123006                .register_static_module(
123007                    "Option<SwitchInlineQueryChosenChat>",
123008                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
123009                );
123010            engine
123011                .register_type_with_name::<Option<User>>("Option<User>")
123012                .build_type::<User>()
123013                .register_static_module("Option<User>", exported_module!(UserModule).into());
123014            engine
123015                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
123016                .build_type::<WebAppInfo>()
123017                .register_static_module(
123018                    "Option<WebAppInfo>",
123019                    exported_module!(WebAppInfoModule).into(),
123020                );
123021        }
123022    }
123023    #[cfg(feature = "rhai")]
123024    #[allow(unused_mut)]
123025    impl rhai::CustomType for InlineQueryResultCachedVoice {
123026        fn build(mut builder: rhai::TypeBuilder<Self>) {
123027            builder.with_get("tg_type", Self::rhai_get_tg_type);
123028            builder.with_get("id", Self::rhai_get_id);
123029            builder.with_get("voice_file_id", Self::rhai_get_voice_file_id);
123030            builder.with_get("title", Self::rhai_get_title);
123031            builder.with_get("caption", Self::rhai_get_caption);
123032            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
123033            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
123034            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
123035            builder.with_get(
123036                "input_message_content",
123037                Self::rhai_get_input_message_content,
123038            );
123039            builder.on_debug(|t| format!("{:?}", t));
123040            drop(builder);
123041        }
123042    }
123043    #[cfg(feature = "rhai")]
123044    impl SetupRhai for PassportElementErrorTranslationFiles {
123045        fn setup_rhai(engine: &mut rhai::Engine) {
123046            engine.build_type::<PassportElementErrorTranslationFiles>();
123047            engine
123048                .register_type_with_name::<Option<String>>("Option<String>")
123049                .register_static_module("Option<String>", exported_module!(StringModule).into());
123050        }
123051    }
123052    #[cfg(feature = "rhai")]
123053    #[allow(unused_mut)]
123054    impl rhai::CustomType for PassportElementErrorTranslationFiles {
123055        fn build(mut builder: rhai::TypeBuilder<Self>) {
123056            builder.with_get("source", Self::rhai_get_source);
123057            builder.with_get("tg_type", Self::rhai_get_tg_type);
123058            builder.with_get("file_hashes", Self::rhai_get_file_hashes);
123059            builder.with_get("message", Self::rhai_get_message);
123060            builder.on_debug(|t| format!("{:?}", t));
123061            drop(builder);
123062        }
123063    }
123064    #[cfg(feature = "rhai")]
123065    impl SetupRhai for Animation {
123066        fn setup_rhai(engine: &mut rhai::Engine) {
123067            engine.build_type::<Animation>();
123068            engine
123069                .register_type_with_name::<Option<i64>>("Option<i64>")
123070                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123071            engine
123072                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
123073                .build_type::<PhotoSize>()
123074                .register_static_module(
123075                    "Option<PhotoSize>",
123076                    exported_module!(PhotoSizeModule).into(),
123077                );
123078            engine
123079                .register_type_with_name::<Option<String>>("Option<String>")
123080                .register_static_module("Option<String>", exported_module!(StringModule).into());
123081        }
123082    }
123083    #[cfg(feature = "rhai")]
123084    #[allow(unused_mut)]
123085    impl rhai::CustomType for Animation {
123086        fn build(mut builder: rhai::TypeBuilder<Self>) {
123087            builder.with_get("file_id", Self::rhai_get_file_id);
123088            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
123089            builder.with_get("width", Self::rhai_get_width);
123090            builder.with_get("height", Self::rhai_get_height);
123091            builder.with_get("duration", Self::rhai_get_duration);
123092            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
123093            builder.with_get("file_name", Self::rhai_get_file_name);
123094            builder.with_get("mime_type", Self::rhai_get_mime_type);
123095            builder.with_get("file_size", Self::rhai_get_file_size);
123096            builder.on_debug(|t| format!("{:?}", t));
123097            drop(builder);
123098        }
123099    }
123100    #[cfg(feature = "rhai")]
123101    impl SetupRhai for Audio {
123102        fn setup_rhai(engine: &mut rhai::Engine) {
123103            engine.build_type::<Audio>();
123104            engine
123105                .register_type_with_name::<Option<i64>>("Option<i64>")
123106                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123107            engine
123108                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
123109                .build_type::<PhotoSize>()
123110                .register_static_module(
123111                    "Option<PhotoSize>",
123112                    exported_module!(PhotoSizeModule).into(),
123113                );
123114            engine
123115                .register_type_with_name::<Option<String>>("Option<String>")
123116                .register_static_module("Option<String>", exported_module!(StringModule).into());
123117        }
123118    }
123119    #[cfg(feature = "rhai")]
123120    #[allow(unused_mut)]
123121    impl rhai::CustomType for Audio {
123122        fn build(mut builder: rhai::TypeBuilder<Self>) {
123123            builder.with_get("file_id", Self::rhai_get_file_id);
123124            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
123125            builder.with_get("duration", Self::rhai_get_duration);
123126            builder.with_get("performer", Self::rhai_get_performer);
123127            builder.with_get("title", Self::rhai_get_title);
123128            builder.with_get("file_name", Self::rhai_get_file_name);
123129            builder.with_get("mime_type", Self::rhai_get_mime_type);
123130            builder.with_get("file_size", Self::rhai_get_file_size);
123131            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
123132            builder.on_debug(|t| format!("{:?}", t));
123133            drop(builder);
123134        }
123135    }
123136    #[cfg(feature = "rhai")]
123137    impl SetupRhai for RefundedPayment {
123138        fn setup_rhai(engine: &mut rhai::Engine) {
123139            engine.build_type::<RefundedPayment>();
123140            engine
123141                .register_type_with_name::<Option<i64>>("Option<i64>")
123142                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123143            engine
123144                .register_type_with_name::<Option<String>>("Option<String>")
123145                .register_static_module("Option<String>", exported_module!(StringModule).into());
123146        }
123147    }
123148    #[cfg(feature = "rhai")]
123149    #[allow(unused_mut)]
123150    impl rhai::CustomType for RefundedPayment {
123151        fn build(mut builder: rhai::TypeBuilder<Self>) {
123152            builder.with_get("currency", Self::rhai_get_currency);
123153            builder.with_get("total_amount", Self::rhai_get_total_amount);
123154            builder.with_get("invoice_payload", Self::rhai_get_invoice_payload);
123155            builder.with_get(
123156                "telegram_payment_charge_id",
123157                Self::rhai_get_telegram_payment_charge_id,
123158            );
123159            builder.with_get(
123160                "provider_payment_charge_id",
123161                Self::rhai_get_provider_payment_charge_id,
123162            );
123163            builder.on_debug(|t| format!("{:?}", t));
123164            drop(builder);
123165        }
123166    }
123167    #[cfg(feature = "rhai")]
123168    impl SetupRhai for InputMediaAnimation {
123169        fn setup_rhai(engine: &mut rhai::Engine) {
123170            engine.build_type::<InputMediaAnimation>();
123171            engine
123172                .register_type_with_name::<Option<bool>>("Option<bool>")
123173                .register_static_module("Option<bool>", exported_module!(boolModule).into());
123174            engine
123175                .register_type_with_name::<Option<i64>>("Option<i64>")
123176                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123177            engine
123178                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
123179                .build_type::<MessageEntity>()
123180                .register_static_module(
123181                    "Option<MessageEntity>",
123182                    exported_module!(MessageEntityModule).into(),
123183                );
123184            engine
123185                .register_type_with_name::<Option<String>>("Option<String>")
123186                .register_static_module("Option<String>", exported_module!(StringModule).into());
123187            engine
123188                .register_type_with_name::<Option<User>>("Option<User>")
123189                .build_type::<User>()
123190                .register_static_module("Option<User>", exported_module!(UserModule).into());
123191        }
123192    }
123193    #[cfg(feature = "rhai")]
123194    #[allow(unused_mut)]
123195    impl rhai::CustomType for InputMediaAnimation {
123196        fn build(mut builder: rhai::TypeBuilder<Self>) {
123197            builder.with_get("tg_type", Self::rhai_get_tg_type);
123198            builder.with_get("media", Self::rhai_get_media);
123199            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
123200            builder.with_get("caption", Self::rhai_get_caption);
123201            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
123202            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
123203            builder.with_get(
123204                "show_caption_above_media",
123205                Self::rhai_get_show_caption_above_media,
123206            );
123207            builder.with_get("width", Self::rhai_get_width);
123208            builder.with_get("height", Self::rhai_get_height);
123209            builder.with_get("duration", Self::rhai_get_duration);
123210            builder.with_get("has_spoiler", Self::rhai_get_has_spoiler);
123211            builder.on_debug(|t| format!("{:?}", t));
123212            drop(builder);
123213        }
123214    }
123215    #[cfg(feature = "rhai")]
123216    impl SetupRhai for Game {
123217        fn setup_rhai(engine: &mut rhai::Engine) {
123218            engine.build_type::<Game>();
123219            engine
123220                .register_type_with_name::<Option<Animation>>("Option<Animation>")
123221                .build_type::<Animation>()
123222                .register_static_module(
123223                    "Option<Animation>",
123224                    exported_module!(AnimationModule).into(),
123225                );
123226            engine
123227                .register_type_with_name::<Option<bool>>("Option<bool>")
123228                .register_static_module("Option<bool>", exported_module!(boolModule).into());
123229            engine
123230                .register_type_with_name::<Option<i64>>("Option<i64>")
123231                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123232            engine
123233                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
123234                .build_type::<MessageEntity>()
123235                .register_static_module(
123236                    "Option<MessageEntity>",
123237                    exported_module!(MessageEntityModule).into(),
123238                );
123239            engine
123240                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
123241                .build_type::<PhotoSize>()
123242                .register_static_module(
123243                    "Option<PhotoSize>",
123244                    exported_module!(PhotoSizeModule).into(),
123245                );
123246            engine
123247                .register_type_with_name::<Option<String>>("Option<String>")
123248                .register_static_module("Option<String>", exported_module!(StringModule).into());
123249            engine
123250                .register_type_with_name::<Option<User>>("Option<User>")
123251                .build_type::<User>()
123252                .register_static_module("Option<User>", exported_module!(UserModule).into());
123253        }
123254    }
123255    #[cfg(feature = "rhai")]
123256    #[allow(unused_mut)]
123257    impl rhai::CustomType for Game {
123258        fn build(mut builder: rhai::TypeBuilder<Self>) {
123259            builder.with_get("title", Self::rhai_get_title);
123260            builder.with_get("description", Self::rhai_get_description);
123261            builder.with_get("photo", Self::rhai_get_photo);
123262            builder.with_get("text", Self::rhai_get_text);
123263            builder.with_get("text_entities", Self::rhai_get_text_entities);
123264            builder.with_get("animation", Self::rhai_get_animation);
123265            builder.on_debug(|t| format!("{:?}", t));
123266            drop(builder);
123267        }
123268    }
123269    #[cfg(feature = "rhai")]
123270    impl SetupRhai for ChatMemberMember {
123271        fn setup_rhai(engine: &mut rhai::Engine) {
123272            engine.build_type::<ChatMemberMember>();
123273            engine
123274                .register_type_with_name::<Option<bool>>("Option<bool>")
123275                .register_static_module("Option<bool>", exported_module!(boolModule).into());
123276            engine
123277                .register_type_with_name::<Option<i64>>("Option<i64>")
123278                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123279            engine
123280                .register_type_with_name::<Option<String>>("Option<String>")
123281                .register_static_module("Option<String>", exported_module!(StringModule).into());
123282            engine
123283                .register_type_with_name::<Option<User>>("Option<User>")
123284                .build_type::<User>()
123285                .register_static_module("Option<User>", exported_module!(UserModule).into());
123286        }
123287    }
123288    #[cfg(feature = "rhai")]
123289    #[allow(unused_mut)]
123290    impl rhai::CustomType for ChatMemberMember {
123291        fn build(mut builder: rhai::TypeBuilder<Self>) {
123292            builder.with_get("user", Self::rhai_get_user);
123293            builder.with_get("until_date", Self::rhai_get_until_date);
123294            builder.on_debug(|t| format!("{:?}", t));
123295            drop(builder);
123296        }
123297    }
123298    #[cfg(feature = "rhai")]
123299    impl SetupRhai for ChatPermissions {
123300        fn setup_rhai(engine: &mut rhai::Engine) {
123301            engine.build_type::<ChatPermissions>();
123302            engine
123303                .register_type_with_name::<Option<bool>>("Option<bool>")
123304                .register_static_module("Option<bool>", exported_module!(boolModule).into());
123305        }
123306    }
123307    #[cfg(feature = "rhai")]
123308    #[allow(unused_mut)]
123309    impl rhai::CustomType for ChatPermissions {
123310        fn build(mut builder: rhai::TypeBuilder<Self>) {
123311            builder.with_get("can_send_messages", Self::rhai_get_can_send_messages);
123312            builder.with_get("can_send_audios", Self::rhai_get_can_send_audios);
123313            builder.with_get("can_send_documents", Self::rhai_get_can_send_documents);
123314            builder.with_get("can_send_photos", Self::rhai_get_can_send_photos);
123315            builder.with_get("can_send_videos", Self::rhai_get_can_send_videos);
123316            builder.with_get("can_send_video_notes", Self::rhai_get_can_send_video_notes);
123317            builder.with_get("can_send_voice_notes", Self::rhai_get_can_send_voice_notes);
123318            builder.with_get("can_send_polls", Self::rhai_get_can_send_polls);
123319            builder.with_get(
123320                "can_send_other_messages",
123321                Self::rhai_get_can_send_other_messages,
123322            );
123323            builder.with_get(
123324                "can_add_web_page_previews",
123325                Self::rhai_get_can_add_web_page_previews,
123326            );
123327            builder.with_get("can_change_info", Self::rhai_get_can_change_info);
123328            builder.with_get("can_invite_users", Self::rhai_get_can_invite_users);
123329            builder.with_get("can_pin_messages", Self::rhai_get_can_pin_messages);
123330            builder.with_get("can_manage_topics", Self::rhai_get_can_manage_topics);
123331            builder.on_debug(|t| format!("{:?}", t));
123332            drop(builder);
123333        }
123334    }
123335    #[cfg(feature = "rhai")]
123336    impl SetupRhai for StarTransactions {
123337        fn setup_rhai(engine: &mut rhai::Engine) {
123338            engine.build_type::<StarTransactions>();
123339            engine
123340                .register_type_with_name::<Option<i64>>("Option<i64>")
123341                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123342            engine
123343                .register_type_with_name::<Option<StarTransaction>>("Option<StarTransaction>")
123344                .build_type::<StarTransaction>()
123345                .register_static_module(
123346                    "Option<StarTransaction>",
123347                    exported_module!(StarTransactionModule).into(),
123348                );
123349            engine
123350                .register_type_with_name::<Option<String>>("Option<String>")
123351                .register_static_module("Option<String>", exported_module!(StringModule).into());
123352            engine
123353                .register_type_with_name::<Option<TransactionPartner>>("Option<TransactionPartner>")
123354                .register_static_module(
123355                    "Option<TransactionPartner>",
123356                    exported_module!(TransactionPartnerModule).into(),
123357                );
123358        }
123359    }
123360    #[cfg(feature = "rhai")]
123361    #[allow(unused_mut)]
123362    impl rhai::CustomType for StarTransactions {
123363        fn build(mut builder: rhai::TypeBuilder<Self>) {
123364            builder.with_get("transactions", Self::rhai_get_transactions);
123365            builder.on_debug(|t| format!("{:?}", t));
123366            drop(builder);
123367        }
123368    }
123369    #[cfg(feature = "rhai")]
123370    impl SetupRhai for EncryptedCredentials {
123371        fn setup_rhai(engine: &mut rhai::Engine) {
123372            engine.build_type::<EncryptedCredentials>();
123373            engine
123374                .register_type_with_name::<Option<String>>("Option<String>")
123375                .register_static_module("Option<String>", exported_module!(StringModule).into());
123376        }
123377    }
123378    #[cfg(feature = "rhai")]
123379    #[allow(unused_mut)]
123380    impl rhai::CustomType for EncryptedCredentials {
123381        fn build(mut builder: rhai::TypeBuilder<Self>) {
123382            builder.with_get("data", Self::rhai_get_data);
123383            builder.with_get("hash", Self::rhai_get_hash);
123384            builder.with_get("secret", Self::rhai_get_secret);
123385            builder.on_debug(|t| format!("{:?}", t));
123386            drop(builder);
123387        }
123388    }
123389    #[cfg(feature = "rhai")]
123390    impl SetupRhai for StoryAreaTypeSuggestedReaction {
123391        fn setup_rhai(engine: &mut rhai::Engine) {
123392            engine.build_type::<StoryAreaTypeSuggestedReaction>();
123393            engine
123394                .register_type_with_name::<Option<bool>>("Option<bool>")
123395                .register_static_module("Option<bool>", exported_module!(boolModule).into());
123396            engine
123397                .register_type_with_name::<Option<ReactionType>>("Option<ReactionType>")
123398                .register_static_module(
123399                    "Option<ReactionType>",
123400                    exported_module!(ReactionTypeModule).into(),
123401                );
123402            engine
123403                .register_type_with_name::<Option<String>>("Option<String>")
123404                .register_static_module("Option<String>", exported_module!(StringModule).into());
123405        }
123406    }
123407    #[cfg(feature = "rhai")]
123408    #[allow(unused_mut)]
123409    impl rhai::CustomType for StoryAreaTypeSuggestedReaction {
123410        fn build(mut builder: rhai::TypeBuilder<Self>) {
123411            builder.with_get("tg_type", Self::rhai_get_tg_type);
123412            builder.with_get("reaction_type", Self::rhai_get_reaction_type);
123413            builder.with_get("is_dark", Self::rhai_get_is_dark);
123414            builder.with_get("is_flipped", Self::rhai_get_is_flipped);
123415            builder.on_debug(|t| format!("{:?}", t));
123416            drop(builder);
123417        }
123418    }
123419    #[cfg(feature = "rhai")]
123420    impl SetupRhai for ChecklistTasksAdded {
123421        fn setup_rhai(engine: &mut rhai::Engine) {
123422            engine.build_type::<ChecklistTasksAdded>();
123423            engine
123424                .register_type_with_name::<Option<Animation>>("Option<Animation>")
123425                .build_type::<Animation>()
123426                .register_static_module(
123427                    "Option<Animation>",
123428                    exported_module!(AnimationModule).into(),
123429                );
123430            engine
123431                .register_type_with_name::<Option<Audio>>("Option<Audio>")
123432                .build_type::<Audio>()
123433                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
123434            engine
123435                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
123436                .register_static_module(
123437                    "Option<BackgroundType>",
123438                    exported_module!(BackgroundTypeModule).into(),
123439                );
123440            engine
123441                .register_type_with_name::<Option<bool>>("Option<bool>")
123442                .register_static_module("Option<bool>", exported_module!(boolModule).into());
123443            engine
123444                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
123445                .build_type::<CallbackGame>()
123446                .register_static_module(
123447                    "Option<CallbackGame>",
123448                    exported_module!(CallbackGameModule).into(),
123449                );
123450            engine
123451                .register_type_with_name::<Option<Chat>>("Option<Chat>")
123452                .build_type::<Chat>()
123453                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
123454            engine
123455                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
123456                .build_type::<ChatBackground>()
123457                .register_static_module(
123458                    "Option<ChatBackground>",
123459                    exported_module!(ChatBackgroundModule).into(),
123460                );
123461            engine
123462                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
123463                .build_type::<ChatBoostAdded>()
123464                .register_static_module(
123465                    "Option<ChatBoostAdded>",
123466                    exported_module!(ChatBoostAddedModule).into(),
123467                );
123468            engine
123469                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
123470                .build_type::<ChatShared>()
123471                .register_static_module(
123472                    "Option<ChatShared>",
123473                    exported_module!(ChatSharedModule).into(),
123474                );
123475            engine
123476                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
123477                .build_type::<Checklist>()
123478                .register_static_module(
123479                    "Option<Checklist>",
123480                    exported_module!(ChecklistModule).into(),
123481                );
123482            engine
123483                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
123484                .build_type::<ChecklistTask>()
123485                .register_static_module(
123486                    "Option<ChecklistTask>",
123487                    exported_module!(ChecklistTaskModule).into(),
123488                );
123489            engine
123490                .register_type_with_name::<Option<ChecklistTasksAdded>>(
123491                    "Option<ChecklistTasksAdded>",
123492                )
123493                .build_type::<ChecklistTasksAdded>()
123494                .register_static_module(
123495                    "Option<ChecklistTasksAdded>",
123496                    exported_module!(ChecklistTasksAddedModule).into(),
123497                );
123498            engine
123499                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
123500                .build_type::<ChecklistTasksDone>()
123501                .register_static_module(
123502                    "Option<ChecklistTasksDone>",
123503                    exported_module!(ChecklistTasksDoneModule).into(),
123504                );
123505            engine
123506                .register_type_with_name::<Option<Contact>>("Option<Contact>")
123507                .build_type::<Contact>()
123508                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
123509            engine
123510                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
123511                .build_type::<CopyTextButton>()
123512                .register_static_module(
123513                    "Option<CopyTextButton>",
123514                    exported_module!(CopyTextButtonModule).into(),
123515                );
123516            engine
123517                .register_type_with_name::<Option<Dice>>("Option<Dice>")
123518                .build_type::<Dice>()
123519                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
123520            engine
123521                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
123522                    "Option<DirectMessagePriceChanged>",
123523                )
123524                .build_type::<DirectMessagePriceChanged>()
123525                .register_static_module(
123526                    "Option<DirectMessagePriceChanged>",
123527                    exported_module!(DirectMessagePriceChangedModule).into(),
123528                );
123529            engine
123530                .register_type_with_name::<Option<DirectMessagesTopic>>(
123531                    "Option<DirectMessagesTopic>",
123532                )
123533                .build_type::<DirectMessagesTopic>()
123534                .register_static_module(
123535                    "Option<DirectMessagesTopic>",
123536                    exported_module!(DirectMessagesTopicModule).into(),
123537                );
123538            engine
123539                .register_type_with_name::<Option<Document>>("Option<Document>")
123540                .build_type::<Document>()
123541                .register_static_module(
123542                    "Option<Document>",
123543                    exported_module!(DocumentModule).into(),
123544                );
123545            engine
123546                .register_type_with_name::<Option<EncryptedCredentials>>(
123547                    "Option<EncryptedCredentials>",
123548                )
123549                .build_type::<EncryptedCredentials>()
123550                .register_static_module(
123551                    "Option<EncryptedCredentials>",
123552                    exported_module!(EncryptedCredentialsModule).into(),
123553                );
123554            engine
123555                .register_type_with_name::<Option<EncryptedPassportElement>>(
123556                    "Option<EncryptedPassportElement>",
123557                )
123558                .build_type::<EncryptedPassportElement>()
123559                .register_static_module(
123560                    "Option<EncryptedPassportElement>",
123561                    exported_module!(EncryptedPassportElementModule).into(),
123562                );
123563            engine
123564                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
123565                .build_type::<ExternalReplyInfo>()
123566                .register_static_module(
123567                    "Option<ExternalReplyInfo>",
123568                    exported_module!(ExternalReplyInfoModule).into(),
123569                );
123570            engine
123571                .register_type_with_name::<Option<File>>("Option<File>")
123572                .build_type::<File>()
123573                .register_static_module("Option<File>", exported_module!(FileModule).into());
123574            engine
123575                .register_type_with_name::<Option<f64>>("Option<f64>")
123576                .register_static_module("Option<f64>", exported_module!(f64Module).into());
123577            engine
123578                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
123579                .build_type::<ForumTopicClosed>()
123580                .register_static_module(
123581                    "Option<ForumTopicClosed>",
123582                    exported_module!(ForumTopicClosedModule).into(),
123583                );
123584            engine
123585                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
123586                .build_type::<ForumTopicCreated>()
123587                .register_static_module(
123588                    "Option<ForumTopicCreated>",
123589                    exported_module!(ForumTopicCreatedModule).into(),
123590                );
123591            engine
123592                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
123593                .build_type::<ForumTopicEdited>()
123594                .register_static_module(
123595                    "Option<ForumTopicEdited>",
123596                    exported_module!(ForumTopicEditedModule).into(),
123597                );
123598            engine
123599                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
123600                .build_type::<ForumTopicReopened>()
123601                .register_static_module(
123602                    "Option<ForumTopicReopened>",
123603                    exported_module!(ForumTopicReopenedModule).into(),
123604                );
123605            engine
123606                .register_type_with_name::<Option<Game>>("Option<Game>")
123607                .build_type::<Game>()
123608                .register_static_module("Option<Game>", exported_module!(GameModule).into());
123609            engine
123610                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
123611                    "Option<GeneralForumTopicHidden>",
123612                )
123613                .build_type::<GeneralForumTopicHidden>()
123614                .register_static_module(
123615                    "Option<GeneralForumTopicHidden>",
123616                    exported_module!(GeneralForumTopicHiddenModule).into(),
123617                );
123618            engine
123619                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
123620                    "Option<GeneralForumTopicUnhidden>",
123621                )
123622                .build_type::<GeneralForumTopicUnhidden>()
123623                .register_static_module(
123624                    "Option<GeneralForumTopicUnhidden>",
123625                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
123626                );
123627            engine
123628                .register_type_with_name::<Option<Gift>>("Option<Gift>")
123629                .build_type::<Gift>()
123630                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
123631            engine
123632                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
123633                .build_type::<GiftInfo>()
123634                .register_static_module(
123635                    "Option<GiftInfo>",
123636                    exported_module!(GiftInfoModule).into(),
123637                );
123638            engine
123639                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
123640                .build_type::<Giveaway>()
123641                .register_static_module(
123642                    "Option<Giveaway>",
123643                    exported_module!(GiveawayModule).into(),
123644                );
123645            engine
123646                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
123647                .build_type::<GiveawayCompleted>()
123648                .register_static_module(
123649                    "Option<GiveawayCompleted>",
123650                    exported_module!(GiveawayCompletedModule).into(),
123651                );
123652            engine
123653                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
123654                .build_type::<GiveawayCreated>()
123655                .register_static_module(
123656                    "Option<GiveawayCreated>",
123657                    exported_module!(GiveawayCreatedModule).into(),
123658                );
123659            engine
123660                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
123661                .build_type::<GiveawayWinners>()
123662                .register_static_module(
123663                    "Option<GiveawayWinners>",
123664                    exported_module!(GiveawayWinnersModule).into(),
123665                );
123666            engine
123667                .register_type_with_name::<Option<InlineKeyboardButton>>(
123668                    "Option<InlineKeyboardButton>",
123669                )
123670                .build_type::<InlineKeyboardButton>()
123671                .register_static_module(
123672                    "Option<InlineKeyboardButton>",
123673                    exported_module!(InlineKeyboardButtonModule).into(),
123674                );
123675            engine
123676                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
123677                    "Option<InlineKeyboardMarkup>",
123678                )
123679                .build_type::<InlineKeyboardMarkup>()
123680                .register_static_module(
123681                    "Option<InlineKeyboardMarkup>",
123682                    exported_module!(InlineKeyboardMarkupModule).into(),
123683                );
123684            engine
123685                .register_type_with_name::<Option<i64>>("Option<i64>")
123686                .register_static_module("Option<i64>", exported_module!(i64Module).into());
123687            engine
123688                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
123689                .build_type::<Invoice>()
123690                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
123691            engine
123692                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
123693                .build_type::<LinkPreviewOptions>()
123694                .register_static_module(
123695                    "Option<LinkPreviewOptions>",
123696                    exported_module!(LinkPreviewOptionsModule).into(),
123697                );
123698            engine
123699                .register_type_with_name::<Option<Location>>("Option<Location>")
123700                .build_type::<Location>()
123701                .register_static_module(
123702                    "Option<Location>",
123703                    exported_module!(LocationModule).into(),
123704                );
123705            engine
123706                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
123707                .build_type::<LoginUrl>()
123708                .register_static_module(
123709                    "Option<LoginUrl>",
123710                    exported_module!(LoginUrlModule).into(),
123711                );
123712            engine
123713                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
123714                .build_type::<MaskPosition>()
123715                .register_static_module(
123716                    "Option<MaskPosition>",
123717                    exported_module!(MaskPositionModule).into(),
123718                );
123719            engine
123720                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
123721                    "Option<MaybeInaccessibleMessage>",
123722                )
123723                .register_static_module(
123724                    "Option<MaybeInaccessibleMessage>",
123725                    exported_module!(MaybeInaccessibleMessageModule).into(),
123726                );
123727            engine
123728                .register_type_with_name::<Option<Message>>("Option<Message>")
123729                .build_type::<Message>()
123730                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
123731            engine
123732                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
123733                    "Option<MessageAutoDeleteTimerChanged>",
123734                )
123735                .build_type::<MessageAutoDeleteTimerChanged>()
123736                .register_static_module(
123737                    "Option<MessageAutoDeleteTimerChanged>",
123738                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
123739                );
123740            engine
123741                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
123742                .build_type::<MessageEntity>()
123743                .register_static_module(
123744                    "Option<MessageEntity>",
123745                    exported_module!(MessageEntityModule).into(),
123746                );
123747            engine
123748                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
123749                .register_static_module(
123750                    "Option<MessageOrigin>",
123751                    exported_module!(MessageOriginModule).into(),
123752                );
123753            engine
123754                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
123755                .build_type::<OrderInfo>()
123756                .register_static_module(
123757                    "Option<OrderInfo>",
123758                    exported_module!(OrderInfoModule).into(),
123759                );
123760            engine
123761                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
123762                .register_static_module(
123763                    "Option<PaidMedia>",
123764                    exported_module!(PaidMediaModule).into(),
123765                );
123766            engine
123767                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
123768                .build_type::<PaidMediaInfo>()
123769                .register_static_module(
123770                    "Option<PaidMediaInfo>",
123771                    exported_module!(PaidMediaInfoModule).into(),
123772                );
123773            engine
123774                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
123775                    "Option<PaidMessagePriceChanged>",
123776                )
123777                .build_type::<PaidMessagePriceChanged>()
123778                .register_static_module(
123779                    "Option<PaidMessagePriceChanged>",
123780                    exported_module!(PaidMessagePriceChangedModule).into(),
123781                );
123782            engine
123783                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
123784                .build_type::<PassportData>()
123785                .register_static_module(
123786                    "Option<PassportData>",
123787                    exported_module!(PassportDataModule).into(),
123788                );
123789            engine
123790                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
123791                .build_type::<PassportFile>()
123792                .register_static_module(
123793                    "Option<PassportFile>",
123794                    exported_module!(PassportFileModule).into(),
123795                );
123796            engine
123797                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
123798                .build_type::<PhotoSize>()
123799                .register_static_module(
123800                    "Option<PhotoSize>",
123801                    exported_module!(PhotoSizeModule).into(),
123802                );
123803            engine
123804                .register_type_with_name::<Option<Poll>>("Option<Poll>")
123805                .build_type::<Poll>()
123806                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
123807            engine
123808                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
123809                .build_type::<PollOption>()
123810                .register_static_module(
123811                    "Option<PollOption>",
123812                    exported_module!(PollOptionModule).into(),
123813                );
123814            engine
123815                .register_type_with_name::<Option<ProximityAlertTriggered>>(
123816                    "Option<ProximityAlertTriggered>",
123817                )
123818                .build_type::<ProximityAlertTriggered>()
123819                .register_static_module(
123820                    "Option<ProximityAlertTriggered>",
123821                    exported_module!(ProximityAlertTriggeredModule).into(),
123822                );
123823            engine
123824                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
123825                .build_type::<RefundedPayment>()
123826                .register_static_module(
123827                    "Option<RefundedPayment>",
123828                    exported_module!(RefundedPaymentModule).into(),
123829                );
123830            engine
123831                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
123832                .build_type::<SharedUser>()
123833                .register_static_module(
123834                    "Option<SharedUser>",
123835                    exported_module!(SharedUserModule).into(),
123836                );
123837            engine
123838                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
123839                .build_type::<ShippingAddress>()
123840                .register_static_module(
123841                    "Option<ShippingAddress>",
123842                    exported_module!(ShippingAddressModule).into(),
123843                );
123844            engine
123845                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
123846                .build_type::<StarAmount>()
123847                .register_static_module(
123848                    "Option<StarAmount>",
123849                    exported_module!(StarAmountModule).into(),
123850                );
123851            engine
123852                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
123853                .build_type::<Sticker>()
123854                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
123855            engine
123856                .register_type_with_name::<Option<Story>>("Option<Story>")
123857                .build_type::<Story>()
123858                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
123859            engine
123860                .register_type_with_name::<Option<String>>("Option<String>")
123861                .register_static_module("Option<String>", exported_module!(StringModule).into());
123862            engine
123863                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
123864                .build_type::<SuccessfulPayment>()
123865                .register_static_module(
123866                    "Option<SuccessfulPayment>",
123867                    exported_module!(SuccessfulPaymentModule).into(),
123868                );
123869            engine
123870                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
123871                    "Option<SuggestedPostApprovalFailed>",
123872                )
123873                .build_type::<SuggestedPostApprovalFailed>()
123874                .register_static_module(
123875                    "Option<SuggestedPostApprovalFailed>",
123876                    exported_module!(SuggestedPostApprovalFailedModule).into(),
123877                );
123878            engine
123879                .register_type_with_name::<Option<SuggestedPostApproved>>(
123880                    "Option<SuggestedPostApproved>",
123881                )
123882                .build_type::<SuggestedPostApproved>()
123883                .register_static_module(
123884                    "Option<SuggestedPostApproved>",
123885                    exported_module!(SuggestedPostApprovedModule).into(),
123886                );
123887            engine
123888                .register_type_with_name::<Option<SuggestedPostDeclined>>(
123889                    "Option<SuggestedPostDeclined>",
123890                )
123891                .build_type::<SuggestedPostDeclined>()
123892                .register_static_module(
123893                    "Option<SuggestedPostDeclined>",
123894                    exported_module!(SuggestedPostDeclinedModule).into(),
123895                );
123896            engine
123897                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
123898                .build_type::<SuggestedPostInfo>()
123899                .register_static_module(
123900                    "Option<SuggestedPostInfo>",
123901                    exported_module!(SuggestedPostInfoModule).into(),
123902                );
123903            engine
123904                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
123905                .build_type::<SuggestedPostPaid>()
123906                .register_static_module(
123907                    "Option<SuggestedPostPaid>",
123908                    exported_module!(SuggestedPostPaidModule).into(),
123909                );
123910            engine
123911                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
123912                .build_type::<SuggestedPostPrice>()
123913                .register_static_module(
123914                    "Option<SuggestedPostPrice>",
123915                    exported_module!(SuggestedPostPriceModule).into(),
123916                );
123917            engine
123918                .register_type_with_name::<Option<SuggestedPostRefunded>>(
123919                    "Option<SuggestedPostRefunded>",
123920                )
123921                .build_type::<SuggestedPostRefunded>()
123922                .register_static_module(
123923                    "Option<SuggestedPostRefunded>",
123924                    exported_module!(SuggestedPostRefundedModule).into(),
123925                );
123926            engine
123927                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
123928                    "Option<SwitchInlineQueryChosenChat>",
123929                )
123930                .build_type::<SwitchInlineQueryChosenChat>()
123931                .register_static_module(
123932                    "Option<SwitchInlineQueryChosenChat>",
123933                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
123934                );
123935            engine
123936                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
123937                .build_type::<TextQuote>()
123938                .register_static_module(
123939                    "Option<TextQuote>",
123940                    exported_module!(TextQuoteModule).into(),
123941                );
123942            engine
123943                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
123944                .build_type::<UniqueGift>()
123945                .register_static_module(
123946                    "Option<UniqueGift>",
123947                    exported_module!(UniqueGiftModule).into(),
123948                );
123949            engine
123950                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
123951                .build_type::<UniqueGiftBackdrop>()
123952                .register_static_module(
123953                    "Option<UniqueGiftBackdrop>",
123954                    exported_module!(UniqueGiftBackdropModule).into(),
123955                );
123956            engine
123957                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
123958                    "Option<UniqueGiftBackdropColors>",
123959                )
123960                .build_type::<UniqueGiftBackdropColors>()
123961                .register_static_module(
123962                    "Option<UniqueGiftBackdropColors>",
123963                    exported_module!(UniqueGiftBackdropColorsModule).into(),
123964                );
123965            engine
123966                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
123967                .build_type::<UniqueGiftInfo>()
123968                .register_static_module(
123969                    "Option<UniqueGiftInfo>",
123970                    exported_module!(UniqueGiftInfoModule).into(),
123971                );
123972            engine
123973                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
123974                .build_type::<UniqueGiftModel>()
123975                .register_static_module(
123976                    "Option<UniqueGiftModel>",
123977                    exported_module!(UniqueGiftModelModule).into(),
123978                );
123979            engine
123980                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
123981                .build_type::<UniqueGiftSymbol>()
123982                .register_static_module(
123983                    "Option<UniqueGiftSymbol>",
123984                    exported_module!(UniqueGiftSymbolModule).into(),
123985                );
123986            engine
123987                .register_type_with_name::<Option<User>>("Option<User>")
123988                .build_type::<User>()
123989                .register_static_module("Option<User>", exported_module!(UserModule).into());
123990            engine
123991                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
123992                .build_type::<UsersShared>()
123993                .register_static_module(
123994                    "Option<UsersShared>",
123995                    exported_module!(UsersSharedModule).into(),
123996                );
123997            engine
123998                .register_type_with_name::<Option<Venue>>("Option<Venue>")
123999                .build_type::<Venue>()
124000                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
124001            engine
124002                .register_type_with_name::<Option<Video>>("Option<Video>")
124003                .build_type::<Video>()
124004                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
124005            engine
124006                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
124007                .build_type::<VideoChatEnded>()
124008                .register_static_module(
124009                    "Option<VideoChatEnded>",
124010                    exported_module!(VideoChatEndedModule).into(),
124011                );
124012            engine
124013                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
124014                    "Option<VideoChatParticipantsInvited>",
124015                )
124016                .build_type::<VideoChatParticipantsInvited>()
124017                .register_static_module(
124018                    "Option<VideoChatParticipantsInvited>",
124019                    exported_module!(VideoChatParticipantsInvitedModule).into(),
124020                );
124021            engine
124022                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
124023                .build_type::<VideoChatScheduled>()
124024                .register_static_module(
124025                    "Option<VideoChatScheduled>",
124026                    exported_module!(VideoChatScheduledModule).into(),
124027                );
124028            engine
124029                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
124030                .build_type::<VideoChatStarted>()
124031                .register_static_module(
124032                    "Option<VideoChatStarted>",
124033                    exported_module!(VideoChatStartedModule).into(),
124034                );
124035            engine
124036                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
124037                .build_type::<VideoNote>()
124038                .register_static_module(
124039                    "Option<VideoNote>",
124040                    exported_module!(VideoNoteModule).into(),
124041                );
124042            engine
124043                .register_type_with_name::<Option<Voice>>("Option<Voice>")
124044                .build_type::<Voice>()
124045                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
124046            engine
124047                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
124048                .build_type::<WebAppData>()
124049                .register_static_module(
124050                    "Option<WebAppData>",
124051                    exported_module!(WebAppDataModule).into(),
124052                );
124053            engine
124054                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
124055                .build_type::<WebAppInfo>()
124056                .register_static_module(
124057                    "Option<WebAppInfo>",
124058                    exported_module!(WebAppInfoModule).into(),
124059                );
124060            engine
124061                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
124062                .build_type::<WriteAccessAllowed>()
124063                .register_static_module(
124064                    "Option<WriteAccessAllowed>",
124065                    exported_module!(WriteAccessAllowedModule).into(),
124066                );
124067        }
124068    }
124069    #[cfg(feature = "rhai")]
124070    #[allow(unused_mut)]
124071    impl rhai::CustomType for ChecklistTasksAdded {
124072        fn build(mut builder: rhai::TypeBuilder<Self>) {
124073            builder.with_get("checklist_message", Self::rhai_get_checklist_message);
124074            builder.with_get("tasks", Self::rhai_get_tasks);
124075            builder.on_debug(|t| format!("{:?}", t));
124076            drop(builder);
124077        }
124078    }
124079    #[cfg(feature = "rhai")]
124080    impl SetupRhai for BackgroundFillGradient {
124081        fn setup_rhai(engine: &mut rhai::Engine) {
124082            engine.build_type::<BackgroundFillGradient>();
124083            engine
124084                .register_type_with_name::<Option<i64>>("Option<i64>")
124085                .register_static_module("Option<i64>", exported_module!(i64Module).into());
124086            engine
124087                .register_type_with_name::<Option<String>>("Option<String>")
124088                .register_static_module("Option<String>", exported_module!(StringModule).into());
124089        }
124090    }
124091    #[cfg(feature = "rhai")]
124092    #[allow(unused_mut)]
124093    impl rhai::CustomType for BackgroundFillGradient {
124094        fn build(mut builder: rhai::TypeBuilder<Self>) {
124095            builder.with_get("tg_type", Self::rhai_get_tg_type);
124096            builder.with_get("top_color", Self::rhai_get_top_color);
124097            builder.with_get("bottom_color", Self::rhai_get_bottom_color);
124098            builder.with_get("rotation_angle", Self::rhai_get_rotation_angle);
124099            builder.on_debug(|t| format!("{:?}", t));
124100            drop(builder);
124101        }
124102    }
124103    #[cfg(feature = "rhai")]
124104    impl SetupRhai for SuggestedPostRefunded {
124105        fn setup_rhai(engine: &mut rhai::Engine) {
124106            engine.build_type::<SuggestedPostRefunded>();
124107            engine
124108                .register_type_with_name::<Option<Animation>>("Option<Animation>")
124109                .build_type::<Animation>()
124110                .register_static_module(
124111                    "Option<Animation>",
124112                    exported_module!(AnimationModule).into(),
124113                );
124114            engine
124115                .register_type_with_name::<Option<Audio>>("Option<Audio>")
124116                .build_type::<Audio>()
124117                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
124118            engine
124119                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
124120                .register_static_module(
124121                    "Option<BackgroundType>",
124122                    exported_module!(BackgroundTypeModule).into(),
124123                );
124124            engine
124125                .register_type_with_name::<Option<bool>>("Option<bool>")
124126                .register_static_module("Option<bool>", exported_module!(boolModule).into());
124127            engine
124128                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
124129                .build_type::<CallbackGame>()
124130                .register_static_module(
124131                    "Option<CallbackGame>",
124132                    exported_module!(CallbackGameModule).into(),
124133                );
124134            engine
124135                .register_type_with_name::<Option<Chat>>("Option<Chat>")
124136                .build_type::<Chat>()
124137                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
124138            engine
124139                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
124140                .build_type::<ChatBackground>()
124141                .register_static_module(
124142                    "Option<ChatBackground>",
124143                    exported_module!(ChatBackgroundModule).into(),
124144                );
124145            engine
124146                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
124147                .build_type::<ChatBoostAdded>()
124148                .register_static_module(
124149                    "Option<ChatBoostAdded>",
124150                    exported_module!(ChatBoostAddedModule).into(),
124151                );
124152            engine
124153                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
124154                .build_type::<ChatShared>()
124155                .register_static_module(
124156                    "Option<ChatShared>",
124157                    exported_module!(ChatSharedModule).into(),
124158                );
124159            engine
124160                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
124161                .build_type::<Checklist>()
124162                .register_static_module(
124163                    "Option<Checklist>",
124164                    exported_module!(ChecklistModule).into(),
124165                );
124166            engine
124167                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
124168                .build_type::<ChecklistTask>()
124169                .register_static_module(
124170                    "Option<ChecklistTask>",
124171                    exported_module!(ChecklistTaskModule).into(),
124172                );
124173            engine
124174                .register_type_with_name::<Option<ChecklistTasksAdded>>(
124175                    "Option<ChecklistTasksAdded>",
124176                )
124177                .build_type::<ChecklistTasksAdded>()
124178                .register_static_module(
124179                    "Option<ChecklistTasksAdded>",
124180                    exported_module!(ChecklistTasksAddedModule).into(),
124181                );
124182            engine
124183                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
124184                .build_type::<ChecklistTasksDone>()
124185                .register_static_module(
124186                    "Option<ChecklistTasksDone>",
124187                    exported_module!(ChecklistTasksDoneModule).into(),
124188                );
124189            engine
124190                .register_type_with_name::<Option<Contact>>("Option<Contact>")
124191                .build_type::<Contact>()
124192                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
124193            engine
124194                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
124195                .build_type::<CopyTextButton>()
124196                .register_static_module(
124197                    "Option<CopyTextButton>",
124198                    exported_module!(CopyTextButtonModule).into(),
124199                );
124200            engine
124201                .register_type_with_name::<Option<Dice>>("Option<Dice>")
124202                .build_type::<Dice>()
124203                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
124204            engine
124205                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
124206                    "Option<DirectMessagePriceChanged>",
124207                )
124208                .build_type::<DirectMessagePriceChanged>()
124209                .register_static_module(
124210                    "Option<DirectMessagePriceChanged>",
124211                    exported_module!(DirectMessagePriceChangedModule).into(),
124212                );
124213            engine
124214                .register_type_with_name::<Option<DirectMessagesTopic>>(
124215                    "Option<DirectMessagesTopic>",
124216                )
124217                .build_type::<DirectMessagesTopic>()
124218                .register_static_module(
124219                    "Option<DirectMessagesTopic>",
124220                    exported_module!(DirectMessagesTopicModule).into(),
124221                );
124222            engine
124223                .register_type_with_name::<Option<Document>>("Option<Document>")
124224                .build_type::<Document>()
124225                .register_static_module(
124226                    "Option<Document>",
124227                    exported_module!(DocumentModule).into(),
124228                );
124229            engine
124230                .register_type_with_name::<Option<EncryptedCredentials>>(
124231                    "Option<EncryptedCredentials>",
124232                )
124233                .build_type::<EncryptedCredentials>()
124234                .register_static_module(
124235                    "Option<EncryptedCredentials>",
124236                    exported_module!(EncryptedCredentialsModule).into(),
124237                );
124238            engine
124239                .register_type_with_name::<Option<EncryptedPassportElement>>(
124240                    "Option<EncryptedPassportElement>",
124241                )
124242                .build_type::<EncryptedPassportElement>()
124243                .register_static_module(
124244                    "Option<EncryptedPassportElement>",
124245                    exported_module!(EncryptedPassportElementModule).into(),
124246                );
124247            engine
124248                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
124249                .build_type::<ExternalReplyInfo>()
124250                .register_static_module(
124251                    "Option<ExternalReplyInfo>",
124252                    exported_module!(ExternalReplyInfoModule).into(),
124253                );
124254            engine
124255                .register_type_with_name::<Option<File>>("Option<File>")
124256                .build_type::<File>()
124257                .register_static_module("Option<File>", exported_module!(FileModule).into());
124258            engine
124259                .register_type_with_name::<Option<f64>>("Option<f64>")
124260                .register_static_module("Option<f64>", exported_module!(f64Module).into());
124261            engine
124262                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
124263                .build_type::<ForumTopicClosed>()
124264                .register_static_module(
124265                    "Option<ForumTopicClosed>",
124266                    exported_module!(ForumTopicClosedModule).into(),
124267                );
124268            engine
124269                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
124270                .build_type::<ForumTopicCreated>()
124271                .register_static_module(
124272                    "Option<ForumTopicCreated>",
124273                    exported_module!(ForumTopicCreatedModule).into(),
124274                );
124275            engine
124276                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
124277                .build_type::<ForumTopicEdited>()
124278                .register_static_module(
124279                    "Option<ForumTopicEdited>",
124280                    exported_module!(ForumTopicEditedModule).into(),
124281                );
124282            engine
124283                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
124284                .build_type::<ForumTopicReopened>()
124285                .register_static_module(
124286                    "Option<ForumTopicReopened>",
124287                    exported_module!(ForumTopicReopenedModule).into(),
124288                );
124289            engine
124290                .register_type_with_name::<Option<Game>>("Option<Game>")
124291                .build_type::<Game>()
124292                .register_static_module("Option<Game>", exported_module!(GameModule).into());
124293            engine
124294                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
124295                    "Option<GeneralForumTopicHidden>",
124296                )
124297                .build_type::<GeneralForumTopicHidden>()
124298                .register_static_module(
124299                    "Option<GeneralForumTopicHidden>",
124300                    exported_module!(GeneralForumTopicHiddenModule).into(),
124301                );
124302            engine
124303                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
124304                    "Option<GeneralForumTopicUnhidden>",
124305                )
124306                .build_type::<GeneralForumTopicUnhidden>()
124307                .register_static_module(
124308                    "Option<GeneralForumTopicUnhidden>",
124309                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
124310                );
124311            engine
124312                .register_type_with_name::<Option<Gift>>("Option<Gift>")
124313                .build_type::<Gift>()
124314                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
124315            engine
124316                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
124317                .build_type::<GiftInfo>()
124318                .register_static_module(
124319                    "Option<GiftInfo>",
124320                    exported_module!(GiftInfoModule).into(),
124321                );
124322            engine
124323                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
124324                .build_type::<Giveaway>()
124325                .register_static_module(
124326                    "Option<Giveaway>",
124327                    exported_module!(GiveawayModule).into(),
124328                );
124329            engine
124330                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
124331                .build_type::<GiveawayCompleted>()
124332                .register_static_module(
124333                    "Option<GiveawayCompleted>",
124334                    exported_module!(GiveawayCompletedModule).into(),
124335                );
124336            engine
124337                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
124338                .build_type::<GiveawayCreated>()
124339                .register_static_module(
124340                    "Option<GiveawayCreated>",
124341                    exported_module!(GiveawayCreatedModule).into(),
124342                );
124343            engine
124344                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
124345                .build_type::<GiveawayWinners>()
124346                .register_static_module(
124347                    "Option<GiveawayWinners>",
124348                    exported_module!(GiveawayWinnersModule).into(),
124349                );
124350            engine
124351                .register_type_with_name::<Option<InlineKeyboardButton>>(
124352                    "Option<InlineKeyboardButton>",
124353                )
124354                .build_type::<InlineKeyboardButton>()
124355                .register_static_module(
124356                    "Option<InlineKeyboardButton>",
124357                    exported_module!(InlineKeyboardButtonModule).into(),
124358                );
124359            engine
124360                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
124361                    "Option<InlineKeyboardMarkup>",
124362                )
124363                .build_type::<InlineKeyboardMarkup>()
124364                .register_static_module(
124365                    "Option<InlineKeyboardMarkup>",
124366                    exported_module!(InlineKeyboardMarkupModule).into(),
124367                );
124368            engine
124369                .register_type_with_name::<Option<i64>>("Option<i64>")
124370                .register_static_module("Option<i64>", exported_module!(i64Module).into());
124371            engine
124372                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
124373                .build_type::<Invoice>()
124374                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
124375            engine
124376                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
124377                .build_type::<LinkPreviewOptions>()
124378                .register_static_module(
124379                    "Option<LinkPreviewOptions>",
124380                    exported_module!(LinkPreviewOptionsModule).into(),
124381                );
124382            engine
124383                .register_type_with_name::<Option<Location>>("Option<Location>")
124384                .build_type::<Location>()
124385                .register_static_module(
124386                    "Option<Location>",
124387                    exported_module!(LocationModule).into(),
124388                );
124389            engine
124390                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
124391                .build_type::<LoginUrl>()
124392                .register_static_module(
124393                    "Option<LoginUrl>",
124394                    exported_module!(LoginUrlModule).into(),
124395                );
124396            engine
124397                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
124398                .build_type::<MaskPosition>()
124399                .register_static_module(
124400                    "Option<MaskPosition>",
124401                    exported_module!(MaskPositionModule).into(),
124402                );
124403            engine
124404                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
124405                    "Option<MaybeInaccessibleMessage>",
124406                )
124407                .register_static_module(
124408                    "Option<MaybeInaccessibleMessage>",
124409                    exported_module!(MaybeInaccessibleMessageModule).into(),
124410                );
124411            engine
124412                .register_type_with_name::<Option<Message>>("Option<Message>")
124413                .build_type::<Message>()
124414                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
124415            engine
124416                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
124417                    "Option<MessageAutoDeleteTimerChanged>",
124418                )
124419                .build_type::<MessageAutoDeleteTimerChanged>()
124420                .register_static_module(
124421                    "Option<MessageAutoDeleteTimerChanged>",
124422                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
124423                );
124424            engine
124425                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
124426                .build_type::<MessageEntity>()
124427                .register_static_module(
124428                    "Option<MessageEntity>",
124429                    exported_module!(MessageEntityModule).into(),
124430                );
124431            engine
124432                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
124433                .register_static_module(
124434                    "Option<MessageOrigin>",
124435                    exported_module!(MessageOriginModule).into(),
124436                );
124437            engine
124438                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
124439                .build_type::<OrderInfo>()
124440                .register_static_module(
124441                    "Option<OrderInfo>",
124442                    exported_module!(OrderInfoModule).into(),
124443                );
124444            engine
124445                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
124446                .register_static_module(
124447                    "Option<PaidMedia>",
124448                    exported_module!(PaidMediaModule).into(),
124449                );
124450            engine
124451                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
124452                .build_type::<PaidMediaInfo>()
124453                .register_static_module(
124454                    "Option<PaidMediaInfo>",
124455                    exported_module!(PaidMediaInfoModule).into(),
124456                );
124457            engine
124458                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
124459                    "Option<PaidMessagePriceChanged>",
124460                )
124461                .build_type::<PaidMessagePriceChanged>()
124462                .register_static_module(
124463                    "Option<PaidMessagePriceChanged>",
124464                    exported_module!(PaidMessagePriceChangedModule).into(),
124465                );
124466            engine
124467                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
124468                .build_type::<PassportData>()
124469                .register_static_module(
124470                    "Option<PassportData>",
124471                    exported_module!(PassportDataModule).into(),
124472                );
124473            engine
124474                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
124475                .build_type::<PassportFile>()
124476                .register_static_module(
124477                    "Option<PassportFile>",
124478                    exported_module!(PassportFileModule).into(),
124479                );
124480            engine
124481                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
124482                .build_type::<PhotoSize>()
124483                .register_static_module(
124484                    "Option<PhotoSize>",
124485                    exported_module!(PhotoSizeModule).into(),
124486                );
124487            engine
124488                .register_type_with_name::<Option<Poll>>("Option<Poll>")
124489                .build_type::<Poll>()
124490                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
124491            engine
124492                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
124493                .build_type::<PollOption>()
124494                .register_static_module(
124495                    "Option<PollOption>",
124496                    exported_module!(PollOptionModule).into(),
124497                );
124498            engine
124499                .register_type_with_name::<Option<ProximityAlertTriggered>>(
124500                    "Option<ProximityAlertTriggered>",
124501                )
124502                .build_type::<ProximityAlertTriggered>()
124503                .register_static_module(
124504                    "Option<ProximityAlertTriggered>",
124505                    exported_module!(ProximityAlertTriggeredModule).into(),
124506                );
124507            engine
124508                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
124509                .build_type::<RefundedPayment>()
124510                .register_static_module(
124511                    "Option<RefundedPayment>",
124512                    exported_module!(RefundedPaymentModule).into(),
124513                );
124514            engine
124515                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
124516                .build_type::<SharedUser>()
124517                .register_static_module(
124518                    "Option<SharedUser>",
124519                    exported_module!(SharedUserModule).into(),
124520                );
124521            engine
124522                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
124523                .build_type::<ShippingAddress>()
124524                .register_static_module(
124525                    "Option<ShippingAddress>",
124526                    exported_module!(ShippingAddressModule).into(),
124527                );
124528            engine
124529                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
124530                .build_type::<StarAmount>()
124531                .register_static_module(
124532                    "Option<StarAmount>",
124533                    exported_module!(StarAmountModule).into(),
124534                );
124535            engine
124536                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
124537                .build_type::<Sticker>()
124538                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
124539            engine
124540                .register_type_with_name::<Option<Story>>("Option<Story>")
124541                .build_type::<Story>()
124542                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
124543            engine
124544                .register_type_with_name::<Option<String>>("Option<String>")
124545                .register_static_module("Option<String>", exported_module!(StringModule).into());
124546            engine
124547                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
124548                .build_type::<SuccessfulPayment>()
124549                .register_static_module(
124550                    "Option<SuccessfulPayment>",
124551                    exported_module!(SuccessfulPaymentModule).into(),
124552                );
124553            engine
124554                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
124555                    "Option<SuggestedPostApprovalFailed>",
124556                )
124557                .build_type::<SuggestedPostApprovalFailed>()
124558                .register_static_module(
124559                    "Option<SuggestedPostApprovalFailed>",
124560                    exported_module!(SuggestedPostApprovalFailedModule).into(),
124561                );
124562            engine
124563                .register_type_with_name::<Option<SuggestedPostApproved>>(
124564                    "Option<SuggestedPostApproved>",
124565                )
124566                .build_type::<SuggestedPostApproved>()
124567                .register_static_module(
124568                    "Option<SuggestedPostApproved>",
124569                    exported_module!(SuggestedPostApprovedModule).into(),
124570                );
124571            engine
124572                .register_type_with_name::<Option<SuggestedPostDeclined>>(
124573                    "Option<SuggestedPostDeclined>",
124574                )
124575                .build_type::<SuggestedPostDeclined>()
124576                .register_static_module(
124577                    "Option<SuggestedPostDeclined>",
124578                    exported_module!(SuggestedPostDeclinedModule).into(),
124579                );
124580            engine
124581                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
124582                .build_type::<SuggestedPostInfo>()
124583                .register_static_module(
124584                    "Option<SuggestedPostInfo>",
124585                    exported_module!(SuggestedPostInfoModule).into(),
124586                );
124587            engine
124588                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
124589                .build_type::<SuggestedPostPaid>()
124590                .register_static_module(
124591                    "Option<SuggestedPostPaid>",
124592                    exported_module!(SuggestedPostPaidModule).into(),
124593                );
124594            engine
124595                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
124596                .build_type::<SuggestedPostPrice>()
124597                .register_static_module(
124598                    "Option<SuggestedPostPrice>",
124599                    exported_module!(SuggestedPostPriceModule).into(),
124600                );
124601            engine
124602                .register_type_with_name::<Option<SuggestedPostRefunded>>(
124603                    "Option<SuggestedPostRefunded>",
124604                )
124605                .build_type::<SuggestedPostRefunded>()
124606                .register_static_module(
124607                    "Option<SuggestedPostRefunded>",
124608                    exported_module!(SuggestedPostRefundedModule).into(),
124609                );
124610            engine
124611                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
124612                    "Option<SwitchInlineQueryChosenChat>",
124613                )
124614                .build_type::<SwitchInlineQueryChosenChat>()
124615                .register_static_module(
124616                    "Option<SwitchInlineQueryChosenChat>",
124617                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
124618                );
124619            engine
124620                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
124621                .build_type::<TextQuote>()
124622                .register_static_module(
124623                    "Option<TextQuote>",
124624                    exported_module!(TextQuoteModule).into(),
124625                );
124626            engine
124627                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
124628                .build_type::<UniqueGift>()
124629                .register_static_module(
124630                    "Option<UniqueGift>",
124631                    exported_module!(UniqueGiftModule).into(),
124632                );
124633            engine
124634                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
124635                .build_type::<UniqueGiftBackdrop>()
124636                .register_static_module(
124637                    "Option<UniqueGiftBackdrop>",
124638                    exported_module!(UniqueGiftBackdropModule).into(),
124639                );
124640            engine
124641                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
124642                    "Option<UniqueGiftBackdropColors>",
124643                )
124644                .build_type::<UniqueGiftBackdropColors>()
124645                .register_static_module(
124646                    "Option<UniqueGiftBackdropColors>",
124647                    exported_module!(UniqueGiftBackdropColorsModule).into(),
124648                );
124649            engine
124650                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
124651                .build_type::<UniqueGiftInfo>()
124652                .register_static_module(
124653                    "Option<UniqueGiftInfo>",
124654                    exported_module!(UniqueGiftInfoModule).into(),
124655                );
124656            engine
124657                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
124658                .build_type::<UniqueGiftModel>()
124659                .register_static_module(
124660                    "Option<UniqueGiftModel>",
124661                    exported_module!(UniqueGiftModelModule).into(),
124662                );
124663            engine
124664                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
124665                .build_type::<UniqueGiftSymbol>()
124666                .register_static_module(
124667                    "Option<UniqueGiftSymbol>",
124668                    exported_module!(UniqueGiftSymbolModule).into(),
124669                );
124670            engine
124671                .register_type_with_name::<Option<User>>("Option<User>")
124672                .build_type::<User>()
124673                .register_static_module("Option<User>", exported_module!(UserModule).into());
124674            engine
124675                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
124676                .build_type::<UsersShared>()
124677                .register_static_module(
124678                    "Option<UsersShared>",
124679                    exported_module!(UsersSharedModule).into(),
124680                );
124681            engine
124682                .register_type_with_name::<Option<Venue>>("Option<Venue>")
124683                .build_type::<Venue>()
124684                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
124685            engine
124686                .register_type_with_name::<Option<Video>>("Option<Video>")
124687                .build_type::<Video>()
124688                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
124689            engine
124690                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
124691                .build_type::<VideoChatEnded>()
124692                .register_static_module(
124693                    "Option<VideoChatEnded>",
124694                    exported_module!(VideoChatEndedModule).into(),
124695                );
124696            engine
124697                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
124698                    "Option<VideoChatParticipantsInvited>",
124699                )
124700                .build_type::<VideoChatParticipantsInvited>()
124701                .register_static_module(
124702                    "Option<VideoChatParticipantsInvited>",
124703                    exported_module!(VideoChatParticipantsInvitedModule).into(),
124704                );
124705            engine
124706                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
124707                .build_type::<VideoChatScheduled>()
124708                .register_static_module(
124709                    "Option<VideoChatScheduled>",
124710                    exported_module!(VideoChatScheduledModule).into(),
124711                );
124712            engine
124713                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
124714                .build_type::<VideoChatStarted>()
124715                .register_static_module(
124716                    "Option<VideoChatStarted>",
124717                    exported_module!(VideoChatStartedModule).into(),
124718                );
124719            engine
124720                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
124721                .build_type::<VideoNote>()
124722                .register_static_module(
124723                    "Option<VideoNote>",
124724                    exported_module!(VideoNoteModule).into(),
124725                );
124726            engine
124727                .register_type_with_name::<Option<Voice>>("Option<Voice>")
124728                .build_type::<Voice>()
124729                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
124730            engine
124731                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
124732                .build_type::<WebAppData>()
124733                .register_static_module(
124734                    "Option<WebAppData>",
124735                    exported_module!(WebAppDataModule).into(),
124736                );
124737            engine
124738                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
124739                .build_type::<WebAppInfo>()
124740                .register_static_module(
124741                    "Option<WebAppInfo>",
124742                    exported_module!(WebAppInfoModule).into(),
124743                );
124744            engine
124745                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
124746                .build_type::<WriteAccessAllowed>()
124747                .register_static_module(
124748                    "Option<WriteAccessAllowed>",
124749                    exported_module!(WriteAccessAllowedModule).into(),
124750                );
124751        }
124752    }
124753    #[cfg(feature = "rhai")]
124754    #[allow(unused_mut)]
124755    impl rhai::CustomType for SuggestedPostRefunded {
124756        fn build(mut builder: rhai::TypeBuilder<Self>) {
124757            builder.with_get(
124758                "suggested_post_message",
124759                Self::rhai_get_suggested_post_message,
124760            );
124761            builder.with_get("reason", Self::rhai_get_reason);
124762            builder.on_debug(|t| format!("{:?}", t));
124763            drop(builder);
124764        }
124765    }
124766    #[cfg(feature = "rhai")]
124767    impl SetupRhai for CallbackQuery {
124768        fn setup_rhai(engine: &mut rhai::Engine) {
124769            engine.build_type::<CallbackQuery>();
124770            engine
124771                .register_type_with_name::<Option<bool>>("Option<bool>")
124772                .register_static_module("Option<bool>", exported_module!(boolModule).into());
124773            engine
124774                .register_type_with_name::<Option<i64>>("Option<i64>")
124775                .register_static_module("Option<i64>", exported_module!(i64Module).into());
124776            engine
124777                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
124778                    "Option<MaybeInaccessibleMessage>",
124779                )
124780                .register_static_module(
124781                    "Option<MaybeInaccessibleMessage>",
124782                    exported_module!(MaybeInaccessibleMessageModule).into(),
124783                );
124784            engine
124785                .register_type_with_name::<Option<String>>("Option<String>")
124786                .register_static_module("Option<String>", exported_module!(StringModule).into());
124787            engine
124788                .register_type_with_name::<Option<User>>("Option<User>")
124789                .build_type::<User>()
124790                .register_static_module("Option<User>", exported_module!(UserModule).into());
124791        }
124792    }
124793    #[cfg(feature = "rhai")]
124794    #[allow(unused_mut)]
124795    impl rhai::CustomType for CallbackQuery {
124796        fn build(mut builder: rhai::TypeBuilder<Self>) {
124797            builder.with_get("id", Self::rhai_get_id);
124798            builder.with_get("from", Self::rhai_get_from);
124799            builder.with_get("message", Self::rhai_get_message);
124800            builder.with_get("inline_message_id", Self::rhai_get_inline_message_id);
124801            builder.with_get("chat_instance", Self::rhai_get_chat_instance);
124802            builder.with_get("data", Self::rhai_get_data);
124803            builder.with_get("game_short_name", Self::rhai_get_game_short_name);
124804            builder.on_debug(|t| format!("{:?}", t));
124805            drop(builder);
124806        }
124807    }
124808    #[cfg(feature = "rhai")]
124809    impl SetupRhai for PassportElementErrorFiles {
124810        fn setup_rhai(engine: &mut rhai::Engine) {
124811            engine.build_type::<PassportElementErrorFiles>();
124812            engine
124813                .register_type_with_name::<Option<String>>("Option<String>")
124814                .register_static_module("Option<String>", exported_module!(StringModule).into());
124815        }
124816    }
124817    #[cfg(feature = "rhai")]
124818    #[allow(unused_mut)]
124819    impl rhai::CustomType for PassportElementErrorFiles {
124820        fn build(mut builder: rhai::TypeBuilder<Self>) {
124821            builder.with_get("source", Self::rhai_get_source);
124822            builder.with_get("tg_type", Self::rhai_get_tg_type);
124823            builder.with_get("file_hashes", Self::rhai_get_file_hashes);
124824            builder.with_get("message", Self::rhai_get_message);
124825            builder.on_debug(|t| format!("{:?}", t));
124826            drop(builder);
124827        }
124828    }
124829    #[cfg(feature = "rhai")]
124830    impl SetupRhai for MenuButtonDefault {
124831        fn setup_rhai(engine: &mut rhai::Engine) {
124832            engine.build_type::<MenuButtonDefault>();
124833            engine
124834                .register_type_with_name::<Option<String>>("Option<String>")
124835                .register_static_module("Option<String>", exported_module!(StringModule).into());
124836        }
124837    }
124838    #[cfg(feature = "rhai")]
124839    #[allow(unused_mut)]
124840    impl rhai::CustomType for MenuButtonDefault {
124841        fn build(mut builder: rhai::TypeBuilder<Self>) {
124842            builder.with_get("tg_type", Self::rhai_get_tg_type);
124843            builder.on_debug(|t| format!("{:?}", t));
124844            drop(builder);
124845        }
124846    }
124847    #[cfg(feature = "rhai")]
124848    impl SetupRhai for ForumTopicEdited {
124849        fn setup_rhai(engine: &mut rhai::Engine) {
124850            engine.build_type::<ForumTopicEdited>();
124851            engine
124852                .register_type_with_name::<Option<String>>("Option<String>")
124853                .register_static_module("Option<String>", exported_module!(StringModule).into());
124854        }
124855    }
124856    #[cfg(feature = "rhai")]
124857    #[allow(unused_mut)]
124858    impl rhai::CustomType for ForumTopicEdited {
124859        fn build(mut builder: rhai::TypeBuilder<Self>) {
124860            builder.with_get("name", Self::rhai_get_name);
124861            builder.with_get("icon_custom_emoji_id", Self::rhai_get_icon_custom_emoji_id);
124862            builder.on_debug(|t| format!("{:?}", t));
124863            drop(builder);
124864        }
124865    }
124866    #[cfg(feature = "rhai")]
124867    impl SetupRhai for GiveawayCompleted {
124868        fn setup_rhai(engine: &mut rhai::Engine) {
124869            engine.build_type::<GiveawayCompleted>();
124870            engine
124871                .register_type_with_name::<Option<Animation>>("Option<Animation>")
124872                .build_type::<Animation>()
124873                .register_static_module(
124874                    "Option<Animation>",
124875                    exported_module!(AnimationModule).into(),
124876                );
124877            engine
124878                .register_type_with_name::<Option<Audio>>("Option<Audio>")
124879                .build_type::<Audio>()
124880                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
124881            engine
124882                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
124883                .register_static_module(
124884                    "Option<BackgroundType>",
124885                    exported_module!(BackgroundTypeModule).into(),
124886                );
124887            engine
124888                .register_type_with_name::<Option<bool>>("Option<bool>")
124889                .register_static_module("Option<bool>", exported_module!(boolModule).into());
124890            engine
124891                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
124892                .build_type::<CallbackGame>()
124893                .register_static_module(
124894                    "Option<CallbackGame>",
124895                    exported_module!(CallbackGameModule).into(),
124896                );
124897            engine
124898                .register_type_with_name::<Option<Chat>>("Option<Chat>")
124899                .build_type::<Chat>()
124900                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
124901            engine
124902                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
124903                .build_type::<ChatBackground>()
124904                .register_static_module(
124905                    "Option<ChatBackground>",
124906                    exported_module!(ChatBackgroundModule).into(),
124907                );
124908            engine
124909                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
124910                .build_type::<ChatBoostAdded>()
124911                .register_static_module(
124912                    "Option<ChatBoostAdded>",
124913                    exported_module!(ChatBoostAddedModule).into(),
124914                );
124915            engine
124916                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
124917                .build_type::<ChatShared>()
124918                .register_static_module(
124919                    "Option<ChatShared>",
124920                    exported_module!(ChatSharedModule).into(),
124921                );
124922            engine
124923                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
124924                .build_type::<Checklist>()
124925                .register_static_module(
124926                    "Option<Checklist>",
124927                    exported_module!(ChecklistModule).into(),
124928                );
124929            engine
124930                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
124931                .build_type::<ChecklistTask>()
124932                .register_static_module(
124933                    "Option<ChecklistTask>",
124934                    exported_module!(ChecklistTaskModule).into(),
124935                );
124936            engine
124937                .register_type_with_name::<Option<ChecklistTasksAdded>>(
124938                    "Option<ChecklistTasksAdded>",
124939                )
124940                .build_type::<ChecklistTasksAdded>()
124941                .register_static_module(
124942                    "Option<ChecklistTasksAdded>",
124943                    exported_module!(ChecklistTasksAddedModule).into(),
124944                );
124945            engine
124946                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
124947                .build_type::<ChecklistTasksDone>()
124948                .register_static_module(
124949                    "Option<ChecklistTasksDone>",
124950                    exported_module!(ChecklistTasksDoneModule).into(),
124951                );
124952            engine
124953                .register_type_with_name::<Option<Contact>>("Option<Contact>")
124954                .build_type::<Contact>()
124955                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
124956            engine
124957                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
124958                .build_type::<CopyTextButton>()
124959                .register_static_module(
124960                    "Option<CopyTextButton>",
124961                    exported_module!(CopyTextButtonModule).into(),
124962                );
124963            engine
124964                .register_type_with_name::<Option<Dice>>("Option<Dice>")
124965                .build_type::<Dice>()
124966                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
124967            engine
124968                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
124969                    "Option<DirectMessagePriceChanged>",
124970                )
124971                .build_type::<DirectMessagePriceChanged>()
124972                .register_static_module(
124973                    "Option<DirectMessagePriceChanged>",
124974                    exported_module!(DirectMessagePriceChangedModule).into(),
124975                );
124976            engine
124977                .register_type_with_name::<Option<DirectMessagesTopic>>(
124978                    "Option<DirectMessagesTopic>",
124979                )
124980                .build_type::<DirectMessagesTopic>()
124981                .register_static_module(
124982                    "Option<DirectMessagesTopic>",
124983                    exported_module!(DirectMessagesTopicModule).into(),
124984                );
124985            engine
124986                .register_type_with_name::<Option<Document>>("Option<Document>")
124987                .build_type::<Document>()
124988                .register_static_module(
124989                    "Option<Document>",
124990                    exported_module!(DocumentModule).into(),
124991                );
124992            engine
124993                .register_type_with_name::<Option<EncryptedCredentials>>(
124994                    "Option<EncryptedCredentials>",
124995                )
124996                .build_type::<EncryptedCredentials>()
124997                .register_static_module(
124998                    "Option<EncryptedCredentials>",
124999                    exported_module!(EncryptedCredentialsModule).into(),
125000                );
125001            engine
125002                .register_type_with_name::<Option<EncryptedPassportElement>>(
125003                    "Option<EncryptedPassportElement>",
125004                )
125005                .build_type::<EncryptedPassportElement>()
125006                .register_static_module(
125007                    "Option<EncryptedPassportElement>",
125008                    exported_module!(EncryptedPassportElementModule).into(),
125009                );
125010            engine
125011                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
125012                .build_type::<ExternalReplyInfo>()
125013                .register_static_module(
125014                    "Option<ExternalReplyInfo>",
125015                    exported_module!(ExternalReplyInfoModule).into(),
125016                );
125017            engine
125018                .register_type_with_name::<Option<File>>("Option<File>")
125019                .build_type::<File>()
125020                .register_static_module("Option<File>", exported_module!(FileModule).into());
125021            engine
125022                .register_type_with_name::<Option<f64>>("Option<f64>")
125023                .register_static_module("Option<f64>", exported_module!(f64Module).into());
125024            engine
125025                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
125026                .build_type::<ForumTopicClosed>()
125027                .register_static_module(
125028                    "Option<ForumTopicClosed>",
125029                    exported_module!(ForumTopicClosedModule).into(),
125030                );
125031            engine
125032                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
125033                .build_type::<ForumTopicCreated>()
125034                .register_static_module(
125035                    "Option<ForumTopicCreated>",
125036                    exported_module!(ForumTopicCreatedModule).into(),
125037                );
125038            engine
125039                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
125040                .build_type::<ForumTopicEdited>()
125041                .register_static_module(
125042                    "Option<ForumTopicEdited>",
125043                    exported_module!(ForumTopicEditedModule).into(),
125044                );
125045            engine
125046                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
125047                .build_type::<ForumTopicReopened>()
125048                .register_static_module(
125049                    "Option<ForumTopicReopened>",
125050                    exported_module!(ForumTopicReopenedModule).into(),
125051                );
125052            engine
125053                .register_type_with_name::<Option<Game>>("Option<Game>")
125054                .build_type::<Game>()
125055                .register_static_module("Option<Game>", exported_module!(GameModule).into());
125056            engine
125057                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
125058                    "Option<GeneralForumTopicHidden>",
125059                )
125060                .build_type::<GeneralForumTopicHidden>()
125061                .register_static_module(
125062                    "Option<GeneralForumTopicHidden>",
125063                    exported_module!(GeneralForumTopicHiddenModule).into(),
125064                );
125065            engine
125066                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
125067                    "Option<GeneralForumTopicUnhidden>",
125068                )
125069                .build_type::<GeneralForumTopicUnhidden>()
125070                .register_static_module(
125071                    "Option<GeneralForumTopicUnhidden>",
125072                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
125073                );
125074            engine
125075                .register_type_with_name::<Option<Gift>>("Option<Gift>")
125076                .build_type::<Gift>()
125077                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
125078            engine
125079                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
125080                .build_type::<GiftInfo>()
125081                .register_static_module(
125082                    "Option<GiftInfo>",
125083                    exported_module!(GiftInfoModule).into(),
125084                );
125085            engine
125086                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
125087                .build_type::<Giveaway>()
125088                .register_static_module(
125089                    "Option<Giveaway>",
125090                    exported_module!(GiveawayModule).into(),
125091                );
125092            engine
125093                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
125094                .build_type::<GiveawayCompleted>()
125095                .register_static_module(
125096                    "Option<GiveawayCompleted>",
125097                    exported_module!(GiveawayCompletedModule).into(),
125098                );
125099            engine
125100                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
125101                .build_type::<GiveawayCreated>()
125102                .register_static_module(
125103                    "Option<GiveawayCreated>",
125104                    exported_module!(GiveawayCreatedModule).into(),
125105                );
125106            engine
125107                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
125108                .build_type::<GiveawayWinners>()
125109                .register_static_module(
125110                    "Option<GiveawayWinners>",
125111                    exported_module!(GiveawayWinnersModule).into(),
125112                );
125113            engine
125114                .register_type_with_name::<Option<InlineKeyboardButton>>(
125115                    "Option<InlineKeyboardButton>",
125116                )
125117                .build_type::<InlineKeyboardButton>()
125118                .register_static_module(
125119                    "Option<InlineKeyboardButton>",
125120                    exported_module!(InlineKeyboardButtonModule).into(),
125121                );
125122            engine
125123                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
125124                    "Option<InlineKeyboardMarkup>",
125125                )
125126                .build_type::<InlineKeyboardMarkup>()
125127                .register_static_module(
125128                    "Option<InlineKeyboardMarkup>",
125129                    exported_module!(InlineKeyboardMarkupModule).into(),
125130                );
125131            engine
125132                .register_type_with_name::<Option<i64>>("Option<i64>")
125133                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125134            engine
125135                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
125136                .build_type::<Invoice>()
125137                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
125138            engine
125139                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
125140                .build_type::<LinkPreviewOptions>()
125141                .register_static_module(
125142                    "Option<LinkPreviewOptions>",
125143                    exported_module!(LinkPreviewOptionsModule).into(),
125144                );
125145            engine
125146                .register_type_with_name::<Option<Location>>("Option<Location>")
125147                .build_type::<Location>()
125148                .register_static_module(
125149                    "Option<Location>",
125150                    exported_module!(LocationModule).into(),
125151                );
125152            engine
125153                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
125154                .build_type::<LoginUrl>()
125155                .register_static_module(
125156                    "Option<LoginUrl>",
125157                    exported_module!(LoginUrlModule).into(),
125158                );
125159            engine
125160                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
125161                .build_type::<MaskPosition>()
125162                .register_static_module(
125163                    "Option<MaskPosition>",
125164                    exported_module!(MaskPositionModule).into(),
125165                );
125166            engine
125167                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
125168                    "Option<MaybeInaccessibleMessage>",
125169                )
125170                .register_static_module(
125171                    "Option<MaybeInaccessibleMessage>",
125172                    exported_module!(MaybeInaccessibleMessageModule).into(),
125173                );
125174            engine
125175                .register_type_with_name::<Option<Message>>("Option<Message>")
125176                .build_type::<Message>()
125177                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
125178            engine
125179                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
125180                    "Option<MessageAutoDeleteTimerChanged>",
125181                )
125182                .build_type::<MessageAutoDeleteTimerChanged>()
125183                .register_static_module(
125184                    "Option<MessageAutoDeleteTimerChanged>",
125185                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
125186                );
125187            engine
125188                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
125189                .build_type::<MessageEntity>()
125190                .register_static_module(
125191                    "Option<MessageEntity>",
125192                    exported_module!(MessageEntityModule).into(),
125193                );
125194            engine
125195                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
125196                .register_static_module(
125197                    "Option<MessageOrigin>",
125198                    exported_module!(MessageOriginModule).into(),
125199                );
125200            engine
125201                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
125202                .build_type::<OrderInfo>()
125203                .register_static_module(
125204                    "Option<OrderInfo>",
125205                    exported_module!(OrderInfoModule).into(),
125206                );
125207            engine
125208                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
125209                .register_static_module(
125210                    "Option<PaidMedia>",
125211                    exported_module!(PaidMediaModule).into(),
125212                );
125213            engine
125214                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
125215                .build_type::<PaidMediaInfo>()
125216                .register_static_module(
125217                    "Option<PaidMediaInfo>",
125218                    exported_module!(PaidMediaInfoModule).into(),
125219                );
125220            engine
125221                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
125222                    "Option<PaidMessagePriceChanged>",
125223                )
125224                .build_type::<PaidMessagePriceChanged>()
125225                .register_static_module(
125226                    "Option<PaidMessagePriceChanged>",
125227                    exported_module!(PaidMessagePriceChangedModule).into(),
125228                );
125229            engine
125230                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
125231                .build_type::<PassportData>()
125232                .register_static_module(
125233                    "Option<PassportData>",
125234                    exported_module!(PassportDataModule).into(),
125235                );
125236            engine
125237                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
125238                .build_type::<PassportFile>()
125239                .register_static_module(
125240                    "Option<PassportFile>",
125241                    exported_module!(PassportFileModule).into(),
125242                );
125243            engine
125244                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
125245                .build_type::<PhotoSize>()
125246                .register_static_module(
125247                    "Option<PhotoSize>",
125248                    exported_module!(PhotoSizeModule).into(),
125249                );
125250            engine
125251                .register_type_with_name::<Option<Poll>>("Option<Poll>")
125252                .build_type::<Poll>()
125253                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
125254            engine
125255                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
125256                .build_type::<PollOption>()
125257                .register_static_module(
125258                    "Option<PollOption>",
125259                    exported_module!(PollOptionModule).into(),
125260                );
125261            engine
125262                .register_type_with_name::<Option<ProximityAlertTriggered>>(
125263                    "Option<ProximityAlertTriggered>",
125264                )
125265                .build_type::<ProximityAlertTriggered>()
125266                .register_static_module(
125267                    "Option<ProximityAlertTriggered>",
125268                    exported_module!(ProximityAlertTriggeredModule).into(),
125269                );
125270            engine
125271                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
125272                .build_type::<RefundedPayment>()
125273                .register_static_module(
125274                    "Option<RefundedPayment>",
125275                    exported_module!(RefundedPaymentModule).into(),
125276                );
125277            engine
125278                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
125279                .build_type::<SharedUser>()
125280                .register_static_module(
125281                    "Option<SharedUser>",
125282                    exported_module!(SharedUserModule).into(),
125283                );
125284            engine
125285                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
125286                .build_type::<ShippingAddress>()
125287                .register_static_module(
125288                    "Option<ShippingAddress>",
125289                    exported_module!(ShippingAddressModule).into(),
125290                );
125291            engine
125292                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
125293                .build_type::<StarAmount>()
125294                .register_static_module(
125295                    "Option<StarAmount>",
125296                    exported_module!(StarAmountModule).into(),
125297                );
125298            engine
125299                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
125300                .build_type::<Sticker>()
125301                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
125302            engine
125303                .register_type_with_name::<Option<Story>>("Option<Story>")
125304                .build_type::<Story>()
125305                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
125306            engine
125307                .register_type_with_name::<Option<String>>("Option<String>")
125308                .register_static_module("Option<String>", exported_module!(StringModule).into());
125309            engine
125310                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
125311                .build_type::<SuccessfulPayment>()
125312                .register_static_module(
125313                    "Option<SuccessfulPayment>",
125314                    exported_module!(SuccessfulPaymentModule).into(),
125315                );
125316            engine
125317                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
125318                    "Option<SuggestedPostApprovalFailed>",
125319                )
125320                .build_type::<SuggestedPostApprovalFailed>()
125321                .register_static_module(
125322                    "Option<SuggestedPostApprovalFailed>",
125323                    exported_module!(SuggestedPostApprovalFailedModule).into(),
125324                );
125325            engine
125326                .register_type_with_name::<Option<SuggestedPostApproved>>(
125327                    "Option<SuggestedPostApproved>",
125328                )
125329                .build_type::<SuggestedPostApproved>()
125330                .register_static_module(
125331                    "Option<SuggestedPostApproved>",
125332                    exported_module!(SuggestedPostApprovedModule).into(),
125333                );
125334            engine
125335                .register_type_with_name::<Option<SuggestedPostDeclined>>(
125336                    "Option<SuggestedPostDeclined>",
125337                )
125338                .build_type::<SuggestedPostDeclined>()
125339                .register_static_module(
125340                    "Option<SuggestedPostDeclined>",
125341                    exported_module!(SuggestedPostDeclinedModule).into(),
125342                );
125343            engine
125344                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
125345                .build_type::<SuggestedPostInfo>()
125346                .register_static_module(
125347                    "Option<SuggestedPostInfo>",
125348                    exported_module!(SuggestedPostInfoModule).into(),
125349                );
125350            engine
125351                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
125352                .build_type::<SuggestedPostPaid>()
125353                .register_static_module(
125354                    "Option<SuggestedPostPaid>",
125355                    exported_module!(SuggestedPostPaidModule).into(),
125356                );
125357            engine
125358                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
125359                .build_type::<SuggestedPostPrice>()
125360                .register_static_module(
125361                    "Option<SuggestedPostPrice>",
125362                    exported_module!(SuggestedPostPriceModule).into(),
125363                );
125364            engine
125365                .register_type_with_name::<Option<SuggestedPostRefunded>>(
125366                    "Option<SuggestedPostRefunded>",
125367                )
125368                .build_type::<SuggestedPostRefunded>()
125369                .register_static_module(
125370                    "Option<SuggestedPostRefunded>",
125371                    exported_module!(SuggestedPostRefundedModule).into(),
125372                );
125373            engine
125374                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
125375                    "Option<SwitchInlineQueryChosenChat>",
125376                )
125377                .build_type::<SwitchInlineQueryChosenChat>()
125378                .register_static_module(
125379                    "Option<SwitchInlineQueryChosenChat>",
125380                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
125381                );
125382            engine
125383                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
125384                .build_type::<TextQuote>()
125385                .register_static_module(
125386                    "Option<TextQuote>",
125387                    exported_module!(TextQuoteModule).into(),
125388                );
125389            engine
125390                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
125391                .build_type::<UniqueGift>()
125392                .register_static_module(
125393                    "Option<UniqueGift>",
125394                    exported_module!(UniqueGiftModule).into(),
125395                );
125396            engine
125397                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
125398                .build_type::<UniqueGiftBackdrop>()
125399                .register_static_module(
125400                    "Option<UniqueGiftBackdrop>",
125401                    exported_module!(UniqueGiftBackdropModule).into(),
125402                );
125403            engine
125404                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
125405                    "Option<UniqueGiftBackdropColors>",
125406                )
125407                .build_type::<UniqueGiftBackdropColors>()
125408                .register_static_module(
125409                    "Option<UniqueGiftBackdropColors>",
125410                    exported_module!(UniqueGiftBackdropColorsModule).into(),
125411                );
125412            engine
125413                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
125414                .build_type::<UniqueGiftInfo>()
125415                .register_static_module(
125416                    "Option<UniqueGiftInfo>",
125417                    exported_module!(UniqueGiftInfoModule).into(),
125418                );
125419            engine
125420                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
125421                .build_type::<UniqueGiftModel>()
125422                .register_static_module(
125423                    "Option<UniqueGiftModel>",
125424                    exported_module!(UniqueGiftModelModule).into(),
125425                );
125426            engine
125427                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
125428                .build_type::<UniqueGiftSymbol>()
125429                .register_static_module(
125430                    "Option<UniqueGiftSymbol>",
125431                    exported_module!(UniqueGiftSymbolModule).into(),
125432                );
125433            engine
125434                .register_type_with_name::<Option<User>>("Option<User>")
125435                .build_type::<User>()
125436                .register_static_module("Option<User>", exported_module!(UserModule).into());
125437            engine
125438                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
125439                .build_type::<UsersShared>()
125440                .register_static_module(
125441                    "Option<UsersShared>",
125442                    exported_module!(UsersSharedModule).into(),
125443                );
125444            engine
125445                .register_type_with_name::<Option<Venue>>("Option<Venue>")
125446                .build_type::<Venue>()
125447                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
125448            engine
125449                .register_type_with_name::<Option<Video>>("Option<Video>")
125450                .build_type::<Video>()
125451                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
125452            engine
125453                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
125454                .build_type::<VideoChatEnded>()
125455                .register_static_module(
125456                    "Option<VideoChatEnded>",
125457                    exported_module!(VideoChatEndedModule).into(),
125458                );
125459            engine
125460                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
125461                    "Option<VideoChatParticipantsInvited>",
125462                )
125463                .build_type::<VideoChatParticipantsInvited>()
125464                .register_static_module(
125465                    "Option<VideoChatParticipantsInvited>",
125466                    exported_module!(VideoChatParticipantsInvitedModule).into(),
125467                );
125468            engine
125469                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
125470                .build_type::<VideoChatScheduled>()
125471                .register_static_module(
125472                    "Option<VideoChatScheduled>",
125473                    exported_module!(VideoChatScheduledModule).into(),
125474                );
125475            engine
125476                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
125477                .build_type::<VideoChatStarted>()
125478                .register_static_module(
125479                    "Option<VideoChatStarted>",
125480                    exported_module!(VideoChatStartedModule).into(),
125481                );
125482            engine
125483                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
125484                .build_type::<VideoNote>()
125485                .register_static_module(
125486                    "Option<VideoNote>",
125487                    exported_module!(VideoNoteModule).into(),
125488                );
125489            engine
125490                .register_type_with_name::<Option<Voice>>("Option<Voice>")
125491                .build_type::<Voice>()
125492                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
125493            engine
125494                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
125495                .build_type::<WebAppData>()
125496                .register_static_module(
125497                    "Option<WebAppData>",
125498                    exported_module!(WebAppDataModule).into(),
125499                );
125500            engine
125501                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
125502                .build_type::<WebAppInfo>()
125503                .register_static_module(
125504                    "Option<WebAppInfo>",
125505                    exported_module!(WebAppInfoModule).into(),
125506                );
125507            engine
125508                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
125509                .build_type::<WriteAccessAllowed>()
125510                .register_static_module(
125511                    "Option<WriteAccessAllowed>",
125512                    exported_module!(WriteAccessAllowedModule).into(),
125513                );
125514        }
125515    }
125516    #[cfg(feature = "rhai")]
125517    #[allow(unused_mut)]
125518    impl rhai::CustomType for GiveawayCompleted {
125519        fn build(mut builder: rhai::TypeBuilder<Self>) {
125520            builder.with_get("winner_count", Self::rhai_get_winner_count);
125521            builder.with_get(
125522                "unclaimed_prize_count",
125523                Self::rhai_get_unclaimed_prize_count,
125524            );
125525            builder.with_get("giveaway_message", Self::rhai_get_giveaway_message);
125526            builder.with_get("is_star_giveaway", Self::rhai_get_is_star_giveaway);
125527            builder.on_debug(|t| format!("{:?}", t));
125528            drop(builder);
125529        }
125530    }
125531    #[cfg(feature = "rhai")]
125532    impl SetupRhai for ReplyKeyboardMarkup {
125533        fn setup_rhai(engine: &mut rhai::Engine) {
125534            engine.build_type::<ReplyKeyboardMarkup>();
125535            engine
125536                .register_type_with_name::<Option<bool>>("Option<bool>")
125537                .register_static_module("Option<bool>", exported_module!(boolModule).into());
125538            engine
125539                .register_type_with_name::<Option<ChatAdministratorRights>>(
125540                    "Option<ChatAdministratorRights>",
125541                )
125542                .build_type::<ChatAdministratorRights>()
125543                .register_static_module(
125544                    "Option<ChatAdministratorRights>",
125545                    exported_module!(ChatAdministratorRightsModule).into(),
125546                );
125547            engine
125548                .register_type_with_name::<Option<i64>>("Option<i64>")
125549                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125550            engine
125551                .register_type_with_name::<Option<KeyboardButton>>("Option<KeyboardButton>")
125552                .build_type::<KeyboardButton>()
125553                .register_static_module(
125554                    "Option<KeyboardButton>",
125555                    exported_module!(KeyboardButtonModule).into(),
125556                );
125557            engine
125558                .register_type_with_name::<Option<KeyboardButtonPollType>>(
125559                    "Option<KeyboardButtonPollType>",
125560                )
125561                .build_type::<KeyboardButtonPollType>()
125562                .register_static_module(
125563                    "Option<KeyboardButtonPollType>",
125564                    exported_module!(KeyboardButtonPollTypeModule).into(),
125565                );
125566            engine
125567                .register_type_with_name::<Option<KeyboardButtonRequestChat>>(
125568                    "Option<KeyboardButtonRequestChat>",
125569                )
125570                .build_type::<KeyboardButtonRequestChat>()
125571                .register_static_module(
125572                    "Option<KeyboardButtonRequestChat>",
125573                    exported_module!(KeyboardButtonRequestChatModule).into(),
125574                );
125575            engine
125576                .register_type_with_name::<Option<KeyboardButtonRequestUsers>>(
125577                    "Option<KeyboardButtonRequestUsers>",
125578                )
125579                .build_type::<KeyboardButtonRequestUsers>()
125580                .register_static_module(
125581                    "Option<KeyboardButtonRequestUsers>",
125582                    exported_module!(KeyboardButtonRequestUsersModule).into(),
125583                );
125584            engine
125585                .register_type_with_name::<Option<String>>("Option<String>")
125586                .register_static_module("Option<String>", exported_module!(StringModule).into());
125587            engine
125588                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
125589                .build_type::<WebAppInfo>()
125590                .register_static_module(
125591                    "Option<WebAppInfo>",
125592                    exported_module!(WebAppInfoModule).into(),
125593                );
125594        }
125595    }
125596    #[cfg(feature = "rhai")]
125597    #[allow(unused_mut)]
125598    impl rhai::CustomType for ReplyKeyboardMarkup {
125599        fn build(mut builder: rhai::TypeBuilder<Self>) {
125600            builder.with_get("keyboard", Self::rhai_get_keyboard);
125601            builder.with_get("is_persistent", Self::rhai_get_is_persistent);
125602            builder.with_get("resize_keyboard", Self::rhai_get_resize_keyboard);
125603            builder.with_get("one_time_keyboard", Self::rhai_get_one_time_keyboard);
125604            builder.with_get(
125605                "input_field_placeholder",
125606                Self::rhai_get_input_field_placeholder,
125607            );
125608            builder.with_get("selective", Self::rhai_get_selective);
125609            builder.on_debug(|t| format!("{:?}", t));
125610            drop(builder);
125611        }
125612    }
125613    #[cfg(feature = "rhai")]
125614    impl SetupRhai for InlineQueryResultCachedAudio {
125615        fn setup_rhai(engine: &mut rhai::Engine) {
125616            engine.build_type::<InlineQueryResultCachedAudio>();
125617            engine
125618                .register_type_with_name::<Option<bool>>("Option<bool>")
125619                .register_static_module("Option<bool>", exported_module!(boolModule).into());
125620            engine
125621                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
125622                .build_type::<CallbackGame>()
125623                .register_static_module(
125624                    "Option<CallbackGame>",
125625                    exported_module!(CallbackGameModule).into(),
125626                );
125627            engine
125628                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
125629                .build_type::<CopyTextButton>()
125630                .register_static_module(
125631                    "Option<CopyTextButton>",
125632                    exported_module!(CopyTextButtonModule).into(),
125633                );
125634            engine
125635                .register_type_with_name::<Option<InlineKeyboardButton>>(
125636                    "Option<InlineKeyboardButton>",
125637                )
125638                .build_type::<InlineKeyboardButton>()
125639                .register_static_module(
125640                    "Option<InlineKeyboardButton>",
125641                    exported_module!(InlineKeyboardButtonModule).into(),
125642                );
125643            engine
125644                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
125645                    "Option<InlineKeyboardMarkup>",
125646                )
125647                .build_type::<InlineKeyboardMarkup>()
125648                .register_static_module(
125649                    "Option<InlineKeyboardMarkup>",
125650                    exported_module!(InlineKeyboardMarkupModule).into(),
125651                );
125652            engine
125653                .register_type_with_name::<Option<InputMessageContent>>(
125654                    "Option<InputMessageContent>",
125655                )
125656                .register_static_module(
125657                    "Option<InputMessageContent>",
125658                    exported_module!(InputMessageContentModule).into(),
125659                );
125660            engine
125661                .register_type_with_name::<Option<i64>>("Option<i64>")
125662                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125663            engine
125664                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
125665                .build_type::<LoginUrl>()
125666                .register_static_module(
125667                    "Option<LoginUrl>",
125668                    exported_module!(LoginUrlModule).into(),
125669                );
125670            engine
125671                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
125672                .build_type::<MessageEntity>()
125673                .register_static_module(
125674                    "Option<MessageEntity>",
125675                    exported_module!(MessageEntityModule).into(),
125676                );
125677            engine
125678                .register_type_with_name::<Option<String>>("Option<String>")
125679                .register_static_module("Option<String>", exported_module!(StringModule).into());
125680            engine
125681                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
125682                    "Option<SwitchInlineQueryChosenChat>",
125683                )
125684                .build_type::<SwitchInlineQueryChosenChat>()
125685                .register_static_module(
125686                    "Option<SwitchInlineQueryChosenChat>",
125687                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
125688                );
125689            engine
125690                .register_type_with_name::<Option<User>>("Option<User>")
125691                .build_type::<User>()
125692                .register_static_module("Option<User>", exported_module!(UserModule).into());
125693            engine
125694                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
125695                .build_type::<WebAppInfo>()
125696                .register_static_module(
125697                    "Option<WebAppInfo>",
125698                    exported_module!(WebAppInfoModule).into(),
125699                );
125700        }
125701    }
125702    #[cfg(feature = "rhai")]
125703    #[allow(unused_mut)]
125704    impl rhai::CustomType for InlineQueryResultCachedAudio {
125705        fn build(mut builder: rhai::TypeBuilder<Self>) {
125706            builder.with_get("tg_type", Self::rhai_get_tg_type);
125707            builder.with_get("id", Self::rhai_get_id);
125708            builder.with_get("audio_file_id", Self::rhai_get_audio_file_id);
125709            builder.with_get("caption", Self::rhai_get_caption);
125710            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
125711            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
125712            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
125713            builder.with_get(
125714                "input_message_content",
125715                Self::rhai_get_input_message_content,
125716            );
125717            builder.on_debug(|t| format!("{:?}", t));
125718            drop(builder);
125719        }
125720    }
125721    #[cfg(feature = "rhai")]
125722    impl SetupRhai for CopyTextButton {
125723        fn setup_rhai(engine: &mut rhai::Engine) {
125724            engine.build_type::<CopyTextButton>();
125725            engine
125726                .register_type_with_name::<Option<String>>("Option<String>")
125727                .register_static_module("Option<String>", exported_module!(StringModule).into());
125728        }
125729    }
125730    #[cfg(feature = "rhai")]
125731    #[allow(unused_mut)]
125732    impl rhai::CustomType for CopyTextButton {
125733        fn build(mut builder: rhai::TypeBuilder<Self>) {
125734            builder.with_get("text", Self::rhai_get_text);
125735            builder.on_debug(|t| format!("{:?}", t));
125736            drop(builder);
125737        }
125738    }
125739    #[cfg(feature = "rhai")]
125740    impl SetupRhai for BackgroundTypeWallpaper {
125741        fn setup_rhai(engine: &mut rhai::Engine) {
125742            engine.build_type::<BackgroundTypeWallpaper>();
125743            engine
125744                .register_type_with_name::<Option<bool>>("Option<bool>")
125745                .register_static_module("Option<bool>", exported_module!(boolModule).into());
125746            engine
125747                .register_type_with_name::<Option<Document>>("Option<Document>")
125748                .build_type::<Document>()
125749                .register_static_module(
125750                    "Option<Document>",
125751                    exported_module!(DocumentModule).into(),
125752                );
125753            engine
125754                .register_type_with_name::<Option<i64>>("Option<i64>")
125755                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125756            engine
125757                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
125758                .build_type::<PhotoSize>()
125759                .register_static_module(
125760                    "Option<PhotoSize>",
125761                    exported_module!(PhotoSizeModule).into(),
125762                );
125763            engine
125764                .register_type_with_name::<Option<String>>("Option<String>")
125765                .register_static_module("Option<String>", exported_module!(StringModule).into());
125766        }
125767    }
125768    #[cfg(feature = "rhai")]
125769    #[allow(unused_mut)]
125770    impl rhai::CustomType for BackgroundTypeWallpaper {
125771        fn build(mut builder: rhai::TypeBuilder<Self>) {
125772            builder.with_get("tg_type", Self::rhai_get_tg_type);
125773            builder.with_get("document", Self::rhai_get_document);
125774            builder.with_get("dark_theme_dimming", Self::rhai_get_dark_theme_dimming);
125775            builder.with_get("is_blurred", Self::rhai_get_is_blurred);
125776            builder.with_get("is_moving", Self::rhai_get_is_moving);
125777            builder.on_debug(|t| format!("{:?}", t));
125778            drop(builder);
125779        }
125780    }
125781    #[cfg(feature = "rhai")]
125782    impl SetupRhai for ForumTopic {
125783        fn setup_rhai(engine: &mut rhai::Engine) {
125784            engine.build_type::<ForumTopic>();
125785            engine
125786                .register_type_with_name::<Option<i64>>("Option<i64>")
125787                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125788            engine
125789                .register_type_with_name::<Option<String>>("Option<String>")
125790                .register_static_module("Option<String>", exported_module!(StringModule).into());
125791        }
125792    }
125793    #[cfg(feature = "rhai")]
125794    #[allow(unused_mut)]
125795    impl rhai::CustomType for ForumTopic {
125796        fn build(mut builder: rhai::TypeBuilder<Self>) {
125797            builder.with_get("message_thread_id", Self::rhai_get_message_thread_id);
125798            builder.with_get("name", Self::rhai_get_name);
125799            builder.with_get("icon_color", Self::rhai_get_icon_color);
125800            builder.with_get("icon_custom_emoji_id", Self::rhai_get_icon_custom_emoji_id);
125801            builder.on_debug(|t| format!("{:?}", t));
125802            drop(builder);
125803        }
125804    }
125805    #[cfg(feature = "rhai")]
125806    impl SetupRhai for InputContactMessageContent {
125807        fn setup_rhai(engine: &mut rhai::Engine) {
125808            engine.build_type::<InputContactMessageContent>();
125809            engine
125810                .register_type_with_name::<Option<String>>("Option<String>")
125811                .register_static_module("Option<String>", exported_module!(StringModule).into());
125812        }
125813    }
125814    #[cfg(feature = "rhai")]
125815    #[allow(unused_mut)]
125816    impl rhai::CustomType for InputContactMessageContent {
125817        fn build(mut builder: rhai::TypeBuilder<Self>) {
125818            builder.with_get("phone_number", Self::rhai_get_phone_number);
125819            builder.with_get("first_name", Self::rhai_get_first_name);
125820            builder.with_get("last_name", Self::rhai_get_last_name);
125821            builder.with_get("vcard", Self::rhai_get_vcard);
125822            builder.on_debug(|t| format!("{:?}", t));
125823            drop(builder);
125824        }
125825    }
125826    #[cfg(feature = "rhai")]
125827    impl SetupRhai for ReplyParameters {
125828        fn setup_rhai(engine: &mut rhai::Engine) {
125829            engine.build_type::<ReplyParameters>();
125830            engine
125831                .register_type_with_name::<Option<bool>>("Option<bool>")
125832                .register_static_module("Option<bool>", exported_module!(boolModule).into());
125833            engine
125834                .register_type_with_name::<Option<i64>>("Option<i64>")
125835                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125836            engine
125837                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
125838                .build_type::<MessageEntity>()
125839                .register_static_module(
125840                    "Option<MessageEntity>",
125841                    exported_module!(MessageEntityModule).into(),
125842                );
125843            engine
125844                .register_type_with_name::<Option<String>>("Option<String>")
125845                .register_static_module("Option<String>", exported_module!(StringModule).into());
125846            engine
125847                .register_type_with_name::<Option<User>>("Option<User>")
125848                .build_type::<User>()
125849                .register_static_module("Option<User>", exported_module!(UserModule).into());
125850        }
125851    }
125852    #[cfg(feature = "rhai")]
125853    #[allow(unused_mut)]
125854    impl rhai::CustomType for ReplyParameters {
125855        fn build(mut builder: rhai::TypeBuilder<Self>) {
125856            builder.with_get("message_id", Self::rhai_get_message_id);
125857            builder.with_get("chat_id", Self::rhai_get_chat_id);
125858            builder.with_get(
125859                "allow_sending_without_reply",
125860                Self::rhai_get_allow_sending_without_reply,
125861            );
125862            builder.with_get("quote", Self::rhai_get_quote);
125863            builder.with_get("quote_parse_mode", Self::rhai_get_quote_parse_mode);
125864            builder.with_get("quote_entities", Self::rhai_get_quote_entities);
125865            builder.with_get("quote_position", Self::rhai_get_quote_position);
125866            builder.with_get("checklist_task_id", Self::rhai_get_checklist_task_id);
125867            builder.on_debug(|t| format!("{:?}", t));
125868            drop(builder);
125869        }
125870    }
125871    #[cfg(feature = "rhai")]
125872    impl SetupRhai for InputMediaDocument {
125873        fn setup_rhai(engine: &mut rhai::Engine) {
125874            engine.build_type::<InputMediaDocument>();
125875            engine
125876                .register_type_with_name::<Option<bool>>("Option<bool>")
125877                .register_static_module("Option<bool>", exported_module!(boolModule).into());
125878            engine
125879                .register_type_with_name::<Option<i64>>("Option<i64>")
125880                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125881            engine
125882                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
125883                .build_type::<MessageEntity>()
125884                .register_static_module(
125885                    "Option<MessageEntity>",
125886                    exported_module!(MessageEntityModule).into(),
125887                );
125888            engine
125889                .register_type_with_name::<Option<String>>("Option<String>")
125890                .register_static_module("Option<String>", exported_module!(StringModule).into());
125891            engine
125892                .register_type_with_name::<Option<User>>("Option<User>")
125893                .build_type::<User>()
125894                .register_static_module("Option<User>", exported_module!(UserModule).into());
125895        }
125896    }
125897    #[cfg(feature = "rhai")]
125898    #[allow(unused_mut)]
125899    impl rhai::CustomType for InputMediaDocument {
125900        fn build(mut builder: rhai::TypeBuilder<Self>) {
125901            builder.with_get("tg_type", Self::rhai_get_tg_type);
125902            builder.with_get("media", Self::rhai_get_media);
125903            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
125904            builder.with_get("caption", Self::rhai_get_caption);
125905            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
125906            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
125907            builder.with_get(
125908                "disable_content_type_detection",
125909                Self::rhai_get_disable_content_type_detection,
125910            );
125911            builder.on_debug(|t| format!("{:?}", t));
125912            drop(builder);
125913        }
125914    }
125915    #[cfg(feature = "rhai")]
125916    impl SetupRhai for BusinessIntro {
125917        fn setup_rhai(engine: &mut rhai::Engine) {
125918            engine.build_type::<BusinessIntro>();
125919            engine
125920                .register_type_with_name::<Option<bool>>("Option<bool>")
125921                .register_static_module("Option<bool>", exported_module!(boolModule).into());
125922            engine
125923                .register_type_with_name::<Option<File>>("Option<File>")
125924                .build_type::<File>()
125925                .register_static_module("Option<File>", exported_module!(FileModule).into());
125926            engine
125927                .register_type_with_name::<Option<f64>>("Option<f64>")
125928                .register_static_module("Option<f64>", exported_module!(f64Module).into());
125929            engine
125930                .register_type_with_name::<Option<i64>>("Option<i64>")
125931                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125932            engine
125933                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
125934                .build_type::<MaskPosition>()
125935                .register_static_module(
125936                    "Option<MaskPosition>",
125937                    exported_module!(MaskPositionModule).into(),
125938                );
125939            engine
125940                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
125941                .build_type::<PhotoSize>()
125942                .register_static_module(
125943                    "Option<PhotoSize>",
125944                    exported_module!(PhotoSizeModule).into(),
125945                );
125946            engine
125947                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
125948                .build_type::<Sticker>()
125949                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
125950            engine
125951                .register_type_with_name::<Option<String>>("Option<String>")
125952                .register_static_module("Option<String>", exported_module!(StringModule).into());
125953        }
125954    }
125955    #[cfg(feature = "rhai")]
125956    #[allow(unused_mut)]
125957    impl rhai::CustomType for BusinessIntro {
125958        fn build(mut builder: rhai::TypeBuilder<Self>) {
125959            builder.with_get("title", Self::rhai_get_title);
125960            builder.with_get("message", Self::rhai_get_message);
125961            builder.with_get("sticker", Self::rhai_get_sticker);
125962            builder.on_debug(|t| format!("{:?}", t));
125963            drop(builder);
125964        }
125965    }
125966    #[cfg(feature = "rhai")]
125967    impl SetupRhai for GiveawayCreated {
125968        fn setup_rhai(engine: &mut rhai::Engine) {
125969            engine.build_type::<GiveawayCreated>();
125970            engine
125971                .register_type_with_name::<Option<i64>>("Option<i64>")
125972                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125973        }
125974    }
125975    #[cfg(feature = "rhai")]
125976    #[allow(unused_mut)]
125977    impl rhai::CustomType for GiveawayCreated {
125978        fn build(mut builder: rhai::TypeBuilder<Self>) {
125979            builder.with_get("prize_star_count", Self::rhai_get_prize_star_count);
125980            builder.on_debug(|t| format!("{:?}", t));
125981            drop(builder);
125982        }
125983    }
125984    #[cfg(feature = "rhai")]
125985    impl SetupRhai for ChatMemberAdministrator {
125986        fn setup_rhai(engine: &mut rhai::Engine) {
125987            engine.build_type::<ChatMemberAdministrator>();
125988            engine
125989                .register_type_with_name::<Option<bool>>("Option<bool>")
125990                .register_static_module("Option<bool>", exported_module!(boolModule).into());
125991            engine
125992                .register_type_with_name::<Option<i64>>("Option<i64>")
125993                .register_static_module("Option<i64>", exported_module!(i64Module).into());
125994            engine
125995                .register_type_with_name::<Option<String>>("Option<String>")
125996                .register_static_module("Option<String>", exported_module!(StringModule).into());
125997            engine
125998                .register_type_with_name::<Option<User>>("Option<User>")
125999                .build_type::<User>()
126000                .register_static_module("Option<User>", exported_module!(UserModule).into());
126001        }
126002    }
126003    #[cfg(feature = "rhai")]
126004    #[allow(unused_mut)]
126005    impl rhai::CustomType for ChatMemberAdministrator {
126006        fn build(mut builder: rhai::TypeBuilder<Self>) {
126007            builder.with_get("user", Self::rhai_get_user);
126008            builder.with_get("can_be_edited", Self::rhai_get_can_be_edited);
126009            builder.with_get("is_anonymous", Self::rhai_get_is_anonymous);
126010            builder.with_get("can_manage_chat", Self::rhai_get_can_manage_chat);
126011            builder.with_get("can_delete_messages", Self::rhai_get_can_delete_messages);
126012            builder.with_get(
126013                "can_manage_video_chats",
126014                Self::rhai_get_can_manage_video_chats,
126015            );
126016            builder.with_get("can_restrict_members", Self::rhai_get_can_restrict_members);
126017            builder.with_get("can_promote_members", Self::rhai_get_can_promote_members);
126018            builder.with_get("can_change_info", Self::rhai_get_can_change_info);
126019            builder.with_get("can_invite_users", Self::rhai_get_can_invite_users);
126020            builder.with_get("can_post_stories", Self::rhai_get_can_post_stories);
126021            builder.with_get("can_edit_stories", Self::rhai_get_can_edit_stories);
126022            builder.with_get("can_delete_stories", Self::rhai_get_can_delete_stories);
126023            builder.with_get("can_post_messages", Self::rhai_get_can_post_messages);
126024            builder.with_get("can_edit_messages", Self::rhai_get_can_edit_messages);
126025            builder.with_get("can_pin_messages", Self::rhai_get_can_pin_messages);
126026            builder.with_get("can_manage_topics", Self::rhai_get_can_manage_topics);
126027            builder.with_get(
126028                "can_manage_direct_messages",
126029                Self::rhai_get_can_manage_direct_messages,
126030            );
126031            builder.with_get("custom_title", Self::rhai_get_custom_title);
126032            builder.on_debug(|t| format!("{:?}", t));
126033            drop(builder);
126034        }
126035    }
126036    #[cfg(feature = "rhai")]
126037    impl SetupRhai for InlineQueryResultGif {
126038        fn setup_rhai(engine: &mut rhai::Engine) {
126039            engine.build_type::<InlineQueryResultGif>();
126040            engine
126041                .register_type_with_name::<Option<bool>>("Option<bool>")
126042                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126043            engine
126044                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
126045                .build_type::<CallbackGame>()
126046                .register_static_module(
126047                    "Option<CallbackGame>",
126048                    exported_module!(CallbackGameModule).into(),
126049                );
126050            engine
126051                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
126052                .build_type::<CopyTextButton>()
126053                .register_static_module(
126054                    "Option<CopyTextButton>",
126055                    exported_module!(CopyTextButtonModule).into(),
126056                );
126057            engine
126058                .register_type_with_name::<Option<InlineKeyboardButton>>(
126059                    "Option<InlineKeyboardButton>",
126060                )
126061                .build_type::<InlineKeyboardButton>()
126062                .register_static_module(
126063                    "Option<InlineKeyboardButton>",
126064                    exported_module!(InlineKeyboardButtonModule).into(),
126065                );
126066            engine
126067                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
126068                    "Option<InlineKeyboardMarkup>",
126069                )
126070                .build_type::<InlineKeyboardMarkup>()
126071                .register_static_module(
126072                    "Option<InlineKeyboardMarkup>",
126073                    exported_module!(InlineKeyboardMarkupModule).into(),
126074                );
126075            engine
126076                .register_type_with_name::<Option<InputMessageContent>>(
126077                    "Option<InputMessageContent>",
126078                )
126079                .register_static_module(
126080                    "Option<InputMessageContent>",
126081                    exported_module!(InputMessageContentModule).into(),
126082                );
126083            engine
126084                .register_type_with_name::<Option<i64>>("Option<i64>")
126085                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126086            engine
126087                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
126088                .build_type::<LoginUrl>()
126089                .register_static_module(
126090                    "Option<LoginUrl>",
126091                    exported_module!(LoginUrlModule).into(),
126092                );
126093            engine
126094                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
126095                .build_type::<MessageEntity>()
126096                .register_static_module(
126097                    "Option<MessageEntity>",
126098                    exported_module!(MessageEntityModule).into(),
126099                );
126100            engine
126101                .register_type_with_name::<Option<String>>("Option<String>")
126102                .register_static_module("Option<String>", exported_module!(StringModule).into());
126103            engine
126104                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
126105                    "Option<SwitchInlineQueryChosenChat>",
126106                )
126107                .build_type::<SwitchInlineQueryChosenChat>()
126108                .register_static_module(
126109                    "Option<SwitchInlineQueryChosenChat>",
126110                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
126111                );
126112            engine
126113                .register_type_with_name::<Option<User>>("Option<User>")
126114                .build_type::<User>()
126115                .register_static_module("Option<User>", exported_module!(UserModule).into());
126116            engine
126117                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
126118                .build_type::<WebAppInfo>()
126119                .register_static_module(
126120                    "Option<WebAppInfo>",
126121                    exported_module!(WebAppInfoModule).into(),
126122                );
126123        }
126124    }
126125    #[cfg(feature = "rhai")]
126126    #[allow(unused_mut)]
126127    impl rhai::CustomType for InlineQueryResultGif {
126128        fn build(mut builder: rhai::TypeBuilder<Self>) {
126129            builder.with_get("tg_type", Self::rhai_get_tg_type);
126130            builder.with_get("id", Self::rhai_get_id);
126131            builder.with_get("gif_url", Self::rhai_get_gif_url);
126132            builder.with_get("gif_width", Self::rhai_get_gif_width);
126133            builder.with_get("gif_height", Self::rhai_get_gif_height);
126134            builder.with_get("gif_duration", Self::rhai_get_gif_duration);
126135            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
126136            builder.with_get("thumbnail_mime_type", Self::rhai_get_thumbnail_mime_type);
126137            builder.with_get("title", Self::rhai_get_title);
126138            builder.with_get("caption", Self::rhai_get_caption);
126139            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
126140            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
126141            builder.with_get(
126142                "show_caption_above_media",
126143                Self::rhai_get_show_caption_above_media,
126144            );
126145            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
126146            builder.with_get(
126147                "input_message_content",
126148                Self::rhai_get_input_message_content,
126149            );
126150            builder.on_debug(|t| format!("{:?}", t));
126151            drop(builder);
126152        }
126153    }
126154    #[cfg(feature = "rhai")]
126155    impl SetupRhai for InputProfilePhotoAnimated {
126156        fn setup_rhai(engine: &mut rhai::Engine) {
126157            engine.build_type::<InputProfilePhotoAnimated>();
126158            engine
126159                .register_type_with_name::<Option<f64>>("Option<f64>")
126160                .register_static_module("Option<f64>", exported_module!(f64Module).into());
126161            engine
126162                .register_type_with_name::<Option<String>>("Option<String>")
126163                .register_static_module("Option<String>", exported_module!(StringModule).into());
126164        }
126165    }
126166    #[cfg(feature = "rhai")]
126167    #[allow(unused_mut)]
126168    impl rhai::CustomType for InputProfilePhotoAnimated {
126169        fn build(mut builder: rhai::TypeBuilder<Self>) {
126170            builder.with_get("tg_type", Self::rhai_get_tg_type);
126171            builder.with_get("animation", Self::rhai_get_animation);
126172            builder.with_get("main_frame_timestamp", Self::rhai_get_main_frame_timestamp);
126173            builder.on_debug(|t| format!("{:?}", t));
126174            drop(builder);
126175        }
126176    }
126177    #[cfg(feature = "rhai")]
126178    impl SetupRhai for VideoChatParticipantsInvited {
126179        fn setup_rhai(engine: &mut rhai::Engine) {
126180            engine.build_type::<VideoChatParticipantsInvited>();
126181            engine
126182                .register_type_with_name::<Option<bool>>("Option<bool>")
126183                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126184            engine
126185                .register_type_with_name::<Option<i64>>("Option<i64>")
126186                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126187            engine
126188                .register_type_with_name::<Option<String>>("Option<String>")
126189                .register_static_module("Option<String>", exported_module!(StringModule).into());
126190            engine
126191                .register_type_with_name::<Option<User>>("Option<User>")
126192                .build_type::<User>()
126193                .register_static_module("Option<User>", exported_module!(UserModule).into());
126194        }
126195    }
126196    #[cfg(feature = "rhai")]
126197    #[allow(unused_mut)]
126198    impl rhai::CustomType for VideoChatParticipantsInvited {
126199        fn build(mut builder: rhai::TypeBuilder<Self>) {
126200            builder.with_get("users", Self::rhai_get_users);
126201            builder.on_debug(|t| format!("{:?}", t));
126202            drop(builder);
126203        }
126204    }
126205    #[cfg(feature = "rhai")]
126206    impl SetupRhai for LoginUrl {
126207        fn setup_rhai(engine: &mut rhai::Engine) {
126208            engine.build_type::<LoginUrl>();
126209            engine
126210                .register_type_with_name::<Option<bool>>("Option<bool>")
126211                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126212            engine
126213                .register_type_with_name::<Option<String>>("Option<String>")
126214                .register_static_module("Option<String>", exported_module!(StringModule).into());
126215        }
126216    }
126217    #[cfg(feature = "rhai")]
126218    #[allow(unused_mut)]
126219    impl rhai::CustomType for LoginUrl {
126220        fn build(mut builder: rhai::TypeBuilder<Self>) {
126221            builder.with_get("url", Self::rhai_get_url);
126222            builder.with_get("forward_text", Self::rhai_get_forward_text);
126223            builder.with_get("bot_username", Self::rhai_get_bot_username);
126224            builder.with_get("request_write_access", Self::rhai_get_request_write_access);
126225            builder.on_debug(|t| format!("{:?}", t));
126226            drop(builder);
126227        }
126228    }
126229    #[cfg(feature = "rhai")]
126230    impl SetupRhai for ChosenInlineResult {
126231        fn setup_rhai(engine: &mut rhai::Engine) {
126232            engine.build_type::<ChosenInlineResult>();
126233            engine
126234                .register_type_with_name::<Option<bool>>("Option<bool>")
126235                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126236            engine
126237                .register_type_with_name::<Option<f64>>("Option<f64>")
126238                .register_static_module("Option<f64>", exported_module!(f64Module).into());
126239            engine
126240                .register_type_with_name::<Option<i64>>("Option<i64>")
126241                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126242            engine
126243                .register_type_with_name::<Option<Location>>("Option<Location>")
126244                .build_type::<Location>()
126245                .register_static_module(
126246                    "Option<Location>",
126247                    exported_module!(LocationModule).into(),
126248                );
126249            engine
126250                .register_type_with_name::<Option<String>>("Option<String>")
126251                .register_static_module("Option<String>", exported_module!(StringModule).into());
126252            engine
126253                .register_type_with_name::<Option<User>>("Option<User>")
126254                .build_type::<User>()
126255                .register_static_module("Option<User>", exported_module!(UserModule).into());
126256        }
126257    }
126258    #[cfg(feature = "rhai")]
126259    #[allow(unused_mut)]
126260    impl rhai::CustomType for ChosenInlineResult {
126261        fn build(mut builder: rhai::TypeBuilder<Self>) {
126262            builder.with_get("result_id", Self::rhai_get_result_id);
126263            builder.with_get("from", Self::rhai_get_from);
126264            builder.with_get("location", Self::rhai_get_location);
126265            builder.with_get("inline_message_id", Self::rhai_get_inline_message_id);
126266            builder.with_get("query", Self::rhai_get_query);
126267            builder.on_debug(|t| format!("{:?}", t));
126268            drop(builder);
126269        }
126270    }
126271    #[cfg(feature = "rhai")]
126272    impl SetupRhai for PassportElementErrorUnspecified {
126273        fn setup_rhai(engine: &mut rhai::Engine) {
126274            engine.build_type::<PassportElementErrorUnspecified>();
126275            engine
126276                .register_type_with_name::<Option<String>>("Option<String>")
126277                .register_static_module("Option<String>", exported_module!(StringModule).into());
126278        }
126279    }
126280    #[cfg(feature = "rhai")]
126281    #[allow(unused_mut)]
126282    impl rhai::CustomType for PassportElementErrorUnspecified {
126283        fn build(mut builder: rhai::TypeBuilder<Self>) {
126284            builder.with_get("source", Self::rhai_get_source);
126285            builder.with_get("tg_type", Self::rhai_get_tg_type);
126286            builder.with_get("element_hash", Self::rhai_get_element_hash);
126287            builder.with_get("message", Self::rhai_get_message);
126288            builder.on_debug(|t| format!("{:?}", t));
126289            drop(builder);
126290        }
126291    }
126292    #[cfg(feature = "rhai")]
126293    impl SetupRhai for MenuButtonWebApp {
126294        fn setup_rhai(engine: &mut rhai::Engine) {
126295            engine.build_type::<MenuButtonWebApp>();
126296            engine
126297                .register_type_with_name::<Option<String>>("Option<String>")
126298                .register_static_module("Option<String>", exported_module!(StringModule).into());
126299            engine
126300                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
126301                .build_type::<WebAppInfo>()
126302                .register_static_module(
126303                    "Option<WebAppInfo>",
126304                    exported_module!(WebAppInfoModule).into(),
126305                );
126306        }
126307    }
126308    #[cfg(feature = "rhai")]
126309    #[allow(unused_mut)]
126310    impl rhai::CustomType for MenuButtonWebApp {
126311        fn build(mut builder: rhai::TypeBuilder<Self>) {
126312            builder.with_get("tg_type", Self::rhai_get_tg_type);
126313            builder.with_get("text", Self::rhai_get_text);
126314            builder.with_get("web_app", Self::rhai_get_web_app);
126315            builder.on_debug(|t| format!("{:?}", t));
126316            drop(builder);
126317        }
126318    }
126319    #[cfg(feature = "rhai")]
126320    impl SetupRhai for UserChatBoosts {
126321        fn setup_rhai(engine: &mut rhai::Engine) {
126322            engine.build_type::<UserChatBoosts>();
126323            engine
126324                .register_type_with_name::<Option<ChatBoost>>("Option<ChatBoost>")
126325                .build_type::<ChatBoost>()
126326                .register_static_module(
126327                    "Option<ChatBoost>",
126328                    exported_module!(ChatBoostModule).into(),
126329                );
126330            engine
126331                .register_type_with_name::<Option<ChatBoostSource>>("Option<ChatBoostSource>")
126332                .register_static_module(
126333                    "Option<ChatBoostSource>",
126334                    exported_module!(ChatBoostSourceModule).into(),
126335                );
126336            engine
126337                .register_type_with_name::<Option<i64>>("Option<i64>")
126338                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126339            engine
126340                .register_type_with_name::<Option<String>>("Option<String>")
126341                .register_static_module("Option<String>", exported_module!(StringModule).into());
126342        }
126343    }
126344    #[cfg(feature = "rhai")]
126345    #[allow(unused_mut)]
126346    impl rhai::CustomType for UserChatBoosts {
126347        fn build(mut builder: rhai::TypeBuilder<Self>) {
126348            builder.with_get("boosts", Self::rhai_get_boosts);
126349            builder.on_debug(|t| format!("{:?}", t));
126350            drop(builder);
126351        }
126352    }
126353    #[cfg(feature = "rhai")]
126354    impl SetupRhai for GiftInfo {
126355        fn setup_rhai(engine: &mut rhai::Engine) {
126356            engine.build_type::<GiftInfo>();
126357            engine
126358                .register_type_with_name::<Option<bool>>("Option<bool>")
126359                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126360            engine
126361                .register_type_with_name::<Option<Chat>>("Option<Chat>")
126362                .build_type::<Chat>()
126363                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
126364            engine
126365                .register_type_with_name::<Option<File>>("Option<File>")
126366                .build_type::<File>()
126367                .register_static_module("Option<File>", exported_module!(FileModule).into());
126368            engine
126369                .register_type_with_name::<Option<f64>>("Option<f64>")
126370                .register_static_module("Option<f64>", exported_module!(f64Module).into());
126371            engine
126372                .register_type_with_name::<Option<Gift>>("Option<Gift>")
126373                .build_type::<Gift>()
126374                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
126375            engine
126376                .register_type_with_name::<Option<i64>>("Option<i64>")
126377                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126378            engine
126379                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
126380                .build_type::<MaskPosition>()
126381                .register_static_module(
126382                    "Option<MaskPosition>",
126383                    exported_module!(MaskPositionModule).into(),
126384                );
126385            engine
126386                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
126387                .build_type::<MessageEntity>()
126388                .register_static_module(
126389                    "Option<MessageEntity>",
126390                    exported_module!(MessageEntityModule).into(),
126391                );
126392            engine
126393                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
126394                .build_type::<PhotoSize>()
126395                .register_static_module(
126396                    "Option<PhotoSize>",
126397                    exported_module!(PhotoSizeModule).into(),
126398                );
126399            engine
126400                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
126401                .build_type::<Sticker>()
126402                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
126403            engine
126404                .register_type_with_name::<Option<String>>("Option<String>")
126405                .register_static_module("Option<String>", exported_module!(StringModule).into());
126406            engine
126407                .register_type_with_name::<Option<User>>("Option<User>")
126408                .build_type::<User>()
126409                .register_static_module("Option<User>", exported_module!(UserModule).into());
126410        }
126411    }
126412    #[cfg(feature = "rhai")]
126413    #[allow(unused_mut)]
126414    impl rhai::CustomType for GiftInfo {
126415        fn build(mut builder: rhai::TypeBuilder<Self>) {
126416            builder.with_get("gift", Self::rhai_get_gift);
126417            builder.with_get("owned_gift_id", Self::rhai_get_owned_gift_id);
126418            builder.with_get("convert_star_count", Self::rhai_get_convert_star_count);
126419            builder.with_get(
126420                "prepaid_upgrade_star_count",
126421                Self::rhai_get_prepaid_upgrade_star_count,
126422            );
126423            builder.with_get("can_be_upgraded", Self::rhai_get_can_be_upgraded);
126424            builder.with_get("text", Self::rhai_get_text);
126425            builder.with_get("entities", Self::rhai_get_entities);
126426            builder.with_get("is_private", Self::rhai_get_is_private);
126427            builder.on_debug(|t| format!("{:?}", t));
126428            drop(builder);
126429        }
126430    }
126431    #[cfg(feature = "rhai")]
126432    impl SetupRhai for ShippingAddress {
126433        fn setup_rhai(engine: &mut rhai::Engine) {
126434            engine.build_type::<ShippingAddress>();
126435            engine
126436                .register_type_with_name::<Option<String>>("Option<String>")
126437                .register_static_module("Option<String>", exported_module!(StringModule).into());
126438        }
126439    }
126440    #[cfg(feature = "rhai")]
126441    #[allow(unused_mut)]
126442    impl rhai::CustomType for ShippingAddress {
126443        fn build(mut builder: rhai::TypeBuilder<Self>) {
126444            builder.with_get("country_code", Self::rhai_get_country_code);
126445            builder.with_get("state", Self::rhai_get_state);
126446            builder.with_get("city", Self::rhai_get_city);
126447            builder.with_get("street_line_1", Self::rhai_get_street_line_1);
126448            builder.with_get("street_line_2", Self::rhai_get_street_line_2);
126449            builder.with_get("post_code", Self::rhai_get_post_code);
126450            builder.on_debug(|t| format!("{:?}", t));
126451            drop(builder);
126452        }
126453    }
126454    #[cfg(feature = "rhai")]
126455    impl SetupRhai for MessageAutoDeleteTimerChanged {
126456        fn setup_rhai(engine: &mut rhai::Engine) {
126457            engine.build_type::<MessageAutoDeleteTimerChanged>();
126458            engine
126459                .register_type_with_name::<Option<i64>>("Option<i64>")
126460                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126461        }
126462    }
126463    #[cfg(feature = "rhai")]
126464    #[allow(unused_mut)]
126465    impl rhai::CustomType for MessageAutoDeleteTimerChanged {
126466        fn build(mut builder: rhai::TypeBuilder<Self>) {
126467            builder.with_get(
126468                "message_auto_delete_time",
126469                Self::rhai_get_message_auto_delete_time,
126470            );
126471            builder.on_debug(|t| format!("{:?}", t));
126472            drop(builder);
126473        }
126474    }
126475    #[cfg(feature = "rhai")]
126476    impl SetupRhai for InlineQueryResultsButton {
126477        fn setup_rhai(engine: &mut rhai::Engine) {
126478            engine.build_type::<InlineQueryResultsButton>();
126479            engine
126480                .register_type_with_name::<Option<String>>("Option<String>")
126481                .register_static_module("Option<String>", exported_module!(StringModule).into());
126482            engine
126483                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
126484                .build_type::<WebAppInfo>()
126485                .register_static_module(
126486                    "Option<WebAppInfo>",
126487                    exported_module!(WebAppInfoModule).into(),
126488                );
126489        }
126490    }
126491    #[cfg(feature = "rhai")]
126492    #[allow(unused_mut)]
126493    impl rhai::CustomType for InlineQueryResultsButton {
126494        fn build(mut builder: rhai::TypeBuilder<Self>) {
126495            builder.with_get("text", Self::rhai_get_text);
126496            builder.with_get("web_app", Self::rhai_get_web_app);
126497            builder.with_get("start_parameter", Self::rhai_get_start_parameter);
126498            builder.on_debug(|t| format!("{:?}", t));
126499            drop(builder);
126500        }
126501    }
126502    #[cfg(feature = "rhai")]
126503    impl SetupRhai for BackgroundFillSolid {
126504        fn setup_rhai(engine: &mut rhai::Engine) {
126505            engine.build_type::<BackgroundFillSolid>();
126506            engine
126507                .register_type_with_name::<Option<i64>>("Option<i64>")
126508                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126509            engine
126510                .register_type_with_name::<Option<String>>("Option<String>")
126511                .register_static_module("Option<String>", exported_module!(StringModule).into());
126512        }
126513    }
126514    #[cfg(feature = "rhai")]
126515    #[allow(unused_mut)]
126516    impl rhai::CustomType for BackgroundFillSolid {
126517        fn build(mut builder: rhai::TypeBuilder<Self>) {
126518            builder.with_get("tg_type", Self::rhai_get_tg_type);
126519            builder.with_get("color", Self::rhai_get_color);
126520            builder.on_debug(|t| format!("{:?}", t));
126521            drop(builder);
126522        }
126523    }
126524    #[cfg(feature = "rhai")]
126525    impl SetupRhai for BotCommandScopeAllGroupChats {
126526        fn setup_rhai(engine: &mut rhai::Engine) {
126527            engine.build_type::<BotCommandScopeAllGroupChats>();
126528            engine
126529                .register_type_with_name::<Option<String>>("Option<String>")
126530                .register_static_module("Option<String>", exported_module!(StringModule).into());
126531        }
126532    }
126533    #[cfg(feature = "rhai")]
126534    #[allow(unused_mut)]
126535    impl rhai::CustomType for BotCommandScopeAllGroupChats {
126536        fn build(mut builder: rhai::TypeBuilder<Self>) {
126537            builder.with_get("tg_type", Self::rhai_get_tg_type);
126538            builder.on_debug(|t| format!("{:?}", t));
126539            drop(builder);
126540        }
126541    }
126542    #[cfg(feature = "rhai")]
126543    impl SetupRhai for ChatBoostUpdated {
126544        fn setup_rhai(engine: &mut rhai::Engine) {
126545            engine.build_type::<ChatBoostUpdated>();
126546            engine
126547                .register_type_with_name::<Option<bool>>("Option<bool>")
126548                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126549            engine
126550                .register_type_with_name::<Option<Chat>>("Option<Chat>")
126551                .build_type::<Chat>()
126552                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
126553            engine
126554                .register_type_with_name::<Option<ChatBoost>>("Option<ChatBoost>")
126555                .build_type::<ChatBoost>()
126556                .register_static_module(
126557                    "Option<ChatBoost>",
126558                    exported_module!(ChatBoostModule).into(),
126559                );
126560            engine
126561                .register_type_with_name::<Option<ChatBoostSource>>("Option<ChatBoostSource>")
126562                .register_static_module(
126563                    "Option<ChatBoostSource>",
126564                    exported_module!(ChatBoostSourceModule).into(),
126565                );
126566            engine
126567                .register_type_with_name::<Option<i64>>("Option<i64>")
126568                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126569            engine
126570                .register_type_with_name::<Option<String>>("Option<String>")
126571                .register_static_module("Option<String>", exported_module!(StringModule).into());
126572        }
126573    }
126574    #[cfg(feature = "rhai")]
126575    #[allow(unused_mut)]
126576    impl rhai::CustomType for ChatBoostUpdated {
126577        fn build(mut builder: rhai::TypeBuilder<Self>) {
126578            builder.with_get("chat", Self::rhai_get_chat);
126579            builder.with_get("boost", Self::rhai_get_boost);
126580            builder.on_debug(|t| format!("{:?}", t));
126581            drop(builder);
126582        }
126583    }
126584    #[cfg(feature = "rhai")]
126585    impl SetupRhai for MaskPosition {
126586        fn setup_rhai(engine: &mut rhai::Engine) {
126587            engine.build_type::<MaskPosition>();
126588            engine
126589                .register_type_with_name::<Option<f64>>("Option<f64>")
126590                .register_static_module("Option<f64>", exported_module!(f64Module).into());
126591            engine
126592                .register_type_with_name::<Option<String>>("Option<String>")
126593                .register_static_module("Option<String>", exported_module!(StringModule).into());
126594        }
126595    }
126596    #[cfg(feature = "rhai")]
126597    #[allow(unused_mut)]
126598    impl rhai::CustomType for MaskPosition {
126599        fn build(mut builder: rhai::TypeBuilder<Self>) {
126600            builder.with_get("point", Self::rhai_get_point);
126601            builder.with_get("x_shift", Self::rhai_get_x_shift);
126602            builder.with_get("y_shift", Self::rhai_get_y_shift);
126603            builder.with_get("scale", Self::rhai_get_scale);
126604            builder.on_debug(|t| format!("{:?}", t));
126605            drop(builder);
126606        }
126607    }
126608    #[cfg(feature = "rhai")]
126609    impl SetupRhai for PassportElementErrorFile {
126610        fn setup_rhai(engine: &mut rhai::Engine) {
126611            engine.build_type::<PassportElementErrorFile>();
126612            engine
126613                .register_type_with_name::<Option<String>>("Option<String>")
126614                .register_static_module("Option<String>", exported_module!(StringModule).into());
126615        }
126616    }
126617    #[cfg(feature = "rhai")]
126618    #[allow(unused_mut)]
126619    impl rhai::CustomType for PassportElementErrorFile {
126620        fn build(mut builder: rhai::TypeBuilder<Self>) {
126621            builder.with_get("source", Self::rhai_get_source);
126622            builder.with_get("tg_type", Self::rhai_get_tg_type);
126623            builder.with_get("file_hash", Self::rhai_get_file_hash);
126624            builder.with_get("message", Self::rhai_get_message);
126625            builder.on_debug(|t| format!("{:?}", t));
126626            drop(builder);
126627        }
126628    }
126629    #[cfg(feature = "rhai")]
126630    impl SetupRhai for Sticker {
126631        fn setup_rhai(engine: &mut rhai::Engine) {
126632            engine.build_type::<Sticker>();
126633            engine
126634                .register_type_with_name::<Option<bool>>("Option<bool>")
126635                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126636            engine
126637                .register_type_with_name::<Option<File>>("Option<File>")
126638                .build_type::<File>()
126639                .register_static_module("Option<File>", exported_module!(FileModule).into());
126640            engine
126641                .register_type_with_name::<Option<f64>>("Option<f64>")
126642                .register_static_module("Option<f64>", exported_module!(f64Module).into());
126643            engine
126644                .register_type_with_name::<Option<i64>>("Option<i64>")
126645                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126646            engine
126647                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
126648                .build_type::<MaskPosition>()
126649                .register_static_module(
126650                    "Option<MaskPosition>",
126651                    exported_module!(MaskPositionModule).into(),
126652                );
126653            engine
126654                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
126655                .build_type::<PhotoSize>()
126656                .register_static_module(
126657                    "Option<PhotoSize>",
126658                    exported_module!(PhotoSizeModule).into(),
126659                );
126660            engine
126661                .register_type_with_name::<Option<String>>("Option<String>")
126662                .register_static_module("Option<String>", exported_module!(StringModule).into());
126663        }
126664    }
126665    #[cfg(feature = "rhai")]
126666    #[allow(unused_mut)]
126667    impl rhai::CustomType for Sticker {
126668        fn build(mut builder: rhai::TypeBuilder<Self>) {
126669            builder.with_get("file_id", Self::rhai_get_file_id);
126670            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
126671            builder.with_get("tg_type", Self::rhai_get_tg_type);
126672            builder.with_get("width", Self::rhai_get_width);
126673            builder.with_get("height", Self::rhai_get_height);
126674            builder.with_get("is_animated", Self::rhai_get_is_animated);
126675            builder.with_get("is_video", Self::rhai_get_is_video);
126676            builder.with_get("thumbnail", Self::rhai_get_thumbnail);
126677            builder.with_get("emoji", Self::rhai_get_emoji);
126678            builder.with_get("set_name", Self::rhai_get_set_name);
126679            builder.with_get("premium_animation", Self::rhai_get_premium_animation);
126680            builder.with_get("mask_position", Self::rhai_get_mask_position);
126681            builder.with_get("custom_emoji_id", Self::rhai_get_custom_emoji_id);
126682            builder.with_get("needs_repainting", Self::rhai_get_needs_repainting);
126683            builder.with_get("file_size", Self::rhai_get_file_size);
126684            builder.on_debug(|t| format!("{:?}", t));
126685            drop(builder);
126686        }
126687    }
126688    #[cfg(feature = "rhai")]
126689    impl SetupRhai for PassportElementErrorSelfie {
126690        fn setup_rhai(engine: &mut rhai::Engine) {
126691            engine.build_type::<PassportElementErrorSelfie>();
126692            engine
126693                .register_type_with_name::<Option<String>>("Option<String>")
126694                .register_static_module("Option<String>", exported_module!(StringModule).into());
126695        }
126696    }
126697    #[cfg(feature = "rhai")]
126698    #[allow(unused_mut)]
126699    impl rhai::CustomType for PassportElementErrorSelfie {
126700        fn build(mut builder: rhai::TypeBuilder<Self>) {
126701            builder.with_get("source", Self::rhai_get_source);
126702            builder.with_get("tg_type", Self::rhai_get_tg_type);
126703            builder.with_get("file_hash", Self::rhai_get_file_hash);
126704            builder.with_get("message", Self::rhai_get_message);
126705            builder.on_debug(|t| format!("{:?}", t));
126706            drop(builder);
126707        }
126708    }
126709    #[cfg(feature = "rhai")]
126710    impl SetupRhai for BackgroundTypePattern {
126711        fn setup_rhai(engine: &mut rhai::Engine) {
126712            engine.build_type::<BackgroundTypePattern>();
126713            engine
126714                .register_type_with_name::<Option<BackgroundFill>>("Option<BackgroundFill>")
126715                .register_static_module(
126716                    "Option<BackgroundFill>",
126717                    exported_module!(BackgroundFillModule).into(),
126718                );
126719            engine
126720                .register_type_with_name::<Option<bool>>("Option<bool>")
126721                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126722            engine
126723                .register_type_with_name::<Option<Document>>("Option<Document>")
126724                .build_type::<Document>()
126725                .register_static_module(
126726                    "Option<Document>",
126727                    exported_module!(DocumentModule).into(),
126728                );
126729            engine
126730                .register_type_with_name::<Option<i64>>("Option<i64>")
126731                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126732            engine
126733                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
126734                .build_type::<PhotoSize>()
126735                .register_static_module(
126736                    "Option<PhotoSize>",
126737                    exported_module!(PhotoSizeModule).into(),
126738                );
126739            engine
126740                .register_type_with_name::<Option<String>>("Option<String>")
126741                .register_static_module("Option<String>", exported_module!(StringModule).into());
126742        }
126743    }
126744    #[cfg(feature = "rhai")]
126745    #[allow(unused_mut)]
126746    impl rhai::CustomType for BackgroundTypePattern {
126747        fn build(mut builder: rhai::TypeBuilder<Self>) {
126748            builder.with_get("tg_type", Self::rhai_get_tg_type);
126749            builder.with_get("document", Self::rhai_get_document);
126750            builder.with_get("fill", Self::rhai_get_fill);
126751            builder.with_get("intensity", Self::rhai_get_intensity);
126752            builder.with_get("is_inverted", Self::rhai_get_is_inverted);
126753            builder.with_get("is_moving", Self::rhai_get_is_moving);
126754            builder.on_debug(|t| format!("{:?}", t));
126755            drop(builder);
126756        }
126757    }
126758    #[cfg(feature = "rhai")]
126759    impl SetupRhai for StarAmount {
126760        fn setup_rhai(engine: &mut rhai::Engine) {
126761            engine.build_type::<StarAmount>();
126762            engine
126763                .register_type_with_name::<Option<i64>>("Option<i64>")
126764                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126765        }
126766    }
126767    #[cfg(feature = "rhai")]
126768    #[allow(unused_mut)]
126769    impl rhai::CustomType for StarAmount {
126770        fn build(mut builder: rhai::TypeBuilder<Self>) {
126771            builder.with_get("amount", Self::rhai_get_amount);
126772            builder.with_get("nanostar_amount", Self::rhai_get_nanostar_amount);
126773            builder.on_debug(|t| format!("{:?}", t));
126774            drop(builder);
126775        }
126776    }
126777    #[cfg(feature = "rhai")]
126778    impl SetupRhai for TransactionPartnerFragment {
126779        fn setup_rhai(engine: &mut rhai::Engine) {
126780            engine.build_type::<TransactionPartnerFragment>();
126781            engine
126782                .register_type_with_name::<Option<RevenueWithdrawalState>>(
126783                    "Option<RevenueWithdrawalState>",
126784                )
126785                .register_static_module(
126786                    "Option<RevenueWithdrawalState>",
126787                    exported_module!(RevenueWithdrawalStateModule).into(),
126788                );
126789            engine
126790                .register_type_with_name::<Option<String>>("Option<String>")
126791                .register_static_module("Option<String>", exported_module!(StringModule).into());
126792        }
126793    }
126794    #[cfg(feature = "rhai")]
126795    #[allow(unused_mut)]
126796    impl rhai::CustomType for TransactionPartnerFragment {
126797        fn build(mut builder: rhai::TypeBuilder<Self>) {
126798            builder.with_get("tg_type", Self::rhai_get_tg_type);
126799            builder.with_get("withdrawal_state", Self::rhai_get_withdrawal_state);
126800            builder.on_debug(|t| format!("{:?}", t));
126801            drop(builder);
126802        }
126803    }
126804    #[cfg(feature = "rhai")]
126805    impl SetupRhai for ChatMemberLeft {
126806        fn setup_rhai(engine: &mut rhai::Engine) {
126807            engine.build_type::<ChatMemberLeft>();
126808            engine
126809                .register_type_with_name::<Option<bool>>("Option<bool>")
126810                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126811            engine
126812                .register_type_with_name::<Option<i64>>("Option<i64>")
126813                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126814            engine
126815                .register_type_with_name::<Option<String>>("Option<String>")
126816                .register_static_module("Option<String>", exported_module!(StringModule).into());
126817            engine
126818                .register_type_with_name::<Option<User>>("Option<User>")
126819                .build_type::<User>()
126820                .register_static_module("Option<User>", exported_module!(UserModule).into());
126821        }
126822    }
126823    #[cfg(feature = "rhai")]
126824    #[allow(unused_mut)]
126825    impl rhai::CustomType for ChatMemberLeft {
126826        fn build(mut builder: rhai::TypeBuilder<Self>) {
126827            builder.with_get("user", Self::rhai_get_user);
126828            builder.on_debug(|t| format!("{:?}", t));
126829            drop(builder);
126830        }
126831    }
126832    #[cfg(feature = "rhai")]
126833    impl SetupRhai for PaidMediaPhoto {
126834        fn setup_rhai(engine: &mut rhai::Engine) {
126835            engine.build_type::<PaidMediaPhoto>();
126836            engine
126837                .register_type_with_name::<Option<i64>>("Option<i64>")
126838                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126839            engine
126840                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
126841                .build_type::<PhotoSize>()
126842                .register_static_module(
126843                    "Option<PhotoSize>",
126844                    exported_module!(PhotoSizeModule).into(),
126845                );
126846            engine
126847                .register_type_with_name::<Option<String>>("Option<String>")
126848                .register_static_module("Option<String>", exported_module!(StringModule).into());
126849        }
126850    }
126851    #[cfg(feature = "rhai")]
126852    #[allow(unused_mut)]
126853    impl rhai::CustomType for PaidMediaPhoto {
126854        fn build(mut builder: rhai::TypeBuilder<Self>) {
126855            builder.with_get("tg_type", Self::rhai_get_tg_type);
126856            builder.with_get("photo", Self::rhai_get_photo);
126857            builder.on_debug(|t| format!("{:?}", t));
126858            drop(builder);
126859        }
126860    }
126861    #[cfg(feature = "rhai")]
126862    impl SetupRhai for UniqueGift {
126863        fn setup_rhai(engine: &mut rhai::Engine) {
126864            engine.build_type::<UniqueGift>();
126865            engine
126866                .register_type_with_name::<Option<bool>>("Option<bool>")
126867                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126868            engine
126869                .register_type_with_name::<Option<Chat>>("Option<Chat>")
126870                .build_type::<Chat>()
126871                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
126872            engine
126873                .register_type_with_name::<Option<File>>("Option<File>")
126874                .build_type::<File>()
126875                .register_static_module("Option<File>", exported_module!(FileModule).into());
126876            engine
126877                .register_type_with_name::<Option<f64>>("Option<f64>")
126878                .register_static_module("Option<f64>", exported_module!(f64Module).into());
126879            engine
126880                .register_type_with_name::<Option<i64>>("Option<i64>")
126881                .register_static_module("Option<i64>", exported_module!(i64Module).into());
126882            engine
126883                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
126884                .build_type::<MaskPosition>()
126885                .register_static_module(
126886                    "Option<MaskPosition>",
126887                    exported_module!(MaskPositionModule).into(),
126888                );
126889            engine
126890                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
126891                .build_type::<PhotoSize>()
126892                .register_static_module(
126893                    "Option<PhotoSize>",
126894                    exported_module!(PhotoSizeModule).into(),
126895                );
126896            engine
126897                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
126898                .build_type::<Sticker>()
126899                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
126900            engine
126901                .register_type_with_name::<Option<String>>("Option<String>")
126902                .register_static_module("Option<String>", exported_module!(StringModule).into());
126903            engine
126904                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
126905                .build_type::<UniqueGiftBackdrop>()
126906                .register_static_module(
126907                    "Option<UniqueGiftBackdrop>",
126908                    exported_module!(UniqueGiftBackdropModule).into(),
126909                );
126910            engine
126911                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
126912                    "Option<UniqueGiftBackdropColors>",
126913                )
126914                .build_type::<UniqueGiftBackdropColors>()
126915                .register_static_module(
126916                    "Option<UniqueGiftBackdropColors>",
126917                    exported_module!(UniqueGiftBackdropColorsModule).into(),
126918                );
126919            engine
126920                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
126921                .build_type::<UniqueGiftModel>()
126922                .register_static_module(
126923                    "Option<UniqueGiftModel>",
126924                    exported_module!(UniqueGiftModelModule).into(),
126925                );
126926            engine
126927                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
126928                .build_type::<UniqueGiftSymbol>()
126929                .register_static_module(
126930                    "Option<UniqueGiftSymbol>",
126931                    exported_module!(UniqueGiftSymbolModule).into(),
126932                );
126933        }
126934    }
126935    #[cfg(feature = "rhai")]
126936    #[allow(unused_mut)]
126937    impl rhai::CustomType for UniqueGift {
126938        fn build(mut builder: rhai::TypeBuilder<Self>) {
126939            builder.with_get("base_name", Self::rhai_get_base_name);
126940            builder.with_get("name", Self::rhai_get_name);
126941            builder.with_get("number", Self::rhai_get_number);
126942            builder.with_get("model", Self::rhai_get_model);
126943            builder.with_get("symbol", Self::rhai_get_symbol);
126944            builder.with_get("backdrop", Self::rhai_get_backdrop);
126945            builder.with_get("publisher_chat", Self::rhai_get_publisher_chat);
126946            builder.on_debug(|t| format!("{:?}", t));
126947            drop(builder);
126948        }
126949    }
126950    #[cfg(feature = "rhai")]
126951    impl SetupRhai for MenuButtonCommands {
126952        fn setup_rhai(engine: &mut rhai::Engine) {
126953            engine.build_type::<MenuButtonCommands>();
126954            engine
126955                .register_type_with_name::<Option<String>>("Option<String>")
126956                .register_static_module("Option<String>", exported_module!(StringModule).into());
126957        }
126958    }
126959    #[cfg(feature = "rhai")]
126960    #[allow(unused_mut)]
126961    impl rhai::CustomType for MenuButtonCommands {
126962        fn build(mut builder: rhai::TypeBuilder<Self>) {
126963            builder.with_get("tg_type", Self::rhai_get_tg_type);
126964            builder.on_debug(|t| format!("{:?}", t));
126965            drop(builder);
126966        }
126967    }
126968    #[cfg(feature = "rhai")]
126969    impl SetupRhai for TransactionPartnerOther {
126970        fn setup_rhai(engine: &mut rhai::Engine) {
126971            engine.build_type::<TransactionPartnerOther>();
126972            engine
126973                .register_type_with_name::<Option<String>>("Option<String>")
126974                .register_static_module("Option<String>", exported_module!(StringModule).into());
126975        }
126976    }
126977    #[cfg(feature = "rhai")]
126978    #[allow(unused_mut)]
126979    impl rhai::CustomType for TransactionPartnerOther {
126980        fn build(mut builder: rhai::TypeBuilder<Self>) {
126981            builder.with_get("tg_type", Self::rhai_get_tg_type);
126982            builder.on_debug(|t| format!("{:?}", t));
126983            drop(builder);
126984        }
126985    }
126986    #[cfg(feature = "rhai")]
126987    impl SetupRhai for Gifts {
126988        fn setup_rhai(engine: &mut rhai::Engine) {
126989            engine.build_type::<Gifts>();
126990            engine
126991                .register_type_with_name::<Option<bool>>("Option<bool>")
126992                .register_static_module("Option<bool>", exported_module!(boolModule).into());
126993            engine
126994                .register_type_with_name::<Option<Chat>>("Option<Chat>")
126995                .build_type::<Chat>()
126996                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
126997            engine
126998                .register_type_with_name::<Option<File>>("Option<File>")
126999                .build_type::<File>()
127000                .register_static_module("Option<File>", exported_module!(FileModule).into());
127001            engine
127002                .register_type_with_name::<Option<f64>>("Option<f64>")
127003                .register_static_module("Option<f64>", exported_module!(f64Module).into());
127004            engine
127005                .register_type_with_name::<Option<Gift>>("Option<Gift>")
127006                .build_type::<Gift>()
127007                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
127008            engine
127009                .register_type_with_name::<Option<i64>>("Option<i64>")
127010                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127011            engine
127012                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
127013                .build_type::<MaskPosition>()
127014                .register_static_module(
127015                    "Option<MaskPosition>",
127016                    exported_module!(MaskPositionModule).into(),
127017                );
127018            engine
127019                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
127020                .build_type::<PhotoSize>()
127021                .register_static_module(
127022                    "Option<PhotoSize>",
127023                    exported_module!(PhotoSizeModule).into(),
127024                );
127025            engine
127026                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
127027                .build_type::<Sticker>()
127028                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
127029            engine
127030                .register_type_with_name::<Option<String>>("Option<String>")
127031                .register_static_module("Option<String>", exported_module!(StringModule).into());
127032        }
127033    }
127034    #[cfg(feature = "rhai")]
127035    #[allow(unused_mut)]
127036    impl rhai::CustomType for Gifts {
127037        fn build(mut builder: rhai::TypeBuilder<Self>) {
127038            builder.with_get("gifts", Self::rhai_get_gifts);
127039            builder.on_debug(|t| format!("{:?}", t));
127040            drop(builder);
127041        }
127042    }
127043    #[cfg(feature = "rhai")]
127044    impl SetupRhai for File {
127045        fn setup_rhai(engine: &mut rhai::Engine) {
127046            engine.build_type::<File>();
127047            engine
127048                .register_type_with_name::<Option<i64>>("Option<i64>")
127049                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127050            engine
127051                .register_type_with_name::<Option<String>>("Option<String>")
127052                .register_static_module("Option<String>", exported_module!(StringModule).into());
127053        }
127054    }
127055    #[cfg(feature = "rhai")]
127056    #[allow(unused_mut)]
127057    impl rhai::CustomType for File {
127058        fn build(mut builder: rhai::TypeBuilder<Self>) {
127059            builder.with_get("file_id", Self::rhai_get_file_id);
127060            builder.with_get("file_unique_id", Self::rhai_get_file_unique_id);
127061            builder.with_get("file_size", Self::rhai_get_file_size);
127062            builder.with_get("file_path", Self::rhai_get_file_path);
127063            builder.on_debug(|t| format!("{:?}", t));
127064            drop(builder);
127065        }
127066    }
127067    #[cfg(feature = "rhai")]
127068    impl SetupRhai for Birthdate {
127069        fn setup_rhai(engine: &mut rhai::Engine) {
127070            engine.build_type::<Birthdate>();
127071            engine
127072                .register_type_with_name::<Option<i64>>("Option<i64>")
127073                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127074        }
127075    }
127076    #[cfg(feature = "rhai")]
127077    #[allow(unused_mut)]
127078    impl rhai::CustomType for Birthdate {
127079        fn build(mut builder: rhai::TypeBuilder<Self>) {
127080            builder.with_get("day", Self::rhai_get_day);
127081            builder.with_get("month", Self::rhai_get_month);
127082            builder.with_get("year", Self::rhai_get_year);
127083            builder.on_debug(|t| format!("{:?}", t));
127084            drop(builder);
127085        }
127086    }
127087    #[cfg(feature = "rhai")]
127088    impl SetupRhai for TransactionPartnerTelegramAds {
127089        fn setup_rhai(engine: &mut rhai::Engine) {
127090            engine.build_type::<TransactionPartnerTelegramAds>();
127091            engine
127092                .register_type_with_name::<Option<String>>("Option<String>")
127093                .register_static_module("Option<String>", exported_module!(StringModule).into());
127094        }
127095    }
127096    #[cfg(feature = "rhai")]
127097    #[allow(unused_mut)]
127098    impl rhai::CustomType for TransactionPartnerTelegramAds {
127099        fn build(mut builder: rhai::TypeBuilder<Self>) {
127100            builder.with_get("tg_type", Self::rhai_get_tg_type);
127101            builder.on_debug(|t| format!("{:?}", t));
127102            drop(builder);
127103        }
127104    }
127105    #[cfg(feature = "rhai")]
127106    impl SetupRhai for InlineQueryResultContact {
127107        fn setup_rhai(engine: &mut rhai::Engine) {
127108            engine.build_type::<InlineQueryResultContact>();
127109            engine
127110                .register_type_with_name::<Option<bool>>("Option<bool>")
127111                .register_static_module("Option<bool>", exported_module!(boolModule).into());
127112            engine
127113                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
127114                .build_type::<CallbackGame>()
127115                .register_static_module(
127116                    "Option<CallbackGame>",
127117                    exported_module!(CallbackGameModule).into(),
127118                );
127119            engine
127120                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
127121                .build_type::<CopyTextButton>()
127122                .register_static_module(
127123                    "Option<CopyTextButton>",
127124                    exported_module!(CopyTextButtonModule).into(),
127125                );
127126            engine
127127                .register_type_with_name::<Option<InlineKeyboardButton>>(
127128                    "Option<InlineKeyboardButton>",
127129                )
127130                .build_type::<InlineKeyboardButton>()
127131                .register_static_module(
127132                    "Option<InlineKeyboardButton>",
127133                    exported_module!(InlineKeyboardButtonModule).into(),
127134                );
127135            engine
127136                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
127137                    "Option<InlineKeyboardMarkup>",
127138                )
127139                .build_type::<InlineKeyboardMarkup>()
127140                .register_static_module(
127141                    "Option<InlineKeyboardMarkup>",
127142                    exported_module!(InlineKeyboardMarkupModule).into(),
127143                );
127144            engine
127145                .register_type_with_name::<Option<InputMessageContent>>(
127146                    "Option<InputMessageContent>",
127147                )
127148                .register_static_module(
127149                    "Option<InputMessageContent>",
127150                    exported_module!(InputMessageContentModule).into(),
127151                );
127152            engine
127153                .register_type_with_name::<Option<i64>>("Option<i64>")
127154                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127155            engine
127156                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
127157                .build_type::<LoginUrl>()
127158                .register_static_module(
127159                    "Option<LoginUrl>",
127160                    exported_module!(LoginUrlModule).into(),
127161                );
127162            engine
127163                .register_type_with_name::<Option<String>>("Option<String>")
127164                .register_static_module("Option<String>", exported_module!(StringModule).into());
127165            engine
127166                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
127167                    "Option<SwitchInlineQueryChosenChat>",
127168                )
127169                .build_type::<SwitchInlineQueryChosenChat>()
127170                .register_static_module(
127171                    "Option<SwitchInlineQueryChosenChat>",
127172                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
127173                );
127174            engine
127175                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
127176                .build_type::<WebAppInfo>()
127177                .register_static_module(
127178                    "Option<WebAppInfo>",
127179                    exported_module!(WebAppInfoModule).into(),
127180                );
127181        }
127182    }
127183    #[cfg(feature = "rhai")]
127184    #[allow(unused_mut)]
127185    impl rhai::CustomType for InlineQueryResultContact {
127186        fn build(mut builder: rhai::TypeBuilder<Self>) {
127187            builder.with_get("tg_type", Self::rhai_get_tg_type);
127188            builder.with_get("id", Self::rhai_get_id);
127189            builder.with_get("phone_number", Self::rhai_get_phone_number);
127190            builder.with_get("first_name", Self::rhai_get_first_name);
127191            builder.with_get("last_name", Self::rhai_get_last_name);
127192            builder.with_get("vcard", Self::rhai_get_vcard);
127193            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
127194            builder.with_get(
127195                "input_message_content",
127196                Self::rhai_get_input_message_content,
127197            );
127198            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
127199            builder.with_get("thumbnail_width", Self::rhai_get_thumbnail_width);
127200            builder.with_get("thumbnail_height", Self::rhai_get_thumbnail_height);
127201            builder.on_debug(|t| format!("{:?}", t));
127202            drop(builder);
127203        }
127204    }
127205    #[cfg(feature = "rhai")]
127206    impl SetupRhai for ChatMemberRestricted {
127207        fn setup_rhai(engine: &mut rhai::Engine) {
127208            engine.build_type::<ChatMemberRestricted>();
127209            engine
127210                .register_type_with_name::<Option<bool>>("Option<bool>")
127211                .register_static_module("Option<bool>", exported_module!(boolModule).into());
127212            engine
127213                .register_type_with_name::<Option<i64>>("Option<i64>")
127214                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127215            engine
127216                .register_type_with_name::<Option<String>>("Option<String>")
127217                .register_static_module("Option<String>", exported_module!(StringModule).into());
127218            engine
127219                .register_type_with_name::<Option<User>>("Option<User>")
127220                .build_type::<User>()
127221                .register_static_module("Option<User>", exported_module!(UserModule).into());
127222        }
127223    }
127224    #[cfg(feature = "rhai")]
127225    #[allow(unused_mut)]
127226    impl rhai::CustomType for ChatMemberRestricted {
127227        fn build(mut builder: rhai::TypeBuilder<Self>) {
127228            builder.with_get("user", Self::rhai_get_user);
127229            builder.with_get("is_member", Self::rhai_get_is_member);
127230            builder.with_get("can_send_messages", Self::rhai_get_can_send_messages);
127231            builder.with_get("can_send_audios", Self::rhai_get_can_send_audios);
127232            builder.with_get("can_send_documents", Self::rhai_get_can_send_documents);
127233            builder.with_get("can_send_photos", Self::rhai_get_can_send_photos);
127234            builder.with_get("can_send_videos", Self::rhai_get_can_send_videos);
127235            builder.with_get("can_send_video_notes", Self::rhai_get_can_send_video_notes);
127236            builder.with_get("can_send_voice_notes", Self::rhai_get_can_send_voice_notes);
127237            builder.with_get("can_send_polls", Self::rhai_get_can_send_polls);
127238            builder.with_get(
127239                "can_send_other_messages",
127240                Self::rhai_get_can_send_other_messages,
127241            );
127242            builder.with_get(
127243                "can_add_web_page_previews",
127244                Self::rhai_get_can_add_web_page_previews,
127245            );
127246            builder.with_get("can_change_info", Self::rhai_get_can_change_info);
127247            builder.with_get("can_invite_users", Self::rhai_get_can_invite_users);
127248            builder.with_get("can_pin_messages", Self::rhai_get_can_pin_messages);
127249            builder.with_get("can_manage_topics", Self::rhai_get_can_manage_topics);
127250            builder.with_get("until_date", Self::rhai_get_until_date);
127251            builder.on_debug(|t| format!("{:?}", t));
127252            drop(builder);
127253        }
127254    }
127255    #[cfg(feature = "rhai")]
127256    impl SetupRhai for LinkPreviewOptions {
127257        fn setup_rhai(engine: &mut rhai::Engine) {
127258            engine.build_type::<LinkPreviewOptions>();
127259            engine
127260                .register_type_with_name::<Option<bool>>("Option<bool>")
127261                .register_static_module("Option<bool>", exported_module!(boolModule).into());
127262            engine
127263                .register_type_with_name::<Option<String>>("Option<String>")
127264                .register_static_module("Option<String>", exported_module!(StringModule).into());
127265        }
127266    }
127267    #[cfg(feature = "rhai")]
127268    #[allow(unused_mut)]
127269    impl rhai::CustomType for LinkPreviewOptions {
127270        fn build(mut builder: rhai::TypeBuilder<Self>) {
127271            builder.with_get("is_disabled", Self::rhai_get_is_disabled);
127272            builder.with_get("url", Self::rhai_get_url);
127273            builder.with_get("prefer_small_media", Self::rhai_get_prefer_small_media);
127274            builder.with_get("prefer_large_media", Self::rhai_get_prefer_large_media);
127275            builder.with_get("show_above_text", Self::rhai_get_show_above_text);
127276            builder.on_debug(|t| format!("{:?}", t));
127277            drop(builder);
127278        }
127279    }
127280    #[cfg(feature = "rhai")]
127281    impl SetupRhai for PreparedInlineMessage {
127282        fn setup_rhai(engine: &mut rhai::Engine) {
127283            engine.build_type::<PreparedInlineMessage>();
127284            engine
127285                .register_type_with_name::<Option<i64>>("Option<i64>")
127286                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127287            engine
127288                .register_type_with_name::<Option<String>>("Option<String>")
127289                .register_static_module("Option<String>", exported_module!(StringModule).into());
127290        }
127291    }
127292    #[cfg(feature = "rhai")]
127293    #[allow(unused_mut)]
127294    impl rhai::CustomType for PreparedInlineMessage {
127295        fn build(mut builder: rhai::TypeBuilder<Self>) {
127296            builder.with_get("id", Self::rhai_get_id);
127297            builder.with_get("expiration_date", Self::rhai_get_expiration_date);
127298            builder.on_debug(|t| format!("{:?}", t));
127299            drop(builder);
127300        }
127301    }
127302    #[cfg(feature = "rhai")]
127303    impl SetupRhai for TextQuote {
127304        fn setup_rhai(engine: &mut rhai::Engine) {
127305            engine.build_type::<TextQuote>();
127306            engine
127307                .register_type_with_name::<Option<bool>>("Option<bool>")
127308                .register_static_module("Option<bool>", exported_module!(boolModule).into());
127309            engine
127310                .register_type_with_name::<Option<i64>>("Option<i64>")
127311                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127312            engine
127313                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
127314                .build_type::<MessageEntity>()
127315                .register_static_module(
127316                    "Option<MessageEntity>",
127317                    exported_module!(MessageEntityModule).into(),
127318                );
127319            engine
127320                .register_type_with_name::<Option<String>>("Option<String>")
127321                .register_static_module("Option<String>", exported_module!(StringModule).into());
127322            engine
127323                .register_type_with_name::<Option<User>>("Option<User>")
127324                .build_type::<User>()
127325                .register_static_module("Option<User>", exported_module!(UserModule).into());
127326        }
127327    }
127328    #[cfg(feature = "rhai")]
127329    #[allow(unused_mut)]
127330    impl rhai::CustomType for TextQuote {
127331        fn build(mut builder: rhai::TypeBuilder<Self>) {
127332            builder.with_get("text", Self::rhai_get_text);
127333            builder.with_get("entities", Self::rhai_get_entities);
127334            builder.with_get("position", Self::rhai_get_position);
127335            builder.with_get("is_manual", Self::rhai_get_is_manual);
127336            builder.on_debug(|t| format!("{:?}", t));
127337            drop(builder);
127338        }
127339    }
127340    #[cfg(feature = "rhai")]
127341    impl SetupRhai for ChecklistTasksDone {
127342        fn setup_rhai(engine: &mut rhai::Engine) {
127343            engine.build_type::<ChecklistTasksDone>();
127344            engine
127345                .register_type_with_name::<Option<Animation>>("Option<Animation>")
127346                .build_type::<Animation>()
127347                .register_static_module(
127348                    "Option<Animation>",
127349                    exported_module!(AnimationModule).into(),
127350                );
127351            engine
127352                .register_type_with_name::<Option<Audio>>("Option<Audio>")
127353                .build_type::<Audio>()
127354                .register_static_module("Option<Audio>", exported_module!(AudioModule).into());
127355            engine
127356                .register_type_with_name::<Option<BackgroundType>>("Option<BackgroundType>")
127357                .register_static_module(
127358                    "Option<BackgroundType>",
127359                    exported_module!(BackgroundTypeModule).into(),
127360                );
127361            engine
127362                .register_type_with_name::<Option<bool>>("Option<bool>")
127363                .register_static_module("Option<bool>", exported_module!(boolModule).into());
127364            engine
127365                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
127366                .build_type::<CallbackGame>()
127367                .register_static_module(
127368                    "Option<CallbackGame>",
127369                    exported_module!(CallbackGameModule).into(),
127370                );
127371            engine
127372                .register_type_with_name::<Option<Chat>>("Option<Chat>")
127373                .build_type::<Chat>()
127374                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
127375            engine
127376                .register_type_with_name::<Option<ChatBackground>>("Option<ChatBackground>")
127377                .build_type::<ChatBackground>()
127378                .register_static_module(
127379                    "Option<ChatBackground>",
127380                    exported_module!(ChatBackgroundModule).into(),
127381                );
127382            engine
127383                .register_type_with_name::<Option<ChatBoostAdded>>("Option<ChatBoostAdded>")
127384                .build_type::<ChatBoostAdded>()
127385                .register_static_module(
127386                    "Option<ChatBoostAdded>",
127387                    exported_module!(ChatBoostAddedModule).into(),
127388                );
127389            engine
127390                .register_type_with_name::<Option<ChatShared>>("Option<ChatShared>")
127391                .build_type::<ChatShared>()
127392                .register_static_module(
127393                    "Option<ChatShared>",
127394                    exported_module!(ChatSharedModule).into(),
127395                );
127396            engine
127397                .register_type_with_name::<Option<Checklist>>("Option<Checklist>")
127398                .build_type::<Checklist>()
127399                .register_static_module(
127400                    "Option<Checklist>",
127401                    exported_module!(ChecklistModule).into(),
127402                );
127403            engine
127404                .register_type_with_name::<Option<ChecklistTask>>("Option<ChecklistTask>")
127405                .build_type::<ChecklistTask>()
127406                .register_static_module(
127407                    "Option<ChecklistTask>",
127408                    exported_module!(ChecklistTaskModule).into(),
127409                );
127410            engine
127411                .register_type_with_name::<Option<ChecklistTasksAdded>>(
127412                    "Option<ChecklistTasksAdded>",
127413                )
127414                .build_type::<ChecklistTasksAdded>()
127415                .register_static_module(
127416                    "Option<ChecklistTasksAdded>",
127417                    exported_module!(ChecklistTasksAddedModule).into(),
127418                );
127419            engine
127420                .register_type_with_name::<Option<ChecklistTasksDone>>("Option<ChecklistTasksDone>")
127421                .build_type::<ChecklistTasksDone>()
127422                .register_static_module(
127423                    "Option<ChecklistTasksDone>",
127424                    exported_module!(ChecklistTasksDoneModule).into(),
127425                );
127426            engine
127427                .register_type_with_name::<Option<Contact>>("Option<Contact>")
127428                .build_type::<Contact>()
127429                .register_static_module("Option<Contact>", exported_module!(ContactModule).into());
127430            engine
127431                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
127432                .build_type::<CopyTextButton>()
127433                .register_static_module(
127434                    "Option<CopyTextButton>",
127435                    exported_module!(CopyTextButtonModule).into(),
127436                );
127437            engine
127438                .register_type_with_name::<Option<Dice>>("Option<Dice>")
127439                .build_type::<Dice>()
127440                .register_static_module("Option<Dice>", exported_module!(DiceModule).into());
127441            engine
127442                .register_type_with_name::<Option<DirectMessagePriceChanged>>(
127443                    "Option<DirectMessagePriceChanged>",
127444                )
127445                .build_type::<DirectMessagePriceChanged>()
127446                .register_static_module(
127447                    "Option<DirectMessagePriceChanged>",
127448                    exported_module!(DirectMessagePriceChangedModule).into(),
127449                );
127450            engine
127451                .register_type_with_name::<Option<DirectMessagesTopic>>(
127452                    "Option<DirectMessagesTopic>",
127453                )
127454                .build_type::<DirectMessagesTopic>()
127455                .register_static_module(
127456                    "Option<DirectMessagesTopic>",
127457                    exported_module!(DirectMessagesTopicModule).into(),
127458                );
127459            engine
127460                .register_type_with_name::<Option<Document>>("Option<Document>")
127461                .build_type::<Document>()
127462                .register_static_module(
127463                    "Option<Document>",
127464                    exported_module!(DocumentModule).into(),
127465                );
127466            engine
127467                .register_type_with_name::<Option<EncryptedCredentials>>(
127468                    "Option<EncryptedCredentials>",
127469                )
127470                .build_type::<EncryptedCredentials>()
127471                .register_static_module(
127472                    "Option<EncryptedCredentials>",
127473                    exported_module!(EncryptedCredentialsModule).into(),
127474                );
127475            engine
127476                .register_type_with_name::<Option<EncryptedPassportElement>>(
127477                    "Option<EncryptedPassportElement>",
127478                )
127479                .build_type::<EncryptedPassportElement>()
127480                .register_static_module(
127481                    "Option<EncryptedPassportElement>",
127482                    exported_module!(EncryptedPassportElementModule).into(),
127483                );
127484            engine
127485                .register_type_with_name::<Option<ExternalReplyInfo>>("Option<ExternalReplyInfo>")
127486                .build_type::<ExternalReplyInfo>()
127487                .register_static_module(
127488                    "Option<ExternalReplyInfo>",
127489                    exported_module!(ExternalReplyInfoModule).into(),
127490                );
127491            engine
127492                .register_type_with_name::<Option<File>>("Option<File>")
127493                .build_type::<File>()
127494                .register_static_module("Option<File>", exported_module!(FileModule).into());
127495            engine
127496                .register_type_with_name::<Option<f64>>("Option<f64>")
127497                .register_static_module("Option<f64>", exported_module!(f64Module).into());
127498            engine
127499                .register_type_with_name::<Option<ForumTopicClosed>>("Option<ForumTopicClosed>")
127500                .build_type::<ForumTopicClosed>()
127501                .register_static_module(
127502                    "Option<ForumTopicClosed>",
127503                    exported_module!(ForumTopicClosedModule).into(),
127504                );
127505            engine
127506                .register_type_with_name::<Option<ForumTopicCreated>>("Option<ForumTopicCreated>")
127507                .build_type::<ForumTopicCreated>()
127508                .register_static_module(
127509                    "Option<ForumTopicCreated>",
127510                    exported_module!(ForumTopicCreatedModule).into(),
127511                );
127512            engine
127513                .register_type_with_name::<Option<ForumTopicEdited>>("Option<ForumTopicEdited>")
127514                .build_type::<ForumTopicEdited>()
127515                .register_static_module(
127516                    "Option<ForumTopicEdited>",
127517                    exported_module!(ForumTopicEditedModule).into(),
127518                );
127519            engine
127520                .register_type_with_name::<Option<ForumTopicReopened>>("Option<ForumTopicReopened>")
127521                .build_type::<ForumTopicReopened>()
127522                .register_static_module(
127523                    "Option<ForumTopicReopened>",
127524                    exported_module!(ForumTopicReopenedModule).into(),
127525                );
127526            engine
127527                .register_type_with_name::<Option<Game>>("Option<Game>")
127528                .build_type::<Game>()
127529                .register_static_module("Option<Game>", exported_module!(GameModule).into());
127530            engine
127531                .register_type_with_name::<Option<GeneralForumTopicHidden>>(
127532                    "Option<GeneralForumTopicHidden>",
127533                )
127534                .build_type::<GeneralForumTopicHidden>()
127535                .register_static_module(
127536                    "Option<GeneralForumTopicHidden>",
127537                    exported_module!(GeneralForumTopicHiddenModule).into(),
127538                );
127539            engine
127540                .register_type_with_name::<Option<GeneralForumTopicUnhidden>>(
127541                    "Option<GeneralForumTopicUnhidden>",
127542                )
127543                .build_type::<GeneralForumTopicUnhidden>()
127544                .register_static_module(
127545                    "Option<GeneralForumTopicUnhidden>",
127546                    exported_module!(GeneralForumTopicUnhiddenModule).into(),
127547                );
127548            engine
127549                .register_type_with_name::<Option<Gift>>("Option<Gift>")
127550                .build_type::<Gift>()
127551                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
127552            engine
127553                .register_type_with_name::<Option<GiftInfo>>("Option<GiftInfo>")
127554                .build_type::<GiftInfo>()
127555                .register_static_module(
127556                    "Option<GiftInfo>",
127557                    exported_module!(GiftInfoModule).into(),
127558                );
127559            engine
127560                .register_type_with_name::<Option<Giveaway>>("Option<Giveaway>")
127561                .build_type::<Giveaway>()
127562                .register_static_module(
127563                    "Option<Giveaway>",
127564                    exported_module!(GiveawayModule).into(),
127565                );
127566            engine
127567                .register_type_with_name::<Option<GiveawayCompleted>>("Option<GiveawayCompleted>")
127568                .build_type::<GiveawayCompleted>()
127569                .register_static_module(
127570                    "Option<GiveawayCompleted>",
127571                    exported_module!(GiveawayCompletedModule).into(),
127572                );
127573            engine
127574                .register_type_with_name::<Option<GiveawayCreated>>("Option<GiveawayCreated>")
127575                .build_type::<GiveawayCreated>()
127576                .register_static_module(
127577                    "Option<GiveawayCreated>",
127578                    exported_module!(GiveawayCreatedModule).into(),
127579                );
127580            engine
127581                .register_type_with_name::<Option<GiveawayWinners>>("Option<GiveawayWinners>")
127582                .build_type::<GiveawayWinners>()
127583                .register_static_module(
127584                    "Option<GiveawayWinners>",
127585                    exported_module!(GiveawayWinnersModule).into(),
127586                );
127587            engine
127588                .register_type_with_name::<Option<InlineKeyboardButton>>(
127589                    "Option<InlineKeyboardButton>",
127590                )
127591                .build_type::<InlineKeyboardButton>()
127592                .register_static_module(
127593                    "Option<InlineKeyboardButton>",
127594                    exported_module!(InlineKeyboardButtonModule).into(),
127595                );
127596            engine
127597                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
127598                    "Option<InlineKeyboardMarkup>",
127599                )
127600                .build_type::<InlineKeyboardMarkup>()
127601                .register_static_module(
127602                    "Option<InlineKeyboardMarkup>",
127603                    exported_module!(InlineKeyboardMarkupModule).into(),
127604                );
127605            engine
127606                .register_type_with_name::<Option<i64>>("Option<i64>")
127607                .register_static_module("Option<i64>", exported_module!(i64Module).into());
127608            engine
127609                .register_type_with_name::<Option<Invoice>>("Option<Invoice>")
127610                .build_type::<Invoice>()
127611                .register_static_module("Option<Invoice>", exported_module!(InvoiceModule).into());
127612            engine
127613                .register_type_with_name::<Option<LinkPreviewOptions>>("Option<LinkPreviewOptions>")
127614                .build_type::<LinkPreviewOptions>()
127615                .register_static_module(
127616                    "Option<LinkPreviewOptions>",
127617                    exported_module!(LinkPreviewOptionsModule).into(),
127618                );
127619            engine
127620                .register_type_with_name::<Option<Location>>("Option<Location>")
127621                .build_type::<Location>()
127622                .register_static_module(
127623                    "Option<Location>",
127624                    exported_module!(LocationModule).into(),
127625                );
127626            engine
127627                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
127628                .build_type::<LoginUrl>()
127629                .register_static_module(
127630                    "Option<LoginUrl>",
127631                    exported_module!(LoginUrlModule).into(),
127632                );
127633            engine
127634                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
127635                .build_type::<MaskPosition>()
127636                .register_static_module(
127637                    "Option<MaskPosition>",
127638                    exported_module!(MaskPositionModule).into(),
127639                );
127640            engine
127641                .register_type_with_name::<Option<MaybeInaccessibleMessage>>(
127642                    "Option<MaybeInaccessibleMessage>",
127643                )
127644                .register_static_module(
127645                    "Option<MaybeInaccessibleMessage>",
127646                    exported_module!(MaybeInaccessibleMessageModule).into(),
127647                );
127648            engine
127649                .register_type_with_name::<Option<Message>>("Option<Message>")
127650                .build_type::<Message>()
127651                .register_static_module("Option<Message>", exported_module!(MessageModule).into());
127652            engine
127653                .register_type_with_name::<Option<MessageAutoDeleteTimerChanged>>(
127654                    "Option<MessageAutoDeleteTimerChanged>",
127655                )
127656                .build_type::<MessageAutoDeleteTimerChanged>()
127657                .register_static_module(
127658                    "Option<MessageAutoDeleteTimerChanged>",
127659                    exported_module!(MessageAutoDeleteTimerChangedModule).into(),
127660                );
127661            engine
127662                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
127663                .build_type::<MessageEntity>()
127664                .register_static_module(
127665                    "Option<MessageEntity>",
127666                    exported_module!(MessageEntityModule).into(),
127667                );
127668            engine
127669                .register_type_with_name::<Option<MessageOrigin>>("Option<MessageOrigin>")
127670                .register_static_module(
127671                    "Option<MessageOrigin>",
127672                    exported_module!(MessageOriginModule).into(),
127673                );
127674            engine
127675                .register_type_with_name::<Option<OrderInfo>>("Option<OrderInfo>")
127676                .build_type::<OrderInfo>()
127677                .register_static_module(
127678                    "Option<OrderInfo>",
127679                    exported_module!(OrderInfoModule).into(),
127680                );
127681            engine
127682                .register_type_with_name::<Option<PaidMedia>>("Option<PaidMedia>")
127683                .register_static_module(
127684                    "Option<PaidMedia>",
127685                    exported_module!(PaidMediaModule).into(),
127686                );
127687            engine
127688                .register_type_with_name::<Option<PaidMediaInfo>>("Option<PaidMediaInfo>")
127689                .build_type::<PaidMediaInfo>()
127690                .register_static_module(
127691                    "Option<PaidMediaInfo>",
127692                    exported_module!(PaidMediaInfoModule).into(),
127693                );
127694            engine
127695                .register_type_with_name::<Option<PaidMessagePriceChanged>>(
127696                    "Option<PaidMessagePriceChanged>",
127697                )
127698                .build_type::<PaidMessagePriceChanged>()
127699                .register_static_module(
127700                    "Option<PaidMessagePriceChanged>",
127701                    exported_module!(PaidMessagePriceChangedModule).into(),
127702                );
127703            engine
127704                .register_type_with_name::<Option<PassportData>>("Option<PassportData>")
127705                .build_type::<PassportData>()
127706                .register_static_module(
127707                    "Option<PassportData>",
127708                    exported_module!(PassportDataModule).into(),
127709                );
127710            engine
127711                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
127712                .build_type::<PassportFile>()
127713                .register_static_module(
127714                    "Option<PassportFile>",
127715                    exported_module!(PassportFileModule).into(),
127716                );
127717            engine
127718                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
127719                .build_type::<PhotoSize>()
127720                .register_static_module(
127721                    "Option<PhotoSize>",
127722                    exported_module!(PhotoSizeModule).into(),
127723                );
127724            engine
127725                .register_type_with_name::<Option<Poll>>("Option<Poll>")
127726                .build_type::<Poll>()
127727                .register_static_module("Option<Poll>", exported_module!(PollModule).into());
127728            engine
127729                .register_type_with_name::<Option<PollOption>>("Option<PollOption>")
127730                .build_type::<PollOption>()
127731                .register_static_module(
127732                    "Option<PollOption>",
127733                    exported_module!(PollOptionModule).into(),
127734                );
127735            engine
127736                .register_type_with_name::<Option<ProximityAlertTriggered>>(
127737                    "Option<ProximityAlertTriggered>",
127738                )
127739                .build_type::<ProximityAlertTriggered>()
127740                .register_static_module(
127741                    "Option<ProximityAlertTriggered>",
127742                    exported_module!(ProximityAlertTriggeredModule).into(),
127743                );
127744            engine
127745                .register_type_with_name::<Option<RefundedPayment>>("Option<RefundedPayment>")
127746                .build_type::<RefundedPayment>()
127747                .register_static_module(
127748                    "Option<RefundedPayment>",
127749                    exported_module!(RefundedPaymentModule).into(),
127750                );
127751            engine
127752                .register_type_with_name::<Option<SharedUser>>("Option<SharedUser>")
127753                .build_type::<SharedUser>()
127754                .register_static_module(
127755                    "Option<SharedUser>",
127756                    exported_module!(SharedUserModule).into(),
127757                );
127758            engine
127759                .register_type_with_name::<Option<ShippingAddress>>("Option<ShippingAddress>")
127760                .build_type::<ShippingAddress>()
127761                .register_static_module(
127762                    "Option<ShippingAddress>",
127763                    exported_module!(ShippingAddressModule).into(),
127764                );
127765            engine
127766                .register_type_with_name::<Option<StarAmount>>("Option<StarAmount>")
127767                .build_type::<StarAmount>()
127768                .register_static_module(
127769                    "Option<StarAmount>",
127770                    exported_module!(StarAmountModule).into(),
127771                );
127772            engine
127773                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
127774                .build_type::<Sticker>()
127775                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
127776            engine
127777                .register_type_with_name::<Option<Story>>("Option<Story>")
127778                .build_type::<Story>()
127779                .register_static_module("Option<Story>", exported_module!(StoryModule).into());
127780            engine
127781                .register_type_with_name::<Option<String>>("Option<String>")
127782                .register_static_module("Option<String>", exported_module!(StringModule).into());
127783            engine
127784                .register_type_with_name::<Option<SuccessfulPayment>>("Option<SuccessfulPayment>")
127785                .build_type::<SuccessfulPayment>()
127786                .register_static_module(
127787                    "Option<SuccessfulPayment>",
127788                    exported_module!(SuccessfulPaymentModule).into(),
127789                );
127790            engine
127791                .register_type_with_name::<Option<SuggestedPostApprovalFailed>>(
127792                    "Option<SuggestedPostApprovalFailed>",
127793                )
127794                .build_type::<SuggestedPostApprovalFailed>()
127795                .register_static_module(
127796                    "Option<SuggestedPostApprovalFailed>",
127797                    exported_module!(SuggestedPostApprovalFailedModule).into(),
127798                );
127799            engine
127800                .register_type_with_name::<Option<SuggestedPostApproved>>(
127801                    "Option<SuggestedPostApproved>",
127802                )
127803                .build_type::<SuggestedPostApproved>()
127804                .register_static_module(
127805                    "Option<SuggestedPostApproved>",
127806                    exported_module!(SuggestedPostApprovedModule).into(),
127807                );
127808            engine
127809                .register_type_with_name::<Option<SuggestedPostDeclined>>(
127810                    "Option<SuggestedPostDeclined>",
127811                )
127812                .build_type::<SuggestedPostDeclined>()
127813                .register_static_module(
127814                    "Option<SuggestedPostDeclined>",
127815                    exported_module!(SuggestedPostDeclinedModule).into(),
127816                );
127817            engine
127818                .register_type_with_name::<Option<SuggestedPostInfo>>("Option<SuggestedPostInfo>")
127819                .build_type::<SuggestedPostInfo>()
127820                .register_static_module(
127821                    "Option<SuggestedPostInfo>",
127822                    exported_module!(SuggestedPostInfoModule).into(),
127823                );
127824            engine
127825                .register_type_with_name::<Option<SuggestedPostPaid>>("Option<SuggestedPostPaid>")
127826                .build_type::<SuggestedPostPaid>()
127827                .register_static_module(
127828                    "Option<SuggestedPostPaid>",
127829                    exported_module!(SuggestedPostPaidModule).into(),
127830                );
127831            engine
127832                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
127833                .build_type::<SuggestedPostPrice>()
127834                .register_static_module(
127835                    "Option<SuggestedPostPrice>",
127836                    exported_module!(SuggestedPostPriceModule).into(),
127837                );
127838            engine
127839                .register_type_with_name::<Option<SuggestedPostRefunded>>(
127840                    "Option<SuggestedPostRefunded>",
127841                )
127842                .build_type::<SuggestedPostRefunded>()
127843                .register_static_module(
127844                    "Option<SuggestedPostRefunded>",
127845                    exported_module!(SuggestedPostRefundedModule).into(),
127846                );
127847            engine
127848                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
127849                    "Option<SwitchInlineQueryChosenChat>",
127850                )
127851                .build_type::<SwitchInlineQueryChosenChat>()
127852                .register_static_module(
127853                    "Option<SwitchInlineQueryChosenChat>",
127854                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
127855                );
127856            engine
127857                .register_type_with_name::<Option<TextQuote>>("Option<TextQuote>")
127858                .build_type::<TextQuote>()
127859                .register_static_module(
127860                    "Option<TextQuote>",
127861                    exported_module!(TextQuoteModule).into(),
127862                );
127863            engine
127864                .register_type_with_name::<Option<UniqueGift>>("Option<UniqueGift>")
127865                .build_type::<UniqueGift>()
127866                .register_static_module(
127867                    "Option<UniqueGift>",
127868                    exported_module!(UniqueGiftModule).into(),
127869                );
127870            engine
127871                .register_type_with_name::<Option<UniqueGiftBackdrop>>("Option<UniqueGiftBackdrop>")
127872                .build_type::<UniqueGiftBackdrop>()
127873                .register_static_module(
127874                    "Option<UniqueGiftBackdrop>",
127875                    exported_module!(UniqueGiftBackdropModule).into(),
127876                );
127877            engine
127878                .register_type_with_name::<Option<UniqueGiftBackdropColors>>(
127879                    "Option<UniqueGiftBackdropColors>",
127880                )
127881                .build_type::<UniqueGiftBackdropColors>()
127882                .register_static_module(
127883                    "Option<UniqueGiftBackdropColors>",
127884                    exported_module!(UniqueGiftBackdropColorsModule).into(),
127885                );
127886            engine
127887                .register_type_with_name::<Option<UniqueGiftInfo>>("Option<UniqueGiftInfo>")
127888                .build_type::<UniqueGiftInfo>()
127889                .register_static_module(
127890                    "Option<UniqueGiftInfo>",
127891                    exported_module!(UniqueGiftInfoModule).into(),
127892                );
127893            engine
127894                .register_type_with_name::<Option<UniqueGiftModel>>("Option<UniqueGiftModel>")
127895                .build_type::<UniqueGiftModel>()
127896                .register_static_module(
127897                    "Option<UniqueGiftModel>",
127898                    exported_module!(UniqueGiftModelModule).into(),
127899                );
127900            engine
127901                .register_type_with_name::<Option<UniqueGiftSymbol>>("Option<UniqueGiftSymbol>")
127902                .build_type::<UniqueGiftSymbol>()
127903                .register_static_module(
127904                    "Option<UniqueGiftSymbol>",
127905                    exported_module!(UniqueGiftSymbolModule).into(),
127906                );
127907            engine
127908                .register_type_with_name::<Option<User>>("Option<User>")
127909                .build_type::<User>()
127910                .register_static_module("Option<User>", exported_module!(UserModule).into());
127911            engine
127912                .register_type_with_name::<Option<UsersShared>>("Option<UsersShared>")
127913                .build_type::<UsersShared>()
127914                .register_static_module(
127915                    "Option<UsersShared>",
127916                    exported_module!(UsersSharedModule).into(),
127917                );
127918            engine
127919                .register_type_with_name::<Option<Venue>>("Option<Venue>")
127920                .build_type::<Venue>()
127921                .register_static_module("Option<Venue>", exported_module!(VenueModule).into());
127922            engine
127923                .register_type_with_name::<Option<Video>>("Option<Video>")
127924                .build_type::<Video>()
127925                .register_static_module("Option<Video>", exported_module!(VideoModule).into());
127926            engine
127927                .register_type_with_name::<Option<VideoChatEnded>>("Option<VideoChatEnded>")
127928                .build_type::<VideoChatEnded>()
127929                .register_static_module(
127930                    "Option<VideoChatEnded>",
127931                    exported_module!(VideoChatEndedModule).into(),
127932                );
127933            engine
127934                .register_type_with_name::<Option<VideoChatParticipantsInvited>>(
127935                    "Option<VideoChatParticipantsInvited>",
127936                )
127937                .build_type::<VideoChatParticipantsInvited>()
127938                .register_static_module(
127939                    "Option<VideoChatParticipantsInvited>",
127940                    exported_module!(VideoChatParticipantsInvitedModule).into(),
127941                );
127942            engine
127943                .register_type_with_name::<Option<VideoChatScheduled>>("Option<VideoChatScheduled>")
127944                .build_type::<VideoChatScheduled>()
127945                .register_static_module(
127946                    "Option<VideoChatScheduled>",
127947                    exported_module!(VideoChatScheduledModule).into(),
127948                );
127949            engine
127950                .register_type_with_name::<Option<VideoChatStarted>>("Option<VideoChatStarted>")
127951                .build_type::<VideoChatStarted>()
127952                .register_static_module(
127953                    "Option<VideoChatStarted>",
127954                    exported_module!(VideoChatStartedModule).into(),
127955                );
127956            engine
127957                .register_type_with_name::<Option<VideoNote>>("Option<VideoNote>")
127958                .build_type::<VideoNote>()
127959                .register_static_module(
127960                    "Option<VideoNote>",
127961                    exported_module!(VideoNoteModule).into(),
127962                );
127963            engine
127964                .register_type_with_name::<Option<Voice>>("Option<Voice>")
127965                .build_type::<Voice>()
127966                .register_static_module("Option<Voice>", exported_module!(VoiceModule).into());
127967            engine
127968                .register_type_with_name::<Option<WebAppData>>("Option<WebAppData>")
127969                .build_type::<WebAppData>()
127970                .register_static_module(
127971                    "Option<WebAppData>",
127972                    exported_module!(WebAppDataModule).into(),
127973                );
127974            engine
127975                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
127976                .build_type::<WebAppInfo>()
127977                .register_static_module(
127978                    "Option<WebAppInfo>",
127979                    exported_module!(WebAppInfoModule).into(),
127980                );
127981            engine
127982                .register_type_with_name::<Option<WriteAccessAllowed>>("Option<WriteAccessAllowed>")
127983                .build_type::<WriteAccessAllowed>()
127984                .register_static_module(
127985                    "Option<WriteAccessAllowed>",
127986                    exported_module!(WriteAccessAllowedModule).into(),
127987                );
127988        }
127989    }
127990    #[cfg(feature = "rhai")]
127991    #[allow(unused_mut)]
127992    impl rhai::CustomType for ChecklistTasksDone {
127993        fn build(mut builder: rhai::TypeBuilder<Self>) {
127994            builder.with_get("checklist_message", Self::rhai_get_checklist_message);
127995            builder.with_get(
127996                "marked_as_done_task_ids",
127997                Self::rhai_get_marked_as_done_task_ids,
127998            );
127999            builder.with_get(
128000                "marked_as_not_done_task_ids",
128001                Self::rhai_get_marked_as_not_done_task_ids,
128002            );
128003            builder.on_debug(|t| format!("{:?}", t));
128004            drop(builder);
128005        }
128006    }
128007    #[cfg(feature = "rhai")]
128008    impl SetupRhai for InputStoryContentVideo {
128009        fn setup_rhai(engine: &mut rhai::Engine) {
128010            engine.build_type::<InputStoryContentVideo>();
128011            engine
128012                .register_type_with_name::<Option<bool>>("Option<bool>")
128013                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128014            engine
128015                .register_type_with_name::<Option<f64>>("Option<f64>")
128016                .register_static_module("Option<f64>", exported_module!(f64Module).into());
128017            engine
128018                .register_type_with_name::<Option<String>>("Option<String>")
128019                .register_static_module("Option<String>", exported_module!(StringModule).into());
128020        }
128021    }
128022    #[cfg(feature = "rhai")]
128023    #[allow(unused_mut)]
128024    impl rhai::CustomType for InputStoryContentVideo {
128025        fn build(mut builder: rhai::TypeBuilder<Self>) {
128026            builder.with_get("tg_type", Self::rhai_get_tg_type);
128027            builder.with_get("video", Self::rhai_get_video);
128028            builder.with_get("duration", Self::rhai_get_duration);
128029            builder.with_get(
128030                "cover_frame_timestamp",
128031                Self::rhai_get_cover_frame_timestamp,
128032            );
128033            builder.with_get("is_animation", Self::rhai_get_is_animation);
128034            builder.on_debug(|t| format!("{:?}", t));
128035            drop(builder);
128036        }
128037    }
128038    #[cfg(feature = "rhai")]
128039    impl SetupRhai for BackgroundTypeChatTheme {
128040        fn setup_rhai(engine: &mut rhai::Engine) {
128041            engine.build_type::<BackgroundTypeChatTheme>();
128042            engine
128043                .register_type_with_name::<Option<String>>("Option<String>")
128044                .register_static_module("Option<String>", exported_module!(StringModule).into());
128045        }
128046    }
128047    #[cfg(feature = "rhai")]
128048    #[allow(unused_mut)]
128049    impl rhai::CustomType for BackgroundTypeChatTheme {
128050        fn build(mut builder: rhai::TypeBuilder<Self>) {
128051            builder.with_get("tg_type", Self::rhai_get_tg_type);
128052            builder.with_get("theme_name", Self::rhai_get_theme_name);
128053            builder.on_debug(|t| format!("{:?}", t));
128054            drop(builder);
128055        }
128056    }
128057    #[cfg(feature = "rhai")]
128058    impl SetupRhai for InaccessibleMessage {
128059        fn setup_rhai(engine: &mut rhai::Engine) {
128060            engine.build_type::<InaccessibleMessage>();
128061            engine
128062                .register_type_with_name::<Option<bool>>("Option<bool>")
128063                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128064            engine
128065                .register_type_with_name::<Option<Chat>>("Option<Chat>")
128066                .build_type::<Chat>()
128067                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
128068            engine
128069                .register_type_with_name::<Option<i64>>("Option<i64>")
128070                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128071            engine
128072                .register_type_with_name::<Option<String>>("Option<String>")
128073                .register_static_module("Option<String>", exported_module!(StringModule).into());
128074        }
128075    }
128076    #[cfg(feature = "rhai")]
128077    #[allow(unused_mut)]
128078    impl rhai::CustomType for InaccessibleMessage {
128079        fn build(mut builder: rhai::TypeBuilder<Self>) {
128080            builder.with_get("chat", Self::rhai_get_chat);
128081            builder.with_get("message_id", Self::rhai_get_message_id);
128082            builder.with_get("date", Self::rhai_get_date);
128083            builder.on_debug(|t| format!("{:?}", t));
128084            drop(builder);
128085        }
128086    }
128087    #[cfg(feature = "rhai")]
128088    impl SetupRhai for InputChecklist {
128089        fn setup_rhai(engine: &mut rhai::Engine) {
128090            engine.build_type::<InputChecklist>();
128091            engine
128092                .register_type_with_name::<Option<bool>>("Option<bool>")
128093                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128094            engine
128095                .register_type_with_name::<Option<InputChecklistTask>>("Option<InputChecklistTask>")
128096                .build_type::<InputChecklistTask>()
128097                .register_static_module(
128098                    "Option<InputChecklistTask>",
128099                    exported_module!(InputChecklistTaskModule).into(),
128100                );
128101            engine
128102                .register_type_with_name::<Option<i64>>("Option<i64>")
128103                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128104            engine
128105                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
128106                .build_type::<MessageEntity>()
128107                .register_static_module(
128108                    "Option<MessageEntity>",
128109                    exported_module!(MessageEntityModule).into(),
128110                );
128111            engine
128112                .register_type_with_name::<Option<String>>("Option<String>")
128113                .register_static_module("Option<String>", exported_module!(StringModule).into());
128114            engine
128115                .register_type_with_name::<Option<User>>("Option<User>")
128116                .build_type::<User>()
128117                .register_static_module("Option<User>", exported_module!(UserModule).into());
128118        }
128119    }
128120    #[cfg(feature = "rhai")]
128121    #[allow(unused_mut)]
128122    impl rhai::CustomType for InputChecklist {
128123        fn build(mut builder: rhai::TypeBuilder<Self>) {
128124            builder.with_get("title", Self::rhai_get_title);
128125            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
128126            builder.with_get("title_entities", Self::rhai_get_title_entities);
128127            builder.with_get("tasks", Self::rhai_get_tasks);
128128            builder.with_get("others_can_add_tasks", Self::rhai_get_others_can_add_tasks);
128129            builder.with_get(
128130                "others_can_mark_tasks_as_done",
128131                Self::rhai_get_others_can_mark_tasks_as_done,
128132            );
128133            builder.on_debug(|t| format!("{:?}", t));
128134            drop(builder);
128135        }
128136    }
128137    #[cfg(feature = "rhai")]
128138    impl SetupRhai for SuggestedPostInfo {
128139        fn setup_rhai(engine: &mut rhai::Engine) {
128140            engine.build_type::<SuggestedPostInfo>();
128141            engine
128142                .register_type_with_name::<Option<i64>>("Option<i64>")
128143                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128144            engine
128145                .register_type_with_name::<Option<String>>("Option<String>")
128146                .register_static_module("Option<String>", exported_module!(StringModule).into());
128147            engine
128148                .register_type_with_name::<Option<SuggestedPostPrice>>("Option<SuggestedPostPrice>")
128149                .build_type::<SuggestedPostPrice>()
128150                .register_static_module(
128151                    "Option<SuggestedPostPrice>",
128152                    exported_module!(SuggestedPostPriceModule).into(),
128153                );
128154        }
128155    }
128156    #[cfg(feature = "rhai")]
128157    #[allow(unused_mut)]
128158    impl rhai::CustomType for SuggestedPostInfo {
128159        fn build(mut builder: rhai::TypeBuilder<Self>) {
128160            builder.with_get("state", Self::rhai_get_state);
128161            builder.with_get("price", Self::rhai_get_price);
128162            builder.with_get("send_date", Self::rhai_get_send_date);
128163            builder.on_debug(|t| format!("{:?}", t));
128164            drop(builder);
128165        }
128166    }
128167    #[cfg(feature = "rhai")]
128168    impl SetupRhai for SwitchInlineQueryChosenChat {
128169        fn setup_rhai(engine: &mut rhai::Engine) {
128170            engine.build_type::<SwitchInlineQueryChosenChat>();
128171            engine
128172                .register_type_with_name::<Option<bool>>("Option<bool>")
128173                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128174            engine
128175                .register_type_with_name::<Option<String>>("Option<String>")
128176                .register_static_module("Option<String>", exported_module!(StringModule).into());
128177        }
128178    }
128179    #[cfg(feature = "rhai")]
128180    #[allow(unused_mut)]
128181    impl rhai::CustomType for SwitchInlineQueryChosenChat {
128182        fn build(mut builder: rhai::TypeBuilder<Self>) {
128183            builder.with_get("query", Self::rhai_get_query);
128184            builder.with_get("allow_user_chats", Self::rhai_get_allow_user_chats);
128185            builder.with_get("allow_bot_chats", Self::rhai_get_allow_bot_chats);
128186            builder.with_get("allow_group_chats", Self::rhai_get_allow_group_chats);
128187            builder.with_get("allow_channel_chats", Self::rhai_get_allow_channel_chats);
128188            builder.on_debug(|t| format!("{:?}", t));
128189            drop(builder);
128190        }
128191    }
128192    #[cfg(feature = "rhai")]
128193    impl SetupRhai for AcceptedGiftTypes {
128194        fn setup_rhai(engine: &mut rhai::Engine) {
128195            engine.build_type::<AcceptedGiftTypes>();
128196            engine
128197                .register_type_with_name::<Option<bool>>("Option<bool>")
128198                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128199        }
128200    }
128201    #[cfg(feature = "rhai")]
128202    #[allow(unused_mut)]
128203    impl rhai::CustomType for AcceptedGiftTypes {
128204        fn build(mut builder: rhai::TypeBuilder<Self>) {
128205            builder.with_get("unlimited_gifts", Self::rhai_get_unlimited_gifts);
128206            builder.with_get("limited_gifts", Self::rhai_get_limited_gifts);
128207            builder.with_get("unique_gifts", Self::rhai_get_unique_gifts);
128208            builder.with_get("premium_subscription", Self::rhai_get_premium_subscription);
128209            builder.on_debug(|t| format!("{:?}", t));
128210            drop(builder);
128211        }
128212    }
128213    #[cfg(feature = "rhai")]
128214    impl SetupRhai for PassportElementErrorTranslationFile {
128215        fn setup_rhai(engine: &mut rhai::Engine) {
128216            engine.build_type::<PassportElementErrorTranslationFile>();
128217            engine
128218                .register_type_with_name::<Option<String>>("Option<String>")
128219                .register_static_module("Option<String>", exported_module!(StringModule).into());
128220        }
128221    }
128222    #[cfg(feature = "rhai")]
128223    #[allow(unused_mut)]
128224    impl rhai::CustomType for PassportElementErrorTranslationFile {
128225        fn build(mut builder: rhai::TypeBuilder<Self>) {
128226            builder.with_get("source", Self::rhai_get_source);
128227            builder.with_get("tg_type", Self::rhai_get_tg_type);
128228            builder.with_get("file_hash", Self::rhai_get_file_hash);
128229            builder.with_get("message", Self::rhai_get_message);
128230            builder.on_debug(|t| format!("{:?}", t));
128231            drop(builder);
128232        }
128233    }
128234    #[cfg(feature = "rhai")]
128235    impl SetupRhai for BusinessLocation {
128236        fn setup_rhai(engine: &mut rhai::Engine) {
128237            engine.build_type::<BusinessLocation>();
128238            engine
128239                .register_type_with_name::<Option<f64>>("Option<f64>")
128240                .register_static_module("Option<f64>", exported_module!(f64Module).into());
128241            engine
128242                .register_type_with_name::<Option<i64>>("Option<i64>")
128243                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128244            engine
128245                .register_type_with_name::<Option<Location>>("Option<Location>")
128246                .build_type::<Location>()
128247                .register_static_module(
128248                    "Option<Location>",
128249                    exported_module!(LocationModule).into(),
128250                );
128251            engine
128252                .register_type_with_name::<Option<String>>("Option<String>")
128253                .register_static_module("Option<String>", exported_module!(StringModule).into());
128254        }
128255    }
128256    #[cfg(feature = "rhai")]
128257    #[allow(unused_mut)]
128258    impl rhai::CustomType for BusinessLocation {
128259        fn build(mut builder: rhai::TypeBuilder<Self>) {
128260            builder.with_get("address", Self::rhai_get_address);
128261            builder.with_get("location", Self::rhai_get_location);
128262            builder.on_debug(|t| format!("{:?}", t));
128263            drop(builder);
128264        }
128265    }
128266    #[cfg(feature = "rhai")]
128267    impl SetupRhai for AffiliateInfo {
128268        fn setup_rhai(engine: &mut rhai::Engine) {
128269            engine.build_type::<AffiliateInfo>();
128270            engine
128271                .register_type_with_name::<Option<bool>>("Option<bool>")
128272                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128273            engine
128274                .register_type_with_name::<Option<Chat>>("Option<Chat>")
128275                .build_type::<Chat>()
128276                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
128277            engine
128278                .register_type_with_name::<Option<i64>>("Option<i64>")
128279                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128280            engine
128281                .register_type_with_name::<Option<String>>("Option<String>")
128282                .register_static_module("Option<String>", exported_module!(StringModule).into());
128283            engine
128284                .register_type_with_name::<Option<User>>("Option<User>")
128285                .build_type::<User>()
128286                .register_static_module("Option<User>", exported_module!(UserModule).into());
128287        }
128288    }
128289    #[cfg(feature = "rhai")]
128290    #[allow(unused_mut)]
128291    impl rhai::CustomType for AffiliateInfo {
128292        fn build(mut builder: rhai::TypeBuilder<Self>) {
128293            builder.with_get("affiliate_user", Self::rhai_get_affiliate_user);
128294            builder.with_get("affiliate_chat", Self::rhai_get_affiliate_chat);
128295            builder.with_get("commission_per_mille", Self::rhai_get_commission_per_mille);
128296            builder.with_get("amount", Self::rhai_get_amount);
128297            builder.with_get("nanostar_amount", Self::rhai_get_nanostar_amount);
128298            builder.on_debug(|t| format!("{:?}", t));
128299            drop(builder);
128300        }
128301    }
128302    #[cfg(feature = "rhai")]
128303    impl SetupRhai for MessageOriginChat {
128304        fn setup_rhai(engine: &mut rhai::Engine) {
128305            engine.build_type::<MessageOriginChat>();
128306            engine
128307                .register_type_with_name::<Option<bool>>("Option<bool>")
128308                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128309            engine
128310                .register_type_with_name::<Option<Chat>>("Option<Chat>")
128311                .build_type::<Chat>()
128312                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
128313            engine
128314                .register_type_with_name::<Option<i64>>("Option<i64>")
128315                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128316            engine
128317                .register_type_with_name::<Option<String>>("Option<String>")
128318                .register_static_module("Option<String>", exported_module!(StringModule).into());
128319        }
128320    }
128321    #[cfg(feature = "rhai")]
128322    #[allow(unused_mut)]
128323    impl rhai::CustomType for MessageOriginChat {
128324        fn build(mut builder: rhai::TypeBuilder<Self>) {
128325            builder.with_get("tg_type", Self::rhai_get_tg_type);
128326            builder.with_get("date", Self::rhai_get_date);
128327            builder.with_get("sender_chat", Self::rhai_get_sender_chat);
128328            builder.with_get("author_signature", Self::rhai_get_author_signature);
128329            builder.on_debug(|t| format!("{:?}", t));
128330            drop(builder);
128331        }
128332    }
128333    #[cfg(feature = "rhai")]
128334    impl SetupRhai for BotCommandScopeChat {
128335        fn setup_rhai(engine: &mut rhai::Engine) {
128336            engine.build_type::<BotCommandScopeChat>();
128337            engine
128338                .register_type_with_name::<Option<i64>>("Option<i64>")
128339                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128340            engine
128341                .register_type_with_name::<Option<String>>("Option<String>")
128342                .register_static_module("Option<String>", exported_module!(StringModule).into());
128343        }
128344    }
128345    #[cfg(feature = "rhai")]
128346    #[allow(unused_mut)]
128347    impl rhai::CustomType for BotCommandScopeChat {
128348        fn build(mut builder: rhai::TypeBuilder<Self>) {
128349            builder.with_get("tg_type", Self::rhai_get_tg_type);
128350            builder.with_get("chat_id", Self::rhai_get_chat_id);
128351            builder.on_debug(|t| format!("{:?}", t));
128352            drop(builder);
128353        }
128354    }
128355    #[cfg(feature = "rhai")]
128356    impl SetupRhai for PassportElementErrorReverseSide {
128357        fn setup_rhai(engine: &mut rhai::Engine) {
128358            engine.build_type::<PassportElementErrorReverseSide>();
128359            engine
128360                .register_type_with_name::<Option<String>>("Option<String>")
128361                .register_static_module("Option<String>", exported_module!(StringModule).into());
128362        }
128363    }
128364    #[cfg(feature = "rhai")]
128365    #[allow(unused_mut)]
128366    impl rhai::CustomType for PassportElementErrorReverseSide {
128367        fn build(mut builder: rhai::TypeBuilder<Self>) {
128368            builder.with_get("source", Self::rhai_get_source);
128369            builder.with_get("tg_type", Self::rhai_get_tg_type);
128370            builder.with_get("file_hash", Self::rhai_get_file_hash);
128371            builder.with_get("message", Self::rhai_get_message);
128372            builder.on_debug(|t| format!("{:?}", t));
128373            drop(builder);
128374        }
128375    }
128376    #[cfg(feature = "rhai")]
128377    impl SetupRhai for InlineQueryResultPhoto {
128378        fn setup_rhai(engine: &mut rhai::Engine) {
128379            engine.build_type::<InlineQueryResultPhoto>();
128380            engine
128381                .register_type_with_name::<Option<bool>>("Option<bool>")
128382                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128383            engine
128384                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
128385                .build_type::<CallbackGame>()
128386                .register_static_module(
128387                    "Option<CallbackGame>",
128388                    exported_module!(CallbackGameModule).into(),
128389                );
128390            engine
128391                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
128392                .build_type::<CopyTextButton>()
128393                .register_static_module(
128394                    "Option<CopyTextButton>",
128395                    exported_module!(CopyTextButtonModule).into(),
128396                );
128397            engine
128398                .register_type_with_name::<Option<InlineKeyboardButton>>(
128399                    "Option<InlineKeyboardButton>",
128400                )
128401                .build_type::<InlineKeyboardButton>()
128402                .register_static_module(
128403                    "Option<InlineKeyboardButton>",
128404                    exported_module!(InlineKeyboardButtonModule).into(),
128405                );
128406            engine
128407                .register_type_with_name::<Option<InlineKeyboardMarkup>>(
128408                    "Option<InlineKeyboardMarkup>",
128409                )
128410                .build_type::<InlineKeyboardMarkup>()
128411                .register_static_module(
128412                    "Option<InlineKeyboardMarkup>",
128413                    exported_module!(InlineKeyboardMarkupModule).into(),
128414                );
128415            engine
128416                .register_type_with_name::<Option<InputMessageContent>>(
128417                    "Option<InputMessageContent>",
128418                )
128419                .register_static_module(
128420                    "Option<InputMessageContent>",
128421                    exported_module!(InputMessageContentModule).into(),
128422                );
128423            engine
128424                .register_type_with_name::<Option<i64>>("Option<i64>")
128425                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128426            engine
128427                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
128428                .build_type::<LoginUrl>()
128429                .register_static_module(
128430                    "Option<LoginUrl>",
128431                    exported_module!(LoginUrlModule).into(),
128432                );
128433            engine
128434                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
128435                .build_type::<MessageEntity>()
128436                .register_static_module(
128437                    "Option<MessageEntity>",
128438                    exported_module!(MessageEntityModule).into(),
128439                );
128440            engine
128441                .register_type_with_name::<Option<String>>("Option<String>")
128442                .register_static_module("Option<String>", exported_module!(StringModule).into());
128443            engine
128444                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
128445                    "Option<SwitchInlineQueryChosenChat>",
128446                )
128447                .build_type::<SwitchInlineQueryChosenChat>()
128448                .register_static_module(
128449                    "Option<SwitchInlineQueryChosenChat>",
128450                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
128451                );
128452            engine
128453                .register_type_with_name::<Option<User>>("Option<User>")
128454                .build_type::<User>()
128455                .register_static_module("Option<User>", exported_module!(UserModule).into());
128456            engine
128457                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
128458                .build_type::<WebAppInfo>()
128459                .register_static_module(
128460                    "Option<WebAppInfo>",
128461                    exported_module!(WebAppInfoModule).into(),
128462                );
128463        }
128464    }
128465    #[cfg(feature = "rhai")]
128466    #[allow(unused_mut)]
128467    impl rhai::CustomType for InlineQueryResultPhoto {
128468        fn build(mut builder: rhai::TypeBuilder<Self>) {
128469            builder.with_get("tg_type", Self::rhai_get_tg_type);
128470            builder.with_get("id", Self::rhai_get_id);
128471            builder.with_get("photo_url", Self::rhai_get_photo_url);
128472            builder.with_get("thumbnail_url", Self::rhai_get_thumbnail_url);
128473            builder.with_get("photo_width", Self::rhai_get_photo_width);
128474            builder.with_get("photo_height", Self::rhai_get_photo_height);
128475            builder.with_get("title", Self::rhai_get_title);
128476            builder.with_get("description", Self::rhai_get_description);
128477            builder.with_get("caption", Self::rhai_get_caption);
128478            builder.with_get("parse_mode", Self::rhai_get_parse_mode);
128479            builder.with_get("caption_entities", Self::rhai_get_caption_entities);
128480            builder.with_get(
128481                "show_caption_above_media",
128482                Self::rhai_get_show_caption_above_media,
128483            );
128484            builder.with_get("reply_markup", Self::rhai_get_reply_markup);
128485            builder.with_get(
128486                "input_message_content",
128487                Self::rhai_get_input_message_content,
128488            );
128489            builder.on_debug(|t| format!("{:?}", t));
128490            drop(builder);
128491        }
128492    }
128493    #[cfg(feature = "rhai")]
128494    impl SetupRhai for StoryAreaTypeLink {
128495        fn setup_rhai(engine: &mut rhai::Engine) {
128496            engine.build_type::<StoryAreaTypeLink>();
128497            engine
128498                .register_type_with_name::<Option<String>>("Option<String>")
128499                .register_static_module("Option<String>", exported_module!(StringModule).into());
128500        }
128501    }
128502    #[cfg(feature = "rhai")]
128503    #[allow(unused_mut)]
128504    impl rhai::CustomType for StoryAreaTypeLink {
128505        fn build(mut builder: rhai::TypeBuilder<Self>) {
128506            builder.with_get("tg_type", Self::rhai_get_tg_type);
128507            builder.with_get("url", Self::rhai_get_url);
128508            builder.on_debug(|t| format!("{:?}", t));
128509            drop(builder);
128510        }
128511    }
128512    #[cfg(feature = "rhai")]
128513    impl SetupRhai for InputSticker {
128514        fn setup_rhai(engine: &mut rhai::Engine) {
128515            engine.build_type::<InputSticker>();
128516            engine
128517                .register_type_with_name::<Option<f64>>("Option<f64>")
128518                .register_static_module("Option<f64>", exported_module!(f64Module).into());
128519            engine
128520                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
128521                .build_type::<MaskPosition>()
128522                .register_static_module(
128523                    "Option<MaskPosition>",
128524                    exported_module!(MaskPositionModule).into(),
128525                );
128526            engine
128527                .register_type_with_name::<Option<String>>("Option<String>")
128528                .register_static_module("Option<String>", exported_module!(StringModule).into());
128529        }
128530    }
128531    #[cfg(feature = "rhai")]
128532    #[allow(unused_mut)]
128533    impl rhai::CustomType for InputSticker {
128534        fn build(mut builder: rhai::TypeBuilder<Self>) {
128535            builder.with_get("sticker", Self::rhai_get_sticker);
128536            builder.with_get("format", Self::rhai_get_format);
128537            builder.with_get("emoji_list", Self::rhai_get_emoji_list);
128538            builder.with_get("mask_position", Self::rhai_get_mask_position);
128539            builder.with_get("keywords", Self::rhai_get_keywords);
128540            builder.on_debug(|t| format!("{:?}", t));
128541            drop(builder);
128542        }
128543    }
128544    #[cfg(feature = "rhai")]
128545    impl SetupRhai for InputPaidMediaPhoto {
128546        fn setup_rhai(engine: &mut rhai::Engine) {
128547            engine.build_type::<InputPaidMediaPhoto>();
128548            engine
128549                .register_type_with_name::<Option<String>>("Option<String>")
128550                .register_static_module("Option<String>", exported_module!(StringModule).into());
128551        }
128552    }
128553    #[cfg(feature = "rhai")]
128554    #[allow(unused_mut)]
128555    impl rhai::CustomType for InputPaidMediaPhoto {
128556        fn build(mut builder: rhai::TypeBuilder<Self>) {
128557            builder.with_get("tg_type", Self::rhai_get_tg_type);
128558            builder.with_get("media", Self::rhai_get_media);
128559            builder.on_debug(|t| format!("{:?}", t));
128560            drop(builder);
128561        }
128562    }
128563    #[cfg(feature = "rhai")]
128564    impl SetupRhai for InputProfilePhotoStatic {
128565        fn setup_rhai(engine: &mut rhai::Engine) {
128566            engine.build_type::<InputProfilePhotoStatic>();
128567            engine
128568                .register_type_with_name::<Option<String>>("Option<String>")
128569                .register_static_module("Option<String>", exported_module!(StringModule).into());
128570        }
128571    }
128572    #[cfg(feature = "rhai")]
128573    #[allow(unused_mut)]
128574    impl rhai::CustomType for InputProfilePhotoStatic {
128575        fn build(mut builder: rhai::TypeBuilder<Self>) {
128576            builder.with_get("tg_type", Self::rhai_get_tg_type);
128577            builder.with_get("photo", Self::rhai_get_photo);
128578            builder.on_debug(|t| format!("{:?}", t));
128579            drop(builder);
128580        }
128581    }
128582    #[cfg(feature = "rhai")]
128583    impl SetupRhai for TransactionPartnerChat {
128584        fn setup_rhai(engine: &mut rhai::Engine) {
128585            engine.build_type::<TransactionPartnerChat>();
128586            engine
128587                .register_type_with_name::<Option<bool>>("Option<bool>")
128588                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128589            engine
128590                .register_type_with_name::<Option<Chat>>("Option<Chat>")
128591                .build_type::<Chat>()
128592                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
128593            engine
128594                .register_type_with_name::<Option<File>>("Option<File>")
128595                .build_type::<File>()
128596                .register_static_module("Option<File>", exported_module!(FileModule).into());
128597            engine
128598                .register_type_with_name::<Option<f64>>("Option<f64>")
128599                .register_static_module("Option<f64>", exported_module!(f64Module).into());
128600            engine
128601                .register_type_with_name::<Option<Gift>>("Option<Gift>")
128602                .build_type::<Gift>()
128603                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
128604            engine
128605                .register_type_with_name::<Option<i64>>("Option<i64>")
128606                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128607            engine
128608                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
128609                .build_type::<MaskPosition>()
128610                .register_static_module(
128611                    "Option<MaskPosition>",
128612                    exported_module!(MaskPositionModule).into(),
128613                );
128614            engine
128615                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
128616                .build_type::<PhotoSize>()
128617                .register_static_module(
128618                    "Option<PhotoSize>",
128619                    exported_module!(PhotoSizeModule).into(),
128620                );
128621            engine
128622                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
128623                .build_type::<Sticker>()
128624                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
128625            engine
128626                .register_type_with_name::<Option<String>>("Option<String>")
128627                .register_static_module("Option<String>", exported_module!(StringModule).into());
128628        }
128629    }
128630    #[cfg(feature = "rhai")]
128631    #[allow(unused_mut)]
128632    impl rhai::CustomType for TransactionPartnerChat {
128633        fn build(mut builder: rhai::TypeBuilder<Self>) {
128634            builder.with_get("tg_type", Self::rhai_get_tg_type);
128635            builder.with_get("chat", Self::rhai_get_chat);
128636            builder.with_get("gift", Self::rhai_get_gift);
128637            builder.on_debug(|t| format!("{:?}", t));
128638            drop(builder);
128639        }
128640    }
128641    #[cfg(feature = "rhai")]
128642    impl SetupRhai for BotCommandScopeChatAdministrators {
128643        fn setup_rhai(engine: &mut rhai::Engine) {
128644            engine.build_type::<BotCommandScopeChatAdministrators>();
128645            engine
128646                .register_type_with_name::<Option<i64>>("Option<i64>")
128647                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128648            engine
128649                .register_type_with_name::<Option<String>>("Option<String>")
128650                .register_static_module("Option<String>", exported_module!(StringModule).into());
128651        }
128652    }
128653    #[cfg(feature = "rhai")]
128654    #[allow(unused_mut)]
128655    impl rhai::CustomType for BotCommandScopeChatAdministrators {
128656        fn build(mut builder: rhai::TypeBuilder<Self>) {
128657            builder.with_get("tg_type", Self::rhai_get_tg_type);
128658            builder.with_get("chat_id", Self::rhai_get_chat_id);
128659            builder.on_debug(|t| format!("{:?}", t));
128660            drop(builder);
128661        }
128662    }
128663    #[cfg(feature = "rhai")]
128664    impl SetupRhai for ForumTopicClosed {
128665        fn setup_rhai(engine: &mut rhai::Engine) {
128666            engine.build_type::<ForumTopicClosed>();
128667        }
128668    }
128669    #[cfg(feature = "rhai")]
128670    #[allow(unused_mut)]
128671    impl rhai::CustomType for ForumTopicClosed {
128672        fn build(mut builder: rhai::TypeBuilder<Self>) {
128673            builder.on_debug(|t| format!("{:?}", t));
128674            drop(builder);
128675        }
128676    }
128677    #[cfg(feature = "rhai")]
128678    impl SetupRhai for PaidMediaPurchased {
128679        fn setup_rhai(engine: &mut rhai::Engine) {
128680            engine.build_type::<PaidMediaPurchased>();
128681            engine
128682                .register_type_with_name::<Option<bool>>("Option<bool>")
128683                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128684            engine
128685                .register_type_with_name::<Option<i64>>("Option<i64>")
128686                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128687            engine
128688                .register_type_with_name::<Option<String>>("Option<String>")
128689                .register_static_module("Option<String>", exported_module!(StringModule).into());
128690            engine
128691                .register_type_with_name::<Option<User>>("Option<User>")
128692                .build_type::<User>()
128693                .register_static_module("Option<User>", exported_module!(UserModule).into());
128694        }
128695    }
128696    #[cfg(feature = "rhai")]
128697    #[allow(unused_mut)]
128698    impl rhai::CustomType for PaidMediaPurchased {
128699        fn build(mut builder: rhai::TypeBuilder<Self>) {
128700            builder.with_get("from", Self::rhai_get_from);
128701            builder.with_get("paid_media_payload", Self::rhai_get_paid_media_payload);
128702            builder.on_debug(|t| format!("{:?}", t));
128703            drop(builder);
128704        }
128705    }
128706    #[cfg(feature = "rhai")]
128707    impl SetupRhai for ChatLocation {
128708        fn setup_rhai(engine: &mut rhai::Engine) {
128709            engine.build_type::<ChatLocation>();
128710            engine
128711                .register_type_with_name::<Option<f64>>("Option<f64>")
128712                .register_static_module("Option<f64>", exported_module!(f64Module).into());
128713            engine
128714                .register_type_with_name::<Option<i64>>("Option<i64>")
128715                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128716            engine
128717                .register_type_with_name::<Option<Location>>("Option<Location>")
128718                .build_type::<Location>()
128719                .register_static_module(
128720                    "Option<Location>",
128721                    exported_module!(LocationModule).into(),
128722                );
128723            engine
128724                .register_type_with_name::<Option<String>>("Option<String>")
128725                .register_static_module("Option<String>", exported_module!(StringModule).into());
128726        }
128727    }
128728    #[cfg(feature = "rhai")]
128729    #[allow(unused_mut)]
128730    impl rhai::CustomType for ChatLocation {
128731        fn build(mut builder: rhai::TypeBuilder<Self>) {
128732            builder.with_get("location", Self::rhai_get_location);
128733            builder.with_get("address", Self::rhai_get_address);
128734            builder.on_debug(|t| format!("{:?}", t));
128735            drop(builder);
128736        }
128737    }
128738    #[cfg(feature = "rhai")]
128739    impl SetupRhai for VideoChatStarted {
128740        fn setup_rhai(engine: &mut rhai::Engine) {
128741            engine.build_type::<VideoChatStarted>();
128742        }
128743    }
128744    #[cfg(feature = "rhai")]
128745    #[allow(unused_mut)]
128746    impl rhai::CustomType for VideoChatStarted {
128747        fn build(mut builder: rhai::TypeBuilder<Self>) {
128748            builder.on_debug(|t| format!("{:?}", t));
128749            drop(builder);
128750        }
128751    }
128752    #[cfg(feature = "rhai")]
128753    impl SetupRhai for ChatMemberUpdated {
128754        fn setup_rhai(engine: &mut rhai::Engine) {
128755            engine.build_type::<ChatMemberUpdated>();
128756            engine
128757                .register_type_with_name::<Option<bool>>("Option<bool>")
128758                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128759            engine
128760                .register_type_with_name::<Option<Chat>>("Option<Chat>")
128761                .build_type::<Chat>()
128762                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
128763            engine
128764                .register_type_with_name::<Option<ChatInviteLink>>("Option<ChatInviteLink>")
128765                .build_type::<ChatInviteLink>()
128766                .register_static_module(
128767                    "Option<ChatInviteLink>",
128768                    exported_module!(ChatInviteLinkModule).into(),
128769                );
128770            engine
128771                .register_type_with_name::<Option<ChatMember>>("Option<ChatMember>")
128772                .register_static_module(
128773                    "Option<ChatMember>",
128774                    exported_module!(ChatMemberModule).into(),
128775                );
128776            engine
128777                .register_type_with_name::<Option<i64>>("Option<i64>")
128778                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128779            engine
128780                .register_type_with_name::<Option<String>>("Option<String>")
128781                .register_static_module("Option<String>", exported_module!(StringModule).into());
128782            engine
128783                .register_type_with_name::<Option<User>>("Option<User>")
128784                .build_type::<User>()
128785                .register_static_module("Option<User>", exported_module!(UserModule).into());
128786        }
128787    }
128788    #[cfg(feature = "rhai")]
128789    #[allow(unused_mut)]
128790    impl rhai::CustomType for ChatMemberUpdated {
128791        fn build(mut builder: rhai::TypeBuilder<Self>) {
128792            builder.with_get("chat", Self::rhai_get_chat);
128793            builder.with_get("from", Self::rhai_get_from);
128794            builder.with_get("date", Self::rhai_get_date);
128795            builder.with_get("old_chat_member", Self::rhai_get_old_chat_member);
128796            builder.with_get("new_chat_member", Self::rhai_get_new_chat_member);
128797            builder.with_get("invite_link", Self::rhai_get_invite_link);
128798            builder.with_get("via_join_request", Self::rhai_get_via_join_request);
128799            builder.with_get(
128800                "via_chat_folder_invite_link",
128801                Self::rhai_get_via_chat_folder_invite_link,
128802            );
128803            builder.on_debug(|t| format!("{:?}", t));
128804            drop(builder);
128805        }
128806    }
128807    #[cfg(feature = "rhai")]
128808    impl SetupRhai for Venue {
128809        fn setup_rhai(engine: &mut rhai::Engine) {
128810            engine.build_type::<Venue>();
128811            engine
128812                .register_type_with_name::<Option<f64>>("Option<f64>")
128813                .register_static_module("Option<f64>", exported_module!(f64Module).into());
128814            engine
128815                .register_type_with_name::<Option<i64>>("Option<i64>")
128816                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128817            engine
128818                .register_type_with_name::<Option<Location>>("Option<Location>")
128819                .build_type::<Location>()
128820                .register_static_module(
128821                    "Option<Location>",
128822                    exported_module!(LocationModule).into(),
128823                );
128824            engine
128825                .register_type_with_name::<Option<String>>("Option<String>")
128826                .register_static_module("Option<String>", exported_module!(StringModule).into());
128827        }
128828    }
128829    #[cfg(feature = "rhai")]
128830    #[allow(unused_mut)]
128831    impl rhai::CustomType for Venue {
128832        fn build(mut builder: rhai::TypeBuilder<Self>) {
128833            builder.with_get("location", Self::rhai_get_location);
128834            builder.with_get("title", Self::rhai_get_title);
128835            builder.with_get("address", Self::rhai_get_address);
128836            builder.with_get("foursquare_id", Self::rhai_get_foursquare_id);
128837            builder.with_get("foursquare_type", Self::rhai_get_foursquare_type);
128838            builder.with_get("google_place_id", Self::rhai_get_google_place_id);
128839            builder.with_get("google_place_type", Self::rhai_get_google_place_type);
128840            builder.on_debug(|t| format!("{:?}", t));
128841            drop(builder);
128842        }
128843    }
128844    #[cfg(feature = "rhai")]
128845    impl SetupRhai for ChatBoostAdded {
128846        fn setup_rhai(engine: &mut rhai::Engine) {
128847            engine.build_type::<ChatBoostAdded>();
128848            engine
128849                .register_type_with_name::<Option<i64>>("Option<i64>")
128850                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128851        }
128852    }
128853    #[cfg(feature = "rhai")]
128854    #[allow(unused_mut)]
128855    impl rhai::CustomType for ChatBoostAdded {
128856        fn build(mut builder: rhai::TypeBuilder<Self>) {
128857            builder.with_get("boost_count", Self::rhai_get_boost_count);
128858            builder.on_debug(|t| format!("{:?}", t));
128859            drop(builder);
128860        }
128861    }
128862    #[cfg(feature = "rhai")]
128863    impl SetupRhai for ReactionTypeCustomEmoji {
128864        fn setup_rhai(engine: &mut rhai::Engine) {
128865            engine.build_type::<ReactionTypeCustomEmoji>();
128866            engine
128867                .register_type_with_name::<Option<String>>("Option<String>")
128868                .register_static_module("Option<String>", exported_module!(StringModule).into());
128869        }
128870    }
128871    #[cfg(feature = "rhai")]
128872    #[allow(unused_mut)]
128873    impl rhai::CustomType for ReactionTypeCustomEmoji {
128874        fn build(mut builder: rhai::TypeBuilder<Self>) {
128875            builder.with_get("tg_type", Self::rhai_get_tg_type);
128876            builder.with_get("custom_emoji_id", Self::rhai_get_custom_emoji_id);
128877            builder.on_debug(|t| format!("{:?}", t));
128878            drop(builder);
128879        }
128880    }
128881    #[cfg(feature = "rhai")]
128882    impl SetupRhai for LocationAddress {
128883        fn setup_rhai(engine: &mut rhai::Engine) {
128884            engine.build_type::<LocationAddress>();
128885            engine
128886                .register_type_with_name::<Option<String>>("Option<String>")
128887                .register_static_module("Option<String>", exported_module!(StringModule).into());
128888        }
128889    }
128890    #[cfg(feature = "rhai")]
128891    #[allow(unused_mut)]
128892    impl rhai::CustomType for LocationAddress {
128893        fn build(mut builder: rhai::TypeBuilder<Self>) {
128894            builder.with_get("country_code", Self::rhai_get_country_code);
128895            builder.with_get("state", Self::rhai_get_state);
128896            builder.with_get("city", Self::rhai_get_city);
128897            builder.with_get("street", Self::rhai_get_street);
128898            builder.on_debug(|t| format!("{:?}", t));
128899            drop(builder);
128900        }
128901    }
128902    #[cfg(feature = "rhai")]
128903    impl SetupRhai for OwnedGiftRegular {
128904        fn setup_rhai(engine: &mut rhai::Engine) {
128905            engine.build_type::<OwnedGiftRegular>();
128906            engine
128907                .register_type_with_name::<Option<bool>>("Option<bool>")
128908                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128909            engine
128910                .register_type_with_name::<Option<Chat>>("Option<Chat>")
128911                .build_type::<Chat>()
128912                .register_static_module("Option<Chat>", exported_module!(ChatModule).into());
128913            engine
128914                .register_type_with_name::<Option<File>>("Option<File>")
128915                .build_type::<File>()
128916                .register_static_module("Option<File>", exported_module!(FileModule).into());
128917            engine
128918                .register_type_with_name::<Option<f64>>("Option<f64>")
128919                .register_static_module("Option<f64>", exported_module!(f64Module).into());
128920            engine
128921                .register_type_with_name::<Option<Gift>>("Option<Gift>")
128922                .build_type::<Gift>()
128923                .register_static_module("Option<Gift>", exported_module!(GiftModule).into());
128924            engine
128925                .register_type_with_name::<Option<i64>>("Option<i64>")
128926                .register_static_module("Option<i64>", exported_module!(i64Module).into());
128927            engine
128928                .register_type_with_name::<Option<MaskPosition>>("Option<MaskPosition>")
128929                .build_type::<MaskPosition>()
128930                .register_static_module(
128931                    "Option<MaskPosition>",
128932                    exported_module!(MaskPositionModule).into(),
128933                );
128934            engine
128935                .register_type_with_name::<Option<MessageEntity>>("Option<MessageEntity>")
128936                .build_type::<MessageEntity>()
128937                .register_static_module(
128938                    "Option<MessageEntity>",
128939                    exported_module!(MessageEntityModule).into(),
128940                );
128941            engine
128942                .register_type_with_name::<Option<PhotoSize>>("Option<PhotoSize>")
128943                .build_type::<PhotoSize>()
128944                .register_static_module(
128945                    "Option<PhotoSize>",
128946                    exported_module!(PhotoSizeModule).into(),
128947                );
128948            engine
128949                .register_type_with_name::<Option<Sticker>>("Option<Sticker>")
128950                .build_type::<Sticker>()
128951                .register_static_module("Option<Sticker>", exported_module!(StickerModule).into());
128952            engine
128953                .register_type_with_name::<Option<String>>("Option<String>")
128954                .register_static_module("Option<String>", exported_module!(StringModule).into());
128955            engine
128956                .register_type_with_name::<Option<User>>("Option<User>")
128957                .build_type::<User>()
128958                .register_static_module("Option<User>", exported_module!(UserModule).into());
128959        }
128960    }
128961    #[cfg(feature = "rhai")]
128962    #[allow(unused_mut)]
128963    impl rhai::CustomType for OwnedGiftRegular {
128964        fn build(mut builder: rhai::TypeBuilder<Self>) {
128965            builder.with_get("tg_type", Self::rhai_get_tg_type);
128966            builder.with_get("gift", Self::rhai_get_gift);
128967            builder.with_get("owned_gift_id", Self::rhai_get_owned_gift_id);
128968            builder.with_get("sender_user", Self::rhai_get_sender_user);
128969            builder.with_get("send_date", Self::rhai_get_send_date);
128970            builder.with_get("text", Self::rhai_get_text);
128971            builder.with_get("entities", Self::rhai_get_entities);
128972            builder.with_get("is_private", Self::rhai_get_is_private);
128973            builder.with_get("is_saved", Self::rhai_get_is_saved);
128974            builder.with_get("can_be_upgraded", Self::rhai_get_can_be_upgraded);
128975            builder.with_get("was_refunded", Self::rhai_get_was_refunded);
128976            builder.with_get("convert_star_count", Self::rhai_get_convert_star_count);
128977            builder.with_get(
128978                "prepaid_upgrade_star_count",
128979                Self::rhai_get_prepaid_upgrade_star_count,
128980            );
128981            builder.on_debug(|t| format!("{:?}", t));
128982            drop(builder);
128983        }
128984    }
128985    #[cfg(feature = "rhai")]
128986    impl SetupRhai for InlineKeyboardMarkup {
128987        fn setup_rhai(engine: &mut rhai::Engine) {
128988            engine.build_type::<InlineKeyboardMarkup>();
128989            engine
128990                .register_type_with_name::<Option<bool>>("Option<bool>")
128991                .register_static_module("Option<bool>", exported_module!(boolModule).into());
128992            engine
128993                .register_type_with_name::<Option<CallbackGame>>("Option<CallbackGame>")
128994                .build_type::<CallbackGame>()
128995                .register_static_module(
128996                    "Option<CallbackGame>",
128997                    exported_module!(CallbackGameModule).into(),
128998                );
128999            engine
129000                .register_type_with_name::<Option<CopyTextButton>>("Option<CopyTextButton>")
129001                .build_type::<CopyTextButton>()
129002                .register_static_module(
129003                    "Option<CopyTextButton>",
129004                    exported_module!(CopyTextButtonModule).into(),
129005                );
129006            engine
129007                .register_type_with_name::<Option<InlineKeyboardButton>>(
129008                    "Option<InlineKeyboardButton>",
129009                )
129010                .build_type::<InlineKeyboardButton>()
129011                .register_static_module(
129012                    "Option<InlineKeyboardButton>",
129013                    exported_module!(InlineKeyboardButtonModule).into(),
129014                );
129015            engine
129016                .register_type_with_name::<Option<LoginUrl>>("Option<LoginUrl>")
129017                .build_type::<LoginUrl>()
129018                .register_static_module(
129019                    "Option<LoginUrl>",
129020                    exported_module!(LoginUrlModule).into(),
129021                );
129022            engine
129023                .register_type_with_name::<Option<String>>("Option<String>")
129024                .register_static_module("Option<String>", exported_module!(StringModule).into());
129025            engine
129026                .register_type_with_name::<Option<SwitchInlineQueryChosenChat>>(
129027                    "Option<SwitchInlineQueryChosenChat>",
129028                )
129029                .build_type::<SwitchInlineQueryChosenChat>()
129030                .register_static_module(
129031                    "Option<SwitchInlineQueryChosenChat>",
129032                    exported_module!(SwitchInlineQueryChosenChatModule).into(),
129033                );
129034            engine
129035                .register_type_with_name::<Option<WebAppInfo>>("Option<WebAppInfo>")
129036                .build_type::<WebAppInfo>()
129037                .register_static_module(
129038                    "Option<WebAppInfo>",
129039                    exported_module!(WebAppInfoModule).into(),
129040                );
129041        }
129042    }
129043    #[cfg(feature = "rhai")]
129044    #[allow(unused_mut)]
129045    impl rhai::CustomType for InlineKeyboardMarkup {
129046        fn build(mut builder: rhai::TypeBuilder<Self>) {
129047            builder.with_get("inline_keyboard", Self::rhai_get_inline_keyboard);
129048            builder.on_debug(|t| format!("{:?}", t));
129049            drop(builder);
129050        }
129051    }
129052    #[cfg(feature = "rhai")]
129053    impl SetupRhai for StoryArea {
129054        fn setup_rhai(engine: &mut rhai::Engine) {
129055            engine.build_type::<StoryArea>();
129056            engine
129057                .register_type_with_name::<Option<f64>>("Option<f64>")
129058                .register_static_module("Option<f64>", exported_module!(f64Module).into());
129059            engine
129060                .register_type_with_name::<Option<StoryAreaPosition>>("Option<StoryAreaPosition>")
129061                .build_type::<StoryAreaPosition>()
129062                .register_static_module(
129063                    "Option<StoryAreaPosition>",
129064                    exported_module!(StoryAreaPositionModule).into(),
129065                );
129066            engine
129067                .register_type_with_name::<Option<StoryAreaType>>("Option<StoryAreaType>")
129068                .register_static_module(
129069                    "Option<StoryAreaType>",
129070                    exported_module!(StoryAreaTypeModule).into(),
129071                );
129072        }
129073    }
129074    #[cfg(feature = "rhai")]
129075    #[allow(unused_mut)]
129076    impl rhai::CustomType for StoryArea {
129077        fn build(mut builder: rhai::TypeBuilder<Self>) {
129078            builder.with_get("position", Self::rhai_get_position);
129079            builder.with_get("tg_type", Self::rhai_get_tg_type);
129080            builder.on_debug(|t| format!("{:?}", t));
129081            drop(builder);
129082        }
129083    }
129084    #[cfg(feature = "rhai")]
129085    impl SetupRhai for StoryAreaTypeUniqueGift {
129086        fn setup_rhai(engine: &mut rhai::Engine) {
129087            engine.build_type::<StoryAreaTypeUniqueGift>();
129088            engine
129089                .register_type_with_name::<Option<String>>("Option<String>")
129090                .register_static_module("Option<String>", exported_module!(StringModule).into());
129091        }
129092    }
129093    #[cfg(feature = "rhai")]
129094    #[allow(unused_mut)]
129095    impl rhai::CustomType for StoryAreaTypeUniqueGift {
129096        fn build(mut builder: rhai::TypeBuilder<Self>) {
129097            builder.with_get("tg_type", Self::rhai_get_tg_type);
129098            builder.with_get("name", Self::rhai_get_name);
129099            builder.on_debug(|t| format!("{:?}", t));
129100            drop(builder);
129101        }
129102    }
129103    #[cfg(feature = "rhai")]
129104    impl SetupRhai for PassportData {
129105        fn setup_rhai(engine: &mut rhai::Engine) {
129106            engine.build_type::<PassportData>();
129107            engine
129108                .register_type_with_name::<Option<EncryptedCredentials>>(
129109                    "Option<EncryptedCredentials>",
129110                )
129111                .build_type::<EncryptedCredentials>()
129112                .register_static_module(
129113                    "Option<EncryptedCredentials>",
129114                    exported_module!(EncryptedCredentialsModule).into(),
129115                );
129116            engine
129117                .register_type_with_name::<Option<EncryptedPassportElement>>(
129118                    "Option<EncryptedPassportElement>",
129119                )
129120                .build_type::<EncryptedPassportElement>()
129121                .register_static_module(
129122                    "Option<EncryptedPassportElement>",
129123                    exported_module!(EncryptedPassportElementModule).into(),
129124                );
129125            engine
129126                .register_type_with_name::<Option<i64>>("Option<i64>")
129127                .register_static_module("Option<i64>", exported_module!(i64Module).into());
129128            engine
129129                .register_type_with_name::<Option<PassportFile>>("Option<PassportFile>")
129130                .build_type::<PassportFile>()
129131                .register_static_module(
129132                    "Option<PassportFile>",
129133                    exported_module!(PassportFileModule).into(),
129134                );
129135            engine
129136                .register_type_with_name::<Option<String>>("Option<String>")
129137                .register_static_module("Option<String>", exported_module!(StringModule).into());
129138        }
129139    }
129140    #[cfg(feature = "rhai")]
129141    #[allow(unused_mut)]
129142    impl rhai::CustomType for PassportData {
129143        fn build(mut builder: rhai::TypeBuilder<Self>) {
129144            builder.with_get("data", Self::rhai_get_data);
129145            builder.with_get("credentials", Self::rhai_get_credentials);
129146            builder.on_debug(|t| format!("{:?}", t));
129147            drop(builder);
129148        }
129149    }
129150    pub fn setup_all_rhai(engine: &mut rhai::Engine) {
129151        OrderInfo::setup_rhai(engine);
129152        SuggestedPostPrice::setup_rhai(engine);
129153        Chat::setup_rhai(engine);
129154        CallbackGame::setup_rhai(engine);
129155        Update::setup_rhai(engine);
129156        PhotoSize::setup_rhai(engine);
129157        ChatBoostSourceGiftCode::setup_rhai(engine);
129158        PollOption::setup_rhai(engine);
129159        InlineQuery::setup_rhai(engine);
129160        TransactionPartnerUser::setup_rhai(engine);
129161        InputMediaPhoto::setup_rhai(engine);
129162        VideoChatScheduled::setup_rhai(engine);
129163        ForumTopicCreated::setup_rhai(engine);
129164        InlineKeyboardButton::setup_rhai(engine);
129165        PaidMediaVideo::setup_rhai(engine);
129166        ChatJoinRequest::setup_rhai(engine);
129167        StoryAreaPosition::setup_rhai(engine);
129168        BotCommand::setup_rhai(engine);
129169        SuggestedPostPaid::setup_rhai(engine);
129170        Contact::setup_rhai(engine);
129171        ChatBoostSourceGiveaway::setup_rhai(engine);
129172        BotName::setup_rhai(engine);
129173        SuggestedPostDeclined::setup_rhai(engine);
129174        BusinessOpeningHoursInterval::setup_rhai(engine);
129175        Dice::setup_rhai(engine);
129176        InlineQueryResultArticle::setup_rhai(engine);
129177        InputLocationMessageContent::setup_rhai(engine);
129178        InlineQueryResultCachedSticker::setup_rhai(engine);
129179        InputPaidMediaVideo::setup_rhai(engine);
129180        Gift::setup_rhai(engine);
129181        MessageOriginUser::setup_rhai(engine);
129182        KeyboardButton::setup_rhai(engine);
129183        InlineQueryResultCachedMpeg4Gif::setup_rhai(engine);
129184        InputInvoiceMessageContent::setup_rhai(engine);
129185        BusinessBotRights::setup_rhai(engine);
129186        InputStoryContentPhoto::setup_rhai(engine);
129187        InputVenueMessageContent::setup_rhai(engine);
129188        UniqueGiftSymbol::setup_rhai(engine);
129189        InputChecklistTask::setup_rhai(engine);
129190        PaidMessagePriceChanged::setup_rhai(engine);
129191        MessageReactionCountUpdated::setup_rhai(engine);
129192        Location::setup_rhai(engine);
129193        GameHighScore::setup_rhai(engine);
129194        MessageReactionUpdated::setup_rhai(engine);
129195        SuccessfulPayment::setup_rhai(engine);
129196        InlineQueryResultDocument::setup_rhai(engine);
129197        SuggestedPostApproved::setup_rhai(engine);
129198        User::setup_rhai(engine);
129199        RevenueWithdrawalStatePending::setup_rhai(engine);
129200        BotDescription::setup_rhai(engine);
129201        TransactionPartnerAffiliateProgram::setup_rhai(engine);
129202        InlineQueryResultCachedVideo::setup_rhai(engine);
129203        BusinessConnection::setup_rhai(engine);
129204        UserProfilePhotos::setup_rhai(engine);
129205        ReactionTypePaid::setup_rhai(engine);
129206        ChatMemberBanned::setup_rhai(engine);
129207        UsersShared::setup_rhai(engine);
129208        InlineQueryResultMpeg4Gif::setup_rhai(engine);
129209        ChecklistTask::setup_rhai(engine);
129210        Checklist::setup_rhai(engine);
129211        BackgroundFillFreeformGradient::setup_rhai(engine);
129212        OwnedGiftUnique::setup_rhai(engine);
129213        PaidMediaPreview::setup_rhai(engine);
129214        InputTextMessageContent::setup_rhai(engine);
129215        BotCommandScopeAllPrivateChats::setup_rhai(engine);
129216        Voice::setup_rhai(engine);
129217        KeyboardButtonRequestUsers::setup_rhai(engine);
129218        InlineQueryResultLocation::setup_rhai(engine);
129219        KeyboardButtonPollType::setup_rhai(engine);
129220        WebAppData::setup_rhai(engine);
129221        ForumTopicReopened::setup_rhai(engine);
129222        InlineQueryResultCachedDocument::setup_rhai(engine);
129223        InlineQueryResultVoice::setup_rhai(engine);
129224        UniqueGiftBackdrop::setup_rhai(engine);
129225        StoryAreaTypeWeather::setup_rhai(engine);
129226        UniqueGiftModel::setup_rhai(engine);
129227        ForceReply::setup_rhai(engine);
129228        StarTransaction::setup_rhai(engine);
129229        PassportElementErrorDataField::setup_rhai(engine);
129230        ChatBoost::setup_rhai(engine);
129231        ShippingOption::setup_rhai(engine);
129232        PassportElementErrorFrontSide::setup_rhai(engine);
129233        BusinessOpeningHours::setup_rhai(engine);
129234        Story::setup_rhai(engine);
129235        WebAppInfo::setup_rhai(engine);
129236        BotCommandScopeChatMember::setup_rhai(engine);
129237        ChatBackground::setup_rhai(engine);
129238        PassportFile::setup_rhai(engine);
129239        BotCommandScopeAllChatAdministrators::setup_rhai(engine);
129240        ExternalReplyInfo::setup_rhai(engine);
129241        InlineQueryResultCachedGif::setup_rhai(engine);
129242        WriteAccessAllowed::setup_rhai(engine);
129243        TransactionPartnerTelegramApi::setup_rhai(engine);
129244        ProximityAlertTriggered::setup_rhai(engine);
129245        InlineQueryResultAudio::setup_rhai(engine);
129246        Message::setup_rhai(engine);
129247        ChatPhoto::setup_rhai(engine);
129248        InlineQueryResultGame::setup_rhai(engine);
129249        RevenueWithdrawalStateFailed::setup_rhai(engine);
129250        MessageEntity::setup_rhai(engine);
129251        UniqueGiftBackdropColors::setup_rhai(engine);
129252        SuggestedPostApprovalFailed::setup_rhai(engine);
129253        Document::setup_rhai(engine);
129254        SharedUser::setup_rhai(engine);
129255        UniqueGiftInfo::setup_rhai(engine);
129256        ShippingQuery::setup_rhai(engine);
129257        InlineQueryResultVideo::setup_rhai(engine);
129258        DirectMessagePriceChanged::setup_rhai(engine);
129259        ReactionCount::setup_rhai(engine);
129260        ChatShared::setup_rhai(engine);
129261        MessageOriginChannel::setup_rhai(engine);
129262        ChatBoostRemoved::setup_rhai(engine);
129263        BackgroundTypeFill::setup_rhai(engine);
129264        MessageId::setup_rhai(engine);
129265        KeyboardButtonRequestChat::setup_rhai(engine);
129266        ReactionTypeEmoji::setup_rhai(engine);
129267        SentWebAppMessage::setup_rhai(engine);
129268        Giveaway::setup_rhai(engine);
129269        DirectMessagesTopic::setup_rhai(engine);
129270        RevenueWithdrawalStateSucceeded::setup_rhai(engine);
129271        VideoChatEnded::setup_rhai(engine);
129272        ChatMemberOwner::setup_rhai(engine);
129273        PreCheckoutQuery::setup_rhai(engine);
129274        InlineQueryResultVenue::setup_rhai(engine);
129275        PaidMediaInfo::setup_rhai(engine);
129276        InlineQueryResultCachedPhoto::setup_rhai(engine);
129277        GeneralForumTopicUnhidden::setup_rhai(engine);
129278        GiveawayWinners::setup_rhai(engine);
129279        MessageOriginHiddenUser::setup_rhai(engine);
129280        StoryAreaTypeLocation::setup_rhai(engine);
129281        SuggestedPostParameters::setup_rhai(engine);
129282        StickerSet::setup_rhai(engine);
129283        Poll::setup_rhai(engine);
129284        Video::setup_rhai(engine);
129285        GeneralForumTopicHidden::setup_rhai(engine);
129286        ChatAdministratorRights::setup_rhai(engine);
129287        ResponseParameters::setup_rhai(engine);
129288        VideoNote::setup_rhai(engine);
129289        ReplyKeyboardRemove::setup_rhai(engine);
129290        LabeledPrice::setup_rhai(engine);
129291        InputPollOption::setup_rhai(engine);
129292        ChatBoostSourcePremium::setup_rhai(engine);
129293        InputMediaVideo::setup_rhai(engine);
129294        InputMediaAudio::setup_rhai(engine);
129295        OwnedGifts::setup_rhai(engine);
129296        EncryptedPassportElement::setup_rhai(engine);
129297        Invoice::setup_rhai(engine);
129298        BotShortDescription::setup_rhai(engine);
129299        ChatFullInfo::setup_rhai(engine);
129300        PollAnswer::setup_rhai(engine);
129301        WebhookInfo::setup_rhai(engine);
129302        BusinessMessagesDeleted::setup_rhai(engine);
129303        BotCommandScopeDefault::setup_rhai(engine);
129304        ChatInviteLink::setup_rhai(engine);
129305        InlineQueryResultCachedVoice::setup_rhai(engine);
129306        PassportElementErrorTranslationFiles::setup_rhai(engine);
129307        Animation::setup_rhai(engine);
129308        Audio::setup_rhai(engine);
129309        RefundedPayment::setup_rhai(engine);
129310        InputMediaAnimation::setup_rhai(engine);
129311        Game::setup_rhai(engine);
129312        ChatMemberMember::setup_rhai(engine);
129313        ChatPermissions::setup_rhai(engine);
129314        StarTransactions::setup_rhai(engine);
129315        EncryptedCredentials::setup_rhai(engine);
129316        StoryAreaTypeSuggestedReaction::setup_rhai(engine);
129317        ChecklistTasksAdded::setup_rhai(engine);
129318        BackgroundFillGradient::setup_rhai(engine);
129319        SuggestedPostRefunded::setup_rhai(engine);
129320        CallbackQuery::setup_rhai(engine);
129321        PassportElementErrorFiles::setup_rhai(engine);
129322        MenuButtonDefault::setup_rhai(engine);
129323        ForumTopicEdited::setup_rhai(engine);
129324        GiveawayCompleted::setup_rhai(engine);
129325        ReplyKeyboardMarkup::setup_rhai(engine);
129326        InlineQueryResultCachedAudio::setup_rhai(engine);
129327        CopyTextButton::setup_rhai(engine);
129328        BackgroundTypeWallpaper::setup_rhai(engine);
129329        ForumTopic::setup_rhai(engine);
129330        InputContactMessageContent::setup_rhai(engine);
129331        ReplyParameters::setup_rhai(engine);
129332        InputMediaDocument::setup_rhai(engine);
129333        BusinessIntro::setup_rhai(engine);
129334        GiveawayCreated::setup_rhai(engine);
129335        ChatMemberAdministrator::setup_rhai(engine);
129336        InlineQueryResultGif::setup_rhai(engine);
129337        InputProfilePhotoAnimated::setup_rhai(engine);
129338        VideoChatParticipantsInvited::setup_rhai(engine);
129339        LoginUrl::setup_rhai(engine);
129340        ChosenInlineResult::setup_rhai(engine);
129341        PassportElementErrorUnspecified::setup_rhai(engine);
129342        MenuButtonWebApp::setup_rhai(engine);
129343        UserChatBoosts::setup_rhai(engine);
129344        GiftInfo::setup_rhai(engine);
129345        ShippingAddress::setup_rhai(engine);
129346        MessageAutoDeleteTimerChanged::setup_rhai(engine);
129347        InlineQueryResultsButton::setup_rhai(engine);
129348        BackgroundFillSolid::setup_rhai(engine);
129349        BotCommandScopeAllGroupChats::setup_rhai(engine);
129350        ChatBoostUpdated::setup_rhai(engine);
129351        MaskPosition::setup_rhai(engine);
129352        PassportElementErrorFile::setup_rhai(engine);
129353        Sticker::setup_rhai(engine);
129354        PassportElementErrorSelfie::setup_rhai(engine);
129355        BackgroundTypePattern::setup_rhai(engine);
129356        StarAmount::setup_rhai(engine);
129357        TransactionPartnerFragment::setup_rhai(engine);
129358        ChatMemberLeft::setup_rhai(engine);
129359        PaidMediaPhoto::setup_rhai(engine);
129360        UniqueGift::setup_rhai(engine);
129361        MenuButtonCommands::setup_rhai(engine);
129362        TransactionPartnerOther::setup_rhai(engine);
129363        Gifts::setup_rhai(engine);
129364        File::setup_rhai(engine);
129365        Birthdate::setup_rhai(engine);
129366        TransactionPartnerTelegramAds::setup_rhai(engine);
129367        InlineQueryResultContact::setup_rhai(engine);
129368        ChatMemberRestricted::setup_rhai(engine);
129369        LinkPreviewOptions::setup_rhai(engine);
129370        PreparedInlineMessage::setup_rhai(engine);
129371        TextQuote::setup_rhai(engine);
129372        ChecklistTasksDone::setup_rhai(engine);
129373        InputStoryContentVideo::setup_rhai(engine);
129374        BackgroundTypeChatTheme::setup_rhai(engine);
129375        InaccessibleMessage::setup_rhai(engine);
129376        InputChecklist::setup_rhai(engine);
129377        SuggestedPostInfo::setup_rhai(engine);
129378        SwitchInlineQueryChosenChat::setup_rhai(engine);
129379        AcceptedGiftTypes::setup_rhai(engine);
129380        PassportElementErrorTranslationFile::setup_rhai(engine);
129381        BusinessLocation::setup_rhai(engine);
129382        AffiliateInfo::setup_rhai(engine);
129383        MessageOriginChat::setup_rhai(engine);
129384        BotCommandScopeChat::setup_rhai(engine);
129385        PassportElementErrorReverseSide::setup_rhai(engine);
129386        InlineQueryResultPhoto::setup_rhai(engine);
129387        StoryAreaTypeLink::setup_rhai(engine);
129388        InputSticker::setup_rhai(engine);
129389        InputPaidMediaPhoto::setup_rhai(engine);
129390        InputProfilePhotoStatic::setup_rhai(engine);
129391        TransactionPartnerChat::setup_rhai(engine);
129392        BotCommandScopeChatAdministrators::setup_rhai(engine);
129393        ForumTopicClosed::setup_rhai(engine);
129394        PaidMediaPurchased::setup_rhai(engine);
129395        ChatLocation::setup_rhai(engine);
129396        VideoChatStarted::setup_rhai(engine);
129397        ChatMemberUpdated::setup_rhai(engine);
129398        Venue::setup_rhai(engine);
129399        ChatBoostAdded::setup_rhai(engine);
129400        ReactionTypeCustomEmoji::setup_rhai(engine);
129401        LocationAddress::setup_rhai(engine);
129402        OwnedGiftRegular::setup_rhai(engine);
129403        InlineKeyboardMarkup::setup_rhai(engine);
129404        StoryArea::setup_rhai(engine);
129405        StoryAreaTypeUniqueGift::setup_rhai(engine);
129406        PassportData::setup_rhai(engine);
129407    }
129408}
129409impl From<BoxWrapper<Unbox<InputPaidMedia>>> for InputPaidMedia {
129410    fn from(t: BoxWrapper<Unbox<InputPaidMedia>>) -> Self {
129411        t.consume()
129412    }
129413}
129414impl From<BoxWrapper<Box<InputPaidMedia>>> for InputPaidMedia {
129415    fn from(t: BoxWrapper<Box<InputPaidMedia>>) -> Self {
129416        t.consume()
129417    }
129418}
129419impl From<BoxWrapper<Unbox<OrderInfo>>> for OrderInfo {
129420    fn from(t: BoxWrapper<Unbox<OrderInfo>>) -> Self {
129421        t.consume()
129422    }
129423}
129424impl From<BoxWrapper<Box<OrderInfo>>> for OrderInfo {
129425    fn from(t: BoxWrapper<Box<OrderInfo>>) -> Self {
129426        t.consume()
129427    }
129428}
129429impl From<BoxWrapper<Unbox<SuggestedPostPrice>>> for SuggestedPostPrice {
129430    fn from(t: BoxWrapper<Unbox<SuggestedPostPrice>>) -> Self {
129431        t.consume()
129432    }
129433}
129434impl From<BoxWrapper<Box<SuggestedPostPrice>>> for SuggestedPostPrice {
129435    fn from(t: BoxWrapper<Box<SuggestedPostPrice>>) -> Self {
129436        t.consume()
129437    }
129438}
129439impl From<BoxWrapper<Unbox<Chat>>> for Chat {
129440    fn from(t: BoxWrapper<Unbox<Chat>>) -> Self {
129441        t.consume()
129442    }
129443}
129444impl From<BoxWrapper<Box<Chat>>> for Chat {
129445    fn from(t: BoxWrapper<Box<Chat>>) -> Self {
129446        t.consume()
129447    }
129448}
129449impl From<BoxWrapper<Unbox<CallbackGame>>> for CallbackGame {
129450    fn from(t: BoxWrapper<Unbox<CallbackGame>>) -> Self {
129451        t.consume()
129452    }
129453}
129454impl From<BoxWrapper<Box<CallbackGame>>> for CallbackGame {
129455    fn from(t: BoxWrapper<Box<CallbackGame>>) -> Self {
129456        t.consume()
129457    }
129458}
129459impl From<BoxWrapper<Unbox<Update>>> for Update {
129460    fn from(t: BoxWrapper<Unbox<Update>>) -> Self {
129461        t.consume()
129462    }
129463}
129464impl From<BoxWrapper<Box<Update>>> for Update {
129465    fn from(t: BoxWrapper<Box<Update>>) -> Self {
129466        t.consume()
129467    }
129468}
129469impl From<BoxWrapper<Unbox<PhotoSize>>> for PhotoSize {
129470    fn from(t: BoxWrapper<Unbox<PhotoSize>>) -> Self {
129471        t.consume()
129472    }
129473}
129474impl From<BoxWrapper<Box<PhotoSize>>> for PhotoSize {
129475    fn from(t: BoxWrapper<Box<PhotoSize>>) -> Self {
129476        t.consume()
129477    }
129478}
129479impl From<BoxWrapper<Unbox<ChatMember>>> for ChatMember {
129480    fn from(t: BoxWrapper<Unbox<ChatMember>>) -> Self {
129481        t.consume()
129482    }
129483}
129484impl From<BoxWrapper<Box<ChatMember>>> for ChatMember {
129485    fn from(t: BoxWrapper<Box<ChatMember>>) -> Self {
129486        t.consume()
129487    }
129488}
129489impl From<BoxWrapper<Unbox<ChatBoostSourceGiftCode>>> for ChatBoostSourceGiftCode {
129490    fn from(t: BoxWrapper<Unbox<ChatBoostSourceGiftCode>>) -> Self {
129491        t.consume()
129492    }
129493}
129494impl From<BoxWrapper<Box<ChatBoostSourceGiftCode>>> for ChatBoostSourceGiftCode {
129495    fn from(t: BoxWrapper<Box<ChatBoostSourceGiftCode>>) -> Self {
129496        t.consume()
129497    }
129498}
129499impl From<BoxWrapper<Unbox<PollOption>>> for PollOption {
129500    fn from(t: BoxWrapper<Unbox<PollOption>>) -> Self {
129501        t.consume()
129502    }
129503}
129504impl From<BoxWrapper<Box<PollOption>>> for PollOption {
129505    fn from(t: BoxWrapper<Box<PollOption>>) -> Self {
129506        t.consume()
129507    }
129508}
129509impl From<BoxWrapper<Unbox<StoryAreaType>>> for StoryAreaType {
129510    fn from(t: BoxWrapper<Unbox<StoryAreaType>>) -> Self {
129511        t.consume()
129512    }
129513}
129514impl From<BoxWrapper<Box<StoryAreaType>>> for StoryAreaType {
129515    fn from(t: BoxWrapper<Box<StoryAreaType>>) -> Self {
129516        t.consume()
129517    }
129518}
129519impl From<BoxWrapper<Unbox<InlineQuery>>> for InlineQuery {
129520    fn from(t: BoxWrapper<Unbox<InlineQuery>>) -> Self {
129521        t.consume()
129522    }
129523}
129524impl From<BoxWrapper<Box<InlineQuery>>> for InlineQuery {
129525    fn from(t: BoxWrapper<Box<InlineQuery>>) -> Self {
129526        t.consume()
129527    }
129528}
129529impl From<BoxWrapper<Unbox<TransactionPartnerUser>>> for TransactionPartnerUser {
129530    fn from(t: BoxWrapper<Unbox<TransactionPartnerUser>>) -> Self {
129531        t.consume()
129532    }
129533}
129534impl From<BoxWrapper<Box<TransactionPartnerUser>>> for TransactionPartnerUser {
129535    fn from(t: BoxWrapper<Box<TransactionPartnerUser>>) -> Self {
129536        t.consume()
129537    }
129538}
129539impl From<BoxWrapper<Unbox<InputMediaPhoto>>> for InputMediaPhoto {
129540    fn from(t: BoxWrapper<Unbox<InputMediaPhoto>>) -> Self {
129541        t.consume()
129542    }
129543}
129544impl From<BoxWrapper<Box<InputMediaPhoto>>> for InputMediaPhoto {
129545    fn from(t: BoxWrapper<Box<InputMediaPhoto>>) -> Self {
129546        t.consume()
129547    }
129548}
129549impl From<BoxWrapper<Unbox<VideoChatScheduled>>> for VideoChatScheduled {
129550    fn from(t: BoxWrapper<Unbox<VideoChatScheduled>>) -> Self {
129551        t.consume()
129552    }
129553}
129554impl From<BoxWrapper<Box<VideoChatScheduled>>> for VideoChatScheduled {
129555    fn from(t: BoxWrapper<Box<VideoChatScheduled>>) -> Self {
129556        t.consume()
129557    }
129558}
129559impl From<BoxWrapper<Unbox<ForumTopicCreated>>> for ForumTopicCreated {
129560    fn from(t: BoxWrapper<Unbox<ForumTopicCreated>>) -> Self {
129561        t.consume()
129562    }
129563}
129564impl From<BoxWrapper<Box<ForumTopicCreated>>> for ForumTopicCreated {
129565    fn from(t: BoxWrapper<Box<ForumTopicCreated>>) -> Self {
129566        t.consume()
129567    }
129568}
129569impl From<BoxWrapper<Unbox<InlineKeyboardButton>>> for InlineKeyboardButton {
129570    fn from(t: BoxWrapper<Unbox<InlineKeyboardButton>>) -> Self {
129571        t.consume()
129572    }
129573}
129574impl From<BoxWrapper<Box<InlineKeyboardButton>>> for InlineKeyboardButton {
129575    fn from(t: BoxWrapper<Box<InlineKeyboardButton>>) -> Self {
129576        t.consume()
129577    }
129578}
129579impl From<BoxWrapper<Unbox<PaidMediaVideo>>> for PaidMediaVideo {
129580    fn from(t: BoxWrapper<Unbox<PaidMediaVideo>>) -> Self {
129581        t.consume()
129582    }
129583}
129584impl From<BoxWrapper<Box<PaidMediaVideo>>> for PaidMediaVideo {
129585    fn from(t: BoxWrapper<Box<PaidMediaVideo>>) -> Self {
129586        t.consume()
129587    }
129588}
129589impl From<BoxWrapper<Unbox<ChatJoinRequest>>> for ChatJoinRequest {
129590    fn from(t: BoxWrapper<Unbox<ChatJoinRequest>>) -> Self {
129591        t.consume()
129592    }
129593}
129594impl From<BoxWrapper<Box<ChatJoinRequest>>> for ChatJoinRequest {
129595    fn from(t: BoxWrapper<Box<ChatJoinRequest>>) -> Self {
129596        t.consume()
129597    }
129598}
129599impl From<BoxWrapper<Unbox<StoryAreaPosition>>> for StoryAreaPosition {
129600    fn from(t: BoxWrapper<Unbox<StoryAreaPosition>>) -> Self {
129601        t.consume()
129602    }
129603}
129604impl From<BoxWrapper<Box<StoryAreaPosition>>> for StoryAreaPosition {
129605    fn from(t: BoxWrapper<Box<StoryAreaPosition>>) -> Self {
129606        t.consume()
129607    }
129608}
129609impl From<BoxWrapper<Unbox<BotCommand>>> for BotCommand {
129610    fn from(t: BoxWrapper<Unbox<BotCommand>>) -> Self {
129611        t.consume()
129612    }
129613}
129614impl From<BoxWrapper<Box<BotCommand>>> for BotCommand {
129615    fn from(t: BoxWrapper<Box<BotCommand>>) -> Self {
129616        t.consume()
129617    }
129618}
129619impl From<BoxWrapper<Unbox<SuggestedPostPaid>>> for SuggestedPostPaid {
129620    fn from(t: BoxWrapper<Unbox<SuggestedPostPaid>>) -> Self {
129621        t.consume()
129622    }
129623}
129624impl From<BoxWrapper<Box<SuggestedPostPaid>>> for SuggestedPostPaid {
129625    fn from(t: BoxWrapper<Box<SuggestedPostPaid>>) -> Self {
129626        t.consume()
129627    }
129628}
129629impl From<BoxWrapper<Unbox<Contact>>> for Contact {
129630    fn from(t: BoxWrapper<Unbox<Contact>>) -> Self {
129631        t.consume()
129632    }
129633}
129634impl From<BoxWrapper<Box<Contact>>> for Contact {
129635    fn from(t: BoxWrapper<Box<Contact>>) -> Self {
129636        t.consume()
129637    }
129638}
129639impl From<BoxWrapper<Unbox<ChatBoostSourceGiveaway>>> for ChatBoostSourceGiveaway {
129640    fn from(t: BoxWrapper<Unbox<ChatBoostSourceGiveaway>>) -> Self {
129641        t.consume()
129642    }
129643}
129644impl From<BoxWrapper<Box<ChatBoostSourceGiveaway>>> for ChatBoostSourceGiveaway {
129645    fn from(t: BoxWrapper<Box<ChatBoostSourceGiveaway>>) -> Self {
129646        t.consume()
129647    }
129648}
129649impl From<BoxWrapper<Unbox<BotName>>> for BotName {
129650    fn from(t: BoxWrapper<Unbox<BotName>>) -> Self {
129651        t.consume()
129652    }
129653}
129654impl From<BoxWrapper<Box<BotName>>> for BotName {
129655    fn from(t: BoxWrapper<Box<BotName>>) -> Self {
129656        t.consume()
129657    }
129658}
129659impl From<BoxWrapper<Unbox<SuggestedPostDeclined>>> for SuggestedPostDeclined {
129660    fn from(t: BoxWrapper<Unbox<SuggestedPostDeclined>>) -> Self {
129661        t.consume()
129662    }
129663}
129664impl From<BoxWrapper<Box<SuggestedPostDeclined>>> for SuggestedPostDeclined {
129665    fn from(t: BoxWrapper<Box<SuggestedPostDeclined>>) -> Self {
129666        t.consume()
129667    }
129668}
129669impl From<BoxWrapper<Unbox<BusinessOpeningHoursInterval>>> for BusinessOpeningHoursInterval {
129670    fn from(t: BoxWrapper<Unbox<BusinessOpeningHoursInterval>>) -> Self {
129671        t.consume()
129672    }
129673}
129674impl From<BoxWrapper<Box<BusinessOpeningHoursInterval>>> for BusinessOpeningHoursInterval {
129675    fn from(t: BoxWrapper<Box<BusinessOpeningHoursInterval>>) -> Self {
129676        t.consume()
129677    }
129678}
129679impl From<BoxWrapper<Unbox<Dice>>> for Dice {
129680    fn from(t: BoxWrapper<Unbox<Dice>>) -> Self {
129681        t.consume()
129682    }
129683}
129684impl From<BoxWrapper<Box<Dice>>> for Dice {
129685    fn from(t: BoxWrapper<Box<Dice>>) -> Self {
129686        t.consume()
129687    }
129688}
129689impl From<BoxWrapper<Unbox<InlineQueryResultArticle>>> for InlineQueryResultArticle {
129690    fn from(t: BoxWrapper<Unbox<InlineQueryResultArticle>>) -> Self {
129691        t.consume()
129692    }
129693}
129694impl From<BoxWrapper<Box<InlineQueryResultArticle>>> for InlineQueryResultArticle {
129695    fn from(t: BoxWrapper<Box<InlineQueryResultArticle>>) -> Self {
129696        t.consume()
129697    }
129698}
129699impl From<BoxWrapper<Unbox<InputLocationMessageContent>>> for InputLocationMessageContent {
129700    fn from(t: BoxWrapper<Unbox<InputLocationMessageContent>>) -> Self {
129701        t.consume()
129702    }
129703}
129704impl From<BoxWrapper<Box<InputLocationMessageContent>>> for InputLocationMessageContent {
129705    fn from(t: BoxWrapper<Box<InputLocationMessageContent>>) -> Self {
129706        t.consume()
129707    }
129708}
129709impl From<BoxWrapper<Unbox<InlineQueryResultCachedSticker>>> for InlineQueryResultCachedSticker {
129710    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedSticker>>) -> Self {
129711        t.consume()
129712    }
129713}
129714impl From<BoxWrapper<Box<InlineQueryResultCachedSticker>>> for InlineQueryResultCachedSticker {
129715    fn from(t: BoxWrapper<Box<InlineQueryResultCachedSticker>>) -> Self {
129716        t.consume()
129717    }
129718}
129719impl From<BoxWrapper<Unbox<InputPaidMediaVideo>>> for InputPaidMediaVideo {
129720    fn from(t: BoxWrapper<Unbox<InputPaidMediaVideo>>) -> Self {
129721        t.consume()
129722    }
129723}
129724impl From<BoxWrapper<Box<InputPaidMediaVideo>>> for InputPaidMediaVideo {
129725    fn from(t: BoxWrapper<Box<InputPaidMediaVideo>>) -> Self {
129726        t.consume()
129727    }
129728}
129729impl From<BoxWrapper<Unbox<Gift>>> for Gift {
129730    fn from(t: BoxWrapper<Unbox<Gift>>) -> Self {
129731        t.consume()
129732    }
129733}
129734impl From<BoxWrapper<Box<Gift>>> for Gift {
129735    fn from(t: BoxWrapper<Box<Gift>>) -> Self {
129736        t.consume()
129737    }
129738}
129739impl From<BoxWrapper<Unbox<MessageOriginUser>>> for MessageOriginUser {
129740    fn from(t: BoxWrapper<Unbox<MessageOriginUser>>) -> Self {
129741        t.consume()
129742    }
129743}
129744impl From<BoxWrapper<Box<MessageOriginUser>>> for MessageOriginUser {
129745    fn from(t: BoxWrapper<Box<MessageOriginUser>>) -> Self {
129746        t.consume()
129747    }
129748}
129749impl From<BoxWrapper<Unbox<KeyboardButton>>> for KeyboardButton {
129750    fn from(t: BoxWrapper<Unbox<KeyboardButton>>) -> Self {
129751        t.consume()
129752    }
129753}
129754impl From<BoxWrapper<Box<KeyboardButton>>> for KeyboardButton {
129755    fn from(t: BoxWrapper<Box<KeyboardButton>>) -> Self {
129756        t.consume()
129757    }
129758}
129759impl From<BoxWrapper<Unbox<InlineQueryResultCachedMpeg4Gif>>> for InlineQueryResultCachedMpeg4Gif {
129760    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedMpeg4Gif>>) -> Self {
129761        t.consume()
129762    }
129763}
129764impl From<BoxWrapper<Box<InlineQueryResultCachedMpeg4Gif>>> for InlineQueryResultCachedMpeg4Gif {
129765    fn from(t: BoxWrapper<Box<InlineQueryResultCachedMpeg4Gif>>) -> Self {
129766        t.consume()
129767    }
129768}
129769impl From<BoxWrapper<Unbox<InputInvoiceMessageContent>>> for InputInvoiceMessageContent {
129770    fn from(t: BoxWrapper<Unbox<InputInvoiceMessageContent>>) -> Self {
129771        t.consume()
129772    }
129773}
129774impl From<BoxWrapper<Box<InputInvoiceMessageContent>>> for InputInvoiceMessageContent {
129775    fn from(t: BoxWrapper<Box<InputInvoiceMessageContent>>) -> Self {
129776        t.consume()
129777    }
129778}
129779impl From<BoxWrapper<Unbox<BusinessBotRights>>> for BusinessBotRights {
129780    fn from(t: BoxWrapper<Unbox<BusinessBotRights>>) -> Self {
129781        t.consume()
129782    }
129783}
129784impl From<BoxWrapper<Box<BusinessBotRights>>> for BusinessBotRights {
129785    fn from(t: BoxWrapper<Box<BusinessBotRights>>) -> Self {
129786        t.consume()
129787    }
129788}
129789impl From<BoxWrapper<Unbox<InputStoryContentPhoto>>> for InputStoryContentPhoto {
129790    fn from(t: BoxWrapper<Unbox<InputStoryContentPhoto>>) -> Self {
129791        t.consume()
129792    }
129793}
129794impl From<BoxWrapper<Box<InputStoryContentPhoto>>> for InputStoryContentPhoto {
129795    fn from(t: BoxWrapper<Box<InputStoryContentPhoto>>) -> Self {
129796        t.consume()
129797    }
129798}
129799impl From<BoxWrapper<Unbox<InputVenueMessageContent>>> for InputVenueMessageContent {
129800    fn from(t: BoxWrapper<Unbox<InputVenueMessageContent>>) -> Self {
129801        t.consume()
129802    }
129803}
129804impl From<BoxWrapper<Box<InputVenueMessageContent>>> for InputVenueMessageContent {
129805    fn from(t: BoxWrapper<Box<InputVenueMessageContent>>) -> Self {
129806        t.consume()
129807    }
129808}
129809impl From<BoxWrapper<Unbox<UniqueGiftSymbol>>> for UniqueGiftSymbol {
129810    fn from(t: BoxWrapper<Unbox<UniqueGiftSymbol>>) -> Self {
129811        t.consume()
129812    }
129813}
129814impl From<BoxWrapper<Box<UniqueGiftSymbol>>> for UniqueGiftSymbol {
129815    fn from(t: BoxWrapper<Box<UniqueGiftSymbol>>) -> Self {
129816        t.consume()
129817    }
129818}
129819impl From<BoxWrapper<Unbox<InputChecklistTask>>> for InputChecklistTask {
129820    fn from(t: BoxWrapper<Unbox<InputChecklistTask>>) -> Self {
129821        t.consume()
129822    }
129823}
129824impl From<BoxWrapper<Box<InputChecklistTask>>> for InputChecklistTask {
129825    fn from(t: BoxWrapper<Box<InputChecklistTask>>) -> Self {
129826        t.consume()
129827    }
129828}
129829impl From<BoxWrapper<Unbox<PaidMessagePriceChanged>>> for PaidMessagePriceChanged {
129830    fn from(t: BoxWrapper<Unbox<PaidMessagePriceChanged>>) -> Self {
129831        t.consume()
129832    }
129833}
129834impl From<BoxWrapper<Box<PaidMessagePriceChanged>>> for PaidMessagePriceChanged {
129835    fn from(t: BoxWrapper<Box<PaidMessagePriceChanged>>) -> Self {
129836        t.consume()
129837    }
129838}
129839impl From<BoxWrapper<Unbox<TransactionPartner>>> for TransactionPartner {
129840    fn from(t: BoxWrapper<Unbox<TransactionPartner>>) -> Self {
129841        t.consume()
129842    }
129843}
129844impl From<BoxWrapper<Box<TransactionPartner>>> for TransactionPartner {
129845    fn from(t: BoxWrapper<Box<TransactionPartner>>) -> Self {
129846        t.consume()
129847    }
129848}
129849impl From<BoxWrapper<Unbox<MessageReactionCountUpdated>>> for MessageReactionCountUpdated {
129850    fn from(t: BoxWrapper<Unbox<MessageReactionCountUpdated>>) -> Self {
129851        t.consume()
129852    }
129853}
129854impl From<BoxWrapper<Box<MessageReactionCountUpdated>>> for MessageReactionCountUpdated {
129855    fn from(t: BoxWrapper<Box<MessageReactionCountUpdated>>) -> Self {
129856        t.consume()
129857    }
129858}
129859impl From<BoxWrapper<Unbox<Location>>> for Location {
129860    fn from(t: BoxWrapper<Unbox<Location>>) -> Self {
129861        t.consume()
129862    }
129863}
129864impl From<BoxWrapper<Box<Location>>> for Location {
129865    fn from(t: BoxWrapper<Box<Location>>) -> Self {
129866        t.consume()
129867    }
129868}
129869impl From<BoxWrapper<Unbox<GameHighScore>>> for GameHighScore {
129870    fn from(t: BoxWrapper<Unbox<GameHighScore>>) -> Self {
129871        t.consume()
129872    }
129873}
129874impl From<BoxWrapper<Box<GameHighScore>>> for GameHighScore {
129875    fn from(t: BoxWrapper<Box<GameHighScore>>) -> Self {
129876        t.consume()
129877    }
129878}
129879impl From<BoxWrapper<Unbox<MessageReactionUpdated>>> for MessageReactionUpdated {
129880    fn from(t: BoxWrapper<Unbox<MessageReactionUpdated>>) -> Self {
129881        t.consume()
129882    }
129883}
129884impl From<BoxWrapper<Box<MessageReactionUpdated>>> for MessageReactionUpdated {
129885    fn from(t: BoxWrapper<Box<MessageReactionUpdated>>) -> Self {
129886        t.consume()
129887    }
129888}
129889impl From<BoxWrapper<Unbox<SuccessfulPayment>>> for SuccessfulPayment {
129890    fn from(t: BoxWrapper<Unbox<SuccessfulPayment>>) -> Self {
129891        t.consume()
129892    }
129893}
129894impl From<BoxWrapper<Box<SuccessfulPayment>>> for SuccessfulPayment {
129895    fn from(t: BoxWrapper<Box<SuccessfulPayment>>) -> Self {
129896        t.consume()
129897    }
129898}
129899impl From<BoxWrapper<Unbox<InlineQueryResultDocument>>> for InlineQueryResultDocument {
129900    fn from(t: BoxWrapper<Unbox<InlineQueryResultDocument>>) -> Self {
129901        t.consume()
129902    }
129903}
129904impl From<BoxWrapper<Box<InlineQueryResultDocument>>> for InlineQueryResultDocument {
129905    fn from(t: BoxWrapper<Box<InlineQueryResultDocument>>) -> Self {
129906        t.consume()
129907    }
129908}
129909impl From<BoxWrapper<Unbox<SuggestedPostApproved>>> for SuggestedPostApproved {
129910    fn from(t: BoxWrapper<Unbox<SuggestedPostApproved>>) -> Self {
129911        t.consume()
129912    }
129913}
129914impl From<BoxWrapper<Box<SuggestedPostApproved>>> for SuggestedPostApproved {
129915    fn from(t: BoxWrapper<Box<SuggestedPostApproved>>) -> Self {
129916        t.consume()
129917    }
129918}
129919impl From<BoxWrapper<Unbox<MenuButton>>> for MenuButton {
129920    fn from(t: BoxWrapper<Unbox<MenuButton>>) -> Self {
129921        t.consume()
129922    }
129923}
129924impl From<BoxWrapper<Box<MenuButton>>> for MenuButton {
129925    fn from(t: BoxWrapper<Box<MenuButton>>) -> Self {
129926        t.consume()
129927    }
129928}
129929impl From<BoxWrapper<Unbox<User>>> for User {
129930    fn from(t: BoxWrapper<Unbox<User>>) -> Self {
129931        t.consume()
129932    }
129933}
129934impl From<BoxWrapper<Box<User>>> for User {
129935    fn from(t: BoxWrapper<Box<User>>) -> Self {
129936        t.consume()
129937    }
129938}
129939impl From<BoxWrapper<Unbox<RevenueWithdrawalState>>> for RevenueWithdrawalState {
129940    fn from(t: BoxWrapper<Unbox<RevenueWithdrawalState>>) -> Self {
129941        t.consume()
129942    }
129943}
129944impl From<BoxWrapper<Box<RevenueWithdrawalState>>> for RevenueWithdrawalState {
129945    fn from(t: BoxWrapper<Box<RevenueWithdrawalState>>) -> Self {
129946        t.consume()
129947    }
129948}
129949impl From<BoxWrapper<Unbox<RevenueWithdrawalStatePending>>> for RevenueWithdrawalStatePending {
129950    fn from(t: BoxWrapper<Unbox<RevenueWithdrawalStatePending>>) -> Self {
129951        t.consume()
129952    }
129953}
129954impl From<BoxWrapper<Box<RevenueWithdrawalStatePending>>> for RevenueWithdrawalStatePending {
129955    fn from(t: BoxWrapper<Box<RevenueWithdrawalStatePending>>) -> Self {
129956        t.consume()
129957    }
129958}
129959impl From<BoxWrapper<Unbox<BotDescription>>> for BotDescription {
129960    fn from(t: BoxWrapper<Unbox<BotDescription>>) -> Self {
129961        t.consume()
129962    }
129963}
129964impl From<BoxWrapper<Box<BotDescription>>> for BotDescription {
129965    fn from(t: BoxWrapper<Box<BotDescription>>) -> Self {
129966        t.consume()
129967    }
129968}
129969impl From<BoxWrapper<Unbox<TransactionPartnerAffiliateProgram>>>
129970    for TransactionPartnerAffiliateProgram
129971{
129972    fn from(t: BoxWrapper<Unbox<TransactionPartnerAffiliateProgram>>) -> Self {
129973        t.consume()
129974    }
129975}
129976impl From<BoxWrapper<Box<TransactionPartnerAffiliateProgram>>>
129977    for TransactionPartnerAffiliateProgram
129978{
129979    fn from(t: BoxWrapper<Box<TransactionPartnerAffiliateProgram>>) -> Self {
129980        t.consume()
129981    }
129982}
129983impl From<BoxWrapper<Unbox<InlineQueryResultCachedVideo>>> for InlineQueryResultCachedVideo {
129984    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedVideo>>) -> Self {
129985        t.consume()
129986    }
129987}
129988impl From<BoxWrapper<Box<InlineQueryResultCachedVideo>>> for InlineQueryResultCachedVideo {
129989    fn from(t: BoxWrapper<Box<InlineQueryResultCachedVideo>>) -> Self {
129990        t.consume()
129991    }
129992}
129993impl From<BoxWrapper<Unbox<BusinessConnection>>> for BusinessConnection {
129994    fn from(t: BoxWrapper<Unbox<BusinessConnection>>) -> Self {
129995        t.consume()
129996    }
129997}
129998impl From<BoxWrapper<Box<BusinessConnection>>> for BusinessConnection {
129999    fn from(t: BoxWrapper<Box<BusinessConnection>>) -> Self {
130000        t.consume()
130001    }
130002}
130003impl From<BoxWrapper<Unbox<UserProfilePhotos>>> for UserProfilePhotos {
130004    fn from(t: BoxWrapper<Unbox<UserProfilePhotos>>) -> Self {
130005        t.consume()
130006    }
130007}
130008impl From<BoxWrapper<Box<UserProfilePhotos>>> for UserProfilePhotos {
130009    fn from(t: BoxWrapper<Box<UserProfilePhotos>>) -> Self {
130010        t.consume()
130011    }
130012}
130013impl From<BoxWrapper<Unbox<ReactionTypePaid>>> for ReactionTypePaid {
130014    fn from(t: BoxWrapper<Unbox<ReactionTypePaid>>) -> Self {
130015        t.consume()
130016    }
130017}
130018impl From<BoxWrapper<Box<ReactionTypePaid>>> for ReactionTypePaid {
130019    fn from(t: BoxWrapper<Box<ReactionTypePaid>>) -> Self {
130020        t.consume()
130021    }
130022}
130023impl From<BoxWrapper<Unbox<ChatMemberBanned>>> for ChatMemberBanned {
130024    fn from(t: BoxWrapper<Unbox<ChatMemberBanned>>) -> Self {
130025        t.consume()
130026    }
130027}
130028impl From<BoxWrapper<Box<ChatMemberBanned>>> for ChatMemberBanned {
130029    fn from(t: BoxWrapper<Box<ChatMemberBanned>>) -> Self {
130030        t.consume()
130031    }
130032}
130033impl From<BoxWrapper<Unbox<UsersShared>>> for UsersShared {
130034    fn from(t: BoxWrapper<Unbox<UsersShared>>) -> Self {
130035        t.consume()
130036    }
130037}
130038impl From<BoxWrapper<Box<UsersShared>>> for UsersShared {
130039    fn from(t: BoxWrapper<Box<UsersShared>>) -> Self {
130040        t.consume()
130041    }
130042}
130043impl From<BoxWrapper<Unbox<InlineQueryResultMpeg4Gif>>> for InlineQueryResultMpeg4Gif {
130044    fn from(t: BoxWrapper<Unbox<InlineQueryResultMpeg4Gif>>) -> Self {
130045        t.consume()
130046    }
130047}
130048impl From<BoxWrapper<Box<InlineQueryResultMpeg4Gif>>> for InlineQueryResultMpeg4Gif {
130049    fn from(t: BoxWrapper<Box<InlineQueryResultMpeg4Gif>>) -> Self {
130050        t.consume()
130051    }
130052}
130053impl From<BoxWrapper<Unbox<ChecklistTask>>> for ChecklistTask {
130054    fn from(t: BoxWrapper<Unbox<ChecklistTask>>) -> Self {
130055        t.consume()
130056    }
130057}
130058impl From<BoxWrapper<Box<ChecklistTask>>> for ChecklistTask {
130059    fn from(t: BoxWrapper<Box<ChecklistTask>>) -> Self {
130060        t.consume()
130061    }
130062}
130063impl From<BoxWrapper<Unbox<Checklist>>> for Checklist {
130064    fn from(t: BoxWrapper<Unbox<Checklist>>) -> Self {
130065        t.consume()
130066    }
130067}
130068impl From<BoxWrapper<Box<Checklist>>> for Checklist {
130069    fn from(t: BoxWrapper<Box<Checklist>>) -> Self {
130070        t.consume()
130071    }
130072}
130073impl From<BoxWrapper<Unbox<BackgroundFillFreeformGradient>>> for BackgroundFillFreeformGradient {
130074    fn from(t: BoxWrapper<Unbox<BackgroundFillFreeformGradient>>) -> Self {
130075        t.consume()
130076    }
130077}
130078impl From<BoxWrapper<Box<BackgroundFillFreeformGradient>>> for BackgroundFillFreeformGradient {
130079    fn from(t: BoxWrapper<Box<BackgroundFillFreeformGradient>>) -> Self {
130080        t.consume()
130081    }
130082}
130083impl From<BoxWrapper<Unbox<OwnedGiftUnique>>> for OwnedGiftUnique {
130084    fn from(t: BoxWrapper<Unbox<OwnedGiftUnique>>) -> Self {
130085        t.consume()
130086    }
130087}
130088impl From<BoxWrapper<Box<OwnedGiftUnique>>> for OwnedGiftUnique {
130089    fn from(t: BoxWrapper<Box<OwnedGiftUnique>>) -> Self {
130090        t.consume()
130091    }
130092}
130093impl From<BoxWrapper<Unbox<PaidMediaPreview>>> for PaidMediaPreview {
130094    fn from(t: BoxWrapper<Unbox<PaidMediaPreview>>) -> Self {
130095        t.consume()
130096    }
130097}
130098impl From<BoxWrapper<Box<PaidMediaPreview>>> for PaidMediaPreview {
130099    fn from(t: BoxWrapper<Box<PaidMediaPreview>>) -> Self {
130100        t.consume()
130101    }
130102}
130103impl From<BoxWrapper<Unbox<InputTextMessageContent>>> for InputTextMessageContent {
130104    fn from(t: BoxWrapper<Unbox<InputTextMessageContent>>) -> Self {
130105        t.consume()
130106    }
130107}
130108impl From<BoxWrapper<Box<InputTextMessageContent>>> for InputTextMessageContent {
130109    fn from(t: BoxWrapper<Box<InputTextMessageContent>>) -> Self {
130110        t.consume()
130111    }
130112}
130113impl From<BoxWrapper<Unbox<BotCommandScopeAllPrivateChats>>> for BotCommandScopeAllPrivateChats {
130114    fn from(t: BoxWrapper<Unbox<BotCommandScopeAllPrivateChats>>) -> Self {
130115        t.consume()
130116    }
130117}
130118impl From<BoxWrapper<Box<BotCommandScopeAllPrivateChats>>> for BotCommandScopeAllPrivateChats {
130119    fn from(t: BoxWrapper<Box<BotCommandScopeAllPrivateChats>>) -> Self {
130120        t.consume()
130121    }
130122}
130123impl From<BoxWrapper<Unbox<InlineQueryResult>>> for InlineQueryResult {
130124    fn from(t: BoxWrapper<Unbox<InlineQueryResult>>) -> Self {
130125        t.consume()
130126    }
130127}
130128impl From<BoxWrapper<Box<InlineQueryResult>>> for InlineQueryResult {
130129    fn from(t: BoxWrapper<Box<InlineQueryResult>>) -> Self {
130130        t.consume()
130131    }
130132}
130133impl From<BoxWrapper<Unbox<Voice>>> for Voice {
130134    fn from(t: BoxWrapper<Unbox<Voice>>) -> Self {
130135        t.consume()
130136    }
130137}
130138impl From<BoxWrapper<Box<Voice>>> for Voice {
130139    fn from(t: BoxWrapper<Box<Voice>>) -> Self {
130140        t.consume()
130141    }
130142}
130143impl From<BoxWrapper<Unbox<KeyboardButtonRequestUsers>>> for KeyboardButtonRequestUsers {
130144    fn from(t: BoxWrapper<Unbox<KeyboardButtonRequestUsers>>) -> Self {
130145        t.consume()
130146    }
130147}
130148impl From<BoxWrapper<Box<KeyboardButtonRequestUsers>>> for KeyboardButtonRequestUsers {
130149    fn from(t: BoxWrapper<Box<KeyboardButtonRequestUsers>>) -> Self {
130150        t.consume()
130151    }
130152}
130153impl From<BoxWrapper<Unbox<InlineQueryResultLocation>>> for InlineQueryResultLocation {
130154    fn from(t: BoxWrapper<Unbox<InlineQueryResultLocation>>) -> Self {
130155        t.consume()
130156    }
130157}
130158impl From<BoxWrapper<Box<InlineQueryResultLocation>>> for InlineQueryResultLocation {
130159    fn from(t: BoxWrapper<Box<InlineQueryResultLocation>>) -> Self {
130160        t.consume()
130161    }
130162}
130163impl From<BoxWrapper<Unbox<KeyboardButtonPollType>>> for KeyboardButtonPollType {
130164    fn from(t: BoxWrapper<Unbox<KeyboardButtonPollType>>) -> Self {
130165        t.consume()
130166    }
130167}
130168impl From<BoxWrapper<Box<KeyboardButtonPollType>>> for KeyboardButtonPollType {
130169    fn from(t: BoxWrapper<Box<KeyboardButtonPollType>>) -> Self {
130170        t.consume()
130171    }
130172}
130173impl From<BoxWrapper<Unbox<WebAppData>>> for WebAppData {
130174    fn from(t: BoxWrapper<Unbox<WebAppData>>) -> Self {
130175        t.consume()
130176    }
130177}
130178impl From<BoxWrapper<Box<WebAppData>>> for WebAppData {
130179    fn from(t: BoxWrapper<Box<WebAppData>>) -> Self {
130180        t.consume()
130181    }
130182}
130183impl From<BoxWrapper<Unbox<ForumTopicReopened>>> for ForumTopicReopened {
130184    fn from(t: BoxWrapper<Unbox<ForumTopicReopened>>) -> Self {
130185        t.consume()
130186    }
130187}
130188impl From<BoxWrapper<Box<ForumTopicReopened>>> for ForumTopicReopened {
130189    fn from(t: BoxWrapper<Box<ForumTopicReopened>>) -> Self {
130190        t.consume()
130191    }
130192}
130193impl From<BoxWrapper<Unbox<InlineQueryResultCachedDocument>>> for InlineQueryResultCachedDocument {
130194    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedDocument>>) -> Self {
130195        t.consume()
130196    }
130197}
130198impl From<BoxWrapper<Box<InlineQueryResultCachedDocument>>> for InlineQueryResultCachedDocument {
130199    fn from(t: BoxWrapper<Box<InlineQueryResultCachedDocument>>) -> Self {
130200        t.consume()
130201    }
130202}
130203impl From<BoxWrapper<Unbox<InlineQueryResultVoice>>> for InlineQueryResultVoice {
130204    fn from(t: BoxWrapper<Unbox<InlineQueryResultVoice>>) -> Self {
130205        t.consume()
130206    }
130207}
130208impl From<BoxWrapper<Box<InlineQueryResultVoice>>> for InlineQueryResultVoice {
130209    fn from(t: BoxWrapper<Box<InlineQueryResultVoice>>) -> Self {
130210        t.consume()
130211    }
130212}
130213impl From<BoxWrapper<Unbox<UniqueGiftBackdrop>>> for UniqueGiftBackdrop {
130214    fn from(t: BoxWrapper<Unbox<UniqueGiftBackdrop>>) -> Self {
130215        t.consume()
130216    }
130217}
130218impl From<BoxWrapper<Box<UniqueGiftBackdrop>>> for UniqueGiftBackdrop {
130219    fn from(t: BoxWrapper<Box<UniqueGiftBackdrop>>) -> Self {
130220        t.consume()
130221    }
130222}
130223impl From<BoxWrapper<Unbox<StoryAreaTypeWeather>>> for StoryAreaTypeWeather {
130224    fn from(t: BoxWrapper<Unbox<StoryAreaTypeWeather>>) -> Self {
130225        t.consume()
130226    }
130227}
130228impl From<BoxWrapper<Box<StoryAreaTypeWeather>>> for StoryAreaTypeWeather {
130229    fn from(t: BoxWrapper<Box<StoryAreaTypeWeather>>) -> Self {
130230        t.consume()
130231    }
130232}
130233impl From<BoxWrapper<Unbox<UniqueGiftModel>>> for UniqueGiftModel {
130234    fn from(t: BoxWrapper<Unbox<UniqueGiftModel>>) -> Self {
130235        t.consume()
130236    }
130237}
130238impl From<BoxWrapper<Box<UniqueGiftModel>>> for UniqueGiftModel {
130239    fn from(t: BoxWrapper<Box<UniqueGiftModel>>) -> Self {
130240        t.consume()
130241    }
130242}
130243impl From<BoxWrapper<Unbox<ForceReply>>> for ForceReply {
130244    fn from(t: BoxWrapper<Unbox<ForceReply>>) -> Self {
130245        t.consume()
130246    }
130247}
130248impl From<BoxWrapper<Box<ForceReply>>> for ForceReply {
130249    fn from(t: BoxWrapper<Box<ForceReply>>) -> Self {
130250        t.consume()
130251    }
130252}
130253impl From<BoxWrapper<Unbox<StarTransaction>>> for StarTransaction {
130254    fn from(t: BoxWrapper<Unbox<StarTransaction>>) -> Self {
130255        t.consume()
130256    }
130257}
130258impl From<BoxWrapper<Box<StarTransaction>>> for StarTransaction {
130259    fn from(t: BoxWrapper<Box<StarTransaction>>) -> Self {
130260        t.consume()
130261    }
130262}
130263impl From<BoxWrapper<Unbox<PassportElementErrorDataField>>> for PassportElementErrorDataField {
130264    fn from(t: BoxWrapper<Unbox<PassportElementErrorDataField>>) -> Self {
130265        t.consume()
130266    }
130267}
130268impl From<BoxWrapper<Box<PassportElementErrorDataField>>> for PassportElementErrorDataField {
130269    fn from(t: BoxWrapper<Box<PassportElementErrorDataField>>) -> Self {
130270        t.consume()
130271    }
130272}
130273impl From<BoxWrapper<Unbox<ChatBoost>>> for ChatBoost {
130274    fn from(t: BoxWrapper<Unbox<ChatBoost>>) -> Self {
130275        t.consume()
130276    }
130277}
130278impl From<BoxWrapper<Box<ChatBoost>>> for ChatBoost {
130279    fn from(t: BoxWrapper<Box<ChatBoost>>) -> Self {
130280        t.consume()
130281    }
130282}
130283impl From<BoxWrapper<Unbox<ShippingOption>>> for ShippingOption {
130284    fn from(t: BoxWrapper<Unbox<ShippingOption>>) -> Self {
130285        t.consume()
130286    }
130287}
130288impl From<BoxWrapper<Box<ShippingOption>>> for ShippingOption {
130289    fn from(t: BoxWrapper<Box<ShippingOption>>) -> Self {
130290        t.consume()
130291    }
130292}
130293impl From<BoxWrapper<Unbox<PassportElementErrorFrontSide>>> for PassportElementErrorFrontSide {
130294    fn from(t: BoxWrapper<Unbox<PassportElementErrorFrontSide>>) -> Self {
130295        t.consume()
130296    }
130297}
130298impl From<BoxWrapper<Box<PassportElementErrorFrontSide>>> for PassportElementErrorFrontSide {
130299    fn from(t: BoxWrapper<Box<PassportElementErrorFrontSide>>) -> Self {
130300        t.consume()
130301    }
130302}
130303impl From<BoxWrapper<Unbox<BusinessOpeningHours>>> for BusinessOpeningHours {
130304    fn from(t: BoxWrapper<Unbox<BusinessOpeningHours>>) -> Self {
130305        t.consume()
130306    }
130307}
130308impl From<BoxWrapper<Box<BusinessOpeningHours>>> for BusinessOpeningHours {
130309    fn from(t: BoxWrapper<Box<BusinessOpeningHours>>) -> Self {
130310        t.consume()
130311    }
130312}
130313impl From<BoxWrapper<Unbox<ReactionType>>> for ReactionType {
130314    fn from(t: BoxWrapper<Unbox<ReactionType>>) -> Self {
130315        t.consume()
130316    }
130317}
130318impl From<BoxWrapper<Box<ReactionType>>> for ReactionType {
130319    fn from(t: BoxWrapper<Box<ReactionType>>) -> Self {
130320        t.consume()
130321    }
130322}
130323impl From<BoxWrapper<Unbox<Story>>> for Story {
130324    fn from(t: BoxWrapper<Unbox<Story>>) -> Self {
130325        t.consume()
130326    }
130327}
130328impl From<BoxWrapper<Box<Story>>> for Story {
130329    fn from(t: BoxWrapper<Box<Story>>) -> Self {
130330        t.consume()
130331    }
130332}
130333impl From<BoxWrapper<Unbox<WebAppInfo>>> for WebAppInfo {
130334    fn from(t: BoxWrapper<Unbox<WebAppInfo>>) -> Self {
130335        t.consume()
130336    }
130337}
130338impl From<BoxWrapper<Box<WebAppInfo>>> for WebAppInfo {
130339    fn from(t: BoxWrapper<Box<WebAppInfo>>) -> Self {
130340        t.consume()
130341    }
130342}
130343impl From<BoxWrapper<Unbox<BotCommandScopeChatMember>>> for BotCommandScopeChatMember {
130344    fn from(t: BoxWrapper<Unbox<BotCommandScopeChatMember>>) -> Self {
130345        t.consume()
130346    }
130347}
130348impl From<BoxWrapper<Box<BotCommandScopeChatMember>>> for BotCommandScopeChatMember {
130349    fn from(t: BoxWrapper<Box<BotCommandScopeChatMember>>) -> Self {
130350        t.consume()
130351    }
130352}
130353impl From<BoxWrapper<Unbox<ChatBackground>>> for ChatBackground {
130354    fn from(t: BoxWrapper<Unbox<ChatBackground>>) -> Self {
130355        t.consume()
130356    }
130357}
130358impl From<BoxWrapper<Box<ChatBackground>>> for ChatBackground {
130359    fn from(t: BoxWrapper<Box<ChatBackground>>) -> Self {
130360        t.consume()
130361    }
130362}
130363impl From<BoxWrapper<Unbox<PassportFile>>> for PassportFile {
130364    fn from(t: BoxWrapper<Unbox<PassportFile>>) -> Self {
130365        t.consume()
130366    }
130367}
130368impl From<BoxWrapper<Box<PassportFile>>> for PassportFile {
130369    fn from(t: BoxWrapper<Box<PassportFile>>) -> Self {
130370        t.consume()
130371    }
130372}
130373impl From<BoxWrapper<Unbox<BotCommandScopeAllChatAdministrators>>>
130374    for BotCommandScopeAllChatAdministrators
130375{
130376    fn from(t: BoxWrapper<Unbox<BotCommandScopeAllChatAdministrators>>) -> Self {
130377        t.consume()
130378    }
130379}
130380impl From<BoxWrapper<Box<BotCommandScopeAllChatAdministrators>>>
130381    for BotCommandScopeAllChatAdministrators
130382{
130383    fn from(t: BoxWrapper<Box<BotCommandScopeAllChatAdministrators>>) -> Self {
130384        t.consume()
130385    }
130386}
130387impl From<BoxWrapper<Unbox<InputMedia>>> for InputMedia {
130388    fn from(t: BoxWrapper<Unbox<InputMedia>>) -> Self {
130389        t.consume()
130390    }
130391}
130392impl From<BoxWrapper<Box<InputMedia>>> for InputMedia {
130393    fn from(t: BoxWrapper<Box<InputMedia>>) -> Self {
130394        t.consume()
130395    }
130396}
130397impl From<BoxWrapper<Unbox<ExternalReplyInfo>>> for ExternalReplyInfo {
130398    fn from(t: BoxWrapper<Unbox<ExternalReplyInfo>>) -> Self {
130399        t.consume()
130400    }
130401}
130402impl From<BoxWrapper<Box<ExternalReplyInfo>>> for ExternalReplyInfo {
130403    fn from(t: BoxWrapper<Box<ExternalReplyInfo>>) -> Self {
130404        t.consume()
130405    }
130406}
130407impl From<BoxWrapper<Unbox<InlineQueryResultCachedGif>>> for InlineQueryResultCachedGif {
130408    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedGif>>) -> Self {
130409        t.consume()
130410    }
130411}
130412impl From<BoxWrapper<Box<InlineQueryResultCachedGif>>> for InlineQueryResultCachedGif {
130413    fn from(t: BoxWrapper<Box<InlineQueryResultCachedGif>>) -> Self {
130414        t.consume()
130415    }
130416}
130417impl From<BoxWrapper<Unbox<WriteAccessAllowed>>> for WriteAccessAllowed {
130418    fn from(t: BoxWrapper<Unbox<WriteAccessAllowed>>) -> Self {
130419        t.consume()
130420    }
130421}
130422impl From<BoxWrapper<Box<WriteAccessAllowed>>> for WriteAccessAllowed {
130423    fn from(t: BoxWrapper<Box<WriteAccessAllowed>>) -> Self {
130424        t.consume()
130425    }
130426}
130427impl From<BoxWrapper<Unbox<TransactionPartnerTelegramApi>>> for TransactionPartnerTelegramApi {
130428    fn from(t: BoxWrapper<Unbox<TransactionPartnerTelegramApi>>) -> Self {
130429        t.consume()
130430    }
130431}
130432impl From<BoxWrapper<Box<TransactionPartnerTelegramApi>>> for TransactionPartnerTelegramApi {
130433    fn from(t: BoxWrapper<Box<TransactionPartnerTelegramApi>>) -> Self {
130434        t.consume()
130435    }
130436}
130437impl From<BoxWrapper<Unbox<ProximityAlertTriggered>>> for ProximityAlertTriggered {
130438    fn from(t: BoxWrapper<Unbox<ProximityAlertTriggered>>) -> Self {
130439        t.consume()
130440    }
130441}
130442impl From<BoxWrapper<Box<ProximityAlertTriggered>>> for ProximityAlertTriggered {
130443    fn from(t: BoxWrapper<Box<ProximityAlertTriggered>>) -> Self {
130444        t.consume()
130445    }
130446}
130447impl From<BoxWrapper<Unbox<InlineQueryResultAudio>>> for InlineQueryResultAudio {
130448    fn from(t: BoxWrapper<Unbox<InlineQueryResultAudio>>) -> Self {
130449        t.consume()
130450    }
130451}
130452impl From<BoxWrapper<Box<InlineQueryResultAudio>>> for InlineQueryResultAudio {
130453    fn from(t: BoxWrapper<Box<InlineQueryResultAudio>>) -> Self {
130454        t.consume()
130455    }
130456}
130457impl From<BoxWrapper<Unbox<Message>>> for Message {
130458    fn from(t: BoxWrapper<Unbox<Message>>) -> Self {
130459        t.consume()
130460    }
130461}
130462impl From<BoxWrapper<Box<Message>>> for Message {
130463    fn from(t: BoxWrapper<Box<Message>>) -> Self {
130464        t.consume()
130465    }
130466}
130467impl From<BoxWrapper<Unbox<ChatPhoto>>> for ChatPhoto {
130468    fn from(t: BoxWrapper<Unbox<ChatPhoto>>) -> Self {
130469        t.consume()
130470    }
130471}
130472impl From<BoxWrapper<Box<ChatPhoto>>> for ChatPhoto {
130473    fn from(t: BoxWrapper<Box<ChatPhoto>>) -> Self {
130474        t.consume()
130475    }
130476}
130477impl From<BoxWrapper<Unbox<InlineQueryResultGame>>> for InlineQueryResultGame {
130478    fn from(t: BoxWrapper<Unbox<InlineQueryResultGame>>) -> Self {
130479        t.consume()
130480    }
130481}
130482impl From<BoxWrapper<Box<InlineQueryResultGame>>> for InlineQueryResultGame {
130483    fn from(t: BoxWrapper<Box<InlineQueryResultGame>>) -> Self {
130484        t.consume()
130485    }
130486}
130487impl From<BoxWrapper<Unbox<RevenueWithdrawalStateFailed>>> for RevenueWithdrawalStateFailed {
130488    fn from(t: BoxWrapper<Unbox<RevenueWithdrawalStateFailed>>) -> Self {
130489        t.consume()
130490    }
130491}
130492impl From<BoxWrapper<Box<RevenueWithdrawalStateFailed>>> for RevenueWithdrawalStateFailed {
130493    fn from(t: BoxWrapper<Box<RevenueWithdrawalStateFailed>>) -> Self {
130494        t.consume()
130495    }
130496}
130497impl From<BoxWrapper<Unbox<MessageEntity>>> for MessageEntity {
130498    fn from(t: BoxWrapper<Unbox<MessageEntity>>) -> Self {
130499        t.consume()
130500    }
130501}
130502impl From<BoxWrapper<Box<MessageEntity>>> for MessageEntity {
130503    fn from(t: BoxWrapper<Box<MessageEntity>>) -> Self {
130504        t.consume()
130505    }
130506}
130507impl From<BoxWrapper<Unbox<UniqueGiftBackdropColors>>> for UniqueGiftBackdropColors {
130508    fn from(t: BoxWrapper<Unbox<UniqueGiftBackdropColors>>) -> Self {
130509        t.consume()
130510    }
130511}
130512impl From<BoxWrapper<Box<UniqueGiftBackdropColors>>> for UniqueGiftBackdropColors {
130513    fn from(t: BoxWrapper<Box<UniqueGiftBackdropColors>>) -> Self {
130514        t.consume()
130515    }
130516}
130517impl From<BoxWrapper<Unbox<InputStoryContent>>> for InputStoryContent {
130518    fn from(t: BoxWrapper<Unbox<InputStoryContent>>) -> Self {
130519        t.consume()
130520    }
130521}
130522impl From<BoxWrapper<Box<InputStoryContent>>> for InputStoryContent {
130523    fn from(t: BoxWrapper<Box<InputStoryContent>>) -> Self {
130524        t.consume()
130525    }
130526}
130527impl From<BoxWrapper<Unbox<SuggestedPostApprovalFailed>>> for SuggestedPostApprovalFailed {
130528    fn from(t: BoxWrapper<Unbox<SuggestedPostApprovalFailed>>) -> Self {
130529        t.consume()
130530    }
130531}
130532impl From<BoxWrapper<Box<SuggestedPostApprovalFailed>>> for SuggestedPostApprovalFailed {
130533    fn from(t: BoxWrapper<Box<SuggestedPostApprovalFailed>>) -> Self {
130534        t.consume()
130535    }
130536}
130537impl From<BoxWrapper<Unbox<Document>>> for Document {
130538    fn from(t: BoxWrapper<Unbox<Document>>) -> Self {
130539        t.consume()
130540    }
130541}
130542impl From<BoxWrapper<Box<Document>>> for Document {
130543    fn from(t: BoxWrapper<Box<Document>>) -> Self {
130544        t.consume()
130545    }
130546}
130547impl From<BoxWrapper<Unbox<SharedUser>>> for SharedUser {
130548    fn from(t: BoxWrapper<Unbox<SharedUser>>) -> Self {
130549        t.consume()
130550    }
130551}
130552impl From<BoxWrapper<Box<SharedUser>>> for SharedUser {
130553    fn from(t: BoxWrapper<Box<SharedUser>>) -> Self {
130554        t.consume()
130555    }
130556}
130557impl From<BoxWrapper<Unbox<UniqueGiftInfo>>> for UniqueGiftInfo {
130558    fn from(t: BoxWrapper<Unbox<UniqueGiftInfo>>) -> Self {
130559        t.consume()
130560    }
130561}
130562impl From<BoxWrapper<Box<UniqueGiftInfo>>> for UniqueGiftInfo {
130563    fn from(t: BoxWrapper<Box<UniqueGiftInfo>>) -> Self {
130564        t.consume()
130565    }
130566}
130567impl From<BoxWrapper<Unbox<ShippingQuery>>> for ShippingQuery {
130568    fn from(t: BoxWrapper<Unbox<ShippingQuery>>) -> Self {
130569        t.consume()
130570    }
130571}
130572impl From<BoxWrapper<Box<ShippingQuery>>> for ShippingQuery {
130573    fn from(t: BoxWrapper<Box<ShippingQuery>>) -> Self {
130574        t.consume()
130575    }
130576}
130577impl From<BoxWrapper<Unbox<InlineQueryResultVideo>>> for InlineQueryResultVideo {
130578    fn from(t: BoxWrapper<Unbox<InlineQueryResultVideo>>) -> Self {
130579        t.consume()
130580    }
130581}
130582impl From<BoxWrapper<Box<InlineQueryResultVideo>>> for InlineQueryResultVideo {
130583    fn from(t: BoxWrapper<Box<InlineQueryResultVideo>>) -> Self {
130584        t.consume()
130585    }
130586}
130587impl From<BoxWrapper<Unbox<DirectMessagePriceChanged>>> for DirectMessagePriceChanged {
130588    fn from(t: BoxWrapper<Unbox<DirectMessagePriceChanged>>) -> Self {
130589        t.consume()
130590    }
130591}
130592impl From<BoxWrapper<Box<DirectMessagePriceChanged>>> for DirectMessagePriceChanged {
130593    fn from(t: BoxWrapper<Box<DirectMessagePriceChanged>>) -> Self {
130594        t.consume()
130595    }
130596}
130597impl From<BoxWrapper<Unbox<ReactionCount>>> for ReactionCount {
130598    fn from(t: BoxWrapper<Unbox<ReactionCount>>) -> Self {
130599        t.consume()
130600    }
130601}
130602impl From<BoxWrapper<Box<ReactionCount>>> for ReactionCount {
130603    fn from(t: BoxWrapper<Box<ReactionCount>>) -> Self {
130604        t.consume()
130605    }
130606}
130607impl From<BoxWrapper<Unbox<ChatShared>>> for ChatShared {
130608    fn from(t: BoxWrapper<Unbox<ChatShared>>) -> Self {
130609        t.consume()
130610    }
130611}
130612impl From<BoxWrapper<Box<ChatShared>>> for ChatShared {
130613    fn from(t: BoxWrapper<Box<ChatShared>>) -> Self {
130614        t.consume()
130615    }
130616}
130617impl From<BoxWrapper<Unbox<MessageOriginChannel>>> for MessageOriginChannel {
130618    fn from(t: BoxWrapper<Unbox<MessageOriginChannel>>) -> Self {
130619        t.consume()
130620    }
130621}
130622impl From<BoxWrapper<Box<MessageOriginChannel>>> for MessageOriginChannel {
130623    fn from(t: BoxWrapper<Box<MessageOriginChannel>>) -> Self {
130624        t.consume()
130625    }
130626}
130627impl From<BoxWrapper<Unbox<ChatBoostRemoved>>> for ChatBoostRemoved {
130628    fn from(t: BoxWrapper<Unbox<ChatBoostRemoved>>) -> Self {
130629        t.consume()
130630    }
130631}
130632impl From<BoxWrapper<Box<ChatBoostRemoved>>> for ChatBoostRemoved {
130633    fn from(t: BoxWrapper<Box<ChatBoostRemoved>>) -> Self {
130634        t.consume()
130635    }
130636}
130637impl From<BoxWrapper<Unbox<BackgroundTypeFill>>> for BackgroundTypeFill {
130638    fn from(t: BoxWrapper<Unbox<BackgroundTypeFill>>) -> Self {
130639        t.consume()
130640    }
130641}
130642impl From<BoxWrapper<Box<BackgroundTypeFill>>> for BackgroundTypeFill {
130643    fn from(t: BoxWrapper<Box<BackgroundTypeFill>>) -> Self {
130644        t.consume()
130645    }
130646}
130647impl From<BoxWrapper<Unbox<MessageId>>> for MessageId {
130648    fn from(t: BoxWrapper<Unbox<MessageId>>) -> Self {
130649        t.consume()
130650    }
130651}
130652impl From<BoxWrapper<Box<MessageId>>> for MessageId {
130653    fn from(t: BoxWrapper<Box<MessageId>>) -> Self {
130654        t.consume()
130655    }
130656}
130657impl From<BoxWrapper<Unbox<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat {
130658    fn from(t: BoxWrapper<Unbox<KeyboardButtonRequestChat>>) -> Self {
130659        t.consume()
130660    }
130661}
130662impl From<BoxWrapper<Box<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat {
130663    fn from(t: BoxWrapper<Box<KeyboardButtonRequestChat>>) -> Self {
130664        t.consume()
130665    }
130666}
130667impl From<BoxWrapper<Unbox<ReactionTypeEmoji>>> for ReactionTypeEmoji {
130668    fn from(t: BoxWrapper<Unbox<ReactionTypeEmoji>>) -> Self {
130669        t.consume()
130670    }
130671}
130672impl From<BoxWrapper<Box<ReactionTypeEmoji>>> for ReactionTypeEmoji {
130673    fn from(t: BoxWrapper<Box<ReactionTypeEmoji>>) -> Self {
130674        t.consume()
130675    }
130676}
130677impl From<BoxWrapper<Unbox<InputFile>>> for InputFile {
130678    fn from(t: BoxWrapper<Unbox<InputFile>>) -> Self {
130679        t.consume()
130680    }
130681}
130682impl From<BoxWrapper<Box<InputFile>>> for InputFile {
130683    fn from(t: BoxWrapper<Box<InputFile>>) -> Self {
130684        t.consume()
130685    }
130686}
130687impl From<BoxWrapper<Unbox<SentWebAppMessage>>> for SentWebAppMessage {
130688    fn from(t: BoxWrapper<Unbox<SentWebAppMessage>>) -> Self {
130689        t.consume()
130690    }
130691}
130692impl From<BoxWrapper<Box<SentWebAppMessage>>> for SentWebAppMessage {
130693    fn from(t: BoxWrapper<Box<SentWebAppMessage>>) -> Self {
130694        t.consume()
130695    }
130696}
130697impl From<BoxWrapper<Unbox<Giveaway>>> for Giveaway {
130698    fn from(t: BoxWrapper<Unbox<Giveaway>>) -> Self {
130699        t.consume()
130700    }
130701}
130702impl From<BoxWrapper<Box<Giveaway>>> for Giveaway {
130703    fn from(t: BoxWrapper<Box<Giveaway>>) -> Self {
130704        t.consume()
130705    }
130706}
130707impl From<BoxWrapper<Unbox<DirectMessagesTopic>>> for DirectMessagesTopic {
130708    fn from(t: BoxWrapper<Unbox<DirectMessagesTopic>>) -> Self {
130709        t.consume()
130710    }
130711}
130712impl From<BoxWrapper<Box<DirectMessagesTopic>>> for DirectMessagesTopic {
130713    fn from(t: BoxWrapper<Box<DirectMessagesTopic>>) -> Self {
130714        t.consume()
130715    }
130716}
130717impl From<BoxWrapper<Unbox<RevenueWithdrawalStateSucceeded>>> for RevenueWithdrawalStateSucceeded {
130718    fn from(t: BoxWrapper<Unbox<RevenueWithdrawalStateSucceeded>>) -> Self {
130719        t.consume()
130720    }
130721}
130722impl From<BoxWrapper<Box<RevenueWithdrawalStateSucceeded>>> for RevenueWithdrawalStateSucceeded {
130723    fn from(t: BoxWrapper<Box<RevenueWithdrawalStateSucceeded>>) -> Self {
130724        t.consume()
130725    }
130726}
130727impl From<BoxWrapper<Unbox<VideoChatEnded>>> for VideoChatEnded {
130728    fn from(t: BoxWrapper<Unbox<VideoChatEnded>>) -> Self {
130729        t.consume()
130730    }
130731}
130732impl From<BoxWrapper<Box<VideoChatEnded>>> for VideoChatEnded {
130733    fn from(t: BoxWrapper<Box<VideoChatEnded>>) -> Self {
130734        t.consume()
130735    }
130736}
130737impl From<BoxWrapper<Unbox<ChatMemberOwner>>> for ChatMemberOwner {
130738    fn from(t: BoxWrapper<Unbox<ChatMemberOwner>>) -> Self {
130739        t.consume()
130740    }
130741}
130742impl From<BoxWrapper<Box<ChatMemberOwner>>> for ChatMemberOwner {
130743    fn from(t: BoxWrapper<Box<ChatMemberOwner>>) -> Self {
130744        t.consume()
130745    }
130746}
130747impl From<BoxWrapper<Unbox<PreCheckoutQuery>>> for PreCheckoutQuery {
130748    fn from(t: BoxWrapper<Unbox<PreCheckoutQuery>>) -> Self {
130749        t.consume()
130750    }
130751}
130752impl From<BoxWrapper<Box<PreCheckoutQuery>>> for PreCheckoutQuery {
130753    fn from(t: BoxWrapper<Box<PreCheckoutQuery>>) -> Self {
130754        t.consume()
130755    }
130756}
130757impl From<BoxWrapper<Unbox<BackgroundType>>> for BackgroundType {
130758    fn from(t: BoxWrapper<Unbox<BackgroundType>>) -> Self {
130759        t.consume()
130760    }
130761}
130762impl From<BoxWrapper<Box<BackgroundType>>> for BackgroundType {
130763    fn from(t: BoxWrapper<Box<BackgroundType>>) -> Self {
130764        t.consume()
130765    }
130766}
130767impl From<BoxWrapper<Unbox<InlineQueryResultVenue>>> for InlineQueryResultVenue {
130768    fn from(t: BoxWrapper<Unbox<InlineQueryResultVenue>>) -> Self {
130769        t.consume()
130770    }
130771}
130772impl From<BoxWrapper<Box<InlineQueryResultVenue>>> for InlineQueryResultVenue {
130773    fn from(t: BoxWrapper<Box<InlineQueryResultVenue>>) -> Self {
130774        t.consume()
130775    }
130776}
130777impl From<BoxWrapper<Unbox<PaidMediaInfo>>> for PaidMediaInfo {
130778    fn from(t: BoxWrapper<Unbox<PaidMediaInfo>>) -> Self {
130779        t.consume()
130780    }
130781}
130782impl From<BoxWrapper<Box<PaidMediaInfo>>> for PaidMediaInfo {
130783    fn from(t: BoxWrapper<Box<PaidMediaInfo>>) -> Self {
130784        t.consume()
130785    }
130786}
130787impl From<BoxWrapper<Unbox<InlineQueryResultCachedPhoto>>> for InlineQueryResultCachedPhoto {
130788    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedPhoto>>) -> Self {
130789        t.consume()
130790    }
130791}
130792impl From<BoxWrapper<Box<InlineQueryResultCachedPhoto>>> for InlineQueryResultCachedPhoto {
130793    fn from(t: BoxWrapper<Box<InlineQueryResultCachedPhoto>>) -> Self {
130794        t.consume()
130795    }
130796}
130797impl From<BoxWrapper<Unbox<GeneralForumTopicUnhidden>>> for GeneralForumTopicUnhidden {
130798    fn from(t: BoxWrapper<Unbox<GeneralForumTopicUnhidden>>) -> Self {
130799        t.consume()
130800    }
130801}
130802impl From<BoxWrapper<Box<GeneralForumTopicUnhidden>>> for GeneralForumTopicUnhidden {
130803    fn from(t: BoxWrapper<Box<GeneralForumTopicUnhidden>>) -> Self {
130804        t.consume()
130805    }
130806}
130807impl From<BoxWrapper<Unbox<GiveawayWinners>>> for GiveawayWinners {
130808    fn from(t: BoxWrapper<Unbox<GiveawayWinners>>) -> Self {
130809        t.consume()
130810    }
130811}
130812impl From<BoxWrapper<Box<GiveawayWinners>>> for GiveawayWinners {
130813    fn from(t: BoxWrapper<Box<GiveawayWinners>>) -> Self {
130814        t.consume()
130815    }
130816}
130817impl From<BoxWrapper<Unbox<MessageOriginHiddenUser>>> for MessageOriginHiddenUser {
130818    fn from(t: BoxWrapper<Unbox<MessageOriginHiddenUser>>) -> Self {
130819        t.consume()
130820    }
130821}
130822impl From<BoxWrapper<Box<MessageOriginHiddenUser>>> for MessageOriginHiddenUser {
130823    fn from(t: BoxWrapper<Box<MessageOriginHiddenUser>>) -> Self {
130824        t.consume()
130825    }
130826}
130827impl From<BoxWrapper<Unbox<StoryAreaTypeLocation>>> for StoryAreaTypeLocation {
130828    fn from(t: BoxWrapper<Unbox<StoryAreaTypeLocation>>) -> Self {
130829        t.consume()
130830    }
130831}
130832impl From<BoxWrapper<Box<StoryAreaTypeLocation>>> for StoryAreaTypeLocation {
130833    fn from(t: BoxWrapper<Box<StoryAreaTypeLocation>>) -> Self {
130834        t.consume()
130835    }
130836}
130837impl From<BoxWrapper<Unbox<SuggestedPostParameters>>> for SuggestedPostParameters {
130838    fn from(t: BoxWrapper<Unbox<SuggestedPostParameters>>) -> Self {
130839        t.consume()
130840    }
130841}
130842impl From<BoxWrapper<Box<SuggestedPostParameters>>> for SuggestedPostParameters {
130843    fn from(t: BoxWrapper<Box<SuggestedPostParameters>>) -> Self {
130844        t.consume()
130845    }
130846}
130847impl From<BoxWrapper<Unbox<StickerSet>>> for StickerSet {
130848    fn from(t: BoxWrapper<Unbox<StickerSet>>) -> Self {
130849        t.consume()
130850    }
130851}
130852impl From<BoxWrapper<Box<StickerSet>>> for StickerSet {
130853    fn from(t: BoxWrapper<Box<StickerSet>>) -> Self {
130854        t.consume()
130855    }
130856}
130857impl From<BoxWrapper<Unbox<Poll>>> for Poll {
130858    fn from(t: BoxWrapper<Unbox<Poll>>) -> Self {
130859        t.consume()
130860    }
130861}
130862impl From<BoxWrapper<Box<Poll>>> for Poll {
130863    fn from(t: BoxWrapper<Box<Poll>>) -> Self {
130864        t.consume()
130865    }
130866}
130867impl From<BoxWrapper<Unbox<Video>>> for Video {
130868    fn from(t: BoxWrapper<Unbox<Video>>) -> Self {
130869        t.consume()
130870    }
130871}
130872impl From<BoxWrapper<Box<Video>>> for Video {
130873    fn from(t: BoxWrapper<Box<Video>>) -> Self {
130874        t.consume()
130875    }
130876}
130877impl From<BoxWrapper<Unbox<GeneralForumTopicHidden>>> for GeneralForumTopicHidden {
130878    fn from(t: BoxWrapper<Unbox<GeneralForumTopicHidden>>) -> Self {
130879        t.consume()
130880    }
130881}
130882impl From<BoxWrapper<Box<GeneralForumTopicHidden>>> for GeneralForumTopicHidden {
130883    fn from(t: BoxWrapper<Box<GeneralForumTopicHidden>>) -> Self {
130884        t.consume()
130885    }
130886}
130887impl From<BoxWrapper<Unbox<ChatAdministratorRights>>> for ChatAdministratorRights {
130888    fn from(t: BoxWrapper<Unbox<ChatAdministratorRights>>) -> Self {
130889        t.consume()
130890    }
130891}
130892impl From<BoxWrapper<Box<ChatAdministratorRights>>> for ChatAdministratorRights {
130893    fn from(t: BoxWrapper<Box<ChatAdministratorRights>>) -> Self {
130894        t.consume()
130895    }
130896}
130897impl From<BoxWrapper<Unbox<ResponseParameters>>> for ResponseParameters {
130898    fn from(t: BoxWrapper<Unbox<ResponseParameters>>) -> Self {
130899        t.consume()
130900    }
130901}
130902impl From<BoxWrapper<Box<ResponseParameters>>> for ResponseParameters {
130903    fn from(t: BoxWrapper<Box<ResponseParameters>>) -> Self {
130904        t.consume()
130905    }
130906}
130907impl From<BoxWrapper<Unbox<VideoNote>>> for VideoNote {
130908    fn from(t: BoxWrapper<Unbox<VideoNote>>) -> Self {
130909        t.consume()
130910    }
130911}
130912impl From<BoxWrapper<Box<VideoNote>>> for VideoNote {
130913    fn from(t: BoxWrapper<Box<VideoNote>>) -> Self {
130914        t.consume()
130915    }
130916}
130917impl From<BoxWrapper<Unbox<ReplyKeyboardRemove>>> for ReplyKeyboardRemove {
130918    fn from(t: BoxWrapper<Unbox<ReplyKeyboardRemove>>) -> Self {
130919        t.consume()
130920    }
130921}
130922impl From<BoxWrapper<Box<ReplyKeyboardRemove>>> for ReplyKeyboardRemove {
130923    fn from(t: BoxWrapper<Box<ReplyKeyboardRemove>>) -> Self {
130924        t.consume()
130925    }
130926}
130927impl From<BoxWrapper<Unbox<LabeledPrice>>> for LabeledPrice {
130928    fn from(t: BoxWrapper<Unbox<LabeledPrice>>) -> Self {
130929        t.consume()
130930    }
130931}
130932impl From<BoxWrapper<Box<LabeledPrice>>> for LabeledPrice {
130933    fn from(t: BoxWrapper<Box<LabeledPrice>>) -> Self {
130934        t.consume()
130935    }
130936}
130937impl From<BoxWrapper<Unbox<InputPollOption>>> for InputPollOption {
130938    fn from(t: BoxWrapper<Unbox<InputPollOption>>) -> Self {
130939        t.consume()
130940    }
130941}
130942impl From<BoxWrapper<Box<InputPollOption>>> for InputPollOption {
130943    fn from(t: BoxWrapper<Box<InputPollOption>>) -> Self {
130944        t.consume()
130945    }
130946}
130947impl From<BoxWrapper<Unbox<ChatBoostSourcePremium>>> for ChatBoostSourcePremium {
130948    fn from(t: BoxWrapper<Unbox<ChatBoostSourcePremium>>) -> Self {
130949        t.consume()
130950    }
130951}
130952impl From<BoxWrapper<Box<ChatBoostSourcePremium>>> for ChatBoostSourcePremium {
130953    fn from(t: BoxWrapper<Box<ChatBoostSourcePremium>>) -> Self {
130954        t.consume()
130955    }
130956}
130957impl From<BoxWrapper<Unbox<InputMediaVideo>>> for InputMediaVideo {
130958    fn from(t: BoxWrapper<Unbox<InputMediaVideo>>) -> Self {
130959        t.consume()
130960    }
130961}
130962impl From<BoxWrapper<Box<InputMediaVideo>>> for InputMediaVideo {
130963    fn from(t: BoxWrapper<Box<InputMediaVideo>>) -> Self {
130964        t.consume()
130965    }
130966}
130967impl From<BoxWrapper<Unbox<InputMediaAudio>>> for InputMediaAudio {
130968    fn from(t: BoxWrapper<Unbox<InputMediaAudio>>) -> Self {
130969        t.consume()
130970    }
130971}
130972impl From<BoxWrapper<Box<InputMediaAudio>>> for InputMediaAudio {
130973    fn from(t: BoxWrapper<Box<InputMediaAudio>>) -> Self {
130974        t.consume()
130975    }
130976}
130977impl From<BoxWrapper<Unbox<ChatBoostSource>>> for ChatBoostSource {
130978    fn from(t: BoxWrapper<Unbox<ChatBoostSource>>) -> Self {
130979        t.consume()
130980    }
130981}
130982impl From<BoxWrapper<Box<ChatBoostSource>>> for ChatBoostSource {
130983    fn from(t: BoxWrapper<Box<ChatBoostSource>>) -> Self {
130984        t.consume()
130985    }
130986}
130987impl From<BoxWrapper<Unbox<BotCommandScope>>> for BotCommandScope {
130988    fn from(t: BoxWrapper<Unbox<BotCommandScope>>) -> Self {
130989        t.consume()
130990    }
130991}
130992impl From<BoxWrapper<Box<BotCommandScope>>> for BotCommandScope {
130993    fn from(t: BoxWrapper<Box<BotCommandScope>>) -> Self {
130994        t.consume()
130995    }
130996}
130997impl From<BoxWrapper<Unbox<OwnedGifts>>> for OwnedGifts {
130998    fn from(t: BoxWrapper<Unbox<OwnedGifts>>) -> Self {
130999        t.consume()
131000    }
131001}
131002impl From<BoxWrapper<Box<OwnedGifts>>> for OwnedGifts {
131003    fn from(t: BoxWrapper<Box<OwnedGifts>>) -> Self {
131004        t.consume()
131005    }
131006}
131007impl From<BoxWrapper<Unbox<EncryptedPassportElement>>> for EncryptedPassportElement {
131008    fn from(t: BoxWrapper<Unbox<EncryptedPassportElement>>) -> Self {
131009        t.consume()
131010    }
131011}
131012impl From<BoxWrapper<Box<EncryptedPassportElement>>> for EncryptedPassportElement {
131013    fn from(t: BoxWrapper<Box<EncryptedPassportElement>>) -> Self {
131014        t.consume()
131015    }
131016}
131017impl From<BoxWrapper<Unbox<PaidMedia>>> for PaidMedia {
131018    fn from(t: BoxWrapper<Unbox<PaidMedia>>) -> Self {
131019        t.consume()
131020    }
131021}
131022impl From<BoxWrapper<Box<PaidMedia>>> for PaidMedia {
131023    fn from(t: BoxWrapper<Box<PaidMedia>>) -> Self {
131024        t.consume()
131025    }
131026}
131027impl From<BoxWrapper<Unbox<Invoice>>> for Invoice {
131028    fn from(t: BoxWrapper<Unbox<Invoice>>) -> Self {
131029        t.consume()
131030    }
131031}
131032impl From<BoxWrapper<Box<Invoice>>> for Invoice {
131033    fn from(t: BoxWrapper<Box<Invoice>>) -> Self {
131034        t.consume()
131035    }
131036}
131037impl From<BoxWrapper<Unbox<OwnedGift>>> for OwnedGift {
131038    fn from(t: BoxWrapper<Unbox<OwnedGift>>) -> Self {
131039        t.consume()
131040    }
131041}
131042impl From<BoxWrapper<Box<OwnedGift>>> for OwnedGift {
131043    fn from(t: BoxWrapper<Box<OwnedGift>>) -> Self {
131044        t.consume()
131045    }
131046}
131047impl From<BoxWrapper<Unbox<BotShortDescription>>> for BotShortDescription {
131048    fn from(t: BoxWrapper<Unbox<BotShortDescription>>) -> Self {
131049        t.consume()
131050    }
131051}
131052impl From<BoxWrapper<Box<BotShortDescription>>> for BotShortDescription {
131053    fn from(t: BoxWrapper<Box<BotShortDescription>>) -> Self {
131054        t.consume()
131055    }
131056}
131057impl From<BoxWrapper<Unbox<ChatFullInfo>>> for ChatFullInfo {
131058    fn from(t: BoxWrapper<Unbox<ChatFullInfo>>) -> Self {
131059        t.consume()
131060    }
131061}
131062impl From<BoxWrapper<Box<ChatFullInfo>>> for ChatFullInfo {
131063    fn from(t: BoxWrapper<Box<ChatFullInfo>>) -> Self {
131064        t.consume()
131065    }
131066}
131067impl From<BoxWrapper<Unbox<MessageOrigin>>> for MessageOrigin {
131068    fn from(t: BoxWrapper<Unbox<MessageOrigin>>) -> Self {
131069        t.consume()
131070    }
131071}
131072impl From<BoxWrapper<Box<MessageOrigin>>> for MessageOrigin {
131073    fn from(t: BoxWrapper<Box<MessageOrigin>>) -> Self {
131074        t.consume()
131075    }
131076}
131077impl From<BoxWrapper<Unbox<PollAnswer>>> for PollAnswer {
131078    fn from(t: BoxWrapper<Unbox<PollAnswer>>) -> Self {
131079        t.consume()
131080    }
131081}
131082impl From<BoxWrapper<Box<PollAnswer>>> for PollAnswer {
131083    fn from(t: BoxWrapper<Box<PollAnswer>>) -> Self {
131084        t.consume()
131085    }
131086}
131087impl From<BoxWrapper<Unbox<WebhookInfo>>> for WebhookInfo {
131088    fn from(t: BoxWrapper<Unbox<WebhookInfo>>) -> Self {
131089        t.consume()
131090    }
131091}
131092impl From<BoxWrapper<Box<WebhookInfo>>> for WebhookInfo {
131093    fn from(t: BoxWrapper<Box<WebhookInfo>>) -> Self {
131094        t.consume()
131095    }
131096}
131097impl From<BoxWrapper<Unbox<BusinessMessagesDeleted>>> for BusinessMessagesDeleted {
131098    fn from(t: BoxWrapper<Unbox<BusinessMessagesDeleted>>) -> Self {
131099        t.consume()
131100    }
131101}
131102impl From<BoxWrapper<Box<BusinessMessagesDeleted>>> for BusinessMessagesDeleted {
131103    fn from(t: BoxWrapper<Box<BusinessMessagesDeleted>>) -> Self {
131104        t.consume()
131105    }
131106}
131107impl From<BoxWrapper<Unbox<BotCommandScopeDefault>>> for BotCommandScopeDefault {
131108    fn from(t: BoxWrapper<Unbox<BotCommandScopeDefault>>) -> Self {
131109        t.consume()
131110    }
131111}
131112impl From<BoxWrapper<Box<BotCommandScopeDefault>>> for BotCommandScopeDefault {
131113    fn from(t: BoxWrapper<Box<BotCommandScopeDefault>>) -> Self {
131114        t.consume()
131115    }
131116}
131117impl From<BoxWrapper<Unbox<ChatInviteLink>>> for ChatInviteLink {
131118    fn from(t: BoxWrapper<Unbox<ChatInviteLink>>) -> Self {
131119        t.consume()
131120    }
131121}
131122impl From<BoxWrapper<Box<ChatInviteLink>>> for ChatInviteLink {
131123    fn from(t: BoxWrapper<Box<ChatInviteLink>>) -> Self {
131124        t.consume()
131125    }
131126}
131127impl From<BoxWrapper<Unbox<InlineQueryResultCachedVoice>>> for InlineQueryResultCachedVoice {
131128    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedVoice>>) -> Self {
131129        t.consume()
131130    }
131131}
131132impl From<BoxWrapper<Box<InlineQueryResultCachedVoice>>> for InlineQueryResultCachedVoice {
131133    fn from(t: BoxWrapper<Box<InlineQueryResultCachedVoice>>) -> Self {
131134        t.consume()
131135    }
131136}
131137impl From<BoxWrapper<Unbox<PassportElementErrorTranslationFiles>>>
131138    for PassportElementErrorTranslationFiles
131139{
131140    fn from(t: BoxWrapper<Unbox<PassportElementErrorTranslationFiles>>) -> Self {
131141        t.consume()
131142    }
131143}
131144impl From<BoxWrapper<Box<PassportElementErrorTranslationFiles>>>
131145    for PassportElementErrorTranslationFiles
131146{
131147    fn from(t: BoxWrapper<Box<PassportElementErrorTranslationFiles>>) -> Self {
131148        t.consume()
131149    }
131150}
131151impl From<BoxWrapper<Unbox<Animation>>> for Animation {
131152    fn from(t: BoxWrapper<Unbox<Animation>>) -> Self {
131153        t.consume()
131154    }
131155}
131156impl From<BoxWrapper<Box<Animation>>> for Animation {
131157    fn from(t: BoxWrapper<Box<Animation>>) -> Self {
131158        t.consume()
131159    }
131160}
131161impl From<BoxWrapper<Unbox<Audio>>> for Audio {
131162    fn from(t: BoxWrapper<Unbox<Audio>>) -> Self {
131163        t.consume()
131164    }
131165}
131166impl From<BoxWrapper<Box<Audio>>> for Audio {
131167    fn from(t: BoxWrapper<Box<Audio>>) -> Self {
131168        t.consume()
131169    }
131170}
131171impl From<BoxWrapper<Unbox<RefundedPayment>>> for RefundedPayment {
131172    fn from(t: BoxWrapper<Unbox<RefundedPayment>>) -> Self {
131173        t.consume()
131174    }
131175}
131176impl From<BoxWrapper<Box<RefundedPayment>>> for RefundedPayment {
131177    fn from(t: BoxWrapper<Box<RefundedPayment>>) -> Self {
131178        t.consume()
131179    }
131180}
131181impl From<BoxWrapper<Unbox<InputMediaAnimation>>> for InputMediaAnimation {
131182    fn from(t: BoxWrapper<Unbox<InputMediaAnimation>>) -> Self {
131183        t.consume()
131184    }
131185}
131186impl From<BoxWrapper<Box<InputMediaAnimation>>> for InputMediaAnimation {
131187    fn from(t: BoxWrapper<Box<InputMediaAnimation>>) -> Self {
131188        t.consume()
131189    }
131190}
131191impl From<BoxWrapper<Unbox<Game>>> for Game {
131192    fn from(t: BoxWrapper<Unbox<Game>>) -> Self {
131193        t.consume()
131194    }
131195}
131196impl From<BoxWrapper<Box<Game>>> for Game {
131197    fn from(t: BoxWrapper<Box<Game>>) -> Self {
131198        t.consume()
131199    }
131200}
131201impl From<BoxWrapper<Unbox<ChatMemberMember>>> for ChatMemberMember {
131202    fn from(t: BoxWrapper<Unbox<ChatMemberMember>>) -> Self {
131203        t.consume()
131204    }
131205}
131206impl From<BoxWrapper<Box<ChatMemberMember>>> for ChatMemberMember {
131207    fn from(t: BoxWrapper<Box<ChatMemberMember>>) -> Self {
131208        t.consume()
131209    }
131210}
131211impl From<BoxWrapper<Unbox<ChatPermissions>>> for ChatPermissions {
131212    fn from(t: BoxWrapper<Unbox<ChatPermissions>>) -> Self {
131213        t.consume()
131214    }
131215}
131216impl From<BoxWrapper<Box<ChatPermissions>>> for ChatPermissions {
131217    fn from(t: BoxWrapper<Box<ChatPermissions>>) -> Self {
131218        t.consume()
131219    }
131220}
131221impl From<BoxWrapper<Unbox<StarTransactions>>> for StarTransactions {
131222    fn from(t: BoxWrapper<Unbox<StarTransactions>>) -> Self {
131223        t.consume()
131224    }
131225}
131226impl From<BoxWrapper<Box<StarTransactions>>> for StarTransactions {
131227    fn from(t: BoxWrapper<Box<StarTransactions>>) -> Self {
131228        t.consume()
131229    }
131230}
131231impl From<BoxWrapper<Unbox<EncryptedCredentials>>> for EncryptedCredentials {
131232    fn from(t: BoxWrapper<Unbox<EncryptedCredentials>>) -> Self {
131233        t.consume()
131234    }
131235}
131236impl From<BoxWrapper<Box<EncryptedCredentials>>> for EncryptedCredentials {
131237    fn from(t: BoxWrapper<Box<EncryptedCredentials>>) -> Self {
131238        t.consume()
131239    }
131240}
131241impl From<BoxWrapper<Unbox<StoryAreaTypeSuggestedReaction>>> for StoryAreaTypeSuggestedReaction {
131242    fn from(t: BoxWrapper<Unbox<StoryAreaTypeSuggestedReaction>>) -> Self {
131243        t.consume()
131244    }
131245}
131246impl From<BoxWrapper<Box<StoryAreaTypeSuggestedReaction>>> for StoryAreaTypeSuggestedReaction {
131247    fn from(t: BoxWrapper<Box<StoryAreaTypeSuggestedReaction>>) -> Self {
131248        t.consume()
131249    }
131250}
131251impl From<BoxWrapper<Unbox<ChecklistTasksAdded>>> for ChecklistTasksAdded {
131252    fn from(t: BoxWrapper<Unbox<ChecklistTasksAdded>>) -> Self {
131253        t.consume()
131254    }
131255}
131256impl From<BoxWrapper<Box<ChecklistTasksAdded>>> for ChecklistTasksAdded {
131257    fn from(t: BoxWrapper<Box<ChecklistTasksAdded>>) -> Self {
131258        t.consume()
131259    }
131260}
131261impl From<BoxWrapper<Unbox<InputMessageContent>>> for InputMessageContent {
131262    fn from(t: BoxWrapper<Unbox<InputMessageContent>>) -> Self {
131263        t.consume()
131264    }
131265}
131266impl From<BoxWrapper<Box<InputMessageContent>>> for InputMessageContent {
131267    fn from(t: BoxWrapper<Box<InputMessageContent>>) -> Self {
131268        t.consume()
131269    }
131270}
131271impl From<BoxWrapper<Unbox<BackgroundFillGradient>>> for BackgroundFillGradient {
131272    fn from(t: BoxWrapper<Unbox<BackgroundFillGradient>>) -> Self {
131273        t.consume()
131274    }
131275}
131276impl From<BoxWrapper<Box<BackgroundFillGradient>>> for BackgroundFillGradient {
131277    fn from(t: BoxWrapper<Box<BackgroundFillGradient>>) -> Self {
131278        t.consume()
131279    }
131280}
131281impl From<BoxWrapper<Unbox<SuggestedPostRefunded>>> for SuggestedPostRefunded {
131282    fn from(t: BoxWrapper<Unbox<SuggestedPostRefunded>>) -> Self {
131283        t.consume()
131284    }
131285}
131286impl From<BoxWrapper<Box<SuggestedPostRefunded>>> for SuggestedPostRefunded {
131287    fn from(t: BoxWrapper<Box<SuggestedPostRefunded>>) -> Self {
131288        t.consume()
131289    }
131290}
131291impl From<BoxWrapper<Unbox<CallbackQuery>>> for CallbackQuery {
131292    fn from(t: BoxWrapper<Unbox<CallbackQuery>>) -> Self {
131293        t.consume()
131294    }
131295}
131296impl From<BoxWrapper<Box<CallbackQuery>>> for CallbackQuery {
131297    fn from(t: BoxWrapper<Box<CallbackQuery>>) -> Self {
131298        t.consume()
131299    }
131300}
131301impl From<BoxWrapper<Unbox<PassportElementErrorFiles>>> for PassportElementErrorFiles {
131302    fn from(t: BoxWrapper<Unbox<PassportElementErrorFiles>>) -> Self {
131303        t.consume()
131304    }
131305}
131306impl From<BoxWrapper<Box<PassportElementErrorFiles>>> for PassportElementErrorFiles {
131307    fn from(t: BoxWrapper<Box<PassportElementErrorFiles>>) -> Self {
131308        t.consume()
131309    }
131310}
131311impl From<BoxWrapper<Unbox<MenuButtonDefault>>> for MenuButtonDefault {
131312    fn from(t: BoxWrapper<Unbox<MenuButtonDefault>>) -> Self {
131313        t.consume()
131314    }
131315}
131316impl From<BoxWrapper<Box<MenuButtonDefault>>> for MenuButtonDefault {
131317    fn from(t: BoxWrapper<Box<MenuButtonDefault>>) -> Self {
131318        t.consume()
131319    }
131320}
131321impl From<BoxWrapper<Unbox<ForumTopicEdited>>> for ForumTopicEdited {
131322    fn from(t: BoxWrapper<Unbox<ForumTopicEdited>>) -> Self {
131323        t.consume()
131324    }
131325}
131326impl From<BoxWrapper<Box<ForumTopicEdited>>> for ForumTopicEdited {
131327    fn from(t: BoxWrapper<Box<ForumTopicEdited>>) -> Self {
131328        t.consume()
131329    }
131330}
131331impl From<BoxWrapper<Unbox<GiveawayCompleted>>> for GiveawayCompleted {
131332    fn from(t: BoxWrapper<Unbox<GiveawayCompleted>>) -> Self {
131333        t.consume()
131334    }
131335}
131336impl From<BoxWrapper<Box<GiveawayCompleted>>> for GiveawayCompleted {
131337    fn from(t: BoxWrapper<Box<GiveawayCompleted>>) -> Self {
131338        t.consume()
131339    }
131340}
131341impl From<BoxWrapper<Unbox<ReplyKeyboardMarkup>>> for ReplyKeyboardMarkup {
131342    fn from(t: BoxWrapper<Unbox<ReplyKeyboardMarkup>>) -> Self {
131343        t.consume()
131344    }
131345}
131346impl From<BoxWrapper<Box<ReplyKeyboardMarkup>>> for ReplyKeyboardMarkup {
131347    fn from(t: BoxWrapper<Box<ReplyKeyboardMarkup>>) -> Self {
131348        t.consume()
131349    }
131350}
131351impl From<BoxWrapper<Unbox<InlineQueryResultCachedAudio>>> for InlineQueryResultCachedAudio {
131352    fn from(t: BoxWrapper<Unbox<InlineQueryResultCachedAudio>>) -> Self {
131353        t.consume()
131354    }
131355}
131356impl From<BoxWrapper<Box<InlineQueryResultCachedAudio>>> for InlineQueryResultCachedAudio {
131357    fn from(t: BoxWrapper<Box<InlineQueryResultCachedAudio>>) -> Self {
131358        t.consume()
131359    }
131360}
131361impl From<BoxWrapper<Unbox<CopyTextButton>>> for CopyTextButton {
131362    fn from(t: BoxWrapper<Unbox<CopyTextButton>>) -> Self {
131363        t.consume()
131364    }
131365}
131366impl From<BoxWrapper<Box<CopyTextButton>>> for CopyTextButton {
131367    fn from(t: BoxWrapper<Box<CopyTextButton>>) -> Self {
131368        t.consume()
131369    }
131370}
131371impl From<BoxWrapper<Unbox<BackgroundTypeWallpaper>>> for BackgroundTypeWallpaper {
131372    fn from(t: BoxWrapper<Unbox<BackgroundTypeWallpaper>>) -> Self {
131373        t.consume()
131374    }
131375}
131376impl From<BoxWrapper<Box<BackgroundTypeWallpaper>>> for BackgroundTypeWallpaper {
131377    fn from(t: BoxWrapper<Box<BackgroundTypeWallpaper>>) -> Self {
131378        t.consume()
131379    }
131380}
131381impl From<BoxWrapper<Unbox<ForumTopic>>> for ForumTopic {
131382    fn from(t: BoxWrapper<Unbox<ForumTopic>>) -> Self {
131383        t.consume()
131384    }
131385}
131386impl From<BoxWrapper<Box<ForumTopic>>> for ForumTopic {
131387    fn from(t: BoxWrapper<Box<ForumTopic>>) -> Self {
131388        t.consume()
131389    }
131390}
131391impl From<BoxWrapper<Unbox<InputContactMessageContent>>> for InputContactMessageContent {
131392    fn from(t: BoxWrapper<Unbox<InputContactMessageContent>>) -> Self {
131393        t.consume()
131394    }
131395}
131396impl From<BoxWrapper<Box<InputContactMessageContent>>> for InputContactMessageContent {
131397    fn from(t: BoxWrapper<Box<InputContactMessageContent>>) -> Self {
131398        t.consume()
131399    }
131400}
131401impl From<BoxWrapper<Unbox<ReplyParameters>>> for ReplyParameters {
131402    fn from(t: BoxWrapper<Unbox<ReplyParameters>>) -> Self {
131403        t.consume()
131404    }
131405}
131406impl From<BoxWrapper<Box<ReplyParameters>>> for ReplyParameters {
131407    fn from(t: BoxWrapper<Box<ReplyParameters>>) -> Self {
131408        t.consume()
131409    }
131410}
131411impl From<BoxWrapper<Unbox<InputMediaDocument>>> for InputMediaDocument {
131412    fn from(t: BoxWrapper<Unbox<InputMediaDocument>>) -> Self {
131413        t.consume()
131414    }
131415}
131416impl From<BoxWrapper<Box<InputMediaDocument>>> for InputMediaDocument {
131417    fn from(t: BoxWrapper<Box<InputMediaDocument>>) -> Self {
131418        t.consume()
131419    }
131420}
131421impl From<BoxWrapper<Unbox<BusinessIntro>>> for BusinessIntro {
131422    fn from(t: BoxWrapper<Unbox<BusinessIntro>>) -> Self {
131423        t.consume()
131424    }
131425}
131426impl From<BoxWrapper<Box<BusinessIntro>>> for BusinessIntro {
131427    fn from(t: BoxWrapper<Box<BusinessIntro>>) -> Self {
131428        t.consume()
131429    }
131430}
131431impl From<BoxWrapper<Unbox<GiveawayCreated>>> for GiveawayCreated {
131432    fn from(t: BoxWrapper<Unbox<GiveawayCreated>>) -> Self {
131433        t.consume()
131434    }
131435}
131436impl From<BoxWrapper<Box<GiveawayCreated>>> for GiveawayCreated {
131437    fn from(t: BoxWrapper<Box<GiveawayCreated>>) -> Self {
131438        t.consume()
131439    }
131440}
131441impl From<BoxWrapper<Unbox<InputProfilePhoto>>> for InputProfilePhoto {
131442    fn from(t: BoxWrapper<Unbox<InputProfilePhoto>>) -> Self {
131443        t.consume()
131444    }
131445}
131446impl From<BoxWrapper<Box<InputProfilePhoto>>> for InputProfilePhoto {
131447    fn from(t: BoxWrapper<Box<InputProfilePhoto>>) -> Self {
131448        t.consume()
131449    }
131450}
131451impl From<BoxWrapper<Unbox<ChatMemberAdministrator>>> for ChatMemberAdministrator {
131452    fn from(t: BoxWrapper<Unbox<ChatMemberAdministrator>>) -> Self {
131453        t.consume()
131454    }
131455}
131456impl From<BoxWrapper<Box<ChatMemberAdministrator>>> for ChatMemberAdministrator {
131457    fn from(t: BoxWrapper<Box<ChatMemberAdministrator>>) -> Self {
131458        t.consume()
131459    }
131460}
131461impl From<BoxWrapper<Unbox<InlineQueryResultGif>>> for InlineQueryResultGif {
131462    fn from(t: BoxWrapper<Unbox<InlineQueryResultGif>>) -> Self {
131463        t.consume()
131464    }
131465}
131466impl From<BoxWrapper<Box<InlineQueryResultGif>>> for InlineQueryResultGif {
131467    fn from(t: BoxWrapper<Box<InlineQueryResultGif>>) -> Self {
131468        t.consume()
131469    }
131470}
131471impl From<BoxWrapper<Unbox<InputProfilePhotoAnimated>>> for InputProfilePhotoAnimated {
131472    fn from(t: BoxWrapper<Unbox<InputProfilePhotoAnimated>>) -> Self {
131473        t.consume()
131474    }
131475}
131476impl From<BoxWrapper<Box<InputProfilePhotoAnimated>>> for InputProfilePhotoAnimated {
131477    fn from(t: BoxWrapper<Box<InputProfilePhotoAnimated>>) -> Self {
131478        t.consume()
131479    }
131480}
131481impl From<BoxWrapper<Unbox<VideoChatParticipantsInvited>>> for VideoChatParticipantsInvited {
131482    fn from(t: BoxWrapper<Unbox<VideoChatParticipantsInvited>>) -> Self {
131483        t.consume()
131484    }
131485}
131486impl From<BoxWrapper<Box<VideoChatParticipantsInvited>>> for VideoChatParticipantsInvited {
131487    fn from(t: BoxWrapper<Box<VideoChatParticipantsInvited>>) -> Self {
131488        t.consume()
131489    }
131490}
131491impl From<BoxWrapper<Unbox<LoginUrl>>> for LoginUrl {
131492    fn from(t: BoxWrapper<Unbox<LoginUrl>>) -> Self {
131493        t.consume()
131494    }
131495}
131496impl From<BoxWrapper<Box<LoginUrl>>> for LoginUrl {
131497    fn from(t: BoxWrapper<Box<LoginUrl>>) -> Self {
131498        t.consume()
131499    }
131500}
131501impl From<BoxWrapper<Unbox<ChosenInlineResult>>> for ChosenInlineResult {
131502    fn from(t: BoxWrapper<Unbox<ChosenInlineResult>>) -> Self {
131503        t.consume()
131504    }
131505}
131506impl From<BoxWrapper<Box<ChosenInlineResult>>> for ChosenInlineResult {
131507    fn from(t: BoxWrapper<Box<ChosenInlineResult>>) -> Self {
131508        t.consume()
131509    }
131510}
131511impl From<BoxWrapper<Unbox<PassportElementErrorUnspecified>>> for PassportElementErrorUnspecified {
131512    fn from(t: BoxWrapper<Unbox<PassportElementErrorUnspecified>>) -> Self {
131513        t.consume()
131514    }
131515}
131516impl From<BoxWrapper<Box<PassportElementErrorUnspecified>>> for PassportElementErrorUnspecified {
131517    fn from(t: BoxWrapper<Box<PassportElementErrorUnspecified>>) -> Self {
131518        t.consume()
131519    }
131520}
131521impl From<BoxWrapper<Unbox<MenuButtonWebApp>>> for MenuButtonWebApp {
131522    fn from(t: BoxWrapper<Unbox<MenuButtonWebApp>>) -> Self {
131523        t.consume()
131524    }
131525}
131526impl From<BoxWrapper<Box<MenuButtonWebApp>>> for MenuButtonWebApp {
131527    fn from(t: BoxWrapper<Box<MenuButtonWebApp>>) -> Self {
131528        t.consume()
131529    }
131530}
131531impl From<BoxWrapper<Unbox<UserChatBoosts>>> for UserChatBoosts {
131532    fn from(t: BoxWrapper<Unbox<UserChatBoosts>>) -> Self {
131533        t.consume()
131534    }
131535}
131536impl From<BoxWrapper<Box<UserChatBoosts>>> for UserChatBoosts {
131537    fn from(t: BoxWrapper<Box<UserChatBoosts>>) -> Self {
131538        t.consume()
131539    }
131540}
131541impl From<BoxWrapper<Unbox<GiftInfo>>> for GiftInfo {
131542    fn from(t: BoxWrapper<Unbox<GiftInfo>>) -> Self {
131543        t.consume()
131544    }
131545}
131546impl From<BoxWrapper<Box<GiftInfo>>> for GiftInfo {
131547    fn from(t: BoxWrapper<Box<GiftInfo>>) -> Self {
131548        t.consume()
131549    }
131550}
131551impl From<BoxWrapper<Unbox<ShippingAddress>>> for ShippingAddress {
131552    fn from(t: BoxWrapper<Unbox<ShippingAddress>>) -> Self {
131553        t.consume()
131554    }
131555}
131556impl From<BoxWrapper<Box<ShippingAddress>>> for ShippingAddress {
131557    fn from(t: BoxWrapper<Box<ShippingAddress>>) -> Self {
131558        t.consume()
131559    }
131560}
131561impl From<BoxWrapper<Unbox<MessageAutoDeleteTimerChanged>>> for MessageAutoDeleteTimerChanged {
131562    fn from(t: BoxWrapper<Unbox<MessageAutoDeleteTimerChanged>>) -> Self {
131563        t.consume()
131564    }
131565}
131566impl From<BoxWrapper<Box<MessageAutoDeleteTimerChanged>>> for MessageAutoDeleteTimerChanged {
131567    fn from(t: BoxWrapper<Box<MessageAutoDeleteTimerChanged>>) -> Self {
131568        t.consume()
131569    }
131570}
131571impl From<BoxWrapper<Unbox<BackgroundFill>>> for BackgroundFill {
131572    fn from(t: BoxWrapper<Unbox<BackgroundFill>>) -> Self {
131573        t.consume()
131574    }
131575}
131576impl From<BoxWrapper<Box<BackgroundFill>>> for BackgroundFill {
131577    fn from(t: BoxWrapper<Box<BackgroundFill>>) -> Self {
131578        t.consume()
131579    }
131580}
131581impl From<BoxWrapper<Unbox<InlineQueryResultsButton>>> for InlineQueryResultsButton {
131582    fn from(t: BoxWrapper<Unbox<InlineQueryResultsButton>>) -> Self {
131583        t.consume()
131584    }
131585}
131586impl From<BoxWrapper<Box<InlineQueryResultsButton>>> for InlineQueryResultsButton {
131587    fn from(t: BoxWrapper<Box<InlineQueryResultsButton>>) -> Self {
131588        t.consume()
131589    }
131590}
131591impl From<BoxWrapper<Unbox<BackgroundFillSolid>>> for BackgroundFillSolid {
131592    fn from(t: BoxWrapper<Unbox<BackgroundFillSolid>>) -> Self {
131593        t.consume()
131594    }
131595}
131596impl From<BoxWrapper<Box<BackgroundFillSolid>>> for BackgroundFillSolid {
131597    fn from(t: BoxWrapper<Box<BackgroundFillSolid>>) -> Self {
131598        t.consume()
131599    }
131600}
131601impl From<BoxWrapper<Unbox<BotCommandScopeAllGroupChats>>> for BotCommandScopeAllGroupChats {
131602    fn from(t: BoxWrapper<Unbox<BotCommandScopeAllGroupChats>>) -> Self {
131603        t.consume()
131604    }
131605}
131606impl From<BoxWrapper<Box<BotCommandScopeAllGroupChats>>> for BotCommandScopeAllGroupChats {
131607    fn from(t: BoxWrapper<Box<BotCommandScopeAllGroupChats>>) -> Self {
131608        t.consume()
131609    }
131610}
131611impl From<BoxWrapper<Unbox<ChatBoostUpdated>>> for ChatBoostUpdated {
131612    fn from(t: BoxWrapper<Unbox<ChatBoostUpdated>>) -> Self {
131613        t.consume()
131614    }
131615}
131616impl From<BoxWrapper<Box<ChatBoostUpdated>>> for ChatBoostUpdated {
131617    fn from(t: BoxWrapper<Box<ChatBoostUpdated>>) -> Self {
131618        t.consume()
131619    }
131620}
131621impl From<BoxWrapper<Unbox<MaskPosition>>> for MaskPosition {
131622    fn from(t: BoxWrapper<Unbox<MaskPosition>>) -> Self {
131623        t.consume()
131624    }
131625}
131626impl From<BoxWrapper<Box<MaskPosition>>> for MaskPosition {
131627    fn from(t: BoxWrapper<Box<MaskPosition>>) -> Self {
131628        t.consume()
131629    }
131630}
131631impl From<BoxWrapper<Unbox<PassportElementErrorFile>>> for PassportElementErrorFile {
131632    fn from(t: BoxWrapper<Unbox<PassportElementErrorFile>>) -> Self {
131633        t.consume()
131634    }
131635}
131636impl From<BoxWrapper<Box<PassportElementErrorFile>>> for PassportElementErrorFile {
131637    fn from(t: BoxWrapper<Box<PassportElementErrorFile>>) -> Self {
131638        t.consume()
131639    }
131640}
131641impl From<BoxWrapper<Unbox<Sticker>>> for Sticker {
131642    fn from(t: BoxWrapper<Unbox<Sticker>>) -> Self {
131643        t.consume()
131644    }
131645}
131646impl From<BoxWrapper<Box<Sticker>>> for Sticker {
131647    fn from(t: BoxWrapper<Box<Sticker>>) -> Self {
131648        t.consume()
131649    }
131650}
131651impl From<BoxWrapper<Unbox<PassportElementErrorSelfie>>> for PassportElementErrorSelfie {
131652    fn from(t: BoxWrapper<Unbox<PassportElementErrorSelfie>>) -> Self {
131653        t.consume()
131654    }
131655}
131656impl From<BoxWrapper<Box<PassportElementErrorSelfie>>> for PassportElementErrorSelfie {
131657    fn from(t: BoxWrapper<Box<PassportElementErrorSelfie>>) -> Self {
131658        t.consume()
131659    }
131660}
131661impl From<BoxWrapper<Unbox<BackgroundTypePattern>>> for BackgroundTypePattern {
131662    fn from(t: BoxWrapper<Unbox<BackgroundTypePattern>>) -> Self {
131663        t.consume()
131664    }
131665}
131666impl From<BoxWrapper<Box<BackgroundTypePattern>>> for BackgroundTypePattern {
131667    fn from(t: BoxWrapper<Box<BackgroundTypePattern>>) -> Self {
131668        t.consume()
131669    }
131670}
131671impl From<BoxWrapper<Unbox<StarAmount>>> for StarAmount {
131672    fn from(t: BoxWrapper<Unbox<StarAmount>>) -> Self {
131673        t.consume()
131674    }
131675}
131676impl From<BoxWrapper<Box<StarAmount>>> for StarAmount {
131677    fn from(t: BoxWrapper<Box<StarAmount>>) -> Self {
131678        t.consume()
131679    }
131680}
131681impl From<BoxWrapper<Unbox<TransactionPartnerFragment>>> for TransactionPartnerFragment {
131682    fn from(t: BoxWrapper<Unbox<TransactionPartnerFragment>>) -> Self {
131683        t.consume()
131684    }
131685}
131686impl From<BoxWrapper<Box<TransactionPartnerFragment>>> for TransactionPartnerFragment {
131687    fn from(t: BoxWrapper<Box<TransactionPartnerFragment>>) -> Self {
131688        t.consume()
131689    }
131690}
131691impl From<BoxWrapper<Unbox<ChatMemberLeft>>> for ChatMemberLeft {
131692    fn from(t: BoxWrapper<Unbox<ChatMemberLeft>>) -> Self {
131693        t.consume()
131694    }
131695}
131696impl From<BoxWrapper<Box<ChatMemberLeft>>> for ChatMemberLeft {
131697    fn from(t: BoxWrapper<Box<ChatMemberLeft>>) -> Self {
131698        t.consume()
131699    }
131700}
131701impl From<BoxWrapper<Unbox<PaidMediaPhoto>>> for PaidMediaPhoto {
131702    fn from(t: BoxWrapper<Unbox<PaidMediaPhoto>>) -> Self {
131703        t.consume()
131704    }
131705}
131706impl From<BoxWrapper<Box<PaidMediaPhoto>>> for PaidMediaPhoto {
131707    fn from(t: BoxWrapper<Box<PaidMediaPhoto>>) -> Self {
131708        t.consume()
131709    }
131710}
131711impl From<BoxWrapper<Unbox<UniqueGift>>> for UniqueGift {
131712    fn from(t: BoxWrapper<Unbox<UniqueGift>>) -> Self {
131713        t.consume()
131714    }
131715}
131716impl From<BoxWrapper<Box<UniqueGift>>> for UniqueGift {
131717    fn from(t: BoxWrapper<Box<UniqueGift>>) -> Self {
131718        t.consume()
131719    }
131720}
131721impl From<BoxWrapper<Unbox<MenuButtonCommands>>> for MenuButtonCommands {
131722    fn from(t: BoxWrapper<Unbox<MenuButtonCommands>>) -> Self {
131723        t.consume()
131724    }
131725}
131726impl From<BoxWrapper<Box<MenuButtonCommands>>> for MenuButtonCommands {
131727    fn from(t: BoxWrapper<Box<MenuButtonCommands>>) -> Self {
131728        t.consume()
131729    }
131730}
131731impl From<BoxWrapper<Unbox<TransactionPartnerOther>>> for TransactionPartnerOther {
131732    fn from(t: BoxWrapper<Unbox<TransactionPartnerOther>>) -> Self {
131733        t.consume()
131734    }
131735}
131736impl From<BoxWrapper<Box<TransactionPartnerOther>>> for TransactionPartnerOther {
131737    fn from(t: BoxWrapper<Box<TransactionPartnerOther>>) -> Self {
131738        t.consume()
131739    }
131740}
131741impl From<BoxWrapper<Unbox<Gifts>>> for Gifts {
131742    fn from(t: BoxWrapper<Unbox<Gifts>>) -> Self {
131743        t.consume()
131744    }
131745}
131746impl From<BoxWrapper<Box<Gifts>>> for Gifts {
131747    fn from(t: BoxWrapper<Box<Gifts>>) -> Self {
131748        t.consume()
131749    }
131750}
131751impl From<BoxWrapper<Unbox<File>>> for File {
131752    fn from(t: BoxWrapper<Unbox<File>>) -> Self {
131753        t.consume()
131754    }
131755}
131756impl From<BoxWrapper<Box<File>>> for File {
131757    fn from(t: BoxWrapper<Box<File>>) -> Self {
131758        t.consume()
131759    }
131760}
131761impl From<BoxWrapper<Unbox<Birthdate>>> for Birthdate {
131762    fn from(t: BoxWrapper<Unbox<Birthdate>>) -> Self {
131763        t.consume()
131764    }
131765}
131766impl From<BoxWrapper<Box<Birthdate>>> for Birthdate {
131767    fn from(t: BoxWrapper<Box<Birthdate>>) -> Self {
131768        t.consume()
131769    }
131770}
131771impl From<BoxWrapper<Unbox<TransactionPartnerTelegramAds>>> for TransactionPartnerTelegramAds {
131772    fn from(t: BoxWrapper<Unbox<TransactionPartnerTelegramAds>>) -> Self {
131773        t.consume()
131774    }
131775}
131776impl From<BoxWrapper<Box<TransactionPartnerTelegramAds>>> for TransactionPartnerTelegramAds {
131777    fn from(t: BoxWrapper<Box<TransactionPartnerTelegramAds>>) -> Self {
131778        t.consume()
131779    }
131780}
131781impl From<BoxWrapper<Unbox<InlineQueryResultContact>>> for InlineQueryResultContact {
131782    fn from(t: BoxWrapper<Unbox<InlineQueryResultContact>>) -> Self {
131783        t.consume()
131784    }
131785}
131786impl From<BoxWrapper<Box<InlineQueryResultContact>>> for InlineQueryResultContact {
131787    fn from(t: BoxWrapper<Box<InlineQueryResultContact>>) -> Self {
131788        t.consume()
131789    }
131790}
131791impl From<BoxWrapper<Unbox<ChatMemberRestricted>>> for ChatMemberRestricted {
131792    fn from(t: BoxWrapper<Unbox<ChatMemberRestricted>>) -> Self {
131793        t.consume()
131794    }
131795}
131796impl From<BoxWrapper<Box<ChatMemberRestricted>>> for ChatMemberRestricted {
131797    fn from(t: BoxWrapper<Box<ChatMemberRestricted>>) -> Self {
131798        t.consume()
131799    }
131800}
131801impl From<BoxWrapper<Unbox<LinkPreviewOptions>>> for LinkPreviewOptions {
131802    fn from(t: BoxWrapper<Unbox<LinkPreviewOptions>>) -> Self {
131803        t.consume()
131804    }
131805}
131806impl From<BoxWrapper<Box<LinkPreviewOptions>>> for LinkPreviewOptions {
131807    fn from(t: BoxWrapper<Box<LinkPreviewOptions>>) -> Self {
131808        t.consume()
131809    }
131810}
131811impl From<BoxWrapper<Unbox<PreparedInlineMessage>>> for PreparedInlineMessage {
131812    fn from(t: BoxWrapper<Unbox<PreparedInlineMessage>>) -> Self {
131813        t.consume()
131814    }
131815}
131816impl From<BoxWrapper<Box<PreparedInlineMessage>>> for PreparedInlineMessage {
131817    fn from(t: BoxWrapper<Box<PreparedInlineMessage>>) -> Self {
131818        t.consume()
131819    }
131820}
131821impl From<BoxWrapper<Unbox<TextQuote>>> for TextQuote {
131822    fn from(t: BoxWrapper<Unbox<TextQuote>>) -> Self {
131823        t.consume()
131824    }
131825}
131826impl From<BoxWrapper<Box<TextQuote>>> for TextQuote {
131827    fn from(t: BoxWrapper<Box<TextQuote>>) -> Self {
131828        t.consume()
131829    }
131830}
131831impl From<BoxWrapper<Unbox<ChecklistTasksDone>>> for ChecklistTasksDone {
131832    fn from(t: BoxWrapper<Unbox<ChecklistTasksDone>>) -> Self {
131833        t.consume()
131834    }
131835}
131836impl From<BoxWrapper<Box<ChecklistTasksDone>>> for ChecklistTasksDone {
131837    fn from(t: BoxWrapper<Box<ChecklistTasksDone>>) -> Self {
131838        t.consume()
131839    }
131840}
131841impl From<BoxWrapper<Unbox<InputStoryContentVideo>>> for InputStoryContentVideo {
131842    fn from(t: BoxWrapper<Unbox<InputStoryContentVideo>>) -> Self {
131843        t.consume()
131844    }
131845}
131846impl From<BoxWrapper<Box<InputStoryContentVideo>>> for InputStoryContentVideo {
131847    fn from(t: BoxWrapper<Box<InputStoryContentVideo>>) -> Self {
131848        t.consume()
131849    }
131850}
131851impl From<BoxWrapper<Unbox<BackgroundTypeChatTheme>>> for BackgroundTypeChatTheme {
131852    fn from(t: BoxWrapper<Unbox<BackgroundTypeChatTheme>>) -> Self {
131853        t.consume()
131854    }
131855}
131856impl From<BoxWrapper<Box<BackgroundTypeChatTheme>>> for BackgroundTypeChatTheme {
131857    fn from(t: BoxWrapper<Box<BackgroundTypeChatTheme>>) -> Self {
131858        t.consume()
131859    }
131860}
131861impl From<BoxWrapper<Unbox<InaccessibleMessage>>> for InaccessibleMessage {
131862    fn from(t: BoxWrapper<Unbox<InaccessibleMessage>>) -> Self {
131863        t.consume()
131864    }
131865}
131866impl From<BoxWrapper<Box<InaccessibleMessage>>> for InaccessibleMessage {
131867    fn from(t: BoxWrapper<Box<InaccessibleMessage>>) -> Self {
131868        t.consume()
131869    }
131870}
131871impl From<BoxWrapper<Unbox<InputChecklist>>> for InputChecklist {
131872    fn from(t: BoxWrapper<Unbox<InputChecklist>>) -> Self {
131873        t.consume()
131874    }
131875}
131876impl From<BoxWrapper<Box<InputChecklist>>> for InputChecklist {
131877    fn from(t: BoxWrapper<Box<InputChecklist>>) -> Self {
131878        t.consume()
131879    }
131880}
131881impl From<BoxWrapper<Unbox<SuggestedPostInfo>>> for SuggestedPostInfo {
131882    fn from(t: BoxWrapper<Unbox<SuggestedPostInfo>>) -> Self {
131883        t.consume()
131884    }
131885}
131886impl From<BoxWrapper<Box<SuggestedPostInfo>>> for SuggestedPostInfo {
131887    fn from(t: BoxWrapper<Box<SuggestedPostInfo>>) -> Self {
131888        t.consume()
131889    }
131890}
131891impl From<BoxWrapper<Unbox<SwitchInlineQueryChosenChat>>> for SwitchInlineQueryChosenChat {
131892    fn from(t: BoxWrapper<Unbox<SwitchInlineQueryChosenChat>>) -> Self {
131893        t.consume()
131894    }
131895}
131896impl From<BoxWrapper<Box<SwitchInlineQueryChosenChat>>> for SwitchInlineQueryChosenChat {
131897    fn from(t: BoxWrapper<Box<SwitchInlineQueryChosenChat>>) -> Self {
131898        t.consume()
131899    }
131900}
131901impl From<BoxWrapper<Unbox<AcceptedGiftTypes>>> for AcceptedGiftTypes {
131902    fn from(t: BoxWrapper<Unbox<AcceptedGiftTypes>>) -> Self {
131903        t.consume()
131904    }
131905}
131906impl From<BoxWrapper<Box<AcceptedGiftTypes>>> for AcceptedGiftTypes {
131907    fn from(t: BoxWrapper<Box<AcceptedGiftTypes>>) -> Self {
131908        t.consume()
131909    }
131910}
131911impl From<BoxWrapper<Unbox<PassportElementErrorTranslationFile>>>
131912    for PassportElementErrorTranslationFile
131913{
131914    fn from(t: BoxWrapper<Unbox<PassportElementErrorTranslationFile>>) -> Self {
131915        t.consume()
131916    }
131917}
131918impl From<BoxWrapper<Box<PassportElementErrorTranslationFile>>>
131919    for PassportElementErrorTranslationFile
131920{
131921    fn from(t: BoxWrapper<Box<PassportElementErrorTranslationFile>>) -> Self {
131922        t.consume()
131923    }
131924}
131925impl From<BoxWrapper<Unbox<BusinessLocation>>> for BusinessLocation {
131926    fn from(t: BoxWrapper<Unbox<BusinessLocation>>) -> Self {
131927        t.consume()
131928    }
131929}
131930impl From<BoxWrapper<Box<BusinessLocation>>> for BusinessLocation {
131931    fn from(t: BoxWrapper<Box<BusinessLocation>>) -> Self {
131932        t.consume()
131933    }
131934}
131935impl From<BoxWrapper<Unbox<AffiliateInfo>>> for AffiliateInfo {
131936    fn from(t: BoxWrapper<Unbox<AffiliateInfo>>) -> Self {
131937        t.consume()
131938    }
131939}
131940impl From<BoxWrapper<Box<AffiliateInfo>>> for AffiliateInfo {
131941    fn from(t: BoxWrapper<Box<AffiliateInfo>>) -> Self {
131942        t.consume()
131943    }
131944}
131945impl From<BoxWrapper<Unbox<MessageOriginChat>>> for MessageOriginChat {
131946    fn from(t: BoxWrapper<Unbox<MessageOriginChat>>) -> Self {
131947        t.consume()
131948    }
131949}
131950impl From<BoxWrapper<Box<MessageOriginChat>>> for MessageOriginChat {
131951    fn from(t: BoxWrapper<Box<MessageOriginChat>>) -> Self {
131952        t.consume()
131953    }
131954}
131955impl From<BoxWrapper<Unbox<BotCommandScopeChat>>> for BotCommandScopeChat {
131956    fn from(t: BoxWrapper<Unbox<BotCommandScopeChat>>) -> Self {
131957        t.consume()
131958    }
131959}
131960impl From<BoxWrapper<Box<BotCommandScopeChat>>> for BotCommandScopeChat {
131961    fn from(t: BoxWrapper<Box<BotCommandScopeChat>>) -> Self {
131962        t.consume()
131963    }
131964}
131965impl From<BoxWrapper<Unbox<PassportElementErrorReverseSide>>> for PassportElementErrorReverseSide {
131966    fn from(t: BoxWrapper<Unbox<PassportElementErrorReverseSide>>) -> Self {
131967        t.consume()
131968    }
131969}
131970impl From<BoxWrapper<Box<PassportElementErrorReverseSide>>> for PassportElementErrorReverseSide {
131971    fn from(t: BoxWrapper<Box<PassportElementErrorReverseSide>>) -> Self {
131972        t.consume()
131973    }
131974}
131975impl From<BoxWrapper<Unbox<InlineQueryResultPhoto>>> for InlineQueryResultPhoto {
131976    fn from(t: BoxWrapper<Unbox<InlineQueryResultPhoto>>) -> Self {
131977        t.consume()
131978    }
131979}
131980impl From<BoxWrapper<Box<InlineQueryResultPhoto>>> for InlineQueryResultPhoto {
131981    fn from(t: BoxWrapper<Box<InlineQueryResultPhoto>>) -> Self {
131982        t.consume()
131983    }
131984}
131985impl From<BoxWrapper<Unbox<StoryAreaTypeLink>>> for StoryAreaTypeLink {
131986    fn from(t: BoxWrapper<Unbox<StoryAreaTypeLink>>) -> Self {
131987        t.consume()
131988    }
131989}
131990impl From<BoxWrapper<Box<StoryAreaTypeLink>>> for StoryAreaTypeLink {
131991    fn from(t: BoxWrapper<Box<StoryAreaTypeLink>>) -> Self {
131992        t.consume()
131993    }
131994}
131995impl From<BoxWrapper<Unbox<InputSticker>>> for InputSticker {
131996    fn from(t: BoxWrapper<Unbox<InputSticker>>) -> Self {
131997        t.consume()
131998    }
131999}
132000impl From<BoxWrapper<Box<InputSticker>>> for InputSticker {
132001    fn from(t: BoxWrapper<Box<InputSticker>>) -> Self {
132002        t.consume()
132003    }
132004}
132005impl From<BoxWrapper<Unbox<InputPaidMediaPhoto>>> for InputPaidMediaPhoto {
132006    fn from(t: BoxWrapper<Unbox<InputPaidMediaPhoto>>) -> Self {
132007        t.consume()
132008    }
132009}
132010impl From<BoxWrapper<Box<InputPaidMediaPhoto>>> for InputPaidMediaPhoto {
132011    fn from(t: BoxWrapper<Box<InputPaidMediaPhoto>>) -> Self {
132012        t.consume()
132013    }
132014}
132015impl From<BoxWrapper<Unbox<InputProfilePhotoStatic>>> for InputProfilePhotoStatic {
132016    fn from(t: BoxWrapper<Unbox<InputProfilePhotoStatic>>) -> Self {
132017        t.consume()
132018    }
132019}
132020impl From<BoxWrapper<Box<InputProfilePhotoStatic>>> for InputProfilePhotoStatic {
132021    fn from(t: BoxWrapper<Box<InputProfilePhotoStatic>>) -> Self {
132022        t.consume()
132023    }
132024}
132025impl From<BoxWrapper<Unbox<TransactionPartnerChat>>> for TransactionPartnerChat {
132026    fn from(t: BoxWrapper<Unbox<TransactionPartnerChat>>) -> Self {
132027        t.consume()
132028    }
132029}
132030impl From<BoxWrapper<Box<TransactionPartnerChat>>> for TransactionPartnerChat {
132031    fn from(t: BoxWrapper<Box<TransactionPartnerChat>>) -> Self {
132032        t.consume()
132033    }
132034}
132035impl From<BoxWrapper<Unbox<BotCommandScopeChatAdministrators>>>
132036    for BotCommandScopeChatAdministrators
132037{
132038    fn from(t: BoxWrapper<Unbox<BotCommandScopeChatAdministrators>>) -> Self {
132039        t.consume()
132040    }
132041}
132042impl From<BoxWrapper<Box<BotCommandScopeChatAdministrators>>>
132043    for BotCommandScopeChatAdministrators
132044{
132045    fn from(t: BoxWrapper<Box<BotCommandScopeChatAdministrators>>) -> Self {
132046        t.consume()
132047    }
132048}
132049impl From<BoxWrapper<Unbox<ForumTopicClosed>>> for ForumTopicClosed {
132050    fn from(t: BoxWrapper<Unbox<ForumTopicClosed>>) -> Self {
132051        t.consume()
132052    }
132053}
132054impl From<BoxWrapper<Box<ForumTopicClosed>>> for ForumTopicClosed {
132055    fn from(t: BoxWrapper<Box<ForumTopicClosed>>) -> Self {
132056        t.consume()
132057    }
132058}
132059impl From<BoxWrapper<Unbox<PaidMediaPurchased>>> for PaidMediaPurchased {
132060    fn from(t: BoxWrapper<Unbox<PaidMediaPurchased>>) -> Self {
132061        t.consume()
132062    }
132063}
132064impl From<BoxWrapper<Box<PaidMediaPurchased>>> for PaidMediaPurchased {
132065    fn from(t: BoxWrapper<Box<PaidMediaPurchased>>) -> Self {
132066        t.consume()
132067    }
132068}
132069impl From<BoxWrapper<Unbox<ChatLocation>>> for ChatLocation {
132070    fn from(t: BoxWrapper<Unbox<ChatLocation>>) -> Self {
132071        t.consume()
132072    }
132073}
132074impl From<BoxWrapper<Box<ChatLocation>>> for ChatLocation {
132075    fn from(t: BoxWrapper<Box<ChatLocation>>) -> Self {
132076        t.consume()
132077    }
132078}
132079impl From<BoxWrapper<Unbox<VideoChatStarted>>> for VideoChatStarted {
132080    fn from(t: BoxWrapper<Unbox<VideoChatStarted>>) -> Self {
132081        t.consume()
132082    }
132083}
132084impl From<BoxWrapper<Box<VideoChatStarted>>> for VideoChatStarted {
132085    fn from(t: BoxWrapper<Box<VideoChatStarted>>) -> Self {
132086        t.consume()
132087    }
132088}
132089impl From<BoxWrapper<Unbox<ChatMemberUpdated>>> for ChatMemberUpdated {
132090    fn from(t: BoxWrapper<Unbox<ChatMemberUpdated>>) -> Self {
132091        t.consume()
132092    }
132093}
132094impl From<BoxWrapper<Box<ChatMemberUpdated>>> for ChatMemberUpdated {
132095    fn from(t: BoxWrapper<Box<ChatMemberUpdated>>) -> Self {
132096        t.consume()
132097    }
132098}
132099impl From<BoxWrapper<Unbox<Venue>>> for Venue {
132100    fn from(t: BoxWrapper<Unbox<Venue>>) -> Self {
132101        t.consume()
132102    }
132103}
132104impl From<BoxWrapper<Box<Venue>>> for Venue {
132105    fn from(t: BoxWrapper<Box<Venue>>) -> Self {
132106        t.consume()
132107    }
132108}
132109impl From<BoxWrapper<Unbox<ChatBoostAdded>>> for ChatBoostAdded {
132110    fn from(t: BoxWrapper<Unbox<ChatBoostAdded>>) -> Self {
132111        t.consume()
132112    }
132113}
132114impl From<BoxWrapper<Box<ChatBoostAdded>>> for ChatBoostAdded {
132115    fn from(t: BoxWrapper<Box<ChatBoostAdded>>) -> Self {
132116        t.consume()
132117    }
132118}
132119impl From<BoxWrapper<Unbox<ReactionTypeCustomEmoji>>> for ReactionTypeCustomEmoji {
132120    fn from(t: BoxWrapper<Unbox<ReactionTypeCustomEmoji>>) -> Self {
132121        t.consume()
132122    }
132123}
132124impl From<BoxWrapper<Box<ReactionTypeCustomEmoji>>> for ReactionTypeCustomEmoji {
132125    fn from(t: BoxWrapper<Box<ReactionTypeCustomEmoji>>) -> Self {
132126        t.consume()
132127    }
132128}
132129impl From<BoxWrapper<Unbox<LocationAddress>>> for LocationAddress {
132130    fn from(t: BoxWrapper<Unbox<LocationAddress>>) -> Self {
132131        t.consume()
132132    }
132133}
132134impl From<BoxWrapper<Box<LocationAddress>>> for LocationAddress {
132135    fn from(t: BoxWrapper<Box<LocationAddress>>) -> Self {
132136        t.consume()
132137    }
132138}
132139impl From<BoxWrapper<Unbox<PassportElementError>>> for PassportElementError {
132140    fn from(t: BoxWrapper<Unbox<PassportElementError>>) -> Self {
132141        t.consume()
132142    }
132143}
132144impl From<BoxWrapper<Box<PassportElementError>>> for PassportElementError {
132145    fn from(t: BoxWrapper<Box<PassportElementError>>) -> Self {
132146        t.consume()
132147    }
132148}
132149impl From<BoxWrapper<Unbox<OwnedGiftRegular>>> for OwnedGiftRegular {
132150    fn from(t: BoxWrapper<Unbox<OwnedGiftRegular>>) -> Self {
132151        t.consume()
132152    }
132153}
132154impl From<BoxWrapper<Box<OwnedGiftRegular>>> for OwnedGiftRegular {
132155    fn from(t: BoxWrapper<Box<OwnedGiftRegular>>) -> Self {
132156        t.consume()
132157    }
132158}
132159impl From<BoxWrapper<Unbox<InlineKeyboardMarkup>>> for InlineKeyboardMarkup {
132160    fn from(t: BoxWrapper<Unbox<InlineKeyboardMarkup>>) -> Self {
132161        t.consume()
132162    }
132163}
132164impl From<BoxWrapper<Box<InlineKeyboardMarkup>>> for InlineKeyboardMarkup {
132165    fn from(t: BoxWrapper<Box<InlineKeyboardMarkup>>) -> Self {
132166        t.consume()
132167    }
132168}
132169impl From<BoxWrapper<Unbox<StoryArea>>> for StoryArea {
132170    fn from(t: BoxWrapper<Unbox<StoryArea>>) -> Self {
132171        t.consume()
132172    }
132173}
132174impl From<BoxWrapper<Box<StoryArea>>> for StoryArea {
132175    fn from(t: BoxWrapper<Box<StoryArea>>) -> Self {
132176        t.consume()
132177    }
132178}
132179impl From<BoxWrapper<Unbox<MaybeInaccessibleMessage>>> for MaybeInaccessibleMessage {
132180    fn from(t: BoxWrapper<Unbox<MaybeInaccessibleMessage>>) -> Self {
132181        t.consume()
132182    }
132183}
132184impl From<BoxWrapper<Box<MaybeInaccessibleMessage>>> for MaybeInaccessibleMessage {
132185    fn from(t: BoxWrapper<Box<MaybeInaccessibleMessage>>) -> Self {
132186        t.consume()
132187    }
132188}
132189impl From<BoxWrapper<Unbox<StoryAreaTypeUniqueGift>>> for StoryAreaTypeUniqueGift {
132190    fn from(t: BoxWrapper<Unbox<StoryAreaTypeUniqueGift>>) -> Self {
132191        t.consume()
132192    }
132193}
132194impl From<BoxWrapper<Box<StoryAreaTypeUniqueGift>>> for StoryAreaTypeUniqueGift {
132195    fn from(t: BoxWrapper<Box<StoryAreaTypeUniqueGift>>) -> Self {
132196        t.consume()
132197    }
132198}
132199impl From<BoxWrapper<Unbox<PassportData>>> for PassportData {
132200    fn from(t: BoxWrapper<Unbox<PassportData>>) -> Self {
132201        t.consume()
132202    }
132203}
132204impl From<BoxWrapper<Box<PassportData>>> for PassportData {
132205    fn from(t: BoxWrapper<Box<PassportData>>) -> Self {
132206        t.consume()
132207    }
132208}
132209#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
132210#[serde(untagged)]
132211pub enum MessageBool {
132212    Message(Message),
132213    Bool(bool),
132214}
132215impl Default for MessageBool {
132216    fn default() -> Self {
132217        MessageBool::Message(Message::default())
132218    }
132219}
132220impl fmt::Display for MessageBool {
132221    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
132222        let v = match self {
132223            MessageBool::Message(thing) => {
132224                serde_json::to_string(thing).unwrap_or_else(|err| format!("invalid: {err}"))
132225            }
132226            MessageBool::Bool(thing) => {
132227                serde_json::to_string(thing).unwrap_or_else(|err| format!("invalid: {err}"))
132228            }
132229        };
132230        write!(f, "{}", v)?;
132231        Ok(())
132232    }
132233}
132234#[cfg(test)]
132235mod test {
132236    use super::*;
132237    use std::default::Default;
132238    #[test]
132239    fn rmp_serialize_named_order_info() {
132240        let t = OrderInfo::default();
132241        let ser = rmp_serde::to_vec_named(&t).unwrap();
132242        let _: OrderInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
132243    }
132244    #[test]
132245    fn rmp_serialize_array_order_info() {
132246        let t = OrderInfo::default();
132247        let t = t.noskip();
132248        let ser = rmp_serde::to_vec(&t).unwrap();
132249        let _: OrderInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
132250    }
132251    #[test]
132252    fn json_serialize_order_info() {
132253        let t = OrderInfo::default();
132254        let ser = serde_json::to_string(&t).unwrap();
132255        println!("{}", ser);
132256        let _: OrderInfo = serde_json::from_str(&ser).unwrap();
132257    }
132258    #[test]
132259    fn rmp_serialize_named_suggested_post_price() {
132260        let t = SuggestedPostPrice::default();
132261        let ser = rmp_serde::to_vec_named(&t).unwrap();
132262        let _: SuggestedPostPrice = rmp_serde::from_slice(ser.as_slice()).unwrap();
132263    }
132264    #[test]
132265    fn rmp_serialize_array_suggested_post_price() {
132266        let t = SuggestedPostPrice::default();
132267        let t = t.noskip();
132268        let ser = rmp_serde::to_vec(&t).unwrap();
132269        let _: SuggestedPostPrice = rmp_serde::from_slice(ser.as_slice()).unwrap();
132270    }
132271    #[test]
132272    fn json_serialize_suggested_post_price() {
132273        let t = SuggestedPostPrice::default();
132274        let ser = serde_json::to_string(&t).unwrap();
132275        println!("{}", ser);
132276        let _: SuggestedPostPrice = serde_json::from_str(&ser).unwrap();
132277    }
132278    #[test]
132279    fn rmp_serialize_named_chat() {
132280        let t = Chat::default();
132281        let ser = rmp_serde::to_vec_named(&t).unwrap();
132282        let _: Chat = rmp_serde::from_slice(ser.as_slice()).unwrap();
132283    }
132284    #[test]
132285    fn rmp_serialize_array_chat() {
132286        let t = Chat::default();
132287        let t = t.noskip();
132288        let ser = rmp_serde::to_vec(&t).unwrap();
132289        let _: Chat = rmp_serde::from_slice(ser.as_slice()).unwrap();
132290    }
132291    #[test]
132292    fn json_serialize_chat() {
132293        let t = Chat::default();
132294        let ser = serde_json::to_string(&t).unwrap();
132295        println!("{}", ser);
132296        let _: Chat = serde_json::from_str(&ser).unwrap();
132297    }
132298    #[test]
132299    fn rmp_serialize_named_update() {
132300        let t = Update::default();
132301        let ser = rmp_serde::to_vec_named(&t).unwrap();
132302        let _: Update = rmp_serde::from_slice(ser.as_slice()).unwrap();
132303    }
132304    #[test]
132305    fn rmp_serialize_array_update() {
132306        let t = Update::default();
132307        let t = t.noskip();
132308        let ser = rmp_serde::to_vec(&t).unwrap();
132309        let _: Update = rmp_serde::from_slice(ser.as_slice()).unwrap();
132310    }
132311    #[test]
132312    fn json_serialize_update() {
132313        let t = Update::default();
132314        let ser = serde_json::to_string(&t).unwrap();
132315        println!("{}", ser);
132316        let _: Update = serde_json::from_str(&ser).unwrap();
132317    }
132318    #[test]
132319    fn rmp_serialize_named_photo_size() {
132320        let t = PhotoSize::default();
132321        let ser = rmp_serde::to_vec_named(&t).unwrap();
132322        let _: PhotoSize = rmp_serde::from_slice(ser.as_slice()).unwrap();
132323    }
132324    #[test]
132325    fn rmp_serialize_array_photo_size() {
132326        let t = PhotoSize::default();
132327        let t = t.noskip();
132328        let ser = rmp_serde::to_vec(&t).unwrap();
132329        let _: PhotoSize = rmp_serde::from_slice(ser.as_slice()).unwrap();
132330    }
132331    #[test]
132332    fn json_serialize_photo_size() {
132333        let t = PhotoSize::default();
132334        let ser = serde_json::to_string(&t).unwrap();
132335        println!("{}", ser);
132336        let _: PhotoSize = serde_json::from_str(&ser).unwrap();
132337    }
132338    #[test]
132339    fn rmp_serialize_named_chat_boost_source_gift_code() {
132340        let t = ChatBoostSourceGiftCode::default();
132341        let ser = rmp_serde::to_vec_named(&t).unwrap();
132342        let _: ChatBoostSourceGiftCode = rmp_serde::from_slice(ser.as_slice()).unwrap();
132343    }
132344    #[test]
132345    fn rmp_serialize_array_chat_boost_source_gift_code() {
132346        let t = ChatBoostSourceGiftCode::default();
132347        let t = t.noskip();
132348        let ser = rmp_serde::to_vec(&t).unwrap();
132349        let _: ChatBoostSourceGiftCode = rmp_serde::from_slice(ser.as_slice()).unwrap();
132350    }
132351    #[test]
132352    fn json_serialize_chat_boost_source_gift_code() {
132353        let t = ChatBoostSourceGiftCode::default();
132354        let ser = serde_json::to_string(&t).unwrap();
132355        println!("{}", ser);
132356        let _: ChatBoostSourceGiftCode = serde_json::from_str(&ser).unwrap();
132357    }
132358    #[test]
132359    fn rmp_serialize_named_poll_option() {
132360        let t = PollOption::default();
132361        let ser = rmp_serde::to_vec_named(&t).unwrap();
132362        let _: PollOption = rmp_serde::from_slice(ser.as_slice()).unwrap();
132363    }
132364    #[test]
132365    fn rmp_serialize_array_poll_option() {
132366        let t = PollOption::default();
132367        let t = t.noskip();
132368        let ser = rmp_serde::to_vec(&t).unwrap();
132369        let _: PollOption = rmp_serde::from_slice(ser.as_slice()).unwrap();
132370    }
132371    #[test]
132372    fn json_serialize_poll_option() {
132373        let t = PollOption::default();
132374        let ser = serde_json::to_string(&t).unwrap();
132375        println!("{}", ser);
132376        let _: PollOption = serde_json::from_str(&ser).unwrap();
132377    }
132378    #[test]
132379    fn rmp_serialize_named_inline_query() {
132380        let t = InlineQuery::default();
132381        let ser = rmp_serde::to_vec_named(&t).unwrap();
132382        let _: InlineQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
132383    }
132384    #[test]
132385    fn rmp_serialize_array_inline_query() {
132386        let t = InlineQuery::default();
132387        let t = t.noskip();
132388        let ser = rmp_serde::to_vec(&t).unwrap();
132389        let _: InlineQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
132390    }
132391    #[test]
132392    fn json_serialize_inline_query() {
132393        let t = InlineQuery::default();
132394        let ser = serde_json::to_string(&t).unwrap();
132395        println!("{}", ser);
132396        let _: InlineQuery = serde_json::from_str(&ser).unwrap();
132397    }
132398    #[test]
132399    fn rmp_serialize_named_transaction_partner_user() {
132400        let t = TransactionPartnerUser::default();
132401        let ser = rmp_serde::to_vec_named(&t).unwrap();
132402        let _: TransactionPartnerUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
132403    }
132404    #[test]
132405    fn rmp_serialize_array_transaction_partner_user() {
132406        let t = TransactionPartnerUser::default();
132407        let t = t.noskip();
132408        let ser = rmp_serde::to_vec(&t).unwrap();
132409        let _: TransactionPartnerUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
132410    }
132411    #[test]
132412    fn json_serialize_transaction_partner_user() {
132413        let t = TransactionPartnerUser::default();
132414        let ser = serde_json::to_string(&t).unwrap();
132415        println!("{}", ser);
132416        let _: TransactionPartnerUser = serde_json::from_str(&ser).unwrap();
132417    }
132418    #[test]
132419    fn rmp_serialize_named_input_media_photo() {
132420        let t = InputMediaPhoto::default();
132421        let ser = rmp_serde::to_vec_named(&t).unwrap();
132422        let _: InputMediaPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
132423    }
132424    #[test]
132425    fn rmp_serialize_array_input_media_photo() {
132426        let t = InputMediaPhoto::default();
132427        let t = t.noskip();
132428        let ser = rmp_serde::to_vec(&t).unwrap();
132429        let _: InputMediaPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
132430    }
132431    #[test]
132432    fn json_serialize_input_media_photo() {
132433        let t = InputMediaPhoto::default();
132434        let ser = serde_json::to_string(&t).unwrap();
132435        println!("{}", ser);
132436        let _: InputMediaPhoto = serde_json::from_str(&ser).unwrap();
132437    }
132438    #[test]
132439    fn rmp_serialize_named_video_chat_scheduled() {
132440        let t = VideoChatScheduled::default();
132441        let ser = rmp_serde::to_vec_named(&t).unwrap();
132442        let _: VideoChatScheduled = rmp_serde::from_slice(ser.as_slice()).unwrap();
132443    }
132444    #[test]
132445    fn rmp_serialize_array_video_chat_scheduled() {
132446        let t = VideoChatScheduled::default();
132447        let t = t.noskip();
132448        let ser = rmp_serde::to_vec(&t).unwrap();
132449        let _: VideoChatScheduled = rmp_serde::from_slice(ser.as_slice()).unwrap();
132450    }
132451    #[test]
132452    fn json_serialize_video_chat_scheduled() {
132453        let t = VideoChatScheduled::default();
132454        let ser = serde_json::to_string(&t).unwrap();
132455        println!("{}", ser);
132456        let _: VideoChatScheduled = serde_json::from_str(&ser).unwrap();
132457    }
132458    #[test]
132459    fn rmp_serialize_named_forum_topic_created() {
132460        let t = ForumTopicCreated::default();
132461        let ser = rmp_serde::to_vec_named(&t).unwrap();
132462        let _: ForumTopicCreated = rmp_serde::from_slice(ser.as_slice()).unwrap();
132463    }
132464    #[test]
132465    fn rmp_serialize_array_forum_topic_created() {
132466        let t = ForumTopicCreated::default();
132467        let t = t.noskip();
132468        let ser = rmp_serde::to_vec(&t).unwrap();
132469        let _: ForumTopicCreated = rmp_serde::from_slice(ser.as_slice()).unwrap();
132470    }
132471    #[test]
132472    fn json_serialize_forum_topic_created() {
132473        let t = ForumTopicCreated::default();
132474        let ser = serde_json::to_string(&t).unwrap();
132475        println!("{}", ser);
132476        let _: ForumTopicCreated = serde_json::from_str(&ser).unwrap();
132477    }
132478    #[test]
132479    fn rmp_serialize_named_inline_keyboard_button() {
132480        let t = InlineKeyboardButton::default();
132481        let ser = rmp_serde::to_vec_named(&t).unwrap();
132482        let _: InlineKeyboardButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
132483    }
132484    #[test]
132485    fn rmp_serialize_array_inline_keyboard_button() {
132486        let t = InlineKeyboardButton::default();
132487        let t = t.noskip();
132488        let ser = rmp_serde::to_vec(&t).unwrap();
132489        let _: InlineKeyboardButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
132490    }
132491    #[test]
132492    fn json_serialize_inline_keyboard_button() {
132493        let t = InlineKeyboardButton::default();
132494        let ser = serde_json::to_string(&t).unwrap();
132495        println!("{}", ser);
132496        let _: InlineKeyboardButton = serde_json::from_str(&ser).unwrap();
132497    }
132498    #[test]
132499    fn rmp_serialize_named_paid_media_video() {
132500        let t = PaidMediaVideo::default();
132501        let ser = rmp_serde::to_vec_named(&t).unwrap();
132502        let _: PaidMediaVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
132503    }
132504    #[test]
132505    fn rmp_serialize_array_paid_media_video() {
132506        let t = PaidMediaVideo::default();
132507        let t = t.noskip();
132508        let ser = rmp_serde::to_vec(&t).unwrap();
132509        let _: PaidMediaVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
132510    }
132511    #[test]
132512    fn json_serialize_paid_media_video() {
132513        let t = PaidMediaVideo::default();
132514        let ser = serde_json::to_string(&t).unwrap();
132515        println!("{}", ser);
132516        let _: PaidMediaVideo = serde_json::from_str(&ser).unwrap();
132517    }
132518    #[test]
132519    fn rmp_serialize_named_chat_join_request() {
132520        let t = ChatJoinRequest::default();
132521        let ser = rmp_serde::to_vec_named(&t).unwrap();
132522        let _: ChatJoinRequest = rmp_serde::from_slice(ser.as_slice()).unwrap();
132523    }
132524    #[test]
132525    fn rmp_serialize_array_chat_join_request() {
132526        let t = ChatJoinRequest::default();
132527        let t = t.noskip();
132528        let ser = rmp_serde::to_vec(&t).unwrap();
132529        let _: ChatJoinRequest = rmp_serde::from_slice(ser.as_slice()).unwrap();
132530    }
132531    #[test]
132532    fn json_serialize_chat_join_request() {
132533        let t = ChatJoinRequest::default();
132534        let ser = serde_json::to_string(&t).unwrap();
132535        println!("{}", ser);
132536        let _: ChatJoinRequest = serde_json::from_str(&ser).unwrap();
132537    }
132538    #[test]
132539    fn rmp_serialize_named_story_area_position() {
132540        let t = StoryAreaPosition::default();
132541        let ser = rmp_serde::to_vec_named(&t).unwrap();
132542        let _: StoryAreaPosition = rmp_serde::from_slice(ser.as_slice()).unwrap();
132543    }
132544    #[test]
132545    fn rmp_serialize_array_story_area_position() {
132546        let t = StoryAreaPosition::default();
132547        let t = t.noskip();
132548        let ser = rmp_serde::to_vec(&t).unwrap();
132549        let _: StoryAreaPosition = rmp_serde::from_slice(ser.as_slice()).unwrap();
132550    }
132551    #[test]
132552    fn json_serialize_story_area_position() {
132553        let t = StoryAreaPosition::default();
132554        let ser = serde_json::to_string(&t).unwrap();
132555        println!("{}", ser);
132556        let _: StoryAreaPosition = serde_json::from_str(&ser).unwrap();
132557    }
132558    #[test]
132559    fn rmp_serialize_named_bot_command() {
132560        let t = BotCommand::default();
132561        let ser = rmp_serde::to_vec_named(&t).unwrap();
132562        let _: BotCommand = rmp_serde::from_slice(ser.as_slice()).unwrap();
132563    }
132564    #[test]
132565    fn rmp_serialize_array_bot_command() {
132566        let t = BotCommand::default();
132567        let t = t.noskip();
132568        let ser = rmp_serde::to_vec(&t).unwrap();
132569        let _: BotCommand = rmp_serde::from_slice(ser.as_slice()).unwrap();
132570    }
132571    #[test]
132572    fn json_serialize_bot_command() {
132573        let t = BotCommand::default();
132574        let ser = serde_json::to_string(&t).unwrap();
132575        println!("{}", ser);
132576        let _: BotCommand = serde_json::from_str(&ser).unwrap();
132577    }
132578    #[test]
132579    fn rmp_serialize_named_suggested_post_paid() {
132580        let t = SuggestedPostPaid::default();
132581        let ser = rmp_serde::to_vec_named(&t).unwrap();
132582        let _: SuggestedPostPaid = rmp_serde::from_slice(ser.as_slice()).unwrap();
132583    }
132584    #[test]
132585    fn rmp_serialize_array_suggested_post_paid() {
132586        let t = SuggestedPostPaid::default();
132587        let t = t.noskip();
132588        let ser = rmp_serde::to_vec(&t).unwrap();
132589        let _: SuggestedPostPaid = rmp_serde::from_slice(ser.as_slice()).unwrap();
132590    }
132591    #[test]
132592    fn json_serialize_suggested_post_paid() {
132593        let t = SuggestedPostPaid::default();
132594        let ser = serde_json::to_string(&t).unwrap();
132595        println!("{}", ser);
132596        let _: SuggestedPostPaid = serde_json::from_str(&ser).unwrap();
132597    }
132598    #[test]
132599    fn rmp_serialize_named_contact() {
132600        let t = Contact::default();
132601        let ser = rmp_serde::to_vec_named(&t).unwrap();
132602        let _: Contact = rmp_serde::from_slice(ser.as_slice()).unwrap();
132603    }
132604    #[test]
132605    fn rmp_serialize_array_contact() {
132606        let t = Contact::default();
132607        let t = t.noskip();
132608        let ser = rmp_serde::to_vec(&t).unwrap();
132609        let _: Contact = rmp_serde::from_slice(ser.as_slice()).unwrap();
132610    }
132611    #[test]
132612    fn json_serialize_contact() {
132613        let t = Contact::default();
132614        let ser = serde_json::to_string(&t).unwrap();
132615        println!("{}", ser);
132616        let _: Contact = serde_json::from_str(&ser).unwrap();
132617    }
132618    #[test]
132619    fn rmp_serialize_named_chat_boost_source_giveaway() {
132620        let t = ChatBoostSourceGiveaway::default();
132621        let ser = rmp_serde::to_vec_named(&t).unwrap();
132622        let _: ChatBoostSourceGiveaway = rmp_serde::from_slice(ser.as_slice()).unwrap();
132623    }
132624    #[test]
132625    fn rmp_serialize_array_chat_boost_source_giveaway() {
132626        let t = ChatBoostSourceGiveaway::default();
132627        let t = t.noskip();
132628        let ser = rmp_serde::to_vec(&t).unwrap();
132629        let _: ChatBoostSourceGiveaway = rmp_serde::from_slice(ser.as_slice()).unwrap();
132630    }
132631    #[test]
132632    fn json_serialize_chat_boost_source_giveaway() {
132633        let t = ChatBoostSourceGiveaway::default();
132634        let ser = serde_json::to_string(&t).unwrap();
132635        println!("{}", ser);
132636        let _: ChatBoostSourceGiveaway = serde_json::from_str(&ser).unwrap();
132637    }
132638    #[test]
132639    fn rmp_serialize_named_bot_name() {
132640        let t = BotName::default();
132641        let ser = rmp_serde::to_vec_named(&t).unwrap();
132642        let _: BotName = rmp_serde::from_slice(ser.as_slice()).unwrap();
132643    }
132644    #[test]
132645    fn rmp_serialize_array_bot_name() {
132646        let t = BotName::default();
132647        let t = t.noskip();
132648        let ser = rmp_serde::to_vec(&t).unwrap();
132649        let _: BotName = rmp_serde::from_slice(ser.as_slice()).unwrap();
132650    }
132651    #[test]
132652    fn json_serialize_bot_name() {
132653        let t = BotName::default();
132654        let ser = serde_json::to_string(&t).unwrap();
132655        println!("{}", ser);
132656        let _: BotName = serde_json::from_str(&ser).unwrap();
132657    }
132658    #[test]
132659    fn rmp_serialize_named_suggested_post_declined() {
132660        let t = SuggestedPostDeclined::default();
132661        let ser = rmp_serde::to_vec_named(&t).unwrap();
132662        let _: SuggestedPostDeclined = rmp_serde::from_slice(ser.as_slice()).unwrap();
132663    }
132664    #[test]
132665    fn rmp_serialize_array_suggested_post_declined() {
132666        let t = SuggestedPostDeclined::default();
132667        let t = t.noskip();
132668        let ser = rmp_serde::to_vec(&t).unwrap();
132669        let _: SuggestedPostDeclined = rmp_serde::from_slice(ser.as_slice()).unwrap();
132670    }
132671    #[test]
132672    fn json_serialize_suggested_post_declined() {
132673        let t = SuggestedPostDeclined::default();
132674        let ser = serde_json::to_string(&t).unwrap();
132675        println!("{}", ser);
132676        let _: SuggestedPostDeclined = serde_json::from_str(&ser).unwrap();
132677    }
132678    #[test]
132679    fn rmp_serialize_named_business_opening_hours_interval() {
132680        let t = BusinessOpeningHoursInterval::default();
132681        let ser = rmp_serde::to_vec_named(&t).unwrap();
132682        let _: BusinessOpeningHoursInterval = rmp_serde::from_slice(ser.as_slice()).unwrap();
132683    }
132684    #[test]
132685    fn rmp_serialize_array_business_opening_hours_interval() {
132686        let t = BusinessOpeningHoursInterval::default();
132687        let t = t.noskip();
132688        let ser = rmp_serde::to_vec(&t).unwrap();
132689        let _: BusinessOpeningHoursInterval = rmp_serde::from_slice(ser.as_slice()).unwrap();
132690    }
132691    #[test]
132692    fn json_serialize_business_opening_hours_interval() {
132693        let t = BusinessOpeningHoursInterval::default();
132694        let ser = serde_json::to_string(&t).unwrap();
132695        println!("{}", ser);
132696        let _: BusinessOpeningHoursInterval = serde_json::from_str(&ser).unwrap();
132697    }
132698    #[test]
132699    fn rmp_serialize_named_dice() {
132700        let t = Dice::default();
132701        let ser = rmp_serde::to_vec_named(&t).unwrap();
132702        let _: Dice = rmp_serde::from_slice(ser.as_slice()).unwrap();
132703    }
132704    #[test]
132705    fn rmp_serialize_array_dice() {
132706        let t = Dice::default();
132707        let t = t.noskip();
132708        let ser = rmp_serde::to_vec(&t).unwrap();
132709        let _: Dice = rmp_serde::from_slice(ser.as_slice()).unwrap();
132710    }
132711    #[test]
132712    fn json_serialize_dice() {
132713        let t = Dice::default();
132714        let ser = serde_json::to_string(&t).unwrap();
132715        println!("{}", ser);
132716        let _: Dice = serde_json::from_str(&ser).unwrap();
132717    }
132718    #[test]
132719    fn rmp_serialize_named_inline_query_result_article() {
132720        let t = InlineQueryResultArticle::default();
132721        let ser = rmp_serde::to_vec_named(&t).unwrap();
132722        let _: InlineQueryResultArticle = rmp_serde::from_slice(ser.as_slice()).unwrap();
132723    }
132724    #[test]
132725    fn rmp_serialize_array_inline_query_result_article() {
132726        let t = InlineQueryResultArticle::default();
132727        let t = t.noskip();
132728        let ser = rmp_serde::to_vec(&t).unwrap();
132729        let _: InlineQueryResultArticle = rmp_serde::from_slice(ser.as_slice()).unwrap();
132730    }
132731    #[test]
132732    fn json_serialize_inline_query_result_article() {
132733        let t = InlineQueryResultArticle::default();
132734        let ser = serde_json::to_string(&t).unwrap();
132735        println!("{}", ser);
132736        let _: InlineQueryResultArticle = serde_json::from_str(&ser).unwrap();
132737    }
132738    #[test]
132739    fn rmp_serialize_named_input_location_message_content() {
132740        let t = InputLocationMessageContent::default();
132741        let ser = rmp_serde::to_vec_named(&t).unwrap();
132742        let _: InputLocationMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
132743    }
132744    #[test]
132745    fn rmp_serialize_array_input_location_message_content() {
132746        let t = InputLocationMessageContent::default();
132747        let t = t.noskip();
132748        let ser = rmp_serde::to_vec(&t).unwrap();
132749        let _: InputLocationMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
132750    }
132751    #[test]
132752    fn json_serialize_input_location_message_content() {
132753        let t = InputLocationMessageContent::default();
132754        let ser = serde_json::to_string(&t).unwrap();
132755        println!("{}", ser);
132756        let _: InputLocationMessageContent = serde_json::from_str(&ser).unwrap();
132757    }
132758    #[test]
132759    fn rmp_serialize_named_inline_query_result_cached_sticker() {
132760        let t = InlineQueryResultCachedSticker::default();
132761        let ser = rmp_serde::to_vec_named(&t).unwrap();
132762        let _: InlineQueryResultCachedSticker = rmp_serde::from_slice(ser.as_slice()).unwrap();
132763    }
132764    #[test]
132765    fn rmp_serialize_array_inline_query_result_cached_sticker() {
132766        let t = InlineQueryResultCachedSticker::default();
132767        let t = t.noskip();
132768        let ser = rmp_serde::to_vec(&t).unwrap();
132769        let _: InlineQueryResultCachedSticker = rmp_serde::from_slice(ser.as_slice()).unwrap();
132770    }
132771    #[test]
132772    fn json_serialize_inline_query_result_cached_sticker() {
132773        let t = InlineQueryResultCachedSticker::default();
132774        let ser = serde_json::to_string(&t).unwrap();
132775        println!("{}", ser);
132776        let _: InlineQueryResultCachedSticker = serde_json::from_str(&ser).unwrap();
132777    }
132778    #[test]
132779    fn rmp_serialize_named_input_paid_media_video() {
132780        let t = InputPaidMediaVideo::default();
132781        let ser = rmp_serde::to_vec_named(&t).unwrap();
132782        let _: InputPaidMediaVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
132783    }
132784    #[test]
132785    fn rmp_serialize_array_input_paid_media_video() {
132786        let t = InputPaidMediaVideo::default();
132787        let t = t.noskip();
132788        let ser = rmp_serde::to_vec(&t).unwrap();
132789        let _: InputPaidMediaVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
132790    }
132791    #[test]
132792    fn json_serialize_input_paid_media_video() {
132793        let t = InputPaidMediaVideo::default();
132794        let ser = serde_json::to_string(&t).unwrap();
132795        println!("{}", ser);
132796        let _: InputPaidMediaVideo = serde_json::from_str(&ser).unwrap();
132797    }
132798    #[test]
132799    fn rmp_serialize_named_gift() {
132800        let t = Gift::default();
132801        let ser = rmp_serde::to_vec_named(&t).unwrap();
132802        let _: Gift = rmp_serde::from_slice(ser.as_slice()).unwrap();
132803    }
132804    #[test]
132805    fn rmp_serialize_array_gift() {
132806        let t = Gift::default();
132807        let t = t.noskip();
132808        let ser = rmp_serde::to_vec(&t).unwrap();
132809        let _: Gift = rmp_serde::from_slice(ser.as_slice()).unwrap();
132810    }
132811    #[test]
132812    fn json_serialize_gift() {
132813        let t = Gift::default();
132814        let ser = serde_json::to_string(&t).unwrap();
132815        println!("{}", ser);
132816        let _: Gift = serde_json::from_str(&ser).unwrap();
132817    }
132818    #[test]
132819    fn rmp_serialize_named_message_origin_user() {
132820        let t = MessageOriginUser::default();
132821        let ser = rmp_serde::to_vec_named(&t).unwrap();
132822        let _: MessageOriginUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
132823    }
132824    #[test]
132825    fn rmp_serialize_array_message_origin_user() {
132826        let t = MessageOriginUser::default();
132827        let t = t.noskip();
132828        let ser = rmp_serde::to_vec(&t).unwrap();
132829        let _: MessageOriginUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
132830    }
132831    #[test]
132832    fn json_serialize_message_origin_user() {
132833        let t = MessageOriginUser::default();
132834        let ser = serde_json::to_string(&t).unwrap();
132835        println!("{}", ser);
132836        let _: MessageOriginUser = serde_json::from_str(&ser).unwrap();
132837    }
132838    #[test]
132839    fn rmp_serialize_named_keyboard_button() {
132840        let t = KeyboardButton::default();
132841        let ser = rmp_serde::to_vec_named(&t).unwrap();
132842        let _: KeyboardButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
132843    }
132844    #[test]
132845    fn rmp_serialize_array_keyboard_button() {
132846        let t = KeyboardButton::default();
132847        let t = t.noskip();
132848        let ser = rmp_serde::to_vec(&t).unwrap();
132849        let _: KeyboardButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
132850    }
132851    #[test]
132852    fn json_serialize_keyboard_button() {
132853        let t = KeyboardButton::default();
132854        let ser = serde_json::to_string(&t).unwrap();
132855        println!("{}", ser);
132856        let _: KeyboardButton = serde_json::from_str(&ser).unwrap();
132857    }
132858    #[test]
132859    fn rmp_serialize_named_inline_query_result_cached_mpeg_4_gif() {
132860        let t = InlineQueryResultCachedMpeg4Gif::default();
132861        let ser = rmp_serde::to_vec_named(&t).unwrap();
132862        let _: InlineQueryResultCachedMpeg4Gif = rmp_serde::from_slice(ser.as_slice()).unwrap();
132863    }
132864    #[test]
132865    fn rmp_serialize_array_inline_query_result_cached_mpeg_4_gif() {
132866        let t = InlineQueryResultCachedMpeg4Gif::default();
132867        let t = t.noskip();
132868        let ser = rmp_serde::to_vec(&t).unwrap();
132869        let _: InlineQueryResultCachedMpeg4Gif = rmp_serde::from_slice(ser.as_slice()).unwrap();
132870    }
132871    #[test]
132872    fn json_serialize_inline_query_result_cached_mpeg_4_gif() {
132873        let t = InlineQueryResultCachedMpeg4Gif::default();
132874        let ser = serde_json::to_string(&t).unwrap();
132875        println!("{}", ser);
132876        let _: InlineQueryResultCachedMpeg4Gif = serde_json::from_str(&ser).unwrap();
132877    }
132878    #[test]
132879    fn rmp_serialize_named_input_invoice_message_content() {
132880        let t = InputInvoiceMessageContent::default();
132881        let ser = rmp_serde::to_vec_named(&t).unwrap();
132882        let _: InputInvoiceMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
132883    }
132884    #[test]
132885    fn rmp_serialize_array_input_invoice_message_content() {
132886        let t = InputInvoiceMessageContent::default();
132887        let t = t.noskip();
132888        let ser = rmp_serde::to_vec(&t).unwrap();
132889        let _: InputInvoiceMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
132890    }
132891    #[test]
132892    fn json_serialize_input_invoice_message_content() {
132893        let t = InputInvoiceMessageContent::default();
132894        let ser = serde_json::to_string(&t).unwrap();
132895        println!("{}", ser);
132896        let _: InputInvoiceMessageContent = serde_json::from_str(&ser).unwrap();
132897    }
132898    #[test]
132899    fn rmp_serialize_named_business_bot_rights() {
132900        let t = BusinessBotRights::default();
132901        let ser = rmp_serde::to_vec_named(&t).unwrap();
132902        let _: BusinessBotRights = rmp_serde::from_slice(ser.as_slice()).unwrap();
132903    }
132904    #[test]
132905    fn rmp_serialize_array_business_bot_rights() {
132906        let t = BusinessBotRights::default();
132907        let t = t.noskip();
132908        let ser = rmp_serde::to_vec(&t).unwrap();
132909        let _: BusinessBotRights = rmp_serde::from_slice(ser.as_slice()).unwrap();
132910    }
132911    #[test]
132912    fn json_serialize_business_bot_rights() {
132913        let t = BusinessBotRights::default();
132914        let ser = serde_json::to_string(&t).unwrap();
132915        println!("{}", ser);
132916        let _: BusinessBotRights = serde_json::from_str(&ser).unwrap();
132917    }
132918    #[test]
132919    fn rmp_serialize_named_input_story_content_photo() {
132920        let t = InputStoryContentPhoto::default();
132921        let ser = rmp_serde::to_vec_named(&t).unwrap();
132922        let _: InputStoryContentPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
132923    }
132924    #[test]
132925    fn rmp_serialize_array_input_story_content_photo() {
132926        let t = InputStoryContentPhoto::default();
132927        let t = t.noskip();
132928        let ser = rmp_serde::to_vec(&t).unwrap();
132929        let _: InputStoryContentPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
132930    }
132931    #[test]
132932    fn json_serialize_input_story_content_photo() {
132933        let t = InputStoryContentPhoto::default();
132934        let ser = serde_json::to_string(&t).unwrap();
132935        println!("{}", ser);
132936        let _: InputStoryContentPhoto = serde_json::from_str(&ser).unwrap();
132937    }
132938    #[test]
132939    fn rmp_serialize_named_input_venue_message_content() {
132940        let t = InputVenueMessageContent::default();
132941        let ser = rmp_serde::to_vec_named(&t).unwrap();
132942        let _: InputVenueMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
132943    }
132944    #[test]
132945    fn rmp_serialize_array_input_venue_message_content() {
132946        let t = InputVenueMessageContent::default();
132947        let t = t.noskip();
132948        let ser = rmp_serde::to_vec(&t).unwrap();
132949        let _: InputVenueMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
132950    }
132951    #[test]
132952    fn json_serialize_input_venue_message_content() {
132953        let t = InputVenueMessageContent::default();
132954        let ser = serde_json::to_string(&t).unwrap();
132955        println!("{}", ser);
132956        let _: InputVenueMessageContent = serde_json::from_str(&ser).unwrap();
132957    }
132958    #[test]
132959    fn rmp_serialize_named_unique_gift_symbol() {
132960        let t = UniqueGiftSymbol::default();
132961        let ser = rmp_serde::to_vec_named(&t).unwrap();
132962        let _: UniqueGiftSymbol = rmp_serde::from_slice(ser.as_slice()).unwrap();
132963    }
132964    #[test]
132965    fn rmp_serialize_array_unique_gift_symbol() {
132966        let t = UniqueGiftSymbol::default();
132967        let t = t.noskip();
132968        let ser = rmp_serde::to_vec(&t).unwrap();
132969        let _: UniqueGiftSymbol = rmp_serde::from_slice(ser.as_slice()).unwrap();
132970    }
132971    #[test]
132972    fn json_serialize_unique_gift_symbol() {
132973        let t = UniqueGiftSymbol::default();
132974        let ser = serde_json::to_string(&t).unwrap();
132975        println!("{}", ser);
132976        let _: UniqueGiftSymbol = serde_json::from_str(&ser).unwrap();
132977    }
132978    #[test]
132979    fn rmp_serialize_named_input_checklist_task() {
132980        let t = InputChecklistTask::default();
132981        let ser = rmp_serde::to_vec_named(&t).unwrap();
132982        let _: InputChecklistTask = rmp_serde::from_slice(ser.as_slice()).unwrap();
132983    }
132984    #[test]
132985    fn rmp_serialize_array_input_checklist_task() {
132986        let t = InputChecklistTask::default();
132987        let t = t.noskip();
132988        let ser = rmp_serde::to_vec(&t).unwrap();
132989        let _: InputChecklistTask = rmp_serde::from_slice(ser.as_slice()).unwrap();
132990    }
132991    #[test]
132992    fn json_serialize_input_checklist_task() {
132993        let t = InputChecklistTask::default();
132994        let ser = serde_json::to_string(&t).unwrap();
132995        println!("{}", ser);
132996        let _: InputChecklistTask = serde_json::from_str(&ser).unwrap();
132997    }
132998    #[test]
132999    fn rmp_serialize_named_paid_message_price_changed() {
133000        let t = PaidMessagePriceChanged::default();
133001        let ser = rmp_serde::to_vec_named(&t).unwrap();
133002        let _: PaidMessagePriceChanged = rmp_serde::from_slice(ser.as_slice()).unwrap();
133003    }
133004    #[test]
133005    fn rmp_serialize_array_paid_message_price_changed() {
133006        let t = PaidMessagePriceChanged::default();
133007        let t = t.noskip();
133008        let ser = rmp_serde::to_vec(&t).unwrap();
133009        let _: PaidMessagePriceChanged = rmp_serde::from_slice(ser.as_slice()).unwrap();
133010    }
133011    #[test]
133012    fn json_serialize_paid_message_price_changed() {
133013        let t = PaidMessagePriceChanged::default();
133014        let ser = serde_json::to_string(&t).unwrap();
133015        println!("{}", ser);
133016        let _: PaidMessagePriceChanged = serde_json::from_str(&ser).unwrap();
133017    }
133018    #[test]
133019    fn rmp_serialize_named_message_reaction_count_updated() {
133020        let t = MessageReactionCountUpdated::default();
133021        let ser = rmp_serde::to_vec_named(&t).unwrap();
133022        let _: MessageReactionCountUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
133023    }
133024    #[test]
133025    fn rmp_serialize_array_message_reaction_count_updated() {
133026        let t = MessageReactionCountUpdated::default();
133027        let t = t.noskip();
133028        let ser = rmp_serde::to_vec(&t).unwrap();
133029        let _: MessageReactionCountUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
133030    }
133031    #[test]
133032    fn json_serialize_message_reaction_count_updated() {
133033        let t = MessageReactionCountUpdated::default();
133034        let ser = serde_json::to_string(&t).unwrap();
133035        println!("{}", ser);
133036        let _: MessageReactionCountUpdated = serde_json::from_str(&ser).unwrap();
133037    }
133038    #[test]
133039    fn rmp_serialize_named_location() {
133040        let t = Location::default();
133041        let ser = rmp_serde::to_vec_named(&t).unwrap();
133042        let _: Location = rmp_serde::from_slice(ser.as_slice()).unwrap();
133043    }
133044    #[test]
133045    fn rmp_serialize_array_location() {
133046        let t = Location::default();
133047        let t = t.noskip();
133048        let ser = rmp_serde::to_vec(&t).unwrap();
133049        let _: Location = rmp_serde::from_slice(ser.as_slice()).unwrap();
133050    }
133051    #[test]
133052    fn json_serialize_location() {
133053        let t = Location::default();
133054        let ser = serde_json::to_string(&t).unwrap();
133055        println!("{}", ser);
133056        let _: Location = serde_json::from_str(&ser).unwrap();
133057    }
133058    #[test]
133059    fn rmp_serialize_named_game_high_score() {
133060        let t = GameHighScore::default();
133061        let ser = rmp_serde::to_vec_named(&t).unwrap();
133062        let _: GameHighScore = rmp_serde::from_slice(ser.as_slice()).unwrap();
133063    }
133064    #[test]
133065    fn rmp_serialize_array_game_high_score() {
133066        let t = GameHighScore::default();
133067        let t = t.noskip();
133068        let ser = rmp_serde::to_vec(&t).unwrap();
133069        let _: GameHighScore = rmp_serde::from_slice(ser.as_slice()).unwrap();
133070    }
133071    #[test]
133072    fn json_serialize_game_high_score() {
133073        let t = GameHighScore::default();
133074        let ser = serde_json::to_string(&t).unwrap();
133075        println!("{}", ser);
133076        let _: GameHighScore = serde_json::from_str(&ser).unwrap();
133077    }
133078    #[test]
133079    fn rmp_serialize_named_message_reaction_updated() {
133080        let t = MessageReactionUpdated::default();
133081        let ser = rmp_serde::to_vec_named(&t).unwrap();
133082        let _: MessageReactionUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
133083    }
133084    #[test]
133085    fn rmp_serialize_array_message_reaction_updated() {
133086        let t = MessageReactionUpdated::default();
133087        let t = t.noskip();
133088        let ser = rmp_serde::to_vec(&t).unwrap();
133089        let _: MessageReactionUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
133090    }
133091    #[test]
133092    fn json_serialize_message_reaction_updated() {
133093        let t = MessageReactionUpdated::default();
133094        let ser = serde_json::to_string(&t).unwrap();
133095        println!("{}", ser);
133096        let _: MessageReactionUpdated = serde_json::from_str(&ser).unwrap();
133097    }
133098    #[test]
133099    fn rmp_serialize_named_successful_payment() {
133100        let t = SuccessfulPayment::default();
133101        let ser = rmp_serde::to_vec_named(&t).unwrap();
133102        let _: SuccessfulPayment = rmp_serde::from_slice(ser.as_slice()).unwrap();
133103    }
133104    #[test]
133105    fn rmp_serialize_array_successful_payment() {
133106        let t = SuccessfulPayment::default();
133107        let t = t.noskip();
133108        let ser = rmp_serde::to_vec(&t).unwrap();
133109        let _: SuccessfulPayment = rmp_serde::from_slice(ser.as_slice()).unwrap();
133110    }
133111    #[test]
133112    fn json_serialize_successful_payment() {
133113        let t = SuccessfulPayment::default();
133114        let ser = serde_json::to_string(&t).unwrap();
133115        println!("{}", ser);
133116        let _: SuccessfulPayment = serde_json::from_str(&ser).unwrap();
133117    }
133118    #[test]
133119    fn rmp_serialize_named_inline_query_result_document() {
133120        let t = InlineQueryResultDocument::default();
133121        let ser = rmp_serde::to_vec_named(&t).unwrap();
133122        let _: InlineQueryResultDocument = rmp_serde::from_slice(ser.as_slice()).unwrap();
133123    }
133124    #[test]
133125    fn rmp_serialize_array_inline_query_result_document() {
133126        let t = InlineQueryResultDocument::default();
133127        let t = t.noskip();
133128        let ser = rmp_serde::to_vec(&t).unwrap();
133129        let _: InlineQueryResultDocument = rmp_serde::from_slice(ser.as_slice()).unwrap();
133130    }
133131    #[test]
133132    fn json_serialize_inline_query_result_document() {
133133        let t = InlineQueryResultDocument::default();
133134        let ser = serde_json::to_string(&t).unwrap();
133135        println!("{}", ser);
133136        let _: InlineQueryResultDocument = serde_json::from_str(&ser).unwrap();
133137    }
133138    #[test]
133139    fn rmp_serialize_named_suggested_post_approved() {
133140        let t = SuggestedPostApproved::default();
133141        let ser = rmp_serde::to_vec_named(&t).unwrap();
133142        let _: SuggestedPostApproved = rmp_serde::from_slice(ser.as_slice()).unwrap();
133143    }
133144    #[test]
133145    fn rmp_serialize_array_suggested_post_approved() {
133146        let t = SuggestedPostApproved::default();
133147        let t = t.noskip();
133148        let ser = rmp_serde::to_vec(&t).unwrap();
133149        let _: SuggestedPostApproved = rmp_serde::from_slice(ser.as_slice()).unwrap();
133150    }
133151    #[test]
133152    fn json_serialize_suggested_post_approved() {
133153        let t = SuggestedPostApproved::default();
133154        let ser = serde_json::to_string(&t).unwrap();
133155        println!("{}", ser);
133156        let _: SuggestedPostApproved = serde_json::from_str(&ser).unwrap();
133157    }
133158    #[test]
133159    fn rmp_serialize_named_user() {
133160        let t = User::default();
133161        let ser = rmp_serde::to_vec_named(&t).unwrap();
133162        let _: User = rmp_serde::from_slice(ser.as_slice()).unwrap();
133163    }
133164    #[test]
133165    fn rmp_serialize_array_user() {
133166        let t = User::default();
133167        let t = t.noskip();
133168        let ser = rmp_serde::to_vec(&t).unwrap();
133169        let _: User = rmp_serde::from_slice(ser.as_slice()).unwrap();
133170    }
133171    #[test]
133172    fn json_serialize_user() {
133173        let t = User::default();
133174        let ser = serde_json::to_string(&t).unwrap();
133175        println!("{}", ser);
133176        let _: User = serde_json::from_str(&ser).unwrap();
133177    }
133178    #[test]
133179    fn rmp_serialize_named_revenue_withdrawal_state_pending() {
133180        let t = RevenueWithdrawalStatePending::default();
133181        let ser = rmp_serde::to_vec_named(&t).unwrap();
133182        let _: RevenueWithdrawalStatePending = rmp_serde::from_slice(ser.as_slice()).unwrap();
133183    }
133184    #[test]
133185    fn rmp_serialize_array_revenue_withdrawal_state_pending() {
133186        let t = RevenueWithdrawalStatePending::default();
133187        let t = t.noskip();
133188        let ser = rmp_serde::to_vec(&t).unwrap();
133189        let _: RevenueWithdrawalStatePending = rmp_serde::from_slice(ser.as_slice()).unwrap();
133190    }
133191    #[test]
133192    fn json_serialize_revenue_withdrawal_state_pending() {
133193        let t = RevenueWithdrawalStatePending::default();
133194        let ser = serde_json::to_string(&t).unwrap();
133195        println!("{}", ser);
133196        let _: RevenueWithdrawalStatePending = serde_json::from_str(&ser).unwrap();
133197    }
133198    #[test]
133199    fn rmp_serialize_named_bot_description() {
133200        let t = BotDescription::default();
133201        let ser = rmp_serde::to_vec_named(&t).unwrap();
133202        let _: BotDescription = rmp_serde::from_slice(ser.as_slice()).unwrap();
133203    }
133204    #[test]
133205    fn rmp_serialize_array_bot_description() {
133206        let t = BotDescription::default();
133207        let t = t.noskip();
133208        let ser = rmp_serde::to_vec(&t).unwrap();
133209        let _: BotDescription = rmp_serde::from_slice(ser.as_slice()).unwrap();
133210    }
133211    #[test]
133212    fn json_serialize_bot_description() {
133213        let t = BotDescription::default();
133214        let ser = serde_json::to_string(&t).unwrap();
133215        println!("{}", ser);
133216        let _: BotDescription = serde_json::from_str(&ser).unwrap();
133217    }
133218    #[test]
133219    fn rmp_serialize_named_transaction_partner_affiliate_program() {
133220        let t = TransactionPartnerAffiliateProgram::default();
133221        let ser = rmp_serde::to_vec_named(&t).unwrap();
133222        let _: TransactionPartnerAffiliateProgram = rmp_serde::from_slice(ser.as_slice()).unwrap();
133223    }
133224    #[test]
133225    fn rmp_serialize_array_transaction_partner_affiliate_program() {
133226        let t = TransactionPartnerAffiliateProgram::default();
133227        let t = t.noskip();
133228        let ser = rmp_serde::to_vec(&t).unwrap();
133229        let _: TransactionPartnerAffiliateProgram = rmp_serde::from_slice(ser.as_slice()).unwrap();
133230    }
133231    #[test]
133232    fn json_serialize_transaction_partner_affiliate_program() {
133233        let t = TransactionPartnerAffiliateProgram::default();
133234        let ser = serde_json::to_string(&t).unwrap();
133235        println!("{}", ser);
133236        let _: TransactionPartnerAffiliateProgram = serde_json::from_str(&ser).unwrap();
133237    }
133238    #[test]
133239    fn rmp_serialize_named_inline_query_result_cached_video() {
133240        let t = InlineQueryResultCachedVideo::default();
133241        let ser = rmp_serde::to_vec_named(&t).unwrap();
133242        let _: InlineQueryResultCachedVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
133243    }
133244    #[test]
133245    fn rmp_serialize_array_inline_query_result_cached_video() {
133246        let t = InlineQueryResultCachedVideo::default();
133247        let t = t.noskip();
133248        let ser = rmp_serde::to_vec(&t).unwrap();
133249        let _: InlineQueryResultCachedVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
133250    }
133251    #[test]
133252    fn json_serialize_inline_query_result_cached_video() {
133253        let t = InlineQueryResultCachedVideo::default();
133254        let ser = serde_json::to_string(&t).unwrap();
133255        println!("{}", ser);
133256        let _: InlineQueryResultCachedVideo = serde_json::from_str(&ser).unwrap();
133257    }
133258    #[test]
133259    fn rmp_serialize_named_business_connection() {
133260        let t = BusinessConnection::default();
133261        let ser = rmp_serde::to_vec_named(&t).unwrap();
133262        let _: BusinessConnection = rmp_serde::from_slice(ser.as_slice()).unwrap();
133263    }
133264    #[test]
133265    fn rmp_serialize_array_business_connection() {
133266        let t = BusinessConnection::default();
133267        let t = t.noskip();
133268        let ser = rmp_serde::to_vec(&t).unwrap();
133269        let _: BusinessConnection = rmp_serde::from_slice(ser.as_slice()).unwrap();
133270    }
133271    #[test]
133272    fn json_serialize_business_connection() {
133273        let t = BusinessConnection::default();
133274        let ser = serde_json::to_string(&t).unwrap();
133275        println!("{}", ser);
133276        let _: BusinessConnection = serde_json::from_str(&ser).unwrap();
133277    }
133278    #[test]
133279    fn rmp_serialize_named_user_profile_photos() {
133280        let t = UserProfilePhotos::default();
133281        let ser = rmp_serde::to_vec_named(&t).unwrap();
133282        let _: UserProfilePhotos = rmp_serde::from_slice(ser.as_slice()).unwrap();
133283    }
133284    #[test]
133285    fn rmp_serialize_array_user_profile_photos() {
133286        let t = UserProfilePhotos::default();
133287        let t = t.noskip();
133288        let ser = rmp_serde::to_vec(&t).unwrap();
133289        let _: UserProfilePhotos = rmp_serde::from_slice(ser.as_slice()).unwrap();
133290    }
133291    #[test]
133292    fn json_serialize_user_profile_photos() {
133293        let t = UserProfilePhotos::default();
133294        let ser = serde_json::to_string(&t).unwrap();
133295        println!("{}", ser);
133296        let _: UserProfilePhotos = serde_json::from_str(&ser).unwrap();
133297    }
133298    #[test]
133299    fn rmp_serialize_named_reaction_type_paid() {
133300        let t = ReactionTypePaid::default();
133301        let ser = rmp_serde::to_vec_named(&t).unwrap();
133302        let _: ReactionTypePaid = rmp_serde::from_slice(ser.as_slice()).unwrap();
133303    }
133304    #[test]
133305    fn rmp_serialize_array_reaction_type_paid() {
133306        let t = ReactionTypePaid::default();
133307        let t = t.noskip();
133308        let ser = rmp_serde::to_vec(&t).unwrap();
133309        let _: ReactionTypePaid = rmp_serde::from_slice(ser.as_slice()).unwrap();
133310    }
133311    #[test]
133312    fn json_serialize_reaction_type_paid() {
133313        let t = ReactionTypePaid::default();
133314        let ser = serde_json::to_string(&t).unwrap();
133315        println!("{}", ser);
133316        let _: ReactionTypePaid = serde_json::from_str(&ser).unwrap();
133317    }
133318    #[test]
133319    fn rmp_serialize_named_chat_member_banned() {
133320        let t = ChatMemberBanned::default();
133321        let ser = rmp_serde::to_vec_named(&t).unwrap();
133322        let _: ChatMemberBanned = rmp_serde::from_slice(ser.as_slice()).unwrap();
133323    }
133324    #[test]
133325    fn rmp_serialize_array_chat_member_banned() {
133326        let t = ChatMemberBanned::default();
133327        let t = t.noskip();
133328        let ser = rmp_serde::to_vec(&t).unwrap();
133329        let _: ChatMemberBanned = rmp_serde::from_slice(ser.as_slice()).unwrap();
133330    }
133331    #[test]
133332    fn json_serialize_chat_member_banned() {
133333        let t = ChatMemberBanned::default();
133334        let ser = serde_json::to_string(&t).unwrap();
133335        println!("{}", ser);
133336        let _: ChatMemberBanned = serde_json::from_str(&ser).unwrap();
133337    }
133338    #[test]
133339    fn rmp_serialize_named_users_shared() {
133340        let t = UsersShared::default();
133341        let ser = rmp_serde::to_vec_named(&t).unwrap();
133342        let _: UsersShared = rmp_serde::from_slice(ser.as_slice()).unwrap();
133343    }
133344    #[test]
133345    fn rmp_serialize_array_users_shared() {
133346        let t = UsersShared::default();
133347        let t = t.noskip();
133348        let ser = rmp_serde::to_vec(&t).unwrap();
133349        let _: UsersShared = rmp_serde::from_slice(ser.as_slice()).unwrap();
133350    }
133351    #[test]
133352    fn json_serialize_users_shared() {
133353        let t = UsersShared::default();
133354        let ser = serde_json::to_string(&t).unwrap();
133355        println!("{}", ser);
133356        let _: UsersShared = serde_json::from_str(&ser).unwrap();
133357    }
133358    #[test]
133359    fn rmp_serialize_named_inline_query_result_mpeg_4_gif() {
133360        let t = InlineQueryResultMpeg4Gif::default();
133361        let ser = rmp_serde::to_vec_named(&t).unwrap();
133362        let _: InlineQueryResultMpeg4Gif = rmp_serde::from_slice(ser.as_slice()).unwrap();
133363    }
133364    #[test]
133365    fn rmp_serialize_array_inline_query_result_mpeg_4_gif() {
133366        let t = InlineQueryResultMpeg4Gif::default();
133367        let t = t.noskip();
133368        let ser = rmp_serde::to_vec(&t).unwrap();
133369        let _: InlineQueryResultMpeg4Gif = rmp_serde::from_slice(ser.as_slice()).unwrap();
133370    }
133371    #[test]
133372    fn json_serialize_inline_query_result_mpeg_4_gif() {
133373        let t = InlineQueryResultMpeg4Gif::default();
133374        let ser = serde_json::to_string(&t).unwrap();
133375        println!("{}", ser);
133376        let _: InlineQueryResultMpeg4Gif = serde_json::from_str(&ser).unwrap();
133377    }
133378    #[test]
133379    fn rmp_serialize_named_checklist_task() {
133380        let t = ChecklistTask::default();
133381        let ser = rmp_serde::to_vec_named(&t).unwrap();
133382        let _: ChecklistTask = rmp_serde::from_slice(ser.as_slice()).unwrap();
133383    }
133384    #[test]
133385    fn rmp_serialize_array_checklist_task() {
133386        let t = ChecklistTask::default();
133387        let t = t.noskip();
133388        let ser = rmp_serde::to_vec(&t).unwrap();
133389        let _: ChecklistTask = rmp_serde::from_slice(ser.as_slice()).unwrap();
133390    }
133391    #[test]
133392    fn json_serialize_checklist_task() {
133393        let t = ChecklistTask::default();
133394        let ser = serde_json::to_string(&t).unwrap();
133395        println!("{}", ser);
133396        let _: ChecklistTask = serde_json::from_str(&ser).unwrap();
133397    }
133398    #[test]
133399    fn rmp_serialize_named_checklist() {
133400        let t = Checklist::default();
133401        let ser = rmp_serde::to_vec_named(&t).unwrap();
133402        let _: Checklist = rmp_serde::from_slice(ser.as_slice()).unwrap();
133403    }
133404    #[test]
133405    fn rmp_serialize_array_checklist() {
133406        let t = Checklist::default();
133407        let t = t.noskip();
133408        let ser = rmp_serde::to_vec(&t).unwrap();
133409        let _: Checklist = rmp_serde::from_slice(ser.as_slice()).unwrap();
133410    }
133411    #[test]
133412    fn json_serialize_checklist() {
133413        let t = Checklist::default();
133414        let ser = serde_json::to_string(&t).unwrap();
133415        println!("{}", ser);
133416        let _: Checklist = serde_json::from_str(&ser).unwrap();
133417    }
133418    #[test]
133419    fn rmp_serialize_named_background_fill_freeform_gradient() {
133420        let t = BackgroundFillFreeformGradient::default();
133421        let ser = rmp_serde::to_vec_named(&t).unwrap();
133422        let _: BackgroundFillFreeformGradient = rmp_serde::from_slice(ser.as_slice()).unwrap();
133423    }
133424    #[test]
133425    fn rmp_serialize_array_background_fill_freeform_gradient() {
133426        let t = BackgroundFillFreeformGradient::default();
133427        let t = t.noskip();
133428        let ser = rmp_serde::to_vec(&t).unwrap();
133429        let _: BackgroundFillFreeformGradient = rmp_serde::from_slice(ser.as_slice()).unwrap();
133430    }
133431    #[test]
133432    fn json_serialize_background_fill_freeform_gradient() {
133433        let t = BackgroundFillFreeformGradient::default();
133434        let ser = serde_json::to_string(&t).unwrap();
133435        println!("{}", ser);
133436        let _: BackgroundFillFreeformGradient = serde_json::from_str(&ser).unwrap();
133437    }
133438    #[test]
133439    fn rmp_serialize_named_owned_gift_unique() {
133440        let t = OwnedGiftUnique::default();
133441        let ser = rmp_serde::to_vec_named(&t).unwrap();
133442        let _: OwnedGiftUnique = rmp_serde::from_slice(ser.as_slice()).unwrap();
133443    }
133444    #[test]
133445    fn rmp_serialize_array_owned_gift_unique() {
133446        let t = OwnedGiftUnique::default();
133447        let t = t.noskip();
133448        let ser = rmp_serde::to_vec(&t).unwrap();
133449        let _: OwnedGiftUnique = rmp_serde::from_slice(ser.as_slice()).unwrap();
133450    }
133451    #[test]
133452    fn json_serialize_owned_gift_unique() {
133453        let t = OwnedGiftUnique::default();
133454        let ser = serde_json::to_string(&t).unwrap();
133455        println!("{}", ser);
133456        let _: OwnedGiftUnique = serde_json::from_str(&ser).unwrap();
133457    }
133458    #[test]
133459    fn rmp_serialize_named_paid_media_preview() {
133460        let t = PaidMediaPreview::default();
133461        let ser = rmp_serde::to_vec_named(&t).unwrap();
133462        let _: PaidMediaPreview = rmp_serde::from_slice(ser.as_slice()).unwrap();
133463    }
133464    #[test]
133465    fn rmp_serialize_array_paid_media_preview() {
133466        let t = PaidMediaPreview::default();
133467        let t = t.noskip();
133468        let ser = rmp_serde::to_vec(&t).unwrap();
133469        let _: PaidMediaPreview = rmp_serde::from_slice(ser.as_slice()).unwrap();
133470    }
133471    #[test]
133472    fn json_serialize_paid_media_preview() {
133473        let t = PaidMediaPreview::default();
133474        let ser = serde_json::to_string(&t).unwrap();
133475        println!("{}", ser);
133476        let _: PaidMediaPreview = serde_json::from_str(&ser).unwrap();
133477    }
133478    #[test]
133479    fn rmp_serialize_named_input_text_message_content() {
133480        let t = InputTextMessageContent::default();
133481        let ser = rmp_serde::to_vec_named(&t).unwrap();
133482        let _: InputTextMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
133483    }
133484    #[test]
133485    fn rmp_serialize_array_input_text_message_content() {
133486        let t = InputTextMessageContent::default();
133487        let t = t.noskip();
133488        let ser = rmp_serde::to_vec(&t).unwrap();
133489        let _: InputTextMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
133490    }
133491    #[test]
133492    fn json_serialize_input_text_message_content() {
133493        let t = InputTextMessageContent::default();
133494        let ser = serde_json::to_string(&t).unwrap();
133495        println!("{}", ser);
133496        let _: InputTextMessageContent = serde_json::from_str(&ser).unwrap();
133497    }
133498    #[test]
133499    fn rmp_serialize_named_bot_command_scope_all_private_chats() {
133500        let t = BotCommandScopeAllPrivateChats::default();
133501        let ser = rmp_serde::to_vec_named(&t).unwrap();
133502        let _: BotCommandScopeAllPrivateChats = rmp_serde::from_slice(ser.as_slice()).unwrap();
133503    }
133504    #[test]
133505    fn rmp_serialize_array_bot_command_scope_all_private_chats() {
133506        let t = BotCommandScopeAllPrivateChats::default();
133507        let t = t.noskip();
133508        let ser = rmp_serde::to_vec(&t).unwrap();
133509        let _: BotCommandScopeAllPrivateChats = rmp_serde::from_slice(ser.as_slice()).unwrap();
133510    }
133511    #[test]
133512    fn json_serialize_bot_command_scope_all_private_chats() {
133513        let t = BotCommandScopeAllPrivateChats::default();
133514        let ser = serde_json::to_string(&t).unwrap();
133515        println!("{}", ser);
133516        let _: BotCommandScopeAllPrivateChats = serde_json::from_str(&ser).unwrap();
133517    }
133518    #[test]
133519    fn rmp_serialize_named_voice() {
133520        let t = Voice::default();
133521        let ser = rmp_serde::to_vec_named(&t).unwrap();
133522        let _: Voice = rmp_serde::from_slice(ser.as_slice()).unwrap();
133523    }
133524    #[test]
133525    fn rmp_serialize_array_voice() {
133526        let t = Voice::default();
133527        let t = t.noskip();
133528        let ser = rmp_serde::to_vec(&t).unwrap();
133529        let _: Voice = rmp_serde::from_slice(ser.as_slice()).unwrap();
133530    }
133531    #[test]
133532    fn json_serialize_voice() {
133533        let t = Voice::default();
133534        let ser = serde_json::to_string(&t).unwrap();
133535        println!("{}", ser);
133536        let _: Voice = serde_json::from_str(&ser).unwrap();
133537    }
133538    #[test]
133539    fn rmp_serialize_named_keyboard_button_request_users() {
133540        let t = KeyboardButtonRequestUsers::default();
133541        let ser = rmp_serde::to_vec_named(&t).unwrap();
133542        let _: KeyboardButtonRequestUsers = rmp_serde::from_slice(ser.as_slice()).unwrap();
133543    }
133544    #[test]
133545    fn rmp_serialize_array_keyboard_button_request_users() {
133546        let t = KeyboardButtonRequestUsers::default();
133547        let t = t.noskip();
133548        let ser = rmp_serde::to_vec(&t).unwrap();
133549        let _: KeyboardButtonRequestUsers = rmp_serde::from_slice(ser.as_slice()).unwrap();
133550    }
133551    #[test]
133552    fn json_serialize_keyboard_button_request_users() {
133553        let t = KeyboardButtonRequestUsers::default();
133554        let ser = serde_json::to_string(&t).unwrap();
133555        println!("{}", ser);
133556        let _: KeyboardButtonRequestUsers = serde_json::from_str(&ser).unwrap();
133557    }
133558    #[test]
133559    fn rmp_serialize_named_inline_query_result_location() {
133560        let t = InlineQueryResultLocation::default();
133561        let ser = rmp_serde::to_vec_named(&t).unwrap();
133562        let _: InlineQueryResultLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
133563    }
133564    #[test]
133565    fn rmp_serialize_array_inline_query_result_location() {
133566        let t = InlineQueryResultLocation::default();
133567        let t = t.noskip();
133568        let ser = rmp_serde::to_vec(&t).unwrap();
133569        let _: InlineQueryResultLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
133570    }
133571    #[test]
133572    fn json_serialize_inline_query_result_location() {
133573        let t = InlineQueryResultLocation::default();
133574        let ser = serde_json::to_string(&t).unwrap();
133575        println!("{}", ser);
133576        let _: InlineQueryResultLocation = serde_json::from_str(&ser).unwrap();
133577    }
133578    #[test]
133579    fn rmp_serialize_named_keyboard_button_poll_type() {
133580        let t = KeyboardButtonPollType::default();
133581        let ser = rmp_serde::to_vec_named(&t).unwrap();
133582        let _: KeyboardButtonPollType = rmp_serde::from_slice(ser.as_slice()).unwrap();
133583    }
133584    #[test]
133585    fn rmp_serialize_array_keyboard_button_poll_type() {
133586        let t = KeyboardButtonPollType::default();
133587        let t = t.noskip();
133588        let ser = rmp_serde::to_vec(&t).unwrap();
133589        let _: KeyboardButtonPollType = rmp_serde::from_slice(ser.as_slice()).unwrap();
133590    }
133591    #[test]
133592    fn json_serialize_keyboard_button_poll_type() {
133593        let t = KeyboardButtonPollType::default();
133594        let ser = serde_json::to_string(&t).unwrap();
133595        println!("{}", ser);
133596        let _: KeyboardButtonPollType = serde_json::from_str(&ser).unwrap();
133597    }
133598    #[test]
133599    fn rmp_serialize_named_web_app_data() {
133600        let t = WebAppData::default();
133601        let ser = rmp_serde::to_vec_named(&t).unwrap();
133602        let _: WebAppData = rmp_serde::from_slice(ser.as_slice()).unwrap();
133603    }
133604    #[test]
133605    fn rmp_serialize_array_web_app_data() {
133606        let t = WebAppData::default();
133607        let t = t.noskip();
133608        let ser = rmp_serde::to_vec(&t).unwrap();
133609        let _: WebAppData = rmp_serde::from_slice(ser.as_slice()).unwrap();
133610    }
133611    #[test]
133612    fn json_serialize_web_app_data() {
133613        let t = WebAppData::default();
133614        let ser = serde_json::to_string(&t).unwrap();
133615        println!("{}", ser);
133616        let _: WebAppData = serde_json::from_str(&ser).unwrap();
133617    }
133618    #[test]
133619    fn rmp_serialize_named_inline_query_result_cached_document() {
133620        let t = InlineQueryResultCachedDocument::default();
133621        let ser = rmp_serde::to_vec_named(&t).unwrap();
133622        let _: InlineQueryResultCachedDocument = rmp_serde::from_slice(ser.as_slice()).unwrap();
133623    }
133624    #[test]
133625    fn rmp_serialize_array_inline_query_result_cached_document() {
133626        let t = InlineQueryResultCachedDocument::default();
133627        let t = t.noskip();
133628        let ser = rmp_serde::to_vec(&t).unwrap();
133629        let _: InlineQueryResultCachedDocument = rmp_serde::from_slice(ser.as_slice()).unwrap();
133630    }
133631    #[test]
133632    fn json_serialize_inline_query_result_cached_document() {
133633        let t = InlineQueryResultCachedDocument::default();
133634        let ser = serde_json::to_string(&t).unwrap();
133635        println!("{}", ser);
133636        let _: InlineQueryResultCachedDocument = serde_json::from_str(&ser).unwrap();
133637    }
133638    #[test]
133639    fn rmp_serialize_named_inline_query_result_voice() {
133640        let t = InlineQueryResultVoice::default();
133641        let ser = rmp_serde::to_vec_named(&t).unwrap();
133642        let _: InlineQueryResultVoice = rmp_serde::from_slice(ser.as_slice()).unwrap();
133643    }
133644    #[test]
133645    fn rmp_serialize_array_inline_query_result_voice() {
133646        let t = InlineQueryResultVoice::default();
133647        let t = t.noskip();
133648        let ser = rmp_serde::to_vec(&t).unwrap();
133649        let _: InlineQueryResultVoice = rmp_serde::from_slice(ser.as_slice()).unwrap();
133650    }
133651    #[test]
133652    fn json_serialize_inline_query_result_voice() {
133653        let t = InlineQueryResultVoice::default();
133654        let ser = serde_json::to_string(&t).unwrap();
133655        println!("{}", ser);
133656        let _: InlineQueryResultVoice = serde_json::from_str(&ser).unwrap();
133657    }
133658    #[test]
133659    fn rmp_serialize_named_unique_gift_backdrop() {
133660        let t = UniqueGiftBackdrop::default();
133661        let ser = rmp_serde::to_vec_named(&t).unwrap();
133662        let _: UniqueGiftBackdrop = rmp_serde::from_slice(ser.as_slice()).unwrap();
133663    }
133664    #[test]
133665    fn rmp_serialize_array_unique_gift_backdrop() {
133666        let t = UniqueGiftBackdrop::default();
133667        let t = t.noskip();
133668        let ser = rmp_serde::to_vec(&t).unwrap();
133669        let _: UniqueGiftBackdrop = rmp_serde::from_slice(ser.as_slice()).unwrap();
133670    }
133671    #[test]
133672    fn json_serialize_unique_gift_backdrop() {
133673        let t = UniqueGiftBackdrop::default();
133674        let ser = serde_json::to_string(&t).unwrap();
133675        println!("{}", ser);
133676        let _: UniqueGiftBackdrop = serde_json::from_str(&ser).unwrap();
133677    }
133678    #[test]
133679    fn rmp_serialize_named_story_area_type_weather() {
133680        let t = StoryAreaTypeWeather::default();
133681        let ser = rmp_serde::to_vec_named(&t).unwrap();
133682        let _: StoryAreaTypeWeather = rmp_serde::from_slice(ser.as_slice()).unwrap();
133683    }
133684    #[test]
133685    fn rmp_serialize_array_story_area_type_weather() {
133686        let t = StoryAreaTypeWeather::default();
133687        let t = t.noskip();
133688        let ser = rmp_serde::to_vec(&t).unwrap();
133689        let _: StoryAreaTypeWeather = rmp_serde::from_slice(ser.as_slice()).unwrap();
133690    }
133691    #[test]
133692    fn json_serialize_story_area_type_weather() {
133693        let t = StoryAreaTypeWeather::default();
133694        let ser = serde_json::to_string(&t).unwrap();
133695        println!("{}", ser);
133696        let _: StoryAreaTypeWeather = serde_json::from_str(&ser).unwrap();
133697    }
133698    #[test]
133699    fn rmp_serialize_named_unique_gift_model() {
133700        let t = UniqueGiftModel::default();
133701        let ser = rmp_serde::to_vec_named(&t).unwrap();
133702        let _: UniqueGiftModel = rmp_serde::from_slice(ser.as_slice()).unwrap();
133703    }
133704    #[test]
133705    fn rmp_serialize_array_unique_gift_model() {
133706        let t = UniqueGiftModel::default();
133707        let t = t.noskip();
133708        let ser = rmp_serde::to_vec(&t).unwrap();
133709        let _: UniqueGiftModel = rmp_serde::from_slice(ser.as_slice()).unwrap();
133710    }
133711    #[test]
133712    fn json_serialize_unique_gift_model() {
133713        let t = UniqueGiftModel::default();
133714        let ser = serde_json::to_string(&t).unwrap();
133715        println!("{}", ser);
133716        let _: UniqueGiftModel = serde_json::from_str(&ser).unwrap();
133717    }
133718    #[test]
133719    fn rmp_serialize_named_force_reply() {
133720        let t = ForceReply::default();
133721        let ser = rmp_serde::to_vec_named(&t).unwrap();
133722        let _: ForceReply = rmp_serde::from_slice(ser.as_slice()).unwrap();
133723    }
133724    #[test]
133725    fn rmp_serialize_array_force_reply() {
133726        let t = ForceReply::default();
133727        let t = t.noskip();
133728        let ser = rmp_serde::to_vec(&t).unwrap();
133729        let _: ForceReply = rmp_serde::from_slice(ser.as_slice()).unwrap();
133730    }
133731    #[test]
133732    fn json_serialize_force_reply() {
133733        let t = ForceReply::default();
133734        let ser = serde_json::to_string(&t).unwrap();
133735        println!("{}", ser);
133736        let _: ForceReply = serde_json::from_str(&ser).unwrap();
133737    }
133738    #[test]
133739    fn rmp_serialize_named_star_transaction() {
133740        let t = StarTransaction::default();
133741        let ser = rmp_serde::to_vec_named(&t).unwrap();
133742        let _: StarTransaction = rmp_serde::from_slice(ser.as_slice()).unwrap();
133743    }
133744    #[test]
133745    fn rmp_serialize_array_star_transaction() {
133746        let t = StarTransaction::default();
133747        let t = t.noskip();
133748        let ser = rmp_serde::to_vec(&t).unwrap();
133749        let _: StarTransaction = rmp_serde::from_slice(ser.as_slice()).unwrap();
133750    }
133751    #[test]
133752    fn json_serialize_star_transaction() {
133753        let t = StarTransaction::default();
133754        let ser = serde_json::to_string(&t).unwrap();
133755        println!("{}", ser);
133756        let _: StarTransaction = serde_json::from_str(&ser).unwrap();
133757    }
133758    #[test]
133759    fn rmp_serialize_named_passport_element_error_data_field() {
133760        let t = PassportElementErrorDataField::default();
133761        let ser = rmp_serde::to_vec_named(&t).unwrap();
133762        let _: PassportElementErrorDataField = rmp_serde::from_slice(ser.as_slice()).unwrap();
133763    }
133764    #[test]
133765    fn rmp_serialize_array_passport_element_error_data_field() {
133766        let t = PassportElementErrorDataField::default();
133767        let t = t.noskip();
133768        let ser = rmp_serde::to_vec(&t).unwrap();
133769        let _: PassportElementErrorDataField = rmp_serde::from_slice(ser.as_slice()).unwrap();
133770    }
133771    #[test]
133772    fn json_serialize_passport_element_error_data_field() {
133773        let t = PassportElementErrorDataField::default();
133774        let ser = serde_json::to_string(&t).unwrap();
133775        println!("{}", ser);
133776        let _: PassportElementErrorDataField = serde_json::from_str(&ser).unwrap();
133777    }
133778    #[test]
133779    fn rmp_serialize_named_chat_boost() {
133780        let t = ChatBoost::default();
133781        let ser = rmp_serde::to_vec_named(&t).unwrap();
133782        let _: ChatBoost = rmp_serde::from_slice(ser.as_slice()).unwrap();
133783    }
133784    #[test]
133785    fn rmp_serialize_array_chat_boost() {
133786        let t = ChatBoost::default();
133787        let t = t.noskip();
133788        let ser = rmp_serde::to_vec(&t).unwrap();
133789        let _: ChatBoost = rmp_serde::from_slice(ser.as_slice()).unwrap();
133790    }
133791    #[test]
133792    fn json_serialize_chat_boost() {
133793        let t = ChatBoost::default();
133794        let ser = serde_json::to_string(&t).unwrap();
133795        println!("{}", ser);
133796        let _: ChatBoost = serde_json::from_str(&ser).unwrap();
133797    }
133798    #[test]
133799    fn rmp_serialize_named_shipping_option() {
133800        let t = ShippingOption::default();
133801        let ser = rmp_serde::to_vec_named(&t).unwrap();
133802        let _: ShippingOption = rmp_serde::from_slice(ser.as_slice()).unwrap();
133803    }
133804    #[test]
133805    fn rmp_serialize_array_shipping_option() {
133806        let t = ShippingOption::default();
133807        let t = t.noskip();
133808        let ser = rmp_serde::to_vec(&t).unwrap();
133809        let _: ShippingOption = rmp_serde::from_slice(ser.as_slice()).unwrap();
133810    }
133811    #[test]
133812    fn json_serialize_shipping_option() {
133813        let t = ShippingOption::default();
133814        let ser = serde_json::to_string(&t).unwrap();
133815        println!("{}", ser);
133816        let _: ShippingOption = serde_json::from_str(&ser).unwrap();
133817    }
133818    #[test]
133819    fn rmp_serialize_named_passport_element_error_front_side() {
133820        let t = PassportElementErrorFrontSide::default();
133821        let ser = rmp_serde::to_vec_named(&t).unwrap();
133822        let _: PassportElementErrorFrontSide = rmp_serde::from_slice(ser.as_slice()).unwrap();
133823    }
133824    #[test]
133825    fn rmp_serialize_array_passport_element_error_front_side() {
133826        let t = PassportElementErrorFrontSide::default();
133827        let t = t.noskip();
133828        let ser = rmp_serde::to_vec(&t).unwrap();
133829        let _: PassportElementErrorFrontSide = rmp_serde::from_slice(ser.as_slice()).unwrap();
133830    }
133831    #[test]
133832    fn json_serialize_passport_element_error_front_side() {
133833        let t = PassportElementErrorFrontSide::default();
133834        let ser = serde_json::to_string(&t).unwrap();
133835        println!("{}", ser);
133836        let _: PassportElementErrorFrontSide = serde_json::from_str(&ser).unwrap();
133837    }
133838    #[test]
133839    fn rmp_serialize_named_business_opening_hours() {
133840        let t = BusinessOpeningHours::default();
133841        let ser = rmp_serde::to_vec_named(&t).unwrap();
133842        let _: BusinessOpeningHours = rmp_serde::from_slice(ser.as_slice()).unwrap();
133843    }
133844    #[test]
133845    fn rmp_serialize_array_business_opening_hours() {
133846        let t = BusinessOpeningHours::default();
133847        let t = t.noskip();
133848        let ser = rmp_serde::to_vec(&t).unwrap();
133849        let _: BusinessOpeningHours = rmp_serde::from_slice(ser.as_slice()).unwrap();
133850    }
133851    #[test]
133852    fn json_serialize_business_opening_hours() {
133853        let t = BusinessOpeningHours::default();
133854        let ser = serde_json::to_string(&t).unwrap();
133855        println!("{}", ser);
133856        let _: BusinessOpeningHours = serde_json::from_str(&ser).unwrap();
133857    }
133858    #[test]
133859    fn rmp_serialize_named_story() {
133860        let t = Story::default();
133861        let ser = rmp_serde::to_vec_named(&t).unwrap();
133862        let _: Story = rmp_serde::from_slice(ser.as_slice()).unwrap();
133863    }
133864    #[test]
133865    fn rmp_serialize_array_story() {
133866        let t = Story::default();
133867        let t = t.noskip();
133868        let ser = rmp_serde::to_vec(&t).unwrap();
133869        let _: Story = rmp_serde::from_slice(ser.as_slice()).unwrap();
133870    }
133871    #[test]
133872    fn json_serialize_story() {
133873        let t = Story::default();
133874        let ser = serde_json::to_string(&t).unwrap();
133875        println!("{}", ser);
133876        let _: Story = serde_json::from_str(&ser).unwrap();
133877    }
133878    #[test]
133879    fn rmp_serialize_named_web_app_info() {
133880        let t = WebAppInfo::default();
133881        let ser = rmp_serde::to_vec_named(&t).unwrap();
133882        let _: WebAppInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
133883    }
133884    #[test]
133885    fn rmp_serialize_array_web_app_info() {
133886        let t = WebAppInfo::default();
133887        let t = t.noskip();
133888        let ser = rmp_serde::to_vec(&t).unwrap();
133889        let _: WebAppInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
133890    }
133891    #[test]
133892    fn json_serialize_web_app_info() {
133893        let t = WebAppInfo::default();
133894        let ser = serde_json::to_string(&t).unwrap();
133895        println!("{}", ser);
133896        let _: WebAppInfo = serde_json::from_str(&ser).unwrap();
133897    }
133898    #[test]
133899    fn rmp_serialize_named_bot_command_scope_chat_member() {
133900        let t = BotCommandScopeChatMember::default();
133901        let ser = rmp_serde::to_vec_named(&t).unwrap();
133902        let _: BotCommandScopeChatMember = rmp_serde::from_slice(ser.as_slice()).unwrap();
133903    }
133904    #[test]
133905    fn rmp_serialize_array_bot_command_scope_chat_member() {
133906        let t = BotCommandScopeChatMember::default();
133907        let t = t.noskip();
133908        let ser = rmp_serde::to_vec(&t).unwrap();
133909        let _: BotCommandScopeChatMember = rmp_serde::from_slice(ser.as_slice()).unwrap();
133910    }
133911    #[test]
133912    fn json_serialize_bot_command_scope_chat_member() {
133913        let t = BotCommandScopeChatMember::default();
133914        let ser = serde_json::to_string(&t).unwrap();
133915        println!("{}", ser);
133916        let _: BotCommandScopeChatMember = serde_json::from_str(&ser).unwrap();
133917    }
133918    #[test]
133919    fn rmp_serialize_named_chat_background() {
133920        let t = ChatBackground::default();
133921        let ser = rmp_serde::to_vec_named(&t).unwrap();
133922        let _: ChatBackground = rmp_serde::from_slice(ser.as_slice()).unwrap();
133923    }
133924    #[test]
133925    fn rmp_serialize_array_chat_background() {
133926        let t = ChatBackground::default();
133927        let t = t.noskip();
133928        let ser = rmp_serde::to_vec(&t).unwrap();
133929        let _: ChatBackground = rmp_serde::from_slice(ser.as_slice()).unwrap();
133930    }
133931    #[test]
133932    fn json_serialize_chat_background() {
133933        let t = ChatBackground::default();
133934        let ser = serde_json::to_string(&t).unwrap();
133935        println!("{}", ser);
133936        let _: ChatBackground = serde_json::from_str(&ser).unwrap();
133937    }
133938    #[test]
133939    fn rmp_serialize_named_passport_file() {
133940        let t = PassportFile::default();
133941        let ser = rmp_serde::to_vec_named(&t).unwrap();
133942        let _: PassportFile = rmp_serde::from_slice(ser.as_slice()).unwrap();
133943    }
133944    #[test]
133945    fn rmp_serialize_array_passport_file() {
133946        let t = PassportFile::default();
133947        let t = t.noskip();
133948        let ser = rmp_serde::to_vec(&t).unwrap();
133949        let _: PassportFile = rmp_serde::from_slice(ser.as_slice()).unwrap();
133950    }
133951    #[test]
133952    fn json_serialize_passport_file() {
133953        let t = PassportFile::default();
133954        let ser = serde_json::to_string(&t).unwrap();
133955        println!("{}", ser);
133956        let _: PassportFile = serde_json::from_str(&ser).unwrap();
133957    }
133958    #[test]
133959    fn rmp_serialize_named_bot_command_scope_all_chat_administrators() {
133960        let t = BotCommandScopeAllChatAdministrators::default();
133961        let ser = rmp_serde::to_vec_named(&t).unwrap();
133962        let _: BotCommandScopeAllChatAdministrators =
133963            rmp_serde::from_slice(ser.as_slice()).unwrap();
133964    }
133965    #[test]
133966    fn rmp_serialize_array_bot_command_scope_all_chat_administrators() {
133967        let t = BotCommandScopeAllChatAdministrators::default();
133968        let t = t.noskip();
133969        let ser = rmp_serde::to_vec(&t).unwrap();
133970        let _: BotCommandScopeAllChatAdministrators =
133971            rmp_serde::from_slice(ser.as_slice()).unwrap();
133972    }
133973    #[test]
133974    fn json_serialize_bot_command_scope_all_chat_administrators() {
133975        let t = BotCommandScopeAllChatAdministrators::default();
133976        let ser = serde_json::to_string(&t).unwrap();
133977        println!("{}", ser);
133978        let _: BotCommandScopeAllChatAdministrators = serde_json::from_str(&ser).unwrap();
133979    }
133980    #[test]
133981    fn rmp_serialize_named_external_reply_info() {
133982        let t = ExternalReplyInfo::default();
133983        let ser = rmp_serde::to_vec_named(&t).unwrap();
133984        let _: ExternalReplyInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
133985    }
133986    #[test]
133987    fn rmp_serialize_array_external_reply_info() {
133988        let t = ExternalReplyInfo::default();
133989        let t = t.noskip();
133990        let ser = rmp_serde::to_vec(&t).unwrap();
133991        let _: ExternalReplyInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
133992    }
133993    #[test]
133994    fn json_serialize_external_reply_info() {
133995        let t = ExternalReplyInfo::default();
133996        let ser = serde_json::to_string(&t).unwrap();
133997        println!("{}", ser);
133998        let _: ExternalReplyInfo = serde_json::from_str(&ser).unwrap();
133999    }
134000    #[test]
134001    fn rmp_serialize_named_inline_query_result_cached_gif() {
134002        let t = InlineQueryResultCachedGif::default();
134003        let ser = rmp_serde::to_vec_named(&t).unwrap();
134004        let _: InlineQueryResultCachedGif = rmp_serde::from_slice(ser.as_slice()).unwrap();
134005    }
134006    #[test]
134007    fn rmp_serialize_array_inline_query_result_cached_gif() {
134008        let t = InlineQueryResultCachedGif::default();
134009        let t = t.noskip();
134010        let ser = rmp_serde::to_vec(&t).unwrap();
134011        let _: InlineQueryResultCachedGif = rmp_serde::from_slice(ser.as_slice()).unwrap();
134012    }
134013    #[test]
134014    fn json_serialize_inline_query_result_cached_gif() {
134015        let t = InlineQueryResultCachedGif::default();
134016        let ser = serde_json::to_string(&t).unwrap();
134017        println!("{}", ser);
134018        let _: InlineQueryResultCachedGif = serde_json::from_str(&ser).unwrap();
134019    }
134020    #[test]
134021    fn rmp_serialize_named_write_access_allowed() {
134022        let t = WriteAccessAllowed::default();
134023        let ser = rmp_serde::to_vec_named(&t).unwrap();
134024        let _: WriteAccessAllowed = rmp_serde::from_slice(ser.as_slice()).unwrap();
134025    }
134026    #[test]
134027    fn rmp_serialize_array_write_access_allowed() {
134028        let t = WriteAccessAllowed::default();
134029        let t = t.noskip();
134030        let ser = rmp_serde::to_vec(&t).unwrap();
134031        let _: WriteAccessAllowed = rmp_serde::from_slice(ser.as_slice()).unwrap();
134032    }
134033    #[test]
134034    fn json_serialize_write_access_allowed() {
134035        let t = WriteAccessAllowed::default();
134036        let ser = serde_json::to_string(&t).unwrap();
134037        println!("{}", ser);
134038        let _: WriteAccessAllowed = serde_json::from_str(&ser).unwrap();
134039    }
134040    #[test]
134041    fn rmp_serialize_named_transaction_partner_telegram_api() {
134042        let t = TransactionPartnerTelegramApi::default();
134043        let ser = rmp_serde::to_vec_named(&t).unwrap();
134044        let _: TransactionPartnerTelegramApi = rmp_serde::from_slice(ser.as_slice()).unwrap();
134045    }
134046    #[test]
134047    fn rmp_serialize_array_transaction_partner_telegram_api() {
134048        let t = TransactionPartnerTelegramApi::default();
134049        let t = t.noskip();
134050        let ser = rmp_serde::to_vec(&t).unwrap();
134051        let _: TransactionPartnerTelegramApi = rmp_serde::from_slice(ser.as_slice()).unwrap();
134052    }
134053    #[test]
134054    fn json_serialize_transaction_partner_telegram_api() {
134055        let t = TransactionPartnerTelegramApi::default();
134056        let ser = serde_json::to_string(&t).unwrap();
134057        println!("{}", ser);
134058        let _: TransactionPartnerTelegramApi = serde_json::from_str(&ser).unwrap();
134059    }
134060    #[test]
134061    fn rmp_serialize_named_proximity_alert_triggered() {
134062        let t = ProximityAlertTriggered::default();
134063        let ser = rmp_serde::to_vec_named(&t).unwrap();
134064        let _: ProximityAlertTriggered = rmp_serde::from_slice(ser.as_slice()).unwrap();
134065    }
134066    #[test]
134067    fn rmp_serialize_array_proximity_alert_triggered() {
134068        let t = ProximityAlertTriggered::default();
134069        let t = t.noskip();
134070        let ser = rmp_serde::to_vec(&t).unwrap();
134071        let _: ProximityAlertTriggered = rmp_serde::from_slice(ser.as_slice()).unwrap();
134072    }
134073    #[test]
134074    fn json_serialize_proximity_alert_triggered() {
134075        let t = ProximityAlertTriggered::default();
134076        let ser = serde_json::to_string(&t).unwrap();
134077        println!("{}", ser);
134078        let _: ProximityAlertTriggered = serde_json::from_str(&ser).unwrap();
134079    }
134080    #[test]
134081    fn rmp_serialize_named_inline_query_result_audio() {
134082        let t = InlineQueryResultAudio::default();
134083        let ser = rmp_serde::to_vec_named(&t).unwrap();
134084        let _: InlineQueryResultAudio = rmp_serde::from_slice(ser.as_slice()).unwrap();
134085    }
134086    #[test]
134087    fn rmp_serialize_array_inline_query_result_audio() {
134088        let t = InlineQueryResultAudio::default();
134089        let t = t.noskip();
134090        let ser = rmp_serde::to_vec(&t).unwrap();
134091        let _: InlineQueryResultAudio = rmp_serde::from_slice(ser.as_slice()).unwrap();
134092    }
134093    #[test]
134094    fn json_serialize_inline_query_result_audio() {
134095        let t = InlineQueryResultAudio::default();
134096        let ser = serde_json::to_string(&t).unwrap();
134097        println!("{}", ser);
134098        let _: InlineQueryResultAudio = serde_json::from_str(&ser).unwrap();
134099    }
134100    #[test]
134101    fn rmp_serialize_named_message() {
134102        let t = Message::default();
134103        let ser = rmp_serde::to_vec_named(&t).unwrap();
134104        let _: Message = rmp_serde::from_slice(ser.as_slice()).unwrap();
134105    }
134106    #[test]
134107    fn rmp_serialize_array_message() {
134108        let t = Message::default();
134109        let t = t.noskip();
134110        let ser = rmp_serde::to_vec(&t).unwrap();
134111        let _: Message = rmp_serde::from_slice(ser.as_slice()).unwrap();
134112    }
134113    #[test]
134114    fn json_serialize_message() {
134115        let t = Message::default();
134116        let ser = serde_json::to_string(&t).unwrap();
134117        println!("{}", ser);
134118        let _: Message = serde_json::from_str(&ser).unwrap();
134119    }
134120    #[test]
134121    fn rmp_serialize_named_chat_photo() {
134122        let t = ChatPhoto::default();
134123        let ser = rmp_serde::to_vec_named(&t).unwrap();
134124        let _: ChatPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
134125    }
134126    #[test]
134127    fn rmp_serialize_array_chat_photo() {
134128        let t = ChatPhoto::default();
134129        let t = t.noskip();
134130        let ser = rmp_serde::to_vec(&t).unwrap();
134131        let _: ChatPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
134132    }
134133    #[test]
134134    fn json_serialize_chat_photo() {
134135        let t = ChatPhoto::default();
134136        let ser = serde_json::to_string(&t).unwrap();
134137        println!("{}", ser);
134138        let _: ChatPhoto = serde_json::from_str(&ser).unwrap();
134139    }
134140    #[test]
134141    fn rmp_serialize_named_inline_query_result_game() {
134142        let t = InlineQueryResultGame::default();
134143        let ser = rmp_serde::to_vec_named(&t).unwrap();
134144        let _: InlineQueryResultGame = rmp_serde::from_slice(ser.as_slice()).unwrap();
134145    }
134146    #[test]
134147    fn rmp_serialize_array_inline_query_result_game() {
134148        let t = InlineQueryResultGame::default();
134149        let t = t.noskip();
134150        let ser = rmp_serde::to_vec(&t).unwrap();
134151        let _: InlineQueryResultGame = rmp_serde::from_slice(ser.as_slice()).unwrap();
134152    }
134153    #[test]
134154    fn json_serialize_inline_query_result_game() {
134155        let t = InlineQueryResultGame::default();
134156        let ser = serde_json::to_string(&t).unwrap();
134157        println!("{}", ser);
134158        let _: InlineQueryResultGame = serde_json::from_str(&ser).unwrap();
134159    }
134160    #[test]
134161    fn rmp_serialize_named_revenue_withdrawal_state_failed() {
134162        let t = RevenueWithdrawalStateFailed::default();
134163        let ser = rmp_serde::to_vec_named(&t).unwrap();
134164        let _: RevenueWithdrawalStateFailed = rmp_serde::from_slice(ser.as_slice()).unwrap();
134165    }
134166    #[test]
134167    fn rmp_serialize_array_revenue_withdrawal_state_failed() {
134168        let t = RevenueWithdrawalStateFailed::default();
134169        let t = t.noskip();
134170        let ser = rmp_serde::to_vec(&t).unwrap();
134171        let _: RevenueWithdrawalStateFailed = rmp_serde::from_slice(ser.as_slice()).unwrap();
134172    }
134173    #[test]
134174    fn json_serialize_revenue_withdrawal_state_failed() {
134175        let t = RevenueWithdrawalStateFailed::default();
134176        let ser = serde_json::to_string(&t).unwrap();
134177        println!("{}", ser);
134178        let _: RevenueWithdrawalStateFailed = serde_json::from_str(&ser).unwrap();
134179    }
134180    #[test]
134181    fn rmp_serialize_named_message_entity() {
134182        let t = MessageEntity::default();
134183        let ser = rmp_serde::to_vec_named(&t).unwrap();
134184        let _: MessageEntity = rmp_serde::from_slice(ser.as_slice()).unwrap();
134185    }
134186    #[test]
134187    fn rmp_serialize_array_message_entity() {
134188        let t = MessageEntity::default();
134189        let t = t.noskip();
134190        let ser = rmp_serde::to_vec(&t).unwrap();
134191        let _: MessageEntity = rmp_serde::from_slice(ser.as_slice()).unwrap();
134192    }
134193    #[test]
134194    fn json_serialize_message_entity() {
134195        let t = MessageEntity::default();
134196        let ser = serde_json::to_string(&t).unwrap();
134197        println!("{}", ser);
134198        let _: MessageEntity = serde_json::from_str(&ser).unwrap();
134199    }
134200    #[test]
134201    fn rmp_serialize_named_unique_gift_backdrop_colors() {
134202        let t = UniqueGiftBackdropColors::default();
134203        let ser = rmp_serde::to_vec_named(&t).unwrap();
134204        let _: UniqueGiftBackdropColors = rmp_serde::from_slice(ser.as_slice()).unwrap();
134205    }
134206    #[test]
134207    fn rmp_serialize_array_unique_gift_backdrop_colors() {
134208        let t = UniqueGiftBackdropColors::default();
134209        let t = t.noskip();
134210        let ser = rmp_serde::to_vec(&t).unwrap();
134211        let _: UniqueGiftBackdropColors = rmp_serde::from_slice(ser.as_slice()).unwrap();
134212    }
134213    #[test]
134214    fn json_serialize_unique_gift_backdrop_colors() {
134215        let t = UniqueGiftBackdropColors::default();
134216        let ser = serde_json::to_string(&t).unwrap();
134217        println!("{}", ser);
134218        let _: UniqueGiftBackdropColors = serde_json::from_str(&ser).unwrap();
134219    }
134220    #[test]
134221    fn rmp_serialize_named_suggested_post_approval_failed() {
134222        let t = SuggestedPostApprovalFailed::default();
134223        let ser = rmp_serde::to_vec_named(&t).unwrap();
134224        let _: SuggestedPostApprovalFailed = rmp_serde::from_slice(ser.as_slice()).unwrap();
134225    }
134226    #[test]
134227    fn rmp_serialize_array_suggested_post_approval_failed() {
134228        let t = SuggestedPostApprovalFailed::default();
134229        let t = t.noskip();
134230        let ser = rmp_serde::to_vec(&t).unwrap();
134231        let _: SuggestedPostApprovalFailed = rmp_serde::from_slice(ser.as_slice()).unwrap();
134232    }
134233    #[test]
134234    fn json_serialize_suggested_post_approval_failed() {
134235        let t = SuggestedPostApprovalFailed::default();
134236        let ser = serde_json::to_string(&t).unwrap();
134237        println!("{}", ser);
134238        let _: SuggestedPostApprovalFailed = serde_json::from_str(&ser).unwrap();
134239    }
134240    #[test]
134241    fn rmp_serialize_named_document() {
134242        let t = Document::default();
134243        let ser = rmp_serde::to_vec_named(&t).unwrap();
134244        let _: Document = rmp_serde::from_slice(ser.as_slice()).unwrap();
134245    }
134246    #[test]
134247    fn rmp_serialize_array_document() {
134248        let t = Document::default();
134249        let t = t.noskip();
134250        let ser = rmp_serde::to_vec(&t).unwrap();
134251        let _: Document = rmp_serde::from_slice(ser.as_slice()).unwrap();
134252    }
134253    #[test]
134254    fn json_serialize_document() {
134255        let t = Document::default();
134256        let ser = serde_json::to_string(&t).unwrap();
134257        println!("{}", ser);
134258        let _: Document = serde_json::from_str(&ser).unwrap();
134259    }
134260    #[test]
134261    fn rmp_serialize_named_shared_user() {
134262        let t = SharedUser::default();
134263        let ser = rmp_serde::to_vec_named(&t).unwrap();
134264        let _: SharedUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
134265    }
134266    #[test]
134267    fn rmp_serialize_array_shared_user() {
134268        let t = SharedUser::default();
134269        let t = t.noskip();
134270        let ser = rmp_serde::to_vec(&t).unwrap();
134271        let _: SharedUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
134272    }
134273    #[test]
134274    fn json_serialize_shared_user() {
134275        let t = SharedUser::default();
134276        let ser = serde_json::to_string(&t).unwrap();
134277        println!("{}", ser);
134278        let _: SharedUser = serde_json::from_str(&ser).unwrap();
134279    }
134280    #[test]
134281    fn rmp_serialize_named_unique_gift_info() {
134282        let t = UniqueGiftInfo::default();
134283        let ser = rmp_serde::to_vec_named(&t).unwrap();
134284        let _: UniqueGiftInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
134285    }
134286    #[test]
134287    fn rmp_serialize_array_unique_gift_info() {
134288        let t = UniqueGiftInfo::default();
134289        let t = t.noskip();
134290        let ser = rmp_serde::to_vec(&t).unwrap();
134291        let _: UniqueGiftInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
134292    }
134293    #[test]
134294    fn json_serialize_unique_gift_info() {
134295        let t = UniqueGiftInfo::default();
134296        let ser = serde_json::to_string(&t).unwrap();
134297        println!("{}", ser);
134298        let _: UniqueGiftInfo = serde_json::from_str(&ser).unwrap();
134299    }
134300    #[test]
134301    fn rmp_serialize_named_shipping_query() {
134302        let t = ShippingQuery::default();
134303        let ser = rmp_serde::to_vec_named(&t).unwrap();
134304        let _: ShippingQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
134305    }
134306    #[test]
134307    fn rmp_serialize_array_shipping_query() {
134308        let t = ShippingQuery::default();
134309        let t = t.noskip();
134310        let ser = rmp_serde::to_vec(&t).unwrap();
134311        let _: ShippingQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
134312    }
134313    #[test]
134314    fn json_serialize_shipping_query() {
134315        let t = ShippingQuery::default();
134316        let ser = serde_json::to_string(&t).unwrap();
134317        println!("{}", ser);
134318        let _: ShippingQuery = serde_json::from_str(&ser).unwrap();
134319    }
134320    #[test]
134321    fn rmp_serialize_named_inline_query_result_video() {
134322        let t = InlineQueryResultVideo::default();
134323        let ser = rmp_serde::to_vec_named(&t).unwrap();
134324        let _: InlineQueryResultVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
134325    }
134326    #[test]
134327    fn rmp_serialize_array_inline_query_result_video() {
134328        let t = InlineQueryResultVideo::default();
134329        let t = t.noskip();
134330        let ser = rmp_serde::to_vec(&t).unwrap();
134331        let _: InlineQueryResultVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
134332    }
134333    #[test]
134334    fn json_serialize_inline_query_result_video() {
134335        let t = InlineQueryResultVideo::default();
134336        let ser = serde_json::to_string(&t).unwrap();
134337        println!("{}", ser);
134338        let _: InlineQueryResultVideo = serde_json::from_str(&ser).unwrap();
134339    }
134340    #[test]
134341    fn rmp_serialize_named_direct_message_price_changed() {
134342        let t = DirectMessagePriceChanged::default();
134343        let ser = rmp_serde::to_vec_named(&t).unwrap();
134344        let _: DirectMessagePriceChanged = rmp_serde::from_slice(ser.as_slice()).unwrap();
134345    }
134346    #[test]
134347    fn rmp_serialize_array_direct_message_price_changed() {
134348        let t = DirectMessagePriceChanged::default();
134349        let t = t.noskip();
134350        let ser = rmp_serde::to_vec(&t).unwrap();
134351        let _: DirectMessagePriceChanged = rmp_serde::from_slice(ser.as_slice()).unwrap();
134352    }
134353    #[test]
134354    fn json_serialize_direct_message_price_changed() {
134355        let t = DirectMessagePriceChanged::default();
134356        let ser = serde_json::to_string(&t).unwrap();
134357        println!("{}", ser);
134358        let _: DirectMessagePriceChanged = serde_json::from_str(&ser).unwrap();
134359    }
134360    #[test]
134361    fn rmp_serialize_named_reaction_count() {
134362        let t = ReactionCount::default();
134363        let ser = rmp_serde::to_vec_named(&t).unwrap();
134364        let _: ReactionCount = rmp_serde::from_slice(ser.as_slice()).unwrap();
134365    }
134366    #[test]
134367    fn rmp_serialize_array_reaction_count() {
134368        let t = ReactionCount::default();
134369        let t = t.noskip();
134370        let ser = rmp_serde::to_vec(&t).unwrap();
134371        let _: ReactionCount = rmp_serde::from_slice(ser.as_slice()).unwrap();
134372    }
134373    #[test]
134374    fn json_serialize_reaction_count() {
134375        let t = ReactionCount::default();
134376        let ser = serde_json::to_string(&t).unwrap();
134377        println!("{}", ser);
134378        let _: ReactionCount = serde_json::from_str(&ser).unwrap();
134379    }
134380    #[test]
134381    fn rmp_serialize_named_chat_shared() {
134382        let t = ChatShared::default();
134383        let ser = rmp_serde::to_vec_named(&t).unwrap();
134384        let _: ChatShared = rmp_serde::from_slice(ser.as_slice()).unwrap();
134385    }
134386    #[test]
134387    fn rmp_serialize_array_chat_shared() {
134388        let t = ChatShared::default();
134389        let t = t.noskip();
134390        let ser = rmp_serde::to_vec(&t).unwrap();
134391        let _: ChatShared = rmp_serde::from_slice(ser.as_slice()).unwrap();
134392    }
134393    #[test]
134394    fn json_serialize_chat_shared() {
134395        let t = ChatShared::default();
134396        let ser = serde_json::to_string(&t).unwrap();
134397        println!("{}", ser);
134398        let _: ChatShared = serde_json::from_str(&ser).unwrap();
134399    }
134400    #[test]
134401    fn rmp_serialize_named_message_origin_channel() {
134402        let t = MessageOriginChannel::default();
134403        let ser = rmp_serde::to_vec_named(&t).unwrap();
134404        let _: MessageOriginChannel = rmp_serde::from_slice(ser.as_slice()).unwrap();
134405    }
134406    #[test]
134407    fn rmp_serialize_array_message_origin_channel() {
134408        let t = MessageOriginChannel::default();
134409        let t = t.noskip();
134410        let ser = rmp_serde::to_vec(&t).unwrap();
134411        let _: MessageOriginChannel = rmp_serde::from_slice(ser.as_slice()).unwrap();
134412    }
134413    #[test]
134414    fn json_serialize_message_origin_channel() {
134415        let t = MessageOriginChannel::default();
134416        let ser = serde_json::to_string(&t).unwrap();
134417        println!("{}", ser);
134418        let _: MessageOriginChannel = serde_json::from_str(&ser).unwrap();
134419    }
134420    #[test]
134421    fn rmp_serialize_named_chat_boost_removed() {
134422        let t = ChatBoostRemoved::default();
134423        let ser = rmp_serde::to_vec_named(&t).unwrap();
134424        let _: ChatBoostRemoved = rmp_serde::from_slice(ser.as_slice()).unwrap();
134425    }
134426    #[test]
134427    fn rmp_serialize_array_chat_boost_removed() {
134428        let t = ChatBoostRemoved::default();
134429        let t = t.noskip();
134430        let ser = rmp_serde::to_vec(&t).unwrap();
134431        let _: ChatBoostRemoved = rmp_serde::from_slice(ser.as_slice()).unwrap();
134432    }
134433    #[test]
134434    fn json_serialize_chat_boost_removed() {
134435        let t = ChatBoostRemoved::default();
134436        let ser = serde_json::to_string(&t).unwrap();
134437        println!("{}", ser);
134438        let _: ChatBoostRemoved = serde_json::from_str(&ser).unwrap();
134439    }
134440    #[test]
134441    fn rmp_serialize_named_background_type_fill() {
134442        let t = BackgroundTypeFill::default();
134443        let ser = rmp_serde::to_vec_named(&t).unwrap();
134444        let _: BackgroundTypeFill = rmp_serde::from_slice(ser.as_slice()).unwrap();
134445    }
134446    #[test]
134447    fn rmp_serialize_array_background_type_fill() {
134448        let t = BackgroundTypeFill::default();
134449        let t = t.noskip();
134450        let ser = rmp_serde::to_vec(&t).unwrap();
134451        let _: BackgroundTypeFill = rmp_serde::from_slice(ser.as_slice()).unwrap();
134452    }
134453    #[test]
134454    fn json_serialize_background_type_fill() {
134455        let t = BackgroundTypeFill::default();
134456        let ser = serde_json::to_string(&t).unwrap();
134457        println!("{}", ser);
134458        let _: BackgroundTypeFill = serde_json::from_str(&ser).unwrap();
134459    }
134460    #[test]
134461    fn rmp_serialize_named_message_id() {
134462        let t = MessageId::default();
134463        let ser = rmp_serde::to_vec_named(&t).unwrap();
134464        let _: MessageId = rmp_serde::from_slice(ser.as_slice()).unwrap();
134465    }
134466    #[test]
134467    fn rmp_serialize_array_message_id() {
134468        let t = MessageId::default();
134469        let t = t.noskip();
134470        let ser = rmp_serde::to_vec(&t).unwrap();
134471        let _: MessageId = rmp_serde::from_slice(ser.as_slice()).unwrap();
134472    }
134473    #[test]
134474    fn json_serialize_message_id() {
134475        let t = MessageId::default();
134476        let ser = serde_json::to_string(&t).unwrap();
134477        println!("{}", ser);
134478        let _: MessageId = serde_json::from_str(&ser).unwrap();
134479    }
134480    #[test]
134481    fn rmp_serialize_named_keyboard_button_request_chat() {
134482        let t = KeyboardButtonRequestChat::default();
134483        let ser = rmp_serde::to_vec_named(&t).unwrap();
134484        let _: KeyboardButtonRequestChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
134485    }
134486    #[test]
134487    fn rmp_serialize_array_keyboard_button_request_chat() {
134488        let t = KeyboardButtonRequestChat::default();
134489        let t = t.noskip();
134490        let ser = rmp_serde::to_vec(&t).unwrap();
134491        let _: KeyboardButtonRequestChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
134492    }
134493    #[test]
134494    fn json_serialize_keyboard_button_request_chat() {
134495        let t = KeyboardButtonRequestChat::default();
134496        let ser = serde_json::to_string(&t).unwrap();
134497        println!("{}", ser);
134498        let _: KeyboardButtonRequestChat = serde_json::from_str(&ser).unwrap();
134499    }
134500    #[test]
134501    fn rmp_serialize_named_reaction_type_emoji() {
134502        let t = ReactionTypeEmoji::default();
134503        let ser = rmp_serde::to_vec_named(&t).unwrap();
134504        let _: ReactionTypeEmoji = rmp_serde::from_slice(ser.as_slice()).unwrap();
134505    }
134506    #[test]
134507    fn rmp_serialize_array_reaction_type_emoji() {
134508        let t = ReactionTypeEmoji::default();
134509        let t = t.noskip();
134510        let ser = rmp_serde::to_vec(&t).unwrap();
134511        let _: ReactionTypeEmoji = rmp_serde::from_slice(ser.as_slice()).unwrap();
134512    }
134513    #[test]
134514    fn json_serialize_reaction_type_emoji() {
134515        let t = ReactionTypeEmoji::default();
134516        let ser = serde_json::to_string(&t).unwrap();
134517        println!("{}", ser);
134518        let _: ReactionTypeEmoji = serde_json::from_str(&ser).unwrap();
134519    }
134520    #[test]
134521    fn rmp_serialize_named_sent_web_app_message() {
134522        let t = SentWebAppMessage::default();
134523        let ser = rmp_serde::to_vec_named(&t).unwrap();
134524        let _: SentWebAppMessage = rmp_serde::from_slice(ser.as_slice()).unwrap();
134525    }
134526    #[test]
134527    fn rmp_serialize_array_sent_web_app_message() {
134528        let t = SentWebAppMessage::default();
134529        let t = t.noskip();
134530        let ser = rmp_serde::to_vec(&t).unwrap();
134531        let _: SentWebAppMessage = rmp_serde::from_slice(ser.as_slice()).unwrap();
134532    }
134533    #[test]
134534    fn json_serialize_sent_web_app_message() {
134535        let t = SentWebAppMessage::default();
134536        let ser = serde_json::to_string(&t).unwrap();
134537        println!("{}", ser);
134538        let _: SentWebAppMessage = serde_json::from_str(&ser).unwrap();
134539    }
134540    #[test]
134541    fn rmp_serialize_named_giveaway() {
134542        let t = Giveaway::default();
134543        let ser = rmp_serde::to_vec_named(&t).unwrap();
134544        let _: Giveaway = rmp_serde::from_slice(ser.as_slice()).unwrap();
134545    }
134546    #[test]
134547    fn rmp_serialize_array_giveaway() {
134548        let t = Giveaway::default();
134549        let t = t.noskip();
134550        let ser = rmp_serde::to_vec(&t).unwrap();
134551        let _: Giveaway = rmp_serde::from_slice(ser.as_slice()).unwrap();
134552    }
134553    #[test]
134554    fn json_serialize_giveaway() {
134555        let t = Giveaway::default();
134556        let ser = serde_json::to_string(&t).unwrap();
134557        println!("{}", ser);
134558        let _: Giveaway = serde_json::from_str(&ser).unwrap();
134559    }
134560    #[test]
134561    fn rmp_serialize_named_direct_messages_topic() {
134562        let t = DirectMessagesTopic::default();
134563        let ser = rmp_serde::to_vec_named(&t).unwrap();
134564        let _: DirectMessagesTopic = rmp_serde::from_slice(ser.as_slice()).unwrap();
134565    }
134566    #[test]
134567    fn rmp_serialize_array_direct_messages_topic() {
134568        let t = DirectMessagesTopic::default();
134569        let t = t.noskip();
134570        let ser = rmp_serde::to_vec(&t).unwrap();
134571        let _: DirectMessagesTopic = rmp_serde::from_slice(ser.as_slice()).unwrap();
134572    }
134573    #[test]
134574    fn json_serialize_direct_messages_topic() {
134575        let t = DirectMessagesTopic::default();
134576        let ser = serde_json::to_string(&t).unwrap();
134577        println!("{}", ser);
134578        let _: DirectMessagesTopic = serde_json::from_str(&ser).unwrap();
134579    }
134580    #[test]
134581    fn rmp_serialize_named_revenue_withdrawal_state_succeeded() {
134582        let t = RevenueWithdrawalStateSucceeded::default();
134583        let ser = rmp_serde::to_vec_named(&t).unwrap();
134584        let _: RevenueWithdrawalStateSucceeded = rmp_serde::from_slice(ser.as_slice()).unwrap();
134585    }
134586    #[test]
134587    fn rmp_serialize_array_revenue_withdrawal_state_succeeded() {
134588        let t = RevenueWithdrawalStateSucceeded::default();
134589        let t = t.noskip();
134590        let ser = rmp_serde::to_vec(&t).unwrap();
134591        let _: RevenueWithdrawalStateSucceeded = rmp_serde::from_slice(ser.as_slice()).unwrap();
134592    }
134593    #[test]
134594    fn json_serialize_revenue_withdrawal_state_succeeded() {
134595        let t = RevenueWithdrawalStateSucceeded::default();
134596        let ser = serde_json::to_string(&t).unwrap();
134597        println!("{}", ser);
134598        let _: RevenueWithdrawalStateSucceeded = serde_json::from_str(&ser).unwrap();
134599    }
134600    #[test]
134601    fn rmp_serialize_named_video_chat_ended() {
134602        let t = VideoChatEnded::default();
134603        let ser = rmp_serde::to_vec_named(&t).unwrap();
134604        let _: VideoChatEnded = rmp_serde::from_slice(ser.as_slice()).unwrap();
134605    }
134606    #[test]
134607    fn rmp_serialize_array_video_chat_ended() {
134608        let t = VideoChatEnded::default();
134609        let t = t.noskip();
134610        let ser = rmp_serde::to_vec(&t).unwrap();
134611        let _: VideoChatEnded = rmp_serde::from_slice(ser.as_slice()).unwrap();
134612    }
134613    #[test]
134614    fn json_serialize_video_chat_ended() {
134615        let t = VideoChatEnded::default();
134616        let ser = serde_json::to_string(&t).unwrap();
134617        println!("{}", ser);
134618        let _: VideoChatEnded = serde_json::from_str(&ser).unwrap();
134619    }
134620    #[test]
134621    fn rmp_serialize_named_chat_member_owner() {
134622        let t = ChatMemberOwner::default();
134623        let ser = rmp_serde::to_vec_named(&t).unwrap();
134624        let _: ChatMemberOwner = rmp_serde::from_slice(ser.as_slice()).unwrap();
134625    }
134626    #[test]
134627    fn rmp_serialize_array_chat_member_owner() {
134628        let t = ChatMemberOwner::default();
134629        let t = t.noskip();
134630        let ser = rmp_serde::to_vec(&t).unwrap();
134631        let _: ChatMemberOwner = rmp_serde::from_slice(ser.as_slice()).unwrap();
134632    }
134633    #[test]
134634    fn json_serialize_chat_member_owner() {
134635        let t = ChatMemberOwner::default();
134636        let ser = serde_json::to_string(&t).unwrap();
134637        println!("{}", ser);
134638        let _: ChatMemberOwner = serde_json::from_str(&ser).unwrap();
134639    }
134640    #[test]
134641    fn rmp_serialize_named_pre_checkout_query() {
134642        let t = PreCheckoutQuery::default();
134643        let ser = rmp_serde::to_vec_named(&t).unwrap();
134644        let _: PreCheckoutQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
134645    }
134646    #[test]
134647    fn rmp_serialize_array_pre_checkout_query() {
134648        let t = PreCheckoutQuery::default();
134649        let t = t.noskip();
134650        let ser = rmp_serde::to_vec(&t).unwrap();
134651        let _: PreCheckoutQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
134652    }
134653    #[test]
134654    fn json_serialize_pre_checkout_query() {
134655        let t = PreCheckoutQuery::default();
134656        let ser = serde_json::to_string(&t).unwrap();
134657        println!("{}", ser);
134658        let _: PreCheckoutQuery = serde_json::from_str(&ser).unwrap();
134659    }
134660    #[test]
134661    fn rmp_serialize_named_inline_query_result_venue() {
134662        let t = InlineQueryResultVenue::default();
134663        let ser = rmp_serde::to_vec_named(&t).unwrap();
134664        let _: InlineQueryResultVenue = rmp_serde::from_slice(ser.as_slice()).unwrap();
134665    }
134666    #[test]
134667    fn rmp_serialize_array_inline_query_result_venue() {
134668        let t = InlineQueryResultVenue::default();
134669        let t = t.noskip();
134670        let ser = rmp_serde::to_vec(&t).unwrap();
134671        let _: InlineQueryResultVenue = rmp_serde::from_slice(ser.as_slice()).unwrap();
134672    }
134673    #[test]
134674    fn json_serialize_inline_query_result_venue() {
134675        let t = InlineQueryResultVenue::default();
134676        let ser = serde_json::to_string(&t).unwrap();
134677        println!("{}", ser);
134678        let _: InlineQueryResultVenue = serde_json::from_str(&ser).unwrap();
134679    }
134680    #[test]
134681    fn rmp_serialize_named_paid_media_info() {
134682        let t = PaidMediaInfo::default();
134683        let ser = rmp_serde::to_vec_named(&t).unwrap();
134684        let _: PaidMediaInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
134685    }
134686    #[test]
134687    fn rmp_serialize_array_paid_media_info() {
134688        let t = PaidMediaInfo::default();
134689        let t = t.noskip();
134690        let ser = rmp_serde::to_vec(&t).unwrap();
134691        let _: PaidMediaInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
134692    }
134693    #[test]
134694    fn json_serialize_paid_media_info() {
134695        let t = PaidMediaInfo::default();
134696        let ser = serde_json::to_string(&t).unwrap();
134697        println!("{}", ser);
134698        let _: PaidMediaInfo = serde_json::from_str(&ser).unwrap();
134699    }
134700    #[test]
134701    fn rmp_serialize_named_inline_query_result_cached_photo() {
134702        let t = InlineQueryResultCachedPhoto::default();
134703        let ser = rmp_serde::to_vec_named(&t).unwrap();
134704        let _: InlineQueryResultCachedPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
134705    }
134706    #[test]
134707    fn rmp_serialize_array_inline_query_result_cached_photo() {
134708        let t = InlineQueryResultCachedPhoto::default();
134709        let t = t.noskip();
134710        let ser = rmp_serde::to_vec(&t).unwrap();
134711        let _: InlineQueryResultCachedPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
134712    }
134713    #[test]
134714    fn json_serialize_inline_query_result_cached_photo() {
134715        let t = InlineQueryResultCachedPhoto::default();
134716        let ser = serde_json::to_string(&t).unwrap();
134717        println!("{}", ser);
134718        let _: InlineQueryResultCachedPhoto = serde_json::from_str(&ser).unwrap();
134719    }
134720    #[test]
134721    fn rmp_serialize_named_giveaway_winners() {
134722        let t = GiveawayWinners::default();
134723        let ser = rmp_serde::to_vec_named(&t).unwrap();
134724        let _: GiveawayWinners = rmp_serde::from_slice(ser.as_slice()).unwrap();
134725    }
134726    #[test]
134727    fn rmp_serialize_array_giveaway_winners() {
134728        let t = GiveawayWinners::default();
134729        let t = t.noskip();
134730        let ser = rmp_serde::to_vec(&t).unwrap();
134731        let _: GiveawayWinners = rmp_serde::from_slice(ser.as_slice()).unwrap();
134732    }
134733    #[test]
134734    fn json_serialize_giveaway_winners() {
134735        let t = GiveawayWinners::default();
134736        let ser = serde_json::to_string(&t).unwrap();
134737        println!("{}", ser);
134738        let _: GiveawayWinners = serde_json::from_str(&ser).unwrap();
134739    }
134740    #[test]
134741    fn rmp_serialize_named_message_origin_hidden_user() {
134742        let t = MessageOriginHiddenUser::default();
134743        let ser = rmp_serde::to_vec_named(&t).unwrap();
134744        let _: MessageOriginHiddenUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
134745    }
134746    #[test]
134747    fn rmp_serialize_array_message_origin_hidden_user() {
134748        let t = MessageOriginHiddenUser::default();
134749        let t = t.noskip();
134750        let ser = rmp_serde::to_vec(&t).unwrap();
134751        let _: MessageOriginHiddenUser = rmp_serde::from_slice(ser.as_slice()).unwrap();
134752    }
134753    #[test]
134754    fn json_serialize_message_origin_hidden_user() {
134755        let t = MessageOriginHiddenUser::default();
134756        let ser = serde_json::to_string(&t).unwrap();
134757        println!("{}", ser);
134758        let _: MessageOriginHiddenUser = serde_json::from_str(&ser).unwrap();
134759    }
134760    #[test]
134761    fn rmp_serialize_named_story_area_type_location() {
134762        let t = StoryAreaTypeLocation::default();
134763        let ser = rmp_serde::to_vec_named(&t).unwrap();
134764        let _: StoryAreaTypeLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
134765    }
134766    #[test]
134767    fn rmp_serialize_array_story_area_type_location() {
134768        let t = StoryAreaTypeLocation::default();
134769        let t = t.noskip();
134770        let ser = rmp_serde::to_vec(&t).unwrap();
134771        let _: StoryAreaTypeLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
134772    }
134773    #[test]
134774    fn json_serialize_story_area_type_location() {
134775        let t = StoryAreaTypeLocation::default();
134776        let ser = serde_json::to_string(&t).unwrap();
134777        println!("{}", ser);
134778        let _: StoryAreaTypeLocation = serde_json::from_str(&ser).unwrap();
134779    }
134780    #[test]
134781    fn rmp_serialize_named_suggested_post_parameters() {
134782        let t = SuggestedPostParameters::default();
134783        let ser = rmp_serde::to_vec_named(&t).unwrap();
134784        let _: SuggestedPostParameters = rmp_serde::from_slice(ser.as_slice()).unwrap();
134785    }
134786    #[test]
134787    fn rmp_serialize_array_suggested_post_parameters() {
134788        let t = SuggestedPostParameters::default();
134789        let t = t.noskip();
134790        let ser = rmp_serde::to_vec(&t).unwrap();
134791        let _: SuggestedPostParameters = rmp_serde::from_slice(ser.as_slice()).unwrap();
134792    }
134793    #[test]
134794    fn json_serialize_suggested_post_parameters() {
134795        let t = SuggestedPostParameters::default();
134796        let ser = serde_json::to_string(&t).unwrap();
134797        println!("{}", ser);
134798        let _: SuggestedPostParameters = serde_json::from_str(&ser).unwrap();
134799    }
134800    #[test]
134801    fn rmp_serialize_named_sticker_set() {
134802        let t = StickerSet::default();
134803        let ser = rmp_serde::to_vec_named(&t).unwrap();
134804        let _: StickerSet = rmp_serde::from_slice(ser.as_slice()).unwrap();
134805    }
134806    #[test]
134807    fn rmp_serialize_array_sticker_set() {
134808        let t = StickerSet::default();
134809        let t = t.noskip();
134810        let ser = rmp_serde::to_vec(&t).unwrap();
134811        let _: StickerSet = rmp_serde::from_slice(ser.as_slice()).unwrap();
134812    }
134813    #[test]
134814    fn json_serialize_sticker_set() {
134815        let t = StickerSet::default();
134816        let ser = serde_json::to_string(&t).unwrap();
134817        println!("{}", ser);
134818        let _: StickerSet = serde_json::from_str(&ser).unwrap();
134819    }
134820    #[test]
134821    fn rmp_serialize_named_poll() {
134822        let t = Poll::default();
134823        let ser = rmp_serde::to_vec_named(&t).unwrap();
134824        let _: Poll = rmp_serde::from_slice(ser.as_slice()).unwrap();
134825    }
134826    #[test]
134827    fn rmp_serialize_array_poll() {
134828        let t = Poll::default();
134829        let t = t.noskip();
134830        let ser = rmp_serde::to_vec(&t).unwrap();
134831        let _: Poll = rmp_serde::from_slice(ser.as_slice()).unwrap();
134832    }
134833    #[test]
134834    fn json_serialize_poll() {
134835        let t = Poll::default();
134836        let ser = serde_json::to_string(&t).unwrap();
134837        println!("{}", ser);
134838        let _: Poll = serde_json::from_str(&ser).unwrap();
134839    }
134840    #[test]
134841    fn rmp_serialize_named_video() {
134842        let t = Video::default();
134843        let ser = rmp_serde::to_vec_named(&t).unwrap();
134844        let _: Video = rmp_serde::from_slice(ser.as_slice()).unwrap();
134845    }
134846    #[test]
134847    fn rmp_serialize_array_video() {
134848        let t = Video::default();
134849        let t = t.noskip();
134850        let ser = rmp_serde::to_vec(&t).unwrap();
134851        let _: Video = rmp_serde::from_slice(ser.as_slice()).unwrap();
134852    }
134853    #[test]
134854    fn json_serialize_video() {
134855        let t = Video::default();
134856        let ser = serde_json::to_string(&t).unwrap();
134857        println!("{}", ser);
134858        let _: Video = serde_json::from_str(&ser).unwrap();
134859    }
134860    #[test]
134861    fn rmp_serialize_named_chat_administrator_rights() {
134862        let t = ChatAdministratorRights::default();
134863        let ser = rmp_serde::to_vec_named(&t).unwrap();
134864        let _: ChatAdministratorRights = rmp_serde::from_slice(ser.as_slice()).unwrap();
134865    }
134866    #[test]
134867    fn rmp_serialize_array_chat_administrator_rights() {
134868        let t = ChatAdministratorRights::default();
134869        let t = t.noskip();
134870        let ser = rmp_serde::to_vec(&t).unwrap();
134871        let _: ChatAdministratorRights = rmp_serde::from_slice(ser.as_slice()).unwrap();
134872    }
134873    #[test]
134874    fn json_serialize_chat_administrator_rights() {
134875        let t = ChatAdministratorRights::default();
134876        let ser = serde_json::to_string(&t).unwrap();
134877        println!("{}", ser);
134878        let _: ChatAdministratorRights = serde_json::from_str(&ser).unwrap();
134879    }
134880    #[test]
134881    fn rmp_serialize_named_response_parameters() {
134882        let t = ResponseParameters::default();
134883        let ser = rmp_serde::to_vec_named(&t).unwrap();
134884        let _: ResponseParameters = rmp_serde::from_slice(ser.as_slice()).unwrap();
134885    }
134886    #[test]
134887    fn rmp_serialize_array_response_parameters() {
134888        let t = ResponseParameters::default();
134889        let t = t.noskip();
134890        let ser = rmp_serde::to_vec(&t).unwrap();
134891        let _: ResponseParameters = rmp_serde::from_slice(ser.as_slice()).unwrap();
134892    }
134893    #[test]
134894    fn json_serialize_response_parameters() {
134895        let t = ResponseParameters::default();
134896        let ser = serde_json::to_string(&t).unwrap();
134897        println!("{}", ser);
134898        let _: ResponseParameters = serde_json::from_str(&ser).unwrap();
134899    }
134900    #[test]
134901    fn rmp_serialize_named_video_note() {
134902        let t = VideoNote::default();
134903        let ser = rmp_serde::to_vec_named(&t).unwrap();
134904        let _: VideoNote = rmp_serde::from_slice(ser.as_slice()).unwrap();
134905    }
134906    #[test]
134907    fn rmp_serialize_array_video_note() {
134908        let t = VideoNote::default();
134909        let t = t.noskip();
134910        let ser = rmp_serde::to_vec(&t).unwrap();
134911        let _: VideoNote = rmp_serde::from_slice(ser.as_slice()).unwrap();
134912    }
134913    #[test]
134914    fn json_serialize_video_note() {
134915        let t = VideoNote::default();
134916        let ser = serde_json::to_string(&t).unwrap();
134917        println!("{}", ser);
134918        let _: VideoNote = serde_json::from_str(&ser).unwrap();
134919    }
134920    #[test]
134921    fn rmp_serialize_named_reply_keyboard_remove() {
134922        let t = ReplyKeyboardRemove::default();
134923        let ser = rmp_serde::to_vec_named(&t).unwrap();
134924        let _: ReplyKeyboardRemove = rmp_serde::from_slice(ser.as_slice()).unwrap();
134925    }
134926    #[test]
134927    fn rmp_serialize_array_reply_keyboard_remove() {
134928        let t = ReplyKeyboardRemove::default();
134929        let t = t.noskip();
134930        let ser = rmp_serde::to_vec(&t).unwrap();
134931        let _: ReplyKeyboardRemove = rmp_serde::from_slice(ser.as_slice()).unwrap();
134932    }
134933    #[test]
134934    fn json_serialize_reply_keyboard_remove() {
134935        let t = ReplyKeyboardRemove::default();
134936        let ser = serde_json::to_string(&t).unwrap();
134937        println!("{}", ser);
134938        let _: ReplyKeyboardRemove = serde_json::from_str(&ser).unwrap();
134939    }
134940    #[test]
134941    fn rmp_serialize_named_labeled_price() {
134942        let t = LabeledPrice::default();
134943        let ser = rmp_serde::to_vec_named(&t).unwrap();
134944        let _: LabeledPrice = rmp_serde::from_slice(ser.as_slice()).unwrap();
134945    }
134946    #[test]
134947    fn rmp_serialize_array_labeled_price() {
134948        let t = LabeledPrice::default();
134949        let t = t.noskip();
134950        let ser = rmp_serde::to_vec(&t).unwrap();
134951        let _: LabeledPrice = rmp_serde::from_slice(ser.as_slice()).unwrap();
134952    }
134953    #[test]
134954    fn json_serialize_labeled_price() {
134955        let t = LabeledPrice::default();
134956        let ser = serde_json::to_string(&t).unwrap();
134957        println!("{}", ser);
134958        let _: LabeledPrice = serde_json::from_str(&ser).unwrap();
134959    }
134960    #[test]
134961    fn rmp_serialize_named_input_poll_option() {
134962        let t = InputPollOption::default();
134963        let ser = rmp_serde::to_vec_named(&t).unwrap();
134964        let _: InputPollOption = rmp_serde::from_slice(ser.as_slice()).unwrap();
134965    }
134966    #[test]
134967    fn rmp_serialize_array_input_poll_option() {
134968        let t = InputPollOption::default();
134969        let t = t.noskip();
134970        let ser = rmp_serde::to_vec(&t).unwrap();
134971        let _: InputPollOption = rmp_serde::from_slice(ser.as_slice()).unwrap();
134972    }
134973    #[test]
134974    fn json_serialize_input_poll_option() {
134975        let t = InputPollOption::default();
134976        let ser = serde_json::to_string(&t).unwrap();
134977        println!("{}", ser);
134978        let _: InputPollOption = serde_json::from_str(&ser).unwrap();
134979    }
134980    #[test]
134981    fn rmp_serialize_named_chat_boost_source_premium() {
134982        let t = ChatBoostSourcePremium::default();
134983        let ser = rmp_serde::to_vec_named(&t).unwrap();
134984        let _: ChatBoostSourcePremium = rmp_serde::from_slice(ser.as_slice()).unwrap();
134985    }
134986    #[test]
134987    fn rmp_serialize_array_chat_boost_source_premium() {
134988        let t = ChatBoostSourcePremium::default();
134989        let t = t.noskip();
134990        let ser = rmp_serde::to_vec(&t).unwrap();
134991        let _: ChatBoostSourcePremium = rmp_serde::from_slice(ser.as_slice()).unwrap();
134992    }
134993    #[test]
134994    fn json_serialize_chat_boost_source_premium() {
134995        let t = ChatBoostSourcePremium::default();
134996        let ser = serde_json::to_string(&t).unwrap();
134997        println!("{}", ser);
134998        let _: ChatBoostSourcePremium = serde_json::from_str(&ser).unwrap();
134999    }
135000    #[test]
135001    fn rmp_serialize_named_input_media_video() {
135002        let t = InputMediaVideo::default();
135003        let ser = rmp_serde::to_vec_named(&t).unwrap();
135004        let _: InputMediaVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
135005    }
135006    #[test]
135007    fn rmp_serialize_array_input_media_video() {
135008        let t = InputMediaVideo::default();
135009        let t = t.noskip();
135010        let ser = rmp_serde::to_vec(&t).unwrap();
135011        let _: InputMediaVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
135012    }
135013    #[test]
135014    fn json_serialize_input_media_video() {
135015        let t = InputMediaVideo::default();
135016        let ser = serde_json::to_string(&t).unwrap();
135017        println!("{}", ser);
135018        let _: InputMediaVideo = serde_json::from_str(&ser).unwrap();
135019    }
135020    #[test]
135021    fn rmp_serialize_named_input_media_audio() {
135022        let t = InputMediaAudio::default();
135023        let ser = rmp_serde::to_vec_named(&t).unwrap();
135024        let _: InputMediaAudio = rmp_serde::from_slice(ser.as_slice()).unwrap();
135025    }
135026    #[test]
135027    fn rmp_serialize_array_input_media_audio() {
135028        let t = InputMediaAudio::default();
135029        let t = t.noskip();
135030        let ser = rmp_serde::to_vec(&t).unwrap();
135031        let _: InputMediaAudio = rmp_serde::from_slice(ser.as_slice()).unwrap();
135032    }
135033    #[test]
135034    fn json_serialize_input_media_audio() {
135035        let t = InputMediaAudio::default();
135036        let ser = serde_json::to_string(&t).unwrap();
135037        println!("{}", ser);
135038        let _: InputMediaAudio = serde_json::from_str(&ser).unwrap();
135039    }
135040    #[test]
135041    fn rmp_serialize_named_owned_gifts() {
135042        let t = OwnedGifts::default();
135043        let ser = rmp_serde::to_vec_named(&t).unwrap();
135044        let _: OwnedGifts = rmp_serde::from_slice(ser.as_slice()).unwrap();
135045    }
135046    #[test]
135047    fn rmp_serialize_array_owned_gifts() {
135048        let t = OwnedGifts::default();
135049        let t = t.noskip();
135050        let ser = rmp_serde::to_vec(&t).unwrap();
135051        let _: OwnedGifts = rmp_serde::from_slice(ser.as_slice()).unwrap();
135052    }
135053    #[test]
135054    fn json_serialize_owned_gifts() {
135055        let t = OwnedGifts::default();
135056        let ser = serde_json::to_string(&t).unwrap();
135057        println!("{}", ser);
135058        let _: OwnedGifts = serde_json::from_str(&ser).unwrap();
135059    }
135060    #[test]
135061    fn rmp_serialize_named_encrypted_passport_element() {
135062        let t = EncryptedPassportElement::default();
135063        let ser = rmp_serde::to_vec_named(&t).unwrap();
135064        let _: EncryptedPassportElement = rmp_serde::from_slice(ser.as_slice()).unwrap();
135065    }
135066    #[test]
135067    fn rmp_serialize_array_encrypted_passport_element() {
135068        let t = EncryptedPassportElement::default();
135069        let t = t.noskip();
135070        let ser = rmp_serde::to_vec(&t).unwrap();
135071        let _: EncryptedPassportElement = rmp_serde::from_slice(ser.as_slice()).unwrap();
135072    }
135073    #[test]
135074    fn json_serialize_encrypted_passport_element() {
135075        let t = EncryptedPassportElement::default();
135076        let ser = serde_json::to_string(&t).unwrap();
135077        println!("{}", ser);
135078        let _: EncryptedPassportElement = serde_json::from_str(&ser).unwrap();
135079    }
135080    #[test]
135081    fn rmp_serialize_named_invoice() {
135082        let t = Invoice::default();
135083        let ser = rmp_serde::to_vec_named(&t).unwrap();
135084        let _: Invoice = rmp_serde::from_slice(ser.as_slice()).unwrap();
135085    }
135086    #[test]
135087    fn rmp_serialize_array_invoice() {
135088        let t = Invoice::default();
135089        let t = t.noskip();
135090        let ser = rmp_serde::to_vec(&t).unwrap();
135091        let _: Invoice = rmp_serde::from_slice(ser.as_slice()).unwrap();
135092    }
135093    #[test]
135094    fn json_serialize_invoice() {
135095        let t = Invoice::default();
135096        let ser = serde_json::to_string(&t).unwrap();
135097        println!("{}", ser);
135098        let _: Invoice = serde_json::from_str(&ser).unwrap();
135099    }
135100    #[test]
135101    fn rmp_serialize_named_bot_short_description() {
135102        let t = BotShortDescription::default();
135103        let ser = rmp_serde::to_vec_named(&t).unwrap();
135104        let _: BotShortDescription = rmp_serde::from_slice(ser.as_slice()).unwrap();
135105    }
135106    #[test]
135107    fn rmp_serialize_array_bot_short_description() {
135108        let t = BotShortDescription::default();
135109        let t = t.noskip();
135110        let ser = rmp_serde::to_vec(&t).unwrap();
135111        let _: BotShortDescription = rmp_serde::from_slice(ser.as_slice()).unwrap();
135112    }
135113    #[test]
135114    fn json_serialize_bot_short_description() {
135115        let t = BotShortDescription::default();
135116        let ser = serde_json::to_string(&t).unwrap();
135117        println!("{}", ser);
135118        let _: BotShortDescription = serde_json::from_str(&ser).unwrap();
135119    }
135120    #[test]
135121    fn rmp_serialize_named_chat_full_info() {
135122        let t = ChatFullInfo::default();
135123        let ser = rmp_serde::to_vec_named(&t).unwrap();
135124        let _: ChatFullInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
135125    }
135126    #[test]
135127    fn rmp_serialize_array_chat_full_info() {
135128        let t = ChatFullInfo::default();
135129        let t = t.noskip();
135130        let ser = rmp_serde::to_vec(&t).unwrap();
135131        let _: ChatFullInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
135132    }
135133    #[test]
135134    fn json_serialize_chat_full_info() {
135135        let t = ChatFullInfo::default();
135136        let ser = serde_json::to_string(&t).unwrap();
135137        println!("{}", ser);
135138        let _: ChatFullInfo = serde_json::from_str(&ser).unwrap();
135139    }
135140    #[test]
135141    fn rmp_serialize_named_poll_answer() {
135142        let t = PollAnswer::default();
135143        let ser = rmp_serde::to_vec_named(&t).unwrap();
135144        let _: PollAnswer = rmp_serde::from_slice(ser.as_slice()).unwrap();
135145    }
135146    #[test]
135147    fn rmp_serialize_array_poll_answer() {
135148        let t = PollAnswer::default();
135149        let t = t.noskip();
135150        let ser = rmp_serde::to_vec(&t).unwrap();
135151        let _: PollAnswer = rmp_serde::from_slice(ser.as_slice()).unwrap();
135152    }
135153    #[test]
135154    fn json_serialize_poll_answer() {
135155        let t = PollAnswer::default();
135156        let ser = serde_json::to_string(&t).unwrap();
135157        println!("{}", ser);
135158        let _: PollAnswer = serde_json::from_str(&ser).unwrap();
135159    }
135160    #[test]
135161    fn rmp_serialize_named_webhook_info() {
135162        let t = WebhookInfo::default();
135163        let ser = rmp_serde::to_vec_named(&t).unwrap();
135164        let _: WebhookInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
135165    }
135166    #[test]
135167    fn rmp_serialize_array_webhook_info() {
135168        let t = WebhookInfo::default();
135169        let t = t.noskip();
135170        let ser = rmp_serde::to_vec(&t).unwrap();
135171        let _: WebhookInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
135172    }
135173    #[test]
135174    fn json_serialize_webhook_info() {
135175        let t = WebhookInfo::default();
135176        let ser = serde_json::to_string(&t).unwrap();
135177        println!("{}", ser);
135178        let _: WebhookInfo = serde_json::from_str(&ser).unwrap();
135179    }
135180    #[test]
135181    fn rmp_serialize_named_business_messages_deleted() {
135182        let t = BusinessMessagesDeleted::default();
135183        let ser = rmp_serde::to_vec_named(&t).unwrap();
135184        let _: BusinessMessagesDeleted = rmp_serde::from_slice(ser.as_slice()).unwrap();
135185    }
135186    #[test]
135187    fn rmp_serialize_array_business_messages_deleted() {
135188        let t = BusinessMessagesDeleted::default();
135189        let t = t.noskip();
135190        let ser = rmp_serde::to_vec(&t).unwrap();
135191        let _: BusinessMessagesDeleted = rmp_serde::from_slice(ser.as_slice()).unwrap();
135192    }
135193    #[test]
135194    fn json_serialize_business_messages_deleted() {
135195        let t = BusinessMessagesDeleted::default();
135196        let ser = serde_json::to_string(&t).unwrap();
135197        println!("{}", ser);
135198        let _: BusinessMessagesDeleted = serde_json::from_str(&ser).unwrap();
135199    }
135200    #[test]
135201    fn rmp_serialize_named_bot_command_scope_default() {
135202        let t = BotCommandScopeDefault::default();
135203        let ser = rmp_serde::to_vec_named(&t).unwrap();
135204        let _: BotCommandScopeDefault = rmp_serde::from_slice(ser.as_slice()).unwrap();
135205    }
135206    #[test]
135207    fn rmp_serialize_array_bot_command_scope_default() {
135208        let t = BotCommandScopeDefault::default();
135209        let t = t.noskip();
135210        let ser = rmp_serde::to_vec(&t).unwrap();
135211        let _: BotCommandScopeDefault = rmp_serde::from_slice(ser.as_slice()).unwrap();
135212    }
135213    #[test]
135214    fn json_serialize_bot_command_scope_default() {
135215        let t = BotCommandScopeDefault::default();
135216        let ser = serde_json::to_string(&t).unwrap();
135217        println!("{}", ser);
135218        let _: BotCommandScopeDefault = serde_json::from_str(&ser).unwrap();
135219    }
135220    #[test]
135221    fn rmp_serialize_named_chat_invite_link() {
135222        let t = ChatInviteLink::default();
135223        let ser = rmp_serde::to_vec_named(&t).unwrap();
135224        let _: ChatInviteLink = rmp_serde::from_slice(ser.as_slice()).unwrap();
135225    }
135226    #[test]
135227    fn rmp_serialize_array_chat_invite_link() {
135228        let t = ChatInviteLink::default();
135229        let t = t.noskip();
135230        let ser = rmp_serde::to_vec(&t).unwrap();
135231        let _: ChatInviteLink = rmp_serde::from_slice(ser.as_slice()).unwrap();
135232    }
135233    #[test]
135234    fn json_serialize_chat_invite_link() {
135235        let t = ChatInviteLink::default();
135236        let ser = serde_json::to_string(&t).unwrap();
135237        println!("{}", ser);
135238        let _: ChatInviteLink = serde_json::from_str(&ser).unwrap();
135239    }
135240    #[test]
135241    fn rmp_serialize_named_inline_query_result_cached_voice() {
135242        let t = InlineQueryResultCachedVoice::default();
135243        let ser = rmp_serde::to_vec_named(&t).unwrap();
135244        let _: InlineQueryResultCachedVoice = rmp_serde::from_slice(ser.as_slice()).unwrap();
135245    }
135246    #[test]
135247    fn rmp_serialize_array_inline_query_result_cached_voice() {
135248        let t = InlineQueryResultCachedVoice::default();
135249        let t = t.noskip();
135250        let ser = rmp_serde::to_vec(&t).unwrap();
135251        let _: InlineQueryResultCachedVoice = rmp_serde::from_slice(ser.as_slice()).unwrap();
135252    }
135253    #[test]
135254    fn json_serialize_inline_query_result_cached_voice() {
135255        let t = InlineQueryResultCachedVoice::default();
135256        let ser = serde_json::to_string(&t).unwrap();
135257        println!("{}", ser);
135258        let _: InlineQueryResultCachedVoice = serde_json::from_str(&ser).unwrap();
135259    }
135260    #[test]
135261    fn rmp_serialize_named_passport_element_error_translation_files() {
135262        let t = PassportElementErrorTranslationFiles::default();
135263        let ser = rmp_serde::to_vec_named(&t).unwrap();
135264        let _: PassportElementErrorTranslationFiles =
135265            rmp_serde::from_slice(ser.as_slice()).unwrap();
135266    }
135267    #[test]
135268    fn rmp_serialize_array_passport_element_error_translation_files() {
135269        let t = PassportElementErrorTranslationFiles::default();
135270        let t = t.noskip();
135271        let ser = rmp_serde::to_vec(&t).unwrap();
135272        let _: PassportElementErrorTranslationFiles =
135273            rmp_serde::from_slice(ser.as_slice()).unwrap();
135274    }
135275    #[test]
135276    fn json_serialize_passport_element_error_translation_files() {
135277        let t = PassportElementErrorTranslationFiles::default();
135278        let ser = serde_json::to_string(&t).unwrap();
135279        println!("{}", ser);
135280        let _: PassportElementErrorTranslationFiles = serde_json::from_str(&ser).unwrap();
135281    }
135282    #[test]
135283    fn rmp_serialize_named_animation() {
135284        let t = Animation::default();
135285        let ser = rmp_serde::to_vec_named(&t).unwrap();
135286        let _: Animation = rmp_serde::from_slice(ser.as_slice()).unwrap();
135287    }
135288    #[test]
135289    fn rmp_serialize_array_animation() {
135290        let t = Animation::default();
135291        let t = t.noskip();
135292        let ser = rmp_serde::to_vec(&t).unwrap();
135293        let _: Animation = rmp_serde::from_slice(ser.as_slice()).unwrap();
135294    }
135295    #[test]
135296    fn json_serialize_animation() {
135297        let t = Animation::default();
135298        let ser = serde_json::to_string(&t).unwrap();
135299        println!("{}", ser);
135300        let _: Animation = serde_json::from_str(&ser).unwrap();
135301    }
135302    #[test]
135303    fn rmp_serialize_named_audio() {
135304        let t = Audio::default();
135305        let ser = rmp_serde::to_vec_named(&t).unwrap();
135306        let _: Audio = rmp_serde::from_slice(ser.as_slice()).unwrap();
135307    }
135308    #[test]
135309    fn rmp_serialize_array_audio() {
135310        let t = Audio::default();
135311        let t = t.noskip();
135312        let ser = rmp_serde::to_vec(&t).unwrap();
135313        let _: Audio = rmp_serde::from_slice(ser.as_slice()).unwrap();
135314    }
135315    #[test]
135316    fn json_serialize_audio() {
135317        let t = Audio::default();
135318        let ser = serde_json::to_string(&t).unwrap();
135319        println!("{}", ser);
135320        let _: Audio = serde_json::from_str(&ser).unwrap();
135321    }
135322    #[test]
135323    fn rmp_serialize_named_refunded_payment() {
135324        let t = RefundedPayment::default();
135325        let ser = rmp_serde::to_vec_named(&t).unwrap();
135326        let _: RefundedPayment = rmp_serde::from_slice(ser.as_slice()).unwrap();
135327    }
135328    #[test]
135329    fn rmp_serialize_array_refunded_payment() {
135330        let t = RefundedPayment::default();
135331        let t = t.noskip();
135332        let ser = rmp_serde::to_vec(&t).unwrap();
135333        let _: RefundedPayment = rmp_serde::from_slice(ser.as_slice()).unwrap();
135334    }
135335    #[test]
135336    fn json_serialize_refunded_payment() {
135337        let t = RefundedPayment::default();
135338        let ser = serde_json::to_string(&t).unwrap();
135339        println!("{}", ser);
135340        let _: RefundedPayment = serde_json::from_str(&ser).unwrap();
135341    }
135342    #[test]
135343    fn rmp_serialize_named_input_media_animation() {
135344        let t = InputMediaAnimation::default();
135345        let ser = rmp_serde::to_vec_named(&t).unwrap();
135346        let _: InputMediaAnimation = rmp_serde::from_slice(ser.as_slice()).unwrap();
135347    }
135348    #[test]
135349    fn rmp_serialize_array_input_media_animation() {
135350        let t = InputMediaAnimation::default();
135351        let t = t.noskip();
135352        let ser = rmp_serde::to_vec(&t).unwrap();
135353        let _: InputMediaAnimation = rmp_serde::from_slice(ser.as_slice()).unwrap();
135354    }
135355    #[test]
135356    fn json_serialize_input_media_animation() {
135357        let t = InputMediaAnimation::default();
135358        let ser = serde_json::to_string(&t).unwrap();
135359        println!("{}", ser);
135360        let _: InputMediaAnimation = serde_json::from_str(&ser).unwrap();
135361    }
135362    #[test]
135363    fn rmp_serialize_named_game() {
135364        let t = Game::default();
135365        let ser = rmp_serde::to_vec_named(&t).unwrap();
135366        let _: Game = rmp_serde::from_slice(ser.as_slice()).unwrap();
135367    }
135368    #[test]
135369    fn rmp_serialize_array_game() {
135370        let t = Game::default();
135371        let t = t.noskip();
135372        let ser = rmp_serde::to_vec(&t).unwrap();
135373        let _: Game = rmp_serde::from_slice(ser.as_slice()).unwrap();
135374    }
135375    #[test]
135376    fn json_serialize_game() {
135377        let t = Game::default();
135378        let ser = serde_json::to_string(&t).unwrap();
135379        println!("{}", ser);
135380        let _: Game = serde_json::from_str(&ser).unwrap();
135381    }
135382    #[test]
135383    fn rmp_serialize_named_chat_member_member() {
135384        let t = ChatMemberMember::default();
135385        let ser = rmp_serde::to_vec_named(&t).unwrap();
135386        let _: ChatMemberMember = rmp_serde::from_slice(ser.as_slice()).unwrap();
135387    }
135388    #[test]
135389    fn rmp_serialize_array_chat_member_member() {
135390        let t = ChatMemberMember::default();
135391        let t = t.noskip();
135392        let ser = rmp_serde::to_vec(&t).unwrap();
135393        let _: ChatMemberMember = rmp_serde::from_slice(ser.as_slice()).unwrap();
135394    }
135395    #[test]
135396    fn json_serialize_chat_member_member() {
135397        let t = ChatMemberMember::default();
135398        let ser = serde_json::to_string(&t).unwrap();
135399        println!("{}", ser);
135400        let _: ChatMemberMember = serde_json::from_str(&ser).unwrap();
135401    }
135402    #[test]
135403    fn rmp_serialize_named_chat_permissions() {
135404        let t = ChatPermissions::default();
135405        let ser = rmp_serde::to_vec_named(&t).unwrap();
135406        let _: ChatPermissions = rmp_serde::from_slice(ser.as_slice()).unwrap();
135407    }
135408    #[test]
135409    fn rmp_serialize_array_chat_permissions() {
135410        let t = ChatPermissions::default();
135411        let t = t.noskip();
135412        let ser = rmp_serde::to_vec(&t).unwrap();
135413        let _: ChatPermissions = rmp_serde::from_slice(ser.as_slice()).unwrap();
135414    }
135415    #[test]
135416    fn json_serialize_chat_permissions() {
135417        let t = ChatPermissions::default();
135418        let ser = serde_json::to_string(&t).unwrap();
135419        println!("{}", ser);
135420        let _: ChatPermissions = serde_json::from_str(&ser).unwrap();
135421    }
135422    #[test]
135423    fn rmp_serialize_named_star_transactions() {
135424        let t = StarTransactions::default();
135425        let ser = rmp_serde::to_vec_named(&t).unwrap();
135426        let _: StarTransactions = rmp_serde::from_slice(ser.as_slice()).unwrap();
135427    }
135428    #[test]
135429    fn rmp_serialize_array_star_transactions() {
135430        let t = StarTransactions::default();
135431        let t = t.noskip();
135432        let ser = rmp_serde::to_vec(&t).unwrap();
135433        let _: StarTransactions = rmp_serde::from_slice(ser.as_slice()).unwrap();
135434    }
135435    #[test]
135436    fn json_serialize_star_transactions() {
135437        let t = StarTransactions::default();
135438        let ser = serde_json::to_string(&t).unwrap();
135439        println!("{}", ser);
135440        let _: StarTransactions = serde_json::from_str(&ser).unwrap();
135441    }
135442    #[test]
135443    fn rmp_serialize_named_encrypted_credentials() {
135444        let t = EncryptedCredentials::default();
135445        let ser = rmp_serde::to_vec_named(&t).unwrap();
135446        let _: EncryptedCredentials = rmp_serde::from_slice(ser.as_slice()).unwrap();
135447    }
135448    #[test]
135449    fn rmp_serialize_array_encrypted_credentials() {
135450        let t = EncryptedCredentials::default();
135451        let t = t.noskip();
135452        let ser = rmp_serde::to_vec(&t).unwrap();
135453        let _: EncryptedCredentials = rmp_serde::from_slice(ser.as_slice()).unwrap();
135454    }
135455    #[test]
135456    fn json_serialize_encrypted_credentials() {
135457        let t = EncryptedCredentials::default();
135458        let ser = serde_json::to_string(&t).unwrap();
135459        println!("{}", ser);
135460        let _: EncryptedCredentials = serde_json::from_str(&ser).unwrap();
135461    }
135462    #[test]
135463    fn rmp_serialize_named_story_area_type_suggested_reaction() {
135464        let t = StoryAreaTypeSuggestedReaction::default();
135465        let ser = rmp_serde::to_vec_named(&t).unwrap();
135466        let _: StoryAreaTypeSuggestedReaction = rmp_serde::from_slice(ser.as_slice()).unwrap();
135467    }
135468    #[test]
135469    fn rmp_serialize_array_story_area_type_suggested_reaction() {
135470        let t = StoryAreaTypeSuggestedReaction::default();
135471        let t = t.noskip();
135472        let ser = rmp_serde::to_vec(&t).unwrap();
135473        let _: StoryAreaTypeSuggestedReaction = rmp_serde::from_slice(ser.as_slice()).unwrap();
135474    }
135475    #[test]
135476    fn json_serialize_story_area_type_suggested_reaction() {
135477        let t = StoryAreaTypeSuggestedReaction::default();
135478        let ser = serde_json::to_string(&t).unwrap();
135479        println!("{}", ser);
135480        let _: StoryAreaTypeSuggestedReaction = serde_json::from_str(&ser).unwrap();
135481    }
135482    #[test]
135483    fn rmp_serialize_named_checklist_tasks_added() {
135484        let t = ChecklistTasksAdded::default();
135485        let ser = rmp_serde::to_vec_named(&t).unwrap();
135486        let _: ChecklistTasksAdded = rmp_serde::from_slice(ser.as_slice()).unwrap();
135487    }
135488    #[test]
135489    fn rmp_serialize_array_checklist_tasks_added() {
135490        let t = ChecklistTasksAdded::default();
135491        let t = t.noskip();
135492        let ser = rmp_serde::to_vec(&t).unwrap();
135493        let _: ChecklistTasksAdded = rmp_serde::from_slice(ser.as_slice()).unwrap();
135494    }
135495    #[test]
135496    fn json_serialize_checklist_tasks_added() {
135497        let t = ChecklistTasksAdded::default();
135498        let ser = serde_json::to_string(&t).unwrap();
135499        println!("{}", ser);
135500        let _: ChecklistTasksAdded = serde_json::from_str(&ser).unwrap();
135501    }
135502    #[test]
135503    fn rmp_serialize_named_background_fill_gradient() {
135504        let t = BackgroundFillGradient::default();
135505        let ser = rmp_serde::to_vec_named(&t).unwrap();
135506        let _: BackgroundFillGradient = rmp_serde::from_slice(ser.as_slice()).unwrap();
135507    }
135508    #[test]
135509    fn rmp_serialize_array_background_fill_gradient() {
135510        let t = BackgroundFillGradient::default();
135511        let t = t.noskip();
135512        let ser = rmp_serde::to_vec(&t).unwrap();
135513        let _: BackgroundFillGradient = rmp_serde::from_slice(ser.as_slice()).unwrap();
135514    }
135515    #[test]
135516    fn json_serialize_background_fill_gradient() {
135517        let t = BackgroundFillGradient::default();
135518        let ser = serde_json::to_string(&t).unwrap();
135519        println!("{}", ser);
135520        let _: BackgroundFillGradient = serde_json::from_str(&ser).unwrap();
135521    }
135522    #[test]
135523    fn rmp_serialize_named_suggested_post_refunded() {
135524        let t = SuggestedPostRefunded::default();
135525        let ser = rmp_serde::to_vec_named(&t).unwrap();
135526        let _: SuggestedPostRefunded = rmp_serde::from_slice(ser.as_slice()).unwrap();
135527    }
135528    #[test]
135529    fn rmp_serialize_array_suggested_post_refunded() {
135530        let t = SuggestedPostRefunded::default();
135531        let t = t.noskip();
135532        let ser = rmp_serde::to_vec(&t).unwrap();
135533        let _: SuggestedPostRefunded = rmp_serde::from_slice(ser.as_slice()).unwrap();
135534    }
135535    #[test]
135536    fn json_serialize_suggested_post_refunded() {
135537        let t = SuggestedPostRefunded::default();
135538        let ser = serde_json::to_string(&t).unwrap();
135539        println!("{}", ser);
135540        let _: SuggestedPostRefunded = serde_json::from_str(&ser).unwrap();
135541    }
135542    #[test]
135543    fn rmp_serialize_named_callback_query() {
135544        let t = CallbackQuery::default();
135545        let ser = rmp_serde::to_vec_named(&t).unwrap();
135546        let _: CallbackQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
135547    }
135548    #[test]
135549    fn rmp_serialize_array_callback_query() {
135550        let t = CallbackQuery::default();
135551        let t = t.noskip();
135552        let ser = rmp_serde::to_vec(&t).unwrap();
135553        let _: CallbackQuery = rmp_serde::from_slice(ser.as_slice()).unwrap();
135554    }
135555    #[test]
135556    fn json_serialize_callback_query() {
135557        let t = CallbackQuery::default();
135558        let ser = serde_json::to_string(&t).unwrap();
135559        println!("{}", ser);
135560        let _: CallbackQuery = serde_json::from_str(&ser).unwrap();
135561    }
135562    #[test]
135563    fn rmp_serialize_named_passport_element_error_files() {
135564        let t = PassportElementErrorFiles::default();
135565        let ser = rmp_serde::to_vec_named(&t).unwrap();
135566        let _: PassportElementErrorFiles = rmp_serde::from_slice(ser.as_slice()).unwrap();
135567    }
135568    #[test]
135569    fn rmp_serialize_array_passport_element_error_files() {
135570        let t = PassportElementErrorFiles::default();
135571        let t = t.noskip();
135572        let ser = rmp_serde::to_vec(&t).unwrap();
135573        let _: PassportElementErrorFiles = rmp_serde::from_slice(ser.as_slice()).unwrap();
135574    }
135575    #[test]
135576    fn json_serialize_passport_element_error_files() {
135577        let t = PassportElementErrorFiles::default();
135578        let ser = serde_json::to_string(&t).unwrap();
135579        println!("{}", ser);
135580        let _: PassportElementErrorFiles = serde_json::from_str(&ser).unwrap();
135581    }
135582    #[test]
135583    fn rmp_serialize_named_menu_button_default() {
135584        let t = MenuButtonDefault::default();
135585        let ser = rmp_serde::to_vec_named(&t).unwrap();
135586        let _: MenuButtonDefault = rmp_serde::from_slice(ser.as_slice()).unwrap();
135587    }
135588    #[test]
135589    fn rmp_serialize_array_menu_button_default() {
135590        let t = MenuButtonDefault::default();
135591        let t = t.noskip();
135592        let ser = rmp_serde::to_vec(&t).unwrap();
135593        let _: MenuButtonDefault = rmp_serde::from_slice(ser.as_slice()).unwrap();
135594    }
135595    #[test]
135596    fn json_serialize_menu_button_default() {
135597        let t = MenuButtonDefault::default();
135598        let ser = serde_json::to_string(&t).unwrap();
135599        println!("{}", ser);
135600        let _: MenuButtonDefault = serde_json::from_str(&ser).unwrap();
135601    }
135602    #[test]
135603    fn rmp_serialize_named_forum_topic_edited() {
135604        let t = ForumTopicEdited::default();
135605        let ser = rmp_serde::to_vec_named(&t).unwrap();
135606        let _: ForumTopicEdited = rmp_serde::from_slice(ser.as_slice()).unwrap();
135607    }
135608    #[test]
135609    fn rmp_serialize_array_forum_topic_edited() {
135610        let t = ForumTopicEdited::default();
135611        let t = t.noskip();
135612        let ser = rmp_serde::to_vec(&t).unwrap();
135613        let _: ForumTopicEdited = rmp_serde::from_slice(ser.as_slice()).unwrap();
135614    }
135615    #[test]
135616    fn json_serialize_forum_topic_edited() {
135617        let t = ForumTopicEdited::default();
135618        let ser = serde_json::to_string(&t).unwrap();
135619        println!("{}", ser);
135620        let _: ForumTopicEdited = serde_json::from_str(&ser).unwrap();
135621    }
135622    #[test]
135623    fn rmp_serialize_named_giveaway_completed() {
135624        let t = GiveawayCompleted::default();
135625        let ser = rmp_serde::to_vec_named(&t).unwrap();
135626        let _: GiveawayCompleted = rmp_serde::from_slice(ser.as_slice()).unwrap();
135627    }
135628    #[test]
135629    fn rmp_serialize_array_giveaway_completed() {
135630        let t = GiveawayCompleted::default();
135631        let t = t.noskip();
135632        let ser = rmp_serde::to_vec(&t).unwrap();
135633        let _: GiveawayCompleted = rmp_serde::from_slice(ser.as_slice()).unwrap();
135634    }
135635    #[test]
135636    fn json_serialize_giveaway_completed() {
135637        let t = GiveawayCompleted::default();
135638        let ser = serde_json::to_string(&t).unwrap();
135639        println!("{}", ser);
135640        let _: GiveawayCompleted = serde_json::from_str(&ser).unwrap();
135641    }
135642    #[test]
135643    fn rmp_serialize_named_reply_keyboard_markup() {
135644        let t = ReplyKeyboardMarkup::default();
135645        let ser = rmp_serde::to_vec_named(&t).unwrap();
135646        let _: ReplyKeyboardMarkup = rmp_serde::from_slice(ser.as_slice()).unwrap();
135647    }
135648    #[test]
135649    fn rmp_serialize_array_reply_keyboard_markup() {
135650        let t = ReplyKeyboardMarkup::default();
135651        let t = t.noskip();
135652        let ser = rmp_serde::to_vec(&t).unwrap();
135653        let _: ReplyKeyboardMarkup = rmp_serde::from_slice(ser.as_slice()).unwrap();
135654    }
135655    #[test]
135656    fn json_serialize_reply_keyboard_markup() {
135657        let t = ReplyKeyboardMarkup::default();
135658        let ser = serde_json::to_string(&t).unwrap();
135659        println!("{}", ser);
135660        let _: ReplyKeyboardMarkup = serde_json::from_str(&ser).unwrap();
135661    }
135662    #[test]
135663    fn rmp_serialize_named_inline_query_result_cached_audio() {
135664        let t = InlineQueryResultCachedAudio::default();
135665        let ser = rmp_serde::to_vec_named(&t).unwrap();
135666        let _: InlineQueryResultCachedAudio = rmp_serde::from_slice(ser.as_slice()).unwrap();
135667    }
135668    #[test]
135669    fn rmp_serialize_array_inline_query_result_cached_audio() {
135670        let t = InlineQueryResultCachedAudio::default();
135671        let t = t.noskip();
135672        let ser = rmp_serde::to_vec(&t).unwrap();
135673        let _: InlineQueryResultCachedAudio = rmp_serde::from_slice(ser.as_slice()).unwrap();
135674    }
135675    #[test]
135676    fn json_serialize_inline_query_result_cached_audio() {
135677        let t = InlineQueryResultCachedAudio::default();
135678        let ser = serde_json::to_string(&t).unwrap();
135679        println!("{}", ser);
135680        let _: InlineQueryResultCachedAudio = serde_json::from_str(&ser).unwrap();
135681    }
135682    #[test]
135683    fn rmp_serialize_named_copy_text_button() {
135684        let t = CopyTextButton::default();
135685        let ser = rmp_serde::to_vec_named(&t).unwrap();
135686        let _: CopyTextButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
135687    }
135688    #[test]
135689    fn rmp_serialize_array_copy_text_button() {
135690        let t = CopyTextButton::default();
135691        let t = t.noskip();
135692        let ser = rmp_serde::to_vec(&t).unwrap();
135693        let _: CopyTextButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
135694    }
135695    #[test]
135696    fn json_serialize_copy_text_button() {
135697        let t = CopyTextButton::default();
135698        let ser = serde_json::to_string(&t).unwrap();
135699        println!("{}", ser);
135700        let _: CopyTextButton = serde_json::from_str(&ser).unwrap();
135701    }
135702    #[test]
135703    fn rmp_serialize_named_background_type_wallpaper() {
135704        let t = BackgroundTypeWallpaper::default();
135705        let ser = rmp_serde::to_vec_named(&t).unwrap();
135706        let _: BackgroundTypeWallpaper = rmp_serde::from_slice(ser.as_slice()).unwrap();
135707    }
135708    #[test]
135709    fn rmp_serialize_array_background_type_wallpaper() {
135710        let t = BackgroundTypeWallpaper::default();
135711        let t = t.noskip();
135712        let ser = rmp_serde::to_vec(&t).unwrap();
135713        let _: BackgroundTypeWallpaper = rmp_serde::from_slice(ser.as_slice()).unwrap();
135714    }
135715    #[test]
135716    fn json_serialize_background_type_wallpaper() {
135717        let t = BackgroundTypeWallpaper::default();
135718        let ser = serde_json::to_string(&t).unwrap();
135719        println!("{}", ser);
135720        let _: BackgroundTypeWallpaper = serde_json::from_str(&ser).unwrap();
135721    }
135722    #[test]
135723    fn rmp_serialize_named_forum_topic() {
135724        let t = ForumTopic::default();
135725        let ser = rmp_serde::to_vec_named(&t).unwrap();
135726        let _: ForumTopic = rmp_serde::from_slice(ser.as_slice()).unwrap();
135727    }
135728    #[test]
135729    fn rmp_serialize_array_forum_topic() {
135730        let t = ForumTopic::default();
135731        let t = t.noskip();
135732        let ser = rmp_serde::to_vec(&t).unwrap();
135733        let _: ForumTopic = rmp_serde::from_slice(ser.as_slice()).unwrap();
135734    }
135735    #[test]
135736    fn json_serialize_forum_topic() {
135737        let t = ForumTopic::default();
135738        let ser = serde_json::to_string(&t).unwrap();
135739        println!("{}", ser);
135740        let _: ForumTopic = serde_json::from_str(&ser).unwrap();
135741    }
135742    #[test]
135743    fn rmp_serialize_named_input_contact_message_content() {
135744        let t = InputContactMessageContent::default();
135745        let ser = rmp_serde::to_vec_named(&t).unwrap();
135746        let _: InputContactMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
135747    }
135748    #[test]
135749    fn rmp_serialize_array_input_contact_message_content() {
135750        let t = InputContactMessageContent::default();
135751        let t = t.noskip();
135752        let ser = rmp_serde::to_vec(&t).unwrap();
135753        let _: InputContactMessageContent = rmp_serde::from_slice(ser.as_slice()).unwrap();
135754    }
135755    #[test]
135756    fn json_serialize_input_contact_message_content() {
135757        let t = InputContactMessageContent::default();
135758        let ser = serde_json::to_string(&t).unwrap();
135759        println!("{}", ser);
135760        let _: InputContactMessageContent = serde_json::from_str(&ser).unwrap();
135761    }
135762    #[test]
135763    fn rmp_serialize_named_reply_parameters() {
135764        let t = ReplyParameters::default();
135765        let ser = rmp_serde::to_vec_named(&t).unwrap();
135766        let _: ReplyParameters = rmp_serde::from_slice(ser.as_slice()).unwrap();
135767    }
135768    #[test]
135769    fn rmp_serialize_array_reply_parameters() {
135770        let t = ReplyParameters::default();
135771        let t = t.noskip();
135772        let ser = rmp_serde::to_vec(&t).unwrap();
135773        let _: ReplyParameters = rmp_serde::from_slice(ser.as_slice()).unwrap();
135774    }
135775    #[test]
135776    fn json_serialize_reply_parameters() {
135777        let t = ReplyParameters::default();
135778        let ser = serde_json::to_string(&t).unwrap();
135779        println!("{}", ser);
135780        let _: ReplyParameters = serde_json::from_str(&ser).unwrap();
135781    }
135782    #[test]
135783    fn rmp_serialize_named_input_media_document() {
135784        let t = InputMediaDocument::default();
135785        let ser = rmp_serde::to_vec_named(&t).unwrap();
135786        let _: InputMediaDocument = rmp_serde::from_slice(ser.as_slice()).unwrap();
135787    }
135788    #[test]
135789    fn rmp_serialize_array_input_media_document() {
135790        let t = InputMediaDocument::default();
135791        let t = t.noskip();
135792        let ser = rmp_serde::to_vec(&t).unwrap();
135793        let _: InputMediaDocument = rmp_serde::from_slice(ser.as_slice()).unwrap();
135794    }
135795    #[test]
135796    fn json_serialize_input_media_document() {
135797        let t = InputMediaDocument::default();
135798        let ser = serde_json::to_string(&t).unwrap();
135799        println!("{}", ser);
135800        let _: InputMediaDocument = serde_json::from_str(&ser).unwrap();
135801    }
135802    #[test]
135803    fn rmp_serialize_named_business_intro() {
135804        let t = BusinessIntro::default();
135805        let ser = rmp_serde::to_vec_named(&t).unwrap();
135806        let _: BusinessIntro = rmp_serde::from_slice(ser.as_slice()).unwrap();
135807    }
135808    #[test]
135809    fn rmp_serialize_array_business_intro() {
135810        let t = BusinessIntro::default();
135811        let t = t.noskip();
135812        let ser = rmp_serde::to_vec(&t).unwrap();
135813        let _: BusinessIntro = rmp_serde::from_slice(ser.as_slice()).unwrap();
135814    }
135815    #[test]
135816    fn json_serialize_business_intro() {
135817        let t = BusinessIntro::default();
135818        let ser = serde_json::to_string(&t).unwrap();
135819        println!("{}", ser);
135820        let _: BusinessIntro = serde_json::from_str(&ser).unwrap();
135821    }
135822    #[test]
135823    fn rmp_serialize_named_giveaway_created() {
135824        let t = GiveawayCreated::default();
135825        let ser = rmp_serde::to_vec_named(&t).unwrap();
135826        let _: GiveawayCreated = rmp_serde::from_slice(ser.as_slice()).unwrap();
135827    }
135828    #[test]
135829    fn rmp_serialize_array_giveaway_created() {
135830        let t = GiveawayCreated::default();
135831        let t = t.noskip();
135832        let ser = rmp_serde::to_vec(&t).unwrap();
135833        let _: GiveawayCreated = rmp_serde::from_slice(ser.as_slice()).unwrap();
135834    }
135835    #[test]
135836    fn json_serialize_giveaway_created() {
135837        let t = GiveawayCreated::default();
135838        let ser = serde_json::to_string(&t).unwrap();
135839        println!("{}", ser);
135840        let _: GiveawayCreated = serde_json::from_str(&ser).unwrap();
135841    }
135842    #[test]
135843    fn rmp_serialize_named_chat_member_administrator() {
135844        let t = ChatMemberAdministrator::default();
135845        let ser = rmp_serde::to_vec_named(&t).unwrap();
135846        let _: ChatMemberAdministrator = rmp_serde::from_slice(ser.as_slice()).unwrap();
135847    }
135848    #[test]
135849    fn rmp_serialize_array_chat_member_administrator() {
135850        let t = ChatMemberAdministrator::default();
135851        let t = t.noskip();
135852        let ser = rmp_serde::to_vec(&t).unwrap();
135853        let _: ChatMemberAdministrator = rmp_serde::from_slice(ser.as_slice()).unwrap();
135854    }
135855    #[test]
135856    fn json_serialize_chat_member_administrator() {
135857        let t = ChatMemberAdministrator::default();
135858        let ser = serde_json::to_string(&t).unwrap();
135859        println!("{}", ser);
135860        let _: ChatMemberAdministrator = serde_json::from_str(&ser).unwrap();
135861    }
135862    #[test]
135863    fn rmp_serialize_named_inline_query_result_gif() {
135864        let t = InlineQueryResultGif::default();
135865        let ser = rmp_serde::to_vec_named(&t).unwrap();
135866        let _: InlineQueryResultGif = rmp_serde::from_slice(ser.as_slice()).unwrap();
135867    }
135868    #[test]
135869    fn rmp_serialize_array_inline_query_result_gif() {
135870        let t = InlineQueryResultGif::default();
135871        let t = t.noskip();
135872        let ser = rmp_serde::to_vec(&t).unwrap();
135873        let _: InlineQueryResultGif = rmp_serde::from_slice(ser.as_slice()).unwrap();
135874    }
135875    #[test]
135876    fn json_serialize_inline_query_result_gif() {
135877        let t = InlineQueryResultGif::default();
135878        let ser = serde_json::to_string(&t).unwrap();
135879        println!("{}", ser);
135880        let _: InlineQueryResultGif = serde_json::from_str(&ser).unwrap();
135881    }
135882    #[test]
135883    fn rmp_serialize_named_input_profile_photo_animated() {
135884        let t = InputProfilePhotoAnimated::default();
135885        let ser = rmp_serde::to_vec_named(&t).unwrap();
135886        let _: InputProfilePhotoAnimated = rmp_serde::from_slice(ser.as_slice()).unwrap();
135887    }
135888    #[test]
135889    fn rmp_serialize_array_input_profile_photo_animated() {
135890        let t = InputProfilePhotoAnimated::default();
135891        let t = t.noskip();
135892        let ser = rmp_serde::to_vec(&t).unwrap();
135893        let _: InputProfilePhotoAnimated = rmp_serde::from_slice(ser.as_slice()).unwrap();
135894    }
135895    #[test]
135896    fn json_serialize_input_profile_photo_animated() {
135897        let t = InputProfilePhotoAnimated::default();
135898        let ser = serde_json::to_string(&t).unwrap();
135899        println!("{}", ser);
135900        let _: InputProfilePhotoAnimated = serde_json::from_str(&ser).unwrap();
135901    }
135902    #[test]
135903    fn rmp_serialize_named_video_chat_participants_invited() {
135904        let t = VideoChatParticipantsInvited::default();
135905        let ser = rmp_serde::to_vec_named(&t).unwrap();
135906        let _: VideoChatParticipantsInvited = rmp_serde::from_slice(ser.as_slice()).unwrap();
135907    }
135908    #[test]
135909    fn rmp_serialize_array_video_chat_participants_invited() {
135910        let t = VideoChatParticipantsInvited::default();
135911        let t = t.noskip();
135912        let ser = rmp_serde::to_vec(&t).unwrap();
135913        let _: VideoChatParticipantsInvited = rmp_serde::from_slice(ser.as_slice()).unwrap();
135914    }
135915    #[test]
135916    fn json_serialize_video_chat_participants_invited() {
135917        let t = VideoChatParticipantsInvited::default();
135918        let ser = serde_json::to_string(&t).unwrap();
135919        println!("{}", ser);
135920        let _: VideoChatParticipantsInvited = serde_json::from_str(&ser).unwrap();
135921    }
135922    #[test]
135923    fn rmp_serialize_named_login_url() {
135924        let t = LoginUrl::default();
135925        let ser = rmp_serde::to_vec_named(&t).unwrap();
135926        let _: LoginUrl = rmp_serde::from_slice(ser.as_slice()).unwrap();
135927    }
135928    #[test]
135929    fn rmp_serialize_array_login_url() {
135930        let t = LoginUrl::default();
135931        let t = t.noskip();
135932        let ser = rmp_serde::to_vec(&t).unwrap();
135933        let _: LoginUrl = rmp_serde::from_slice(ser.as_slice()).unwrap();
135934    }
135935    #[test]
135936    fn json_serialize_login_url() {
135937        let t = LoginUrl::default();
135938        let ser = serde_json::to_string(&t).unwrap();
135939        println!("{}", ser);
135940        let _: LoginUrl = serde_json::from_str(&ser).unwrap();
135941    }
135942    #[test]
135943    fn rmp_serialize_named_chosen_inline_result() {
135944        let t = ChosenInlineResult::default();
135945        let ser = rmp_serde::to_vec_named(&t).unwrap();
135946        let _: ChosenInlineResult = rmp_serde::from_slice(ser.as_slice()).unwrap();
135947    }
135948    #[test]
135949    fn rmp_serialize_array_chosen_inline_result() {
135950        let t = ChosenInlineResult::default();
135951        let t = t.noskip();
135952        let ser = rmp_serde::to_vec(&t).unwrap();
135953        let _: ChosenInlineResult = rmp_serde::from_slice(ser.as_slice()).unwrap();
135954    }
135955    #[test]
135956    fn json_serialize_chosen_inline_result() {
135957        let t = ChosenInlineResult::default();
135958        let ser = serde_json::to_string(&t).unwrap();
135959        println!("{}", ser);
135960        let _: ChosenInlineResult = serde_json::from_str(&ser).unwrap();
135961    }
135962    #[test]
135963    fn rmp_serialize_named_passport_element_error_unspecified() {
135964        let t = PassportElementErrorUnspecified::default();
135965        let ser = rmp_serde::to_vec_named(&t).unwrap();
135966        let _: PassportElementErrorUnspecified = rmp_serde::from_slice(ser.as_slice()).unwrap();
135967    }
135968    #[test]
135969    fn rmp_serialize_array_passport_element_error_unspecified() {
135970        let t = PassportElementErrorUnspecified::default();
135971        let t = t.noskip();
135972        let ser = rmp_serde::to_vec(&t).unwrap();
135973        let _: PassportElementErrorUnspecified = rmp_serde::from_slice(ser.as_slice()).unwrap();
135974    }
135975    #[test]
135976    fn json_serialize_passport_element_error_unspecified() {
135977        let t = PassportElementErrorUnspecified::default();
135978        let ser = serde_json::to_string(&t).unwrap();
135979        println!("{}", ser);
135980        let _: PassportElementErrorUnspecified = serde_json::from_str(&ser).unwrap();
135981    }
135982    #[test]
135983    fn rmp_serialize_named_menu_button_web_app() {
135984        let t = MenuButtonWebApp::default();
135985        let ser = rmp_serde::to_vec_named(&t).unwrap();
135986        let _: MenuButtonWebApp = rmp_serde::from_slice(ser.as_slice()).unwrap();
135987    }
135988    #[test]
135989    fn rmp_serialize_array_menu_button_web_app() {
135990        let t = MenuButtonWebApp::default();
135991        let t = t.noskip();
135992        let ser = rmp_serde::to_vec(&t).unwrap();
135993        let _: MenuButtonWebApp = rmp_serde::from_slice(ser.as_slice()).unwrap();
135994    }
135995    #[test]
135996    fn json_serialize_menu_button_web_app() {
135997        let t = MenuButtonWebApp::default();
135998        let ser = serde_json::to_string(&t).unwrap();
135999        println!("{}", ser);
136000        let _: MenuButtonWebApp = serde_json::from_str(&ser).unwrap();
136001    }
136002    #[test]
136003    fn rmp_serialize_named_user_chat_boosts() {
136004        let t = UserChatBoosts::default();
136005        let ser = rmp_serde::to_vec_named(&t).unwrap();
136006        let _: UserChatBoosts = rmp_serde::from_slice(ser.as_slice()).unwrap();
136007    }
136008    #[test]
136009    fn rmp_serialize_array_user_chat_boosts() {
136010        let t = UserChatBoosts::default();
136011        let t = t.noskip();
136012        let ser = rmp_serde::to_vec(&t).unwrap();
136013        let _: UserChatBoosts = rmp_serde::from_slice(ser.as_slice()).unwrap();
136014    }
136015    #[test]
136016    fn json_serialize_user_chat_boosts() {
136017        let t = UserChatBoosts::default();
136018        let ser = serde_json::to_string(&t).unwrap();
136019        println!("{}", ser);
136020        let _: UserChatBoosts = serde_json::from_str(&ser).unwrap();
136021    }
136022    #[test]
136023    fn rmp_serialize_named_gift_info() {
136024        let t = GiftInfo::default();
136025        let ser = rmp_serde::to_vec_named(&t).unwrap();
136026        let _: GiftInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136027    }
136028    #[test]
136029    fn rmp_serialize_array_gift_info() {
136030        let t = GiftInfo::default();
136031        let t = t.noskip();
136032        let ser = rmp_serde::to_vec(&t).unwrap();
136033        let _: GiftInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136034    }
136035    #[test]
136036    fn json_serialize_gift_info() {
136037        let t = GiftInfo::default();
136038        let ser = serde_json::to_string(&t).unwrap();
136039        println!("{}", ser);
136040        let _: GiftInfo = serde_json::from_str(&ser).unwrap();
136041    }
136042    #[test]
136043    fn rmp_serialize_named_shipping_address() {
136044        let t = ShippingAddress::default();
136045        let ser = rmp_serde::to_vec_named(&t).unwrap();
136046        let _: ShippingAddress = rmp_serde::from_slice(ser.as_slice()).unwrap();
136047    }
136048    #[test]
136049    fn rmp_serialize_array_shipping_address() {
136050        let t = ShippingAddress::default();
136051        let t = t.noskip();
136052        let ser = rmp_serde::to_vec(&t).unwrap();
136053        let _: ShippingAddress = rmp_serde::from_slice(ser.as_slice()).unwrap();
136054    }
136055    #[test]
136056    fn json_serialize_shipping_address() {
136057        let t = ShippingAddress::default();
136058        let ser = serde_json::to_string(&t).unwrap();
136059        println!("{}", ser);
136060        let _: ShippingAddress = serde_json::from_str(&ser).unwrap();
136061    }
136062    #[test]
136063    fn rmp_serialize_named_message_auto_delete_timer_changed() {
136064        let t = MessageAutoDeleteTimerChanged::default();
136065        let ser = rmp_serde::to_vec_named(&t).unwrap();
136066        let _: MessageAutoDeleteTimerChanged = rmp_serde::from_slice(ser.as_slice()).unwrap();
136067    }
136068    #[test]
136069    fn rmp_serialize_array_message_auto_delete_timer_changed() {
136070        let t = MessageAutoDeleteTimerChanged::default();
136071        let t = t.noskip();
136072        let ser = rmp_serde::to_vec(&t).unwrap();
136073        let _: MessageAutoDeleteTimerChanged = rmp_serde::from_slice(ser.as_slice()).unwrap();
136074    }
136075    #[test]
136076    fn json_serialize_message_auto_delete_timer_changed() {
136077        let t = MessageAutoDeleteTimerChanged::default();
136078        let ser = serde_json::to_string(&t).unwrap();
136079        println!("{}", ser);
136080        let _: MessageAutoDeleteTimerChanged = serde_json::from_str(&ser).unwrap();
136081    }
136082    #[test]
136083    fn rmp_serialize_named_inline_query_results_button() {
136084        let t = InlineQueryResultsButton::default();
136085        let ser = rmp_serde::to_vec_named(&t).unwrap();
136086        let _: InlineQueryResultsButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
136087    }
136088    #[test]
136089    fn rmp_serialize_array_inline_query_results_button() {
136090        let t = InlineQueryResultsButton::default();
136091        let t = t.noskip();
136092        let ser = rmp_serde::to_vec(&t).unwrap();
136093        let _: InlineQueryResultsButton = rmp_serde::from_slice(ser.as_slice()).unwrap();
136094    }
136095    #[test]
136096    fn json_serialize_inline_query_results_button() {
136097        let t = InlineQueryResultsButton::default();
136098        let ser = serde_json::to_string(&t).unwrap();
136099        println!("{}", ser);
136100        let _: InlineQueryResultsButton = serde_json::from_str(&ser).unwrap();
136101    }
136102    #[test]
136103    fn rmp_serialize_named_background_fill_solid() {
136104        let t = BackgroundFillSolid::default();
136105        let ser = rmp_serde::to_vec_named(&t).unwrap();
136106        let _: BackgroundFillSolid = rmp_serde::from_slice(ser.as_slice()).unwrap();
136107    }
136108    #[test]
136109    fn rmp_serialize_array_background_fill_solid() {
136110        let t = BackgroundFillSolid::default();
136111        let t = t.noskip();
136112        let ser = rmp_serde::to_vec(&t).unwrap();
136113        let _: BackgroundFillSolid = rmp_serde::from_slice(ser.as_slice()).unwrap();
136114    }
136115    #[test]
136116    fn json_serialize_background_fill_solid() {
136117        let t = BackgroundFillSolid::default();
136118        let ser = serde_json::to_string(&t).unwrap();
136119        println!("{}", ser);
136120        let _: BackgroundFillSolid = serde_json::from_str(&ser).unwrap();
136121    }
136122    #[test]
136123    fn rmp_serialize_named_bot_command_scope_all_group_chats() {
136124        let t = BotCommandScopeAllGroupChats::default();
136125        let ser = rmp_serde::to_vec_named(&t).unwrap();
136126        let _: BotCommandScopeAllGroupChats = rmp_serde::from_slice(ser.as_slice()).unwrap();
136127    }
136128    #[test]
136129    fn rmp_serialize_array_bot_command_scope_all_group_chats() {
136130        let t = BotCommandScopeAllGroupChats::default();
136131        let t = t.noskip();
136132        let ser = rmp_serde::to_vec(&t).unwrap();
136133        let _: BotCommandScopeAllGroupChats = rmp_serde::from_slice(ser.as_slice()).unwrap();
136134    }
136135    #[test]
136136    fn json_serialize_bot_command_scope_all_group_chats() {
136137        let t = BotCommandScopeAllGroupChats::default();
136138        let ser = serde_json::to_string(&t).unwrap();
136139        println!("{}", ser);
136140        let _: BotCommandScopeAllGroupChats = serde_json::from_str(&ser).unwrap();
136141    }
136142    #[test]
136143    fn rmp_serialize_named_chat_boost_updated() {
136144        let t = ChatBoostUpdated::default();
136145        let ser = rmp_serde::to_vec_named(&t).unwrap();
136146        let _: ChatBoostUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
136147    }
136148    #[test]
136149    fn rmp_serialize_array_chat_boost_updated() {
136150        let t = ChatBoostUpdated::default();
136151        let t = t.noskip();
136152        let ser = rmp_serde::to_vec(&t).unwrap();
136153        let _: ChatBoostUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
136154    }
136155    #[test]
136156    fn json_serialize_chat_boost_updated() {
136157        let t = ChatBoostUpdated::default();
136158        let ser = serde_json::to_string(&t).unwrap();
136159        println!("{}", ser);
136160        let _: ChatBoostUpdated = serde_json::from_str(&ser).unwrap();
136161    }
136162    #[test]
136163    fn rmp_serialize_named_mask_position() {
136164        let t = MaskPosition::default();
136165        let ser = rmp_serde::to_vec_named(&t).unwrap();
136166        let _: MaskPosition = rmp_serde::from_slice(ser.as_slice()).unwrap();
136167    }
136168    #[test]
136169    fn rmp_serialize_array_mask_position() {
136170        let t = MaskPosition::default();
136171        let t = t.noskip();
136172        let ser = rmp_serde::to_vec(&t).unwrap();
136173        let _: MaskPosition = rmp_serde::from_slice(ser.as_slice()).unwrap();
136174    }
136175    #[test]
136176    fn json_serialize_mask_position() {
136177        let t = MaskPosition::default();
136178        let ser = serde_json::to_string(&t).unwrap();
136179        println!("{}", ser);
136180        let _: MaskPosition = serde_json::from_str(&ser).unwrap();
136181    }
136182    #[test]
136183    fn rmp_serialize_named_passport_element_error_file() {
136184        let t = PassportElementErrorFile::default();
136185        let ser = rmp_serde::to_vec_named(&t).unwrap();
136186        let _: PassportElementErrorFile = rmp_serde::from_slice(ser.as_slice()).unwrap();
136187    }
136188    #[test]
136189    fn rmp_serialize_array_passport_element_error_file() {
136190        let t = PassportElementErrorFile::default();
136191        let t = t.noskip();
136192        let ser = rmp_serde::to_vec(&t).unwrap();
136193        let _: PassportElementErrorFile = rmp_serde::from_slice(ser.as_slice()).unwrap();
136194    }
136195    #[test]
136196    fn json_serialize_passport_element_error_file() {
136197        let t = PassportElementErrorFile::default();
136198        let ser = serde_json::to_string(&t).unwrap();
136199        println!("{}", ser);
136200        let _: PassportElementErrorFile = serde_json::from_str(&ser).unwrap();
136201    }
136202    #[test]
136203    fn rmp_serialize_named_sticker() {
136204        let t = Sticker::default();
136205        let ser = rmp_serde::to_vec_named(&t).unwrap();
136206        let _: Sticker = rmp_serde::from_slice(ser.as_slice()).unwrap();
136207    }
136208    #[test]
136209    fn rmp_serialize_array_sticker() {
136210        let t = Sticker::default();
136211        let t = t.noskip();
136212        let ser = rmp_serde::to_vec(&t).unwrap();
136213        let _: Sticker = rmp_serde::from_slice(ser.as_slice()).unwrap();
136214    }
136215    #[test]
136216    fn json_serialize_sticker() {
136217        let t = Sticker::default();
136218        let ser = serde_json::to_string(&t).unwrap();
136219        println!("{}", ser);
136220        let _: Sticker = serde_json::from_str(&ser).unwrap();
136221    }
136222    #[test]
136223    fn rmp_serialize_named_passport_element_error_selfie() {
136224        let t = PassportElementErrorSelfie::default();
136225        let ser = rmp_serde::to_vec_named(&t).unwrap();
136226        let _: PassportElementErrorSelfie = rmp_serde::from_slice(ser.as_slice()).unwrap();
136227    }
136228    #[test]
136229    fn rmp_serialize_array_passport_element_error_selfie() {
136230        let t = PassportElementErrorSelfie::default();
136231        let t = t.noskip();
136232        let ser = rmp_serde::to_vec(&t).unwrap();
136233        let _: PassportElementErrorSelfie = rmp_serde::from_slice(ser.as_slice()).unwrap();
136234    }
136235    #[test]
136236    fn json_serialize_passport_element_error_selfie() {
136237        let t = PassportElementErrorSelfie::default();
136238        let ser = serde_json::to_string(&t).unwrap();
136239        println!("{}", ser);
136240        let _: PassportElementErrorSelfie = serde_json::from_str(&ser).unwrap();
136241    }
136242    #[test]
136243    fn rmp_serialize_named_background_type_pattern() {
136244        let t = BackgroundTypePattern::default();
136245        let ser = rmp_serde::to_vec_named(&t).unwrap();
136246        let _: BackgroundTypePattern = rmp_serde::from_slice(ser.as_slice()).unwrap();
136247    }
136248    #[test]
136249    fn rmp_serialize_array_background_type_pattern() {
136250        let t = BackgroundTypePattern::default();
136251        let t = t.noskip();
136252        let ser = rmp_serde::to_vec(&t).unwrap();
136253        let _: BackgroundTypePattern = rmp_serde::from_slice(ser.as_slice()).unwrap();
136254    }
136255    #[test]
136256    fn json_serialize_background_type_pattern() {
136257        let t = BackgroundTypePattern::default();
136258        let ser = serde_json::to_string(&t).unwrap();
136259        println!("{}", ser);
136260        let _: BackgroundTypePattern = serde_json::from_str(&ser).unwrap();
136261    }
136262    #[test]
136263    fn rmp_serialize_named_star_amount() {
136264        let t = StarAmount::default();
136265        let ser = rmp_serde::to_vec_named(&t).unwrap();
136266        let _: StarAmount = rmp_serde::from_slice(ser.as_slice()).unwrap();
136267    }
136268    #[test]
136269    fn rmp_serialize_array_star_amount() {
136270        let t = StarAmount::default();
136271        let t = t.noskip();
136272        let ser = rmp_serde::to_vec(&t).unwrap();
136273        let _: StarAmount = rmp_serde::from_slice(ser.as_slice()).unwrap();
136274    }
136275    #[test]
136276    fn json_serialize_star_amount() {
136277        let t = StarAmount::default();
136278        let ser = serde_json::to_string(&t).unwrap();
136279        println!("{}", ser);
136280        let _: StarAmount = serde_json::from_str(&ser).unwrap();
136281    }
136282    #[test]
136283    fn rmp_serialize_named_transaction_partner_fragment() {
136284        let t = TransactionPartnerFragment::default();
136285        let ser = rmp_serde::to_vec_named(&t).unwrap();
136286        let _: TransactionPartnerFragment = rmp_serde::from_slice(ser.as_slice()).unwrap();
136287    }
136288    #[test]
136289    fn rmp_serialize_array_transaction_partner_fragment() {
136290        let t = TransactionPartnerFragment::default();
136291        let t = t.noskip();
136292        let ser = rmp_serde::to_vec(&t).unwrap();
136293        let _: TransactionPartnerFragment = rmp_serde::from_slice(ser.as_slice()).unwrap();
136294    }
136295    #[test]
136296    fn json_serialize_transaction_partner_fragment() {
136297        let t = TransactionPartnerFragment::default();
136298        let ser = serde_json::to_string(&t).unwrap();
136299        println!("{}", ser);
136300        let _: TransactionPartnerFragment = serde_json::from_str(&ser).unwrap();
136301    }
136302    #[test]
136303    fn rmp_serialize_named_chat_member_left() {
136304        let t = ChatMemberLeft::default();
136305        let ser = rmp_serde::to_vec_named(&t).unwrap();
136306        let _: ChatMemberLeft = rmp_serde::from_slice(ser.as_slice()).unwrap();
136307    }
136308    #[test]
136309    fn rmp_serialize_array_chat_member_left() {
136310        let t = ChatMemberLeft::default();
136311        let t = t.noskip();
136312        let ser = rmp_serde::to_vec(&t).unwrap();
136313        let _: ChatMemberLeft = rmp_serde::from_slice(ser.as_slice()).unwrap();
136314    }
136315    #[test]
136316    fn json_serialize_chat_member_left() {
136317        let t = ChatMemberLeft::default();
136318        let ser = serde_json::to_string(&t).unwrap();
136319        println!("{}", ser);
136320        let _: ChatMemberLeft = serde_json::from_str(&ser).unwrap();
136321    }
136322    #[test]
136323    fn rmp_serialize_named_paid_media_photo() {
136324        let t = PaidMediaPhoto::default();
136325        let ser = rmp_serde::to_vec_named(&t).unwrap();
136326        let _: PaidMediaPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
136327    }
136328    #[test]
136329    fn rmp_serialize_array_paid_media_photo() {
136330        let t = PaidMediaPhoto::default();
136331        let t = t.noskip();
136332        let ser = rmp_serde::to_vec(&t).unwrap();
136333        let _: PaidMediaPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
136334    }
136335    #[test]
136336    fn json_serialize_paid_media_photo() {
136337        let t = PaidMediaPhoto::default();
136338        let ser = serde_json::to_string(&t).unwrap();
136339        println!("{}", ser);
136340        let _: PaidMediaPhoto = serde_json::from_str(&ser).unwrap();
136341    }
136342    #[test]
136343    fn rmp_serialize_named_unique_gift() {
136344        let t = UniqueGift::default();
136345        let ser = rmp_serde::to_vec_named(&t).unwrap();
136346        let _: UniqueGift = rmp_serde::from_slice(ser.as_slice()).unwrap();
136347    }
136348    #[test]
136349    fn rmp_serialize_array_unique_gift() {
136350        let t = UniqueGift::default();
136351        let t = t.noskip();
136352        let ser = rmp_serde::to_vec(&t).unwrap();
136353        let _: UniqueGift = rmp_serde::from_slice(ser.as_slice()).unwrap();
136354    }
136355    #[test]
136356    fn json_serialize_unique_gift() {
136357        let t = UniqueGift::default();
136358        let ser = serde_json::to_string(&t).unwrap();
136359        println!("{}", ser);
136360        let _: UniqueGift = serde_json::from_str(&ser).unwrap();
136361    }
136362    #[test]
136363    fn rmp_serialize_named_menu_button_commands() {
136364        let t = MenuButtonCommands::default();
136365        let ser = rmp_serde::to_vec_named(&t).unwrap();
136366        let _: MenuButtonCommands = rmp_serde::from_slice(ser.as_slice()).unwrap();
136367    }
136368    #[test]
136369    fn rmp_serialize_array_menu_button_commands() {
136370        let t = MenuButtonCommands::default();
136371        let t = t.noskip();
136372        let ser = rmp_serde::to_vec(&t).unwrap();
136373        let _: MenuButtonCommands = rmp_serde::from_slice(ser.as_slice()).unwrap();
136374    }
136375    #[test]
136376    fn json_serialize_menu_button_commands() {
136377        let t = MenuButtonCommands::default();
136378        let ser = serde_json::to_string(&t).unwrap();
136379        println!("{}", ser);
136380        let _: MenuButtonCommands = serde_json::from_str(&ser).unwrap();
136381    }
136382    #[test]
136383    fn rmp_serialize_named_transaction_partner_other() {
136384        let t = TransactionPartnerOther::default();
136385        let ser = rmp_serde::to_vec_named(&t).unwrap();
136386        let _: TransactionPartnerOther = rmp_serde::from_slice(ser.as_slice()).unwrap();
136387    }
136388    #[test]
136389    fn rmp_serialize_array_transaction_partner_other() {
136390        let t = TransactionPartnerOther::default();
136391        let t = t.noskip();
136392        let ser = rmp_serde::to_vec(&t).unwrap();
136393        let _: TransactionPartnerOther = rmp_serde::from_slice(ser.as_slice()).unwrap();
136394    }
136395    #[test]
136396    fn json_serialize_transaction_partner_other() {
136397        let t = TransactionPartnerOther::default();
136398        let ser = serde_json::to_string(&t).unwrap();
136399        println!("{}", ser);
136400        let _: TransactionPartnerOther = serde_json::from_str(&ser).unwrap();
136401    }
136402    #[test]
136403    fn rmp_serialize_named_gifts() {
136404        let t = Gifts::default();
136405        let ser = rmp_serde::to_vec_named(&t).unwrap();
136406        let _: Gifts = rmp_serde::from_slice(ser.as_slice()).unwrap();
136407    }
136408    #[test]
136409    fn rmp_serialize_array_gifts() {
136410        let t = Gifts::default();
136411        let t = t.noskip();
136412        let ser = rmp_serde::to_vec(&t).unwrap();
136413        let _: Gifts = rmp_serde::from_slice(ser.as_slice()).unwrap();
136414    }
136415    #[test]
136416    fn json_serialize_gifts() {
136417        let t = Gifts::default();
136418        let ser = serde_json::to_string(&t).unwrap();
136419        println!("{}", ser);
136420        let _: Gifts = serde_json::from_str(&ser).unwrap();
136421    }
136422    #[test]
136423    fn rmp_serialize_named_file() {
136424        let t = File::default();
136425        let ser = rmp_serde::to_vec_named(&t).unwrap();
136426        let _: File = rmp_serde::from_slice(ser.as_slice()).unwrap();
136427    }
136428    #[test]
136429    fn rmp_serialize_array_file() {
136430        let t = File::default();
136431        let t = t.noskip();
136432        let ser = rmp_serde::to_vec(&t).unwrap();
136433        let _: File = rmp_serde::from_slice(ser.as_slice()).unwrap();
136434    }
136435    #[test]
136436    fn json_serialize_file() {
136437        let t = File::default();
136438        let ser = serde_json::to_string(&t).unwrap();
136439        println!("{}", ser);
136440        let _: File = serde_json::from_str(&ser).unwrap();
136441    }
136442    #[test]
136443    fn rmp_serialize_named_birthdate() {
136444        let t = Birthdate::default();
136445        let ser = rmp_serde::to_vec_named(&t).unwrap();
136446        let _: Birthdate = rmp_serde::from_slice(ser.as_slice()).unwrap();
136447    }
136448    #[test]
136449    fn rmp_serialize_array_birthdate() {
136450        let t = Birthdate::default();
136451        let t = t.noskip();
136452        let ser = rmp_serde::to_vec(&t).unwrap();
136453        let _: Birthdate = rmp_serde::from_slice(ser.as_slice()).unwrap();
136454    }
136455    #[test]
136456    fn json_serialize_birthdate() {
136457        let t = Birthdate::default();
136458        let ser = serde_json::to_string(&t).unwrap();
136459        println!("{}", ser);
136460        let _: Birthdate = serde_json::from_str(&ser).unwrap();
136461    }
136462    #[test]
136463    fn rmp_serialize_named_transaction_partner_telegram_ads() {
136464        let t = TransactionPartnerTelegramAds::default();
136465        let ser = rmp_serde::to_vec_named(&t).unwrap();
136466        let _: TransactionPartnerTelegramAds = rmp_serde::from_slice(ser.as_slice()).unwrap();
136467    }
136468    #[test]
136469    fn rmp_serialize_array_transaction_partner_telegram_ads() {
136470        let t = TransactionPartnerTelegramAds::default();
136471        let t = t.noskip();
136472        let ser = rmp_serde::to_vec(&t).unwrap();
136473        let _: TransactionPartnerTelegramAds = rmp_serde::from_slice(ser.as_slice()).unwrap();
136474    }
136475    #[test]
136476    fn json_serialize_transaction_partner_telegram_ads() {
136477        let t = TransactionPartnerTelegramAds::default();
136478        let ser = serde_json::to_string(&t).unwrap();
136479        println!("{}", ser);
136480        let _: TransactionPartnerTelegramAds = serde_json::from_str(&ser).unwrap();
136481    }
136482    #[test]
136483    fn rmp_serialize_named_inline_query_result_contact() {
136484        let t = InlineQueryResultContact::default();
136485        let ser = rmp_serde::to_vec_named(&t).unwrap();
136486        let _: InlineQueryResultContact = rmp_serde::from_slice(ser.as_slice()).unwrap();
136487    }
136488    #[test]
136489    fn rmp_serialize_array_inline_query_result_contact() {
136490        let t = InlineQueryResultContact::default();
136491        let t = t.noskip();
136492        let ser = rmp_serde::to_vec(&t).unwrap();
136493        let _: InlineQueryResultContact = rmp_serde::from_slice(ser.as_slice()).unwrap();
136494    }
136495    #[test]
136496    fn json_serialize_inline_query_result_contact() {
136497        let t = InlineQueryResultContact::default();
136498        let ser = serde_json::to_string(&t).unwrap();
136499        println!("{}", ser);
136500        let _: InlineQueryResultContact = serde_json::from_str(&ser).unwrap();
136501    }
136502    #[test]
136503    fn rmp_serialize_named_chat_member_restricted() {
136504        let t = ChatMemberRestricted::default();
136505        let ser = rmp_serde::to_vec_named(&t).unwrap();
136506        let _: ChatMemberRestricted = rmp_serde::from_slice(ser.as_slice()).unwrap();
136507    }
136508    #[test]
136509    fn rmp_serialize_array_chat_member_restricted() {
136510        let t = ChatMemberRestricted::default();
136511        let t = t.noskip();
136512        let ser = rmp_serde::to_vec(&t).unwrap();
136513        let _: ChatMemberRestricted = rmp_serde::from_slice(ser.as_slice()).unwrap();
136514    }
136515    #[test]
136516    fn json_serialize_chat_member_restricted() {
136517        let t = ChatMemberRestricted::default();
136518        let ser = serde_json::to_string(&t).unwrap();
136519        println!("{}", ser);
136520        let _: ChatMemberRestricted = serde_json::from_str(&ser).unwrap();
136521    }
136522    #[test]
136523    fn rmp_serialize_named_link_preview_options() {
136524        let t = LinkPreviewOptions::default();
136525        let ser = rmp_serde::to_vec_named(&t).unwrap();
136526        let _: LinkPreviewOptions = rmp_serde::from_slice(ser.as_slice()).unwrap();
136527    }
136528    #[test]
136529    fn rmp_serialize_array_link_preview_options() {
136530        let t = LinkPreviewOptions::default();
136531        let t = t.noskip();
136532        let ser = rmp_serde::to_vec(&t).unwrap();
136533        let _: LinkPreviewOptions = rmp_serde::from_slice(ser.as_slice()).unwrap();
136534    }
136535    #[test]
136536    fn json_serialize_link_preview_options() {
136537        let t = LinkPreviewOptions::default();
136538        let ser = serde_json::to_string(&t).unwrap();
136539        println!("{}", ser);
136540        let _: LinkPreviewOptions = serde_json::from_str(&ser).unwrap();
136541    }
136542    #[test]
136543    fn rmp_serialize_named_prepared_inline_message() {
136544        let t = PreparedInlineMessage::default();
136545        let ser = rmp_serde::to_vec_named(&t).unwrap();
136546        let _: PreparedInlineMessage = rmp_serde::from_slice(ser.as_slice()).unwrap();
136547    }
136548    #[test]
136549    fn rmp_serialize_array_prepared_inline_message() {
136550        let t = PreparedInlineMessage::default();
136551        let t = t.noskip();
136552        let ser = rmp_serde::to_vec(&t).unwrap();
136553        let _: PreparedInlineMessage = rmp_serde::from_slice(ser.as_slice()).unwrap();
136554    }
136555    #[test]
136556    fn json_serialize_prepared_inline_message() {
136557        let t = PreparedInlineMessage::default();
136558        let ser = serde_json::to_string(&t).unwrap();
136559        println!("{}", ser);
136560        let _: PreparedInlineMessage = serde_json::from_str(&ser).unwrap();
136561    }
136562    #[test]
136563    fn rmp_serialize_named_text_quote() {
136564        let t = TextQuote::default();
136565        let ser = rmp_serde::to_vec_named(&t).unwrap();
136566        let _: TextQuote = rmp_serde::from_slice(ser.as_slice()).unwrap();
136567    }
136568    #[test]
136569    fn rmp_serialize_array_text_quote() {
136570        let t = TextQuote::default();
136571        let t = t.noskip();
136572        let ser = rmp_serde::to_vec(&t).unwrap();
136573        let _: TextQuote = rmp_serde::from_slice(ser.as_slice()).unwrap();
136574    }
136575    #[test]
136576    fn json_serialize_text_quote() {
136577        let t = TextQuote::default();
136578        let ser = serde_json::to_string(&t).unwrap();
136579        println!("{}", ser);
136580        let _: TextQuote = serde_json::from_str(&ser).unwrap();
136581    }
136582    #[test]
136583    fn rmp_serialize_named_checklist_tasks_done() {
136584        let t = ChecklistTasksDone::default();
136585        let ser = rmp_serde::to_vec_named(&t).unwrap();
136586        let _: ChecklistTasksDone = rmp_serde::from_slice(ser.as_slice()).unwrap();
136587    }
136588    #[test]
136589    fn rmp_serialize_array_checklist_tasks_done() {
136590        let t = ChecklistTasksDone::default();
136591        let t = t.noskip();
136592        let ser = rmp_serde::to_vec(&t).unwrap();
136593        let _: ChecklistTasksDone = rmp_serde::from_slice(ser.as_slice()).unwrap();
136594    }
136595    #[test]
136596    fn json_serialize_checklist_tasks_done() {
136597        let t = ChecklistTasksDone::default();
136598        let ser = serde_json::to_string(&t).unwrap();
136599        println!("{}", ser);
136600        let _: ChecklistTasksDone = serde_json::from_str(&ser).unwrap();
136601    }
136602    #[test]
136603    fn rmp_serialize_named_input_story_content_video() {
136604        let t = InputStoryContentVideo::default();
136605        let ser = rmp_serde::to_vec_named(&t).unwrap();
136606        let _: InputStoryContentVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136607    }
136608    #[test]
136609    fn rmp_serialize_array_input_story_content_video() {
136610        let t = InputStoryContentVideo::default();
136611        let t = t.noskip();
136612        let ser = rmp_serde::to_vec(&t).unwrap();
136613        let _: InputStoryContentVideo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136614    }
136615    #[test]
136616    fn json_serialize_input_story_content_video() {
136617        let t = InputStoryContentVideo::default();
136618        let ser = serde_json::to_string(&t).unwrap();
136619        println!("{}", ser);
136620        let _: InputStoryContentVideo = serde_json::from_str(&ser).unwrap();
136621    }
136622    #[test]
136623    fn rmp_serialize_named_background_type_chat_theme() {
136624        let t = BackgroundTypeChatTheme::default();
136625        let ser = rmp_serde::to_vec_named(&t).unwrap();
136626        let _: BackgroundTypeChatTheme = rmp_serde::from_slice(ser.as_slice()).unwrap();
136627    }
136628    #[test]
136629    fn rmp_serialize_array_background_type_chat_theme() {
136630        let t = BackgroundTypeChatTheme::default();
136631        let t = t.noskip();
136632        let ser = rmp_serde::to_vec(&t).unwrap();
136633        let _: BackgroundTypeChatTheme = rmp_serde::from_slice(ser.as_slice()).unwrap();
136634    }
136635    #[test]
136636    fn json_serialize_background_type_chat_theme() {
136637        let t = BackgroundTypeChatTheme::default();
136638        let ser = serde_json::to_string(&t).unwrap();
136639        println!("{}", ser);
136640        let _: BackgroundTypeChatTheme = serde_json::from_str(&ser).unwrap();
136641    }
136642    #[test]
136643    fn rmp_serialize_named_inaccessible_message() {
136644        let t = InaccessibleMessage::default();
136645        let ser = rmp_serde::to_vec_named(&t).unwrap();
136646        let _: InaccessibleMessage = rmp_serde::from_slice(ser.as_slice()).unwrap();
136647    }
136648    #[test]
136649    fn rmp_serialize_array_inaccessible_message() {
136650        let t = InaccessibleMessage::default();
136651        let t = t.noskip();
136652        let ser = rmp_serde::to_vec(&t).unwrap();
136653        let _: InaccessibleMessage = rmp_serde::from_slice(ser.as_slice()).unwrap();
136654    }
136655    #[test]
136656    fn json_serialize_inaccessible_message() {
136657        let t = InaccessibleMessage::default();
136658        let ser = serde_json::to_string(&t).unwrap();
136659        println!("{}", ser);
136660        let _: InaccessibleMessage = serde_json::from_str(&ser).unwrap();
136661    }
136662    #[test]
136663    fn rmp_serialize_named_input_checklist() {
136664        let t = InputChecklist::default();
136665        let ser = rmp_serde::to_vec_named(&t).unwrap();
136666        let _: InputChecklist = rmp_serde::from_slice(ser.as_slice()).unwrap();
136667    }
136668    #[test]
136669    fn rmp_serialize_array_input_checklist() {
136670        let t = InputChecklist::default();
136671        let t = t.noskip();
136672        let ser = rmp_serde::to_vec(&t).unwrap();
136673        let _: InputChecklist = rmp_serde::from_slice(ser.as_slice()).unwrap();
136674    }
136675    #[test]
136676    fn json_serialize_input_checklist() {
136677        let t = InputChecklist::default();
136678        let ser = serde_json::to_string(&t).unwrap();
136679        println!("{}", ser);
136680        let _: InputChecklist = serde_json::from_str(&ser).unwrap();
136681    }
136682    #[test]
136683    fn rmp_serialize_named_suggested_post_info() {
136684        let t = SuggestedPostInfo::default();
136685        let ser = rmp_serde::to_vec_named(&t).unwrap();
136686        let _: SuggestedPostInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136687    }
136688    #[test]
136689    fn rmp_serialize_array_suggested_post_info() {
136690        let t = SuggestedPostInfo::default();
136691        let t = t.noskip();
136692        let ser = rmp_serde::to_vec(&t).unwrap();
136693        let _: SuggestedPostInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136694    }
136695    #[test]
136696    fn json_serialize_suggested_post_info() {
136697        let t = SuggestedPostInfo::default();
136698        let ser = serde_json::to_string(&t).unwrap();
136699        println!("{}", ser);
136700        let _: SuggestedPostInfo = serde_json::from_str(&ser).unwrap();
136701    }
136702    #[test]
136703    fn rmp_serialize_named_switch_inline_query_chosen_chat() {
136704        let t = SwitchInlineQueryChosenChat::default();
136705        let ser = rmp_serde::to_vec_named(&t).unwrap();
136706        let _: SwitchInlineQueryChosenChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136707    }
136708    #[test]
136709    fn rmp_serialize_array_switch_inline_query_chosen_chat() {
136710        let t = SwitchInlineQueryChosenChat::default();
136711        let t = t.noskip();
136712        let ser = rmp_serde::to_vec(&t).unwrap();
136713        let _: SwitchInlineQueryChosenChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136714    }
136715    #[test]
136716    fn json_serialize_switch_inline_query_chosen_chat() {
136717        let t = SwitchInlineQueryChosenChat::default();
136718        let ser = serde_json::to_string(&t).unwrap();
136719        println!("{}", ser);
136720        let _: SwitchInlineQueryChosenChat = serde_json::from_str(&ser).unwrap();
136721    }
136722    #[test]
136723    fn rmp_serialize_named_accepted_gift_types() {
136724        let t = AcceptedGiftTypes::default();
136725        let ser = rmp_serde::to_vec_named(&t).unwrap();
136726        let _: AcceptedGiftTypes = rmp_serde::from_slice(ser.as_slice()).unwrap();
136727    }
136728    #[test]
136729    fn rmp_serialize_array_accepted_gift_types() {
136730        let t = AcceptedGiftTypes::default();
136731        let t = t.noskip();
136732        let ser = rmp_serde::to_vec(&t).unwrap();
136733        let _: AcceptedGiftTypes = rmp_serde::from_slice(ser.as_slice()).unwrap();
136734    }
136735    #[test]
136736    fn json_serialize_accepted_gift_types() {
136737        let t = AcceptedGiftTypes::default();
136738        let ser = serde_json::to_string(&t).unwrap();
136739        println!("{}", ser);
136740        let _: AcceptedGiftTypes = serde_json::from_str(&ser).unwrap();
136741    }
136742    #[test]
136743    fn rmp_serialize_named_passport_element_error_translation_file() {
136744        let t = PassportElementErrorTranslationFile::default();
136745        let ser = rmp_serde::to_vec_named(&t).unwrap();
136746        let _: PassportElementErrorTranslationFile = rmp_serde::from_slice(ser.as_slice()).unwrap();
136747    }
136748    #[test]
136749    fn rmp_serialize_array_passport_element_error_translation_file() {
136750        let t = PassportElementErrorTranslationFile::default();
136751        let t = t.noskip();
136752        let ser = rmp_serde::to_vec(&t).unwrap();
136753        let _: PassportElementErrorTranslationFile = rmp_serde::from_slice(ser.as_slice()).unwrap();
136754    }
136755    #[test]
136756    fn json_serialize_passport_element_error_translation_file() {
136757        let t = PassportElementErrorTranslationFile::default();
136758        let ser = serde_json::to_string(&t).unwrap();
136759        println!("{}", ser);
136760        let _: PassportElementErrorTranslationFile = serde_json::from_str(&ser).unwrap();
136761    }
136762    #[test]
136763    fn rmp_serialize_named_business_location() {
136764        let t = BusinessLocation::default();
136765        let ser = rmp_serde::to_vec_named(&t).unwrap();
136766        let _: BusinessLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
136767    }
136768    #[test]
136769    fn rmp_serialize_array_business_location() {
136770        let t = BusinessLocation::default();
136771        let t = t.noskip();
136772        let ser = rmp_serde::to_vec(&t).unwrap();
136773        let _: BusinessLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
136774    }
136775    #[test]
136776    fn json_serialize_business_location() {
136777        let t = BusinessLocation::default();
136778        let ser = serde_json::to_string(&t).unwrap();
136779        println!("{}", ser);
136780        let _: BusinessLocation = serde_json::from_str(&ser).unwrap();
136781    }
136782    #[test]
136783    fn rmp_serialize_named_affiliate_info() {
136784        let t = AffiliateInfo::default();
136785        let ser = rmp_serde::to_vec_named(&t).unwrap();
136786        let _: AffiliateInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136787    }
136788    #[test]
136789    fn rmp_serialize_array_affiliate_info() {
136790        let t = AffiliateInfo::default();
136791        let t = t.noskip();
136792        let ser = rmp_serde::to_vec(&t).unwrap();
136793        let _: AffiliateInfo = rmp_serde::from_slice(ser.as_slice()).unwrap();
136794    }
136795    #[test]
136796    fn json_serialize_affiliate_info() {
136797        let t = AffiliateInfo::default();
136798        let ser = serde_json::to_string(&t).unwrap();
136799        println!("{}", ser);
136800        let _: AffiliateInfo = serde_json::from_str(&ser).unwrap();
136801    }
136802    #[test]
136803    fn rmp_serialize_named_message_origin_chat() {
136804        let t = MessageOriginChat::default();
136805        let ser = rmp_serde::to_vec_named(&t).unwrap();
136806        let _: MessageOriginChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136807    }
136808    #[test]
136809    fn rmp_serialize_array_message_origin_chat() {
136810        let t = MessageOriginChat::default();
136811        let t = t.noskip();
136812        let ser = rmp_serde::to_vec(&t).unwrap();
136813        let _: MessageOriginChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136814    }
136815    #[test]
136816    fn json_serialize_message_origin_chat() {
136817        let t = MessageOriginChat::default();
136818        let ser = serde_json::to_string(&t).unwrap();
136819        println!("{}", ser);
136820        let _: MessageOriginChat = serde_json::from_str(&ser).unwrap();
136821    }
136822    #[test]
136823    fn rmp_serialize_named_bot_command_scope_chat() {
136824        let t = BotCommandScopeChat::default();
136825        let ser = rmp_serde::to_vec_named(&t).unwrap();
136826        let _: BotCommandScopeChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136827    }
136828    #[test]
136829    fn rmp_serialize_array_bot_command_scope_chat() {
136830        let t = BotCommandScopeChat::default();
136831        let t = t.noskip();
136832        let ser = rmp_serde::to_vec(&t).unwrap();
136833        let _: BotCommandScopeChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136834    }
136835    #[test]
136836    fn json_serialize_bot_command_scope_chat() {
136837        let t = BotCommandScopeChat::default();
136838        let ser = serde_json::to_string(&t).unwrap();
136839        println!("{}", ser);
136840        let _: BotCommandScopeChat = serde_json::from_str(&ser).unwrap();
136841    }
136842    #[test]
136843    fn rmp_serialize_named_passport_element_error_reverse_side() {
136844        let t = PassportElementErrorReverseSide::default();
136845        let ser = rmp_serde::to_vec_named(&t).unwrap();
136846        let _: PassportElementErrorReverseSide = rmp_serde::from_slice(ser.as_slice()).unwrap();
136847    }
136848    #[test]
136849    fn rmp_serialize_array_passport_element_error_reverse_side() {
136850        let t = PassportElementErrorReverseSide::default();
136851        let t = t.noskip();
136852        let ser = rmp_serde::to_vec(&t).unwrap();
136853        let _: PassportElementErrorReverseSide = rmp_serde::from_slice(ser.as_slice()).unwrap();
136854    }
136855    #[test]
136856    fn json_serialize_passport_element_error_reverse_side() {
136857        let t = PassportElementErrorReverseSide::default();
136858        let ser = serde_json::to_string(&t).unwrap();
136859        println!("{}", ser);
136860        let _: PassportElementErrorReverseSide = serde_json::from_str(&ser).unwrap();
136861    }
136862    #[test]
136863    fn rmp_serialize_named_inline_query_result_photo() {
136864        let t = InlineQueryResultPhoto::default();
136865        let ser = rmp_serde::to_vec_named(&t).unwrap();
136866        let _: InlineQueryResultPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
136867    }
136868    #[test]
136869    fn rmp_serialize_array_inline_query_result_photo() {
136870        let t = InlineQueryResultPhoto::default();
136871        let t = t.noskip();
136872        let ser = rmp_serde::to_vec(&t).unwrap();
136873        let _: InlineQueryResultPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
136874    }
136875    #[test]
136876    fn json_serialize_inline_query_result_photo() {
136877        let t = InlineQueryResultPhoto::default();
136878        let ser = serde_json::to_string(&t).unwrap();
136879        println!("{}", ser);
136880        let _: InlineQueryResultPhoto = serde_json::from_str(&ser).unwrap();
136881    }
136882    #[test]
136883    fn rmp_serialize_named_story_area_type_link() {
136884        let t = StoryAreaTypeLink::default();
136885        let ser = rmp_serde::to_vec_named(&t).unwrap();
136886        let _: StoryAreaTypeLink = rmp_serde::from_slice(ser.as_slice()).unwrap();
136887    }
136888    #[test]
136889    fn rmp_serialize_array_story_area_type_link() {
136890        let t = StoryAreaTypeLink::default();
136891        let t = t.noskip();
136892        let ser = rmp_serde::to_vec(&t).unwrap();
136893        let _: StoryAreaTypeLink = rmp_serde::from_slice(ser.as_slice()).unwrap();
136894    }
136895    #[test]
136896    fn json_serialize_story_area_type_link() {
136897        let t = StoryAreaTypeLink::default();
136898        let ser = serde_json::to_string(&t).unwrap();
136899        println!("{}", ser);
136900        let _: StoryAreaTypeLink = serde_json::from_str(&ser).unwrap();
136901    }
136902    #[test]
136903    fn rmp_serialize_named_input_sticker() {
136904        let t = InputSticker::default();
136905        let ser = rmp_serde::to_vec_named(&t).unwrap();
136906        let _: InputSticker = rmp_serde::from_slice(ser.as_slice()).unwrap();
136907    }
136908    #[test]
136909    fn rmp_serialize_array_input_sticker() {
136910        let t = InputSticker::default();
136911        let t = t.noskip();
136912        let ser = rmp_serde::to_vec(&t).unwrap();
136913        let _: InputSticker = rmp_serde::from_slice(ser.as_slice()).unwrap();
136914    }
136915    #[test]
136916    fn json_serialize_input_sticker() {
136917        let t = InputSticker::default();
136918        let ser = serde_json::to_string(&t).unwrap();
136919        println!("{}", ser);
136920        let _: InputSticker = serde_json::from_str(&ser).unwrap();
136921    }
136922    #[test]
136923    fn rmp_serialize_named_input_paid_media_photo() {
136924        let t = InputPaidMediaPhoto::default();
136925        let ser = rmp_serde::to_vec_named(&t).unwrap();
136926        let _: InputPaidMediaPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
136927    }
136928    #[test]
136929    fn rmp_serialize_array_input_paid_media_photo() {
136930        let t = InputPaidMediaPhoto::default();
136931        let t = t.noskip();
136932        let ser = rmp_serde::to_vec(&t).unwrap();
136933        let _: InputPaidMediaPhoto = rmp_serde::from_slice(ser.as_slice()).unwrap();
136934    }
136935    #[test]
136936    fn json_serialize_input_paid_media_photo() {
136937        let t = InputPaidMediaPhoto::default();
136938        let ser = serde_json::to_string(&t).unwrap();
136939        println!("{}", ser);
136940        let _: InputPaidMediaPhoto = serde_json::from_str(&ser).unwrap();
136941    }
136942    #[test]
136943    fn rmp_serialize_named_input_profile_photo_static() {
136944        let t = InputProfilePhotoStatic::default();
136945        let ser = rmp_serde::to_vec_named(&t).unwrap();
136946        let _: InputProfilePhotoStatic = rmp_serde::from_slice(ser.as_slice()).unwrap();
136947    }
136948    #[test]
136949    fn rmp_serialize_array_input_profile_photo_static() {
136950        let t = InputProfilePhotoStatic::default();
136951        let t = t.noskip();
136952        let ser = rmp_serde::to_vec(&t).unwrap();
136953        let _: InputProfilePhotoStatic = rmp_serde::from_slice(ser.as_slice()).unwrap();
136954    }
136955    #[test]
136956    fn json_serialize_input_profile_photo_static() {
136957        let t = InputProfilePhotoStatic::default();
136958        let ser = serde_json::to_string(&t).unwrap();
136959        println!("{}", ser);
136960        let _: InputProfilePhotoStatic = serde_json::from_str(&ser).unwrap();
136961    }
136962    #[test]
136963    fn rmp_serialize_named_transaction_partner_chat() {
136964        let t = TransactionPartnerChat::default();
136965        let ser = rmp_serde::to_vec_named(&t).unwrap();
136966        let _: TransactionPartnerChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136967    }
136968    #[test]
136969    fn rmp_serialize_array_transaction_partner_chat() {
136970        let t = TransactionPartnerChat::default();
136971        let t = t.noskip();
136972        let ser = rmp_serde::to_vec(&t).unwrap();
136973        let _: TransactionPartnerChat = rmp_serde::from_slice(ser.as_slice()).unwrap();
136974    }
136975    #[test]
136976    fn json_serialize_transaction_partner_chat() {
136977        let t = TransactionPartnerChat::default();
136978        let ser = serde_json::to_string(&t).unwrap();
136979        println!("{}", ser);
136980        let _: TransactionPartnerChat = serde_json::from_str(&ser).unwrap();
136981    }
136982    #[test]
136983    fn rmp_serialize_named_bot_command_scope_chat_administrators() {
136984        let t = BotCommandScopeChatAdministrators::default();
136985        let ser = rmp_serde::to_vec_named(&t).unwrap();
136986        let _: BotCommandScopeChatAdministrators = rmp_serde::from_slice(ser.as_slice()).unwrap();
136987    }
136988    #[test]
136989    fn rmp_serialize_array_bot_command_scope_chat_administrators() {
136990        let t = BotCommandScopeChatAdministrators::default();
136991        let t = t.noskip();
136992        let ser = rmp_serde::to_vec(&t).unwrap();
136993        let _: BotCommandScopeChatAdministrators = rmp_serde::from_slice(ser.as_slice()).unwrap();
136994    }
136995    #[test]
136996    fn json_serialize_bot_command_scope_chat_administrators() {
136997        let t = BotCommandScopeChatAdministrators::default();
136998        let ser = serde_json::to_string(&t).unwrap();
136999        println!("{}", ser);
137000        let _: BotCommandScopeChatAdministrators = serde_json::from_str(&ser).unwrap();
137001    }
137002    #[test]
137003    fn rmp_serialize_named_paid_media_purchased() {
137004        let t = PaidMediaPurchased::default();
137005        let ser = rmp_serde::to_vec_named(&t).unwrap();
137006        let _: PaidMediaPurchased = rmp_serde::from_slice(ser.as_slice()).unwrap();
137007    }
137008    #[test]
137009    fn rmp_serialize_array_paid_media_purchased() {
137010        let t = PaidMediaPurchased::default();
137011        let t = t.noskip();
137012        let ser = rmp_serde::to_vec(&t).unwrap();
137013        let _: PaidMediaPurchased = rmp_serde::from_slice(ser.as_slice()).unwrap();
137014    }
137015    #[test]
137016    fn json_serialize_paid_media_purchased() {
137017        let t = PaidMediaPurchased::default();
137018        let ser = serde_json::to_string(&t).unwrap();
137019        println!("{}", ser);
137020        let _: PaidMediaPurchased = serde_json::from_str(&ser).unwrap();
137021    }
137022    #[test]
137023    fn rmp_serialize_named_chat_location() {
137024        let t = ChatLocation::default();
137025        let ser = rmp_serde::to_vec_named(&t).unwrap();
137026        let _: ChatLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
137027    }
137028    #[test]
137029    fn rmp_serialize_array_chat_location() {
137030        let t = ChatLocation::default();
137031        let t = t.noskip();
137032        let ser = rmp_serde::to_vec(&t).unwrap();
137033        let _: ChatLocation = rmp_serde::from_slice(ser.as_slice()).unwrap();
137034    }
137035    #[test]
137036    fn json_serialize_chat_location() {
137037        let t = ChatLocation::default();
137038        let ser = serde_json::to_string(&t).unwrap();
137039        println!("{}", ser);
137040        let _: ChatLocation = serde_json::from_str(&ser).unwrap();
137041    }
137042    #[test]
137043    fn rmp_serialize_named_chat_member_updated() {
137044        let t = ChatMemberUpdated::default();
137045        let ser = rmp_serde::to_vec_named(&t).unwrap();
137046        let _: ChatMemberUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
137047    }
137048    #[test]
137049    fn rmp_serialize_array_chat_member_updated() {
137050        let t = ChatMemberUpdated::default();
137051        let t = t.noskip();
137052        let ser = rmp_serde::to_vec(&t).unwrap();
137053        let _: ChatMemberUpdated = rmp_serde::from_slice(ser.as_slice()).unwrap();
137054    }
137055    #[test]
137056    fn json_serialize_chat_member_updated() {
137057        let t = ChatMemberUpdated::default();
137058        let ser = serde_json::to_string(&t).unwrap();
137059        println!("{}", ser);
137060        let _: ChatMemberUpdated = serde_json::from_str(&ser).unwrap();
137061    }
137062    #[test]
137063    fn rmp_serialize_named_venue() {
137064        let t = Venue::default();
137065        let ser = rmp_serde::to_vec_named(&t).unwrap();
137066        let _: Venue = rmp_serde::from_slice(ser.as_slice()).unwrap();
137067    }
137068    #[test]
137069    fn rmp_serialize_array_venue() {
137070        let t = Venue::default();
137071        let t = t.noskip();
137072        let ser = rmp_serde::to_vec(&t).unwrap();
137073        let _: Venue = rmp_serde::from_slice(ser.as_slice()).unwrap();
137074    }
137075    #[test]
137076    fn json_serialize_venue() {
137077        let t = Venue::default();
137078        let ser = serde_json::to_string(&t).unwrap();
137079        println!("{}", ser);
137080        let _: Venue = serde_json::from_str(&ser).unwrap();
137081    }
137082    #[test]
137083    fn rmp_serialize_named_chat_boost_added() {
137084        let t = ChatBoostAdded::default();
137085        let ser = rmp_serde::to_vec_named(&t).unwrap();
137086        let _: ChatBoostAdded = rmp_serde::from_slice(ser.as_slice()).unwrap();
137087    }
137088    #[test]
137089    fn rmp_serialize_array_chat_boost_added() {
137090        let t = ChatBoostAdded::default();
137091        let t = t.noskip();
137092        let ser = rmp_serde::to_vec(&t).unwrap();
137093        let _: ChatBoostAdded = rmp_serde::from_slice(ser.as_slice()).unwrap();
137094    }
137095    #[test]
137096    fn json_serialize_chat_boost_added() {
137097        let t = ChatBoostAdded::default();
137098        let ser = serde_json::to_string(&t).unwrap();
137099        println!("{}", ser);
137100        let _: ChatBoostAdded = serde_json::from_str(&ser).unwrap();
137101    }
137102    #[test]
137103    fn rmp_serialize_named_reaction_type_custom_emoji() {
137104        let t = ReactionTypeCustomEmoji::default();
137105        let ser = rmp_serde::to_vec_named(&t).unwrap();
137106        let _: ReactionTypeCustomEmoji = rmp_serde::from_slice(ser.as_slice()).unwrap();
137107    }
137108    #[test]
137109    fn rmp_serialize_array_reaction_type_custom_emoji() {
137110        let t = ReactionTypeCustomEmoji::default();
137111        let t = t.noskip();
137112        let ser = rmp_serde::to_vec(&t).unwrap();
137113        let _: ReactionTypeCustomEmoji = rmp_serde::from_slice(ser.as_slice()).unwrap();
137114    }
137115    #[test]
137116    fn json_serialize_reaction_type_custom_emoji() {
137117        let t = ReactionTypeCustomEmoji::default();
137118        let ser = serde_json::to_string(&t).unwrap();
137119        println!("{}", ser);
137120        let _: ReactionTypeCustomEmoji = serde_json::from_str(&ser).unwrap();
137121    }
137122    #[test]
137123    fn rmp_serialize_named_location_address() {
137124        let t = LocationAddress::default();
137125        let ser = rmp_serde::to_vec_named(&t).unwrap();
137126        let _: LocationAddress = rmp_serde::from_slice(ser.as_slice()).unwrap();
137127    }
137128    #[test]
137129    fn rmp_serialize_array_location_address() {
137130        let t = LocationAddress::default();
137131        let t = t.noskip();
137132        let ser = rmp_serde::to_vec(&t).unwrap();
137133        let _: LocationAddress = rmp_serde::from_slice(ser.as_slice()).unwrap();
137134    }
137135    #[test]
137136    fn json_serialize_location_address() {
137137        let t = LocationAddress::default();
137138        let ser = serde_json::to_string(&t).unwrap();
137139        println!("{}", ser);
137140        let _: LocationAddress = serde_json::from_str(&ser).unwrap();
137141    }
137142    #[test]
137143    fn rmp_serialize_named_owned_gift_regular() {
137144        let t = OwnedGiftRegular::default();
137145        let ser = rmp_serde::to_vec_named(&t).unwrap();
137146        let _: OwnedGiftRegular = rmp_serde::from_slice(ser.as_slice()).unwrap();
137147    }
137148    #[test]
137149    fn rmp_serialize_array_owned_gift_regular() {
137150        let t = OwnedGiftRegular::default();
137151        let t = t.noskip();
137152        let ser = rmp_serde::to_vec(&t).unwrap();
137153        let _: OwnedGiftRegular = rmp_serde::from_slice(ser.as_slice()).unwrap();
137154    }
137155    #[test]
137156    fn json_serialize_owned_gift_regular() {
137157        let t = OwnedGiftRegular::default();
137158        let ser = serde_json::to_string(&t).unwrap();
137159        println!("{}", ser);
137160        let _: OwnedGiftRegular = serde_json::from_str(&ser).unwrap();
137161    }
137162    #[test]
137163    fn rmp_serialize_named_inline_keyboard_markup() {
137164        let t = InlineKeyboardMarkup::default();
137165        let ser = rmp_serde::to_vec_named(&t).unwrap();
137166        let _: InlineKeyboardMarkup = rmp_serde::from_slice(ser.as_slice()).unwrap();
137167    }
137168    #[test]
137169    fn rmp_serialize_array_inline_keyboard_markup() {
137170        let t = InlineKeyboardMarkup::default();
137171        let t = t.noskip();
137172        let ser = rmp_serde::to_vec(&t).unwrap();
137173        let _: InlineKeyboardMarkup = rmp_serde::from_slice(ser.as_slice()).unwrap();
137174    }
137175    #[test]
137176    fn json_serialize_inline_keyboard_markup() {
137177        let t = InlineKeyboardMarkup::default();
137178        let ser = serde_json::to_string(&t).unwrap();
137179        println!("{}", ser);
137180        let _: InlineKeyboardMarkup = serde_json::from_str(&ser).unwrap();
137181    }
137182    #[test]
137183    fn rmp_serialize_named_story_area() {
137184        let t = StoryArea::default();
137185        let ser = rmp_serde::to_vec_named(&t).unwrap();
137186        let _: StoryArea = rmp_serde::from_slice(ser.as_slice()).unwrap();
137187    }
137188    #[test]
137189    fn rmp_serialize_array_story_area() {
137190        let t = StoryArea::default();
137191        let t = t.noskip();
137192        let ser = rmp_serde::to_vec(&t).unwrap();
137193        let _: StoryArea = rmp_serde::from_slice(ser.as_slice()).unwrap();
137194    }
137195    #[test]
137196    fn json_serialize_story_area() {
137197        let t = StoryArea::default();
137198        let ser = serde_json::to_string(&t).unwrap();
137199        println!("{}", ser);
137200        let _: StoryArea = serde_json::from_str(&ser).unwrap();
137201    }
137202    #[test]
137203    fn rmp_serialize_named_story_area_type_unique_gift() {
137204        let t = StoryAreaTypeUniqueGift::default();
137205        let ser = rmp_serde::to_vec_named(&t).unwrap();
137206        let _: StoryAreaTypeUniqueGift = rmp_serde::from_slice(ser.as_slice()).unwrap();
137207    }
137208    #[test]
137209    fn rmp_serialize_array_story_area_type_unique_gift() {
137210        let t = StoryAreaTypeUniqueGift::default();
137211        let t = t.noskip();
137212        let ser = rmp_serde::to_vec(&t).unwrap();
137213        let _: StoryAreaTypeUniqueGift = rmp_serde::from_slice(ser.as_slice()).unwrap();
137214    }
137215    #[test]
137216    fn json_serialize_story_area_type_unique_gift() {
137217        let t = StoryAreaTypeUniqueGift::default();
137218        let ser = serde_json::to_string(&t).unwrap();
137219        println!("{}", ser);
137220        let _: StoryAreaTypeUniqueGift = serde_json::from_str(&ser).unwrap();
137221    }
137222    #[test]
137223    fn rmp_serialize_named_passport_data() {
137224        let t = PassportData::default();
137225        let ser = rmp_serde::to_vec_named(&t).unwrap();
137226        let _: PassportData = rmp_serde::from_slice(ser.as_slice()).unwrap();
137227    }
137228    #[test]
137229    fn rmp_serialize_array_passport_data() {
137230        let t = PassportData::default();
137231        let t = t.noskip();
137232        let ser = rmp_serde::to_vec(&t).unwrap();
137233        let _: PassportData = rmp_serde::from_slice(ser.as_slice()).unwrap();
137234    }
137235    #[test]
137236    fn json_serialize_passport_data() {
137237        let t = PassportData::default();
137238        let ser = serde_json::to_string(&t).unwrap();
137239        println!("{}", ser);
137240        let _: PassportData = serde_json::from_str(&ser).unwrap();
137241    }
137242    #[test]
137243    fn new_unbox() {
137244        let v: BoxWrapper<Unbox<Message>> = BoxWrapper::new_unbox(Message::default());
137245        let _: Message = v.into();
137246    }
137247}